A pesticide residue and agricultural chemical residue full-industry-chain internet of things blockchain tracing system
Patent Information
- Application Number
- CN202611106418.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-20
AI Technical Summary
[0015]本发明相较于现有技术,具备全链条覆盖、数据安全可信、管控精准高效、适配性强、运维成本低、监管体系完善等多重核心有益效果,具体如下:
Smart Images

Figure FT_1
Abstract
Description
Technical Field
[0001] This invention belongs to the field of Internet of Things (IoT) technology, specifically a blockchain-based IoT traceability system for the entire industry chain of pesticide and drug residues. Background Technology
[0002] In recent years, the quality and safety of agricultural products have increasingly attracted social attention. Consumers' demand for transparent traceability of food "from farm to table" continues to grow. However, traditional agricultural product traceability systems suffer from the following shortcomings: 1. Limited data collection dimensions and lack of full-chain coverage. Existing traceability systems mostly focus on a single stage of planting or processing. For example, CN118096186B only collects information on the process from planting to sales of vegetables, making it difficult to achieve a complete data chain from soil monitoring, agricultural operations, processing and packaging to cold chain logistics. 2. Mixed data from multiple production entities and lack of effective manufacturer isolation mechanisms. Existing systems such as CN119624478A can collect data from various stages of agricultural products, but they mostly use a single database for centralized storage. Data from different manufacturers is intertwined, which is detrimental to data security and the protection of trade secrets. 3. High video storage costs, making it difficult to support long-term retention of more than six months. Most existing traceability systems only store screenshots of key nodes and lack complete video playback functions for the entire production cycle. Even if video storage solutions exist, the lack of reasonable encoding compression and layered storage strategies results in high storage costs, hindering commercial promotion. 4. Limited consumer traceability experience, lacking access to complete monitoring of the production day. Existing QR code traceability systems mostly display basic textual information such as origin and date, lacking the core function that consumers care about most: "complete monitoring video playback on the production date." 5. Blockchain applications are superficial, lacking deep integration with IoT data. While some systems incorporate blockchain technology, they often use simple hash-based notarization, failing to achieve an automated closed loop from sensor data collection and video screenshots to blockchain notarization. Summary of the Invention
[0003] This invention addresses the above-mentioned technical problems by providing a multi-vendor isolated IoT blockchain traceability system for the entire agricultural and food industry chain of pesticide and drug residues, based on the Internet of Things (IoT) and blockchain.
[0004] This invention is achieved through the following technical solution: A blockchain-based IoT traceability system for the entire agricultural and pesticide residue industry chain includes a device access layer, a data acquisition and transmission layer, a storage and processing layer, a business traceability platform layer, and an application display layer. The device access layer is deployed in agricultural production scenarios, food processing scenarios, logistics nodes, and wholesale and retail scenarios, and is used to access IoT sensors, surveillance cameras, autonomous sampling robots, and drones. All access terminals are bound to a unique factory_id identifier as their identity code. The data acquisition and transmission layer includes an IoT gateway and a streaming media server. The IoT sensors use the MQTT protocol to transmit data, with the MQTT communication Topic format set to factory / {manufacturer ID} / sensor / {device number} to achieve message isolation across multiple bases and manufacturers. The surveillance cameras push video streams according to industry and national standards. The agricultural production scenarios, food processing scenarios, logistics nodes, wholesale and retail scenarios, and e-commerce scenarios are all integrated into the system. Each stage generates its own identity code as a data index. Business data from each stage is uploaded to the cloud data center after being encoded. The storage and processing layer constitutes the cloud data center, including an OSS cloud storage module, a blockchain evidence storage module, and a relational database. All data tables in the relational database are configured with a factory_id field. The OSS cloud storage module is used to store monitoring videos, process images, and inspection documents. The blockchain evidence storage module is used to store traceability key data and image file hash values on the blockchain for evidence storage. The business traceability platform layer includes an agricultural base management module, a food processing management module, an equipment management module, a batch management module, a work order management module, and a traceability data association module, which are used to establish association mappings between agricultural product batches, QR code indexes, sensor-collected data, monitoring videos, and circulation records. The application display layer includes a consumer QR code traceability module, an enterprise internal management module, and a regulatory department management module, which are used to display traceability information in a differentiated manner to different entities.
[0005] Furthermore, the device access layer is configured for the planting industry as follows: a multi-parameter soil sensor, an environmental sensor, an autonomous sampling robot, drone image and video acquisition, and a satellite remote sensing data access unit. The multi-parameter soil sensor monitors soil pH, conductivity, organic matter, heavy metals, and pesticide residues; the environmental sensor collects temperature, humidity, light intensity, wind speed, and rainfall; the autonomous sampling robot navigates to the sampling point to collect soil samples and records encrypted GPS coordinates; the satellite remote sensing data access unit monitors surrounding pollution sources and automatically issues warnings when standards are exceeded; and image data with time watermarks and GPS positioning is forcibly collected at agricultural nodes such as tilling, sowing, fertilizing, irrigating, weeding, harvesting, and picking. The image data is bound to a farm identification code and uploaded to the cloud data center.
[0006] Further, the device access layer is configured for animal husbandry: a feed detection unit, a veterinary drug recording unit, a pen environment sensor, and a livestock electronic ear tag identification unit. The pen environment sensor collects the temperature and humidity, ammonia, hydrogen sulfide, CO₂ concentration of the pen, and temperature imaging of livestock and poultry; the electronic ear tag identification unit records full life cycle events of livestock and poultry including birth, vaccination, medication, pen transfer, and slaughter, as well as the walking trajectories of livestock and poultry; the system is configured with an automatic veterinary drug withdrawal period reminder function, and the data and materials of the livestock breeding detection unit are bound to the farm identity code and uploaded to the cloud data center.
[0007] Further, the device access layer is configured for fisheries: a water quality sensor, an aerator linkage control unit, an AI inspection robot, an unmanned aerial vehicle for patrol, and a BeiDou positioning unit. The water quality sensor monitors dissolved oxygen, pH, ammonia nitrogen, nitrite, heavy metals, water temperature, salinity, and turbidity of the water body; when the dissolved oxygen is lower than a threshold, the aerator is automatically triggered to be linked and turned on; the AI inspection robot and the unmanned aerial vehicle are equipped with image recognition algorithms to identify abnormal fish schools and dead fish; the BeiDou positioning unit is used for collecting spatiotemporal information of pelagic fishing. The data and materials of the detection unit are bound to the farm identity code and uploaded to the cloud data center.
[0008] Further, the food processing plant link in the data collection and transmission layer performs the following management and control: incoming materials are subjected to rapid detection of pesticide residues and heavy metals, and a raw material batch code is generated after acceptance and qualification; the raw material batch number and the production line work order number are bound during feeding; images are automatically captured in key processes of feeding, cleaning, cutting, sterilization, and packaging; the processing data is bound to the processing plant identity code and uploaded to the cloud data center, and triggers blockchain evidence storage, and a corresponding batch code is output for the product. The distributor link collects information on the inbound and outbound of agricultural products, warehouse environment, and logistics trajectories. In the logistics link, the commodity identity code is generated by scanning the batch code during loading, the vehicle is equipped with real-time monitoring and temperature sensors and provided with an abnormality function, and the data of the logistics link is bound to the logistics identity code and synchronized to the cloud server. The supermarket / e-commerce terminal scans the commodity barcode to record the quantity of products on shelves, the shelf time, and the sales quantity, and is provided with an early warning function for products approaching the expiration date. The circulation information is bound to the distributor identity code and uploaded to the cloud data center; the supermarket / e-commerce terminal records the product shelf and sales accounts, and a unified traceability two-dimensional code is printed on the outer package of the finished product.
[0009] Furthermore, the OSS cloud storage module in the storage and processing layer is configured with a video storage control strategy: the monitoring video uses H.265 encoding, the base bitrate is set to 1.5Mbps, motion detection recording mode is enabled, and the bitrate is automatically reduced to 0.8Mbps during periods of no production. Lifecycle management rules are configured: videos from 0 to 30 days are stored in standard format, videos from 30 to 180 days are automatically migrated to low-frequency archive storage, and video files are automatically deleted after 180 days of storage. When generating agricultural product batch files, the batch management module records the start and end times of batch production and the corresponding camera number. When consumers scan the code for traceability, the system selectively retrieves monitoring video clips from the OSS cloud storage based on the full-chain identity codes of the agricultural base, food processing plant, distributor, logistics company, and supermarket / e-commerce platform recorded in the traceability QR code, according to the batch production time range and camera number, for playback.
[0010] Furthermore, the business traceability platform layer also includes an anomaly alarm and work order closed-loop management module. When the sensor monitoring value exceeds the preset safety threshold, an alarm is automatically triggered and an electronic work order is generated. The work order is pushed to the production management personnel of the corresponding edge strip. The work order records the anomaly type, occurrence time, location number, and handling suggestions. After the staff uploads the rectification record and re-inspection report, the system archives and closes the work order. In extreme cases, the data is temporarily stored in the local gateway or the operator is required to force recording to troubleshoot the equipment failure and then upload it in time. When the time-space reference is distorted (GPS signal loss, equipment clock disorder), if the GPS coordinates are lost, the base station LBS triangulation positioning or WiFi MAC address database positioning is automatically used, and the manufacturer ID is automatically identified as the geographical location marker. If the equipment clock is disordered, the time source is anchored when storing evidence through blockchain. The data structure of blockchain evidence clearly writes the time_anchor_type field (value: GPS, NTP, Local_RTC). If Local_RTC is used, the evidence content includes the gateway device number. The reference time at that time can be traced back through the power-on log of the gateway. The entire process log of the abnormal event is permanently retained.
[0011] Furthermore, the consumer QR code traceability module in the application presentation layer is configured to perform the following functions: display basic product information, full-cycle sensor data trend curves, key process screenshot sets, quality inspection reports, and logistics trajectories; provide a channel for playback of complete monitoring videos on the production date; and provide an entry point for verifying blockchain-based evidence certificates.
[0012] Furthermore, the application presentation layer is equipped with a hierarchical desensitization display strategy. The consumer scanning traceability terminal only displays public information and test results, hiding sensitive parameters of the manufacturer's processes, personnel, and equipment. The enterprise's internal management terminal displays complete process parameters, operator and equipment number information. The regulatory department's management terminal opens all original collected data and supports the export of traceability files.
[0013] This invention also provides an application method for an IoT blockchain traceability system for the entire pesticide and drug residue industry chain, characterized by the following steps: S1. Assign a unique factory_id as an identity code to the manufacturers accessing the platform, and bind the identity code to all IoT terminals, planting plots, livestock and breeding units, and agricultural product batches. S2: IoT sensors and surveillance cameras collect raw data from farms and food processing plants; sensor data is uploaded via MQTT protocol in the format of factory / {manufacturer ID} / sensor / {device number}; business data from each link of farms, food processing plants, distributors, supermarkets / e-commerce are linked to corresponding QR code indexes and uploaded to the cloud data center. S3: The video captured by the surveillance camera is recorded using H.265 encoding, with motion detection enabled to dynamically adjust the bitrate, and hierarchical storage is performed according to the OSS lifecycle strategy; S4. Automatic or manual triggering of image capture at agricultural nodes and key food processing steps, with image files and sensor data snapshots linked to the corresponding agricultural product batches; S5. Extract key data and hash values of image files from the batch and write them to the blockchain to complete the evidence storage. S6. Generate a unique batch code for agricultural products and record the start and end times of production for that batch, as well as the corresponding camera identifier. S7. Consumers scan the finished product traceability QR code, and the cloud data center retrieves and displays the corresponding sensor data, process screenshots, test reports, and monitoring videos of the production date and time period based on the batch code.
[0014] This invention aims to address the pain points of existing agricultural product traceability systems, such as incomplete industry chain coverage, fragmented data collection, chaotic device access, easily tampered data, low traceability credibility, lack of closed-loop anomaly monitoring, and difficulties in data isolation among multiple manufacturers and bases. It provides a blockchain-based IoT traceability system for the entire agricultural residue and pesticide residue industry chain. Through a layered architecture, it achieves automated data collection, standardized transmission, hierarchical storage, tamper-proof blockchain evidence storage, and full-chain traceability across all scenarios including agricultural planting and breeding, food processing, logistics, and terminal sales. By setting unique identification codes for manufacturers, it achieves data isolation management across multiple devices, manufacturers, and bases, solving the problem of chaotic device access. Through real-time monitoring of multi-dimensional environmental, water quality, soil, and aquaculture data, it accurately controls the risk of pesticide residue, pesticide residue, and heavy metal contamination. Simultaneously, it constructs an anomaly alarm and work order closed-loop mechanism, a spatiotemporal benchmark error correction mechanism, and a multi-entity hierarchical desensitized display mode, ultimately achieving full life-cycle traceability, verifiability, and regulatory oversight of agricultural products. This significantly improves the accuracy of agricultural product quality and safety control and traceability credibility, ensuring food safety.
[0015] Compared with existing technologies, this invention has multiple core beneficial effects, including full-chain coverage, secure and reliable data, precise and efficient management and control, strong adaptability, low operation and maintenance costs, and a sound regulatory system, as detailed below: 1. Full coverage of the entire industry chain to achieve traceability and control of pesticide and pesticide residues throughout the entire process. This system integrates the entire industry chain, including planting, animal husbandry, fisheries, food processing, logistics and transportation, wholesale and retail, and e-commerce sales. It covers all aspects of soil and water quality testing, agricultural operations, breeding management, processing procedures, logistics and warehousing, and end-sales. It can monitor key risk points in real time, such as pesticide residues in soil, heavy metals in water, veterinary drug use in animal husbandry, and excessive pesticide residues in processed raw materials. It completely solves the problems of single traceability scenarios and fragmented links in traditional traceability, and realizes full-process traceability and source control of pesticide residues, drug residues, and heavy metal pollution.
[0016] 2. Standardized device access and communication mechanisms to achieve data isolation across multiple vendors. This invention configures a unique factory_id vendor identity code for all access terminals and uses a standardized MQTT communication Topic format to achieve data isolation transmission for multiple bases, multiple manufacturers, and multiple types of devices. This effectively avoids the problems of mixed devices, data crosstalk, unidentifiable identities, and chaotic data ownership in traditional IoT traceability systems, and greatly improves the compatibility and stability of large-scale deployments in multiple scenarios.
[0017] 3. Blockchain-based evidence storage ensures the authenticity and immutability of traceability data. The system stores core traceability business data and image file hash values on the blockchain in real time, combined with a spatiotemporally anchored evidence storage structure, addressing the industry shortcomings of traditional traceability data, such as tamperability, low credibility, and lack of verification. All agricultural records, processing data, testing reports, logistics information, and abnormal rectification records are permanently retained and traceable, greatly enhancing the credibility of agricultural product traceability results and meeting the verification needs of market supervision and consumers.
[0018] 4. Intelligent dynamic storage strategy reduces operation and maintenance costs and improves data retrieval efficiency. This system employs H.265 encoding and motion detection dynamic bitrate adjustment technology for surveillance videos, automatically reducing the bitrate during periods of no production activity. It also configures hierarchical lifecycle storage rules to achieve tiered storage, automatic archiving, and expiration cleanup of video data. While fully preserving key traceability image data, it significantly reduces cloud storage resource consumption and server maintenance pressure, balancing data integrity and cost-effectiveness.
[0019] 5. Anomaly alerts + work order closed-loop system enable proactive risk management. The system employs a multi-dimensional data threshold early warning mechanism, automatically triggering alarms and generating electronic work orders for issues such as excessive water and soil conditions, abnormal aquaculture environments, equipment malfunctions, and abnormal temperature and humidity in logistics. This achieves a closed-loop management system for reporting, handling, re-inspection, and archiving of abnormal issues. Simultaneously, it is equipped with a spatiotemporal error correction mechanism for abnormal scenarios such as GPS failure and clock malfunctions. Through LBS positioning and time anchoring technology, it ensures the validity of data in special scenarios, completely resolving the shortcomings of traditional systems such as passive tracing, lack of risk warnings, and lack of record-keeping for problem rectification.
[0020] 6. Hierarchical and desensitized display to adapt to the needs of multiple users. The system constructs a three-tiered differentiated display system for consumers, enterprises, and regulatory authorities. Sensitive process, equipment, and personnel data are anonymized, ensuring that consumers can easily verify product traceability information, protecting enterprise business privacy, and granting regulatory authorities full access to original data. This achieves multi-dimensional adaptation for convenient public inquiry, enterprise management, and government supervision, making it highly practical and adaptable.
[0021] 7. Intelligent equipment linkage enhances the precision of agricultural production safety management. The system integrates intelligent equipment such as sampling robots, inspection robots, drones, intelligent aerators, and electronic ear tags to achieve automated and intelligent management of agricultural sampling, livestock inspection, water quality control, and livestock traceability. It also features functions such as veterinary drug withdrawal period reminders, product near-expiration warnings, and automatic pollution source warnings to avoid the risk of excessive pesticide and drug residues from the source and improve the quality and safety level of agricultural products. Attached Figure Description
[0022] In the attached diagram, Figure 1 This is a schematic diagram of the architecture of an IoT blockchain traceability system for the entire industrial chain of pesticide and drug residues according to the present invention. Detailed Implementation
[0023] The specific implementation methods of this invention will be described in detail below, combining the overall system architecture and practical application scenarios, such as... Figure 1 As shown, this implementation method achieves traceability and control of pesticide residues in agricultural products across the entire industry chain based on a layered architecture, including an equipment access layer, a data acquisition and transmission layer, a storage and processing layer, a business traceability platform layer, and an application display layer. The specific implementation steps and module operation methods are as follows: 1. System initial deployment and identity coding configuration First, a unique factory_id is assigned as the manufacturer identification code to all partner manufacturers, production bases, processing enterprises, logistics nodes, and supermarket / e-commerce terminals. This code is then written into all data tables in the system as a core index field. Simultaneously, all terminal devices, such as IoT sensors, surveillance cameras, autonomous sampling robots, inspection drones, electronic ear tags, and intelligent oxygenators, are bound and registered. This ensures that each piece of equipment, each production scenario, and each batch of agricultural products is associated with a unique identifier, laying the foundation for subsequent data isolation and traceability.
[0024] 2. Implementation of Multi-Scenario Device Access and Data Acquisition (1) Implementation in the planting industry scenario The agricultural planting base is equipped with multi-parameter soil sensors, environmental sensors, autonomous sampling robots, drones, and satellite remote sensing data access units. Soil sensors collect real-time data on soil pH, conductivity, organic matter, heavy metals, and pesticide residues; environmental sensors continuously monitor field temperature, humidity, light intensity, wind speed, and rainfall. Autonomous sampling robots automatically reach sampling points according to preset navigation routes, collect soil samples, and record encrypted GPS coordinates; satellite remote sensing units monitor pollution sources around the base in real-time, automatically triggering system alerts when data exceeds limits. At key agricultural stages such as tilling, sowing, fertilizing, irrigating, weeding, harvesting, and picking, the system automatically captures images with time watermarks and GPS positioning. All collected data and images are bound to the corresponding farm's factory_id and uploaded to the cloud data center.
[0025] (2) Implementation in the livestock industry scenario The breeding site is equipped with feed testing units, veterinary drug recording units, pen environmental sensors, and livestock electronic ear tag identification units. Environmental sensors collect real-time data on pen temperature and humidity, ammonia, hydrogen sulfide, CO2 concentration, and livestock body temperature imaging. Electronic ear tags record the entire lifecycle information and activity trajectory of livestock and poultry, including birth, vaccination, medication, pen transfer, and slaughter. The system automatically identifies veterinary drug usage records, intelligently determines and pushes withdrawal period reminders, and all breeding testing data, medication records, and environmental data are linked to the breeding base's identification code and uploaded to cloud storage.
[0026] (3) Implementation in fishery scenarios In aquaculture and deep-sea fishing scenarios, water quality sensors, aerator-linked control units, AI inspection robots, patrol drones, and BeiDou positioning units are deployed. The water quality sensors monitor dissolved oxygen, pH, ammonia nitrogen, nitrite, heavy metals, water temperature, salinity, and turbidity around the clock. When dissolved oxygen falls below a safe threshold, the system automatically activates the aerators. The AI inspection robots and drones, equipped with image recognition algorithms, identify aquaculture malfunctions such as dead fish and abnormal fish populations in real time. The BeiDou positioning units collect spatiotemporal information from deep-sea fishing operations, and all fisheries monitoring data and equipment linkage records are linked to corresponding scenario identification codes and uploaded to the cloud data center.
[0027] 3. Implementation of full-process data transmission and process control The system's data acquisition and transmission layer completes full-scene data transmission through IoT gateways and streaming media servers. Sensor data is uniformly transmitted using the MQTT protocol, strictly adhering to the Topic format of factory / {vendor ID} / sensor / {device number} to achieve message isolation across multiple manufacturers and devices, avoiding data mixing and crosstalk. Surveillance cameras push video streams according to national industry standards, recording in H.265 encoding format with a base bitrate of 1.5Mbps. When motion detection mode is enabled, the bitrate automatically drops to 0.8Mbps during periods of no production to reduce data transmission and storage pressure.
[0028] The food processing process implements full-process control: after raw materials enter the factory, they undergo rapid testing for pesticide residues and heavy metals, and a unique raw material batch code is generated upon acceptance; during the feeding process, the raw material batch number is bound to the production line work order number, and process images are automatically captured during key processes such as feeding, cleaning, cutting, sterilization, and packaging. All processing data and image data are bound to the processing plant's identity code, uploaded to the cloud, and trigger blockchain notarization, and a unique product batch code is generated for the finished product.
[0029] During the logistics process, product batch codes are scanned during loading to generate product identification codes. Onboard temperature and humidity sensors and monitoring equipment collect real-time data on logistics trajectory, storage environment, and transportation temperature. Abnormal data is uploaded and alerts are issued in real time. Supermarkets and e-commerce terminals record the quantity of products on shelves, shelf time, and sales records in real time, and enable near-expiration warning functions. All circulation data is linked to the distributor's identification code and uploaded to the cloud data center. Finished product packaging is uniformly printed with traceability QR codes.
[0030] 4. Implementation of Layered Storage and Blockchain-Based Evidence Preservation The system storage and processing layer constructs a cloud data center, including an OSS cloud storage module, a blockchain evidence storage module, and a relational database. All data tables in the relational database are configured with a `factory_id` field to achieve precise data classification and attribution. The OSS cloud storage is dedicated to storing monitoring videos, process images, and inspection documents, implementing refined lifecycle management: videos from 0-30 days use standard storage, videos from 30-180 days are automatically migrated to low-frequency archive storage, and videos are automatically deleted after 180 days, balancing data integrity and storage costs.
[0031] The blockchain-based evidence storage module extracts core traceability data and image file hash values from agricultural activities, processing, distribution, and testing in real time and stores them on the blockchain. The evidence storage data structure has a built-in `time_anchor_type` field to distinguish between three time sources: GPS, NTP, and Local_RTC. For abnormal scenarios such as GPS signal loss or device clock malfunctions, the system automatically completes the geographical location using base station LBS triangulation and a WiFi MAC address database, and uses gateway startup logs to trace back the baseline time. All abnormal logs and evidence storage records are permanently stored to prevent data tampering.
[0032] 5. Implementation of Mid-Platform Business Management and Closed-Loop Anomaly Control The business traceability platform layer establishes a full-chain data association mapping relationship through agricultural base management, food processing management, equipment management, batch management, work order management, and traceability data association modules. This comprehensively binds and associates agricultural product batches, traceability QR codes, sensor data, surveillance videos, circulation records, and testing data. When the batch management module generates batch files, it simultaneously records the production start and end times and the corresponding monitoring equipment number, providing index support for accurate retrieval of traceability videos later.
[0033] The anomaly alarm and work order closed-loop management module monitors various sensor data in real time. When data exceeds limits, equipment malfunctions, or environmental anomalies occur, alarms are automatically triggered, generating a dedicated electronic work order and pushing it to the corresponding management personnel. The work order fully records the anomaly type, occurrence time, location, and recommended handling. After staff complete rectification and re-inspection, they upload relevant documentation, and the system automatically archives and closes the work order, achieving closed-loop management of the entire process from risk discovery, handling, verification, and archiving. In extreme network outage scenarios, data is temporarily stored on the local gateway, and automatically re-uploaded after the equipment returns to normal, ensuring no data loss.
[0034] 6. Implementation of multi-terminal hierarchical display and traceability query The application presentation layer employs a three-tiered, anonymized display strategy to adapt to the needs of different users. Consumers can scan the product traceability QR code to view basic product information, full-cycle sensor data trends, key process screenshots, quality inspection reports, and logistics tracking. They can also replay monitoring videos from the production period and verify blockchain-based evidence. Enterprises can view complete process parameters, operator and equipment information, enabling full-process control of internal production. Regulatory authorities have full access to all original collected data, supporting batch export of traceability files and compliance verification for precise supervision.
[0035] 7. Implementation of end-to-end traceability methods The system operates according to a standardized traceability process: First, the identity codes of manufacturers and equipment are bound together, and terminals in each scenario collect and upload data according to standard protocols; video data is dynamically encoded and stored in layers, and key processes are automatically captured and archived; core data and image hash values are stored on the blockchain to generate unique product batch codes and traceability QR codes; finally, consumers can scan the codes to retrieve the entire chain of traceability data, videos, and verification certificates with one click, completing the credible traceability of agricultural products throughout their entire life cycle.
[0036] The foregoing merely illustrates the technical concept and features of the invention, and its purpose is to enable those skilled in the art to understand the invention and implement it accordingly. It does not limit the scope of protection of this invention. All equivalent changes or modifications made based on the essence of the invention should be included within the scope of protection of this invention.
Claims
1. A whole-chain IoT blockchain traceability system for pesticide and pesticide residues, comprising a device access layer, a data acquisition and transmission layer, a storage and processing layer, a business traceability platform layer, and an application display layer, characterized in that... The device access layer is deployed in agricultural production scenarios, food processing scenarios, logistics nodes, and wholesale and retail scenarios. It is used to connect IoT sensors, surveillance cameras, autonomous sampling robots, and drones. All connected terminals are bound to a unique manufacturer identifier (factory_id) as their identity code. The data acquisition and transmission layer includes an IoT gateway and a streaming media server. The IoT sensors use the MQTT protocol to transmit data, with the MQTT communication topic format set to factory / {manufacturer ID} / sensor / {device number} to achieve message isolation across multiple sites and manufacturers. The surveillance cameras push video streams according to industry and national standards. Each stage of the agricultural production scenario, food processing scenario, logistics node, wholesale and retail scenario, and e-commerce process generates its own identity code as a data index. Business data from each stage is encoded and uploaded... The data is transmitted to the cloud data center. The storage and processing layer constitutes the cloud data center, which includes an OSS cloud storage module, a blockchain evidence storage module, and a relational database. All data tables in the relational database are configured with a factory_id field. The OSS cloud storage module is used to store monitoring videos, process images, and inspection documents. The blockchain evidence storage module is used to store traceability key data and image file hash values on the blockchain for evidence storage. The business traceability platform layer includes an agricultural base management module, a food processing management module, an equipment management module, a batch management module, a work order management module, and a traceability data association module, which are used to establish association mappings between agricultural product batches, QR code indexes, sensor-collected data, monitoring videos, and circulation records. The application display layer includes a consumer QR code traceability module, an enterprise internal management module, and a regulatory department management module, which are used to display traceability information in a differentiated manner to different entities.
2. The pesticide residue whole-chain IoT blockchain traceability system according to claim 1, characterized in that... The device access layer is configured for the planting industry as follows: a multi-parameter soil sensor, an environmental sensor, an autonomous sampling robot, drone image and video acquisition, and a satellite remote sensing data access unit. The multi-parameter soil sensor monitors soil pH, conductivity, organic matter, heavy metals, and pesticide residues; the environmental sensor collects temperature, humidity, light intensity, wind speed, and rainfall; the autonomous sampling robot navigates to the sampling point to collect soil samples and records encrypted GPS coordinates; the satellite remote sensing data access unit monitors surrounding pollution sources and automatically issues warnings when pollution levels exceed standards; and image data with time watermarks and GPS positioning is forcibly collected at agricultural nodes such as tilling, sowing, fertilizing, irrigating, weeding, harvesting, and picking. The image data is bound to a farm identification code and uploaded to the cloud data center.
3. The pesticide residue whole-chain IoT blockchain traceability system according to claim 1, characterized in that... The device access layer is configured for animal husbandry as follows: feed detection unit, veterinary drug recording unit, pen environment sensor, and livestock electronic ear tag recognition unit. The pen environment sensor collects pen temperature and humidity, ammonia, hydrogen sulfide, CO2 concentration, and livestock and poultry body temperature imaging. The electronic ear tag identification unit records the whole life cycle events of livestock and poultry including birth, vaccination, medication, pen transfer and slaughter, as well as the walking trajectories of livestock and poultry; the system is configured with an automatic veterinary drug withdrawal period reminder function, and the data of the livestock breeding detection unit is bound to the farm identity code and uploaded to the cloud data center.
4. The pesticide residue whole-chain IoT blockchain traceability system according to claim 1, characterized in that... The device access layer is configured for the fishery industry with: water quality sensors, aerator linkage control units, AI inspection robots, UAV patrols, and BeiDou positioning units. The water quality sensors monitor dissolved oxygen, pH, ammonia nitrogen, nitrite, heavy metals, water temperature, salinity and turbidity of the water body; when the dissolved oxygen is lower than a threshold, the aerators are automatically triggered to start in linkage; the AI inspection robots and UAVs are equipped with image recognition algorithms to identify abnormal fish groups and dead fish; the BeiDou positioning unit is used for spatiotemporal information collection of pelagic fishing. The data of the detection unit is bound to the farm identity code and uploaded to the cloud data center.
5. The pesticide residue whole-chain IoT blockchain traceability system according to claim 1, characterized in that... The food processing plant link in the data acquisition and transmission layer performs the following management and control: incoming materials are subjected to rapid detection of pesticide residues and heavy metals, and a raw material batch code is generated after acceptance and qualification; the raw material batch number is bound to the production line work order number during feeding; images are automatically captured at key processes of feeding, cleaning, cutting, sterilization and packaging; the processing data is bound to the processing plant identity code and uploaded to the cloud data center, and blockchain evidence storage is triggered, and a corresponding batch code is generated for the output product. The distributor link collects information on the incoming and outgoing of agricultural products, storage environment and logistics trajectories; the logistics link generates a commodity identity code by scanning the batch code during loading, the vehicle is equipped with real-time monitoring and temperature sensors and provided with an abnormality function, and the logistics link data is bound to the logistics identity code and synchronized to the cloud server. The supermarket / e-commerce terminal scans the commodity barcode to record the quantity of products on shelves, the time of being on shelves and the sales quantity, and is provided with an early warning function for products approaching the expiration date, and the circulation information is bound to the distributor identity code and uploaded to the cloud data center; the supermarket / e-commerce terminal records the product shelfing and sales accounts, and a unified traceability QR code is printed on the outer package of the finished product.
6. The pesticide residue whole-chain IoT blockchain traceability system according to claim 1, characterized in that... The OSS cloud storage module in the storage and processing layer is configured with a video storage control strategy: surveillance videos are encoded in H.265, the base bitrate is set to 1.5 Mbps, the motion detection recording mode is enabled, the bitrate is automatically reduced to 0.8 Mbps during unattended production hours, and a lifecycle management rule is configured: videos of 0 to 30 days are stored in standard storage, videos of 30 to 180 days are automatically migrated to low-frequency archive storage, and video files are automatically deleted after the storage duration reaches 180 days. The batch management module records the start and end time of batch production and the corresponding camera number when generating the agricultural product batch file; when a consumer scans the code for traceability, the system selectively retrieves and plays back the surveillance video clips of the corresponding period from the OSS cloud storage according to the full-chain identity codes of the agricultural base, food processing plant, distributor, logistics company and supermarket / e-commerce recorded in the traceability QR code, with the batch production time range and camera number as the basis.
7. The pesticide residue whole-chain IoT blockchain traceability system according to claim 1, characterized in that... The business traceability platform also includes an anomaly alarm and work order closed-loop management module. When the sensor monitoring value exceeds the preset safety threshold, an alarm is automatically triggered and an electronic work order is generated. The work order is pushed to the production management personnel of the corresponding edge. The work order records the anomaly type, occurrence time, location number, and handling suggestions. After the staff uploads the rectification record and re-inspection report, the system archives and closes the work order. In extreme cases, the data is temporarily stored in the local gateway or the operator is required to force recording to troubleshoot the equipment failure and then upload it in time. When the time-space reference is distorted (GPS signal loss, equipment clock disorder), if the GPS coordinates are lost, the system automatically uses base station LBS triangulation positioning or WiFi MAC address database positioning and automatically identifies the manufacturer ID as the geographical location marker. If the equipment clock is disordered, the time source is anchored when storing evidence through the blockchain. The data structure of the blockchain evidence clearly writes the time_anchor_type field (values: GPS, NTP, Local_RTC). If Local_RTC is used, the evidence content includes the gateway device number. The reference time at that time can be traced back through the power-on log of the gateway. The entire process log of the abnormal event is permanently retained.
8. The pesticide residue whole-industry chain Internet of Things blockchain traceability system according to claim 1, characterized in that... The consumer QR code traceability module in the application presentation layer is configured to perform the following functions: display basic product information, full-cycle sensor data trend curves, key process screenshot sets, quality inspection reports, and logistics trajectories; provide a channel for playback of complete monitoring videos on the production date; and provide an entry point for verifying blockchain-based evidence certificates.
9. The pesticide residue whole-chain IoT blockchain traceability system according to claim 1, characterized in that... The application presentation layer is equipped with a hierarchical desensitization display strategy. The consumer scanning traceability terminal only displays public information and test results, hiding sensitive parameters of the manufacturer's process, personnel, and equipment. The enterprise's internal management terminal displays complete process parameters, operator and equipment number information. The regulatory department's management terminal opens all original collected data and supports the export of traceability files.
10. The application method of the pesticide residue whole-industry chain Internet of Things blockchain traceability system according to claim 1, characterized in that... Includes the following steps: S1. Assign a unique factory_id as an identity code to the manufacturers accessing the platform, and bind the identity code to all IoT terminals, planting plots, livestock and breeding units, and agricultural product batches. S2: IoT sensors and surveillance cameras collect raw data from farms and food processing plants; sensor data is uploaded via MQTT protocol in the format of factory / {manufacturer ID} / sensor / {device number}; business data from each link of farms, food processing plants, distributors, supermarkets / e-commerce are linked to corresponding QR code indexes and uploaded to the cloud data center. S3: The video captured by the surveillance camera is recorded using H.265 encoding, with motion detection enabled to dynamically adjust the bitrate, and hierarchical storage is performed according to the OSS lifecycle strategy; S4. Automatic or manual triggering of image capture at agricultural nodes and key food processing steps, with image files and sensor data snapshots linked to the corresponding agricultural product batches; S5. Extract key data and hash values of image files from the batch and write them to the blockchain to complete the evidence storage. S6. Generate a unique batch code for agricultural products and record the start and end times of production for that batch, as well as the corresponding camera identifier. S7. Consumers scan the finished product traceability QR code, and the cloud data center retrieves and displays the corresponding sensor data, process screenshots, test reports, and monitoring videos of the production date and time period based on the batch code.
Citation Information
Patent Citations
A vegetable quality safety traceability system based on the Internet of Things and its use method
CN118096186B
Agricultural product traceability management system
CN119624478A
