| With the rapid development of Internet technology today,from daily food ordering to work reports,from personal life to national government affairs,all kinds of data are everywhere.Massive amounts of data are not only generated in emerging industries on the Internet,but also in traditional industries such as medical care,transportation,and education.Various information formats have evolved from text to electronic formats,and storage carriers have also been upgraded from books and paper to computer memory.However,the traditional centralized data storage method faces the threat of islanding,high redundancy,security risks and other problems,and the new data storage method has a wide range of application requirements.With its features of decentralization,distribution,and immutability,blockchain technology has certain feasibility in the research of data storage technology.It is of great significance to study data storage technology based on blockchain.This thesis firstly studied the key technologies of blockchain data storage,focusing on the consensus mechanism and smart contracts in the blockchain.This thesis studied and analyzed the demand conditions of blockchain data storage for consensus algorithms.Then,the existing consensus algorithms mainly based on PBFT were studied,and the performance of the consensus algorithms were tested through through experiments.According to the analysis of the experimental results,the PBFT algorithm could meet the needs and was suitable as an improved original algorithm.Then,this thesis made a theoretical analysis of the PBFT algorithm and obtains the overall idea and improvement plan of the algorithm improvement.The improvement included three aspects:(1)The execution process of the original PBFT algorithm was deleted and reorganized by stages,and the original three broadcast changes were changed.In order to broadcast twice,so as to improve the consensus efficiency of the algorithm and improve the performance of the algorithm;(2)This thesis used the historical consensus result of the node as the input value,and combined the mathematical expectation of the beta probability distribution to predict the future consensus result of the node to achieve consensus.Dynamic detection of nodes and selection of stable consensus nodes for each round of consensus;(3)Introducing the master node scoring and pre-selection mechanism to set reference indicators for nodes to become master nodes.The score increased or decreased according to the performance of nodes in each round of consensus.Furthermore,the stability of the algorithm was improved by narrowing the selection range of the master node.The performance of the improved algorithm was tested through simulation experiments.The results showed that the improved algorithm has good performance and can meet the algorithm requirements of blockchain data storage.Finally,this thesis proposed a data chain storage model for medical and health scenarios in view of the data islands,redundancy,security and other problems existing in traditional medical data storage methods,and realized it through system design,improved algorithm deployment,blockchain construction and system development.This system could provide system platform support for the medical diagnosis of doctors and patients,and verified the feasibility of improving the consensus algorithm and the application of blockchain data storage model. |