| Since the release of bitcoin,the research on blockchain technology and its scenario application has been on the high side.As one of the core technologies of blockchain technology,consensus mechanism has aroused the enthusiasm of experts and scholars,and attracted the attention of experts and scholars.More and more consensus algorithms have been proposed one after another,including some outstanding consensus algorithms.These consensus algorithms have different advantages and disadvantages in different characteristics.A basic understanding has been formed in the industry.Single consensus algorithm is generally difficult to take into account the essence of efficiency and decentralization.High efficiency means that consensus algorithm needs to achieve high running speed to ensure its performance.Decentralization means that consensus algorithm should be sufficiently decentralized to ensure its security.Therefore,hybrid consensus algorithm has been proposed by many experts and scholars.As a technical representative of blockchain 2.0,Ethereum has experienced many different versions in its development process.One of its versions adopts the PoW(Proof of Work)+ PoS(Proof of Stake)hybrid consensus.In the field of the Internet of things,the traditional trust problems of the Internet of things are based on the trusted third-party centralized database as the support,through the central server to realize the trust mechanism in the Internet of things.In this mode,it is more difficult to build an Internet of things that can be expanded continuously.Moreover,the computing and storage capabilities of Internet of things devices differ greatly.Aiming at the above problems in the Internet of things,this thesis designs an improved hybrid consensus algorithm based on the original PoW consensus algorithm and the PBFT(Practical Byzantine Fault Tolerance)consensus algorithm.First,the basic PoW algorithm and PBFT algorithm are introduced.The execution time of PoW is too long,but one of its advantages is that it does not require node management and has good scalability.Through the good scalability of PoW,it can solve the problem of scale scalability of the Internet of Things.PBFT algorithm has fast execution efficiency,but its decentralization degree is not high enough.When it is executed,it is voted and executed by Byzantine Committee,and all nodes are not required to execute transactions' participation.In the Internet of Things,nodes with strong computing and storage capabilities can serve as committee nodes to participate in all consensus activities,while the node with weak computing capacity only stores its own related content,does not directly participate in consensus activities,but participates in the election and rotation process of committee nodes.The hybrid consensus algorithm in this thesis is based on TrueChain architecture.The PBFT consensus algorithm has high execution efficiency and is responsible for transactionand smart contract processing to meet the requirements of consensus algorithm for high execution efficiency.The Byzantine Committee node in the PBFT rotation election function is open to PoW nodes.The committee node is selected by PoW nodes,and any node can participate in it and become a PoW node,so as to ensure the decentralization degree of consensus algorithm and the security of consensus algorithm.The experimental results and data show that compared with the original consensus algorithm,the hybrid consensus algorithm is better in terms of throughput and delay.The hybrid consensus algorithm combines PBFT with PoW.From the perspective of effect,the hybrid consensus algorithm can basically realize the decentralization essence and achieve high efficiency. |