Agricultural product whole industry chain traceability and digital identity management system based on block chain
The blockchain-based agricultural product full-chain traceability and digital identity management system solves the problems of refined management and real-time data of individual agricultural products, realizes a closed-loop traceability record and trusted digital identity from production to consumption, improves traceability credibility and protects trade secrets.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-03-31
AI Technical Summary
Existing blockchain traceability solutions are insufficient for achieving precise management of the individual growth process of agricultural products. The binding between individual agricultural products in the physical world and their digital identities is not continuous. The real-time nature and authenticity of data collection in complex environments are difficult to guarantee. Traditional traceability systems suffer from problems such as easy data tampering, information silos, and coarse granularity.
A blockchain-based agricultural product supply chain traceability and digital identity management system is adopted. This system utilizes data collection terminals, edge gateways, a consortium blockchain network, and traceability smart contracts to achieve traceability recording throughout the entire growth cycle of agricultural products. Data collection terminals collect multimodal data, edge gateways aggregate and verify the data, the consortium blockchain network stores the data, traceability smart contracts define the business logic, and a QR code management module assigns a unique code to each agricultural product and associates it with the data.
It enables the authentic recording and traceability of agricultural products throughout their entire growth cycle, improves the credibility of traceability, constructs a fully closed-loop trusted digital identity system, reduces on-chain storage overhead and transaction frequency, and achieves refined data management and protection of trade secrets.
Smart Images

Figure CN121767003A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of agricultural product safety management, and in particular to a blockchain-based traceability and digital identity management system for the entire agricultural product supply chain. Background Technology
[0002] With increasing attention being paid to food safety issues, agricultural product traceability technology has become a key means to ensure food quality and safety and enhance consumer trust. Traditional traceability systems mostly rely on centralized databases to record batch information, which suffers from problems such as easy data tampering, information silos, and coarse traceability granularity (only down to the batch level). Existing technical solutions using QR codes or RFID typically only assign codes at the product packaging stage, failing to cover key information from the early stages of agricultural product growth. Furthermore, the binding relationship between physical identifiers and the product itself is fragile, making it susceptible to counterfeiting activities such as "code-product separation" or label transfer.
[0003] In recent years, blockchain technology has been introduced into the traceability field due to its decentralized and tamper-proof characteristics. However, existing blockchain traceability solutions still have the following limitations: (1) it is difficult to achieve refined management of "one item, one code" and real recording of the growth process of individual agricultural products; (2) there is a lack of effective means to continuously and automatically bind individual agricultural products in the physical world to their digital identities; (3) in complex environments such as farmland, the real-time nature and authenticity of data collection are difficult to guarantee. Summary of the Invention
[0004] The purpose of this invention is to solve the problems in the existing technology and propose a blockchain-based agricultural product full-chain traceability and digital identity management system, which can realize true full-growth cycle traceability of agricultural products, improve traceability credibility, realize one item one code, and truly record the individual growth process of agricultural products.
[0005] To achieve the above objectives, this invention proposes a blockchain-based agricultural product full-chain traceability and digital identity management system, which includes several data collection terminals deployed at various stages of agricultural product production and distribution to collect relevant multimodal data generated during the agricultural product production and distribution process. At least one local trusted edge gateway is used to communicate and cooperate with the data acquisition terminal to receive and verify data from the data acquisition terminal, aggregate the data according to preset rules, and generate a traceability event data packet containing the aggregated data hash and the gateway signature. A consortium blockchain network, jointly maintained by multiple participating nodes in the agricultural product supply chain, is used to receive and consensus-store traceability event data packets submitted by each edge gateway, forming an immutable traceability chain; The traceability smart contract, deployed on the consortium blockchain network, is used to define the business logic for data uploading, verification, and querying, and to perform verification and recording of the traceability event data packets; The QR code management module is used to generate management QR codes; The data acquisition terminal includes several camera units deployed in the agricultural product planting area. Immediately after the agricultural product is formed, the QR code management module assigns a unique QR code to each agricultural product prototype and attaches the QR code to the prototype. The orientation of the QR code is adjusted so that the camera can capture it. The system also includes an image processing module. After the camera uploads the on-site images collected in each sampling cycle, the QR code management module sequentially identifies the QR codes in the images. After each identification, the image processing module processes the image, crops out the area near the QR code, stores the cropped image, and associates it with the QR code.
[0006] Preferably, the edge gateway aggregates agricultural product-related data from multi-source data collection terminals within its jurisdiction to generate a traceability event data packet with a signature; submits the traceability event data packet to the consortium blockchain network for notarization, forming a chain-linked traceability record; in response to a query request, retrieves the relevant traceability record from the consortium blockchain network, and verifies the integrity of the corresponding original data obtained from off-chain based on the hash information in the record, thereby presenting complete traceability information.
[0007] As a preferred option, the agricultural product planting area is divided into several sub-areas, and each sub-area is equipped with a corresponding camera unit. The cameras collect on-site images according to a predetermined sampling period and upload them to the consortium blockchain network through the local trusted edge gateway.
[0008] Preferably, the data acquisition terminal includes an environmental monitoring IoT device located in the agricultural product planting area and / or an APP or mini-program set on a mobile terminal. The APP or mini-program provides an input channel for recording agricultural operations, allowing users to manually record agricultural activities or packaging and transportation activities.
[0009] Preferably, the APP or mini-program collects the location information of the mobile terminal. The APP or mini-program will only allow the input and submission of agricultural operation data bound to the geographical location when it recognizes that the user is within the preset geofence range.
[0010] Preferably, the consortium blockchain network adopts a multi-channel architecture, including at least one full data channel for supervision and at least one business data channel for supply chain collaboration, with different participating nodes being assigned to different channels according to their permissions.
[0011] Preferably, the local trusted edge gateway aggregates high-frequency sensor data according to a preset strategy, generates a data digest hash for that time period, and packages related multimodal data to generate a joint evidence hash.
[0012] Preferably, the local trusted edge gateway is pre-installed with a business rule engine for performing compliance verification on the received data.
[0013] Preferably, the local trusted edge gateway binds spatiotemporally related data from different data acquisition terminals, generates a joint hash value representing the group of related data, and stores it in the traceability event data packet.
[0014] Preferably, the traceability smart contract includes: Data storage contracts are used to verify identity, check the logical compliance of traceability event data packets, and write the verified data packets into the blockchain ledger. Access control contracts are used to manage data access permissions for different participants in a blockchain network. The data query and verification contract is used to respond to query requests and verify the consistency between the original off-chain data and the on-chain evidence hash.
[0015] The beneficial effects of this invention, a blockchain-based traceability and digital identity management system for the entire agricultural product supply chain, are as follows: This invention solves the problems of traditional traceability codes being easily copied, having static information, and being unable to prevent transfer. It provides a complete record from the early stages of fruit setting to fruit maturity, constructing a fully closed-loop trusted digital identity system from the source of production to the consumer terminal. Data cleaning, compression, and aggregation are completed locally through an edge gateway, with only key hashes and digests uploaded to the blockchain, greatly reducing on-chain storage overhead and transaction frequency. This enables the system to economically and efficiently process massive amounts of agricultural IoT data. By linking environmental data with agricultural operations, it not only traces the "origin" but also displays key factors affecting quality, providing digital quality endorsement for high-quality agricultural products. The multi-channel consortium blockchain architecture enables refined data management, ensuring that while satisfying regulatory and consumer rights to know, it effectively protects the trade secrets of each link in the supply chain.
[0016] The features and advantages of the present invention will be described in detail through embodiments and in conjunction with the accompanying drawings. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the structure of a blockchain-based agricultural product whole-chain traceability and digital identity management system according to the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. However, it should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0019] In the description of this invention, it should be noted that when an element is referred to as being "fixed to" or "set on" another element, it can be directly on or indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to or indirectly connected to the other element.
[0020] In the description of this invention, it should be noted that the terms "center," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified. "Several" means one or more, unless otherwise explicitly specified.
[0021] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances. Example 1:
[0022] See Figure 1 This invention discloses a blockchain-based agricultural product full-chain traceability and digital identity management system, comprising: Several data acquisition terminals are deployed at various stages of planting, harvesting, processing, and distribution to collect relevant multimodal data generated during the production and distribution of agricultural products. These include, but are not limited to, camera units and environmental monitoring IoT devices (such as temperature, humidity, light, and soil sensors) deployed in planting areas, apps or mini-programs with geofencing capabilities on mobile terminals, automatic sorting and quality inspection equipment on processing lines, and intelligent logistics units equipped with GPS and temperature and humidity sensors. These terminals are responsible for collecting raw multimodal data (numerical, text, and image data). Regarding the camera units, the land is first divided into several monitoring cells according to the size matching the camera, and each cell is equipped with a camera unit that automatically collects on-site images containing individual agricultural products at a set period.
[0023] Local trusted edge gateways, deployed at key nodes such as farms, processing plants, and logistics centers, communicate and cooperate with the data acquisition terminals to receive and verify data from these terminals. They aggregate the data according to preset rules and generate traceability event data packets containing aggregated data hashes and gateway signatures. Data from different data acquisition terminals that are spatiotemporally related are bound together, and a joint hash value representing this group of related data is generated and stored in the traceability event data packet (e.g., aggregating a "irrigation" operation record, soil moisture sensor data summaries for the operation period, and operation log hashes of on-site equipment into a logical whole). A digest hash (such as a Merkle root) is generated for the aggregated data, and together with event metadata (batch ID, event type, timestamp, etc.), it is signed with the gateway's private key and packaged into a standard traceability event data packet. This gateway is not only a data forwarder but also a lightweight data verification and aggregation node. The edge gateway performs local aggregation and preprocessing of high-frequency, multimodal data, only uploading key hashes and digests to the blockchain, thus solving the blockchain storage bottleneck and enabling the system to support massive amounts of IoT agricultural data.
[0024] A consortium blockchain network, jointly maintained by multiple participating nodes in the agricultural product supply chain, is used to receive and consensus-store traceability event data packets submitted by each edge gateway, forming an immutable traceability chain. It employs a permissioned, multi-channel consortium blockchain architecture (e.g., based on Hyperledger Fabric). Core enterprises in the supply chain, logistics providers, distributors, and regulatory agencies join the network as nodes. By creating different channels, such as "regulatory channels" and "business collaboration channels," it achieves classified management and differentiated sharing of data, meeting regulatory transparency requirements while protecting sensitive business information between enterprises.
[0025] The traceability smart contract, deployed on the consortium blockchain network, is used to define the business logic for data uploading, verification, and querying, and to perform verification and recording of the traceability event data packets; The QR code management module is used to generate and manage QR codes, assigning a unique QR code to each smallest sales unit of agricultural products (e.g., if a watermelon is sold individually, then one watermelon is a smallest sales unit; for small products such as cherry tomatoes, all the cherry tomatoes on a whole tomato seedling can be considered as a smallest sales unit). Data corresponding to the agricultural product is associated with this QR code, thus binding relevant information to the agricultural product during the planting and production process and facilitating later consumer traceability via QR code scanning. The traceability smart contract also includes a QR code verification contract, used to respond to scanning queries of the unique QR code, verify the validity of the QR code, the status of associated assets, and return the corresponding traceability chain information.
[0026] The edge gateway aggregates agricultural product-related data from multi-source data collection terminals within its jurisdiction, generating a traceability event data packet with a signature; it submits the traceability event data packet to the consortium blockchain network for storage, forming a chain-linked traceability record; in response to a query request, it retrieves the relevant traceability record from the consortium blockchain network, and verifies the integrity of the corresponding original data obtained from off-chain based on the hash information in the record, thereby presenting complete traceability information. This invention solves the problems of traditional traceability codes being easily copied, having static information, and being unable to prevent transfer. It constructs a fully closed-loop trusted digital identity system from the source of production to the consumer terminal. Through edge gateways, data cleaning, compression, and aggregation are completed locally, and only key hashes and digests are uploaded to the blockchain, greatly reducing on-chain storage overhead and transaction frequency. This enables the system to economically and efficiently process massive amounts of agricultural IoT data. By linking environmental data with agricultural operations, it not only traces the "origin" but also displays key factors affecting quality (such as accumulated temperature, light, and fertilization records during the growth cycle), providing digital quality endorsement for high-quality agricultural products. The multi-channel consortium blockchain architecture enables refined data management, ensuring that while satisfying regulatory and consumer rights to know, it effectively protects the trade secrets of each link in the supply chain.
[0027] Specifically, when workers perform agricultural operations, such as fertilization, they record the process using a dedicated mini-program or app on their mobile phones. Once inside the planted area's geographical fence, the mini-program activates its recording function. They select the "fertilize" operation, enter the fertilizer type and dosage, and take a photo of the fertilization process. The mini-program then encrypts this information along with the phone's GPS location, operator ID, and timestamp, and sends it to the edge gateway. After verification by the gateway, a traceability event data packet containing the "fertilization event" is generated and uploaded to the blockchain, and associated with the affected QR code (which can specify a specific area or plant). During harvest, harvesters scan the QR code on the fruit using the mini-program or app to confirm the harvest.
[0028] The local trusted edge gateway has a pre-built business rule engine (such as pesticide safety intervals and organic farming standards) that automatically performs a preliminary compliance review on the received data (such as agricultural records).
[0029] The traceability smart contract includes: Data storage contracts are used to verify identity, check the logical compliance of traceability event data packets, and write the verified data packets into the blockchain ledger. Access control contracts are used to manage data access permissions for different participants in a blockchain network. The data query and verification contract is used to respond to query requests and verify the consistency between the original off-chain data and the on-chain evidence hash. Example 2:
[0030] See Figure 1 Based on Example 1, regarding the assignment of QR codes, immediately after the agricultural product forms a preliminary shape (such as the initial fruit set of watermelons), the QR code management module assigns a unique QR code to each preliminary agricultural product. This code encodes information such as orchard ID, batch number, plant number, and fruit serial number. The QR code is then attached to the preliminary agricultural product. The QR code is adjusted to ensure that at least one camera can clearly capture the QR code from its perspective, facilitating the identification of the QR code in the image captured by the camera. Correspondingly, the system also includes an image processing module. After the camera uploads the on-site images collected in each sampling period, the QR code management module calls the QR code recognition engine to scan the entire image and identify the QR codes contained in the image. For each identified QR code, the precise coordinates of the QR code in the image are located. A sub-image of a fixed size (e.g., 300x300 pixels) is cropped with these coordinates as the center. This sub-image mainly contains the citrus fruit with the QR code and its adjacent small area. The hash value of the sub-image is calculated. The hash value, timestamp, camera ID, QR code, and the average temperature and humidity data of the community obtained from environmental sensors within the same time window are packaged into a structured data object. This data object is signed using the private key of the edge gateway. The local trusted edge gateway periodically (e.g., every 6 hours) submits a batch of such signed data objects as traceability event data packets to the blockchain's data storage smart contract. After the contract verifies the signature, the key information of the event is written into the blockchain ledger, forming an immutable record. The original sub-image files are stored locally on the edge gateway or in distributed storage such as connected IPFS. This provides a complete record from the early stages of fruit setting to fruit maturity, facilitating traceability and improving traceability reliability.
[0031] It should be noted that although the above embodiments have been described herein, this does not limit the scope of patent protection for this invention. Therefore, any changes and modifications made to the embodiments described herein based on the innovative concept of this invention, or equivalent structural or procedural transformations made using the description and drawings of this invention, directly or indirectly applying the above technical solutions to other related technical fields, are all included within the scope of protection of this invention.
Claims
1. A blockchain-based agricultural product whole industry chain traceability and digital identity management system, characterized in that, The application relates to a traceability system for agricultural products, comprising: a plurality of data collection terminals respectively arranged in agricultural product production and circulation links for collecting related multi-modal data generated in the agricultural product production and circulation process; at least one local trusted edge gateway for communicating with the data collection terminals, receiving and verifying data from the data collection terminals, aggregating the data according to preset rules, and generating traceability event data packets containing aggregated data hash and gateway signature; a consortium blockchain network jointly maintained by multiple participant nodes of the agricultural product supply chain, for receiving and consensus-storing traceability event data packets submitted by the edge gateways, forming an unalterable traceability chain; a traceability smart contract deployed on the consortium blockchain network for defining the business logic of data chaining, verification and query, and performing verification and recording on the traceability event data packets; a two-dimensional code management module for generating and managing two-dimensional codes; the data collection terminals comprise a plurality of camera units arranged in agricultural product planting areas, each agricultural product embryo is immediately given a unique two-dimensional code by the two-dimensional code management module after the agricultural product embryo is formed, and the two-dimensional code is attached to the agricultural product embryo, and the two-dimensional code is adjusted in direction so that the camera can collect the two-dimensional code; the system further comprises a picture processing module, after the camera uploads the collected on-site images of each sampling period, the two-dimensional code in the picture is identified by the two-dimensional code management module in sequence, and the picture is processed by the picture processing module after each identification is completed, the area near the two-dimensional code is cropped, and the cropped picture is stored and associated with the two-dimensional code. 2.The blockchain-based agricultural product whole industry chain traceability and digital identity management system of claim 1, wherein: The edge gateway aggregates agricultural product related data from multiple source data collection terminals in the jurisdiction link, generates a signed traceability event data packet, submits the traceability event data packet to the consortium blockchain network for notarization, forms a chain-linked traceability record, and responds to a query request to obtain related traceability records from the consortium blockchain network, verifies the integrity of the corresponding original data obtained off-chain according to the hash information in the record, and then presents complete traceability information. 3.The blockchain-based agricultural product whole industry chain traceability and digital identity management system of claim 1, wherein: The agricultural product planting area is divided into a plurality of small areas, and a corresponding camera unit is arranged in each small area; the camera collects on-site images according to a predetermined sampling period and uploads the on-site images to the consortium blockchain network through the local trusted edge gateway. 4.The blockchain-based agricultural product whole industry chain traceability and digital identity management system of claim 1, wherein: The data collection terminal comprises an environmental monitoring Internet of Things device arranged in the agricultural product planting area and / or an APP or applet arranged in a mobile terminal, the APP or applet provides an input channel for recording agricultural operations, and the user manually records agricultural activities or packaging and transportation activities.
5. The blockchain-based agricultural product industry chain traceability and digital identity management system of claim 4, wherein: The APP or applet collects mobile terminal positioning information, and the APP or applet allows the entry and submission of agricultural operation data bound to the geographical position only when the user is identified to be in a preset geographical fence range. 6.The blockchain-based agricultural product industry chain traceability and digital identity management system of claim 1, wherein: The consortium blockchain network adopts a multi-channel architecture, comprising at least one full data channel for supervision and at least one business data channel for supply chain collaboration, and different participant nodes are distributed to different channels according to their permissions. 7.The blockchain-based agricultural product industry chain traceability and digital identity management system of claim 1, wherein: The local trusted edge gateway aggregates high-frequency sensor data according to a preset strategy, generates a data digest hash of the time period, packs relevant multi-modal data, and generates a joint evidence hash. 8.The blockchain-based agricultural product industry chain traceability and digital identity management system of claim 1, wherein: The local trusted edge gateway is pre-installed with a business rule engine for compliance verification of the received data. 9.The blockchain-based agricultural product industry chain traceability and digital identity management system of claim 1, wherein: The local trusted edge gateway binds data from different data collection terminals that are associated in space and time, and generates a joint hash value representing the set of associated data, and stores the joint hash value into a traceability event data packet. 10.The blockchain-based agricultural product industry chain traceability and digital identity management system of claim 1, wherein, The traceability smart contract includes: a data evidence contract for verifying identity, checking logical compliance of the traceability event data packet, and writing the data packet that passes the check into a blockchain ledger; a permission management contract for managing data access permissions of different participants in the blockchain network; a data query and verification contract for responding to query requests and verifying consistency between off-chain original data and on-chain evidence hash.