| How to realize the credible management of grain data in the field of agricultural grain storage,and how to solve the crisis of trust among grain alliance institutions have become urgent needs to ensure national grain security.As a decentralized distributed trusted ledger technology,Blockchain has the advantages of anti-tampering,programmable,safe and reliable.It relies on core technologies such as consensus mechanism,Smart Contract(SC)and cryptography to provide an effective solution for building the mutual supervision mechanism,improving trustworthiness and solving data security problems among the grain alliance multiple institutions.Aiming at the trusted management of grain data,this paper conducts research on trusted storage,trusted consensus and trusted external authentication access.The specific research contents include:1.Aiming at the pain points such as single point of failure and information asymmetry involving trusted management of grain data in the field of agricultural grain storage,build a decentralized grain data trusted management system model,and propose a trusted storage method based on the Inter Planetary File System(IPFS).Under this model,the multi-party institutions of the alliance obtain access rights through the certificates they hold,forming a good mutual supervision mechanism.At the same time,in order to solve the storage problem of grain big data such as audio,image and video,the off-chain storage method of the IPFS under the call of the smart contract interface functions is studied,and finally the dual-channel trusted storage mechanism on the chain and off the chain is realized,thereby,thereby solving the problem of limited hardware storage resources.2.Aiming at the high communication cost caused by the low consensus efficiency of a large number of network consensus nodes in the grain alliance chain network,a Practical Byzantine Fault Tolerance(PBFT)optimization consensus algorithm based on agglomerative hierarchical clustering is proposed.Before the blockchain node consensus occurs,a large number of network consensus nodes are divided by machine learning clustering algorithm,and some outliers are separated,and the improved PBFT algorithm is applied to the node hierarchical model after clustering,so that all clusters can generate PBFT consensus in parallel,and finally reach a credible consensus on the message.Simulation results show that the optimization algorithm can effectively reduce the communication overhead between blockchain network nodes and improve consensus efficiency and throughput.3.Research key technologies based on trusted storage,trusted consensus,and trusted external authentication access,and realize the design and simulation of a grain data trusted management system based on the alliance chain.Build a Hyperledger Fabric development environment with the help of a Docker container on a remote server,write and generate encryption certificates,genesis blocks and other related configuration files,and use well-configured nodes to start the entire blockchain network.At the same time integrate in the network IPFS,and finally realizes trusted management functions such as trusted off-chain storage and data query based on IPFS by triggering smart contract interface functions. |