The PBFT (Practical Byzantine Fault Tolerant) is a consensus algorithm widely used in alliance blockchain, but there are some problems of high communication overhead and high latency. Therefore, the original PBFT consensus algorithm is improved in the paper. Firstly, the voting mechanism is introduced for the original PBFT algorithm. The nodes are divided into two classes: consensus node and ordinary node. The primary node is selected from the consensus nodes to lead the consensus process to ensure the reliability of the consensus results. Secondly, the consensus process of PBFT algorithm was optimized. The consensus process is simplified into three phases, which reduces the algorithm complexity and improves the consensus efficiency. The experiment shows that our improved PBFT algorithm has better performance than the original PBFT algorithm in communication overhead and consensus delay.