食品科学 ›› 2024, Vol. 45 ›› Issue (8): 13-18.doi: 10.7506/spkx1002-6630-20231201-001

• 食品真实性及溯源专栏 • 上一篇    下一篇

基于区块链的芝麻油防伪溯源系统的设计与实现

徐金胜,张恩   

  1. (1.河南师范大学计算机与信息工程学院,河南 新乡 453007;2.智慧商务与物联网技术河南省工程实验室,河南 新乡 453007)
  • 出版日期:2024-04-25 发布日期:2024-05-01
  • 基金资助:
    河南省科技攻关项目(232102211057)

Design and Implementation of Blockchain-Based Anti-counterfeiting and Traceability System for Sesame Oil

XU Jinsheng, ZHANG En   

  1. (1. College of Computer and Information Engineering, Henan Normal University, Xinxiang 453007, China; 2. Engineering Lab of Intelligence Business & Internet of Things, Henan Province, Xinxiang 453007, China)
  • Online:2024-04-25 Published:2024-05-01

摘要: 芝麻油作为日常饮食中不可或缺的食用油之一,其质量和安全性受到了广泛关注。然而,芝麻油掺假问题日益严重,这使得保障芝麻油的质量安全成为了一个急需解决的问题,所以建立芝麻油防伪溯源对保障质量安全十分重要。本实验设计研发了一套基于区块链技术的芝麻油防伪溯源系统,提出了“区块链缓存”的双存储设计,即链下存储并缓存溯源信息,链上同步存储溯源信息的哈希值;此外还设计了链码直连状态数据库的查询方案,解决了区块链网络数据存储压力大、查询效率低的问题。通过分析与验证,消费者利用微信扫码通过小程序能够快速方便地查验芝麻油真伪,有效解决了芝麻油溯源链不同环节之间在数据安全和溯源信息真实性上的问题,在实践中也取得了较好的应用效果。

关键词: 区块链;芝麻油;防伪;溯源系统;质量安全

Abstract: Sesame oil is one of the indispensable cooking oils in daily diets, and its quality and safety has aroused wide concern. However, the issue of sesame oil adulteration has become increasingly serious, making it urgent to guarantee the quality and safety of sesame oil. Therefore, it is important to establish an anti-counterfeiting and traceability system. In this study, a blockchain-based anti-counterfeiting and traceability system for sesame oil was designed. A ‘blockchain caching’ double storage design was proposed, which could store and cache information off-chain while synchronously storing the encrypted hash value of traceability information on-chain. In addition, a querying scheme that could connect smart contracts directly to the state database was designed to solve the problems of high data storage pressure and low querying efficiency on the blockchain network. It was verified that consumers could quickly and conveniently check the authenticity of sesame oil by scanning the QR code of a mini program, which could effectively solve the problems of data security and the authenticity of traceability information between different links in the sesame oil traceability chain, and it was successfully applied to real samples with good results.

Key words: block chain; sesame oil; anti-counterfeiting; traceability system; quality and safety

中图分类号: