The PBFT consensus algorithm was proposed in 1999 to solve the problem of inefficiency of the original Byzantine fault-tolerant algorithm and reduce the complexity of the algorithm from exponential to polynomial level, making the Byzantine fault-tolerant algorithm feasible in practical system applications. However, the higher-side consensus complexity still has a large impact on the overall performance of the system. In this paper, we propose an improved PBFT consensus algorithm based on a dynamic grouping by credential level, the Level Group Byzantine Fault Tolerance (LGBFT) consensus algorithm. The improvement is aimed at the problem of low performance of the Byzantine fault-tolerant algorithm which has been used in the current blockchain when the number of nodes is large. A simulation system was built using the Golang language for performance testing. The experimental results show that LGBFT has higher performance than PBFT after multiple consensuses, and has greater performance improvement with a larger number of malicious nodes.