The invention provides a block chain data
interaction method and device capable of switching
consensus algorithms. Different
consensus algorithms are accessed for different service scenes, pluggable access is realized, the
consensus efficiency of the block
chain system is improved, the data interaction
response time is shortened, powerful support is provided for function and performance of
big data services with complex block chain
processing logic, convenience is provided for function development, and the research and development efficiency is improved. According to the method, high couplingof a
consensus algorithm and a block
chain system verification node is solved, a design idea of a pluggable
consensus algorithm is provided,
system consensus and intelligent contract decoupling are realized, the
consensus algorithm is high in availability and easy to expand, and monitoring operation and maintenance of the consensus node are more convenient and controllable. Meanwhile, the problemthat the communication cost of the original PBFT
algorithm is too high in a private chain environment is solved, and the
communication complexity is reduced after the RAFT
algorithm is used. The average
response time of the block chain can be effectively reduced, the
utilization rate of a CPU and a memory of a
server is reduced, and the resource overhead is saved.