Village industry agricultural product full-process traceability method based on block chain
Through the blockchain-based spatio-temporal agricultural data compression and adaptability consensus algorithm, combined with smart contracts and zero-knowledge proof technology, the problems of data collection difficulties, high storage costs, seasonal impacts and insufficient privacy protection in rural agricultural product traceability systems are solved, and trustworthy traceability of the entire process of agricultural products is realized, reducing storage costs and improving traceability transparency and reliability.
Patent Information
- Application Number
- CN202510773436.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-06-11
AI Technical Summary
Traditional agricultural product traceability systems have problems such as data being easily tampered with, opaque traceability processes, serious information silos, limited digitalization levels of farmers, difficult data collection, high storage costs, significant seasonal impact, insufficient privacy protection and single verification methods in rural areas, making it difficult to achieve trusted traceability of agricultural products from the field to the table.
The full-process traceability method of rural industrial agricultural products based on blockchain is adopted, and through space-time agricultural data compression technology, adaptive agricultural season consensus algorithm, smart contract and zero-knowledge proof technology, data preprocessing, storage, consensus maintenance and traceability verification, including time series similarity extraction, spatial data blocked compression, differential privacy protection, multi-level anti-counterfeiting verification and other technical means.
Significantly reduce blockchain storage costs by 60%-85%, reduce transaction confirmation time fluctuations by more than 70%, improve data source reliability, enhance the transparency and credibility of agricultural product traceability, enhance farmers' enthusiasm for participation, and effectively prevent fraud.
Smart Images

Figure CN120278737A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of agricultural product quality and safety, and specifically relates to a method for the whole-process traceability of rural industrial agricultural products based on blockchain. Background Art
[0002] Traditional agricultural product traceability systems mainly adopt a centralized database architecture, suffering from problems such as easy data tampering, opaque traceability processes, and serious information silos, making it difficult to establish consumers' trust in the origin and quality of agricultural products; in recent years, blockchain technology, due to its decentralized, immutable, and publicly transparent characteristics, has shown broad application prospects in the field of agricultural product traceability.
[0003] However, the current agricultural product traceability systems based on blockchain still face many challenges: the rural network infrastructure is weak and the digital level of farmers is limited, resulting in difficulties in collecting product source data; a large amount of data is generated during the agricultural production process, and if all of it is stored on the blockchain, it will cause blockchain data expansion and high storage costs; agricultural production has obvious seasonal characteristics, and during the peak and off-peak seasons of production, the system load difference is huge, and traditional blockchain consensus mechanisms are difficult to effectively cope with; farmers are worried about the leakage of sensitive information, such as pesticide use records and income status, which affects their enthusiasm for participation; existing systems mostly rely on manual entry and simple QR code scanning, lacking effective authenticity verification means and being difficult to prevent counterfeiting behaviors.
[0004] Therefore, there is an urgent need for a whole-process traceability method specifically designed for the characteristics of rural industrial agricultural products, which can solve the above technical challenges and achieve the whole-process credible traceability of agricultural products from the field to the table. Summary of the Invention
[0005] The purpose of the present invention is to provide a method for the whole-process traceability of rural industrial agricultural products based on blockchain, which solves the technical problems such as difficult data collection, high storage costs, significant seasonal impacts, insufficient privacy protection, and single verification means during the agricultural product traceability process through innovative technologies such as spatio-temporal agricultural data compression technology and adaptive agricultural season consensus algorithm.
[0006] To achieve the above-mentioned invention purpose, the specific technical solutions are as follows: A method for the whole-process traceability of rural industrial agricultural products based on blockchain, the method comprising the following steps: Step S1, collecting agricultural product whole-life cycle process data and environmental parameter data through Internet of Things sensing devices to obtain agricultural product traceability data, and preprocessing the agricultural product traceability data, including: extracting time series similarity, block compression of spatial data, and dimensionality reduction of sensor data with differential privacy protection.
[0007] Step S2: Store the key traceability data after compression processing in the blockchain network, and store the original data through content addressing method; maintain the consistency of the blockchain network based on the adaptive agricultural season consensus algorithm, and the algorithm dynamically adjusts the block generation period, verification node weight and reputation score according to the agricultural production cycle.
[0008] Step S3: Automatically execute data verification and business logic processing through smart contracts, verify the authenticity of agricultural product traceability information based on zero-knowledge proof technology, and protect the sensitive data of farmers at the same time.
[0009] Furthermore, the preprocessing of agricultural product traceability data includes: Execute the time series similarity extraction algorithm, extract the benchmark pattern for the periodic time series data in the agricultural production process and only store the deviation value, and the expression is: , where is the benchmark cycle pattern, is the th deviation value at the time point, is the data compressed by the time series similarity extraction algorithm.
[0010] The benchmark cycle pattern is obtained through multi-scale time decomposition, and the expression is: , where is the data set of the th complete cycle, is the number of reference cycles, and the value range is 3 - 5.
[0011] The deviation value calculation adopts adaptive threshold compression, and the expression is: , where is the original data point, is the length of the benchmark cycle, is the dynamic threshold, set to 10% - 20% of the data standard deviation; is the expected value of the corresponding time point found from the benchmark cycle pattern.
[0012] Execute the spatial data block compression algorithm, divide the farmland spatial data into feature blocks according to the similarity of ground object features, and only record the block features and the differences between blocks, and the expression is: , where is the benchmark block set, is the representative feature of the th feature block; is the graph structure describing the topological relationship between blocks, is the block node set, is the block relationship edge set; is the difference set between blocks, Indicates the boundary feature difference between the block and the block .
[0013] The block division adopts an adaptive clustering algorithm based on agricultural feature, and the expression is: , where C is the result of block division, is the th block, is the block center, is the distance function, is the block structure regularization term, is the balance parameter, and its value range is 0.05 - 0.3, which is dynamically adjusted according to the complexity of farmland features.
[0014] Execute the differential privacy protection sensor data dimensionality reduction algorithm to reduce the storage volume and protect privacy while maintaining the data analysis value, and the expression is: , where is the singular value decomposition dimensionality reduction function, is the original sensor data matrix, and are the differential privacy protection noises added in the preprocessing and postprocessing stages respectively, and the noise intensity parameters and are set to 1% and 0.5% of the standard deviation of the original data; The dimensionality reduction ratio of the sensor data matrix is dynamically determined according to the data importance, and the expression is: , where is the reserved dimension, is the th singular value, and are the minimum and maximum reserved dimension limits respectively, and are set to 10% and 40% of the original dimension respectively.
[0015] Furthermore, the adaptive agricultural season consensus algorithm includes the following steps: dynamically adjust the block generation period according to the intensity of farming activities, and execute the formula: , where is the target block generation period at time point , is the reference block period, usually 5 - 10 minutes; is the seasonal adjustment function, , is the th length of the agricultural cycle, is the phase shift, is the weight coefficient, satisfying and ; is the density function of the whole network's agricultural activities, , is the node in the time window The number of transaction submissions, is the historical maximum number of transactions, is the number of active nodes; is the seasonal adjustment coefficient, with a value range of 0.2 - 0.5, is the activity density response coefficient, with a value range of 0.1 - 0.3, and the two satisfy .
[0016] Analyze the working characteristics based on the data submission mode of agricultural production nodes, and dynamically adjust the verification weight according to the node characteristics, and execute the formula: , where is the node at the time point The verification weight of, is the reference weight; is the node activity function, , is the node in the time window The number of data submissions within, is the current network's maximum submission number, is the uniformity of the data submission distribution, is the data uniformity influence factor, with a value range of 1.5 - 3.0; is the function of the correlation of the crop growth stage, , is the th key farming time point, is the time correlation function; is the diversity of node operation types, is the activity influence coefficient, with a value range of 0.3 - 0.5, is the professionalism influence coefficient, with a value range of 0.2 - 0.4, satisfying .
[0017] Establish a node reputation score mechanism based on multi-dimensional data quality assessment, and execute the formula: , where is the node at the time point The reputation score of; is the historical score decay coefficient, taking a larger value in the off-season of agriculture and a smaller value in the peak season of agriculture. The expression is: , is the reference attenuation coefficient, with a value range of 0.6 - 0.7, is the adjustment amplitude, with a value range of 0.1 - 0.2; is the data quality score, which is evaluated based on data integrity, consistency, and timeliness; is the compliance score, which is evaluated based on the compliance with agricultural production specifications; is the verification contribution score, which is evaluated based on the effectiveness of participating in transaction verification; , , .
[0018] Perform the priority allocation of block proposals based on reputation scores. The expression is: , where is the node at the time point of the block proposal priority, is the resource contribution factor, is the resource weight coefficient, with a value range of 0.1 - 0.3; when multiple nodes in the network propose blocks simultaneously, the blocks proposed by nodes with higher priorities are preferentially accepted.
[0019] Furthermore, the process data includes: farming stage data, input usage data, growth stage data, harvest data, primary processing data, warehousing data, transportation data, and sales data; the environmental parameter data includes: soil parameters, meteorological data, water quality parameters, air quality, and microbial environment data; the agricultural product characteristic parameters include: agricultural product category identification code, production area code, production season identifier, variety characteristic parameter set, quality grade, and certification identification information.
[0020] Furthermore, the steps of collecting the whole - life - cycle process data and environmental parameter data of agricultural products include: Construct a three - level data collection network, including a field sensor network layer, a production process record layer, and a circulation link tracking layer; Collect environmental parameter data through the field sensor network layer. The field sensor network layer consists of soil temperature and humidity sensors, meteorological monitoring stations, irrigation water quality sensors, and crop growth monitoring devices distributed in the production area, and uses a low - power wide - area network communication protocol; Collect agricultural activity data through the production process record layer. The production process record layer consists of an intelligent input management system, an intelligent agricultural machinery operation recorder, a manual operation digital acquisition terminal, and a yield monitoring device, and uses narrow - band Internet of Things communication technology; Collect product circulation data through the circulation link tracking layer. The circulation link tracking layer consists of intelligent packaging labels, environmental monitoring sensors, positioning and tracking modules, and sales transaction record systems, and adopts a hybrid connection technology of near-field communication and cellular network; Preprocess and encrypt the collected data through the edge computing gateway and transmit it to the blockchain network.
[0021] Furthermore, the steps of automatically executing data verification and business logic processing through smart contracts include: Deploy basic business contracts to execute data input verification, basic business rules, and event triggering; Deploy business logic contracts to implement the traceability logic of agricultural product quality, compliance verification, and supply chain collaboration; Deploy application interface contracts to provide external system call interfaces and data access control; Achieve the linkage of contracts at each layer through the trigger mechanism to form a complete business process control; Conduct quality traceability based on the agricultural product quality risk identification model. The expression of the agricultural product quality risk identification model is: , where represents the agricultural product quality risk score, represents the factors of agricultural product inputs , production process factors , environmental factors and time factors is the comprehensive risk assessment function.
[0022] Furthermore, the steps of storing the compressed key traceability data in the blockchain network and storing the original data through the content addressing method include: Perform hash processing on the key traceability data to generate a data integrity proof; Store the hash value and metadata index in the blockchain network; Store the original data in the InterPlanetary File System; Establish a mapping relationship between the blockchain layer hash value and the original data in the InterPlanetary File System; Organize the stored data using the Merkle directed acyclic graph structure to achieve data deduplication.
[0023] Furthermore, the steps of verifying the authenticity of agricultural product traceability information based on zero-knowledge proof technology include: Generate attribute-based zero-knowledge proofs to prove that agricultural products meet specific attributes without disclosing specific parameter values; Execute the interval proof mechanism to prove that the key indicators of agricultural products are within a safe range without disclosing the exact values; Construct a production process compliance proof to prove that the production process follows specific standards without disclosing detailed operation data; Implement identity anonymization verification to verify the qualifications of producers while protecting identity information; Adopt multi-level anti-counterfeiting verification technology, including: Perform dynamic environmental fingerprint verification by comparing the current environmental fingerprint with historical records Verify the authenticity of agricultural products. The expression is: , where is the verification threshold, and the value range is 0.75 - 0.85; Implement multi-dimensional data consistency verification to identify data anomalies through cross-dimensional data correlation analysis. The expression is: , where is the weight coefficient of the th dimension, is the consistency threshold, and the value range is 0.8 - 0.9; Perform biomarker verification by using specific biomarkers and agricultural product markers Verify the authenticity of the origin. The expression is: , where is the biomarker threshold, and the value range is 0.15 - 0.25.
[0024] Furthermore, the time series similarity extraction algorithm further includes: Identify the periodic patterns of agricultural activities, and extract multi-scale periodic features in the data through autocorrelation analysis and wavelet transform; Adopt the seasonal decomposition method to separate the trend, seasonal, and residual components. The expression is: , where is the original time series, is the trend component, is the seasonal component, is the residual component; Extract and compress the patterns of the seasonal component. The expression is: , where , and are the amplitude, frequency, and phase of the th seasonal pattern respectively, is the fitting error, and retain the first major seasonal patterns with a contribution rate exceeding 90%; Represent the trend component using piecewise linearity. The expression is: , where are the time and value of the segmentation point, is the slope of the line segment; Selectively retain important residual points, with the expression: , where is the residual retention threshold, and its value range is 1.5 - 2.5, is the residual standard deviation.
[0025] Furthermore, the adaptive agricultural season consensus algorithm further includes: Automatically switch to an efficient and low-energy consumption consensus mode during the off-season of agricultural production, with the expression: , where is the node energy consumption target value at time point , is the reference energy consumption value; automatically switch to a high-throughput consensus mode during the peak season of agricultural production by dynamically adjusting the block size and the number of verification nodes, with the expression: , , where is the block size at time point , is the block size adjustment amount, set to 30% of the reference value; is the number of verification nodes at time point , is the reference number of verification nodes, is the number of node adjustment amount, set to 20% of the reference value.
[0026] Compared with the prior art, the beneficial effects of the present invention are: The method of the present invention optimizes specifically for the periodicity and spatial correlation characteristics of agricultural data through an innovative spatio-temporal agricultural data compression technology, reducing the data storage space by 60% - 85% and significantly reducing the blockchain storage cost; the adaptive agricultural season consensus algorithm dynamically adjusts the block generation cycle and the verification node weight according to the agricultural production cycle, enabling the system to maintain good performance both in the peak season and off-season of agriculture, and reducing the transaction confirmation time fluctuation by more than 70%; through a three-level data acquisition network and Internet of Things technology, manual intervention is reduced, the data source is more reliable, and the multi-level anti-counterfeiting verification technology effectively identifies data fraud behavior; the verification mechanism based on zero-knowledge proof technology allows proving that agricultural products meet specific standards without revealing specific parameter values, solving the problem of low enthusiasm of farmers to participate. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a flowchart of a method for full-process traceability of rural industrial agricultural products based on blockchain of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0028] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be described clearly and completely below. Apparently, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts fall within the scope of protection of the present invention.
[0029] It should be noted that the method for the whole-process traceability of rural industrial agricultural products provided by the present invention includes six main steps: data collection, data compression, data storage, consensus maintenance, intelligent contract processing, and traceability verification.
[0030] As Figure 1 shown, a method for the whole-process traceability of rural industrial agricultural products based on blockchain according to the present invention includes the following steps: Step S1, collect agricultural product traceability data by using Internet of Things sensing devices for the data of the whole life cycle process of agricultural products and environmental parameter data, and preprocess the agricultural product traceability data, including: extraction of time series similarity, spatial data block compression, and dimensionality reduction of sensor data with differential privacy protection.
[0031] The steps of collecting the data of the whole life cycle process of agricultural products and environmental parameter data include: Construct a three-level data collection network, including a field sensor network layer, a production process record layer, and a circulation link tracking layer; Collect environmental parameter data through the field sensor network layer. The field sensor network layer consists of soil temperature and humidity sensors, meteorological monitoring stations, irrigation water quality sensors, and crop growth monitoring devices distributed in the production area, and uses a low-power wide area network communication protocol; Collect agricultural activity data through the production process record layer. The production process record layer consists of an intelligent input management system, an intelligent agricultural machinery operation recorder, a manual operation digital acquisition terminal, and a yield monitoring device, and uses narrowband Internet of Things communication technology; Collect product transfer data through the circulation link tracking layer. The circulation link tracking layer consists of intelligent packaging labels, environmental monitoring sensors, positioning tracking modules, and sales transaction record systems, and uses a hybrid connection technology of near field communication and cellular network; Preprocess and encrypt the collected data through an edge computing gateway, and transmit it to the blockchain network.
[0032] This method first collects the data of the whole life cycle process of agricultural products and environmental parameter data by using Internet of Things sensing devices. The data collection adopts a three-level data collection network architecture, including a field sensor network layer, a production process record layer, and a circulation link tracking layer.
[0033] The field sensor network layer consists of soil temperature and humidity sensors, meteorological monitoring stations, irrigation water quality sensors, and crop growth monitoring devices distributed in the production area. For example, in a rice planting base, 4-6 soil sensor nodes are arranged per hectare to monitor soil temperature, humidity, pH value, and nutrient content; a meteorological monitoring station is set up every 10-15 hectares to record meteorological parameters such as temperature, humidity, light, and rainfall; water quality monitoring equipment is installed at the entrance of the irrigation channel to monitor water quality parameters in real time. These devices use the Low Power Wide Area Network (LoRaWAN) communication protocol and can work continuously for 6-12 months with battery power, adapting to the environment with weak rural power infrastructure.
[0034] The production process recording layer consists of an intelligent input management system, an intelligent agricultural machinery operation recorder, a digital collection terminal for manual operations, and a yield monitoring device. For example, the intelligent input management system records the usage of inputs such as pesticides and fertilizers through RFID identification technology; the intelligent agricultural machinery operation recorder is installed on agricultural machinery such as tractors and harvesters to automatically record operation time, location, and parameters; for manual operation links, farmers use a simple mobile terminal APP to record operation content in the form of voice or images. This layer uses Narrowband Internet of Things (NB-IoT) communication technology, which has the characteristics of wide coverage, low power consumption, and low cost, and is suitable for the complex terrain environment in rural areas.
[0035] The circulation link tracking layer consists of intelligent packaging labels, environmental monitoring sensors, positioning and tracking modules, and a sales transaction recording system. For example, the intelligent packaging label uses NFC and anti-counterfeiting QR code technology to record information such as product batches and packaging time; environmental monitoring sensors are installed on transport vehicles to record parameters such as temperature and humidity during transportation; the POS machines in the sales link are connected to the blockchain system to automatically record sales information. This layer uses a hybrid connection technology of Near Field Communication (NFC) and cellular network to ensure the continuity of data in the circulation link.
[0036] All the collected data is preprocessed and encrypted through an edge computing gateway, including data filtering, anomaly detection, and privacy protection processing, and then transmitted to the blockchain network. The edge computing gateway can cache data in a weak network or offline environment and synchronize and upload it after the network is restored, solving the problem of unstable network in rural areas.
[0037] The original collected data is processed by spatio-temporal agricultural data compression technology, significantly reducing the storage space requirements. This technology includes three main algorithms: time series similarity extraction algorithm, spatial data block compression algorithm, and differential privacy protection sensor data dimensionality reduction algorithm.
[0038] Many parameters in the agricultural production process have obvious periodicity, such as daily temperature changes, water requirements during the growth period, etc. This algorithm processes such data through the following steps: identifying the periodic patterns of agricultural data, and extracting multi-scale periodic features from time series data through autocorrelation analysis and wavelet transform. For example, when analyzing temperature data, obvious 24-hour cycles and seasonal cycles can be found. Using the seasonal decomposition method: decomposing the original data into a trend component, a seasonal component, and a residual component. For example, the water requirement data during the rice growth period can be decomposed into an overall increasing trend (the water requirement increases with growth), periodic changes (caused by day-night temperature differences), and a random fluctuation part. Extracting and compressing patterns of the seasonal component: using Fourier analysis to extract the main periodic patterns, usually retaining the first K main seasonal patterns with a contribution rate exceeding 90%. Often, a good fitting effect can be obtained when K < 5.
[0039] Using piecewise linear representation for the trend component: Instead of storing the trend values at each time point, record the turning points of the trend. For example, for the growth trend of rice from sowing to harvesting, only record the data points at key growth stages (seedling stage, tillering stage, heading stage, maturity stage), and the intermediate values can be restored through linear interpolation.
[0040] Selectively retaining important residual points: Only retain the abnormal fluctuation points exceeding a specific threshold. For example, abnormal data points caused by sudden extreme weather events (heavy rain, frost) need to be retained, while random fluctuations within the normal range can be ignored.
[0041] Preprocessing the agricultural product traceability data includes: Executing the time series similarity extraction algorithm, extracting the reference pattern for periodic time series data in the agricultural production process and only storing the deviation values. The expression is: , where is the reference periodic pattern, is the deviation value at the th time point, is the data compressed by the time series similarity extraction algorithm.
[0042] The reference periodic pattern is obtained through multi-scale time decomposition. The expression is: , where is the data set of the th complete cycle, is the number of reference cycles, and the value ranges from 3 to 5.
[0043] The deviation value calculation uses adaptive threshold compression. The expression is: , where is the original data point, is the reference period length, is the dynamic threshold, set to 10%-20% of the data standard deviation; is the expected value of the corresponding time point found from the reference period pattern.
[0044] Execute the spatial data block compression algorithm, divide the farmland spatial data into feature blocks according to the similarity of ground object features, and only record the block features and the differences between blocks. The expression is: , where is the set of reference blocks, is the th representative feature of the feature block; is the graph structure describing the topological relationship between blocks, is the set of block nodes, is the set of block relationship edges; is the set of differences between blocks, represents the boundary feature difference between block and block .
[0045] The block division adopts an adaptive clustering algorithm based on agricultural ground object features. The expression is: , where C is the block division result, is the th block, is the block center, is the distance function, is the block structure regularization term, is the balance parameter, with a value range of 0.05-0.3, dynamically adjusted according to the complexity of farmland ground object features.
[0046] Execute the differential privacy protection sensor data dimensionality reduction algorithm to reduce the storage volume and protect privacy while maintaining the data analysis value. The expression is: , where is the singular value decomposition dimensionality reduction function, is the original sensor data matrix, and are the differential privacy protection noises added in the preprocessing and postprocessing stages respectively. The noise intensity parameters and are set to 1% and 0.5% of the original data standard deviation; The dimensionality reduction ratio of the sensor data matrix is dynamically determined according to the data importance. The expression is: , where is the retained dimension, is the singular values, and are the minimum and maximum retained dimension limits, respectively set to 10% and 40% of the original dimension.
[0047] The time series similarity extraction algorithm further includes: Identifying the periodic patterns of agricultural activities and extracting multi-scale periodic features in the data through autocorrelation analysis and wavelet transform; Using the seasonal decomposition method to separate the trend, seasonal, and residual components, with the expression: where is the original time series, is the trend component, is the seasonal component, is the residual component; Performing pattern extraction and compression on the seasonal component, with the expression: where , and are the amplitude, frequency, and phase of the th seasonal pattern respectively, is the fitting error, and the first major seasonal patterns with a contribution rate exceeding 90% are retained; Representing the trend component using piecewise linearity, with the expression: where are the time and value of the segmentation point, is the slope of the line segment; Selectively retaining important residual points, with the expression: where is the residual retention threshold, with a value range of 1.5 - 2.5, is the residual standard deviation.
[0048] The spatial data block compression algorithm is based on the fact that farmland spatial data (such as soil composition distribution, crop growth status distribution, etc.) usually has local similarity and gradual change characteristics. This algorithm uses this feature for compression: The block division uses an adaptive clustering algorithm based on agricultural feature characteristics to divide the farmland space into blocks with similar features. For example, 50 mu of paddy fields are divided into 5 - 8 feature blocks according to soil texture and humidity characteristics, and the characteristics within each block are similar. The value of λ is dynamically adjusted according to the complexity of farmland features. When the complexity is high (such as large terrain undulations and diverse soil types), a smaller value such as 0.05 - 0.1 is taken, and when the complexity is low, 0.2 - 0.3 is taken.
[0049] Block feature extraction extracts representative features for each block to form a set of benchmark blocks. For example, for each soil block, key parameters such as average organic matter content, pH value, and nitrogen, phosphorus, and potassium contents are extracted.
[0050] Block relationship modeling constructs a graph structure describing the topological relationships between blocks and records the set of differences between blocks. For example, the gradual change relationships of soil parameters and boundary features between adjacent blocks.
[0051] Taking the soil nutrient distribution map of a 50-acre multi-variety orchard as an example, the traditional method requires raster data with a precision of 1m (about 20,000 data points). After using the spatial data block compression algorithm, the orchard is divided into 12 feature blocks, and each block stores 5 - 8 key feature parameters. Together with the relationship data between blocks, the total data volume is reduced to about 200 data points, the compression rate reaches 99%, and the similarity of the reconstructed spatial distribution map to the original data exceeds 95%.
[0052] The differential privacy protection sensor data dimensionality reduction algorithm reduces the storage volume and protects privacy while maintaining the data analysis value: Data matrix construction constructs the time series data of multiple related sensors into a matrix $M_{original}$, where the rows represent time points and the columns represent different sensors or parameters.
[0053] Preprocessing - noise addition adds tiny noise to protect the privacy of the original data. The noise intensity parameter is usually set to 1% of the standard deviation of the original data, which is sufficient to prevent the reverse - inference of specific values and does not affect the data analysis value.
[0054] Singular value decomposition dimensionality reduction applies the SVD function for dimensionality reduction to reduce the storage space. The dimensionality reduction ratio is dynamically determined according to the data importance, usually retaining 10% - 40% of the original dimensions and being able to explain more than 95% of the data variance.
[0055] Post - processing - noise addition adds tiny noise to further enhance privacy protection. It is usually set to 0.5% of the standard deviation of the original data.
[0056] Taking the vineyard environment monitoring as an example, 20 monitoring points are set, and 15 parameters (temperature, humidity, light, etc.) are monitored at each point. Data is collected once an hour to form a daily data matrix of 24×300. After being processed by the differential privacy protection sensor data dimensionality reduction algorithm, the dimension is reduced to 24×5, only 5 principal components are retained, the storage space is reduced by 83%, and it can explain 98% of the variance of the original data. Importantly, even with this data, it is impossible to accurately reverse - infer the original sensor readings, protecting the privacy of the grower's production details.
[0057] The described adaptive agricultural season consensus algorithm further includes: Automatically switch to an efficient and low - energy - consumption consensus mode during the off - season of agricultural production. The expression is: , where, is the node energy consumption target value at time point , is the benchmark energy consumption value; Automatically switch to a high - throughput consensus mode during the peak season of agricultural production. By dynamically adjusting the block size and the number of verification nodes, the expression is: , , where, is the block size at time point , is the block size adjustment amount, set to 30% of the benchmark value; is the number of verification nodes at time point , is the benchmark number of verification nodes, is the number of node adjustment amount, set to 20% of the benchmark value.
[0058] Taking the temperature and humidity monitoring of the greenhouse vegetable growth environment as an example, the original data is the temperature and humidity value collected every 5 minutes. In a growth cycle (about 90 days), about 25,920 data points can be generated. After being processed by the time - series similarity extraction algorithm, only the daily - cycle mode parameters (5 - 10 parameters), the turning points of the growth stage (10 - 15 points), and the key abnormal events (usually no more than 20 points) need to be stored. A total of no more than 50 data points can accurately reconstruct the complete sequence, with a compression ratio of 99.8%, and the root - mean - square error between the reconstructed data and the original data is less than 2%.
[0059] Through the combined application of the above three algorithms, this method can reduce the storage requirements of agricultural production data by 60% - 85% while maintaining the data analysis value, and at the same time provide strong privacy protection.
[0060] Step S2, store the compressed key traceability data in the blockchain network and store the original data through the content - addressing method; Maintain the consistency of the blockchain network based on the adaptive agricultural season consensus algorithm, which dynamically adjusts the block generation cycle, the weights of verification nodes, and the reputation scores according to the agricultural production cycle.
[0061] The compressed data adopts a two - level storage architecture: The key traceability data is stored in the blockchain network, and the large - volume original data is stored in the content - addressed InterPlanetary File System (IPFS).
[0062] For critical traceability data, including core production parameters, quality inspection results, transaction records, etc., first perform hash processing to generate a data integrity proof, and then directly store the hash value and metadata index in the blockchain network. For example, the critical traceability data of organic rice includes: variety information (such as Daohuaxiang No. 2), coordinates of the planting plot, time nodes of key growth stages, summary of pesticide usage records, harvesting date, processing batch number, summary of quality inspection reports, etc.
[0063] For large-capacity raw data, such as high-resolution farmland images, detailed environmental monitoring data, operation video records, etc., store them in the InterPlanetary File System (IPFS). IPFS uses content-addressing technology to generate a unique content identifier (CID) for each file. Only these CIDs and related metadata are stored on the blockchain. By establishing a mapping relationship between the hash value on the blockchain layer and the raw data in IPFS, data integrity and accessibility are ensured. For example, detailed growth process images of organic rice, original soil test reports, and detailed pesticide usage records are stored in IPFS, while the blockchain only stores the CIDs pointing to these files.
[0064] Data in IPFS is organized in a Merkle Directed Acyclic Graph (Merkle DAG) structure to achieve data deduplication and efficient access. This storage architecture enables the system to significantly reduce storage costs while taking into account data integrity and blockchain execution efficiency.
[0065] For example, in a traceability system covering a 1000-acre tea garden, the traditional method generates approximately 5TB of raw data per year. After adopting this method, only about 50MB of key data and hash indexes are stored on the blockchain, and the rest of the data is stored in IPFS. Through data compression technology, the total storage requirement is reduced to approximately 1TB, and the storage cost is reduced by 80%.
[0066] Adopt the Adaptive Seasonal Consensus Algorithm for Agriculture (ASCA) to maintain the consistency of the blockchain network. This algorithm dynamically adjusts the consensus parameters according to the agricultural production cycle, including the block generation cycle, weights of verification nodes, and reputation scores, effectively resolving the contradiction between the seasonal characteristics of agricultural production and the consistency requirements of the blockchain.
[0067] The Adaptive Seasonal Consensus Algorithm for Agriculture includes the following steps: Dynamically adjust the block generation cycle according to the intensity of farming activities, and execute the formula: , where is the target block generation cycle at time point , is the benchmark block cycle, usually 5 - 10 minutes; is the seasonal adjustment function, , is the The length of an agricultural cycle, is the phase shift, is the weight coefficient, satisfying and ; is the density function of the whole network's agricultural activities, , is the node in the time window the number of transaction submissions, is the historical maximum number of transactions, is the number of active nodes; is the seasonal adjustment coefficient, with a value range of 0.2 - 0.5, is the activity density response coefficient, with a value range of 0.1 - 0.3, and the two satisfy .
[0068] Analyze the working characteristics based on the data submission patterns of agricultural production nodes, and dynamically adjust the verification weights according to node characteristics, and execute the formula: , where is the node at the time point the verification weight, is the reference weight; is the node activity function, , is the node in the time window the number of data submissions within, is the current network's maximum submission number, is the uniformity of the data submission distribution, is the data uniformity influence factor, with a value range of 1.5 - 3.0; is the correlation function of the crop growth stage, , is the th key agricultural operation time point, is the time correlation function; is the diversity of node operation types, is the activity influence coefficient, with a value range of 0.3 - 0.5, is the professionalism influence coefficient, with a value range of 0.2 - 0.4, satisfying .
[0069] Establish a node reputation score mechanism based on multi-dimensional data quality assessment, and execute the formula: , where is the node at the time point the reputation score; is the historical integral decay coefficient, which takes a larger value in the off-season of agriculture and a smaller value in the peak season of agriculture. The expression is: , is the reference decay coefficient, and its value range is 0.6 - 0.7, is the adjustment range, and its value range is 0.1 - 0.2; is the data quality score, which is evaluated based on data integrity, consistency, and timeliness; is the compliance score, which is evaluated based on the compliance with agricultural production specifications; is the verification contribution score, which is evaluated based on the effectiveness of participating in transaction verification; , , .
[0070] Execute the priority allocation of block proposals based on reputation points. The expression is: , where is the node at the time point of the block proposal priority, is the resource contribution factor, is the resource weight coefficient, and its value range is 0.1 - 0.3; when multiple nodes in the network propose blocks simultaneously, the blocks proposed by nodes with higher priorities are preferentially accepted.
[0071] The process data includes: cultivation stage data, input usage data, growth stage data, harvest data, primary processing data, storage data, transportation data, and sales data; the environmental parameter data includes: soil parameters, meteorological data, water quality parameters, air quality, and microbial environment data; the agricultural product characteristic parameters include: agricultural product category identification code, production area code, production season identifier, variety characteristic parameter set, quality grade, and certification identification information.
[0072] Step S3, automatically execute data verification and business logic processing through a smart contract, verify the authenticity of agricultural product traceability information based on zero-knowledge proof technology, and protect the sensitive data of farmers at the same time.
[0073] The steps of automatically executing data verification and business logic processing through a smart contract include: Deploy a basic business contract to execute data input verification, basic business rules, and event triggering; Deploy a business logic contract to implement agricultural product quality traceability logic, compliance verification, and supply chain collaboration; Deploy an application interface contract to provide external system call interfaces and data access control; Realize the linkage of contracts at each layer through a trigger mechanism to form a complete business process control; Perform quality traceability based on the agricultural product quality risk identification model, and the expression of the agricultural product quality risk identification model is: , where represents the agricultural product quality risk score, represents the factors of agricultural product inputs , production process factors , environmental factors and time factors of the comprehensive risk assessment function.
[0074] Store the compressed key traceability data in the blockchain network. The steps of storing the original data through the content addressing method include: Perform hash processing on the key traceability data to generate a data integrity proof; Store the hash value and metadata index in the blockchain network; Store the original data in the InterPlanetary File System; Establish a mapping relationship between the blockchain layer hash value and the original data in the InterPlanetary File System; Organize the stored data using the Merkle directed acyclic graph structure to achieve data deduplication.
[0075] Further, the steps of verifying the authenticity of agricultural product traceability information based on zero-knowledge proof technology include: Generate an attribute-based zero-knowledge proof to prove that the agricultural product meets specific attributes without disclosing specific parameter values; Execute the interval proof mechanism to prove that the key indicators of the agricultural product are within the safe range without disclosing the exact values; Construct a production process compliance proof to prove that the production process follows specific standards without disclosing detailed operation data; Implement identity anonymity verification to verify the producer's qualifications while protecting the identity information; This method automatically executes data verification and business logic processing through smart contracts to ensure the standardization and automation of the agricultural product traceability process. Smart contract processing includes the following links: Execute data input verification, basic business rules, and event triggering. It includes agricultural product registration contracts, production entity registration contracts, input record contracts, production process record contracts, quality inspection record contracts, circulation record contracts, and sales record contracts.
[0076] For example, the input record contract automatically verifies whether the use of inputs complies with regulations. When a record of prohibited pesticides is detected, it automatically triggers a warning event and records it on the blockchain; the quality inspection record contract automatically associates product batch information to ensure that each batch of products has a corresponding quality inspection report.
[0077] Implement the traceability logic, compliance verification, and supply chain collaboration for agricultural product quality. The core is the agricultural product quality risk identification model, which comprehensively evaluates the impacts of input factors, production process factors, environmental factors, and time factors on the quality of agricultural products. After the system calculates the risk score $R$, it determines the product quality grade according to the preset threshold. For example: It is determined as a high-quality product, It is determined as a good product, It is determined as a qualified product, It is determined as a non-qualified product. This automatic rating process reduces human intervention and subjective judgment.
[0078] Taking organic vegetables as an example, the input risk assessment function focuses on the usage of fertilizers, pesticides, etc.; the production process risk assessment function pays attention to key links such as irrigation, fertilization, and pest control; the environmental risk assessment function evaluates environmental conditions such as soil, water source, and air; the time risk assessment function considers time-related factors such as the product's shelf life and storage conditions.
[0079] The application interface contract provides external system call interfaces and data access control. It includes query interface contracts, authorization management contracts, data access control contracts, and cross-chain interaction contracts. These contracts ensure the security and flexibility of data access while supporting interoperability with other blockchain systems.
[0080] The smart contract system realizes the linkage of contracts at all levels through the trigger mechanism to form a complete business process control. For example, when the production process record contract detects the completion of key farming activities, it automatically triggers the quality assessment and updates the product status; when the quality inspection contract records unqualified results, it automatically triggers the warning mechanism to prevent the product from flowing.
[0081] The traceability verification link includes the following key technologies: Attribute-based zero-knowledge proof is used to prove that agricultural products meet specific attributes without disclosing specific parameter values. For example, proving that the pesticide residue in fruits is lower than the safety standard without disclosing the specific pesticide usage records; proving that organic vegetables do not use chemical pesticides at all without disclosing the detailed planting process.
[0082] The interval proof mechanism proves that the key indicators of agricultural products are within the safe range without disclosing the exact values. For example, proving that the heavy metal content in rice is lower than the national standard without revealing the specific content value; proving that the protein content in dairy products meets the high-quality standard without disclosing the specific protein percentage.
[0083] The production process compliance certificate is used to prove that the production process follows specific standards without disclosing detailed operation data. For example, it can prove that the tea planting process meets the organic certification standards without disclosing the detailed records of each fertilization and irrigation; it can prove that the meat farming process meets the animal welfare standards without revealing the specific farm information.
[0084] Identity anonymous verification verifies the producer's qualifications while protecting the identity information. For example, it can prove that agricultural products come from producers with organic certification without revealing the specific identity of the producers; it can prove that products come from specific geographical indication protection areas without exposing the specific farmer information.
[0085] To ensure the authenticity and reliability of the traceability information, this method also adopts a multi-level anti-counterfeiting verification technology: Perform dynamic environment fingerprint verification by comparing the current environment fingerprint with the historical record to verify the authenticity of agricultural products. The expression is: , where is the verification threshold, and the value range is 0.75 - 0.85; Implement multi-dimensional data consistency verification by identifying data anomalies through cross-dimensional data correlation analysis. The expression is: , where is the weight coefficient of the th dimension, is the consistency threshold, and the value range is 0.8 - 0.9; Perform biomarker verification by using specific biomarkers and agricultural product markers to verify the authenticity of the origin. The expression is: , where is the biomarker threshold, and the value range is 0.15 - 0.25.
[0086] For example, for wine claimed to come from a specific production area, its authenticity is judged by comparing the similarity of the trace element composition characteristics (environmental fingerprint) in it with the historical samples of that production area. Experiments show that the environmental fingerprints of different production areas are significantly different, and it is extremely difficult to forge.
[0087] The system analyzes multi-dimensional data such as temperature records, irrigation records, and growth status records during the rice growth process, and checks the logical consistency between them. If the records show that the temperature on a certain day is only 10°C, but the rice growth status shows normal heading, the system will identify this irrationality and determine that the data may have been tampered with.
[0088] Taking a special fruit (such as kiwifruit) in a remote mountainous area as an example, the method of the present invention is applied to achieve full-process traceability.
[0089] (1)Field sensor network: 20 soil sensor nodes are arranged in a 100-acre kiwifruit orchard to monitor parameters such as soil temperature, humidity, and pH value; 2 meteorological monitoring stations are installed to record meteorological data such as temperature and rainfall; water quality monitoring equipment is installed at the entrance of the irrigation system. All devices use the LoRaWAN protocol and are powered by solar energy to ensure long-term stable operation.
[0090] (2)Production process record: Farmers use a simple mobile APP to record activities such as fertilization, irrigation, and pest control, supporting offline operation and voice input to reduce the impact of the digital divide; key farming operations (such as pollination and pruning) are recorded by smart bracelets for operation time and GPS location.
[0091] (3)Circulation link tracking: NFC tags are attached to the fruit boxes after harvesting to record information such as harvesting time and orchard area; GPS and temperature and humidity monitoring equipment are installed on transport vehicles; anti-counterfeiting QR code tags are used in the packaging link, and consumers can scan the code to view the complete traceability information.
[0092] Apply the time series similarity extraction algorithm to the daily temperature and humidity data to extract the daily cycle pattern and the growth season pattern, compressing more than 50,000 temperature and humidity data points in the 180-day growth period to about 200 characteristic parameters, with a compression rate exceeding 99.5%.
[0093] Divide the 100-acre orchard into 8 characteristic blocks according to soil characteristics and terrain features, record the core characteristic parameters for each block, and compress the storage space by more than 85%.
[0094] Apply SVD dimensionality reduction and differential privacy protection to 15 sensor parameters, protecting the privacy of farmers' production details while maintaining the data analysis value, with a dimensionality reduction rate of 70%.
[0095] Key traceability data is directly stored in the blockchain network, including: basic orchard information, organic certification number, key farming operation records (pollination date, fertilization record summary, etc.), harvesting batch information, quality inspection result summary, key logistics node information, etc. The original detailed data is stored in IPFS, such as high-resolution orchard images, complete sensor historical data, detailed fertilization formula, pest control details, full-text quality inspection reports, etc. Only the CID hash values pointing to these files are stored on the blockchain.
[0096] The adaptive agricultural season consensus algorithm automatically adjusts to a high-throughput mode during key farming periods (such as the flowering period, fruit swelling period, and harvesting period) according to the growth cycle characteristics of kiwifruit, shortening the block generation cycle to 6 - 7 minutes and increasing the number of verification nodes by 30%; it switches to a low-power consumption mode during the off-season, extending the block generation cycle to 10 - 12 minutes and reducing energy consumption by about 40%.
[0097] Farmer nodes obtain different verification weights based on data submission quality and activity. Professional cooperatives that actively participate have the highest verification weights, which can reach 1.6 times the benchmark value and have a greater say.
[0098] Deploy a kiwifruit quality risk identification model, focusing on factors such as pesticide use (weight 0.4), growth environment (weight 0.3), post-harvest handling (weight 0.2), and storage time (weight 0.1). The system automatically calculates the quality risk score for each batch of products and conducts a graded assessment.
[0099] The organic certification smart contract automatically monitors whether the production process complies with organic standards. Once a violation (such as using prohibited pesticides) is detected, it immediately triggers an alarm and updates the product status.
[0100] Consumers can obtain traceability information by scanning the QR code on the product packaging. The system provides multi-level verification results: (1) Basic product information: variety, origin, harvest date, organic certification status, etc.
[0101] (2) Zero-knowledge proof results: Prove that the product complies with organic standards, prove that the pesticide residue is lower than the safety limit, prove that the product comes from a specific geographical indication protection area, without disclosing the privacy data of farmers.
[0102] (3) Anti-counterfeiting verification results: Environmental fingerprint verification confirms that the product actually comes from the claimed production area; multi-dimensional data consistency verification confirms that the traceability data is true and unmodified; optional isotope detection provides additional authenticity guarantee.
[0103] (4) Product quality score: A comprehensive score based on the quality risk model, intuitively showing the product quality level.
[0104] After applying this method, the traceability system for this special fruit has achieved the following effects: The blockchain storage cost has been reduced by 82%; the annual fluctuation of the system's transaction confirmation time is controlled within 15%; the anti-counterfeiting verification success rate reaches 99.7%; the consumer trust has been significantly improved, and the product premium rate has increased by 25 - 40%; the enthusiasm of farmers to participate has been greatly enhanced, and the integrity and timeliness of the system data have been significantly improved.
[0105] The specific implementation manners described above have further elaborated on the purpose, technical solutions, and beneficial effects of the present invention. It should be understood that the above description is only the specific implementation manners of the present invention and is not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A whole-process traceability method for agricultural products in rural industries based on blockchain, characterized in that The method includes the following steps: Step S1: Collect the whole life cycle process data of agricultural products and environmental parameter data through Internet of Things sensing devices to obtain agricultural product traceability data, and preprocess the agricultural product traceability data, including: extracting time series similarity, block-compressing spatial data, and reducing the dimension of sensor data by differential privacy protection; Step S2: Store the key traceability data after compression processing in the blockchain network, and store the original data by content addressing method; maintain the consistency of the blockchain network based on the adaptive agricultural season consensus algorithm, and the algorithm dynamically adjusts the block generation cycle, verification node weight, and reputation score according to the agricultural production cycle; Step S3: Automatically execute data verification and business logic processing through smart contracts, verify the authenticity of agricultural product traceability information based on zero-knowledge proof technology, and protect the sensitive data of farmers at the same time.
2. The method according to claim 1, wherein The preprocessing of the agricultural product traceability data includes: Execute the time series similarity extraction algorithm to extract the benchmark pattern for the periodic time series data in the agricultural production process and only store the deviation values. The expression is: , where is the benchmark cycle pattern, is the deviation value at the -th time point, is the data compressed by the time series similarity extraction algorithm; The reference period pattern is obtained through multi-scale time decomposition, and the expression is: , where is the data set of the th complete cycle, is the number of reference periods, and the value ranges from 3 to 5; The deviation value calculation adopts adaptive threshold compression, and the expression is: , where is the original data point, is the reference period length, is the dynamic threshold, set to 10% - 20% of the data standard deviation; is the expected value of the corresponding time point found from the reference period pattern; Execute the spatial data block compression algorithm, divide the farmland spatial data into feature blocks according to the similarity of ground feature characteristics, and only record the block features and the differences between blocks. The expression is: , where is the set of reference blocks, is the representative feature of the th feature block; is the graph structure describing the topological relationship between blocks, is the set of block nodes, is the set of block relationship edges; is the set of differences between blocks, represents the boundary feature difference between block and block ; The block division adopts an adaptive clustering algorithm based on agricultural feature, and the expression is: , where C is the result of block division, is the th block, is the block center, is the distance function, is the block structure regularization term, is the balance parameter, whose value range is 0.05 - 0.3 and is dynamically adjusted according to the complexity of farmland feature characteristics; A sensor data dimensionality reduction algorithm that implements differential privacy protection reduces the storage volume and protects privacy while maintaining the data analysis value. The expression is: , where is the singular value decomposition dimensionality reduction function, is the original sensor data matrix, and are the differential privacy protection noises added in the preprocessing and postprocessing stages respectively. The noise intensity parameters and are set to 1% and 0.5% of the standard deviation of the original data; Dimensionality reduction ratio of the sensor data matrix Dynamically determined according to data importance, and the expression is: , where is the retained dimension, is the th singular value, and are the minimum and maximum retained dimension limits, respectively set to 10% and 40% of the original dimension.
3. The method according to claim 1, characterized in that, The adaptive agricultural season consensus algorithm includes the following steps: Dynamically adjust the block generation cycle according to the intensity of farming activities, and execute the formula: ,in For time point The target block generation period is The base block period is usually 5-10 minutes; is the seasonal adjustment function, , For the The length of the agricultural cycle, is the phase shift, is the weight coefficient, satisfying and ; is the density function of agricultural activities in the whole network, , For Node In the time window The number of transactions submitted, The largest number of transactions in history. is the number of active nodes; is the seasonal adjustment coefficient, ranging from 0.2 to 0.
5. is the activity density response coefficient, with a value range of 0.1-0.
3. ; Analyze the working characteristics based on the data submission mode of agricultural production nodes, and dynamically adjust the verification weight according to the node characteristics, and execute the formula: , where is the verification weight of the node at the time point ; is the benchmark weight; is the node activity function, , is the number of data submissions of the node within the time window ; is the maximum number of submissions of the current network, is the uniformity of the data submission distribution, is the data uniformity influence factor, and the value range is 1.5 - 3.0; is the function of the correlation of the crop growth stage, , is the th key farming time point, is the time correlation function; is the diversity of node operation types, is the activity influence coefficient, and the value range is 0.3 - 0.5, is the professionalism influence coefficient, and the value range is 0.2 - 0.4, satisfying ; Establish a node reputation score mechanism based on multi-dimensional data quality assessment, and execute the formula: , where is the node at the time point 's credit score; is the historical score decay coefficient, taking a larger value in the off-season of agriculture and a smaller value in the peak season of agriculture. The expression is: , is the baseline decay coefficient, with a value range of 0.6 - 0.7, is the adjustment range, with a value range of 0.1 - 0.2; is the data quality score, evaluated based on data integrity, consistency, and timeliness; is the compliance score, evaluated based on the compliance with agricultural production specifications; is the verification contribution score, evaluated based on the effectiveness of participating in transaction verification; , , ; Execute the priority allocation of block proposals based on reputation scores, and the expression is: , where is the node at the time point of the block proposal priority, is the resource contribution factor, is the resource weight coefficient, and its value range is 0.1 - 0.3; when multiple nodes in the network propose blocks simultaneously, the blocks proposed by the nodes with higher priority are accepted first.
4. The method according to claim 1, characterized in that The process data includes: farming stage data, input usage data, growth stage data, harvesting data, primary processing data, warehousing data, transportation data, and sales data; the environmental parameter data includes: soil parameters, meteorological data, water quality parameters, air quality, and microbial environment data; the agricultural product characteristic parameters include: agricultural product category identification code, production area code, production season identifier, variety characteristic parameter set, quality grade, and certification identification information.
5. The method according to claim 1, wherein The steps of collecting the whole life cycle process data of agricultural products and environmental parameter data include: Construct a three-level data collection network, including a field sensor network layer, a production process record layer, and a circulation link tracking layer; Collect environmental parameter data through the field sensor network layer, and the field sensor network layer is composed of soil temperature and humidity sensors, meteorological monitoring stations, irrigation water quality sensors, and crop growth monitoring devices distributed in the production area, and adopts a low-power wide area network communication protocol; Collect farming activity data through the production process record layer, and the production process record layer is composed of an intelligent input management system, an intelligent agricultural machinery operation recorder, a manual operation digital acquisition terminal, and a yield monitoring device, and adopts narrowband Internet of Things communication technology; Collect product transfer data through the circulation link tracking layer, and the circulation link tracking layer is composed of intelligent packaging labels, environmental monitoring sensors, positioning tracking modules, and sales transaction record systems, and adopts a hybrid connection technology of near field communication and cellular network; Preprocess and encrypt the collected data through an edge computing gateway, and transmit it to the blockchain network.
6. The method according to claim 1, wherein The steps of automatically executing data verification and business logic processing through smart contracts include: Deploy a basic business contract, and execute data input verification, basic business rules, and event triggering; Deploy business logic contracts to implement agricultural product quality traceability logic, compliance verification, and supply chain collaboration; Deploy application interface contracts to provide external system call interfaces and data access control; Achieve linkage of contracts at all levels through the trigger mechanism to form a complete business process control; Quality traceability is carried out based on the agricultural product quality risk identification model, and the expression of the agricultural product quality risk identification model is: , where represents the agricultural product quality risk score, represents the agricultural product input factor , the production process factor , the environmental factor and the time factor is the comprehensive risk assessment function.
7. The method according to claim 1, characterized in that Store the key traceability data after compression processing in the blockchain network. The steps of storing the original data through content addressing method include: Perform hash processing on the key traceability data to generate a data integrity proof; Store the hash value and metadata index in the blockchain network; Store the original data in the InterPlanetary File System; Establish a mapping relationship between the hash value in the blockchain layer and the original data in the InterPlanetary File System; Organize the stored data using the Merkle directed acyclic graph structure to achieve data deduplication.
8. The method according to claim 1, wherein The steps of verifying the authenticity of agricultural product traceability information based on zero-knowledge proof technology include: Generate attribute-based zero-knowledge proofs to prove that agricultural products meet specific attributes without disclosing specific parameter values; Execute the range proof mechanism to prove that the key indicators of agricultural products are within a safe range without disclosing the exact values; Construct a production process compliance proof to prove that the production process follows specific standards without disclosing detailed operation data; Implement identity anonymization verification to verify the producer's qualifications while protecting the identity information; Adopt multi-level anti-counterfeiting verification technology, including: Perform dynamic environment fingerprint verification by comparing the current environment fingerprint with the historical record Verify the authenticity of agricultural products, and the expression is: , where is the verification threshold, and the value range is 0.75 - 0.85; Perform multi-dimensional data consistency verification, identify data anomalies through cross-dimensional data correlation analysis, and the expression is: , where is the weight coefficient of the th dimension, is the consistency threshold, and the value range is 0.8 - 0.9; Perform biomarker verification through specific biomarkers and agricultural product markers Verify the authenticity of the origin. The expression is: , where is the biomarker threshold, and the value range is 0.15 - 0.
25.
9. The method according to claim 2, wherein The time series similarity extraction algorithm further includes: Identify the periodic patterns of agricultural activities, and extract multi-scale periodic features in the data through autocorrelation analysis and wavelet transform; The seasonal decomposition method is used to separate the trend, seasonal, and residual components, with the expression: , where is the original time series, is the trend component, is the seasonal component, is the residual component; Extract and compress the patterns of seasonal components, and the expression is: , where , and are the amplitude, frequency, and phase of the th seasonal pattern, respectively, is the fitting error, and the first major seasonal patterns with a contribution rate exceeding 90% are retained; The trend component is represented by piecewise linearity, and the expression is: , where are the time and value of the piecewise point, is the slope of the line segment; Selectively retain important residual points, and the expression is: , where is the residual retention threshold, and its value range is 1.5 - 2.5, is the standard deviation of the residuals.
10. The method according to claim 3, wherein The adaptive agricultural season consensus algorithm further includes: Automatically switch to an efficient and low-energy consumption consensus mode during the off-season of agricultural production, and the expression is: , where is the target value of node energy consumption at the time point , and is the reference energy consumption value; it automatically switches to the high-throughput consensus mode during the peak agricultural production season, and by dynamically adjusting the block size and the number of verification nodes, the expression is: , , where is the block size at time point , is the block size adjustment amount, set to 30% of the reference value; is the number of verification nodes at time point , is the reference number of verification nodes, is the node number adjustment amount, set to 20% of the reference value.
Citation Information
Patent Citations
Agricultural product supply chain credible tracing model based on PBFT consensus mechanism and implementation method
CN116383869A
Agricultural product quality tracing system based on block chain technology
CN119379315A
Time series data processing device, time series data processing method, and time series data processing program
JP2014185971A
Forecasting field level crop yield during a growing season
US20170161627A1
Systems and methods for trending patterns within time-series data
US20170249649A1
Cited By
Agricultural product full life cycle traceability management system and method
CN120450732A
Crop full life cycle traceability system based on big data
CN120471303A
A big data-based crop full life cycle traceability system
CN120471303B
Block chain-based artificial intelligence big data sharing system and method
CN120724485A
Modern agriculture digital authentication large model
CN120811618A