Agricultural full-chain data block chain traceability and production optimization feedback system based on oracle machine verification

The blockchain-based traceability and production optimization feedback system for the entire agricultural data chain, verified by oracles, solves the problems of low data credibility and delayed decision-making in agricultural traceability systems. It achieves a reliable closed-loop management of the entire process, improving the reliability of agricultural product quality traceability and the accuracy of production decisions.

CN121707586APending Publication Date: 2026-03-20SICHUAN MAIGU IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511945642.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing agricultural traceability systems suffer from low data reliability, low traceability efficiency, and insufficient decision-making basis, resulting in inaccurate traceability of agricultural product quality, delayed production decisions, and difficulty in achieving correlation analysis and feedback optimization of data across the entire chain.

Method used

The agricultural full-chain data blockchain traceability and production optimization feedback system, based on oracle verification, is adopted. Through multi-source data access module, traceability map management module, intelligent decision-making module and distributed oracle cluster, it realizes reliable data collection, cross-link verification and intelligent decision-making, forming a closed-loop management of the whole process.

Benefits of technology

It improves the reliability of agricultural product quality traceability and the accuracy of production decisions, and realizes a reliable closed-loop management of the entire process from data collection to intelligent decision-making, meeting the needs of modern agriculture for data authenticity, traceability accuracy and decision-making timeliness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121707586A_ABST
    Figure CN121707586A_ABST
Patent Text Reader

Abstract

The invention discloses an agricultural full-chain data block chain traceability and production optimization feedback system based on oracle machine verification. The system comprises a multi-source data access module, a traceability graph management module, an intelligent decision module, a data storage module and a distributed oracle machine cluster. According to the invention, the whole process from credible collection of agricultural data to intelligent decision feedback is realized through combination of the Internet of Things equipment and the block chain technology; a distributed oracle cluster is adopted to verify multi-source data and remove false information, the authenticity of uplink data is guaranteed, a cross-link data association relationship is constructed by using a semantic map, the traceability query efficiency and the problem positioning precision are improved, the uplink data are automatically analyzed through an intelligent contract, and a production optimization instruction is generated. The problems of low data credibility, disjunction between traceability and production and slow optimization response in traditional agricultural traceability are solved, the scene characteristics of full-chain data dispersion and complexity are effectively dealt with, and the reliability of agricultural product quality traceability and the accuracy of production decision are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of agricultural digital technology, specifically relating to an agricultural full-chain data blockchain traceability and production optimization feedback system based on oracle verification. Background Technology

[0002] Agricultural product quality and safety, along with production efficiency, are core concerns for modern agricultural development. Their management effectiveness directly impacts food safety, resource utilization efficiency, and agricultural economic benefits. Currently, the industry primarily employs centralized database traceability systems, simple blockchain-based evidence storage systems, and traditional experience-based decision-making models. However, these systems generally suffer from insufficient data credibility, isolated traceability information, and delayed decision feedback. Centralized database traceability systems rely on a single entity to maintain data, posing a risk of tampering, and inconsistent data standards across different stages create information silos. While simple blockchain-based evidence storage systems achieve data on-chain, they lack a reliable verification mechanism for the original off-chain data, failing to guarantee the authenticity of the data source. Traditional experience-based decision-making models rely on manual judgment, resulting in slow response times and a lack of precise quantitative evidence, making it difficult to achieve refined management of the production process.

[0003] At the level of traceability and production coordination, existing systems generally adopt an architecture that separates data collection from production decision-making, failing to establish a mechanism for correlation analysis of data across the entire chain. Traceability data is only used for post-event accountability and fails to be transformed into a basis for production optimization decisions; production control decisions lack real-time and reliable data support, leading to a disconnect between production strategies and actual needs. Furthermore, traditional systems lack effective feedback optimization mechanisms and cannot continuously iterate decision-making models based on execution results, causing the systems to remain in a static operating state for a long time, making it difficult to adapt to the dynamic changes in the agricultural production environment.

[0004] In summary, existing agricultural data management and production decision-making systems are no longer sufficient to meet the multiple demands of modern agriculture for data reliability, traceability accuracy, and intelligent decision-making, both in terms of technical architecture and business logic. There is an urgent need to overcome key technical bottlenecks such as reliable off-chain data collection, cross-link data correlation analysis, intelligent decision-making, and closed-loop feedback. The goal is to construct a blockchain-based agricultural data traceability and production optimization feedback system that integrates reliable data collection, intelligent traceability analysis, and adaptive production optimization. This system will improve the reliability of agricultural product quality traceability and the accuracy of production decisions, thereby promoting the digital and intelligent transformation and upgrading of the agricultural industry. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of existing technologies, such as low credibility of agricultural traceability data, lagging production decisions, and disconnect between traceability and control. It provides an agricultural full-chain data blockchain traceability and production optimization feedback system based on oracle verification, realizing full-process automated closed-loop and precise control from data collection and credible traceability to intelligent decision-making.

[0006] This application provides an agricultural full-chain data blockchain traceability and production optimization feedback system based on oracle verification, including a multi-source data access module, a traceability graph management module, an intelligent decision-making module, a data storage module, and a distributed oracle cluster;

[0007] Furthermore, the multi-source data access module is used to collect raw data from the entire chain through IoT devices deployed in the planting, processing, logistics, and sales stages, and to preprocess the raw data using edge computing nodes to generate data packets to be verified. Preferably, the distributed oracle cluster is connected to the multi-source data access module and is used to perform multi-node consensus and authenticity verification on the data packets to be verified, and to submit the verified data to the blockchain network for trusted storage. The distributed oracle cluster processes the data packets to be verified from the multi-source data access module through a predefined consensus algorithm, performs cross-verification on the same event data from different data sources, and uses a reputation model to evaluate the performance and assign weights to oracle nodes in order to dynamically remove abnormal oracle nodes and false data.

[0008] Preferably, the reputation model assigns an initial reputation score to each verification node during the node initialization phase of the oracle using a predefined consensus algorithm, quantifying the reputation into voting weights; and dynamically updates the node reputation through cross-validation results of multi-source data, using a sliding time window to remove nodes marked as abnormal, and establishing a reputation model based on the node performance evaluation and data packets after dynamic weight allocation based on the quantified reputation. Preferably, the traceability graph management module is connected to the blockchain network, constructs a cross-stage semantic traceability graph using trusted evidence data verified by a distributed oracle cluster, and provides traceability query and problem location services. Preferably, the intelligent decision-making module is deployed on the blockchain network to automatically parse on-chain data through smart contracts and generate optimization instructions for agricultural production stages. The execution results of the intelligent decision-making module are collected by the multi-source data access module as a new data source, verified on-chain by the distributed oracle cluster, and then fed back to the model optimization unit of the intelligent decision-making module, forming a closed-loop feedback for production optimization. Preferably, the data storage module adopts a hybrid on-chain and off-chain storage mode, used to store blockchain transaction hashes and key indexes on the blockchain, while storing metadata of the semantic traceability graph and large-scale raw data collected by IoT devices in the off-chain distributed storage system.

[0009] The beneficial effects of this invention are as follows:

[0010] This invention solves the problems of low traceability efficiency and insufficient decision-making basis caused by the dispersed data sources and low credibility in traditional agricultural traceability by using a distributed oracle verification and full-chain data collaboration processing method. It realizes the full-process credible traceability and precision production of agricultural products from planting to sales through a closed-loop management mechanism of data collection, credible verification and intelligent decision-making, which meets the needs of modern agriculture for data authenticity, traceability accuracy and timely decision-making.

[0011] By integrating multi-source data access and oracle verification mechanisms, the trustworthy processing of agricultural data is achieved. Combined with the synergistic effect of semantic traceability graphs and smart contracts, a linkage mechanism between trustworthy data and intelligent decision-making is formed, solving the problems of data silos and decision lag in traditional traceability systems. This significantly improves the reliability of agricultural product quality traceability and the accuracy of production decisions. Attached Figure Description

[0012] To better understand and implement this application, the technical solution is described in detail below with reference to the accompanying drawings.

[0013] Figure 1 A flowchart illustrating a blockchain-based agricultural data traceability and production optimization feedback system based on oracle verification, provided for this application;

[0014] Figure 2 This application provides a multi-source data access module for an agricultural full-chain data blockchain traceability and production optimization feedback system based on oracle verification;

[0015] Figure 3 A flowchart illustrating the distributed oracle cluster of an agricultural full-chain data blockchain traceability and production optimization feedback system based on oracle verification, provided for this application; Detailed Implementation

[0016] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, exemplary embodiments will be described in detail below, examples of which are illustrated in the accompanying drawings. In the following description relating to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of methods and systems consistent with some aspects of this application as detailed in the appended claims.

[0017] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0018] The following detailed description of the specific implementation methods, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided in detail.

[0019] Example 1

[0020] Please see Figures 1-3 This embodiment provides an agricultural end-to-end data blockchain traceability and production optimization feedback system based on oracle verification, including a multi-source data access module, a traceability graph management module, an intelligent decision-making module, a data storage module, and a distributed oracle cluster. The multi-source data access module collects raw data from the entire chain through IoT devices deployed in planting, processing, logistics, and sales. The distributed oracle cluster is connected to the multi-source data access module and is responsible for data verification and trusted on-chain uploading. The traceability graph management module constructs a semantic traceability graph based on trusted on-chain data. The intelligent decision-making module implements production optimization decisions through smart contracts. The data storage module adopts a hybrid on-chain and off-chain storage architecture.

[0021] This embodiment solves the problems of low data credibility, poor traceability efficiency, and lagging production decisions in traditional agricultural traceability by using an agricultural full-chain data blockchain traceability system that includes a multi-source data access module, a distributed oracle cluster, a traceability graph management module, an intelligent decision-making module, and a data storage module. It achieves a trusted closed-loop management of the entire process from data collection to intelligent decision-making.

[0022] The data acquisition unit of the multi-source data access module adopts a multi-protocol compatible architecture, supporting multiple industrial communication protocols such as Modbus, LoRaWAN, and NB-IoT, with a data acquisition success rate of 99.2%. The edge preprocessing unit is equipped with a domestically produced encryption chip, supports the SM4 national cryptographic algorithm, and controls the data processing latency to within 150ms. The data packets to be verified generated by the multi-source data access module adopt a unified JSON-LD semantic data format, containing triple verification information of timestamp, device fingerprint, and data signature.

[0023] Furthermore, the multi-protocol compatible architecture addresses the issue of inconsistent communication standards for agricultural IoT devices, achieving a higher data acquisition success rate. The edge preprocessing unit, equipped with a domestically produced encryption chip, mitigates security risks during data transmission, employing the SM4 national cryptographic algorithm to ensure data encryption within a 150ms delay. The use of the JSON-LD semantic data format, incorporating triple verification information, solves the problems of chaotic data formats and difficulty in tracing data sources, laying the foundation for subsequent trusted verification.

[0024] Specifically, the implementation process of the SM4 national cryptographic algorithm is as follows:

[0025] The national cryptographic chip configured in the edge preprocessing unit has a built-in SM4 algorithm encryption engine. After the original data has been cleaned and standardized, the encryption engine performs the following steps:

[0026] Key generation and distribution phase: The system adopts a key derivation mechanism based on Physically Unclonable Functions (PUF) to generate a unique SM4 encryption key for each edge computing node. The core parameters are defined as follows:

[0027] Key length: (Conforms to the SM4 algorithm standard key length)

[0028] Key derivation method: ,in As a unique identifier for the node, As the initial seed of the system

[0029] Key distribution rules: Keys will be distributed via an end-to-end secure channel (such as a TLS 1.3 encrypted channel). After being distributed to node i, all key copies in the distribution chain are immediately destroyed to ensure that the key is stored only in the secure storage area of ​​the node's built-in national cryptographic chip;

[0030] Data grouping and encryption stage: Grouping, padding, and encryption operations are performed on the preprocessed structured data. The specific process and parameters are as follows:

[0031] Data grouping: Standardized data is grouped into fixed-length groups, where the group length is... ;

[0032] Data padding: If the last group of data is less than 16 bytes long, the PKCS#7 padding mechanism is used, and the padding byte value is equal to the number of bytes to be padded.

[0033] Encryption mode and rounds: The ECB (Electronic Codebook) mode using the SM4 algorithm is employed, and encryption is performed on each block. Wheel nonlinear transformation;

[0034] Single-round transformation operation: Each round of transformation executes the following three steps in sequence:

[0035] XOR operation: Performs a bitwise XOR operation between the current block data and the round key, i.e.

[0036] ( (This is the round key for the i-th round, and there are a total of 32 round keys)

[0037] S-box permutation: S-box lookup permutation is performed on each of the four 32-bit words in the XOR result to achieve non-linear obfuscation. (J=1, 2, 3, 4, S_BOX is the standard 8x8 permutation box of the SM4 algorithm)

[0038] Linear transformation: Perform a linear transformation L on the output of the S-box, i.e.

[0039] Integrity verification phase: A hash check is added to the encrypted data, forming a double protection structure of ciphertext + hash, as defined below:

[0040] Hash algorithm: The SHA-256 cryptographic hash function is used to generate a 256-bit hash value;

[0041] Hash calculation object: Calculate the hash value of the encrypted complete ciphertext C (including all block ciphertexts), that is...

[0042] The data packet to be verified consists of: Where C is the ciphertext data encrypted with SM4, and H is the SHA-256 hash value corresponding to the ciphertext. The receiver needs to recalculate H′=SHA-256(C) and compare H with H′ to verify the integrity of the data.

[0043] Real-time performance optimization phase: The encryption engine reduces latency through a hardware-level parallel architecture. The core performance parameters and optimization mechanisms are as follows:

[0044] Parallel processing capability: Employs a 4-way parallel pipeline architecture, capable of processing a maximum number of data packets simultaneously. ,Right now It can simultaneously enter the encryption process;

[0045] Delay control metrics: Single encryption delay: Time to complete encryption of a single block (Total time from block input to ciphertext output)

[0046] End-to-end total latency: Data preprocessing latency With encryption delay The sum satisfies

[0047] Optimized protection mechanism: The hardware acceleration module built into the national cryptographic chip effectively breaks through the computing power bottleneck of pure software implementation;

[0048] This implementation process uses standardized encryption based on the SM4 national cryptographic algorithm and hardware-level acceleration to ensure that the entire process of agricultural IoT data collection, processing, and transmission at edge nodes meets the requirements of the Cybersecurity Classified Protection 2.0 standard, providing a data foundation that complies with national security norms for subsequent blockchain evidence storage;

[0049] Preferably, the distributed oracle cluster adopts a predefined consensus algorithm, sets up 21 verification nodes, and each data packet needs to obtain consensus confirmation from no less than 15 nodes before it can be uploaded to the chain; the node reputation model introduces a sliding time window evaluation mechanism to dynamically adjust the node weight, and malicious nodes can be identified and removed within 3 verification cycles; the verification process adopts multi-party secure computation technology, the verification time of a single data packet does not exceed 2 seconds, and the system throughput reaches 500 TPS;

[0050] Specifically, by using the predefined consensus algorithm and configuring 21 verification nodes, the system addresses the issue of insufficient credibility in traditional single-point verification, ensuring that each data packet receives consensus confirmation from no fewer than 15 nodes, thus achieving highly reliable data upload. Furthermore, by introducing a sliding time window reputation assessment mechanism, the system solves the challenge of monitoring dynamic changes in node behavior, enabling rapid identification and removal of malicious nodes within three verification cycles. Finally, by employing multi-party secure computation technology, the system addresses data privacy protection during verification, ensuring that the verification time for a single data packet does not exceed 2 seconds while achieving a system throughput of 500 TPS.

[0051] Specifically, the implementation process of the predefined consensus algorithm is as follows:

[0052] System configuration during node initialization and weight allocation phase There are 1 verification node, and the initial reputation score of each node i is... Initial weights Weighting formula:

[0053] Where t represents the consensus round.

[0054] Data verification task distribution phase master node (according to formula) (Selected by polling + 1) Decompose the data packet D to be verified into a set of verification tasks. Distribute the data to each verification node via a secure channel, and start timer τ, setting a timeout threshold.

[0055] During the multi-source data cross-validation phase, each validation node performs the following rules to judge the received agricultural data:

[0056] Environmental data consistency verification: ,

[0057] like If so, then mark the temperature anomaly flag F_temp=1;

[0058] Verification of spatiotemporal continuity:

[0059] Calculate the distance difference between adjacent GPS points ,

[0060] like If so, then mark the trajectory anomaly flag F_gps=1;

[0061] Device fingerprint matching verification:

[0062] Verify whether the digital signature Sig matches the registered fingerprint FP.

[0063] like Then, mark the device exception flag F_dev=1;

[0064] During the consensus decision-making and weighted voting phase, the system collects the verification results from each node and calculates the total score according to the weights.

[0065] Weighting based on agreement:

[0066] Total negative weight:

[0067] Total weight:

[0068] Consensus decision-making rules:

[0069] like (α=0.714, corresponding to 15 / 21), immediately pack the data and put it on the chain;

[0070] like (β=0.333, corresponding to 7 / 21), initiate the secondary verification mechanism;

[0071] If none of the above conditions are met, a weighted majority voting mechanism will be used to re-determine the decision.

[0072] During the dynamic reputation update phase, the reputation value of each node is updated based on the consensus result:

[0073] Reputation update formula: If the verification result is "verification correct", then ,in ;

[0074] If the verification result is "verification error", then ,in ;

[0075] If the verification result is "response timed out", then ,in ;

[0076] The abnormal node handling mechanism adopts a sliding time window evaluation mechanism, which counts the performance of a node in the most recent K=100 verifications: if node i meets any of the following conditions, it is marked as an abnormal node:

[0077] Within three consecutive cycles, each cycle's All less than ;

[0078] Error rate Greater than (in );

[0079] Average response time If the time exceeds 1.5 seconds, it meets the judgment requirements.

[0080] Abnormal nodes enter the observation period. If they do not improve after three consecutive verification cycles, they are removed from the verification node set.

[0081] This implementation process, through a quantified weighting formula, multi-dimensional cross-validation rules, and a dynamic reputation mechanism, ensures a system throughput of 500 TPS while controlling the single data packet verification time to within 2 seconds. It also improves the accuracy of malicious node identification to over 95%, effectively guaranteeing the credibility of agricultural data on-chain and the overall stability of the system.

[0082] Preferably, the graph construction unit of the source tracing graph management module uses the Neo4j graph database, supports the Cypher query language, and the constructed semantic association network contains no less than 50 entity types and 200 relation attributes; the intelligent query unit adopts a bidirectional breadth-first search algorithm, and in a graph with tens of millions of nodes, 95% of query requests have a response time of less than 200 milliseconds; the visualization component supports cross-platform WebGL rendering and can generate a complete source tracing path graph containing spatiotemporal trajectories in real time;

[0083] Specifically, by employing the Neo4j graph database and Cypher query language, the system addresses the storage and query efficiency issues of complex relationships, constructing a semantic association network containing 50 entity types and 200 relational attributes. Furthermore, by adopting a bidirectional breadth-first search algorithm, it overcomes the performance bottleneck of large-scale graph queries, achieving a 95% return rate for query requests within 200 milliseconds. Finally, by supporting cross-platform visualization components with WebGL, it addresses the issue of unintuitive display of tracing results, generating a complete tracing path map containing spatiotemporal trajectories in real time.

[0084] Preferably, the contract logic unit of the intelligent decision-making module encapsulates a production optimization rule base based on deep reinforcement learning, containing 128 feature dimensions and 15 decision outputs; the instruction triggering unit supports a complex event processing engine, capable of simultaneously monitoring 32 data streams and identifying 78 event patterns; the instruction generation unit adopts an online learning mechanism, shortening the model update cycle from the traditional 24 hours to 2 hours; and the model optimization unit of the intelligent decision-making module achieves a decision accuracy rate of 91.5% by iteratively updating the model parameters in the production optimization rule base.

[0085] Specifically, by encapsulating a production optimization rule base based on deep reinforcement learning, the problem of poor adaptability of traditional rule bases is solved, enabling intelligent analysis of 128 feature dimensions and outputting 15 accurate decisions; by using an instruction triggering unit that supports complex event processing, the challenge of real-time monitoring of multi-source data streams is solved, enabling simultaneous monitoring of 32 data streams and identification of 78 event patterns; by adopting an online learning mechanism in conjunction with the aforementioned production optimization rule base, the problem of model update lag is solved, shortening the update cycle from 24 hours to 2 hours and achieving a decision accuracy rate of 91.5%.

[0086] Specifically, the implementation process of the production optimization rule base is as follows:

[0087] Data preparation and feature preprocessing stage: Preprocessing is performed on the production data with 128 feature dimensions to provide input for model training. The core operations and parameters are as follows:

[0088] Feature dimension definition: Input feature set F={f1,f2,...,f128}, covering multi-dimensional data such as environmental parameters, equipment status, and production indicators;

[0089] Feature standardization: Perform Z-score standardization on each feature, i.e. in Features The mean, The standard deviation is used to ensure that the eigenvalues ​​are of the same order of magnitude.

[0090] Data Batching: The preprocessed data is divided into fixed batches, with a batch size of B=32 (balancing computational efficiency and gradient stability), forming training data blocks.

[0091] Model parameter initialization phase: Initialize the parameters of the deep reinforcement learning model in the production optimization rule base. The parameter range and structure are defined as follows:

[0092] Model parameter set: (n is the total number of parameters in the model, which is determined by the number of layers and nodes in the neural network.)

[0093] Initialization method: Xavier initialization is used, and the initial parameter values ​​follow a uniform distribution.

[0094] in,

[0095] Initial learning rate: Set the base learning rate η0 = 0.01 for the initial parameter update;

[0096] Stochastic gradient descent parameter iteration phase: The model parameters are iteratively optimized using the stochastic gradient descent algorithm. The core steps and formulas are as follows:

[0097] Loss function calculation: for batch data Calculate the loss between the predicted value and the actual optimal value. Mean squared error loss is used:

[0098]

[0099] Gradient calculation: Solving the loss function with respect to parameters The partial derivatives are used to obtain the stochastic gradient.

[0100] Parameter update: Update the parameters according to the gradient descent direction, using the following formula: Where t is the number of iterations, and the learning rate η(t) adopts a decay strategy: (λ=0.001 is the attenuation coefficient)

[0101] Iteration termination condition: When the change in loss value over 5 consecutive batches is... When this happens, pause the current batch iteration;

[0102] Online learning and model update phase: The model is dynamically updated by combining online learning mechanisms. The core mechanisms and periodic parameters are as follows:

[0103] Real-time data access: The instruction generation unit extracts new samples from 32 monitoring data streams every 10 minutes to form an online updated dataset. ;

[0104] Update trigger condition: when When the cumulative sample size reaches N=1024, a parameter update is initiated (or a mandatory update is performed every 2 hours, taking the first result that meets the conditions).

[0105] Incremental update strategy: Use a warm start method to load the current optimal parameters. ,based on Perform 10 rounds of stochastic gradient descent iterations to generate new parameters. This avoids the high time consumption of full retraining;

[0106] Model replacement rule: If the new model improves the decision accuracy on the validation set by ≥0.5%, then replace the old model; otherwise, retain the old model and record the difference samples for the next round of optimization.

[0107] Performance evaluation and convergence guarantee phase: Continuous evaluation ensures the model's decision accuracy remains stable above 91.5%. The core evaluation metrics and mechanisms are as follows:

[0108] Accuracy calculation: in To determine the correct sample size, This represents the total number of validation samples;

[0109] Evaluation cycle: 200 independent samples are extracted from the production data every hour as a validation set to calculate the real-time accuracy;

[0110] Convergence guarantee: If the accuracy is below 90% for two consecutive evaluations, the learning rate η(t) will be automatically reduced to 50% of the current value, and the number of iterations will be increased to 20. If the accuracy recovers to above 91%, the original learning rate strategy will be restored.

[0111] Outlier sample handling: Incorrect decision samples are marked as difficult examples and stored separately in a difficult example database. Every 24 hours targeting Perform a reinforcement training to improve the model's ability to handle edge cases.

[0112] Preferably, the on-chain portion of the data storage module uses the Fabric consortium blockchain, with a single block size of 2MB and a block interval of 2 seconds; the off-chain portion uses IPFS cluster storage, which achieves data deduplication through content addressing, improving storage efficiency by 40%; the data security mechanism adopts a layered encryption strategy, and the data granularity that users with different permission levels can access is accurate to the field level.

[0113] Specifically, by adopting the Fabric consortium blockchain and configuring a 2MB block size, the bottleneck of blockchain storage performance is solved, and the block interval is controlled within 2 seconds while ensuring security; by adopting IPFS cluster storage and content addressing mechanism, the problem of high cost of storing massive agricultural data is solved, achieving a 40% improvement in storage efficiency; and by implementing a layered encryption strategy, the problem of coarse data access control is solved, achieving field-level data access control.

[0114] This embodiment is applied to the whole-chain quality control of a key tea enterprise in a province, covering 5,000 mu of planting base, 2 processing plants, 15 logistics lines and 200 sales terminals. The system is required to return the complete traceability path within 5 seconds after receiving the traceability request, and the production optimization instruction generation time shall not exceed 3 seconds.

[0115] The system implementation process specifically includes:

[0116] During the equipment deployment phase, 285 planting environment sensors, 42 RFID readers / writers for the processing line, 156 logistics GPS terminals, and 200 sales POS terminals were configured in the multi-source data access module. All equipment completed edge computing node deployment and key distribution.

[0117] During the data collection and verification phase, the multi-source data access module collects data from the entire chain at 5-minute intervals, and the edge preprocessing unit completes data cleaning, encryption, and standardization within 150ms to generate a data packet to be verified. The predefined consensus algorithm of the 21 nodes of the distributed oracle cluster performs parallel verification of the data packet to be verified, completes consensus confirmation within 2 seconds, and uploads the trusted data to the chain.

[0118] During the traceability graph construction phase, the traceability graph management module monitors on-chain data updates in real time and automatically constructs a semantic traceability graph based on the Neo4j graph database, generating a total of 520,000 entity nodes and 1.83 million relationship edges. When a consumer scans a code to trace the source, the intelligent query unit returns a complete traceability path containing 28 key nodes, such as the pH value of the planting soil, the temperature and humidity of the processing environment, and the logistics and transportation trajectory, within 186 milliseconds.

[0119] During the intelligent decision-making execution phase, the contract logic unit of the intelligent decision-making module analyzes on-chain data such as soil moisture and weather forecasts in real time at the planting base. When it is identified that the probability of rainfall in the next 48 hours is less than 30% and the soil moisture content reaches the threshold, the instruction triggering unit is automatically activated. The instruction generation unit generates a precise irrigation plan within 2.8 seconds, which is then executed through the intelligent irrigation system deployed in the field, saving 23% of water per irrigation.

[0120] During the feedback optimization phase, soil moisture data after irrigation is collected by the multi-source data access module. After being verified and uploaded to the blockchain by the distributed oracle cluster, the model optimization unit of the intelligent decision-making module iteratively updates the model parameters in the production optimization rule base, thereby improving the accuracy of subsequent decisions from 91.5% to 93.2%.

[0121] This embodiment successfully achieved an average traceability response time of 3.2 seconds, a production optimization instruction generation time of 2.8 seconds, an irrigation water efficiency improvement of 23%, and a model self-learning cycle shortened to 2 hours, significantly improving the reliability of tea product quality traceability and the accuracy of production decisions.

[0122] Example 2

[0123] Please see Figures 1-3This embodiment mainly describes the application of the system in the fruit industry. The difference from Embodiment 1 is that the oracle verification mechanism is optimized in response to the perishable nature of fruit. By setting multi-source data cross-validation rules (requiring at least 3 independent sensor data deviations ≤ ±0.3℃) and a timeliness-based graded verification strategy (harvest data verification time limit ≤ 2 minutes), the reliable data collection problem with high real-time requirements and large quality fluctuations in the fruit industry chain is solved. At the same time, a correlation model between sugar content, temperature and shelf life is constructed to achieve dynamic optimization of the entire chain. Ultimately, the data verification accuracy rate is increased to 98.7%, significantly reducing the post-harvest loss rate of fruit.

[0124] The system implementation process specifically includes:

[0125] During the equipment deployment phase, 320 orchard environment sensors (including sensors for temperature, humidity, light intensity and fruit sugar content) were configured in the multi-source data access module, along with 38 RFID readers for the post-harvest processing line, 95 temperature and humidity terminals for cold chain logistics, and 280 traceability devices for sales terminals. All devices completed edge computing node deployment and national cryptographic algorithm key distribution.

[0126] During the data acquisition and verification phase, the multi-source data access module collects data from the entire chain at 3-minute intervals. The edge preprocessing unit completes data cleaning, SM4 encryption, and standardization within 120ms, generating data packets to be verified. The 21 nodes of the distributed oracle cluster use an improved BFT consensus algorithm to verify the data packets in parallel, completing multi-source cross-verification within 1.5 seconds (requiring at least 3 independent sensor data deviations ≤ ±0.3℃) and uploading the trusted data to the chain.

[0127] During the traceability graph construction phase, the traceability graph management module monitors on-chain data updates in real time and constructs a semantic traceability graph based on the Neo4j graph database, which includes orchard blocks, harvest batches, cold chain segments, and sales points. A total of 610,000 entity nodes and 2.25 million relationship edges have been generated. When a consumer scans a code, the intelligent query unit returns a complete traceability path containing 35 key nodes, such as orchard sunshine duration, harvest time, and cold chain temperature and humidity curves, within 158 milliseconds using a bidirectional breadth-first search algorithm.

[0128] During the intelligent decision-making execution phase, the contract logic unit of the intelligent decision-making module analyzes orchard environmental data and market demand in real time. When it is identified that the sugar content of a certain batch of citrus has reached 13.5% and the temperature is expected to exceed 38℃ in the next 48 hours, the instruction triggering unit is automatically activated. The instruction generation unit generates an emergency harvesting plan within 2.1 seconds, which is executed by the intelligent sorting system deployed in the orchard, reducing quality loss by 12%.

[0129] During the feedback optimization phase, post-harvest fruit quality data is collected by the multi-source data access module. After being verified on the blockchain by the distributed oracle cluster (the verification time for harvested data is ≤2 minutes), the model optimization unit of the intelligent decision-making module uses the stochastic gradient descent algorithm to update the correlation model between sugar content, temperature, and shelf life, thereby increasing the accuracy of harvesting decisions from 92.3% to 95.1%.

[0130] This embodiment successfully achieved an average traceability response time of 2.4 seconds, a quality control instruction generation time of 2.1 seconds, a post-harvest loss rate reduction of 3.2 percentage points, and a model self-learning cycle shortened to 1.5 hours, significantly improving the real-time performance of the entire fruit product traceability chain and the accuracy of quality decision-making.

[0131] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A blockchain-based agricultural full-chain data traceability and production optimization feedback system based on oracle verification, characterized in that: It includes a multi-source data access module, a source tracing map management module, an intelligent decision-making module, a data storage module, and a distributed oracle cluster; The multi-source data access module is used to collect raw data from the entire chain through IoT devices deployed in the planting, processing, logistics and sales links, and to preprocess the raw data using edge computing nodes to generate data packets to be verified. The distributed oracle cluster is connected to the multi-source data access module and is used to perform multi-node consensus and authenticity verification on the data packets to be verified, and submit the verified data to the blockchain network to complete trusted storage. The traceability graph management module is connected to the blockchain network. It constructs a cross-stage semantic traceability graph using trusted evidence data verified by a distributed oracle cluster, and provides traceability query and problem location services. The intelligent decision-making module is deployed on the blockchain network and is used to automatically parse on-chain data through smart contracts and generate optimization instructions for agricultural production processes. The execution result of the intelligent decision-making module is collected by the multi-source data access module as a new data source, and after being verified on the chain by the distributed oracle cluster, it is fed back to the model optimization unit of the intelligent decision-making module. The data storage module adopts a hybrid on-chain and off-chain storage mode, which is used to store blockchain transaction hashes and key indexes on the blockchain, while storing metadata of semantic traceability graphs and large-scale raw data collected by IoT devices in the off-chain distributed storage system.

2. The agricultural full-chain data blockchain traceability and production optimization feedback system based on oracle verification as described in claim 1, characterized in that: The multi-source data access module includes a data acquisition unit and an edge preprocessing unit; The data acquisition unit is configured to acquire heterogeneous raw data from planting environment sensors, processing line readers, logistics vehicle GPS and sales terminal systems. The edge preprocessing unit is configured to perform data cleaning and format standardization on the raw data at an edge computing node close to the data source, and to perform lightweight encryption on the data using the SM4 national cryptographic algorithm to generate a structured data packet to be verified.

3. The agricultural full-chain data blockchain traceability and production optimization feedback system based on oracle verification according to claim 1, characterized in that: The distributed oracle cluster processes the data packets to be verified from the multi-source data access module through a predefined consensus algorithm, performs cross-validation on the same event data from different data sources, and uses a reputation model to evaluate the performance and assign weights to oracle nodes in order to dynamically remove abnormal oracle nodes and fake data. The reputation model assigns an initial reputation score to each verification node during the node initialization phase of the oracle using a predefined consensus algorithm, thus quantifying the reputation score into voting weight. The node reputation is dynamically quantified and updated using the cross-validation results of multi-source data. A sliding time window is used to remove nodes marked as abnormal. A reputation model is established for node performance evaluation based on quantified reputation and data packets after dynamic weight allocation.

4. The agricultural full-chain data blockchain traceability and production optimization feedback system based on oracle verification according to claim 1, characterized in that: The source tracing map management module includes a map construction unit and an intelligent query unit; The graph construction unit is used to model the attributes and relationships of the on-chain trusted data of each link of planting, processing, logistics and sales, obtained from planting environment sensors, processing line readers, logistics vehicle GPS and sales terminal systems, with the unique identifier of agricultural products as the core entity, and to build a semantic association network across links. The intelligent query unit is configured to receive traceability query requests and locate and return the complete supply chain data path and visualization view by traversing the semantic association network.

5. The agricultural full-chain data blockchain traceability and production optimization feedback system based on oracle verification according to claim 1, characterized in that: The intelligent decision-making module includes a contract logic unit, an instruction triggering unit, and an instruction generation unit; The contract logic unit is pre-loaded with a production optimization rule base trained based on agronomic knowledge and historical data, which is used by the instruction generation unit to call instructions. The instruction triggering unit is automatically triggered by real-time off-chain data synchronized by the distributed oracle cluster and specific on-chain events; The instruction generation unit is configured to, when the instruction triggering unit is activated, parse the current production status data and call the rule base in the contract logic unit to dynamically generate specific production operation instructions, including irrigation amount, fertilizer formula, and temperature and humidity control parameters.

6. The agricultural full-chain data blockchain traceability and production optimization feedback system based on oracle verification according to claim 1, characterized in that: The intelligent decision-making module is also equipped with a model optimization unit; the model optimization unit is used to iteratively update the parameters based on the job result data fed back by the intelligent decision-making module and verified on the chain by the distributed oracle cluster, so as to achieve adaptive optimization of the production strategy.

7. The agricultural full-chain data blockchain traceability and production optimization feedback system based on oracle verification according to claim 1, characterized in that: The data stored on the blockchain in the data storage module includes the hash value of the original data, smart contract code, and index information of key data; and the data stored in the off-chain distributed database and file system in the data storage module includes the detailed structural data of the semantic traceability graph, large-scale IoT original data files, and the corresponding storage address and access credentials on the blockchain in the data storage module.