Grain safety tracing system and method
Through the combination of distributed data acquisition module, multi-source data fusion engine and blockchain evidence storage nodes, the problems of incomplete data, insecurity of storage and inaccurate risk warning in the grain traceability system are solved, and the security, accurate traceability and risk warning of the entire life cycle of grain are achieved.
Patent Information
- Application Number
- CN202510476218.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-07-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing grain traceability system has problems such as incomplete data collection, insufficient data processing and integration capabilities, unsafe traceability information storage, and untimely and accurate risk warnings, making it difficult to achieve effective supervision and accurate traceability of the entire life cycle of grain.
The distributed data acquisition module, multi-source data fusion engine, blockchain evidence storage node and risk warning analysis platform are adopted to collect data in real time through the Internet of Things sensor network, use space-time alignment algorithms and sharded storage technology for data processing and storage, and build a deep reinforcement learning model for risk warning.
It has achieved comprehensive, safe and accurate data collection and storage throughout the entire life cycle of food, and can promptly and accurately predict and warn of food security risks, ensuring the traceability and safety of food products.
Smart Images

Figure CN120373864A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of food safety management, and specifically refers to a food safety traceability system and method. Background Art
[0002] With the continuous improvement of people's attention to food safety, as the most basic food raw material, the safety of food is of crucial importance. There are many links in the entire supply chain of food from planting, warehousing, transportation to sales. Any problem in any link may affect the quality and safety of food. The traditional food safety management methods are difficult to effectively supervise and accurately trace the entire life cycle of food, and it is impossible to timely and accurately master the status information of food in each link. When facing food quality and safety problems, it is difficult to quickly locate the source of the problem and take effective measures.
[0003] In recent years, although some food traceability systems have been proposed, there are generally problems such as incomplete data collection, insufficient data processing and fusion capabilities, poor security of traceability information storage, and untimely and inaccurate risk warnings. For example, some systems can only collect data from a single link and cannot integrate and analyze the data of the entire chain; some systems lack effective standardized processing means for heterogeneous data, resulting in difficult data sharing and utilization; in terms of data storage, the traditional centralized storage method is vulnerable to attacks and tampering, and cannot guarantee the authenticity and reliability of traceability information; in terms of risk warning, most systems can only perform simple threshold alarms and cannot effectively predict and evaluate future risks.
[0004] Therefore, a food safety traceability system and method that are comprehensive, efficient, safe and have intelligent risk warning capabilities have become an urgent problem to be solved by people. Summary of the Invention
[0005] The purpose of the present invention is to provide a food safety traceability system and method to solve the problems of incomplete data collection, difficult data processing and fusion, insecure storage of traceability information, and untimely and inaccurate risk warnings existing in the existing food safety management.
[0006] To achieve the above purpose, the technical solution provided by the present invention is: a food safety traceability system, including a distributed data collection module, a multi-source data fusion engine, a blockchain evidence storage node, and a risk warning analysis platform.
[0007] Distributed data collection module: This module obtains soil composition, meteorological parameters, pesticide residues, storage temperature and humidity, and transportation trajectory data in real time through the Internet of Things sensor network. To ensure data quality, the collected raw data is denoised and filtered to remove abnormal data caused by sensor failures or external interferences, and the data is preliminarily normalized.
[0008] Multi-source data fusion engine: It uses a spatio-temporal alignment algorithm to standardize heterogeneous data and generate a traceability data packet containing geographical coordinates, timestamps, and the subject of operations. This engine constructs a four-dimensional data cube containing meteorological satellite data, drone inspection images, Internet of Things sensor stream data, and manual inspection records, realizes the spatio-temporal consistency calibration of data with different accuracies and frequencies through an improved Kalman filtering algorithm, and uses a federated learning framework to complete cross-link data collaborative analysis while protecting privacy.
[0009] Blockchain evidence storage node: It adopts sharded storage to distribute and store the traceability data packet in a multi-chain parallel structure, and each sub-chain corresponds to a specific link in the grain circulation. In the sharded storage mechanism, a sharding strategy based on the hash algorithm is adopted, and the hash value is calculated according to the key identification information of the grain circulation link, and the traceability data packet is evenly distributed and stored in different sub-chains. This node also includes a pluggable consensus mechanism, using PBFT consensus in the fields and switching to PoS consensus in the cross-regional logistics link; an intelligent contract template library, including standardized contracts for automatic triggering of quality sampling inspection, isolation of abnormal data, and visualization of the traceability path; and uses a cross-chain interoperability protocol to realize on-chain data interconnection with the government supervision platform and third-party testing institutions.
[0010] Risk early warning analysis platform: It constructs a quality and safety evolution model based on deep reinforcement learning to predict mildew and pollution risk events within the next 72 hours; uses a three-dimensional GIS visualization interface to dynamically display the risk propagation path and influence range; establishes an automatic triggering mechanism, and when it detects that there are abnormalities in the grain, it automatically sends a risk early warning data packet with blockchain evidence storage to the supervision platform.
[0011] The grain safety traceability system of the present invention further includes a dynamic encryption identifier generator, which uses a dynamic encryption algorithm based on the grain characteristic DNA sequence and the grower's digital identity to generate a physical-digital composite identifier containing double verification of a two-dimensional rainbow code and an NFC chip. This physical-digital composite identifier is added with a self-destruction mechanism, and when illegal unsealing is detected, it automatically triggers the quantization erasure of the identifier data.
[0012] The present invention also provides a traceability method applied to the above-mentioned grain safety traceability system, including the following steps:
[0013] S1. Data collection and preprocessing: Using a distributed data collection module, real-time collect soil composition, meteorological parameters, pesticide residues, storage temperature and humidity, and transportation trajectory data through the Internet of Things sensor network, and perform preprocessing such as denoising, filtering, and normalization on the collected original data.
[0014] S2. Data Fusion Processing: Transmit the collected data to the multi-source data fusion engine. The multi-source data fusion engine uses a spatio-temporal alignment algorithm to standardize heterogeneous data and generate a traceability data packet containing geographical coordinates, timestamps, and the operating entity.
[0015] S3. Data Storage and Interconnection: Transmit the generated traceability data packet to the blockchain evidence storage node. The blockchain evidence storage node uses sharded storage and, based on a sharding strategy using a hash algorithm, evenly distributes the traceability data packet to different sub-chains for storage. Each sub-chain corresponds to a specific link in the grain circulation process, and a cross-chain interoperability protocol is used to achieve on-chain data interconnection with the government supervision platform and third-party inspection agencies.
[0016] S4. Risk Early Warning: The risk early warning analysis platform constructs a quality and safety evolution model based on deep reinforcement learning to predict mildew and pollution risk events within the next 72 hours. It uses a three-dimensional GIS visualization interface to dynamically display the risk propagation path and the affected range, and establishes an automatic trigger mechanism. When abnormalities in the grain are detected, it automatically sends a risk early warning data packet with blockchain evidence to the supervision platform.
[0017] The advantages of the present invention compared with the prior art are as follows:
[0018] The distributed data collection module can obtain key data of multiple links in the entire life cycle of grains in real time and preprocess the original data to ensure the accuracy and availability of the data. The multi-source data fusion engine realizes the standardized processing of heterogeneous data, spatio-temporal consistency calibration, and cross-link data collaborative analysis, providing comprehensive and accurate data support for grain safety traceability.
[0019] The blockchain evidence storage node uses sharded storage and a multi-chain parallel structure, combined with a sharding strategy based on a hash algorithm, to ensure the secure storage and efficient management of the traceability data packet. The pluggable consensus mechanism selects an appropriate consensus algorithm according to different scenarios, improving the operation efficiency and reliability of the system. The intelligent contract template library and the cross-chain interoperability protocol realize effective cooperation and data interconnection with other platforms.
[0020] The risk early warning analysis platform constructs a quality and safety evolution model based on deep reinforcement learning, which can accurately predict mildew and pollution risk events within the next 72 hours, and intuitively display the risk propagation path and the affected range through a three-dimensional GIS visualization interface. The automatic trigger mechanism can timely send a risk early warning data packet to the supervision platform, providing a powerful means for grain safety risk prevention and control.
[0021] The physical-digital composite identifier generated by the dynamic encryption identifier generator combines the grain characteristic DNA sequence with the grower's digital identity for dynamic encryption, has a dual verification mechanism, and incorporates a self-destruction mechanism, effectively preventing the identifier from being illegally tampered with and unsealed, and further ensuring the safety and traceability of grain products. Brief Description of the Drawings
[0022] Figure 1 is a system block diagram of a grain safety traceability system of the present invention.
[0023] Figure 2 is a unit architecture diagram of a blockchain evidence storage node.
[0024] Figure 3 is a flowchart of a grain safety traceability method of the present invention. Detailed Embodiments
[0025] The various exemplary embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that: unless otherwise specifically stated, the relative arrangements, numerical expressions, and numerical values of the components and steps set forth in these embodiments do not limit the scope of the present invention.
[0026] The description of at least one exemplary embodiment below is merely illustrative in nature and in no way serves as a limitation on the present invention or its application or use.
[0027] Techniques, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the techniques, methods, and devices should be regarded as part of the specification.
[0028] In all the examples shown and discussed here, any specific value should be construed as merely exemplary and not as a limitation. Therefore, other examples of the exemplary embodiments may have different values.
[0029] The following further elaborates on a grain safety traceability system and method of the present invention with reference to the accompanying drawings.
[0030] Combined with the attached Figures 1-3 , the specific implementation process of a grain safety traceability system and method of the present invention is as follows:
[0031] A grain safety traceability system includes a distributed data acquisition module, a multi-source data fusion engine, a blockchain evidence storage node, and a risk warning and analysis platform.
[0032] In the grain planting areas, soil composition sensors are deployed to monitor in real time the contents of nitrogen, phosphorus, potassium, pH value and other components in the soil; meteorological sensors are used to collect meteorological parameters such as temperature, humidity, light, rainfall, etc. Inside the grain storage facilities, temperature and humidity sensors are installed to keep track of the temperature and humidity changes in the storage environment. On the transport vehicles, GPS positioning devices and sensors are equipped to obtain transport trajectory data and data such as vibration and humidity during the transport process that may affect the quality of the grain. In the pesticide spraying process, pesticide residue sensors are set up to monitor the pesticide residue situation on the surface of the grain.
[0033] Each sensor collects data in real time at set time intervals and transmits the raw data to the distributed data acquisition module. The processor in the module performs denoising processing on the raw data, and uses algorithms such as median filtering and mean filtering to remove abnormal data caused by sensor failures or external electromagnetic interference. Then, the data is preliminarily normalized through a normalization algorithm, and data with different ranges and units is unified into a specific numerical range to facilitate subsequent data processing and analysis.
[0034] The multi-source data fusion engine receives heterogeneous data from the distributed data acquisition module and other data sources (such as meteorological satellite data, drone inspection images, manual inspection records, etc.). Using the spatio-temporal alignment algorithm, according to the timestamp and geographical coordinate information of the data, data from different sources is aligned in the time and space dimensions, so that it has a unified reference standard. For example, for the meteorological parameters collected by meteorological satellite data and ground Internet of Things sensors, the data of the two is integrated through time synchronization and geographical coordinate matching.
[0035] Four-dimensional data cube construction and calibration: The data that has been spatio-temporally aligned is constructed into a four-dimensional data cube, where three dimensions are spatial dimensions (the X, Y, and Z axes of geographical coordinates), and one dimension is the time dimension. Through an improved Kalman filtering algorithm, spatio-temporal consistency calibration is performed on data with different accuracies and frequencies. For example, for drone inspection image data and high-frequency Internet of Things sensor stream data, the Kalman filtering algorithm is used to estimate and correct the noise and errors of the data, so that different types of data are consistent in time and space.
[0036] In terms of cross-link data collaborative analysis, a federated learning framework is adopted. Participants in different links (such as growers, storage enterprises, transport enterprises, etc.) perform model training locally through the federated learning algorithm without sharing the raw data, and upload the model parameters to the central server for aggregation and optimization. For example, when analyzing the relationship between grain quality and the transport link, transport enterprises and storage enterprises use the federated learning framework to jointly train a prediction model, which not only protects their respective data privacy but also realizes effective collaborative analysis of cross-link data.
[0037] The blockchain evidence storage nodes adopt a sharding strategy based on the hash algorithm. In the grain circulation link, each link has a unique key identification information (such as planting batch number, warehousing order number, transportation order number, etc.). According to these key identification information, the hash value is calculated, and the traceability data packets are evenly distributed and stored in different sub-chains according to the range of the hash value. For example, the data packets with hash values in the range of 0 - 1000 are stored in sub-chain 1, and the data packets with hash values in the range of 1001 - 2000 are stored in sub-chain 2, etc. Each sub-chain corresponds to a specific link in the grain circulation. For example, sub-chain 1 corresponds to the planting link, sub-chain 2 corresponds to the warehousing link, etc.
[0038] In the planting link in the fields, due to the relatively small number of participating nodes and the high requirement for real-time performance, the PBFT (Practical Byzantine Fault Tolerance) consensus mechanism is adopted. This mechanism can quickly reach a consensus with a relatively small number of nodes, ensuring the timely storage and update of data. In the cross-regional logistics link, due to the large number of participating nodes and wide distribution, the PoS (Proof of Stake) consensus mechanism is switched to. The PoS mechanism determines the accounting right according to the rights and interests held by the nodes (such as the amount of traceability data stored, participation time, etc.), reducing the communication overhead between nodes and improving the operation efficiency of the system in a large-scale node network.
[0039] The intelligent contract template library contains a variety of standardized contracts. For example, the quality sampling inspection automatic trigger contract automatically triggers the quality sampling inspection process when the grain arrives at the warehousing link for a certain period of time and records the inspection results on the blockchain; the abnormal data isolation contract automatically isolates the abnormal data when it detects that the data in a certain link is abnormal (such as excessive pesticide residues, abnormal warehousing temperature and humidity, etc.) and notifies the relevant parties for processing; the traceability path visualization contract can query and generate the complete traceability path of the grain from planting to sales on the blockchain according to the user's needs and display it in a visual way. Using the cross-chain interoperability protocol, the blockchain evidence storage nodes can communicate data with the blockchain of the government supervision platform and the third-party testing institutions. For example, the government supervision platform can query the traceability information of the grain in real time through the cross-chain protocol, and the third-party testing institutions can upload the test results to the blockchain evidence storage nodes to ensure the openness, transparency and immutability of the data.
[0040] The risk warning analysis platform constructs a quality and safety evolution model based on deep reinforcement learning. A large amount of historical grain quality data, environmental data, and operation data of each link are collected as the training data of the model. The model continuously interacts with the environment to learn what actions to take in different states to maximize the long-term cumulative reward (such as accurately predicting risk events). For example, the model predicts the probability of mildew risk within the next 72 hours based on the current warehousing temperature and humidity, grain storage time, and historical mildew data.
[0041] Adopt a 3D GIS visualization interface to dynamically display the risk propagation path and the affected range. Mark geographical information such as grain planting areas, storage facilities, and transportation routes on the 3D map. When the model predicts the occurrence of a risk event, display the location, propagation direction, and possible affected range of the risk on the map with identifiers of different colors and shapes. For example, use red lines to represent the propagation path of mildew risk, and use red areas to represent the affected grain storage areas.
[0042] Establish an automatic triggering mechanism. When the risk early warning analysis platform detects abnormalities in the grain (such as the probability of mildew risk predicted by the model exceeding the set threshold), automatically send a risk early warning data packet with blockchain evidence preservation to the supervision platform. The data packet contains detailed information about the risk event (such as risk type, occurrence time, location, severity, etc.) and the corresponding blockchain evidence preservation information. The supervision platform can take corresponding measures in a timely manner based on this information, such as sampling and recalling problem grains.
[0043] The dynamic encryption identifier generator adopts a dynamic encryption algorithm based on the characteristic DNA sequence of grains and the digital identity of growers. First, extract the characteristic DNA sequence of the grains, which can be obtained through professional gene detection equipment. At the same time, obtain the digital identity information of the grower (such as ID number, planting license number, etc.). Combine these two pieces of information with a specific encryption key, and generate a physical-digital composite identifier containing double verification of 2D rainbow code and NFC chip through the encryption algorithm. The 2D rainbow code can contain basic information of the grains (such as variety, origin, planting time, etc.) as well as the encrypted characteristic DNA sequence and grower digital identity information. The NFC chip stores the same encrypted information and has higher security and read-write convenience.
[0044] Add a self-destruction mechanism to the physical-digital composite identifier. Set sensors inside the identifier to detect whether there is illegal unsealing behavior. When it detects that the identifier is illegally opened, automatically trigger the quantization erasure of the identifier data. The quantization erasure technology can ensure that the information stored in the identifier is completely deleted and cannot be recovered, thus effectively preventing the illegal tampering and theft of the identifier information.
[0045] A grain safety traceability method, implemented relying on the above system, specifically includes the following steps:
[0046] According to the implementation method of the distributed data acquisition module, real-time collect soil composition, meteorological parameters, pesticide residues, storage temperature and humidity, and transportation trajectory data through the Internet of Things sensor network. The collected data is immediately transmitted to the distributed data acquisition module, and noise reduction, filtering, and normalization preprocessing are performed within the module to ensure the quality and usability of the data.
[0047] The preprocessed data is transmitted to the multi-source data fusion engine. According to its implementation method, the multi-source data fusion engine uses a spatio-temporal alignment algorithm to standardize heterogeneous data, constructs a four-dimensional data cube and conducts spatio-temporal consistency calibration, and uses a federated learning framework to conduct cross-link data collaboration analysis, and finally generates a traceability data packet containing geographical coordinates, timestamps, and operating entities.
[0048] The generated traceability data packet is transmitted to the blockchain evidence storage node. According to its implementation method, the blockchain evidence storage node uses a sharding strategy based on the hash algorithm to evenly distribute the data packet to different sub-chains for storage, completing the secure and reliable storage of the data. At the same time, through the cross-chain interoperability protocol, data interconnection on the chain is achieved with the government supervision platform and third-party testing institutions, facilitating the query and supervision of food traceability information by all parties.
[0049] According to its implementation method, the risk warning analysis platform constructs a quality and safety evolution model based on deep reinforcement learning to predict mildew and pollution risk events within the next 72 hours. Using a three-dimensional GIS visualization interface to dynamically display the risk propagation path and influence range, once an abnormality in the food is detected, it automatically triggers the sending of a risk warning data packet with blockchain evidence to the supervision platform, realizing the timely warning and prevention and control of food safety risks.
[0050] The above describes the present invention and its implementation manners. Such a description is not restrictive. What is shown in the drawings is only one of the implementation manners of the present invention, and the actual structure is not limited thereto. Generally speaking, if those of ordinary skill in the art are inspired by it and design similar structural manners and embodiments to this technical solution without creative efforts without departing from the purpose of the present invention, they shall fall within the protection scope of the present invention.
Claims
1. A food safety traceability system, characterized in that: It includes a distributed data acquisition module, a multi-source data fusion engine, a blockchain evidence storage node, and a risk early warning analysis platform; The distributed data acquisition module obtains soil composition, meteorological parameters, pesticide residues, storage temperature and humidity, and transportation track data in real time through the Internet of Things sensor network; The multi-source data fusion engine uses a spatio-temporal alignment algorithm to standardize heterogeneous data and generate a traceability data packet containing geographical coordinates, timestamps, and operating entities; The blockchain evidence storage node uses sharding storage to distribute and store the traceability data packet in a multi-chain parallel structure, and each sub-chain corresponds to a specific link in the grain circulation; The risk early warning analysis platform constructs a quality and safety evolution model based on deep reinforcement learning to predict mildew and pollution risk events within the next 72 hours; uses a three-dimensional GIS visualization interface to dynamically display the risk propagation path and influence range; establishes an automatic trigger mechanism, and when abnormal grain is detected, automatically sends a risk early warning data packet with blockchain evidence storage to the supervision platform.
2. The food safety traceability system according to claim 1, wherein: It also includes a dynamic encryption identifier generator, which uses a dynamic encryption algorithm based on the grain characteristic DNA sequence and the grower's digital identity to generate a physical-digital composite identifier containing double verification of a two-dimensional rainbow code and an NFC chip.
3. The food safety traceability system according to claim 2, characterized in that: The physical-digital composite identifier is added with a self-destruction mechanism, and when illegal unsealing is detected, it automatically triggers the quantization erasure of the identifier data.
4. The food safety traceability system according to claim 1, characterized in that: The multi-source data fusion engine constructs a four-dimensional data cube including meteorological satellite data, UAV inspection images, Internet of Things sensor stream data, and manual inspection records; Realize the spatio-temporal consistency calibration of data with different precisions and frequencies through an improved Kalman filtering algorithm; Adopt a federated learning framework to complete cross-link data collaborative analysis while protecting privacy.
5. The food safety traceability system according to claim 1, characterized in that: In the sharding storage mechanism of the blockchain evidence storage node, a sharding strategy based on the hash algorithm is adopted, and the hash value is calculated according to the key identification information of the grain circulation link, and the traceability data packet is evenly distributed and stored in different sub-chains.
6. The food safety traceability system according to claim 5, characterized in that: The blockchain evidence storage node includes: A pluggable consensus mechanism, using PBFT consensus in the fields and switching to PoS consensus in the cross-regional logistics link; An intelligent contract template library, including standardized contracts for automatic triggering of quality inspections, isolation of abnormal data, and visualization of traceability paths; Use a cross-chain interoperability protocol to achieve on-chain data interconnection with government supervision platforms and third-party testing institutions.
7. A food safety traceability system according to claim 1, characterized in that: The distributed data acquisition module performs denoising and filtering on the collected raw data, removes abnormal data generated due to sensor failures or external interferences, and performs preliminary normalization on the data.
8. A food safety traceability method, applied to the food safety traceability system according to any one of claims 1-7, characterized in that: The method includes the following steps, S1. Use the distributed data acquisition module to collect soil composition, meteorological parameters, pesticide residues, storage temperature and humidity, and transportation track data in real time through the Internet of Things sensor network, and preprocess the collected raw data; S2. Transmit the collected data to the multi-source data fusion engine, and the multi-source data fusion engine uses a spatio-temporal alignment algorithm to standardize the heterogeneous data and generate a traceability data packet containing geographical coordinates, timestamps, and operating entities; S3. Transmit the generated traceability data packet to the blockchain evidence storage node. The blockchain evidence storage node adopts sharded storage. Using a sharding strategy based on the hash algorithm, evenly distribute the traceability data packet to different sub-chains for storage. Each sub-chain corresponds to a specific link in the grain circulation, and use the cross-chain interoperability protocol to achieve on-chain data intercommunication with the government supervision platform and third-party testing institutions; S4. The risk early warning analysis platform constructs a quality and safety evolution model based on deep reinforcement learning to predict mildew and pollution risk events within the next 72 hours. Use a three-dimensional GIS visualization interface to dynamically display the risk propagation path and influence range, and establish an automatic trigger mechanism. When abnormalities are detected in the grain, automatically send a risk early warning data packet with blockchain evidence to the supervision platform.
Citation Information
Cited By
Intelligent mildew-proof system and mildew-proof and moisture-proof product
CN120743021A
Traditional Chinese medicine whole industry chain big data construction method and system
CN120952701A
Cat food quality safety tracing method based on artificial intelligence
CN121073499A
Agricultural product pollution source tracing method and system based on block chain and intelligent analysis
CN121190076A