Agricultural product traceability system and method based on element universe
By integrating sensors into the Metaverse platform to collect agricultural product data, performing multiple verifications and graph construction, generating digital fingerprints and storing them on the blockchain, the problem of verifying the authenticity of source information in the Metaverse agricultural product traceability system has been solved, achieving efficient and reliable traceability management and verification experience.
Patent Information
- Application Number
- CN202511970405.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-01-23
AI Technical Summary
In the metaverse platform, existing agricultural product traceability systems cannot effectively verify the authenticity and reliability of agricultural product source information, and consumers find it difficult to intuitively understand complex traceability information.
By integrating sensors to collect event data throughout the entire life cycle of agricultural products, a data packet with a digital signature is generated. The signature, time series, and geographic location are then verified at the gateway to construct a traceability map, identify the most credible life trajectory map, and finally generate a digital fingerprint and complete blockchain notarization.
It enables rigorous screening and verification of agricultural product data, ensuring data integrity and authenticity, providing reliable traceability data management and an intuitive verification experience, reducing storage costs, and enhancing consumer trust.
Smart Images

Figure CN121391303A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of traceability technology of metaverse platforms, in particular to an agricultural product traceability system based on a metaverse. BACKGROUND
[0002] With the rapid development of metaverse technology, metaverse platforms have gradually become an important carrier for integrating virtual and real economies, allowing users to browse and trade agricultural products through immersive interactions. The essence of agricultural products on metaverse platforms is data assets, and the transactions of users on metaverse platforms are also digital assets. Digital assets are exchanged for physical world entity agricultural products, and there is a huge trust gap between them. Therefore, in order to ensure that the agricultural products traded by users in the metaverse are consistent with the actual agricultural products, it is necessary to trace the origin of the agricultural products. Current agricultural product traceability in the metaverse usually involves on-chain processing (saving to a blockchain) of source information about agricultural products provided by agricultural product suppliers to ensure that the source information cannot be tampered with. However, this approach ignores whether the source data provided by the supplier is authentic and reliable. Additionally, consumers have difficulty understanding and verifying complex traceability information. SUMMARY
[0003] To address the problems in the related art, the present application provides an agricultural product traceability system based on a metaverse to overcome the technical problems of existing related technologies.
[0004] To solve the technical problems, the present application is implemented through the following technical solutions: On the one hand, the present application provides an agricultural product traceability system based on a metaverse, which specifically includes: A collection end integrated with sensors to collect all events of agricultural products throughout their life cycle and generate data packets with digital signatures for transmission to a gateway. A gateway that performs signature verification, time series verification, and geographic location verification based on received data packets, builds the first line of defense, and sends verified data packets to a data correlation module. A data correlation module that builds a traceability graph based on received data packets and identifies the most trusted life trajectory graph in the traceability graph as the main causal path. An on-chain traceability module that generates a digital fingerprint based on the main causal path and completes blockchain evidence.
[0005] Preferably, the data packets with digital signatures are generated as follows: The collection terminal collects a collection event, a farming operation event, a quality inspection event and a transportation event, wherein each event includes parameters and evidence, a hash value of the evidence of each event is calculated, the parameters and the hash value of the evidence of the event are spliced into a string in a predetermined order, and a data fingerprint, i.e. a data digest, of a fixed length is generated by performing a hash operation on the string; and a private key of the collection terminal is used to sign the data fingerprint to obtain a complete and signed data packet.
[0006] Preferably, the signature verification includes: The data packet from the collection terminal is received, the data signature in the data packet is decrypted using the public key of the collection terminal to obtain the data fingerprint A in the signature, and at the same time, the gateway recalculates the hash value of the original parameters and the evidence in the data packet using the same method to obtain the data fingerprint B; if the data fingerprint A is equal to the data fingerprint B, the time sequence verification is performed; otherwise, the data packet is intercepted, and a signature exception feedback is generated to the corresponding collection terminal.
[0007] Preferably, the time sequence verification includes: All data packets of the same batch of agricultural products belonging to the same collection area are integrated to obtain an event set of the whole life cycle of a batch of agricultural products from planting, collection, transportation and storage, and the time stamps of each event are extracted therefrom, each event is sorted in the order of the whole life cycle of the agricultural products, and the time sequence of adjacent events is determined; if the time stamps of the adjacent events are monotonically increasing with the event sequence number, the geographic location verification is performed; otherwise, the data packet that does not meet the time sequence is intercepted, and a time stamp exception feedback is generated to the corresponding collection terminal.
[0008] Preferably, the geographic location verification includes: The geographic location points of all the collection events and the farming operation events are summarized to form a geographic location point set P, the boundary vertex coordinates of the entire collection area are obtained from all the collection events of the same batch of agricultural products, a minimum convex hull including the boundary vertex coordinates of the entire collection area is identified by using a convex hull algorithm, the number of the geographic location points in the geographic location point set P that are within the minimum convex hull is counted, and the position ratio is obtained by dividing the total number of the geographic location points in the geographic location point set P by the position ratio threshold value; if the position ratio is greater than the position ratio threshold value, the data packets of all the collection events and the farming operation events pass the verification; otherwise, the events that are not within the minimum convex hull are identified, the data packets of the events are intercepted, and a location exception feedback is generated to the collection terminal.
[0009] Preferably, the traceability map is constructed by: Entity resolution is performed on the event set to identify all events and entities; in the traceability graph, both events and entities are defined as nodes, and directed edges are established according to the semantic role relationship and the time sequence relationship between them, so that the whole process of the same batch of agricultural products can be constructed into a traceability graph; a weight is assigned to each edge, which represents the credibility of the causal relationship between the two nodes; the parameters and evidence of the event are saved as node attributes.
[0010] Preferably, a weight is assigned to each edge: S2-1, identify the category of the edge, for the semantic role edge, extract the node attributes from the nodes connected by the semantic role edge, directly assign a basic weight according to the entity of the node attribute, for the time sequence edge, first calculate the actual time interval of the two events, then divide by the maximum reasonable interval allowed by the business to obtain the standardized interval, and then use the time sequence weight formula to calculate the basic weight; thus the basic weight of each edge in the traceability graph can be obtained; S2-2, assign a score to each evidence type of the event node, calculate the weighted average score of all evidence as the evidence quality coefficient Eq, in the node attribute of the event node, for each cross-validated evidence as evidence pair, check each evidence pair and assign a score, and then divide the total score of the consistent evidence pair by the total number of evidence pairs to obtain the consistency coefficient Cm; S2-3, for the semantic role edge: maximum weight = basic weight × Eq × Cm, wherein Eq and Cm come from the event nodes connected by the edge; for the time sequence edge: maximum weight = basic weight × min(Eq_A, E q_B) × min(Cm_A, Cm_B), wherein Eq_A and Eq_B are the evidence quality coefficients of the two event nodes, and Cm_A and Cm_B are their consistency coefficients.
[0011] Preferably, the most credible life trajectory graph in the traceability graph is identified as the main causal path: Path traversal is performed in the traceability graph from the starting node to the terminal node, and the paths existing in the traceability graph are extracted, a weight threshold is preset, if the weight is less than the weight threshold, the edge is recorded as a suspicious edge, the number of suspicious edges in the path is counted, and the suspicious proportion is obtained by dividing the number of suspicious edges by the number of all edges in the path; the suspicious weight of the suspicious edge in the path is calculated by averaging; the suspicious proportion m and the suspicious weight g in the path are calculated by the formula to obtain the suspicious value F of the path, wherein γ is a sensitivity coefficient for controlling the risk sensitivity; A preset suspicious interval is set, if the suspicious value is greater than the upper limit of the suspicious interval, the path is marked as an untrusted path, and the events related to the suspicious edges in the untrusted path are fed back to the corresponding collection end; if the suspicious value is within the suspicious interval, manual review is triggered; if the suspicious value is less than the lower limit of the suspicious interval, the path is marked as a trusted path; when all the paths in the traceability spectrum diagram are trusted paths, the value obtained by multiplying the weights of all the edges on the path is taken as the path strength, and the path with the highest path strength among all the paths in the traceability spectrum diagram is selected as the main causal path of the traceability spectrum diagram.
[0012] Preferably, a digital fingerprint is generated based on the main causal path and a blockchain is stored: S3-1, the parameters and evidence of each event in the main causal path are taken as basic data blocks, an independent hash value is calculated for each event, the hash value is taken as a leaf node of a Merkle tree, a binary tree structure is adopted to calculate recursively from bottom to top, each layer generates a parent node by connecting and rehashing the hash values of adjacent nodes, and finally a unique Merkle root hash is generated, which becomes the digital fingerprint of the entire path summary; S3-2, the complete traceability spectrum diagram is packaged into a complete evidence package, the evidence package is uploaded to IPFS to obtain a unique content identifier CID, the identifier CID is strictly bound to the evidence package, a corresponding Merkle path proof is generated for each leaf node, and a corresponding relationship between the Merkle root hash and the off-chain storage CID is established; S3-3, a blockchain transaction containing the agricultural product batch ID, the root hash, the storage address CID of the off-chain complete evidence, the path strength and the suspicious value is constructed, and after multi-party signature and consensus verification, it is permanently stored in the blockchain to generate a digital storage certificate, and the digital storage certificate is bound to the agricultural product digital twin in the metaverse to ensure that consumers can directly access and verify through the product interface.
[0013] On the other hand, the present application provides an agricultural product traceability method based on the metaverse, which specifically comprises the following steps: Step one, all events of agricultural products in the whole life cycle are collected by integrating sensors, and a data package with a digital signature is generated; Step two, signature verification, time sequence verification and geographic location verification are performed based on the data package with a digital signature, and a first security line is constructed; the verified data package is sent to step three; Step three, a traceability graph is constructed based on the data package, and the most trusted life trajectory graph in the traceability spectrum diagram is identified as a main causal path; Step four, a digital fingerprint is generated based on the main causal path and a blockchain is stored.
[0014] The present application has the following beneficial effects: 1. The gateway as the first line of defense of the system, through the triple verification to realize the strict screening of the source data, the digital signature verification ensures the integrity and authenticity of the data, effectively prevents the tampering risk of the data in the transmission process; the time sequence verification is based on the life cycle logic of agricultural products, intelligently identifies and intercepts data with time logic contradiction; the geographic location verification analyzes the location distribution of agricultural activities through the convex hull algorithm, effectively identifies abnormal location data, prevents geographic location fraud, and ensures that the data entering the subsequent processing has the basic logical rationality and authenticity basis.
[0015] 2. The data association module converts discrete traceability events into a structured credibility evaluation system through knowledge graph technology and intelligent weight algorithm, quantifies the credibility of each link through weight calculation of semantic role edges and time sequence relationship edges; then through the suspicious value calculation model, it can accurately identify high-risk paths, realize adaptive hierarchical management of traceability data, not only can automatically build a credible product life trajectory, but also can provide accurate clue positioning for quality problem traceability.
[0016] 3. The on-chain traceability module solves the contradiction between the storage cost of the blockchain and the integrity of the traceability data by constructing on-chain storage + off-chain storage; the use of Merkle tree structure compresses a large amount of traceability data into a single digital fingerprint, which not only ensures the data's non-tamperability, but also significantly reduces the storage cost; the organic combination of distributed storage and blockchain ensures the traceability and verifiability of complete evidence; finally, the intuitive display and convenient verification in the metaverse change the situation of complex information query and difficult verification in traditional traceability, and provide consumers with an immersive trust experience.
[0017] Of course, any product implementing the present application does not necessarily need to achieve all the advantages described above at the same time. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, the drawings can also obtain drawings according to these drawings without creative labor.
[0019] Figure 1 The system module connection diagram of the present application; Figure 2 The method flowchart of the present application. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0021] The present application provides a meta-universe-based agricultural product traceability system and method. The following will be described in detail Figure 1 and Figure 2 the specific embodiments; the present embodiment takes a practical application scene of a certain large meta-universe agricultural product platform as an example to show how to construct a trusted mapping from the physical world to the digital world through data collection, gateway verification, graph association, main path extraction, verifiable on-chain and meta-universe interaction traceability, and realize the transparency and verifiable traceability of the whole life cycle of agricultural products.
[0022] As shown in Figure 1 , the meta-universe-based agricultural product traceability system comprises a collection end, a gateway, a data association module and an on-chain traceability module. The collection end collects events and parameters and evidence of events: In practical applications, the collection end is an intelligent device (such as a special agricultural Internet of Things terminal, a high-security mobile device, etc.), which integrates multiple sensors and is responsible for obtaining all parameters and evidence of events from various sensors and other sources, performing hash operation to generate data digest, and using its private key to digitally sign the digest; The collection end collects a collection event, a farming operation event, a quality inspection event and a transportation event, wherein each event respectively includes parameters and evidence; the specific parameters of the collection event include accurate GPS coordinates (accuracy ± 5 meters) of a collection area, a collection timestamp, a collector ID, a collection device ID, an estimated weight, and a batch ID of agricultural products (agricultural products collected in the same collection area are marked as one batch ID of agricultural products); the evidence of the collection event includes at least two high-resolution (≥ 12 million pixels) images: one close-up image of agricultural products and one wide-angle image containing the collection environment and personnel, and a hash value of the image is calculated; the parameters of the farming operation event include an operation time, a location, an operator ID, a unique batch number of agricultural materials used, an operation dose, and an operation device ID; in actual application, the farming operation usually includes fertilization, pesticide application and irrigation; the evidence of the farming operation event includes a working log of the operation device or a video of the farming operation, and a hash value thereof is calculated; the parameters of the quality inspection event include a detection time, a laboratory ID, a detection method standard ID, a specific detection value list (such as agricultural residue content 0.01 mg / kg), a detection limit (LOD) and a quantitative limit (LOQ) of the detection method; the evidence of the quality inspection event includes a PDF format detection report signed by the laboratory, and a hash value thereof is calculated; the parameters of the transportation event include a vehicle ID, a driver ID, GPS track points recorded in time sequence (such as recording once every minute), and carriage temperature and humidity recorded in time sequence (such as recording once every 5 minutes); the evidence of the transportation event includes a data file packaged with all the track and sensor data during transportation, and a hash value thereof is calculated; thus, all the events and the corresponding parameters and hash values of each event are obtained; The parameters and evidence hash values of the event are spliced into a string in a predetermined order, and a hash operation is performed on the string to generate a unique, fixed-length data fingerprint, i.e., a data digest; then, a private key preset by the collection end is used to sign the data fingerprint to obtain a complete, signed data packet, the content of which includes the original parameters, the evidence and the evidence hash value and the digital signature itself; the data packet is sent to the gateway; The gateway is used for automatic defense line verification before data enters the metaverse, and intercepts suspicious data packets: S1-1: receiving the data packet from the collection end, using the public key of the collection end to decrypt the data signature in the data packet to obtain the data fingerprint A in the signature, at the same time, the gateway recalculates the hash of the original parameters and the evidence hash value in the data packet by the same method to obtain the data fingerprint B; if the data fingerprint A is equal to the data fingerprint B, it is proved that the data packet has not been tampered with in the transmission process, and indeed comes from the claimed collection end; then the next step S2 is executed; otherwise, the data packet is intercepted, and a signature exception feedback is generated to the corresponding collection end; S1-2, all data packets of the same batch of agricultural products belonging to the same harvesting area are integrated to obtain a set of events about the life cycle of a batch of agricultural products from planting, harvesting, transportation and storage, and the time stamps of each event are extracted, each event is sorted in the order of the life cycle of the agricultural products from planting (farming operation), harvesting, transportation and storage, and the time relationship between adjacent events is determined; if the time stamps of adjacent events remain monotonically increasing with the event sequence number, the next step S3 is performed; for example, in actual application, the time stamp of a transportation event cannot be earlier than the time stamp of a harvesting event; otherwise, the data packet that does not meet the time sequence is intercepted, and a time stamp abnormality feedback is generated to the corresponding collection end; S1-3: The geographic position points of all harvesting events and farming operation events are combined to form a geographic position point set P, the boundary vertex coordinates of the entire harvesting area are obtained from all harvesting events of the same batch of agricultural products, the minimum convex hull including the boundary vertex coordinates of the entire harvesting area is identified by using a convex hull algorithm, the number of geographic position points in the minimum convex hull in the geographic position point set P is counted, and the position ratio is obtained by dividing the total number of geographic position points in the geographic position point set P, a preset ratio threshold is designed based on the spatial distribution law of agricultural production activities and statistical analysis of device positioning error, a reasonable minimum inclusion ratio (such as 95%) is determined by calculating the spatial inclusion relationship between the event position points and the convex hull of the harvesting area in the historical normal farming activities; if the position ratio is greater than the ratio threshold, it indicates that the positions of the harvesting events and the farming operation events are basically consistent with the positions where the agricultural products grow, then all data packets of the harvesting events and the farming operation events pass the verification, and the next step S4 is performed; otherwise, the events not in the minimum convex hull are identified, and the data packet to which the event belongs is intercepted, and a position abnormality feedback is generated to the collection end; S1-4, if all data packets in the event set of the same batch of agricultural products pass the verification of steps S1 to S3, the event set of the batch of agricultural products is sent to the data correlation module; The gateway, as the first line of defense of the system, realizes strict screening of source data through triple verification, digital signature verification ensures the integrity and authenticity of the data, effectively prevents tampering risk of the data in the transmission process; time sequence verification intelligently identifies and intercepts data with time logic contradiction based on the logic of the life cycle of agricultural products; geographic location verification analyzes the position distribution of farming activities through the convex hull algorithm, effectively identifies abnormal position data, prevents geographic location fraud, and ensures that the data entering the subsequent processing has a basic logical rationality and authenticity basis.
[0023] The data correlation module compiles a structured and traceable complete evidence chain from the discrete events verified by the gateway according to the logical relationship; specifically: The event set is entity parsed to identify all events and entities; in the traceability graph, events and entities are defined as nodes, and directed edges are established according to the semantic role relationship and the time sequence relationship between them, so that the whole process of the same batch of agricultural products can be constructed into a graph; a weight is assigned to each edge, which represents the credibility of the causal relationship between the two nodes; the parameters and evidence of the event are saved as node attributes; the process of assigning the weight of each edge is: S2-1, identify the category of the edge, in practical application, the category of the edge has semantic role edge (connects entity node and event node, such as executor, uses tool, etc.) and time sequence joint edge (connects two event nodes), for semantic role edge, and extract node attributes from the nodes connected by semantic role edge, directly assign basic weight according to the entity of node attribute, for example: operator edge: if the operator is a certified professional, the basic weight is 0.9; if it is a system registered worker, the basic weight is 0.7; if it is an anonymous operator, the basic weight is 0.5; use tool, equipment edge: if the equipment is an intelligent device (such as calibrated sensor), the basic weight is 0.9; if it is an ordinary sensor, the basic weight is 0.7; if it is a traditional tool, the basic weight is 0.5; operation object edge: the basic weight is fixed as 1.0, because it is the core of event definition; it should be noted that the basic weight of semantic role edge reflects the reliability of the entity itself; for time sequence joint edge, first calculate the actual time interval of two events, then divide by the maximum reasonable interval allowed by business to get the standardized interval, use the time sequence weight formula: basic weight = exp (-k * standardized interval), where k is the attenuation coefficient (usually set to 1, indicating exponential decay), if the time interval is within the reasonable range (standardized interval close to 0), the weight is close to 1; if the interval is too large (standardized interval greater than 1), the weight tends to 0; this calculation is based on the rationality of time logic, the shorter the interval, the stronger the causal relationship; thus the basic weight of each edge in the traceability graph can be obtained; S2-2, assign a score to each evidence type of each event node, 1.0 for automatic evidence, 0.8 for semi-automatic evidence, and 0.6 for manual evidence; calculate the weighted average of all evidence as the evidence quality coefficient denoted as Eq; in practical applications, if an event has multiple evidence, Eq = (sum of all evidence scores) / number of evidence; Eq is used to quantify the objectivity and automation degree of evidence, and automatic evidence is more reliable; in the node attributes of the event node, check each cross-validated evidence pair and assign a score, specifically compare the values or trends of the relevant evidence, if consistent, the pair scores 1.0; if inconsistent, the score is 0.3; then divide the total score of consistent evidence pairs by the total number of evidence pairs to get the consistency coefficient denoted as Cm; in practical applications, if there are three evidence pairs, two are consistent (1.0 each) and one is inconsistent (0.3), then Cm = (1.0 + 1.0 + 0.3) / 3 ≈ 0.77; S2-3, for semantic role edges: maximum weight = base weight x Eq x Cm, where Eq and Cm come from the event nodes connected by the edge; in practical applications, an executor edge connects an operator entity and a fertilization event, then use the Eq and Cm of the fertilization event; for time sequence relationship edges: maximum weight = base weight x min(Eq_A, E q_B) x min(Cm_A, Cm_B), where Eq_A and Eq_B are the evidence quality coefficients of the two event nodes respectively, and Cm_A and Cm_B are their consistency coefficients, and the minimum value is because the strength of the time sequence chain depends on the weakest event; the weight of the time sequence relationship edge emphasizes the overall reliability of the event sequence, and any insufficient evidence of an event will reduce the weight; the whole process ensures the comprehensiveness of the weight calculation: the base weight captures the static reliability, and the dynamic coefficients (Eq and Cm) capture the relevant reliability of the evidence; as can be seen from the above calculation process, the weight value of the edge ranges from 0 to 1, and the higher the value, the more reliable the causal relationship; In the traceability spectrum, from the starting node to the terminal node, the path in the traceability spectrum can be extracted, and a weight threshold is preset. The weight threshold is set according to the statistical distribution characteristics of historical credible data and the risk tolerance of specific business scenarios. By analyzing the weight value distribution of a large number of verified credible event edges, the mean and standard deviation are calculated, and a reasonable minimum credibility standard is set by referring to the credibility requirements of different agricultural products (such as higher threshold for organic agricultural products). The weights of all edges in the path are compared with the weight threshold. If the weight is less than the weight threshold, it indicates that the credibility of the causal relationship between the two nodes connected by the edge is low, and there may be problems such as data forgery, equipment failure, abnormal operation, or record error. Therefore, the edge is recorded as a suspicious edge. The number of suspicious edges in the path is counted, and the suspicious proportion is obtained by dividing the number of suspicious edges by the number of all edges in the path, denoted as m. Then, the mean value of the weights of the suspicious edges in the path is calculated to obtain the suspicious weight, denoted as g. The suspicious value F of the path is calculated by the formula , where γ is the sensitivity coefficient for controlling the risk sensitivity, and in practical applications, the value is 2.5. In the formula, is the basic product term, is the synergistic amplification term, which produces an exponential amplification effect when high suspicious proportion and low suspicious weight occur simultaneously. This formula is sensitive to high-risk combinations and avoids the smoothing effect of simple averaging. A suspicious interval is preset. The design of the suspicious interval is based on the statistical analysis results of historical path evaluation data and the business risk control requirements. By analyzing the suspicious value distribution of a large number of verified paths and combining the risk tolerance of different types of agricultural products, the interval is set. The principle is to use statistical quantile to divide risk levels and achieve automatic classification management of path credibility: low suspicious value paths can be directly trusted, high suspicious value paths are automatically intercepted, and intermediate interval paths are manually reviewed, thereby optimizing the allocation of audit resources while ensuring the reliability of traceability. If the suspicious value is greater than the upper limit of the suspicious interval, it indicates that the credibility of the causal relationship in the causal chain of the path is very low, and the entire path loses its traceability value. Therefore, the path is marked as an untrusted path, and the suspicious edges involved in the untrusted path are fed back to the corresponding collection end. If the suspicious value is within the suspicious interval, it indicates that there are small problems in the causal relationship of the causal chain of the path, and manual review is triggered. If the suspicious value is less than the lower limit of the suspicious interval, the path is marked as a trusted path. When all paths in the traceability spectrum are trusted paths, the product of the weights of all edges in the path is calculated to obtain the path strength. The path with the highest path strength is selected as the main causal path in the traceability spectrum. This path represents the most credible life trajectory of the batch of agricultural products. The data association module converts discrete traceability events into a structured credibility evaluation system through knowledge graph technology and intelligent weight algorithm. The credibility of each link is quantified through weight calculation of semantic role edges and time sequence relationship edges. Then, through a suspicious value calculation model, high-risk paths can be accurately identified, realizing adaptive hierarchical management of traceability data. This not only automatically builds a credible product life trajectory, but also provides precise clue positioning for quality problem traceability.
[0024] The on-chain traceability module is used to extract key data for on-chain storage to realize traceability of agricultural products. Specifically: S3-1, the parameters and evidence of each event in the main causal path are taken as basic data blocks, and the independent hash value of each event is calculated as the leaf node of the Merkle tree. From bottom to top, the adjacent two leaf nodes are hashed and spliced, and then the hash is calculated again to generate the parent node hash. This process is recursively performed until the unique root hash (Merkle Root) is calculated. The root hash represents the digital fingerprint of all key information in the entire main causal path, and any minor changes will cause the root hash to change dramatically. S3-2, the complete traceability spectrum (including detailed parameters of all events, evidence files, weight calculation process, etc.) is packaged into a complete evidence package, and the evidence package is uploaded to a distributed file storage system (such as IPFS) to obtain a unique content identifier (CID). The identifier is strictly bound to the evidence package, and the corresponding Merkle path proof is generated for each leaf node (i.e. each event). The corresponding relationship between the Merkle root hash and the off-chain storage CID is established to ensure that the entire evidence chain can be completely restored and verified through the root hash and CID. Thus, an efficient storage mode of storing fingerprints on the chain and detailed data off the chain is established, which not only ensures non-tamperability, but also controls storage costs. S3-3, create a blockchain transaction containing the following structured data: agricultural product batch ID, root hash, off-chain complete evidence storage address CID, path strength and suspicious value; in practical application, invite key business participants as verification nodes: quality certification agency nodes endorse and sign the quality inspection results, logistics service provider nodes confirm and sign the transportation process data, and production subject nodes take responsibility for the planting and harvesting information; set multi-signature rules, requiring a preset threshold number of valid signatures, and each participant signs the transaction data using the private key corresponding to its digital certificate, and attaches all digital signatures to the transaction data package to form a complete signed transaction; broadcast the signed transaction to the blockchain network node, and perform multiple rounds of verification through a preset consensus algorithm (such as PBFT or RAFT), and the transaction that passes the consensus is packaged into a new block and cannot be reversed after network confirmation; obtain the transaction execution result from the network, including: (1) transaction hash (TxHash): as the unique query index of the evidence on the chain; (2) block height: the block position information of the transaction; (3) block timestamp: chain time proof of block confirmation; create a structured evidence certificate based on the chain reply: the certificate contains the digest of all key information on the chain, with quick query information of transaction hash and block height; bind the digital evidence certificate with the agricultural digital twin in the metaverse to ensure that consumers can access and verify directly through the product interface; The on-chain traceability module solves the contradiction between the storage cost of blockchain and the integrity of traceability data by building on-chain evidence + off-chain records; the use of Merkle tree structure compresses a large amount of traceability data into a single digital fingerprint, which not only ensures the data's non-tamperability, but also significantly reduces the storage cost; the organic combination of distributed storage and blockchain ensures the traceability and verifiability of complete evidence; finally, the intuitive display and convenient verification in the metaverse change the traditional situation of complex information query and difficult verification, providing consumers with an immersive trust experience.
[0025] The application constructs a complete and reliable traceability system from the physical world to the digital world: first, the acquisition end automatically collects key events such as harvesting, farming operations, quality inspection, transportation, etc. of agricultural products from planting to sales, splices parameters and evidence hash values to calculate data digest and performs digital signature to ensure the credibility of the data source; then the gateway performs three-line defense verification on the received data packet: (1) verify data integrity and authenticity of origin through digital signature, (2) ensure that the event occurrence sequence conforms to the logic of the agricultural product life cycle through time series analysis, (3) verify the rationality of the spatial distribution of farming activities through the geographic location convex hull algorithm, effectively intercepting various abnormal data; then the data correlation module constructs a knowledge graph for the discrete events that pass the verification, quantifies the credibility of the causal relationship through multi-dimensional weight calculation (including basic weight, evidence quality coefficient Eq and multi-source consistency coefficient Cm), and automatically identifies high-risk paths using the suspicious value formula, finally determines the main causal path representing the most credible life trajectory; finally, the chain traceability module uses a hybrid architecture of Merkle tree and distributed storage to generate a digital fingerprint of the main path key information in the blockchain, store the complete evidence package in IPFS, and enhance the public credibility through multi-party signature mechanism, finally provide consumers with an immersive traceability experience that can be verified with one key in the metaverse, forming a closed loop of traceability chain.
[0026] As shown in Figure 2 The embodiment of the application provides a method for agricultural product traceability based on the metaverse, which specifically comprises the following steps: Step one, integrate sensors to collect all events of agricultural products in the whole life cycle, and generate a data packet with digital signature; The acquisition end collects harvesting events, farming operation events, quality inspection events and transportation events, wherein each event includes parameters and evidence, calculates the hash value of the evidence of each event, splices the parameters and evidence hash values of the events into a string according to a predetermined order, and performs hash operation on the string to generate a unique, fixed-length data fingerprint, i.e. data digest; then use the private key of the acquisition end to sign the data fingerprint to obtain a complete, signed data packet; Step two, perform signature verification, time series verification and geographic location verification based on the data packet with digital signature to build the first security line; the verified data packet is sent to step three; Receive the data packet from the acquisition end, use the public key of the acquisition end to decrypt the data signature in the data packet, get the data fingerprint A in the signature, at the same time, the gateway re-calculates the hash of the original parameters and evidence hash values in the data packet using the same method, gets the data fingerprint B; if the data fingerprint A is equal to the data fingerprint B, perform time series verification; otherwise, intercept this data packet and generate a signature exception feedback to the corresponding acquisition end; All data packets of the same batch of agricultural products belonging to the same harvesting area are integrated to obtain a set of events of the whole life cycle of a batch of agricultural products from planting, harvesting, transportation and storage, and the time stamp of each event is extracted, each event is sorted in the order of the whole life cycle of the agricultural products, and the time relationship of adjacent events is determined; if the time stamp of the adjacent event is monotonically increasing with the event sequence number, the geographic location verification is performed; otherwise, the data packet that does not meet the time sequence is intercepted, and a time stamp exception feedback is generated to the corresponding collection end; The geographic location points of all harvesting events and agricultural operation events are summarized to form a geographic location point set P, the boundary vertex coordinates of the entire harvesting area are obtained from all harvesting events of the same batch of agricultural products, the minimum convex hull including the boundary vertex coordinates of the entire harvesting area is identified by using a convex hull algorithm, the number of geographic location points in the geographic location point set P that are within the minimum convex hull is counted, and the position ratio is obtained by dividing the total number of geographic location points in the geographic location point set P; a preset ratio threshold is set, if the position ratio is greater than the ratio threshold, all harvesting events and agricultural operation data packets pass the verification; otherwise, the events not within the minimum convex hull are identified, and the data packet belonging to the event is intercepted, and a location exception feedback is generated to the collection end; Step three, constructing a traceability graph based on the data packet, and identifying the most credible life trajectory graph in the traceability graph as the main causal path; The event set is parsed to identify all events and entities; in the traceability graph, events and entities are defined as nodes, and directed edges are established according to their semantic role relationships and time sequence relationships, so that the whole process of the same batch of agricultural products can be constructed into a traceability graph; each edge is assigned a weight, which represents the credibility of the causal relationship between two nodes; the parameters and evidence of the event are saved as node attributes; In the traceability graph, path traversal is performed from the starting node to the terminal node, and the paths existing in the graph are extracted, A preset weight threshold is set, if the weight is less than the weight threshold, the edge is recorded as a suspicious edge, the number of suspicious edges in the path is counted, and the suspicious proportion is obtained by dividing the number of suspicious edges by the number of all edges in the path; the suspicious weight is calculated by averaging the weights of the suspicious edges in the path; the suspicious value of the path is calculated by formula based on the suspicious proportion and the suspicious weight in the path; A preset suspicious interval is set, if the suspicious value is greater than the upper limit of the suspicious interval, the path is marked as an untrusted path, and the events related to the suspicious edges in the untrusted path are fed back to the corresponding collection end; if the suspicious value is within the suspicious interval, manual review is triggered; if the suspicious value is less than the lower limit of the suspicious interval, the path is marked as a trusted path; when all paths in the traceability spectrum diagram are trusted paths, the value obtained by multiplying the weights of all edges in the path is taken as the path strength, and the path with the highest path strength among all paths in the traceability spectrum diagram is selected as the main causal path of the traceability spectrum diagram; Step four, generating a digital fingerprint based on the main causal path and completing blockchain notarization; The parameters and evidence of each event in the main causal path are taken as basic data blocks, the independent hash value of each event is calculated, taken as a leaf node of a Merkle tree, a binary tree structure is adopted to calculate recursively from bottom to top, each layer generates a parent node by connecting the hash values of adjacent nodes and rehashing, and finally a unique Merkle root hash is generated, which becomes the digital fingerprint of the entire path summary; The complete traceability spectrum diagram is packaged into a complete evidence package, the evidence package is uploaded to IPFS to obtain a unique content identifier CID, the identifier CID is strictly bound to the evidence package, the corresponding Merkle path proof is generated for each leaf node, and the corresponding relationship between the Merkle root hash and the off-chain storage CID is established; A blockchain transaction containing the agricultural product batch ID, the root hash, the storage address CID of the off-chain complete evidence, the path strength and the suspicious value is constructed, and after multi-party signature and consensus verification, it is permanently stored in the blockchain to generate a digital notarization certificate, and the digital notarization certificate is bound to the agricultural product digital twin in the metaverse to ensure that consumers can directly access and verify through the product interface.
[0027] In the description of the present specification, the description of the terms "one embodiment", "example", "specific example" and the like means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the invention. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the described specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0028] The preferred embodiments of the application disclosed above are only to facilitate the elucidation of the application. The preferred embodiments do not describe all the details of the application and limit the application to the specific embodiments described. Obviously, many modifications and variations can be made in light of the teachings above. The description is chosen and described in order to provide the best illustration of the application principles and their practical application, so that those skilled in the art can well understand and utilize the application.
Claims
1. A meta-universe based agricultural product traceability system, characterized in that, The application relates to a traceability system based on blockchain. The system comprises a collection terminal, a gateway and a data correlation module. The collection terminal is integrated with sensors to collect all events of agricultural products in the whole life cycle and generate a data packet with a digital signature and send the data packet to the gateway. The gateway verifies the signature, time sequence and geographical position of the received data packet, builds the first security line, and sends the verified data packet to the data correlation module. The data correlation module builds a traceability graph based on the received data packet and identifies the most credible life trajectory graph in the traceability graph as a main cause-effect path.
2. The meta-universe based agri-product traceability system as claimed in claim 1, wherein, The uplink traceability module generates a digital fingerprint based on the main cause-effect path and completes blockchain storage. The collection terminal collects harvesting events, farming operation events, quality inspection events and transportation events, wherein each event comprises parameters and evidence, the hash value of the evidence of each event is calculated, the parameters and evidence hash values of the events are spliced into a string in a predetermined order, and the string is subjected to hash operation to generate a unique and fixed-length data fingerprint, that is, a data digest; and the data fingerprint is signed by using a private key preset in the collection terminal to obtain a complete and signed data packet.
3. The meta-universe based agri-product traceability system as claimed in claim 2, wherein, Signature verification: the gateway receives the data packet from the collection terminal, decrypts the data signature in the data packet by using the public key of the collection terminal, obtains the data fingerprint A in the signature, and simultaneously, the gateway recalculates the hash value of the original parameters and evidence in the data packet by using the same method to obtain the data fingerprint B; if the data fingerprint A is equal to the data fingerprint B, the time sequence verification is performed; otherwise, the data packet is intercepted, and a signature exception feedback is generated and fed back to the corresponding collection terminal. Time sequence verification: all data packets of the same batch of agricultural products belonging to the same harvesting area are integrated to obtain an event set about the whole life cycle of the agricultural products, such as planting, harvesting, transportation and storage, the time stamps of the events are extracted, the events are sorted in the order of the whole life cycle of the agricultural products, and the time sequence of adjacent events is determined; if the time stamps of the adjacent events are monotonously increased along with the event serial numbers, the geographical position verification is performed; otherwise, the data packet not meeting the time sequence is intercepted, and a time stamp exception feedback is generated and fed back to the corresponding collection terminal.
4. The meta-universe based agri-product traceability system as claimed in claim 3, wherein, Geographical position verification: the geographical position points of all harvesting events and farming operation events are combined to form a geographical position point set P, the boundary vertex coordinates of the whole harvesting area are obtained from all harvesting events of the same batch of agricultural products, a minimum convex hull including the boundary vertex coordinates of the whole harvesting area is identified by using a convex hull algorithm, the number of the geographical position points in the geographical position point set P in the minimum convex hull is counted, the position proportion is obtained by dividing the total number of the geographical position points in the geographical position point set P, a preset proportion threshold is set, if the position proportion is greater than the proportion threshold, the data packets of all harvesting events and farming operation events pass the verification; otherwise, the events not in the minimum convex hull are identified, the data packets of the events are intercepted, and a position exception feedback is generated and fed back to the collection terminal. Traceability graph construction:
5. The meta-universe based agri-product traceability system as claimed in claim 4, wherein, 6. The meta-universe based agri-product traceability system as claimed in claim 5 wherein, Entity resolution is performed on the event set to identify all events and entities; in the traceability graph, both events and entities are defined as nodes, and directed edges are established according to the semantic role relationship and the time sequence relationship between them, so that the whole process of the same batch of agricultural products can be constructed into a traceability graph; a weight is assigned to each edge, which represents the credibility of the causal relationship between the two nodes; the parameters and evidence of the event are saved as node attributes.
7. The meta-universe based agri-product traceability system as claimed in claim 6, wherein, A weight is assigned to each edge: S2-1, identify the category of the edge, for the semantic role edge, extract the node attributes from the nodes connected by the semantic role edge, and directly assign a basic weight according to the entity of the node attribute, for the time sequence joint edge, first calculate the actual time interval of the two events, then divide by the maximum reasonable interval allowed by the business to obtain the standardized interval, and then use the time sequence weight formula to calculate the basic weight; Thus, the basic weight of each edge in the traceability graph can be obtained; S2-2, assign a score to each evidence type of the event node, calculate the weighted average score of all evidence as the evidence quality coefficient Eq, in the node attributes of the event node, for each cross-validated evidence as evidence pair, check each evidence pair and assign a score, and then divide the total score of the consistent evidence pairs by the total number of evidence pairs to obtain the consistency coefficient Cm; S2-3, for semantic role edges: max weight = base weight x Eq x Cm, where Eq and Cm come from the event nodes connected by the edge; for temporal relation edges: max weight = base weight x min(Eq_A, E q_B) x min(Cm_A, Cm_B), where Eq_A and Eq_B are the evidence quality coefficients of the two event nodes, and Cm_A and Cm_B are their consistency coefficients.
8. The meta-universe based agri-product traceability system as claimed in claim 7, wherein, Identify the most credible life trajectory graph in the traceability graph as the main causal path: In the traceability graph, path traversal is performed from the starting node to the terminal node, the paths existing in the graph are extracted, a weight threshold is preset, if the weight is less than the weight threshold, the edge is marked as a suspicious edge, the number of suspicious edges in the path is counted, and the suspicious proportion is obtained by dividing the number of suspicious edges by the number of all edges in the path; the suspicious weight is obtained by averaging the weights of the suspicious edges in the path; the suspicious value of the path is calculated by formula based on the suspicious proportion and the suspicious weight; A suspicious interval is preset, if the suspicious value is greater than the upper limit of the suspicious interval, the path is marked as an untrustworthy path, and the events involved in the suspicious edges in the untrustworthy path are fed back to the corresponding collection end; if the suspicious value is within the suspicious interval, manual review is triggered; if the suspicious value is less than the lower limit of the suspicious interval, the path is marked as a trustworthy path; when all paths in the traceability graph are trustworthy paths, the path strength is obtained by multiplying the weights of all edges in the path, and the path with the highest path strength is selected as the main causal path in the traceability graph.
9. The meta-universe based agri-product traceability system as claimed in claim 8, wherein, Generate a digital fingerprint based on the main causal path and complete blockchain notarization: S3-1, take the parameters and evidence of each event in the main causal path as the basic data block, calculate the independent hash value of each event as the leaf node of the Merkle tree, use the binary tree structure to recursively calculate from bottom to top, generate the parent node by connecting the hash values of adjacent nodes and rehashing, and finally generate a unique Merkle root hash, which becomes the digital fingerprint of the entire path summary; S3-2, package the complete traceability spectrum into a complete evidence package, upload the evidence package to IPFS, obtain a unique content identifier CID, the identifier CID is strictly bound with the evidence package, generate the corresponding Merkle path proof for each leaf node, establish the corresponding relationship between the Merkle root hash and the off-chain storage CID; S3-3, construct a blockchain transaction containing the agricultural product batch ID, root hash, off-chain complete evidence storage address CID, path strength and suspicious value, permanently store it in the blockchain after multi-party signature and consensus verification, generate a digital evidence certificate, and establish a binding relationship between the digital evidence certificate and the agricultural product digital twin in the metaverse, ensuring that consumers can directly access and verify through the product interface.
10. A method for tracing agricultural products based on a meta universe, characterized by The method is applied to the agricultural product traceability system based on the metaverse as claimed in any one of claims 1-9, and the method comprises the following steps: Step one, collect all events of agricultural products in the whole life cycle by integrating sensors, and generate a data package with a digital signature; Step two, perform signature verification, time series verification and geographic location verification based on the data package with a digital signature, and build the first security line; the verified data package is sent to step three; Step three, build a traceability graph based on the data package, and identify the most trusted life trajectory graph in the traceability spectrum as the main causal path; Step four, generate a digital fingerprint based on the main causal path and complete the blockchain evidence.
Citation Information
Patent Citations
Blockchain-based agricultural product safe and credible traceability system
CN113240435A
Agricultural product traceability system based on Hyperledger fabric alliance chain
CN114580953A
Agricultural product tracing method based on element universe
CN115936738A
Production traceability and transaction collaboration method and system of MES (Manufacturing Execution System)
CN119067689A
Visual anti-counterfeiting traceability method and system for seafood products based on block chain
CN121146787A
Cited By
Block chain-based power transmission line forest fire tracing method and system
CN122022851A
