A digital traceability system and method for agricultural product supply chain information

By using blockchain technology to standardize information format conversion, link hash chains, and supplement distributed ledgers in the agricultural product supply chain, the problems of data fragmentation and lack of correlation under multi-level distributors are solved, and the reliability and transparency of traceability are improved.

CN122199000APending Publication Date: 2026-06-12WUHAN TUOYUNDA TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN TUOYUNDA TECH CO LTD
Filing Date
2026-03-13
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing agricultural product traceability methods struggle to achieve segmented accumulation and effective correlation of information within multi-level distributor supply chains, leading to data fragmentation and a lack of correlation, which affects the reliability of traceability and consumer trust.

Method used

Initial traceability data is collected through a blockchain platform, standardized format conversion is performed, upstream and downstream information is linked using a hash chain mechanism, continuity is verified using timestamps and batch numbers, missing fragments are supplemented using a distributed ledger, and multi-level data is nested and linked to ensure that the information is tamper-proof. A transparent and traceable path is built through data aggregation and access control.

Benefits of technology

It significantly improves the reliability of agricultural product traceability and consumer trust, ensures data continuity and immutability, and provides transparent traceability paths and visual reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122199000A_ABST
    Figure CN122199000A_ABST
Patent Text Reader

Abstract

The application provides a kind of digital traceability system and method of agricultural product supply chain information, comprising: collecting initial traceability data from each link of supply chain through blockchain platform, segmenting information of multi-level distributors is converted to standard format, and a uniform data block set is obtained;If data fracture is detected in continuous cumulative sequence, the missing segment is supplemented by querying historical records through the distributed ledger of blockchain, and the complete sequence after repair is obtained;By obtaining the refined traceability chain, a query index structure is constructed, access control and real-time update mechanism are performed for insufficient transparency, and the complete path traceable by consumers is determined;According to the determined complete path, a visual report is generated, the integrity of the report is verified by using hash chain, and the final output of improving traceability reliability is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information technology, and in particular to a digital traceability system and method for agricultural product supply chain information. Background Technology

[0002] Digital traceability research in the agricultural product supply chain is a crucial field, directly impacting food safety, consumer trust, and the sustainable development of the agricultural industry. As consumers become increasingly concerned about food origin and quality, establishing a transparent and credible traceability system has become key to safeguarding market order and public interests. However, research and practice in this area still face numerous challenges, urgently requiring innovative breakthroughs to address complex real-world issues.

[0003] Currently, existing methods for agricultural product traceability are often ill-suited to the complex distribution environment involving multiple links and stakeholders in the supply chain. Many schemes lack effective integration mechanisms during information transmission, leading to data gaps or losses at different stages, especially when multiple levels of distributors are involved, making it difficult to guarantee the integrity and consistency of information. This problem not only affects the reliability of traceability but also significantly diminishes consumer trust in the products.

[0004] From a technical perspective, the core challenge in agricultural product supply chain traceability lies in handling the segmented accumulation and correlation of information across multiple levels of distribution. First, each link in the supply chain (such as production, processing, and distribution) generates new information. This information needs to be accurately transmitted between different entities and integrated into a coherent whole. However, due to the lack of a unified method for segmented recording, the information is often fragmented. Second, this fragmentation further leads to a lack of information correlation; data from upstream and downstream links struggle to form an organic whole, failing to clearly show the complete flow path of the product. For example, in actual business, a primary distributor may record the product's packaging time and batch number, but secondary distributors cannot effectively integrate this information with their own logistics data. Ultimately, consumers can only see scattered fragments when querying the supply chain, unable to understand the entire process from planting to sales.

[0005] Therefore, how to achieve segmented accumulation and effective correlation of traceability information in a complex supply chain involving multiple levels of distributors, ensuring that data from each link can be accurately recorded and connected into a complete path, has become a key issue that this research urgently needs to address. Solving this problem will directly affect consumers' trust in the origin of agricultural products and will also provide important support for transparent supply chain management. Summary of the Invention

[0006] This invention provides a digital traceability system and method for agricultural product supply chain information, mainly including: Initial traceability data is collected from each link of the supply chain through a blockchain platform, and the segmented information of multi-level distributors is standardized and converted into a unified set of data blocks. Based on a unified set of data blocks, a hash chain mechanism is used to link information fragments from upstream and downstream links. Timestamps and batch numbers are matched and verified for correlation missing syndromes to determine continuous cumulative sequences. If a data break is detected in a continuous cumulative sequence, the missing fragments are supplemented by querying historical records through the distributed ledger of the blockchain to obtain a repaired complete sequence. Obtain the repaired complete sequence, perform hierarchical nesting and association of distributor data with multiple circulation links, and use blockchain consensus algorithm to confirm the immutability of information at each layer and determine the validity of the association relationship; Extract the bottlenecks that make it difficult to connect paths from the valid relationships; use data aggregation functions to merge duplicate or redundant fragments to obtain a refined traceability chain for information fragmentation. By constructing a query index structure based on the refined traceability chain obtained, and implementing access control and real-time update mechanisms to address insufficient transparency, the complete traceability path for consumers can be determined. A visual report is generated based on the determined complete path, and the integrity of the report is verified using a hash chain, resulting in a final output that improves the reliability of traceability.

[0007] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: This invention discloses a digital traceability system and method for agricultural product supply chain information. Addressing the issues of fragmented, disconnected, and opaque data across multiple levels of distributors in the agricultural product supply chain, it proposes a logically interconnected solution. The core problem lies in the vulnerability of supply chain information to data breaks, redundancy, and tampering risks during multi-stage circulation, impacting traceability reliability. This invention standardizes data blocks through format conversion, uses a hash chain mechanism to link upstream and downstream information, and combines timestamp verification to correct data gaps. It supplements historical records using a distributed ledger, nesting and associating multi-level data to ensure information immutability. Through data aggregation and refinement of the traceability chain, it constructs a query index and sets access controls to achieve a transparent and traceable path, ultimately generating a visual report and verifying its integrity. The most critical innovation of this invention lies in using blockchain technology to ensure data continuity and immutability, significantly improving the reliability of agricultural product traceability and consumer trust. Attached Figure Description

[0008] Fig. 1 This is a flowchart of a digital traceability system and method for agricultural product supply chain information according to the present invention.

[0009] Fig. 2This is a schematic diagram of a digital traceability system and method for agricultural product supply chain information according to the present invention.

[0010] Fig. 3 This is another schematic diagram of a digital traceability system and method for agricultural product supply chain information according to the present invention. Detailed Implementation

[0011] The technical solutions of the embodiments of the present invention will be clearly and thoroughly described below with reference to the accompanying drawings. The described embodiments are merely some embodiments of the present invention.

[0012] like Figs. 1-3 This embodiment of a digital traceability system and method for agricultural product supply chain information may specifically include: S101. Initial traceability data is collected from each link of the supply chain through the blockchain platform, and the segmented information of multi-level distributors is standardized and converted into a unified data block set.

[0013] Initial traceability data is obtained from the supply chain through a blockchain platform. Segmented information flows from multi-level distributors are processed to obtain preliminary data records. Based on these preliminary records, the segmented information flows are transformed using a standardized format. Format conversion methods are applied to data from different sources to determine a unified data structure. If fields are missing or formats are inconsistent within the unified data structure, the data is supplemented and adjusted according to preset rules to obtain standardized data units. For these standardized data units, a secondary verification of the traceability data source is performed using an information collection method to determine if the data meets preset integrity standards. If the data meets the integrity standards, the standardized data units are integrated into unified data blocks through a data processing flow, resulting in a set of data blocks available for subsequent analysis. Based on these unified data blocks, a support vector machine algorithm is used to classify the data block set, determining the correlation distribution of each data block in the supply chain. The classified data block set is then mapped to the business flow of multi-level distributors to obtain the final traceability data flow map.

[0014] Specifically, in the business scenario of the high-end wine supply chain, initial traceability data is stored in a dispersed manner across blockchain nodes of wineries, logistics providers, multi-level distributors, and retail terminals. Due to the differences in the information systems of each participant, distributor A may use XML format to record inbound information, while distributor B may use JSON format to record outbound information, resulting in mixed data stream formats. In this case, a standardized format conversion method is needed to uniformly convert the "production date: 2023 / 10 / 01" in distributor A's data and the "timestamp: 1696118400" in distributor B's data into the standard time format "YYYY-MM-DDHH:MM:SS", and uniformly map different field names such as "item code" and "SKU_ID" to a "unique traceability ID", thereby determining a unified data structure.

[0015] In one possible implementation, if the "transit warehouse temperature" field for a batch of beverages is found to be missing in the unified data structure, the system will trigger preset rules to automatically retrieve temperature records of other batches of goods in the same warehouse within that time period and interpolate to complete the data. If the "weight" field is found to have inconsistent formats, such as "500g" and "0.5kg", the system will automatically perform numerical conversion and unit unification. This standardization of data units effectively eliminates noise from multi-source heterogeneous data, laying the foundation for subsequent high-precision analysis. For the standardized data units, the system further employs information collection methods for secondary verification. For example, by comparing the intersection coordinates of the GPS trajectory data of logistics vehicles with the blockchain records, the system determines whether the physical displacement matches the digital records. If the data meets the preset integrity standards, the entire supply chain information of that batch of beverages from factory to shelf is integrated into a unified data block.

[0016] For example, based on the generated unified data blocks, the support vector machine algorithm is used to classify the data block set. "Transportation time," "number of transfers," and "ambient temperature and humidity fluctuations" can be used as feature vectors input into the model. The algorithm constructs a hyperplane to divide the data block set into categories such as "efficient flow," "potential delays," or "storage anomalies."

[0017] For example, the algorithm identifies data blocks from a first-tier distributor to a second-tier distributor where the temperature fluctuation characteristic value consistently exceeds the standard threshold, classifying it as an abnormal correlation distribution. Ultimately, based on these categorized data blocks, the system can accurately map the business flow between multi-tier distributors, generating a visualized traceability data flow map. This not only reconstructs the true distribution path of the beverages but also reveals efficiency bottlenecks and quality risks in the supply chain through correlation distribution.

[0018] S102. Based on a unified set of data blocks, a hash chain mechanism is used to link information fragments in the upstream and downstream links. For the missing association syndrome, timestamps and batch numbers are matched and verified to determine the continuous cumulative sequence.

[0019] The process begins by acquiring raw information fragments from a data block set. These fragments are then preliminarily categorized and organized based on upstream and downstream information. By comparing them against a unified data standard, the system determines whether the fragments conform to preset format requirements, resulting in a categorized set of information fragments. A hash chain mechanism is then used to link these categorized fragments. For the chaining process, hash values ​​are calculated to determine the connection relationship between each fragment and its upstream and downstream information, constructing a preliminary sequence structure. To address the issue of missing associations in the preliminary sequence structure, timestamp matching is used to verify the time order of each information fragment. If the timestamp order is inconsistent, the fragment positions are adjusted to obtain time-calibrated sequence data. Based on the time-calibrated sequence data, batch number verification logic is used to check if the batch identifiers of each fragment are consecutive. If there are jumps in batch numbers, the missing positions are marked, determining the complete sequence framework for each batch. Using this complete batch sequence framework, combined with information integrity requirements, the system detects whether there are any missing data fragments in the sequence. If missing fragments are detected, corresponding supplementary information is extracted from the data block set to obtain the filled sequence content. For the filled sequence content, data verification logic is applied to verify the integrity and consistency of the continuous cumulative sequence. By comparing the verification value generated by the hash chain mechanism, it is determined whether the sequence meets the expectations, and the final continuous sequence is constructed.

[0020] Specifically, in acquiring raw information fragments, the system first faces massive and disorganized supply chain data, such as various documents for a batch of electronic components from factory to distribution. The classification and organization of upstream and downstream information involves marking the component manufacturer's shipping order as the upstream starting point and the primary distributor's receiving order as the downstream node. By comparing data against a unified standard, if the system finds that GPS data uploaded by a logistics provider lacks latitude and longitude fields, it will determine that it does not meet the preset format requirements and will be removed or marked, thereby ensuring the quality of the basic data for subsequent processing.

[0021] In one possible implementation, using a hash chain mechanism to link the categorized information fragments is the core of constructing an immutable sequence.

[0022] For example, when a manufacturer ships segment A, it generates a hash value H1. When a distributor receives segment B and generates its own data, it must include H1 as a preceding pointer to generate a new hash value H2. This nested calculation method establishes a unique parent-child connection between segment A and segment B, constructing a preliminary chained sequence structure. If someone attempts to tamper with the quantity of segment A, H1 will change, causing the checksum stored in segment B to become inconsistent, thus quickly locating the breakpoint.

[0023] For example, secondary verification using timestamp matching is crucial to address potential time logic errors in the initial sequence structure. Suppose an anomaly occurs in the data stream where goods are received before shipment—for instance, the distributor's receipt timestamp is 10:00, while the manufacturer's shipment timestamp is 12:00. The system identifies this paradox and adjusts the segment positions based on the standard time source to restore the true business sequence. Building on this, batch number verification logic checks continuity. If batch numbers 1001 and 1003 exist in the sequence, but 1002 is missing, the system immediately marks the missing position. Then, the system extracts the corresponding information for batch number 1002 from the backtracking data block set and fills in the missing information. The hash chain mechanism is then applied again to calculate the cumulative checksum of the entire sequence. Only when the final calculated hash value perfectly matches the expected integrity fingerprint can the continuous cumulative sequence be considered successfully constructed, thus achieving accurate reconstruction and rigorous monitoring of the entire supply chain process.

[0024] S103. If data breaks are detected in a continuous cumulative sequence, the missing segments are supplemented by querying historical records through the distributed ledger of the blockchain to obtain a repaired complete sequence.

[0025] By monitoring the accumulated sequence in real time, data breaks are detected. If a data break is found during the scan, the break location and time range are recorded, obtaining the identification information of the broken segment. Based on the identification information of the broken segment, a distributed ledger supported by blockchain technology is accessed to initiate a data query request, extracting historical records within the time period related to the break location from the ledger to obtain the corresponding original data segment. The obtained historical record segments are then subjected to format consistency verification. If the format of the historical record segment does not match that of the accumulated sequence, the format is adjusted according to preset conversion rules to obtain a standardized data segment. By comparing the standardized data segment with the break location, it is determined whether there is data overlap or missing data. If data overlap exists, duplicate parts are removed; if missing data exists, the missing interval is marked to obtain the range of data to be supplemented. Based on the range of data to be supplemented, relevant historical records are queried again from the distributed ledger to extract supplementary data segments. Combined with the existing standardized data segments, a preliminary repaired sequence content is generated. For the preliminary repaired sequence content, a continuity verification is performed to determine whether the timestamps of each data point in the sequence are continuous. If the timestamps are not continuous, a linear interpolation method is used to fill the small gaps to obtain the final complete data sequence.

[0026] Specifically, real-time monitoring and break detection of accumulated sequences are key to ensuring the continuity of data flow.

[0027] In one possible implementation, the system continuously tracks sensor data streams throughout the logistics supply chain, such as temperature monitoring sequences. Assuming the system's preset sampling frequency is once per minute, if the monitoring logic detects no data entry between 10:00 and 10:30, it identifies a data gap. The system automatically records the start time (10:00) and end time (10:30) of the gap, along with the relevant device ID or batch number, as identifiers of the gap. This mechanism can quickly pinpoint the problem area, avoiding ineffective troubleshooting of all data and significantly improving fault response speed.

[0028] In one embodiment, data repair using distributed ledger technology is a core means of ensuring data credibility. When the system initiates a query to the blockchain network based on identification information, it obtains the original voucher based on the immutability of the ledger.

[0029] For example, for the aforementioned broken time period, the system retrieves the hash records and corresponding original payloads uploaded to the chain within that period from various nodes of the distributed ledger. Since the storage formats of different nodes may differ, the retrieved historical record fragments may be in JSON format, while the local cumulative sequence requires XML format. In this case, a format consistency check must be performed, converting JSON key-value pairs into XML tags using preset mapping rules to obtain standardized data fragments, ensuring compatibility for subsequent processing.

[0030] For example, when comparing standardized data with the break points, it might be found that data retrieved from the ledger covers the time period from 09:55 to 10:15. Since the local sequence already includes data before 10:00, the system will identify the 09:55 to 10:00 period as an overlapping portion and remove it, retaining only the valid supplementary data from 10:00 to 10:15. Simultaneously, the system identifies that there are still missing data from 10:15 to 10:30, marks it as a new range to be supplemented, and triggers a secondary query. This iterative repair logic can accurately fill data gaps and prevent storage waste caused by data redundancy.

[0031] Understandably, final continuity verification and gap filling are the last line of defense for improving sequence usability. Suppose that in the repaired sequence, the data value at 10:15:00 is 20.5, and the next data point appears at 10:15:05 with a value of 20.6, resulting in a 5-second sampling gap. Instead of performing cumbersome on-chain queries, the system uses linear interpolation to calculate values ​​between 10:15:01 and 10:15:04 as 20.52, 20.54, etc. This approach ensures smooth data trends while significantly reducing computational resource consumption, guaranteeing that the final, complete data sequence can be directly used by downstream analysis models.

[0032] S104. Obtain the repaired complete sequence, perform hierarchical nesting association of distributor data with multiple circulation links, use blockchain consensus algorithm to confirm the immutability of information at each layer, and determine the validity of the association relationship.

[0033] The process begins by acquiring the repaired complete data sequence and initially organizing the distributor information in the distribution chain. Layered processing technology is used to classify and store the data according to a hierarchical structure, resulting in a layered dataset. For this layered dataset, a nested hierarchical method is employed to construct the relationships between the distributor layer and the distribution chain. Mapping technology is used to generate a nested data model, determining the connection paths between layers. Based on these connection paths, blockchain technology is applied to distribute the data at each layer. A consensus algorithm is used to verify the integrity and consistency of the information at each layer, ensuring data immutability. Verified data records are then acquired, and consistency checks are performed on the relationships within the nested structure. If a mismatch is detected between a layer and its preceding or following layers, tracing technology is used to locate the abnormal node and obtain the corrected relationship information. Using this corrected relationship information, key nodes in the information hierarchy undergo secondary verification. If the verification results show that the data accuracy is below a preset threshold, supplementary recording methods are used to fill in the missing parts, determining the final hierarchical data. Based on the final hierarchical data, a complete relationship view between the distributor layer and the distribution chain is generated. Visualization technology is used to present the full picture of the nested hierarchy, resulting in an accurate mapping of business relationships. For accurate business relationship mapping, all verification and association information is stored in a distributed ledger, and the data of each node is updated through a periodic synchronization mechanism to determine the long-term consistency of the overall data.

[0034] Specifically, after obtaining the complete restored data sequence, the core of processing distributor information in the distribution process lies in constructing a multi-dimensional, hierarchical nested model. This model is not a simple linear arrangement, but rather stratifies distributors by provincial level, city level, and terminal retailer.

[0035] For example, by using first-tier distributors as root nodes and second-tier distributors as child nodes, a hierarchical nesting method can be used to map data such as logistics tracking numbers and warehouse status to specific parent-child relationships, thereby determining the connection paths between levels. This structured storage method effectively reduces the complexity of retrieving massive amounts of data. Applying blockchain technology for distributed recording of data at each level is crucial to ensuring data trustworthiness.

[0036] For example, when a primary distributor transfers ownership of goods to a secondary distributor, the system calculates the hash value of the data at that level and verifies it among network nodes using a consensus algorithm. If a node attempts to tamper with the shipping time, the consensus mechanism will reject the record due to a hash mismatch, thus ensuring the immutability of the data.

[0037] It's important to note that the consistency check of relationships within a nested structure aims to address the issue of data silos between levels. For example, if the check reveals that a second-tier distributor's incoming quantity exceeds a first-tier distributor's outgoing quantity, or that the incoming time is earlier than the outgoing time, the system will immediately trigger traceability technology. By locating the anomaly, the system analyzes timestamps and transaction signatures to identify logical errors caused by data entry delays or system clock asynchrony. It then automatically corrects the relationship information, ensuring a closed-loop data logic between upstream and downstream systems.

[0038] In one embodiment, the corrected correlation information, especially key nodes involving fund settlement, requires secondary verification. If the verification result shows that the accuracy of the circulation path of a certain batch of goods is less than 98.5%, the system will automatically call the supplementary record method to extract the missing handover vouchers from the backup logs or sidechains to fill in the gaps. Ultimately, the correlation view generated based on this accurate data can intuitively display the complete link from source to end in the form of a topology map. Any anomalies at any node will be highlighted in the view, greatly improving the efficiency and transparency of business supervision, and ensuring continuous consistency through a regular synchronization mechanism.

[0039] S105. Extract the bottlenecks in path connection difficulties from the valid relationships, and use data aggregation functions to merge duplicate or redundant segments to obtain a refined traceability chain.

[0040] This document outlines business expansion strategies for attributes such as relationships, critical paths, bottleneck nodes, information fragments, data aggregation, duplicate segments, redundant segments, traceability chains, path extraction, simplification, merging operations, and chain construction. Attributes that cannot form logical connections are discarded. The following technical process steps are generated around the goal of building a simplified traceability chain: Step 1: Retrieve all data records related to the critical path from a pre-established relationship database. Perform initial screening on these records to obtain a path dataset containing potential bottleneck nodes. Step 2: Based on the path dataset, analyze each node in the critical path using a traversal approach to determine if there is traffic congestion or latency anomalies. If an abnormal node is detected, it is identified as a bottleneck node, and a bottleneck node set is output. Step 3: For the bottleneck node set, retrieve related information fragment data. By comparing the content fields of the information fragments, determine if there are duplicate segments. If duplicate segments exist, perform deduplication to obtain a deduplicated information fragment set. Step 4: Based on the deduplicated information fragment set, further analyze redundant segments. Use data aggregation functions to merge segments with similar content, outputting a merged, simplified information unit. Step 5: By simplifying information units and combining path extraction logic, an initial traceability chain is constructed. The chain is then checked for redundant paths; if any are found, irrelevant paths are removed, resulting in an optimized chain structure. Step 6: Based on the optimized chain structure, a final verification of the chain construction is performed. Consistency checks are conducted on the relationships between nodes in the chain, outputting a complete and simplified traceability chain.

[0041] In one possible implementation, the system extracts the critical path of goods from the master distributor to the end consumer from the database, based on the relationships within the distributor network.

[0042] For example, a path dataset containing 15 flow nodes is extracted from the flow record of a certain batch of goods. By traversing these nodes and analyzing their data flow time differences, if it is found that the data dwell time of a certain secondary distributor node exceeds a preset threshold of 48 hours, indicating obvious traffic congestion, then the node is identified as a bottleneck node.

[0043] It should be noted that for the bottleneck nodes identified above, the system will collect a large amount of information fragments generated by them, such as multiple warehouse entry scan records or duplicate quality inspection documents.

[0044] For example, when comparing the content fields of these information fragments, if three duplicate fragments with similar timestamps and the same operator are found, deduplication is performed. For the remaining redundant fragments, a data aggregation function is used to merge the scattered inventory information from the same batch and the same warehouse, outputting a concise information unit containing the core flow status.

[0045] In one possible implementation, based on the aforementioned simplified information units and combined with path extraction logic, the system begins to construct the initial traceability chain.

[0046] For example, during the construction process, if a branch path is found to contain only invalid return / exchange attempt records and has not formed an actual physical flow, it is determined to be a redundant path and removed. Through this simplification process, the main flow nodes are retained, and finally, consistency checks are performed on the relationships between each node to ensure that the upstream and downstream document numbers are completely matched, thereby completing the construction of a complete and streamlined traceability chain.

[0047] S106. Construct a query index structure using the obtained refined traceability chain, implement access control and real-time update mechanisms to address insufficient transparency, and determine the complete traceability path for consumers.

[0048] The data acquisition module of the traceability chain obtains original transaction records and flow information from each node of the supply chain and stores them in a pre-established distributed database to obtain a preliminary chain dataset. Based on this preliminary dataset, an index structure generation module classifies and hierarchically processes the data, forming a multi-dimensional query index framework to determine traceable structured paths. For these structured paths, an access control module is implemented. If a query request from a consumer group is detected, the corresponding data access scope is allocated according to a preset permission level to determine whether to open specific chain node information. A real-time update module monitors the information flow status of supply chain nodes. If data changes are detected, an automatic synchronization mechanism is triggered to update the relevant records in the index structure, obtaining the latest traceability path information. Based on the latest traceability path information, and in conjunction with the system linkage module, the updated data is pushed to the query interface of the consumer group to obtain real-time feedback data and determine whether the feedback meets the requirements for complete records. After obtaining the feedback data, a data security module encrypts sensitive fields during the information flow process, and a layered verification mechanism is used to determine whether the data obtained by the consumer group is protected. Based on the above processing results, the linkage control mechanism module dynamically adjusts the access policy for nodes with insufficient transparency. If the permission verification fails, the display scope of relevant information is restricted, thus obtaining the final controlled traceability path.

[0049] Specifically, in the data collection and index building phase of the traceability chain, the system does not simply pile up data, but rather standardizes and cleans massive amounts of heterogeneous data through a distributed database. Assuming there are three core nodes in the supply chain—manufacturers, logistics providers, and retailers—the collection module captures original records such as production batch number 20231015A, logistics tracking number LOG8892, and warehousing timestamps. To address the information fragmentation issue mentioned in previous steps, the index structure generation module builds a multi-dimensional inverted index, reorganizing the 10,000 flow records originally scattered across different servers according to a three-dimensional coordinate system of "time-location-batch," forming a visualized structured path. This processing method significantly reduces query latency, compressing the average retrieval time for cross-node data from 2.5 seconds to less than 0.3 seconds, ensuring the smoothness of subsequent traceability.

[0050] For example, when implementing access control and real-time updates, the system needs to precisely balance information transparency and privacy. When a group of consumers initiates a traceability request for a high-end food product, the system first identifies the requester. If the requester is identified as an ordinary consumer, the access level is set to Level 1, displaying only the place of origin, production date, and compliance certificates. If the requester is a regulatory agency, the access level is raised to Level 3, allowing access to specific quality inspection parameters and logistics temperature curves. If a cold chain disruption occurs during transport, the real-time update module will detect abnormal values ​​uploaded by the temperature sensor, such as a sudden rise from 4 degrees Celsius to 12 degrees Celsius. The system will immediately trigger an automatic synchronization mechanism, marking the path segment as "abnormal" in the index and pushing this warning to the consumer's query interface through the system linkage module. This ensures the authenticity and completeness of the feedback data and avoids misleading users with outdated information.

[0051] In one possible implementation, the system employs a combination of layered encryption and dynamic policy adjustment to address data security and dynamic control mechanisms. For sensitive fields in the flow process, such as supplier procurement costs or specific warehouse addresses, the data security module uses asymmetric encryption algorithms to ensure that even if data is intercepted at the transmission layer, it cannot be recovered. Simultaneously, a layered verification mechanism checks the legitimacy of each data call. If a node fails to provide complete compliance proof in five consecutive queries, or its data update delay exceeds a preset threshold of two hours, the linkage control mechanism module automatically lowers the node's trust score and dynamically tightens its information display scope; for example, temporarily hiding the node's detailed qualification information and retaining only basic flow records until rectification is completed. This dynamic adjustment mechanism not only protects core business secrets but also compels all links in the supply chain to improve the standardization of data maintenance, ultimately forming a streamlined traceability chain that is both secure and controlled, as well as efficient and transparent.

[0052] S107. Generate a visualization report based on the determined complete path, verify the integrity of the report using a hash chain, and obtain the final output that improves the reliability of traceability.

[0053] Using the acquired complete path data, a segmented parsing method is employed to process the path information, determining the connection order and data content of each node in the path. Based on the parsed path node information, a corresponding visual report is generated, graphically displaying the path's connection relationships to obtain a preliminary report framework. For the data nodes in the preliminary report framework, hash chain technology is applied to perform node-by-node data verification, judging the integrity of each node's data. If a mismatch is detected between the data node content and the hash value, the node is marked as an anomaly, and the anomaly marking result is obtained. Based on the anomaly marking result, the data records in the path confirmation stage are re-verified, and the original information of the anomaly nodes is verified using a comparison method to determine the basis for repairing the anomaly nodes. The anomaly nodes are corrected based on the repair basis, generating corrected path data. The integrity of the corrected data is then verified again using hash chain technology to obtain the final verification result. Based on the final verification result, the visual report content is updated, generating a final output containing integrity verification information. The output content is then judged to meet the preset reliability standards; if it does, the output process is completed.

[0054] In one possible implementation, the system uses a segmented parsing method to process the acquired complete agricultural product supply chain path data.

[0055] Specifically, the entire supply chain is divided into four main segments: planting, processing, warehousing, and transportation. During the analysis process, the system extracts the node connection sequence for each segment, such as the flow from the orchard harvesting node to the cleaning and packaging node, and then to the cold chain transportation node. Based on this analyzed node information, the system generates a preliminary visual report. This report uses a tree diagram to intuitively display the flow of agricultural products from their place of origin to the terminal store, allowing consumers to clearly see the sequence and connection status of each link, thus improving the intuitiveness and readability of traceability information.

[0056] Specifically, after the initial reporting framework is established, the system introduces hash chain technology to verify each data node one by one. The hash chain forms a tightly linked chain by including the hash value of the previous node in the data of the current node.

[0057] For example, the records at processing nodes contain hash values ​​of planting node data. The system calculates the hash value of the actual data at the current processing node and compares it with the expected hash value stored on the blockchain. If the hash value of the temperature record at a cold chain transportation node for a batch of agricultural products does not match the pre-stored value, the system will immediately mark that transportation node as abnormal. This mechanism can accurately pinpoint the specific stage at which data has been tampered with or lost, ensuring the authenticity and reliability of traceability data.

[0058] It's important to note that after acquiring the anomaly marker, the system triggers a repair and secondary verification process. For the anomalies at the aforementioned cold chain transportation nodes, the system retrieves and compares the original sensor records from the distributed database at the time the batch of agricultural products left the warehouse to determine whether the anomaly is due to data loss caused by network transmission or other reasons. Once the basis for repair is found, the system corrects the data for that node, regenerates its hash value, and performs another hash chain integrity check. When all nodes pass verification, the system updates the visualization report, removes the anomaly warning marker, and outputs a final traceability report containing information indicating that the integrity verification passed. This not only ensures the absolute accuracy of information obtained by consumers but also significantly enhances the reliability of data flow throughout the entire supply chain.

[0059] If the technical solution of this application involves personal information, the product using this solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If sensitive personal information is involved, the user's separate consent has been obtained before processing, and the "express consent" requirement is met. For example, a clear sign is placed at the collection device such as a camera to inform the user that they have entered the collection area, and the user's voluntary entry is considered as consent; or the processing device clearly indicates the processing rules and obtains authorization through pop-up windows or by asking the user to upload information themselves. The personal information processing rules include the processor, the purpose of processing, the processing method, and the types of personal information.

[0060] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to any specific implementation. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims

1. A digital traceability system and method for agricultural product supply chain information, characterized in that, The method includes: Initial traceability data is collected from each link of the supply chain through a blockchain platform, and the segmented information of multi-level distributors is standardized and converted into a unified set of data blocks. Based on a unified set of data blocks, a hash chain mechanism is used to link information fragments from upstream and downstream links. Timestamps and batch numbers are matched and verified for correlation missing syndromes to determine continuous cumulative sequences. If a data break is detected in a continuous cumulative sequence, the missing fragments are supplemented by querying historical records through the distributed ledger of the blockchain to obtain a repaired complete sequence. Obtain the repaired complete sequence, perform hierarchical nesting and association of distributor data with multiple circulation links, and use blockchain consensus algorithm to confirm the immutability of information at each layer and determine the validity of the association relationship; Extract the bottlenecks that make it difficult to connect paths from the valid relationships; use data aggregation functions to merge duplicate or redundant fragments to obtain a refined traceability chain for information fragmentation. By constructing a query index structure based on the refined traceability chain obtained, and implementing access control and real-time update mechanisms to address insufficient transparency, the complete traceability path for consumers can be determined. A visual report is generated based on the determined complete path, and the integrity of the report is verified using a hash chain, resulting in a final output that improves the reliability of traceability.

2. The digital traceability system and method for agricultural product supply chain information according to claim 1, characterized in that, The process involves collecting initial traceability data from various stages of the supply chain through a blockchain platform, standardizing the format of segmented information from multi-level distributors, and obtaining a unified set of data blocks, including: Initial traceability data is obtained from the supply chain through a blockchain platform, and the segmented information flow of multi-level distributors is processed to obtain preliminary data records. Based on the initial data records, the segmented information streams were converted using a standardized format. Format conversion methods were implemented for data from different sources to determine a unified data structure. If there are missing fields or inconsistent formats in the unified data structure, the data will be completed and adjusted according to preset rules to obtain standardized data units. For standardized data units, an information collection method is used to perform secondary verification of the data source to determine whether the data meets the preset integrity standards. If the data meets the integrity criteria, the standardized data units are integrated into a unified data block through the data processing flow, resulting in a set of data blocks that can be used for subsequent analysis. Based on the unified data blocks, the support vector machine algorithm is used to classify the data block set and determine the correlation distribution of each data block in the supply chain. By mapping the business flow of multi-level distributors through the classified data block set, the final traceability data flow map is obtained.

3. The digital traceability system and method for agricultural product supply chain information according to claim 1, characterized in that, The process involves linking information fragments from upstream and downstream stages using a hash chain mechanism based on a unified data block set, and performing timestamp and batch number matching verification for association missing symptom to determine continuous cumulative sequences, including: The original information fragments in the data block set are obtained, and the upstream and downstream information is initially classified and organized. By comparing with the unified data standard, it is determined whether the information fragments meet the preset format requirements, and the classified information fragment set is obtained. A hash chain mechanism is used to link the classified information fragments. For the information fragment chaining process, hash value calculation is applied to determine the connection relationship between each fragment and the upstream and downstream information, and a preliminary sequence structure is constructed. To address the issue of missing associations in the initial sequence structure, the time order of each information segment is verified by timestamp matching. If the timestamp order is inconsistent, the segment positions are adjusted to obtain time-calibrated sequence data. Based on the time-calibrated sequence data, the batch number verification logic is used to check whether the batch identifiers of each segment are continuous. If there are jumps in the batch number, the missing positions are marked to determine the complete sequence framework of the batch. By using a complete batch sequence framework and combining information integrity requirements, the system detects whether there is missing data in the sequence. If a missing segment is detected, the corresponding supplementary information is extracted from the data block set to obtain the filled sequence content. For the filled sequence content, data verification logic is applied to verify the integrity and consistency of the continuous cumulative sequence. By comparing the verification value generated by the hash chain mechanism, it is determined whether the sequence meets the expectations, and the final continuous sequence is constructed.

4. The digital traceability system and method for agricultural product supply chain information according to claim 1, characterized in that, If a data break is detected in a continuous cumulative sequence, the missing segments are supplemented by querying historical records through the distributed ledger of the blockchain to obtain a repaired complete sequence, including: By monitoring the accumulated sequence in real time, we can detect whether there is any data breakage. If data breaks are detected during the scanning process, the location and time range of the break are recorded to obtain the identification information of the broken segments; Based on the identification information of the fractured fragments, access the distributed ledger supported by blockchain technology, initiate a data query request, extract historical records within the time period related to the fractured location from the ledger, and obtain the corresponding raw data fragments. Perform format consistency checks on the acquired historical record fragments; If the format of the historical data fragment does not match that of the cumulative sequence, the format is adjusted according to the preset conversion rules to obtain the standardized data fragment; By comparing the standardized data fragments with the break points, it can be determined whether there is data overlap or missing data. If there is data overlap, the duplicates will be removed. If there are missing data, mark the missing intervals to obtain the range of data to be supplemented; Based on the range of data to be supplemented, relevant historical records are queried again from the distributed ledger to extract supplementary data fragments. Combined with existing standardized data fragments, preliminary repair sequence content is generated. For the initially repaired sequence content, a continuity verification is performed to determine whether the timestamps of each data point in the sequence are continuous. If the timestamps are not continuous, the tiny gaps are filled by linear interpolation to obtain the final complete data sequence.

5. The digital traceability system and method for agricultural product supply chain information according to claim 1, characterized in that, The process of obtaining the repaired complete sequence involves hierarchically nesting and associating distributor data across multiple distribution channels. A blockchain consensus algorithm is used to confirm the immutability of information at each layer and to determine the validity of the association relationships. This includes: Obtain the complete data sequence after repair, perform preliminary sorting of distributor information in the distribution process, and classify and store the data according to the hierarchical structure using layered processing technology to obtain a layered data set; For the layered dataset, a hierarchical nesting method is used to construct the relationship between the distributor layer and the distribution links. A nested data model is generated through mapping technology to determine the connection path between the layers. Based on the connection path between layers, blockchain technology is applied to distribute the data of each layer, and the integrity and consistency of the information of each layer are verified through consensus algorithms to determine the immutability of the data. Obtain verified data records and perform consistency checks on the relationships in the nested structure. If a mismatch is detected between a certain level of data and the levels above and below, the abnormal node is located through tracing technology to obtain the corrected relationship information. Using the corrected association information, a second verification is performed on key nodes in the information hierarchy. If the verification result shows that the data accuracy is lower than the preset threshold, the missing part is filled by supplementary recording method to determine the final hierarchy data. Based on the final hierarchical data, a complete relationship view between the distributor layer and the distribution process is generated. The entire nested hierarchy is presented through visualization technology to obtain an accurate mapping of business relationships. For accurate business relationship mapping, all verification and association information is stored in a distributed ledger, and the data of each node is updated through a periodic synchronization mechanism to determine the long-term consistency of the overall data.

6. The digital traceability system and method for agricultural product supply chain information according to claim 1, characterized in that, The process of extracting path connections from valid relationships addresses bottlenecks and employs data aggregation functions to merge duplicate or redundant segments to obtain a refined traceability chain. This includes: Business expansion is carried out for attributes such as correlation, critical path, bottleneck node, information fragment, data aggregation, duplicate fragment, redundant fragment, traceability chain, path extraction, simplification, merging operation and chain construction. Attributes that cannot form a logical connection are discarded. The following technical process steps are generated around the goal of building a simplified traceability chain. Step 1: Obtain all data records involving the critical path from the pre-established relational database, perform preliminary screening on these records, and obtain a path dataset containing potential bottleneck nodes; Step 2: Based on the path dataset, analyze each node in the critical path using a traversal method to determine whether there is traffic congestion or abnormal latency. If an abnormal node is detected, determine that the node is a bottleneck node and output the bottleneck node set. Step 3: For the bottleneck node set, obtain the related information fragment data, and determine whether there are duplicate fragments by comparing the content fields of the information fragments. If duplicate fragments exist, perform deduplication to obtain the deduplicated information fragment set. Step 4: Based on the deduplicated information fragment set, further analyze the redundant fragments, use data aggregation functions to merge fragments with similar content, and output the merged concise information unit; Step 5: By simplifying information units and combining path extraction logic, construct an initial traceability chain, determine whether there are redundant paths in the chain, and if there are redundant paths, remove irrelevant paths to obtain the optimized chain structure. Step Six: Based on the optimized chain structure, perform the final verification of chain construction, conduct consistency checks on the relationships between nodes in the chain, and output a complete and concise traceability chain.

7. The digital traceability system and method for agricultural product supply chain information according to claim 1, characterized in that, The process involves constructing a query index structure using the refined traceability chain obtained, implementing access control and real-time update mechanisms to address insufficient transparency, and determining the complete traceability path for consumers, including: The data collection module of the traceability chain obtains original transaction records and circulation information from each node of the supply chain and stores them in a pre-established distributed database to obtain a preliminary chain dataset. Based on the initial chain dataset, an index structure generation module is used to classify and hierarchically process the data, forming a multi-dimensional query index framework and determining a traceable structured path; For structured paths, an access control module is implemented. If a query request from a consumer group is detected, the corresponding data access range is allocated according to the preset permission level, and it is determined whether to open specific chain node information. The real-time update module monitors the information flow status of supply chain nodes. If data changes are detected, an automatic synchronization mechanism is triggered to update the relevant records in the index structure and obtain the latest traceability path information. Based on the latest traceability information and in conjunction with the system linkage module, the updated data is pushed to the query interface of the consumer group to obtain real-time feedback data and determine whether the feedback meets the requirements of complete record. After obtaining feedback data, a data security module is used to encrypt sensitive fields in the information flow process, and a layered verification mechanism is used to determine whether the data obtained by the consumer group is protected. Based on the above processing results, the linkage control mechanism module dynamically adjusts the access policy for nodes with insufficient transparency. If the permission verification fails, the display scope of relevant information is restricted, thus obtaining the final controlled traceability path.

8. The digital traceability system and method for agricultural product supply chain information according to claim 1, characterized in that, The process of generating a visualization report based on the determined complete path, verifying the report's integrity using a hash chain, and obtaining a final output that improves the reliability of traceability includes: Using the complete path data that has been obtained, the path information is processed by segmented parsing to determine the connection order and data content of each node in the path. Based on the parsed path node information, a corresponding visual report is generated, which graphically displays the connection relationship of the path to obtain a preliminary report framework; For the data nodes in the preliminary report framework, hash chain technology is applied to perform node-by-node data verification to determine the integrity of the data in each node. If a mismatch is detected between the content of a data node and its hash value, the node is marked as an anomaly, and the anomaly marking result is obtained. Based on the anomaly marking results, the data records in the path confirmation process are re-verified, and the original information of the anomaly nodes is verified by comparison to determine the basis for repairing the anomaly nodes. By repairing the abnormal nodes, the data of the abnormal nodes is corrected, and the corrected path data is generated. The integrity of the corrected data is verified again by combining hash chain technology to obtain the final verification result. Based on the final verification results, update the content of the visualization report, generate the final output containing integrity verification information, and determine whether the output content meets the preset reliability standards. If it does, the output process is completed.