Grain full-link quality tracing system and method and medium
By combining IoT, blockchain, and AI technologies, the entire food supply chain can be traced, solving the risks of data gaps and tampering, improving the efficiency of risk warning and data credibility, supporting full-chain traceability and regulatory auditing, and meeting the requirements of the food safety management system.
Patent Information
- Application Number
- CN202610200557.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-11
- Publication Date
- 2026-05-12
AI Technical Summary
Existing grain quality traceability technologies are insufficient to achieve closed-loop traceability of quality data throughout the entire lifecycle, including raw material procurement, storage, processing, and finished product distribution, leading to problems such as data gaps, tampering risks, and delayed risk warnings.
By combining IoT real-time monitoring, blockchain full-chain evidence storage, AI risk warning and cloud data platform technologies, we can achieve full-chain data collection, reliable data storage and intelligent risk prediction. We collect data in real time through IoT sensors, use blockchain technology for tamper-proof evidence storage, use AI models for risk warning and anomaly detection, and combine cloud platform to provide full-chain traceability query and regulatory audit.
It achieves full-chain data connectivity, improves data reliability and the efficiency of proactive risk warning, meets the requirements of food safety management system, reduces enterprise compliance costs, and supports full-chain traceability and regulatory auditing.
Smart Images

Figure CN122022591A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of food security technology, specifically relating to a food end-to-end quality traceability system, method and medium. Background Technology
[0002] Current grain quality traceability technologies mainly include two categories: (1) Basic IoT monitoring: Data recording of a single storage link is achieved through temperature and humidity sensors + ERP system, but it lacks the ability to correlate data across links and conduct risk analysis; (2) Traditional blockchain traceability: It focuses on putting key data of the processing link on the chain, but the raw material procurement data still relies on manual entry, which poses the risk of "data silos" and "tampering before being put on the chain". Moreover, traditional paper and electronic records contain a large amount of unstructured data, which is difficult to integrate.
[0003] In summary, existing grain quality traceability technologies are insufficient to achieve closed-loop traceability of quality data throughout the entire lifecycle, including raw material procurement, storage, processing, and finished product distribution. This results in problems such as data gaps, tampering risks, and delayed risk warnings in the traditional grain industry's quality traceability system. Summary of the Invention
[0004] The technical solution described in this application aims to provide a method, equipment, and medium for full-chain quality traceability of grain. This solution can solve the problems of data gaps, tampering risks, and delayed risk warnings in the traditional grain industry's quality traceability, which are difficult to achieve closed-loop traceability of quality data throughout the entire life cycle of raw material procurement, storage, processing, and finished product circulation using existing technologies.
[0005] According to a first aspect of this application, embodiments of this application provide a grain end-to-end quality traceability system, comprising: The data acquisition module is used to collect real-time grain data from raw material procurement to storage, processing and distribution; the full-chain grain data includes environmental data and equipment parameters. The blockchain evidence storage module is used to perform hash calculations on the end-to-end grain data collected by the data acquisition module and the key business data manually entered, and then store the data on the blockchain. The intelligent analysis module is used to predict grain quality risks and detect anomalies based on the on-chain evidence-based end-to-end grain data and real-time end-to-end grain data, using neural networks. The cloud service module is used to integrate multi-source data, provide data interfaces and visualization displays, and support full-chain traceability and regulatory auditing.
[0006] Preferably, in the above-mentioned grain end-to-end quality traceability system, the data acquisition module includes: Warehouse environment sensors include temperature and humidity sensors, pH value sensors, and pest and disease sensors; these are used to monitor temperature and humidity information, pH value information, and pest and disease information, respectively. The processing equipment interface is used to connect to the PLC system of the processing equipment via the OPC UA protocol to obtain the equipment parameters of the processing equipment in real time.
[0007] Preferably, in the aforementioned grain end-to-end quality traceability system, the blockchain evidence storage module adopts a consortium blockchain architecture. The consensus nodes of the consortium blockchain architecture include grain enterprises, regulatory departments, and third-party testing institutions. The types of evidence storage data include raw material purchase contracts, quality inspection reports, warehouse entry and exit documents, and raw sensor data.
[0008] Preferably, the intelligent analysis module of the above-mentioned grain end-to-end quality traceability system includes: The mold prediction unit is used to input the end-to-end grain data into the LSTM neural network model and output the future mold probability; the end-to-end grain data includes historical environmental data, grain type and storage duration; The anomaly detection unit identifies sudden changes in processing parameters based on the isolated forest algorithm and triggers equipment fault warnings.
[0009] Preferably, the cloud service module of the aforementioned grain end-to-end quality traceability system includes: The data platform is used to integrate multi-source data from the Internet of Things, blockchain, and manual input, and provides a unified API interface. A visualization platform for displaying end-to-end traceability flowcharts, environmental data trend charts, and risk warning heatmaps.
[0010] According to a second aspect of this application, this application provides a method for end-to-end quality traceability of grain, comprising: Real-time collection of grain data across the entire supply chain, from procurement to storage, processing, and distribution, via IoT devices; By using blockchain technology, the entire chain of grain data and key business data manually entered are hashed and stored on the blockchain for evidence. By using AI models to analyze the entire grain data chain, including on-chain evidence storage and real-time collection, risk warning and anomaly detection can be achieved across the entire grain chain. By providing full-chain data query, visualization and regulatory audit interface through the cloud platform, the whole-chain traceability query and regulatory audit of grain quality can be realized.
[0011] Preferably, in the above-mentioned grain end-to-end quality traceability method, an AI model is used to analyze the end-to-end grain data, including on-chain evidence storage and real-time collection, to achieve risk warning and anomaly detection throughout the grain supply chain, including: The LSTM-based mold prediction model predicts the future mold probability from the input end-to-end grain data. An anomaly detection model based on isolated forests identifies sudden changes in processing parameters in the entire grain data chain and triggers equipment failure warnings.
[0012] Preferably, the above-mentioned whole-chain quality traceability method for grain also includes: automatically triggering equipment adjustment or pushing early warning information to relevant responsible persons when an environmental anomaly or deviation of processing parameters is detected.
[0013] Preferably, in the above-mentioned method for full-chain quality traceability of grain, blockchain technology is used to perform hash calculations and on-chain storage of full-chain grain data and manually entered key business data, including: The data hash value is written into the consortium blockchain and verified by consensus among multiple nodes.
[0014] According to a third aspect of this application, this application also provides a computer storage medium storing a computer program thereon, which, when executed, implements the grain end-to-end quality traceability method provided by any of the above technical solutions.
[0015] The technical solution of this application has at least the following technical effects: The grain end-to-end quality traceability solution provided in this application collects real-time grain data from raw material procurement to storage, processing, and distribution. This end-to-end grain data includes environmental data and equipment parameters, thus achieving full-chain coverage and breaking through the limitations of traditional "single-link traceability," realizing seamless data flow from raw materials to finished products. Then, the end-to-end grain data collected by the data acquisition module, along with manually entered key business data, undergoes hash calculation and is stored on the blockchain for verification. This improves data credibility, enabling blockchain technology to ensure that data is "traceable in origin, traceable in destination, and tamper-proof," satisfying [the requirements of the blockchain]. This solution meets the requirements of existing food safety management systems such as ISO22000. Based on blockchain-based, end-to-end grain data and real-time end-to-end grain data, it uses neural networks to predict grain quality risks and detect anomalies. By combining AI models with grain-related algorithms, it achieves proactive risk prediction, increasing efficiency by over 80% compared to traditional manual inspections. Finally, by integrating multi-source data, providing data interfaces and visualization, it supports end-to-end traceability and regulatory auditing, thus achieving regulatory adaptability. It pre-integrates government regulatory platform interfaces, supports one-click export of audit reports, and reduces enterprise compliance costs. In summary, this solution, through a combination of "IoT real-time monitoring + blockchain end-to-end data storage + AI risk warning + cloud data platform," achieves end-to-end data collection, reliable data storage, intelligent risk prediction, and end-to-end traceability. It solves the problems of data gaps, tampering risks, and delayed risk warnings in traditional grain industry quality traceability, which are difficult to achieve closed-loop traceability of quality data throughout the entire lifecycle of raw material procurement, storage, processing, and finished product distribution using existing technologies. Attached Figure Description
[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram of the structure of the grain end-to-end quality traceability system provided in the embodiments of this application; Figure 2 A system architecture diagram of a grain end-to-end quality traceability system provided in this application embodiment; Figure 3 A flowchart illustrating a method for end-to-end quality traceability of grain provided in this application embodiment; Figure 4 for Figure 1 The illustrated embodiment provides a risk warning flowchart for a grain end-to-end quality traceability system; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0017] To more clearly illustrate the overall concept of this application, a detailed explanation is provided below with reference to the accompanying drawings.
[0018] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. For those skilled in the art, various modifications and variations can be made to this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
[0019] Many specific details are set forth in the following description to provide a thorough understanding of this application. However, this application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of this application is not limited to the specific embodiments disclosed below. It should be noted that, unless otherwise specified, the embodiments of this application and the features thereof can be combined with each other.
[0020] In this application, unless otherwise expressly specified and limited, the terms "above" and "below" the second feature can refer to direct contact between the first and second features, or indirect contact between the first and second features through an intermediate medium. In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in one or more embodiments or examples.
[0021] The existing technology has the following drawbacks: Existing grain quality traceability technologies have problems in raw material procurement, storage, processing, and data management, specifically: (1) Raw material procurement process: Quality data (such as place of origin and pesticide residue testing) is not transparent and relies on manual entry, which is prone to errors and tampering.
[0022] (2) Storage process: lack of environmental monitoring such as temperature, humidity, and pests, and delayed early warning of mold risk.
[0023] (3) Processing process: The records of process parameters (such as processing time and equipment status) are broken and cannot be accurately traced.
[0024] (4) Data management (finished product circulation): Traditional paper / electronic spreadsheet records are easily tampered with, making it difficult to meet the needs of regulatory audits and consumer traceability.
[0025] In summary, existing grain quality traceability technologies are insufficient to achieve closed-loop traceability of quality data throughout the entire lifecycle, including raw material procurement, storage, processing, and finished product distribution. This results in problems such as data gaps, tampering risks, and delayed risk warnings in the traditional grain industry's quality traceability system.
[0026] To address the aforementioned problems, the following embodiments of the present invention provide a grain end-to-end quality traceability solution. Through a combination of technologies including "real-time IoT monitoring + blockchain end-to-end evidence storage + AI risk warning + cloud data platform," the following technical effects are achieved: 1. End-to-end data acquisition: Real-time data acquisition of the storage environment through IoT sensors (temperature, humidity, gas and / or video monitoring), and acquisition of processing equipment parameters through device API.
[0027] 2. Trustworthy data storage: Utilize blockchain technology to hash and upload key data such as raw material purchase vouchers, quality inspection reports, and warehouse entry and exit records to the chain, ensuring that they cannot be tampered with.
[0028] 3. Intelligent risk prediction: Based on historical data, the AI model is trained to provide real-time warnings for abnormal storage environments and deviations in processing parameters, and to predict the risk of mold growth 72 hours in advance.
[0029] 4. Full-chain traceability query: Consumers / regulators can access the cloud platform by scanning the code to obtain full-process data from "farm to table", which supports multi-dimensional display of text, images, videos and data charts.
[0030] To achieve the above objectives, see [link to relevant documentation]. Figure 1 , Figure 1 This is a schematic diagram of the structure of a grain end-to-end quality traceability system provided in an embodiment of this application, as shown below. Figure 1 As shown, this end-to-end grain quality traceability system includes: The data acquisition module 110 is used to collect real-time grain data from raw material procurement to storage, processing and distribution. The full-chain grain data includes environmental data and equipment parameters.
[0031] In response to the lack of transparency in quality data (such as origin and pesticide residue testing) during the raw material procurement process, and the reliance on manual data entry which is prone to errors and tampering, this application embodiment uses a data acquisition module 110 to monitor in real time via the Internet of Things, realizing the full-chain, full-process data collection from raw material procurement to warehousing, processing and distribution. The collected full-chain grain data includes environmental data and equipment parameters.
[0032] Specifically, as a preferred embodiment, the data acquisition module 110 includes: a storage environment sensor, which includes temperature and humidity, pH value and pest and disease sensors; used to monitor temperature and humidity information, pH value information and pest and disease information respectively; and a processing equipment interface, used to connect to the PLC system of the processing equipment through the OPC UA protocol to obtain the equipment parameters of the processing equipment in real time.
[0033] In the technical solution provided in this application embodiment, the warehouse environment data includes the deployment of temperature and humidity, pH value, and pest monitoring sensors, which collect data every 10 minutes and trigger high-frequency collection (once per minute) when abnormalities occur; in addition, regarding the equipment parameters of the processing equipment, the PLC system is connected through the OPC UA protocol to obtain parameters such as processing temperature, speed, and energy consumption in real time.
[0034] Figure 1 The grain full-chain quality traceability system shown also includes a blockchain evidence storage module 120, which is used to perform hash calculations on the full-chain grain data collected by the data acquisition module and the key business data manually entered and store them on the blockchain.
[0035] This application utilizes blockchain technology to hash and upload key data such as raw material purchase vouchers, quality inspection reports, and warehouse entry and exit records to the blockchain, ensuring the immutability of the data and thus achieving data credibility and evidence storage.
[0036] Specifically, as a preferred embodiment, the blockchain evidence storage module 120 adopts a consortium blockchain architecture, in which consensus nodes include grain enterprises, regulatory authorities, and third-party testing institutions; the types of evidence storage data include raw material purchase contracts, quality inspection reports, warehouse entry and exit documents, and raw sensor data.
[0037] The technical solution provided in this application, at the blockchain evidence storage layer, adopts a consortium blockchain architecture (such as Hyperledger Fabric), in which grain enterprises, regulatory authorities, and third-party testing institutions serve as consensus nodes; regarding the types of evidence storage data, they include: raw material procurement contracts (PDF - hash value), quality inspection reports (XML - structured data), inbound and outbound documents (OCR - recognized text), and sensor raw data (JSON format).
[0038] Figure 1 The grain end-to-end quality traceability system shown also includes: an intelligent analysis module 130, which uses neural networks to predict grain quality risks and detect anomalies based on the end-to-end grain data stored on the blockchain and real-time end-to-end grain data.
[0039] The technical solution provided in this application embodiment can make intelligent risk prediction through AI intelligent analysis. Specifically, it trains an AI model based on historical data to provide real-time warnings for abnormal storage environment and deviation of processing parameters, and predicts the risk of mold growth 72 hours in advance.
[0040] For the AI intelligent analysis layer, as a preferred embodiment, the aforementioned intelligent analysis module 130 includes: a mold prediction unit, used to input the entire grain data into an LSTM neural network model and output the future mold probability; wherein, the entire grain data includes historical environmental data, grain type and storage duration; and an anomaly detection unit, which identifies sudden changes in processing parameters based on the isolated forest algorithm and triggers equipment fault warnings.
[0041] In the technical solution provided in this application embodiment, the AI intelligent analysis layer specifically includes a mold prediction model and an anomaly detection algorithm; the mold prediction includes: based on an LSTM neural network, inputting historical temperature and humidity, grain type and storage time and other data, and outputting the probability value of mold within a predetermined time in the future (e.g., within 7 days); in addition, regarding the anomaly detection algorithm: identifying sudden changes in processing parameters through an isolation forest, such as triggering equipment failure warning when the temperature rises suddenly by 15°C.
[0042] Figure 1 The grain end-to-end quality traceability system shown also includes: The cloud service module 140 is used to integrate multi-source data, provide data interfaces and visualization displays, and support full-chain traceability and regulatory auditing.
[0043] The technical solution provided in this application embodiment enables full-chain traceability through the cloud service module 140. Consumers / regulators can access the cloud platform by scanning a code to obtain full-process data from "farm to table" and support multi-dimensional display in the form of text, video and data charts.
[0044] Specifically, as a preferred embodiment, the cloud service module 140 of the above-mentioned grain end-to-end quality traceability system includes: The data platform is used to integrate multi-source data from the Internet of Things, blockchain, and manual input, and provides a unified API interface.
[0045] A visualization platform for displaying end-to-end traceability flowcharts, environmental data trend charts, and risk warning heatmaps.
[0046] This cloud service layer includes a data platform and a visualization platform. The data platform integrates multi-source data and provides a unified API interface for enterprise ERP and government regulatory platforms to call. The visualization platform supports the dynamic display of full-link flowcharts, environmental data trend curves, and risk warning heat maps.
[0047] In summary, the grain end-to-end quality traceability system provided in this application embodiment collects grain data in real time from raw material procurement to storage, processing, and distribution through the data acquisition module 110. This end-to-end grain data includes environmental data and equipment parameters; thus achieving full-chain coverage, breaking through the limitations of traditional "single-link traceability," and realizing the seamless data flow from raw materials to finished products. Then, the blockchain evidence storage module 120 performs hash calculations on the end-to-end grain data collected by the data acquisition module and the key business data manually entered, and stores the data on the blockchain for evidence storage; thereby improving data credibility and enabling blockchain technology to ensure that the data is "traceable in origin, traceable in destination, and tamper-proof." This solution meets the requirements of existing food safety management systems such as ISO22000. Furthermore, the intelligent analysis module 130, based on on-chain and real-time full-chain grain data, uses neural networks to predict grain quality risks and detect anomalies. By combining AI models with grain-related algorithms, it achieves proactive risk prediction, increasing efficiency by over 80% compared to traditional manual inspections. Finally, the cloud service module 140 integrates multi-source data, provides data interfaces and visualization, and supports full-chain traceability and regulatory auditing. This ensures regulatory adaptability, pre-integrates government regulatory platform interfaces, supports one-click export of audit reports, and reduces enterprise compliance costs. In summary, this solution, through the combination of "IoT real-time monitoring + blockchain full-chain evidence storage + AI risk warning + cloud data platform," achieves full-process data collection, reliable data storage, intelligent risk prediction, and full-chain traceability. It solves the problems of data gaps, tampering risks, and delayed risk warnings in traditional grain industry quality traceability, which are difficult to achieve closed-loop traceability of quality data throughout the entire lifecycle of raw material procurement, storage, processing, and finished product distribution using existing technologies.
[0048] In addition, combined Figure 2 As shown in the illustrated embodiment, the grain end-to-end quality traceability system architecture diagram includes: IoT device layer 210, edge computing gateway 220, blockchain evidence storage layer 230, AI analysis engine 240, and cloud data platform 250; specifically, The functions of the IoT data acquisition layer (the aforementioned IoT device layer 210 and edge computing gateway 220) include: Warehouse environment: deploy temperature, humidity, pH value, and pest monitoring sensors, collect data every 10 minutes, and trigger high-frequency acquisition (once per minute) when abnormalities occur; Processing equipment: connect to the PLC system through the OPC UA protocol to obtain parameters such as processing temperature, speed, and energy consumption in real time.
[0049] The functions of the blockchain evidence storage layer 230 include: adopting a consortium blockchain architecture (such as Hyperledger Fabric), with grain enterprises, regulatory authorities, and third-party testing institutions as consensus nodes; and storing data types such as: raw material procurement contracts (PDF hash values), quality inspection reports (XML structured data), inbound and outbound documents (OCR-recognized text), and raw sensor data (JSON format).
[0050] The AI analysis engine 240's functional modules include: a mold prediction model based on an LSTM neural network, which takes historical temperature and humidity, grain type, storage time, and other data as input and outputs the probability of mold growth in the next 7 days; and an anomaly detection algorithm that identifies sudden changes in processing parameters through an isolation forest, such as triggering equipment failure warnings when the temperature suddenly rises by 15°C.
[0051] The cloud service layer (i.e., the cloud data platform 250 mentioned above) includes the following functional modules: Data platform: used to integrate multi-source data and provide a unified API interface for enterprise ERP systems, government regulatory terminals and consumer mini-programs to call; Visual interface, supporting dynamic display of full-link flowcharts, environmental data trend curves and risk warning heat maps.
[0052] Additionally, as a preferred embodiment, see [link to previous document]. Figure 3 , Figure 3 This is a flowchart illustrating a method for end-to-end quality traceability of grain, as provided in an embodiment of this application. Figure 3 As shown, this method for end-to-end quality traceability of grain includes: S110: Real-time collection of grain data across the entire supply chain, from grain procurement to storage, processing, and distribution, via IoT devices.
[0053] S120: Using blockchain technology, hash calculations are performed on the entire grain data chain and key business data manually entered, and the data is stored on the blockchain for evidence.
[0054] This technology uses blockchain to perform hash calculations and on-chain storage of end-to-end grain data and key business data entered manually. This includes writing the data hash value into the consortium blockchain and verifying it through consensus among multiple nodes.
[0055] S130: Utilize AI models to analyze the entire grain supply chain data, including on-chain evidence storage and real-time collection, to achieve risk warning and anomaly detection across the entire grain supply chain.
[0056] In one preferred embodiment, S130: Utilizing an AI model to analyze the entire grain supply chain data—including on-chain notarization and real-time collection—to achieve risk warning and anomaly detection across the entire grain supply chain, specifically including: S131: An LSTM-based mold prediction model that predicts future mold growth based on input end-to-end grain data and outputs the probability of future mold growth. S132: An anomaly detection model based on isolated forests identifies sudden changes in processing parameters in the entire grain data chain and triggers equipment failure warnings.
[0057] S140: Provide full-chain data query, visualization and regulatory audit interface through cloud platform to realize full-chain traceability query and regulatory audit of grain quality.
[0058] In addition, this method for full-chain quality traceability of grain also includes: S150: When an environmental anomaly or deviation of processing parameters is detected, the equipment adjustment is automatically triggered or an early warning message is sent to the relevant responsible person.
[0059] The grain end-to-end quality traceability method provided in this application collects real-time grain data from raw material procurement to storage, processing, and distribution. This end-to-end grain data includes environmental data and equipment parameters, thus achieving full-chain coverage and breaking through the limitations of traditional "single-link traceability," enabling seamless data flow from raw materials to finished products. Then, the end-to-end grain data collected by the data acquisition module, along with manually entered key business data, undergoes hash calculation and is stored on the blockchain for verification. This improves data credibility, ensuring that blockchain technology guarantees data is "traceable in origin, traceable in destination, and tamper-proof." This solution meets the requirements of existing food safety management systems such as ISO22000. Based on blockchain-based, evidence-based, end-to-end grain data and real-time end-to-end grain data, it uses neural networks to predict grain quality risks and detect anomalies. By combining AI models with grain-related algorithms, it achieves proactive risk prediction, increasing efficiency by over 80% compared to traditional manual inspections. Finally, by integrating multi-source data, providing data interfaces and visualization, it supports end-to-end traceability and regulatory auditing, thus achieving regulatory adaptability. It pre-integrates government regulatory platform interfaces, supports one-click export of audit reports, and reduces enterprise compliance costs. In summary, this solution, through the combination of "IoT real-time monitoring + blockchain end-to-end evidence storage + AI risk warning + cloud data platform," achieves end-to-end data collection, reliable data storage, intelligent risk prediction, and end-to-end traceability. It solves the problems of data gaps, tampering risks, and delayed risk warnings in traditional grain industry quality traceability, which are difficult to achieve closed-loop traceability of quality data throughout the entire lifecycle of raw material procurement, storage, processing, and finished product distribution using existing technologies.
[0060] Additionally, see Figure 4 , Figure 4 A risk warning flowchart for a grain end-to-end quality traceability system is provided as an embodiment of this application, such as... Figure 4 As shown, the risk warning process includes: S201: Real-time data from grain silo sensors.
[0061] S202: Is the temperature >85% for 3 consecutive days? If yes, proceed to step S203; if no, proceed to step S204.
[0062] S203: Is the temperature > 28℃? If yes, proceed to step S205; if no, proceed to step S204.
[0063] S204: End of this round of monitoring.
[0064] S205: Call the LSTM mold prediction model.
[0065] S206: Determine if the probability of mold growth is >60%; if yes, proceed to step S208; otherwise, proceed to step S207.
[0066] S207: Marked as low risk.
[0067] S208: Level 3 warning triggered.
[0068] S209: Implement prevention and control measures.
[0069] S210: Turn on the ventilation system.
[0070] S211: Send an alert to the administrator.
[0071] S212: Freeze the entry and exit of this warehouse.
[0072] Combination Figure 4 The diagram illustrates the risk warning process of a grain end-to-end quality traceability system, and provides examples of grain end-to-end quality traceability in the following scenarios: Scenario 1: Raw material procurement traceability Suppliers upload their planting base qualifications and pesticide usage records (PDF files) to the platform, and the system automatically generates hash values and uploads them to the blockchain. After the goods arrive, third-party testing agencies enter the quality inspection results (such as heavy metal content) through a mobile app, and the data is directly written to the blockchain, forming a closed loop of "procurement-testing" data.
[0073] Scenario 2: Warehouse Risk Warning When the sensor detects that the humidity in a grain warehouse exceeds 85% for three consecutive hours and the temperature is above 28°C, the AI model calculates that the probability of mold growth is 60%. The system automatically sends an early warning to the warehouse manager and triggers the ventilation equipment to turn on automatically.
[0074] Scenario 3: Quality traceability in the processing stage During the processing of a certain batch of rice, the OPC UA interface detected an abnormal temperature rise in the rice milling machine to 65℃ (the standard should be ≤60℃). The system executed: Immediately freeze the processing data for this batch and upload it to the blockchain for evidence storage; Use the LSTM model to predict the nutrient loss rate (output value: vitamin B1 loss ≥ 15%). Automatically generate processing parameter adjustment suggestions and push them to the workshop central control screen.
[0075] Scenario 4: Government Regulatory Audit When regulatory agencies launch surprise inspections, they can directly access the blockchain explorer using pre-configured API keys. Enter the product traceability code and generate an audit report containing 23 key indicators within 3 seconds; Three abnormal timestamps in the evidence storage were automatically marked (e.g., the upload time of a certain test report was later than the entry time into the database).
[0076] In addition, the following embodiments of this application provide product embodiments, which have the same beneficial effects as the grain full-chain quality traceability method provided in the above embodiments, and other technical features in the product embodiments are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.
[0077] According to a third aspect of this application, this application also provides a computer storage medium storing a computer program thereon, which, when executed, implements the grain end-to-end quality traceability method provided by any of the above technical solutions.
[0078] See Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device includes: A memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor, when executing the program, implements the grain end-to-end quality traceability method provided by any of the above technical solutions.
[0079] like Figure 5As shown, the electronic device can include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory ROM 1002 or a program loaded from a storage device 1003 into a random access memory RAM 1004. The RAM 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. The communication device 1009 can operate the electronic device to exchange data with other devices via wireless or wired communication. Although the diagram shows a model building device with various systems, it should be understood that it is not required to implement or have all of the systems shown. It is possible to implement or have more or fewer systems alternatively.
Claims
1. A grain end-to-end quality traceability system, characterized in that, include: The data acquisition module is used to collect real-time grain data from raw material procurement to storage, processing and distribution; wherein, the full-chain grain data includes environmental data and equipment parameters; The blockchain evidence storage module is used to perform hash calculations on the end-to-end grain data collected by the data acquisition module and the key business data manually entered, and then store the data on the blockchain. The intelligent analysis module is used to predict grain quality risks and detect anomalies based on the on-chain evidence-based end-to-end grain data and real-time end-to-end grain data, using neural networks. The cloud service module is used to integrate multi-source data, provide data interfaces and visualization displays, and support full-chain traceability and regulatory auditing.
2. The system according to claim 1, characterized in that, The data acquisition module includes: The storage environment sensor includes temperature and humidity, pH value, and pest and disease sensors; these are used to monitor temperature and humidity information, pH value information, and pest and disease information, respectively. The processing equipment interface is used to connect to the PLC system of the processing equipment via the OPC UA protocol to obtain the equipment parameters of the processing equipment in real time.
3. The system according to claim 1, characterized in that, The blockchain evidence storage module adopts a consortium blockchain architecture, in which consensus nodes include grain enterprises, regulatory authorities, and third-party testing institutions; the types of evidence stored include raw material purchase contracts, quality inspection reports, warehouse entry and exit documents, and raw sensor data.
4. The system according to claim 1, characterized in that, The intelligent analysis module includes: The mold prediction unit is used to input the end-to-end grain data into an LSTM neural network model and output the future mold probability; wherein, the end-to-end grain data includes historical environmental data, grain type and storage duration; The anomaly detection unit identifies sudden changes in processing parameters based on the isolated forest algorithm and triggers equipment fault warnings.
5. The system according to claim 1, characterized in that, The cloud service module includes: The data platform is used to integrate multi-source data from the Internet of Things, blockchain, and manual input, and provides a unified API interface. A visualization platform for displaying end-to-end traceability flowcharts, environmental data trend charts, and risk warning heatmaps.
6. A method for end-to-end quality traceability of grain, characterized in that, include: Real-time collection of grain data across the entire supply chain, from procurement to storage, processing, and distribution, via IoT devices; The entire grain data and manually entered key business data are hashed and stored on the blockchain using blockchain technology. By using AI models to analyze the entire grain data chain, including on-chain evidence storage and real-time collection, risk warning and anomaly detection can be achieved across the entire grain chain. By providing full-chain data query, visualization and regulatory audit interface through the cloud platform, the whole-chain traceability query and regulatory audit of grain quality can be realized.
7. The method according to claim 6, characterized in that, The method of using AI models to analyze end-to-end grain data, including on-chain notarization and real-time collection, enables risk warning and anomaly detection across the entire grain supply chain, including: The LSTM-based mold prediction model predicts the future mold probability from the input end-to-end grain data. An anomaly detection model based on isolated forests identifies sudden changes in processing parameters in the entire grain data chain and triggers equipment failure warnings.
8. The method according to claim 6, characterized in that, Also includes: When an environmental anomaly or deviation in processing parameters is detected, the system will automatically trigger equipment adjustments or send early warning information to the relevant responsible persons.
9. The method according to claim 6, characterized in that, The process of hashing and storing the entire grain data and manually entered key business data on the blockchain using blockchain technology includes: The data hash value is written into the consortium blockchain and verified by consensus among multiple nodes.
10. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the grain end-to-end quality traceability method as described in any one of claims 6 to 9.
