Tracing system and method based on block chain technology

By verifying the operation timestamp and plot number, evaluating the compliance of growth data, calculating the joint confidence of quality inspection parameters and judging the offset of environmental parameters, the problems of data conflict and anomaly identification in traditional traceability systems are solved, and the integrity and accuracy of traceability queries are improved.

CN120765274AActive Publication Date: 2025-10-10CHENGDU HUINONG INFORMATION TECH CO LTD

Patent Information

Application Number
CN202511254925.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-04
Publication Date
2025-10-10
Estimated Expiration
2045-09-04

AI Technical Summary

Technical Problem

Traditional traceability systems lack operational logic verification at the source of the data, resulting in the risk of batch information conflicts, incomplete environmental parameter inspections, lack of dynamic matching of quality inspection data, difficulty in identifying abnormal operations, and scattered query results, which affects consumer trust.

Method used

The property rights registration module verifies the operation timestamp and plot number, the parameter verification module evaluates the compliance of growth data, the quality inspection label module calculates the joint confidence of quality inspection parameters, and the logistics locking module determines the offset of environmental parameters. A trusted data structure is generated and a traceability audit is performed, introducing the traceability mark and quality traceability code aggregate display.

Benefits of technology

It realizes the logical consistency judgment of operation batch information, identifies abnormal behavior, improves the completeness and accuracy of traceability query results, and significantly improves consumer trust.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120765274A_ABST
    Figure CN120765274A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of product traceability, in particular to a traceability system and method based on a block chain technology, and the system comprises a right confirmation registration module, a parameter verification module, a quality inspection label module, a logistics locking module and a traceability auditing module. According to the method, compliance evaluation is carried out by comparing environmental parameters bound with the operation time period and the land parcel information with an agricultural standard boundary, systematic judgment of land parcel growth conditions can be realized, confidence modeling is carried out on a quality inspection data layer based on a difference value amplitude and a batch mean value, credible label data of batch quality is formed, and the reliability of the quality inspection data layer is improved. Through sequence comparison of storage time periods and carrying timestamps and environmental parameter change frequency deviation judgment, abnormal carrying behaviors and storage fluctuation conditions can be identified, a traceability identification value and quality traceability code bidirectional verification mechanism is introduced in a query response stage, and credible labels, quality inspection states and position information are displayed in an aggregated manner. And the completeness, the accuracy and the result credibility of the traceability query result are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of product traceability, in particular to a traceability system and method based on blockchain technology. BACKGROUND

[0002] The technical field of product traceability involves collecting, recording and managing information throughout the entire process of product production, processing, transportation, storage, sales and other links to achieve traceability and data verifiability of each stage of the product life cycle. This technology is widely used in food safety, drug regulation, supply chain management and other scenarios. By building a multi-node information recording system, data integrity, tamper resistance and transparent management are achieved. Specifically, it includes coding generation mechanism for identifying product identity, distributed data collection interface, traceability information structure modeling, information uploading and verification protocol, and visual query terminal for government, enterprises and consumers.

[0003] Among them, the traceability system based on blockchain technology is a solution system that applies the characteristics of blockchain's non-tamperability and full traceability, used to build a trusted information recording system for agricultural products from production to consumption. The system records data generated at each stage of agricultural production, such as planting, harvesting, processing, packaging, logistics and sales, to ensure the authenticity and consistency of data among multiple nodes, enhance the efficiency of agricultural product quality and safety management, and improve consumers' trust in product origin and quality.

[0004] Traditional traceability systems do not build a verification mechanism based on job logic and plot cycle at the data source, resulting in the risk of overlapping conflicts between different batches of information. In terms of environmental parameter verification, only single-stage data is chained, lacking dynamic matching judgment with agronomic indicators, making non-compliant data easily recorded on the chain, and quality inspection data not based on the relationship with the average of the whole batch for deviation analysis, unable to judge the significance of single batch anomalies. Although the logistics stage includes multi-node data, it lacks a collaborative review mechanism for time series rationality and environmental parameter fluctuation range, making it difficult to identify abnormal operation risks. At the query level, it does not build a result aggregation strategy centered on traceability identification, resulting in a scattered tag set in query response, making it difficult to fully reflect the complete link status from operation to sales, affecting consumers' trust and understanding of the query results. SUMMARY

[0005] The purpose of the present application is to solve the shortcomings in the prior art and to provide a traceability system and method based on blockchain technology.

[0006] In order to achieve the above-mentioned purpose, the present application adopts the following technical scheme: a traceability system based on blockchain technology, the system comprising: The title registration module obtains the operation timestamp, operation number, plot number, and IoT device number of each batch of agricultural products, determines whether the operation timestamp meets the operation cycle sorting logic within the plot, cross-checks the IoT device number with the plot number to see if there is a match, and generates a title batch binding record; The parameter verification module compares the growth agronomic standard value interval set within the plot period based on the binding record of the confirmation batch, evaluates whether the growth data is compliant, and generates growth parameter verification status data; The quality inspection label module calls the growth parameter verification status data, obtains the four quality inspection parameters of the passed batch, namely moisture content, fruit color value, pesticide residue content, and soluble solids content, performs joint confidence calculation, and generates a data structure that can be written on the chain for the corresponding batch, generating a writable quality inspection trusted data structure; The logistics locking module performs a time sequence comparison between the storage time period and the transportation timestamp based on the writable quality inspection trusted data structure, and makes an offset judgment between the number of unit time changes in the two environmental parameter sequences and the set fluctuation tolerance value. If the standards are met, a logistics information binding block structure is generated.

[0007] The improvements of the present invention are that the title confirmation batch binding record includes the job number registration status, the IoT device correspondence and the job time sequence identifier; the growth parameter verification status data specifically includes the environmental parameter legitimacy mark, the plot period matching mark and the offset compliance result item; the writable quality inspection trusted data structure includes the trusted label value, the confidence score result and the on-chain write field set; the logistics information binding block structure specifically refers to the node binding index, the warehouse timing lock value and the environmental parameter fluctuation record.

[0008] The present invention is improved in that the title registration module includes: The time sequence verification submodule obtains the operation timestamp, operation number, plot number, and IoT device number of each batch of agricultural products. Based on the operation timestamp, it extracts the entire operation time point sequence corresponding to the same operation number. It then sorts the time point sequence in chronological order and checks whether there is a reverse order. If there is no reverse order, the number is marked as valid, and the operation sequence validity mark information is generated. The operation plot verification submodule calls the corresponding operation number and plot number for combined mapping based on the operation sequence validity mark information, performs uniqueness screening on all operation numbers in the mapping group, and determines whether there are duplicate or unregistered operation numbers. If there are no abnormal numbers, the plot ownership logic is clear, and the operation plot binding accuracy information is obtained; The equipment-plot matching submodule extracts the IoT device number recorded under the plot number based on the operation plot binding accuracy information, compares the device number with the plot bound to the current operation number one by one, filters the ratio of the number of combination entries with corresponding numbers to the total number of all combinations, and establishes the binding record of the right confirmation batch.

[0009] The present invention is improved in that the parameter verification module includes: The parameter extraction submodule is based on the binding record of the confirmation batch, and according to the plot number and operation timestamp, calls the four environmental monitoring parameters of relative humidity, sunshine duration, soil pH value, and soil temperature corresponding to the corresponding plot number and operation timestamp, and screens out abnormal values ​​and repeated sampling records based on data validity to generate a plot operation environmental parameter value group; The standard comparison submodule extracts the maximum and minimum values ​​in the parameter sequence based on the plot operation environment parameter value group and the growth agronomic standard value interval set for each environmental parameter under the corresponding crop category, calculates the center value of the standard interval, and obtains the boundary adaptation judgment interval information; The legality calculation submodule is based on the boundary adaptation judgment interval information and the plot operation environment parameter value group. According to each group of parameters and the corresponding standard interval center value, the parameter legality score value is calculated and obtained. The score value is compared with the compliance score threshold. If the score value is greater than the threshold, a compliance mark is output to obtain the growth parameter verification status data.

[0010] The present invention is improved in that the quality inspection label module includes: The parameter extraction submodule calls the growth parameter verification status data, obtains the four quality inspection parameters of each batch, namely, moisture content, fruit color value, pesticide residue content, and soluble solid content, according to the batch number marked as passed, and establishes a quality inspection parameter value set; The difference calculation submodule obtains the mean of the same parameter in the total batch according to the quality inspection parameter value set and the batch parameter value corresponding to each parameter item, obtains the sample variation degree and the maximum detection error upper limit of each parameter in the batch, calculates and obtains the parameter joint difference confidence index, and obtains the confidence difference index sequence; The trusted structure generation submodule compares and judges the confidence difference indicator sequence with the set confidence threshold. If the indicator value is less than or equal to the confidence threshold, the corresponding batch number, four quality inspection parameters and calculation results are encapsulated to generate a standard field structure and marked as writable to establish a writable quality inspection trusted data structure.

[0011] The present invention is improved in that the logistics locking module includes: The time matching submodule obtains the storage time period and transportation record timestamp of the corresponding batch based on the writable quality inspection trusted data structure and the batch number, determines whether the transportation timestamp is within the storage time period boundary, and calculates whether the time offset length is less than the time offset limit value to obtain the timing matching stability assessment result; Based on the timing matching stability assessment results, the environmental offset submodule calls the corresponding batch of in-store temperature change sequences and in-store relative humidity sequences, counts the number of changes per unit time in the two sequences, obtains the offset distance from the set temperature and humidity fluctuation tolerance value, constructs a composite index quantitative indicator based on the fluctuation duration and the number of mutations, calculates the environmental offset sensitivity index, compares the index with the tolerance boundary, and obtains the fluctuation offset sensitivity assessment result; The structure generation submodule is based on the fluctuation offset sensitivity assessment result and the timing matching stability assessment result. If both are passed, structured tag information is generated according to the batch number and logistics node identification code to establish a logistics information binding block structure.

[0012] The present invention is improved in that the system further comprises: The traceability audit module generates a traceability identification value based on the block structure bound to the logistics information and the block structure content and batch number. The traceability identification value is written into the blockchain together with the operation number and the plot number as an anchor field. When receiving the agricultural product query parameters entered by the user, the trusted label, quality inspection status, ownership confirmation status, and logistics location data bound to the number in the block are called, and the data is aggregated into a query return format according to the preset display structure to generate a two-way traceability data set for agricultural products. The agricultural product bidirectional traceability dataset includes user retrieval batch index number, trusted parameter display structure, quality control traceability chain node path, traceability return timestamp and data source traceability mapping table.

[0013] The identification generation submodule is based on the block structure bound to the logistics information, performs hash calculation on the batch number according to the block content and the corresponding batch number to generate a batch traceability fingerprint value, and concatenates the traceability fingerprint value with the node identifier in the block to convert it into a string field, establishes a structured coding result according to the conversion rules, and generates batch traceability identification information; The field writing submodule calls the corresponding operation number and plot number information based on the batch traceability identification information, writes the three numbers into the blockchain anchor field, and annotates the field with the write timestamp and operation node number, obtains the on-chain write position index value of the batch, and establishes the anchor field block index information; Based on the anchor field block index information, the data aggregation submodule calls the batch number bound in the received agricultural product query parameter, and sequentially retrieves the trusted label content, quality inspection status results, title confirmation status, and logistics location coordinate values ​​recorded in the anchor block. The four results are aggregated and assembled into a bidirectional display field according to the query structure definition fields to obtain a bidirectional traceability data set for agricultural products.

[0014] The traceability method based on blockchain technology is used to implement the traceability system based on blockchain technology, including the following steps: S1: Obtain the operation timestamp, operation number, plot number, and IoT device number for each batch of agricultural products, determine whether the operation timestamp meets the operation cycle sorting logic within the plot, cross-check whether the IoT device number matches the plot number, and generate a batch binding record for ownership confirmation; S2: Based on the binding record of the land ownership confirmation batch, compare the growth agronomic standard value interval set within the plot period to evaluate whether the growth data is compliant and generate growth parameter verification status data; S3: Call the growth parameter verification status data to obtain the four quality inspection parameters of the passed batch, namely, moisture content, fruit color value, pesticide residue content, and soluble solid content, perform joint confidence calculation, and generate a data structure that can be written on the chain for the corresponding batch, thereby generating a writable quality inspection trusted data structure; S4: Based on the writable quality inspection trusted data structure, a time sequence comparison is performed on the storage time period and the transportation timestamp, and an offset judgment is made between the number of unit time changes in the two environmental parameter sequences and the set fluctuation tolerance value. If the standards are met, a logistics information binding block structure is generated; S5: Based on the logistics information binding block structure, a traceability identification value is generated according to the block structure content and the batch number. The traceability identification value is written into the blockchain together with the operation number and the plot number as the anchor field. When receiving the agricultural product query parameters entered by the user, the trusted label, quality inspection status, ownership confirmation status, and logistics location data bound to the number in the block are called, and aggregated into the query return format according to the preset display structure to generate a two-way traceability data set for agricultural products.

[0015] Compared with the prior art, the advantages and positive effects of the present invention are: In the present application, by cross-verification of the job timestamp with the job number, plot number and Internet of Things device number, a logical consistency judgment rule can be established for the registration information of the job batch, avoiding the data invalidation risk caused by job registration omission or sequence disorder, combining the environmental parameter comparison with the plot information binding agricultural standard boundary for compliance evaluation, which can realize the systematic determination of the plot growth conditions, forming the credible label data of batch quality based on the confidence modeling of difference amplitude and batch mean value in the quality inspection data layer, identifying abnormal handling behavior and storage fluctuation through sequence comparison of storage time period and handling timestamp and environmental parameter change frequency offset judgment, introducing the traceability identification value and quality traceability code two-way verification mechanism in the query response stage, and aggregating and displaying the credible label, quality inspection state and location information, which significantly improves the integrity, accuracy and result credibility of the traceability query result. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 is a schematic diagram of the system structure of the present application; Figure 2 is a schematic diagram of the structure of the acquisition right registration module of the present application; Figure 3 is a schematic diagram of the structure of the acquisition parameter verification module of the present application; Figure 4 is a schematic diagram of the structure of the acquisition quality inspection label module of the present application; Figure 5 is a schematic diagram of the structure of the acquisition logistics locking module of the present application; Figure 6 is a schematic diagram of the structure of the acquisition traceability audit module of the present application. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical scheme and advantages of the present application more clear and explicit, the present application will be further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and do not limit the present application.

[0018] In the description of the present application, it should be understood that the orientation or positional relationship indicated by the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like is based on the orientation or positional relationship shown in the drawings, which is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, in the description of the present application, the meaning of "multiple" is two or more, unless otherwise specifically limited.

[0019] Please refer to Figure 1The application provides a technical scheme: a traceability system based on a blockchain technology, which comprises a right confirmation registration module, a parameter verification module, a quality inspection label module, a logistics locking module and a traceability audit module; The right confirmation registration module acquires the operation timestamp, operation number, plot number and Internet of Things device number of each batch of agricultural products, calls the operation number and plot number to check whether there is an unregistered number, judges whether the operation timestamp meets the plot operation cycle sorting logic, cross-checks the Internet of Things device number according to the plot number to check whether there is a matching item, and generates a right confirmation batch binding record; The parameter verification module generates growth parameter verification state data according to the plot number and operation timestamp based on the right confirmation batch binding record, calls the relative humidity, sunshine duration, soil pH value and soil temperature four parameters recorded in the corresponding plot in the corresponding time period, compares the growth agricultural standard value interval set in the plot cycle, judges whether the parameter offset amplitude is within the boundary range, evaluates whether the growth data is compliant, and generates growth parameter verification state data. The quality inspection label module calls the growth parameter verification state data, acquires the moisture content, fruit color value, pesticide residue content and soluble solid content four quality inspection parameters of the passed batch according to the batch marked as passed, calculates the difference amplitude between the four parameters in the current batch and the average value of the total batch based on the four parameters, and performs joint confidence calculation on the difference amplitude, and if the score exceeds the confidence threshold, a data structure that can be written on the chain is generated for the corresponding batch, and a writable quality inspection credible data structure is generated. The logistics locking module generates a logistics information binding block structure according to the batch number based on the writable quality inspection credible data structure, acquires the storage time period, logistics node identification code, handling record timestamp, in-warehouse temperature change sequence and in-warehouse relative humidity sequence corresponding to the batch, performs time sequence comparison on the storage time period and handling timestamp, judges the offset of the number of unit time changes in the two environmental parameter sequences and the set fluctuation tolerance value, and if the standard is met, generates a logistics chain node marking instruction according to the batch number and node identification code, and generates a logistics information binding block structure. The traceability audit module generates a traceability identification value according to the block structure content and batch number based on the logistics information binding block structure, takes the traceability identification value, operation number and plot number as the anchor field of the blockchain writing together, completes the writing process, and adds quality traceability code and association data set to each traceability record, and when receiving user input agricultural product query parameters, calls the credible label, quality inspection state, right confirmation state and logistics location data bound by the block number, aggregates them into a query return format according to a preset display structure, and generates an agricultural product bidirectional traceability data set. The title confirmation batch binding record includes the operation number registration status, the IoT device correspondence and the operation time sequence identification. The growth parameter verification status data specifically includes the environmental parameter legality mark, the plot period matching mark and the offset compliance result item. The writable quality inspection trusted data structure includes the trusted label value, the confidence score result and the on-chain write field set. The logistics information binding block structure specifically refers to the node binding index, the warehouse timing lock value and the environmental parameter fluctuation record. The agricultural product two-way traceability data set includes the user retrieval batch index number, the trusted parameter display structure, the quality control traceability chain node path, the traceability return timestamp and the data source traceability mapping table.

[0020] See also Figure 2 , the title registration module includes: The time sequence verification submodule obtains the operation timestamp, operation number, plot number, and IoT device number of each batch of agricultural products. Based on the operation timestamp, it extracts the entire operation time point sequence corresponding to the same operation number. It then sorts the time point sequence in chronological order and checks whether there is a reverse order. If there is no reverse order, the number is marked as valid, and the operation sequence validity mark information is generated. Get the operation timestamp and operation number of each batch of agricultural products, use the operation number as the primary key, and extract the time point sequence composed of the corresponding timestamps from the operation log database. For example, the timestamps corresponding to operation number A1001 are 12, 18, and 22 minutes. Convert the time series into a numerical array and sort it in ascending order. Then calculate the difference between the previous and next time points in sequence to determine whether a negative value appears. If there is no negative difference, mark it as a valid time sequence. In this example, the time sequence of A1001 is correct, while the time sequence of A1002 is 05, 11, and 07 minutes. Because 07 is less than 11, it appears in reverse order, so the code The number will be marked as invalid in sequence. During the judgment process, the sequence judgment threshold Δt is set to 0, that is, any time difference less than 0 is in reverse order. The threshold is set based on the fact that the time is recorded in minutes in the job system, and each job is triggered by the system according to the schedule. Setting Δt to 0 is precisely to strictly filter out all data entries that are not executed in sequence. Δt does not adjust with fluctuations in other parameters. The result is obtained based on the timestamp. The time recorded in the log is accurate to 1 minute, so no normalization is required. The time series verification process is performed once for each job number, and finally the job sequence validity mark information of all job numbers is obtained; The operation plot verification submodule uses the operation sequence validity mark information to call the corresponding operation number and plot number for combined mapping. It performs uniqueness screening on all operation numbers in the mapping group to determine whether there are duplicate or unregistered operation numbers. If there are no abnormal numbers, the plot ownership logic is clear and the operation plot binding accuracy information is obtained; Based on the above-obtained job sequence validity marking information, the job numbers marked as valid are extracted and combined with their corresponding plot numbers to form a job-plot mapping set. Then, the mapping set is checked item by item to see if there are multiple plot number mapping items for the job number. If so, it is marked as duplicate plot ownership. Then, it is determined whether each job number exists in the plot registration list. If the job number is not listed in the registration list, it is marked as an unregistered number. The logical judgment conditions are set as follows: the duplicate job ownership judgment condition is that the number of mapping records is greater than 1, and the registration judgment condition is that the job number appears in the plot configuration table. If both conditions are not triggered, the output of its plot ownership logic is clear. Combined with the data example, A1001 and D001 are one-to-one mapped and registered, so it is compliant data, while A1004 maps D001 but is not registered, so the output is marked as non-compliant. After counting the compliance status of all records, this process summarizes and outputs the plot binding accuracy information of each job number. The device-land parcel matching submodule extracts the IoT device number recorded under the parcel number based on the accuracy information of the operation parcel binding, compares the device number with the parcel bound to the current operation number one by one, and screens the ratio of the number of combination entries with corresponding numbers to the total number of all combinations to establish the binding record of the ownership confirmation batch; According to the plot number in the plot binding accuracy information, the device number list under the corresponding plot is extracted from the IoT platform database. The device number is used as a set to form a cross comparison with the operation number bound to the plot. For example, plot number D001 has 4 registered device numbers. If the device numbers appearing in the operation record are also 4 and are exactly the same, it is determined that the match is completed. The matching ratio is set to 4 / 4=1.00. If only 2 are matched, it is 2 / 3=0.67. The matching ratio judgment formula is set as follows: ,in is the number of matches, The total number of registered devices for the plot is calculated, and the calculation ratio is output as the evaluation standard. The matching ratio judgment benchmark value is set to 0.95. This value is set according to the system's requirement for complete record of IoT devices. When the ratio is greater than or equal to 0.95, it is considered a complete match, otherwise it is marked as a binding defect. The benchmark value remains unchanged as the number of devices increases, because the system equipment is configured as a fixed deployment for one plot. Under the premise of highly consistent independence of the plots, the ratio setting is constant, which ensures the stability and reproducibility of the judgment. When the data is considered to be fully bound, a batch binding record of the title confirmation is established by screening records above the matching threshold. The record includes the operation number, plot number, equipment number set and ratio for subsequent writing of the title confirmation block. Table 1 lists the equipment matching results of each plot.

[0021] Table 1 Plot equipment matching ratio table Plot number Total number of bound device numbers Existence number matching number Matching ratio D001 4 4 1.00 D002 3 2 0.67 D003 5 5 1.00 As shown in Table 1, plots 1 and 3 reach the matching benchmark value 1.00 in device binding integrity, while plot 2 only reaches 0.67 due to the missing of 1 device number, which is lower than the set benchmark value of 0.95, and this result is used to judge whether the corresponding batch data is allowed to enter the right chain writing process, thereby supporting the integrity of the traceability data.

[0022] Please refer to Figure 3 , the parameter verification module comprises: The parameter extraction submodule calls the corresponding relative humidity, sunshine duration, soil pH value, and soil temperature four environmental monitoring parameters based on the right batch binding record according to the plot number and operation timestamp, and generates a plot operation environment parameter value group according to the data validity to exclude abnormal values and repeated sampling records. After obtaining the plot number and operation timestamp in the right batch binding record, the environmental monitoring data in the current operation period is extracted, and the four environmental parameters collected by the monitoring terminal, i.e. relative humidity, sunshine duration, soil pH value, and soil temperature, are called, and the record points in the corresponding time period are filtered according to the operation timestamp. In order to eliminate the interference of abnormal records, first, the relative humidity data is subjected to five-point sliding median processing, and the abnormal points deviating from the median by more than 15% in the sliding window are removed. The basis for setting this 15% abnormality removal threshold is that the historical monitoring data of the plot shows that the relative humidity change amplitude in the normal growth period is stable between 5% and 12%, so the fluctuation identification threshold is set to 15% by increasing the safety redundancy. For the sunshine duration data, if there are multiple records in the same time period, the latest collection time is used as the basis to filter a single record, and the rest are discarded. For soil pH value, the average drift amplitude of consecutive measuring points is used as the boundary, and if it exceeds, the sequence segment is deleted. For soil temperature data, the record points with too high collection frequency are standardized by using a 5-minute interval sampling standard. Finally, through the above filtering rules, an operation period effective monitoring data structure containing 4 parameters and unit time average expression is formed, which is the plot operation environment parameter value group used for subsequent legality comparison and evaluation.

[0023] The standard comparison submodule extracts the maximum value and minimum value in the parameter sequence based on the plot operation environment parameter value group according to the set growth agronomic standard value interval of each environmental parameter under the corresponding crop category, calculates the center value of the standard interval, and obtains the boundary adaptation determination interval information. Based on the generated plot operation environment parameter value group, the agronomic standard interval of each parameter under the corresponding crop category is extracted, and the maximum value and minimum value identification operation is performed on each type of parameter to construct an effective response interval. For example, the soil temperature parameter is set to a standard interval of 17°C to 24°C, and the interval center value is , set the standard interval to refer to the optimum temperature zone for crop root activity. For example, if the minimum temperature measured during the plot operation period is 16.8°C and the maximum is 23.9°C, then the calculated interval span is 7.1°C and the center value is 20.35°C. Then the standard comparison interval is ±3.55°C, which is symmetrical on both sides. Similarly, the interval span and center value of relative humidity, pH value, and sunshine duration are calculated according to the set standard upper and lower limits, and finally the center point value and boundary distance set of the four environmental indicators are formed as the legality formula. and The source of Table 2 Growth standard value interval and center value table Parameter name Standard lower limit Standard upper limit Standard interval span Center value Relative humidity (%) 60 80 20 70.0 Sunshine duration (h) 6 10 4 8.0 Soil pH 5.5 7.5 2.0 6.5 Soil temperature (℃) 17 24 7 20.5 As shown in Table 2, the standard interval span Directly calculated from the difference between the upper and lower limits of the standard, the center value It is the arithmetic mean of the corresponding upper and lower limits, and is used to measure the offset position of the monitoring value.

[0024] The legality calculation submodule is based on the boundary adaptation judgment interval information and the land operation environment parameter value group. According to each group of parameters and the corresponding standard interval center value, the formula is used: ; The calculation obtains the parameter legality score value, combines the score value with the compliance score threshold for comparison, and outputs a compliance mark if the score value is greater than the threshold, and obtains the growth parameter verification status data; in, Represents the legitimacy score value, Indicates the Normalized values ​​of environmental monitoring parameters, Indicates the The item corresponds to the normalized value of the center value of the standard interval, Indicates the The normalized value of the standard interval span, represents the measurement stability factor (dimensionless value, indicating the monitoring continuity mean deviation rate within the period), Indicates the device synchronization rate factor (a dimensionless value that reflects the cumulative synchronization rate of devices in the same plot during the time period). Indicates the total number of parameters; According to the boundary adaptation judgment interval information obtained above, the deviation is calculated by combining the average value of each parameter in the operation cycle, and the measured average value is set to , the standard center value is , the standard interval span is , the standardized deviation degree is measured by the ratio of the absolute value of the deviation to the span, for example, the average measured value of the relative humidity is 73%, the standard center value is 70%, and the span is 20%, then the standardized deviation value is After processing all four parameters in turn, the standardized total deviation degree is obtained.

[0025] Formula: ; The calculation logic of each part is as follows: First part : represents the standardized deviation calculation for all parameter items, by comparing the normalized value of the environmental monitoring parameter with the normalized value of the standard interval center value , and normalizing the difference to the standard interval span , the standard deviation of each parameter is obtained, and the total deviation degree is obtained by summing all parameter items; Second part : represents the measurement stability correction factor, is the stability coefficient of the sampling point in the work cycle, the higher the value, the greater the fluctuation, is used to shrink the deviation degree to reduce the interference of unstable data on evaluation; Third part : is the device synchronization rate correction factor, is the actual synchronization rate (dimensionless) of the device in this cycle, can effectively amplify the influence degree in the case of low synchronization rate, and stretch and amplify the overall deviation index, reflecting the potential risk under the lack of synchronization.

[0026] The three parts work together to build a composite scoring system that unifies the deviation degree, measurement stability and device consistency, where each factor participates in the weighting or scaling process, influencing each other, reflecting the multi-dimensional constraint logic of data quality. The overall function is to build the compliance score value of the growth environment monitoring parameters in the work cycle, that is, the legality score value , the lower the value, the smaller the deviation, the more stable the data and the stronger the device consistency, the higher the compliance; the higher the value, the greater the deviation degree or the poorer the data quality.

[0027] Combine the score value with the system set compliance score threshold of 0.500, which is the maximum acceptable deviation proportion limit calculated by the agricultural department according to the crop tolerance boundary, if , it is determined that the environmental data is compliant, otherwise it is marked as non-compliant. For example, if the average deviation sum of the four parameters is 0.66, , ,but: ; Will After comparing with the threshold, it can be seen that it falls within the compliance range, so the system can output growth parameter verification status data accordingly.

[0028] The core value of this calculation logic lies in that it not only considers whether the parameter itself is close to the standard range, but also combines the reliability of monitoring and the synchronization integrity of the equipment to avoid false compliance judgments caused by sampling anomalies, synchronization lags and other problems, thereby ensuring the authenticity and reliability of data in subsequent agricultural product certification and supervision links.

[0029] See also Figure 4 , the quality inspection label module includes: The parameter extraction submodule calls the growth parameter verification status data and obtains the four quality inspection parameters of each batch, namely moisture content, fruit color value, pesticide residue content, and soluble solid content, according to the batch number marked as passed, and establishes a quality inspection parameter value set; Call the batch number marked as passed in the growth parameter verification status data to obtain the four quality inspection parameters of each batch: moisture content, fruit color value, pesticide residue content, and soluble solid content. In the specific operation, the batch number that has passed the verification is indexed into the corresponding database record in sequence to obtain batch-level quality inspection data. During each call, confirm that the data timestamp is in the sample valid period, delete the timeout record and confirm according to the latest test result. For example, the quality inspection parameter extraction for batch number A001 obtains the following results: moisture content 84%, color value 6.8, pesticide residue content 0.042mg / kg, soluble solids 9.3%. After repeating the above steps for multiple batches, merge the four test data corresponding to each batch and store them as a structured data vector, that is, establish a batch-level quality inspection parameter value set. The set is arranged in a matrix format, with the rows being the batch numbers and the columns being the four parameter items. For example, batches A001, A002, and A003 correspond to four columns of test parameters. Verify whether the set structure is missing or has abnormal values ​​(such as negative values ​​or exceeding the reasonable upper limit). If so, remove the corresponding samples or fill in the correctable data to establish a quality inspection parameter value set. The difference calculation submodule obtains the mean of the same parameter in the total batch based on the quality inspection parameter value set and the batch parameter value corresponding to each parameter item, and obtains the sample variation degree and the maximum detection error limit of each parameter in the batch using the formula: ; Calculate and obtain the confidence index of the joint difference of parameters to obtain a confidence difference index sequence; in, represents the confidence index of the joint difference of parameters, Indicates the Normalized value of quality inspection parameters, Indicates the The term corresponds to the normalized value of the whole batch mean, Indicates the Item parameter correlation coefficient (value range is , measured by Pearson correlation between parameters), Indicates the normalized value of the maximum detection error upper limit among the four parameters of this batch. represents the coefficient of variation within the sample (normalized by the standard deviation), Indicates the total number of parameter items; According to the batch parameter value corresponding to each parameter item in the quality inspection parameter value set, first extract the sample mean of each column parameter item. For example, the average of all batch moisture content parameter items is 82.6%, which is used as the benchmark mean of moisture content of the entire batch, and is recorded as At the same time, the standard deviation of each parameter in this batch is calculated and normalized to the sample variation coefficient , extract the sample with the largest detection error in the batch, such as the maximum detection error of pesticide residue content is 0.008mg / kg, and obtain it after normalization , calculate the Pearson correlation coefficient matrix based on the previous training data and extract the corresponding , the correlation data between some parameters are listed below: Table 3 Correlation coefficient matrix between quality inspection parameters Parameter items Moisture content Fruit color value Pesticide residue content Soluble solids content Moisture content 1.000 0.678 0.212 0.793 Fruit color value 0.678 1.000 0.344 0.702 Pesticide residue content 0.212 0.344 1.000 0.233 Soluble solids content 0.793 0.702 0.233 1.000 As shown in Table 3, there is a strong correlation between the parameters, such as moisture content and soluble solids content. , the linkage amplification effect of this parameter on the offset must be considered in batch-level difference analysis, so the following formula is used for unified measurement: ; The calculation logic of this formula is as follows: the numerator represents the degree of difference of all parameters, the square root factor of the Pearson correlation coefficient is introduced into each item to perturb and weight the difference, highlighting the joint offset effect of the differences between related items, and the denominator adopts a composite measure of the coefficient of variation and the error factor. Used to suppress the interference of uneven detection errors on the overall offset, Reflects the uncertainty risk brought by the volatility of the data itself, and the overall composition parameter joint difference confidence index If the value of a batch is: moisture content , the mean of the entire batch , correlation coefficient , detection error , sample standard deviation ,but: ; This value represents the confidence difference between the overall quality inspection parameters of the current batch and the average level. The lower the value, the smaller the deviation and the stronger the confidence, and the confidence difference index sequence is obtained; The trusted structure generation submodule compares the confidence difference indicator sequence with the set confidence threshold. If the indicator value is less than or equal to the confidence threshold, the corresponding batch number, four quality inspection parameters and calculation results are encapsulated to generate a standard field structure and marked as writable, thus establishing a writable quality inspection trusted data structure. Based on the comparison and judgment of the confidence difference index sequence and the preset confidence threshold, the system sets the confidence threshold to 0.120. This value is set by the parameter fluctuation range and error acceptance evaluation of different categories in the previous training samples. It is suitable for crop groups with medium physiological parameter fluctuation range. If the confidence index , the batch is marked as a trusted quality inspection record, encapsulating the corresponding batch number and four quality inspection parameters, along with the indicator calculation results to form a standard field structure. The field structure includes multiple parameters such as parameter key name, value item, sampling time, and calculation indicator. Finally, it is unified into a writable status record and outputs a writable quality inspection trusted data structure. This structure will be used in scenarios such as standard trusted block generation and consistency verification on the logistics information chain.

[0030] See also Figure 5 , the logistics locking module includes: The time matching submodule is based on a writable quality inspection trusted data structure. It obtains the storage time period and transportation record timestamp of the corresponding batch according to the batch number, determines whether the transportation timestamp is within the storage time period boundary, and calculates whether the time offset length is less than the time offset limit value to obtain the timing matching stability assessment result. Based on the batch number in the writable quality inspection trusted data structure, the start and end times of the storage time period and the actual handling record timestamp of each batch recorded in the cold chain system are obtained, and data items consisting of "start time-end time" pairs and single timestamps are extracted. The timestamps are formatted uniformly and converted into continuous time numerical sequences. The boundaries of each handling record timestamp and its corresponding storage time period are judged to calculate whether the timestamp is between the start and end times. If the timestamp is earlier than the start time or later than the end time, it is considered "out of bounds", otherwise it is considered "in bounds". For the "out of bounds" case, its time difference is further compared with the set time offset limit value (such as 10 minutes). If it is less than the limit value, it is marked as an acceptable offset. After calling multiple batches, the judgment results are aggregated by batch number and classified into three levels: "complete match", "small offset within the boundary", and "non-compliant outside the boundary". Finally, the matching stable state ratio of each batch is calculated to obtain the timing matching stability assessment result. The environmental offset submodule calls the temperature change sequence and relative humidity sequence of the corresponding batch based on the time series matching stability assessment results, counts the number of changes per unit time in the two sequences, obtains the offset distance from the set temperature and humidity fluctuation tolerance value, and constructs a composite index quantitative indicator based on the fluctuation duration and the number of mutations. The formula is: ; Obtaining the environmental offset sensitivity index through calculation, comparing the index with the tolerance boundary, and obtaining the fluctuation offset sensitivity assessment result; in, represents the result of the fluctuation offset sensitivity assessment, Indicates the The normalized value of the number of temperature changes in a time period, Indicates the The normalized value of the temperature fluctuation tolerance value corresponding to each time period, Indicates the Normalized value of humidity change times within a time period, Indicates the The normalized value of the humidity fluctuation tolerance value corresponding to each time period, The normalized value representing the duration of the total fluctuation, Indicates the number of temperature and humidity change sensors in the warehouse. Indicates the total number of time periods; According to the results of the timing matching stability assessment, extract the temperature change sequence and humidity change sequence in the library uploaded by the temperature and humidity monitoring equipment bound to the corresponding batch, unify the sampling frequency and obtain the number of changes per unit time. For each unit time period, such as 5 minutes, extract the number of temperature changes. and humidity changes , and respectively with the set temperature tolerance and humidity tolerance Perform normalized comparison. If the temperature changes 5 times in a single period and the temperature tolerance is 4 times, the offset ratio is After collecting data items in all time periods, the offset results are calculated as follows: ; The numerator is the sum of the absolute values ​​of the temperature and humidity deviation ratios in each period, which generally reflects the relative deviation of the number of fluctuations from the standard tolerance; the denominator is the environmental fluctuation penalty term. Represents the sensitive penalty effect caused by the increase in fluctuation duration, It represents the reliability compensation caused by cross-monitoring of multiple sensors, so that the suppression offset noise caused by high-frequency redundant monitoring can be quantitatively compensated; the overall formula structure reflects the combined effects of single offset, overall disturbance and sensor network, and the final calculated environmental offset sensitivity index is As when the molecular term is 2.85, 、 Then: ; The value is used to determine whether the overall fluctuation exceeds the warning limit. The system sets the threshold value to 0.300. If it is lower than the value, it is judged as fluctuation control compliance, and the fluctuation deviation sensitivity evaluation result is generated. To assist the numerical comparison process, the temperature and humidity fluctuation data of some batches are summarized as follows: Table 4 Temperature and humidity fluctuation statistics

[0031] As shown in Table 4, the fluctuation sensitivity calculation value of A001 batch is 0.238, which is less than the threshold value 0.300, so it is judged as compliance.

[0032] The structure generation submodule is based on the fluctuation deviation sensitivity evaluation result and the timing matching stability evaluation result. If both pass, the structured mark information is generated according to the batch number and the logistics node identification code, and the logistics information binding block structure is established. The structure generation submodule is based on the fluctuation deviation sensitivity evaluation result and the timing matching stability evaluation result. If both pass, the structured mark information is generated according to the batch number and the logistics node identification code, and the logistics information binding block structure is established. Based on the timing matching stability evaluation result and the fluctuation deviation sensitivity evaluation result obtained as described above, if both are marked as compliance by the system, the system extracts the binding logistics node identification code according to the corresponding batch number, assembles the structured mark field, which contains five data units of batch number, node identification code, carrying time mark, sensitivity value and matching state mark, and calls the block construction module to write it on the chain to establish the logistics information binding block structure. The structure will be used in subsequent logistics process information chain verification, deviation signal tracing and other traceability audit scenarios.

[0033] Please refer to Figure 6 , the traceability audit module includes: The identification generation submodule is based on the logistics information binding block structure, and according to the block content and the corresponding batch number, the batch number is hashed to generate a batch traceability fingerprint value, and the traceability fingerprint value is spliced with the node identification in the block to convert it into a string field. According to the conversion rule, the structured encoding result is established, and the batch traceability identification information is generated. After obtaining the block content in the logistics information binding block structure, the SHA-256 cryptographic hash function is used to perform a one-time digest conversion on the batch number according to the batch number contained in each structure, and a fixed-length hash output is obtained as the batch traceability fingerprint value. This value is unique and irreversible. Subsequently, the logistics node identification field, such as the node code ID, transshipment link code, etc., is parsed from the structure and combined with the hash fingerprint value to form a string field, such as the format "HashValue_NodeID". According to the field structure rules defined by the system, such as adding separators every 6 bits and reserving bytes, the structured conversion is completed, and finally a traceability identification coding result with fixed field length, unified format and unique content is established, i.e., batch traceability identification information; The field writing submodule calls the corresponding operation number and plot number information based on the batch traceability identification information, writes the three numbers into the blockchain anchor field, and annotates the field with the timestamp and operation node number, obtains the on-chain write position index value of the batch, and establishes the anchor field block index information; Based on the batch traceability identification information generated above, the job number and plot number bound to it are obtained, and a block field string that can be anchored is constructed by fixed-length splicing between numbers. The structural order is "traceability identification-job number-plot number". After the field merging is completed, the current system record timestamp value and the node number that performed the operation are appended. The node number is automatically marked by the execution server or verification node to form a complete field content with traceability positioning and operation traces. The blockchain write interface is called to write it into the current chain structure. The system assigns an on-chain index number to each written content as a unique access entry. The number format is such as "BlockPos_0045". When multiple batches are written in parallel, it ensures that the index does not conflict. Finally, a unique on-chain access index is established for each batch to form the anchor field block index information; The data aggregation submodule calls the batch number bound to the received agricultural product query parameters based on the anchor field block index information, and sequentially retrieves the trusted label content, quality inspection status results, ownership confirmation status, and logistics location coordinate values ​​recorded in the anchor block. The four results are aggregated and assembled into a bidirectional display field according to the query structure definition fields to obtain the agricultural product bidirectional traceability dataset; Based on the anchor field block index information obtained above, after receiving the agricultural product query parameter entered by the user, such as "batch number B10023", the system parses the block location pointed to by it from the index information and extracts the four core traceability field contents recorded in the block one by one: trusted label content such as "organic logo" and "green certification code", quality inspection status results such as "qualified" and "under re-inspection", ownership identification status such as "confirmed" and "unverified", and logistics location coordinate values ​​such as "113.2564°E, 29.8765°N". The above content is aggregated according to the visualization fields defined by the system to generate a form-based and list-based two-way display format field. This field structure supports forward tracing to the place of origin and reverse tracing back to the circulation path, completing the assembly of the agricultural product two-way traceability data set. The display fields of some batches are shown in the following table: Table 5 Schematic diagram of agricultural product traceability fields Batch number Trusted Label Quality inspection status Title confirmation status Logistics coordinates B10023 Organic certification qualified Title confirmed 113.2564E, 29.8765N B10024 Green logo qualified Title confirmed 113.2611E, 29.8811N B10025 —— To be tested Unverified —— As shown in Table 5, in different batches, there are cases where field information is complete or missing. The corresponding field values ​​are backfilled based on the on-chain record results. The display structure is used as the data input source for the user-side backtracking function interface.

[0034] The traceability method based on blockchain technology includes the following steps: S1: Obtain the operation timestamp, operation number, plot number, and IoT device number for each batch of agricultural products, determine whether the operation timestamp meets the operation cycle sorting logic within the plot, cross-check whether the IoT device number matches the plot number, and generate a batch binding record for ownership confirmation; S2: Based on the binding records of the land ownership confirmation batch, the data is compared with the growth agronomic standard value range set within the plot cycle to evaluate whether the growth data is compliant and generate growth parameter verification status data; S3: Call the growth parameter verification status data to obtain the four quality inspection parameters of the passed batch: moisture content, fruit color value, pesticide residue content, and soluble solids content. Perform a joint confidence calculation and generate a data structure that can be written on the chain for the corresponding batch, generating a writable quality inspection trusted data structure. S4: Based on a writable quality inspection trusted data structure, a time series comparison is performed between the storage time period and the transportation timestamp. The offset between the number of unit time changes in the two environmental parameter sequences and the set fluctuation tolerance value is determined. If the standards are met, a logistics information binding block structure is generated. S5: Based on the logistics information binding block structure, according to the block structure content and batch number, generate the traceability identification value, take the traceability identification value, work number and plot number as the anchor field of the block chain, when receiving the user input agricultural product query parameter, call the trusted label, quality inspection state, right confirmation state and logistics location data bound in the block number, aggregate into the query return format according to the preset display structure, and generate the agricultural product two-way traceability data set.

[0035] The above is only the preferred embodiment of the present application, not other forms of the present application, any skilled in the art can use the above disclosed technical content to change or modify as equivalent embodiments applied to other fields, but any simple modification, equivalent change and modification of the above embodiments without departing from the technical solution content of the present application, according to the technical essence of the present application, still belongs to the protection scope of the technical solution of the present application.

Claims

1. The traceability system based on blockchain technology is characterized by: The system comprises: The title registration module obtains the operation timestamp, operation number, plot number, and IoT device number of each batch of agricultural products, determines whether the operation timestamp meets the operation cycle sorting logic within the plot, cross-checks the IoT device number with the plot number to see if there is a match, and generates a title batch binding record; The parameter verification module compares the growth agronomic standard value interval set within the plot period based on the binding record of the confirmation batch, evaluates whether the growth data is compliant, and generates growth parameter verification status data; The quality inspection label module calls the growth parameter verification status data, obtains the four quality inspection parameters of the passed batch, namely moisture content, fruit color value, pesticide residue content, and soluble solids content, performs joint confidence calculation, and generates a data structure that can be written on the chain for the corresponding batch, generating a writable quality inspection trusted data structure; The logistics locking module performs a time sequence comparison between the storage time period and the transportation timestamp based on the writable quality inspection trusted data structure, and makes an offset judgment between the number of unit time changes in the two environmental parameter sequences and the set fluctuation tolerance value. If the standards are met, a logistics information binding block structure is generated.

2. The traceability system based on blockchain technology according to claim 1 is characterized in that: The title confirmation batch binding record includes the job number registration status, the IoT device correspondence and the job time sequence identifier; the growth parameter verification status data specifically includes the environmental parameter legitimacy mark, the plot period matching mark and the offset compliance result item; the writable quality inspection trusted data structure includes the trusted label value, the confidence score result and the on-chain write field set; the logistics information binding block structure specifically refers to the node binding index, the warehouse timing lock value and the environmental parameter fluctuation record.

3. The traceability system based on blockchain technology according to claim 1 is characterized in that: The title registration module includes: The time sequence verification submodule obtains the operation timestamp, operation number, plot number, and IoT device number of each batch of agricultural products. Based on the operation timestamp, it extracts the entire operation time point sequence corresponding to the same operation number. It then sorts the time point sequence in chronological order and checks whether there is a reverse order. If there is no reverse order, the number is marked as valid, and the operation sequence validity mark information is generated. The operation plot verification submodule calls the corresponding operation number and plot number for combined mapping based on the operation sequence validity mark information, performs uniqueness screening on all operation numbers in the mapping group, and determines whether there are duplicate or unregistered operation numbers. If there are no abnormal numbers, the plot ownership logic is clear, and the operation plot binding accuracy information is obtained; The equipment-plot matching submodule extracts the IoT device number recorded under the plot number based on the operation plot binding accuracy information, compares the device number with the plot bound to the current operation number one by one, filters the ratio of the number of combination entries with corresponding numbers to the total number of all combinations, and establishes the binding record of the right confirmation batch.

4. The traceability system based on blockchain technology according to claim 1 is characterized in that: The parameter verification module includes: The parameter extraction submodule is based on the binding record of the confirmation batch, and according to the plot number and operation timestamp, calls the four environmental monitoring parameters of relative humidity, sunshine duration, soil pH value, and soil temperature corresponding to the corresponding plot number and operation timestamp, and screens out abnormal values ​​and repeated sampling records based on data validity to generate a plot operation environmental parameter value group; The standard comparison submodule extracts the maximum and minimum values ​​in the parameter sequence based on the plot operation environment parameter value group and the growth agronomic standard value interval set for each environmental parameter under the corresponding crop category, calculates the center value of the standard interval, and obtains the boundary adaptation judgment interval information; The legality calculation submodule is based on the boundary adaptation judgment interval information and the plot operation environment parameter value group. According to each group of parameters and the corresponding standard interval center value, the parameter legality score value is calculated and obtained. The score value is compared with the compliance score threshold. If the score value is greater than the threshold, a compliance mark is output to obtain the growth parameter verification status data.

5. The traceability system based on blockchain technology according to claim 1 is characterized in that: The quality inspection label module includes: The parameter extraction submodule calls the growth parameter verification status data, obtains the four quality inspection parameters of each batch, namely, moisture content, fruit color value, pesticide residue content, and soluble solid content, according to the batch number marked as passed, and establishes a quality inspection parameter value set; The difference calculation submodule obtains the mean of the same parameter in the total batch according to the quality inspection parameter value set and the batch parameter value corresponding to each parameter item, obtains the sample variation degree and the maximum detection error upper limit of each parameter in the batch, calculates and obtains the parameter joint difference confidence index, and obtains the confidence difference index sequence; The trusted structure generation submodule compares and judges the confidence difference indicator sequence with the set confidence threshold. If the indicator value is less than or equal to the confidence threshold, the corresponding batch number, four quality inspection parameters and calculation results are encapsulated to generate a standard field structure and marked as writable to establish a writable quality inspection trusted data structure.

6. The traceability system based on blockchain technology according to claim 1 is characterized in that: The logistics locking module includes: The time matching submodule obtains the storage time period and transportation record timestamp of the corresponding batch based on the writable quality inspection trusted data structure and the batch number, determines whether the transportation timestamp is within the storage time period boundary, and calculates whether the time offset length is less than the time offset limit value to obtain the timing matching stability assessment result; Based on the timing matching stability assessment results, the environmental offset submodule calls the corresponding batch of in-store temperature change sequences and in-store relative humidity sequences, counts the number of changes per unit time in the two sequences, obtains the offset distance from the set temperature and humidity fluctuation tolerance value, constructs a composite index quantitative indicator based on the fluctuation duration and the number of mutations, calculates the environmental offset sensitivity index, compares the index with the tolerance boundary, and obtains the fluctuation offset sensitivity assessment result; The structure generation submodule is based on the fluctuation offset sensitivity assessment result and the timing matching stability assessment result. If both are passed, structured tag information is generated according to the batch number and logistics node identification code to establish a logistics information binding block structure.

7. The traceability system based on blockchain technology according to claim 1 is characterized in that: The system further comprises: The traceability audit module generates a traceability identification value based on the block structure bound to the logistics information and the block structure content and batch number. The traceability identification value is written into the blockchain together with the operation number and the plot number as an anchor field. When receiving the agricultural product query parameters entered by the user, the trusted label, quality inspection status, ownership confirmation status, and logistics location data bound to the number in the block are called, and the data is aggregated into a query return format according to the preset display structure to generate a two-way traceability data set for agricultural products. The agricultural product bidirectional traceability dataset includes user retrieval batch index number, trusted parameter display structure, quality control traceability chain node path, traceability return timestamp and data source traceability mapping table.

8. The traceability system based on blockchain technology according to claim 1 is characterized in that: The traceability audit module includes: The identification generation submodule is based on the block structure bound to the logistics information, performs hash calculation on the batch number according to the block content and the corresponding batch number to generate a batch traceability fingerprint value, and concatenates the traceability fingerprint value with the node identifier in the block to convert it into a string field, establishes a structured coding result according to the conversion rules, and generates batch traceability identification information; The field writing submodule calls the corresponding operation number and plot number information based on the batch traceability identification information, writes the three numbers into the blockchain anchor field, and annotates the field with the write timestamp and operation node number, obtains the on-chain write position index value of the batch, and establishes the anchor field block index information; Based on the anchor field block index information, the data aggregation submodule calls the batch number bound in the received agricultural product query parameter, and sequentially retrieves the trusted label content, quality inspection status results, title confirmation status, and logistics location coordinate values ​​recorded in the anchor block. The four results are aggregated and assembled into a bidirectional display field according to the query structure definition fields to obtain a bidirectional traceability data set for agricultural products.

9. The traceability method based on blockchain technology is characterized by: The method is used to implement the traceability system based on blockchain technology according to any one of claims 1 to 8, comprising the following steps: S1: Obtain the operation timestamp, operation number, plot number, and IoT device number for each batch of agricultural products, determine whether the operation timestamp meets the operation cycle sorting logic within the plot, cross-check whether the IoT device number matches the plot number, and generate a batch binding record for ownership confirmation; S2: Based on the binding record of the land ownership confirmation batch, compare the growth agronomic standard value interval set within the plot period to evaluate whether the growth data is compliant and generate growth parameter verification status data; S3: Call the growth parameter verification status data to obtain the four quality inspection parameters of the passed batch, namely, moisture content, fruit color value, pesticide residue content, and soluble solid content, perform joint confidence calculation, and generate a data structure that can be written on the chain for the corresponding batch, thereby generating a writable quality inspection trusted data structure; S4: Based on the writable quality inspection trusted data structure, a time sequence comparison is performed on the storage time period and the transportation timestamp, and an offset judgment is made between the number of unit time changes in the two environmental parameter sequences and the set fluctuation tolerance value. If the standards are met, a logistics information binding block structure is generated; S5: Based on the logistics information binding block structure, a traceability identification value is generated according to the block structure content and the batch number. The traceability identification value is written into the blockchain together with the operation number and the plot number as the anchor field. When receiving the agricultural product query parameters entered by the user, the trusted label, quality inspection status, ownership confirmation status, and logistics location data bound to the number in the block are called, and aggregated into the query return format according to the preset display structure to generate a two-way traceability data set for agricultural products.

Citation Information

Patent Citations

  • Agricultural product quality control traceability platform based on block chain

    CN111680865A

  • Food safety uplink data credibility measurement method based on block chain

    CN113591148A

  • Product quality accident tracing method and system based on block chain

    CN118278950A

  • Organic fertilizer quality safety traceability management method based on multi-source data

    CN119228397A

  • Food traceability method based on intelligent Internet of Things information

    CN119558870A

Cited By

  • Standard system efficiency evaluation data tracing method based on block chain technology

    CN121786095A

  • Blockchain technology-based standard system efficiency evaluation data traceability method

    CN121786095B

  • Portable agricultural product quality tracing method and system based on block chain

    CN121998670A

  • Blockchain-based portable agricultural product quality traceability method and system

    CN121998670B

  • Standardized data management method for potato starch food material production

    CN122064687A