| Blockchain is essentially a decentralized database,it is a new application of distributed storage,point-to-point transmission and encryption algorithms and other technologies combined.The consensus algorithm is an important underlying technology of the blockchain.It ensures the consistency and legitimacy of the data stored by each network node without centralized management and third-party authentication.Among them,the DPo S(Delegated Proof of Stake)consensus algorithm has attracted widespread attention due to its advantages of high efficiency and low power consumption.The DPo S consensus algorithm stipulates that the accounting power is allocated based on the results of network elections,and each node obtains the voting rights to participate in the election by holding tokens,or participates in the competition for accounting power.Therefore,the security of the DPo S consensus algorithm depends on the performance of the election mechanism.The rationality and reliability of the election mechanism determines the consistency and legitimacy of network data,which affects the security and stability of the network.In view of some problems in the current DPo S consensus algorithm,the feasible optimization and improvement methods of the DPo S consensus algorithm election mechanism are studied.The specific contents are as follows:Aiming at the problem of unreasonable calculation of node rights and interests,the minority node rights are too high,and the network is prone to " plutocracy ".In this thesis,by improving the equity calculation method,a node equity calculation method based on the balance of interest groups is proposed.This thesis improves the calculation method of rights and interests,and proposes a method of node rights calculation based on the balance of interest groups.The core of this method is to first mark the node attributes,then analyze the voting propensity of each node according to the election results,divide the nodes into groups by voting propensity class,and then calculate the group equity coefficient with reference to the total wealth and the number of nodes of each group,and finally obtain the voting rights of each node.This method can balance the distribution of network rights and interests,and effectively prevent the formation of a "plutocracy" problem by a very few wealthy nodes.Theoretical analysis and simulation experiments confirm the performance of the algorithm in this thesis.Aiming at the problem of inadequate interest relationship between nodes and lack of effective stimulation of nodes,resulting in low voting willingness of nodes in the election,this thesis proposes an election mechanism based on reputation factor and community management.In this method,reputation factor is used as the calculation basis of node voting rights and the basis for bounty distribution,and the concept of community management is introduced to map the interest relationship in the actual application scenario to the network.By linking the node's interests in actual application scenarios,the node's voting rights and network bounty are combined with the community management through reputation factors to form a network interest community.This scheme effectively improves the node election participation rate,the reliability and security of the DPo S consensus algorithm.Theoretical analysis and simulation experiments confirm the performance of the algorithm in this thesis. |