| In recent years,there has been a rapid development of blockchain technology,which has evolved from its initial application solely in the domain of digital currencies to now bringing forth new solutions and developmental opportunities for multiple fields such as finance,healthcare,education,and industry.Blockchain technology is currently being globally recognized and studied in-depth.As one of the core components of blockchain technology,the consensus mechanism is regarded as the cornerstone for ensuring system security and reliability.The performance of the consensus algorithm is directly determined by the efficiency and usability of the entire system.Therefore,the design of an efficient consensus mechanism is of crucial significance for enhancing the performance of blockchain systems and ensuring their security and trustworthiness.This thesis studied the performance and application of the Raft consensus algorithm in blockchain technology.Firstly,an optimization mechanism of Raft consensus was proposed to address the abnormal situation caused by network partitioning.This mechanism introduced the concept of outdated nodes and added a role called "Pre Candidate" as well as a Pre C RPC message to conduct qualification review before the formal Candidate election stage.Through this measure,outdated nodes can be "filtered out".The proposed Pre C-Raft algorithm can save time and reduce election latency and consensus delay when outdated nodes appear in the cluster,improving consensus efficiency and enabling the Raft algorithm to cope with more extreme network environments.Secondly,to address the leader bottleneck problem and low resource utilization of other nodes,a Raft consensus optimization mechanism based on follower subgroup division with balanced load was proposed.The follower nodes in the network were divided into different subgroups using the k-means clustering algorithm,and the better-performing ones were elected as the main nodes within the subgroups through node behavior evaluation and the wave count method.Consensus operations were dispersed to the subgroups composed of various follower nodes to share the responsibility,effectively reducing the dependence on leader nodes,thereby reducing the risk of single point failure and improving system reliability and stability.The implementation of this distributed consensus mechanism can reduce resource consumption on leader nodes and communication overhead in the entire network,thereby improving cluster response speed and throughput.Finally,based on the proposed Raft consensus optimization mechanism,an application and verification were conducted in the field of medical information management.A trusted medical information management system based on FISCO BCOS was designed and implemented to achieve secure sharing of medical digital credentials,and performance testing was carried out.The optimization mechanism proposed in this thesis has achieved good results in all aspects of consensus performance,improving the high availability and consensus efficiency of the cluster system.This has significant implications for further research on blockchain consensus theory and distributed system applications.Additionally,the trustworthy medical information management system based on FISCO BCOS provides a secure and trustworthy pathway for sharing blockchain medical data certificates,effectively addressing the problems of opacity,data tampering,and lack of traceability in traditional medical data.Overall,this thesis’ s proposed optimization mechanism and application in the medical information management field demonstrate the practical value and potential of blockchain technology in solving real-world problems.Further research and development in this area are expected to provide more opportunities for improving the efficiency,security,and reliability of blockchain-based systems. |