With the rapid development of blockchain technology, consistency assurance of distributed database has become one of the key issues. In this paper, a blockchain distributed database consistency assurance mechanism based on the practical Byzantine fault tolerance (Rpbft) algorithm and its improved algorithm is studied in depth.The RPBFT algorithm combines the RSA algorithm and the PBFT consensus algorithm, and then performs the signature operation after message encryption in order to increase the system security. Aiming at the shortcomings of the master node selection mechanism of the original algorithm and the RPBFT algorithm, a master node selection mechanism that includes the time factor is proposed, which introduces the role of the recording node, so that the waiting time of the node can be adjusted dynamically. Meanwhile the algorithm changes the conditions of view switching and reduces the system consumption. Through simulation experiments to verify the performance of this paper’s R-PBFT algorithm and OmniLedger and RapidChain two programs in the same network conditions, this paper’s algorithm compared to the comparison algorithm can be more effective in guaranteeing the consistency of the distributed database, when the number of slices is 20, the transaction latency time is 13s, 25s lower than that of RapidChain and OmniLedger, respectively. When the number of shards is 20, the transaction delay time is lower than that of RapidChain and OmniLedger by 13s and 25s respectively, which provides strong support for the application of blockchain technology in the field of distributed database.