首页 | 本学科首页   官方微博 | 高级检索  
     检索      

基于区块链的农产品追溯系统信息存储模型与查询方法
引用本文:杨信廷,王明亭,徐大明,罗娜,孙传恒.基于区块链的农产品追溯系统信息存储模型与查询方法[J].农业工程学报,2019,35(22):323-330.
作者姓名:杨信廷  王明亭  徐大明  罗娜  孙传恒
作者单位:1. 上海海洋大学信息学院,上海 201306; 2. 国家农业信息化工程技术研究中心,北京 10097;3. 农产品质量安全追溯技术及应用国家工程实验室,北京 100097,1. 上海海洋大学信息学院,上海 201306; 2. 国家农业信息化工程技术研究中心,北京 10097;3. 农产品质量安全追溯技术及应用国家工程实验室,北京 100097,2. 国家农业信息化工程技术研究中心,北京 10097;3. 农产品质量安全追溯技术及应用国家工程实验室,北京 100097,2. 国家农业信息化工程技术研究中心,北京 10097;3. 农产品质量安全追溯技术及应用国家工程实验室,北京 100097,2. 国家农业信息化工程技术研究中心,北京 10097;3. 农产品质量安全追溯技术及应用国家工程实验室,北京 100097
基金项目:国家自然科学基金项目(31871525);北京自然科学基金面上项目(4182023);广东省农业科技创新及推广项目(2018LM2168)
摘    要:针对区块链追溯系统信息数据存储负载过大、查询效率低等问题,该文以果蔬菜类农产品为例,基于Hyperledger Fabric设计了一种区块链农产品追溯信息存储模型和查询方法。提出"数据库+区块链"的链上链下追溯信息双存储设计,本地数据库存储追溯明文数据,区块链上存储追溯数据加密后的哈希值,并在此基础上建立了外联数据库索引的查询方法。通过该方法与基于key键遍历查询和批次号字段查询的2种传统区块链数据查询方法进行对比测试,结果表明当区块链追溯记录总量达到11×10~4条,批次追溯记录条数为400时,该方法查询效率分别提高了70.56%和88.66%,有效解决了区块链链式结构中数据查询效率低的问题,保证了数据隐私安全,提高了追溯信息的可靠性与时效性。

关 键 词:农产品  追溯  区块链  Hyperledger  Fabric  索引存储  快速查询
收稿时间:2019/7/23 0:00:00
修稿时间:2019/11/5 0:00:00

Data storage and query method of agricultural products traceability information based on blockchain
Yang Xinting,Wang Mingting,Xu Daming,Luo Na and Sun Chuanheng.Data storage and query method of agricultural products traceability information based on blockchain[J].Transactions of the Chinese Society of Agricultural Engineering,2019,35(22):323-330.
Authors:Yang Xinting  Wang Mingting  Xu Daming  Luo Na and Sun Chuanheng
Institution:1. College of Information Technology, Shanghai Ocean University, Shanghai 201306, China; 2. National Engineering Research Center for Information Technology in Agriculture, Beijing 100097, China; 3. National Engineering Laboratory for Quality and Safety Traceability Technology and Application of Agricultural Products, Beijing 100097, China,1. College of Information Technology, Shanghai Ocean University, Shanghai 201306, China; 2. National Engineering Research Center for Information Technology in Agriculture, Beijing 100097, China; 3. National Engineering Laboratory for Quality and Safety Traceability Technology and Application of Agricultural Products, Beijing 100097, China,2. National Engineering Research Center for Information Technology in Agriculture, Beijing 100097, China; 3. National Engineering Laboratory for Quality and Safety Traceability Technology and Application of Agricultural Products, Beijing 100097, China,2. National Engineering Research Center for Information Technology in Agriculture, Beijing 100097, China; 3. National Engineering Laboratory for Quality and Safety Traceability Technology and Application of Agricultural Products, Beijing 100097, China and 2. National Engineering Research Center for Information Technology in Agriculture, Beijing 100097, China; 3. National Engineering Laboratory for Quality and Safety Traceability Technology and Application of Agricultural Products, Beijing 100097, China
Abstract:Abstract: Food safety has become an important topic in people''s daily lives. In recent years, the frequent occurrence of food safety incidents have caused a crisis of trust between consumers and the food industry. Accordingly, there is an urgent need to establish an efficient and trusted traceability system for agricultural products. In the practical application of the traditional traceability system, the data of the production, processing, packaging, transportation, storage and sales of agricultural products are stored in the local database of each node, data in traditional traceability systems is centralized, and authoritative agencies manage the central database of the traceability system. Because the traceability data of each supply chain node is managed by the enterprise itself, the data is easy to be tampered with. Therefore, it is necessary to improve the reliability of information transmission between different roles in agricultural supply chain.Blockchain has the characteristics of decentralization, non-tampering, traceability, and high availability. Using these characteristics of blockchain and using blockchain technology to trace agricultural products, it is possible to solve the problems existing in the current traditional traceability system.At present, Scholars in China and abroad have studied the application of blockchain in the field of traceability. However, the traceability system of blockchain have some problems, such as low query efficiency, high data-storage load, and poor data privacy and security. In order to solve the above problems, this study designed a storage structure for a blockchain-based traceability system for agricultural products based on Hyperledger Fabric and proposed an index storage and query method for gtraceability information. In this method, "On chain and off chain" data storage technology is used, the enterprise first digitally signs the hash value of the traceability information of agricultural products, writes the hash value into the blockchain, and returns the block number to the blockchain where the hash value is located. Then, the traceability information of agricultural products and the block number are stored in the local database of each node. If the information of agricultural products needs to be modified, it is necessary to rewrite the hash value of the traceability information to the blockchain and update the block number. When consumers scan the QR code of agricultural products, the traceability information and block number is obtained from the local database, the value is calculated by hash algorithm for the acquired traceability information, and compare it with this newly acquired hash value with the hash value stored in the blockchain by block number to verify the authenticity of traceability information of agricultural products. The result showed that, when the number of total traceability records reached 11×104 in the blockchain and the number of batch traceability records was 400 respectively, the query efficiency of the newly proposed method was increased by 70.56% and 88.66% compared to two traditional blockchain-based data query methods of query performed using the value of key attribute and querying performed using the batch number of agricultural products through the rich query of the CouchDB database, respectively. The approach of this paper effectively solves the problem of excessive load pressure of blockchain data storage, ensures data privacy and security, and improves the reliability and timeliness of traceability information.
Keywords:agricultural products  traceability  blockchain  Hyperledger Fabric  index storage  efficient query
本文献已被 CNKI 等数据库收录!
点击此处可从《农业工程学报》浏览原始摘要信息
点击此处可从《农业工程学报》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号