Metaverse-based agricultural product tracing method

By using blockchain technology on the Yuanverse platform to trace the origin of agricultural products, the problem of data loss and tampering is solved, the reliability and privacy protection of the traceability process are achieved, and the accuracy and authenticity of the traceability are improved.

WO2024187740A1PCT designated stage expired Publication Date: 2024-09-19XIHUA UNIV

Patent Information

Application Number
PCT/CN2023/124277
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-10
Filing Date
2023-10-12
Publication Date
2024-09-19

AI Technical Summary

Technical Problem

The existing agricultural product traceability methods have problems such as data loss and tampering that are difficult to recover, and due to poor information exchange, the accuracy and authenticity of traceability are reduced.

Method used

Blockchain technology is used to trace the origin of agricultural products on the Yuanverse platform. Key generation, data on-chain, smart contract verification, digital signatures and hash chains are used to ensure the immutability and traceability of data through trusted nodes, combined with dynamic pseudonyms and The homomorphic commitment mechanism protects user privacy.

Benefits of technology

It achieves data integrity and non-repudiation, ensures the reliability and authenticity of the traceability process, prevents data loss and tampering, protects user privacy, and avoids false advertising and malicious competition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023124277_19092024_PF_FP_ABST
    Figure CN2023124277_19092024_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to a metaverse-based agricultural product tracing method, comprising the steps of: enabling a terminal data collection device to collect agricultural product data, and generating an on-chain storage application; when a blockchain network receives the on-chain storage application, verifying the legitimacy and authenticity of the on-chain storage application, and after the on-chain storage application is verified to be legitimate and authentic, performing on-chain storage; verifying the stored agricultural product data, triggering an agricultural product growth function in a smart contract by using the agricultural product data after the verification succeeds, and starting growth of a virtual agricultural product in a metaverse visualization platform; selling the agricultural product on a transaction platform, and after a consumer purchases the agricultural product, the blockchain network generating a traceability code; and performing identity and data legitimacy verification between the metaverse visualization platform and the consumer, and then according to the verification result, determining to open the tracing process viewing permission of the metaverse visualization platform. In the present application, the agricultural product tracing method is established by applying the blockchain technology, thereby solving the problems that data cannot be retrieved after losing and data cannot be recovered after being tampered.
Need to check novelty before this filing date? Find Prior Art

Description

A method for tracing agricultural products based on the metaverse Technical Field

[0001] The present invention relates to the field of metaverse digital technology, and in particular to a metaverse-based agricultural product traceability method. Background Art

[0002] In the "Internet Plus" era, people's exploration of digital space has never ceased. Since the concept of the metaverse was proposed, it has attracted widespread attention across various industries. The "metaverse" itself is not a new technology, but rather integrates a large number of existing technologies, including 5G, cloud computing, artificial intelligence, virtual reality, blockchain, the Internet of Things, and human-computer interaction. In traditional agriculture, the problem of agricultural product sales has been a long-standing problem for farmers. Due to the lack of stable sales channels, crops often rot in the fields.

[0003] The existing patent with authorization announcement number CN115063210B and titled "Intelligent Resource Matching Method and Metaverse System Based on Metaverse" discloses the use of digital technology to digitize the relevant data of agricultural products, thereby moving the relevant data of agricultural products from offline to online, so that the demander can view the relevant information of agricultural products online, and improve the interaction efficiency between multiple parties such as the demander and the provider, thereby improving the demander's acquisition of the required resources.

[0004] However, the actual product often differs significantly from the photo. This is due to some agricultural product manufacturers exploiting consumers' trust to deceive them and pass off inferior products as genuine ones. Traditional agricultural product traceability methods are relatively simple, mostly based on the Internet of Things (IoT) technology, using generated QR codes for traceability. However, a drawback is that traceability information is stored centrally in a single location, posing two threats: first, data loss makes it impossible to recover; second, data tampering makes it impossible to recover. Furthermore, the large number of participants in the agricultural product supply chain and the limited information exchange between them reduce the accuracy and authenticity of agricultural product traceability.

[0005] Driven by practical needs and the feasibility of building a metaverse, it is particularly important to apply blockchain technology to establish an effective method for tracing the origin of agricultural products. Summary of the Invention

[0006] The purpose of the present invention is to establish an effective agricultural product traceability method based on the field of metaverse technology and apply blockchain technology to solve the problem that data cannot be retrieved after being lost and cannot be restored after being tampered with, and to provide an agricultural product traceability method based on the metaverse.

[0007] In order to achieve the above-mentioned object of the invention, the embodiment of the present invention provides the following technical solutions:

[0008] A method for tracing agricultural products based on the metaverse, comprising the following steps:

[0009] Step 1: During the system initialization phase, the trusted node generates system parameters and the trusted third party generates the node key.

[0010] Step 2: Data upload. The terminal data collection device collects agricultural product data within a period T and generates an application for upload. When the blockchain network receives the application, it verifies the legitimacy and authenticity of the application. Once the verification is correct, the data is uploaded to the blockchain.

[0011] Step 3: Virtual agricultural product growth and circulation phase: Verify the agricultural product data on the chain. After successful verification, use the agricultural product data to trigger the agricultural product growth function in the smart contract. The virtual agricultural products on the Metaverse visualization platform begin to grow, and the agricultural product circulation track is updated after they mature.

[0012] Step 4: Agricultural product trading phase: Agricultural products are sold on the trading platform. After consumers successfully purchase agricultural products, the blockchain network generates a traceability code. The agricultural product manufacturer affixes the traceability code and mails the agricultural products to the consumer.

[0013] Step 5, the agricultural product traceability stage, verifies the identity and data legitimacy between the Metaverse Visualization Platform and the consumer, and then determines the traceability process viewing permission of the open Metaverse Visualization Platform based on the verification results.

[0014] Compared with the prior art, the present invention has the following beneficial effects:

[0015] (1) System reliability: The present invention uses blockchain technology to store information. Blockchain technology has the characteristics of information being unmodifiable and distributed, which ensures the integrity and availability of data. Even if data is lost, it can be restored through backup information from other nodes in the blockchain.

[0016] (2) User privacy protection: In the framework of this invention, a commitment mechanism with homomorphic properties is used to protect transaction information. The transaction amount ciphertext based on the strong binding property of the discrete logarithm problem and the homomorphic addition property is stored in the blockchain network, which protects user privacy and prevents agricultural product manufacturers from inferring users' preferences and the profits of farmers or agricultural product manufacturers through users' purchase information. This avoids the emergence of problems such as false advertising, "killing the old customers", and malicious competition. In addition, during the agricultural product transaction process, dynamic pseudonyms are used to protect consumers' privacy and prevent the leakage of their identity information.

[0017] (3) Non-repudiation: The present invention uses digital signature technology to sign applications or orders during agricultural product ownership confirmation and transactions, thus avoiding denial by malicious users and malicious merchants and ensuring the non-repudiation of data.

[0018] (4) Traceability: This invention uses a trusted third party to generate a key for each node, and each node retains a public key certificate in the trusted node. When a problem occurs in the traceability process, the public key certificate can be used to trace back to a specific node, thereby finding the node with the problem.

[0019] (5) Message integrity: The present invention uses hash chains to achieve message integrity. Since the information is transmitted in a secure channel, it is impossible to forge a legal hash value. If the message TrackMsg is modified in the secure channel, the hash value will also change accordingly.

[0020] (6) Digital signature: When the terminal data collection device collects and processes the collected data and submits an application for chain connection, the present invention uses a digital signature algorithm to sign the chain connection application on the blockchain network to ensure the legitimacy and authenticity of the chain connection application.

[0021] (7) Key exchange: In the process of agricultural product traceability, a key exchange algorithm is used to obtain a shared key. The shared key is used to encrypt the message, which not only plays a protective role but also realizes two-way authentication between the Metaverse visualization platform and consumers. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0023] FIG1 is a schematic diagram of the framework of the present invention;

[0024] FIG2 is a flow chart of the method of the present invention. Implementation Method

[0025] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.

[0026] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined or explained in subsequent figures. At the same time, in the description of the present invention, the terms "first", "second", etc. are used only to distinguish the description and are not to be understood as indicating or implying relative importance, or implying any actual relationship or order between these entities or operations. In addition, the terms "connected" and "connected" can refer to direct connection between elements or indirect connection via other elements.

[0027] Example 1:

[0028] The present invention is implemented through the following technical solution, as shown in FIG1 . This solution is applied to a metaverse-based scenario and includes:

[0029] Agricultural product manufacturer AP j , used to produce agricultural products, AP j represents the jth agricultural product manufacturer (1≤j≤m), and there are m agricultural product manufacturers in the scenario. Assume that any agricultural product manufacturer AP j A total of K kinds of agricultural products can be produced, then ID jk Indicates agricultural product manufacturer AP j The digital identity of the k-th agricultural product produced (1≤k≤K).

[0030] Terminal data acquisition equipment S f , used to collect AP of agricultural product manufacturers j Data of a type of agricultural product produced D i (1≤i≤t), D i Indicates terminal data acquisition device S f The agricultural product data collected at the i-th moment has a total of t moments; S f Indicates the fth terminal data collection device (1≤f≤F). There are F terminal data collection devices in the scene, but an agricultural product manufacturer AP jAt least one terminal data collection device can be used, such as using three terminal data collection devices to collect AP data of agricultural product manufacturers. j Data on 3 agricultural products produced.

[0031] The blockchain network is used to upload data to the chain and provide consumers with traceability of agricultural products.

[0032] Metaverse visualization platform for producing virtual agricultural products.

[0033] The trading platform is used to provide a platform for consumers P to purchase agricultural products.

[0034] As shown in FIG2 , the present invention proposes a method for tracing agricultural products based on the metaverse, comprising the following steps:

[0035] Step 1: During the system initialization phase, the trusted node generates system parameters and the trusted third party generates the node key.

[0036] The trusted node selects a q-order multiplication cyclic group G and two generators v and p of the multiplication cyclic group G. The trusted node selects a hash function H: {0,1} * →{0,1} l , l is the number of bits output by H, and H converts the input binary string of arbitrary length into an output binary string of fixed length.

[0037] Trusted nodes select public key encryption algorithm E PK (.) and private key decryption algorithm D SK (.), the trusted node generates and discloses the system parameters {G,q,v,q,H,E PK (.),D SK (.)}, public key encryption algorithm E PK (.) is used to generate public key PK, private key decryption algorithm D SK (.) is used to generate the private key SK.

[0038] Step 2: During the data upload phase, the terminal data collection device collects agricultural product data within a period T and generates an application for uploading to the chain. When the blockchain network receives the application for uploading to the chain, it verifies the legality and authenticity of the application for uploading to the chain. Once the verification is correct, the uploading to the chain is completed.

[0039] Assume that the terminal data acquisition device S f The period for collecting agricultural product data is T, and f represents the fth terminal data collection device (f=1,2,...,F), which is used to collect the AP of the jth agricultural product manufacturer in the period T. j(j=1,2,...,m) is a kind of agricultural product data, that is, information about a kind of agricultural product. Within a period T, t agricultural product data can be collected in sequence, namely D1, D2,..., D t (t agricultural product data belong to the information of one agricultural product), generate a root of the t agricultural product data using a hash chain, and put the root of the hash chain on the chain, and set the initial value of the hash chain to 0, that is, h0=0.

[0040] Terminal data acquisition equipment S f Collected agricultural product data D i When (i=1,2,...,t), calculate the hash chain h i =H(h i-1 ||D i ), the meta information {D i ,h i} is sent to the cloud server through a secure channel. When the period T expires, the terminal data acquisition device S f Get the root h of the hash chain t .

[0041] If the agricultural product manufacturer does not register its digital identity in the blockchain network, the agricultural product manufacturer AP j First, send a digital identity registration application ReqInfo=(σ j ||PK j ||CheckInfo||TS), where CheckInfo is information such as agricultural product inspection certificate and brand certificate, PK j AP for agricultural product manufacturers j The public key, SK j AP for agricultural product manufacturers j The private key of j AP for agricultural product manufacturers j Use the private key SK j The signature of the digital identity registration application ReqInfo, TS is the current timestamp, and || is a connector.

[0042] After receiving the application for registration of digital identity ReqInfo, the blockchain network first checks the freshness of the current timestamp TS. If TS has expired, the application for registration of digital identity ReqInfo is rejected; otherwise, the issuing node uses the public key PK j Verify signature σ j , and check the CheckInfo information. After verification, the issuing node will issue the AP to the agricultural product manufacturer. j Sign the k-th agricultural product related information σ jk(k=1,2,...,K). Use the hash function H to map the registration digital identity application ReqInfo into a fixed-digit result H(ReqInfo), which serves as the agricultural product manufacturer AP j The unique digital identity of the kth agricultural product, that is, the digital identity ID of the agricultural product jk =H(ReqInfo).

[0043] Issuing nodes digitize agricultural products’ identity IDs jk , signature σ jk The CheckInfo information is uploaded to the blockchain network, and the agricultural products are digitally identified through the blockchain network consensus. jk Go to the blockchain and get the blockchain network transaction number FID jk Finally, the issuing node sends the AP to the agricultural product manufacturer. j Send digital ID of agricultural products jk , signature σ jk and blockchain network transaction number FID jk and other information.

[0044] Terminal data acquisition equipment S f Calculate signature σ f =Sign(SK f ||ID f ||ID jk ||h t ||TS`), and then apply for on-chain (SK f ||ID f ||ID jk ||h t ||TS`||σ f ) is sent to the blockchain network, where ID f Terminal data collection device S f Digital identity, SK f Terminal data collection device S f TS` is the current timestamp.

[0045] The blockchain network received an application for on-chain (SK f ||ID f ||ID jk ||h t ||TS`||σ f ), first check whether the timestamp TS' exceeds the specified legal time, if it exceeds, the terminal data acquisition device S is rejected f Otherwise, retrieve the ID from the blockchain node f The corresponding public key certificate, if there is no public key certificate, the terminal data collection device S is rejected fIf a public key certificate exists, the blockchain network uses the public key PK in the public key certificate. f Verify signature σ f , PK f Terminal data collection device S f If the verification fails, the terminal data collection device S is rejected. f Otherwise, the blockchain network will f ||ID jk ||h t ||TS`||σ f ) on the chain, you can grow virtual agricultural products in the Metaverse visualization platform.

[0046] Step 3: During the virtual agricultural product growth and circulation phase, the agricultural product data on the chain is verified. After successful verification, the agricultural product data is used to trigger the agricultural product growth function in the smart contract. The virtual agricultural products on the Metaverse visualization platform begin to grow, and the agricultural product circulation trajectory is updated after they mature.

[0047] The Metaverse Visualization Platform is also a node in the blockchain network. i The root of the hash chain h t After the chain is successfully uploaded, the blockchain network sends the digital identity ID of agricultural products to the Metaverse visualization platform jk The Metaverse visualization platform uses the digital identity ID of agricultural products jk Get agricultural product data D1, D2, ..., D from the cloud server t , and the corresponding hash chain value. It should be noted that before step 2 is uploaded to the chain, a unique digital identity ID for agricultural products is generated. jk (Uniqueness is guaranteed by ReqInfo); when on-chain, use ID jk As the primary key of the stored data, D1, D2, ..., D is stored in the cloud server. t ; When the blockchain network sends an ID to the Metaverse Visualization Platform jk When you can use ID jk Get D1, D2, ..., D from the cloud server t .

[0048] The Metaverse visualization platform receives agricultural product data D from the cloud server i Then, calculate the hash chain value h i =H(h i-1 ||D i ), after t times of calculation, the Metaverse Visualization Platform obtains the root h of the recalculated hash chain t Then, the Metaverse Visualization Platform takes out the root hash of the original hash chain from the blockchain network.t , if h t `with h t If they are not equal, an error message of "data error" will be sent to the cloud server, the verification of the agricultural product data on the chain will fail, and the virtual agricultural product growth information will be rejected; otherwise, the virtual agricultural product growth information will be updated.

[0049] When the agricultural product data on the chain is successfully verified, the Metaverse Visualization Platform uses D1, D2, ..., D t Update the growth status of the current virtual agricultural products. The growth status update algorithm is as follows:

[0050] (1) Input: D[t], curState[t]

[0051] (2) Output: newState[t]

[0052] (3) Algorithm description:

[0053] for i←1 to t do

[0054] isSuccess←UpdateState(D[i],curState[i],newState[i])

[0055] if isSuccess = False then

[0056] Panic(i)

[0057] end if

[0058] end for

[0059] return newState

[0060] (4) Variable explanation: D is the collected virtual agricultural product growth information, curState is the current growth status of the virtual agricultural product, newState is the new growth status of the virtual agricultural product, UpdateState is used to update the growth status of the virtual agricultural product, and Panic is used to report an abnormal growth status update on the Metaverse Visualization Platform.

[0061] When agricultural products mature and are circulated, the root of the hash chain is calculated and verified using the same method as above for the collected data, and then updated to the circulation track.

[0062] Step 4: Agricultural product trading stage. Agricultural products are sold on the trading platform. After consumers successfully purchase agricultural products, the blockchain network generates a traceability code. The agricultural product manufacturer pastes the traceability code and mails the agricultural products to the consumer.

[0063] In order to protect the privacy of consumers and the rights of agricultural product manufacturers, this scheme uses dynamic anonymity and a commitment mechanism with homomorphic properties to protect transaction information, and stores the transaction amount ciphertext based on the strong binding property of the discrete logarithm problem and the homomorphic addition property in the blockchain network.

[0064] Consumer P selects and purchases agricultural products on the trading platform. Assume that consumer P purchases agricultural products from n agricultural product manufacturers, n≤m. After consumer P selects the agricultural products, he randomly selects the product that satisfies n random numbers to generate the commitment value for the purchase amount, r j is the jth agricultural product manufacturer AP j For the jth agricultural product manufacturer AP j , consumer P calculates the commitment value , where s j For consumers P in agricultural product manufacturers AP j The amount of consumption, It is for consumer P to promise that the purchase amount declared to the j-th agricultural product producer is correct. When a malicious consumer changes the consumption amount s j Most of the money was given to one agricultural product manufacturer, and a very small part was given to other agricultural product manufacturers. Although the total amount did not change, the other agricultural product manufacturers did not receive the corresponding amount, and their rights and interests were greatly damaged. Therefore, the commitment of consumer P is needed; Used to hide the consumer P in the agricultural product producer AP j The consumption amount j , to prevent malicious consumers from knowing or even tampering with it. Then, consumer P uses the public key PK j r j Encrypted transaction amount ciphertext ,in For public key encryption algorithm, apply for transaction on-chain (PID||C1||...||C n ||R1||...||R n ||S) is sent to the blockchain network, where PID is a dynamic pseudonym randomly generated by consumer P, and the total amount of consumption is It is sent to a trusted node in the blockchain network through transaction methods such as transfer and Alipay.

[0065] The blockchain network receives the transaction on-chain application (PID||C1||...||C n ||R1||...||R n ||S), the trusted node calculates the total commitment value , if C j `With Cj If they are not equal, the transaction application will be rejected and the total amount S of consumer P will be returned; otherwise, the agricultural product manufacturer AP j Use the private key SK j The transaction amount ciphertext R j Decrypt and get ,in Decryption algorithm for the private key and verify with C j Are they equal? ​​If not, it means that the consumption amount s given by consumer P j Or a random number r j If there is any error, the transaction on-chain application will be rejected.

[0066] If verification with C j If they are equal, then the transaction is applied for on-chain (PID||C1||...||C n ||R1||...||R n ||S) is verified by the blockchain network, and the blockchain network will apply for the transaction on the chain (PID||C1||...||C n ||R1||...||R n ||S) on the chain and generate a traceability code (ID jk ||FID jk ||AP j ), where FID jk AP for agricultural product manufacturers j The transaction number of the agricultural product will be returned to the agricultural product manufacturer AP j Agricultural product manufacturer AP j The traceability code is pasted on the agricultural products, and the agricultural products are mailed to consumer P.

[0067] Agricultural product manufacturer AP j (r j ||s j ) is sent to the trusted node through a secure channel, and the trusted node calculates , verify C j `With C j Are they equal? ​​If not, an error is returned; otherwise, the trusted node will j Transaction amount s with consumer P j Send to AP by transfer j In order to protect the rights and interests of consumers P and agricultural product manufacturers, the trading platform puts the transaction amount in a trusted node. When an agricultural product manufacturer requests to withdraw money from the trusted node, verification and transfer will be carried out.

[0068] Step 5, the agricultural product traceability stage, verifies the identity and data legitimacy between the Metaverse Visualization Platform and the consumer, and then determines the traceability process viewing permission of the open Metaverse Visualization Platform based on the verification results.

[0069] After receiving agricultural products, consumers can scan the traceability code on the products to obtain the basic information necessary for traceability and submit a traceability application to the Metaverse Visualization Platform. The Metaverse Visualization Platform and the consumer must verify their identity and data legitimacy to ensure they are connected to the authentic Metaverse Visualization Platform and that the Metaverse Visualization Platform allows legitimate consumers to access agricultural product information. Upon successful verification, the Metaverse Visualization Platform authorizes consumers to access the agricultural product's growth process, enabling consumer traceability of the agricultural products.

[0070] Consumer P scans the traceability code on the agricultural product to obtain (ID jk ||FID jk ||AP j ), select a random number x as a temporary private key, and calculate Y=g x , calculate the shared key Key=(PK meta ) x .

[0071] How to generate a shared key:

[0072]

[0073] Obviously, , and only by mastering Only then can the correct shared key Key be obtained, where PK meta The public key of the Metaverse visualization platform;

[0074] Compute traceability request , where TS0 is the current timestamp. Consumer P sends the traceability request (TrackReq||X||TS0) to the Metaverse Visualization Platform;

[0075] After receiving the traceability request (TrackReq||X||TS0), the Metaverse Visualization Platform first checks whether the timestamp TS0 has expired. If it has expired, the traceability request is rejected; otherwise, the shared key is calculated. , where SK meta is the private key of the Metaverse Visualization Platform, calculated as ,calculate According to the AP in the traceability code j Take out the corresponding C from the blockchain network j with C j`Compare, if not equal, return to consumer P "Basic information is incorrect" error message; otherwise, use ID jk As the key field, retrieve the ID from the cloud server jk The corresponding agricultural product data Data, it should be noted here that the agricultural product data D i The root of the hash chain h t Store in the blockchain network, agricultural product data D i Stored in the cloud server, the agricultural product data D taken out from the cloud server i It may be tampered with, but the root hash of the hash chain in the blockchain network t It will never be tampered with, so in order to ensure the authenticity and integrity of the data, use ID jk The agricultural product data retrieved from the cloud server is data that has not been tampered with.

[0076] Then, the Metaverse Visualization Platform calculates the signature σ=Sign(Sk meta ,H(Data)), calculate the traceability information , where TS1 is the current timestamp. Finally, the Metaverse Visualization Platform sends (TrackMsg||TS1) to consumer P.

[0077] After receiving (TrackMsg||TS1), consumer P first checks whether the timestamp TS1 has expired. If it has expired, the traceability information TrackMsg is discarded; otherwise, the shared key Key and TS1 are used to solve (Data||σ), and the public key PK is used to meta Verify the signature σ. If the verification fails, the agricultural product data Data is rejected. If the verification succeeds, the agricultural product data Data is used to calculate the hash chain value h. t `, and query the value h of the hash chain from the blockchain network t ,If the data are consistent, it means that the traceability information is true and complete.

[0078] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for tracing agricultural products based on the Metaverse, Features: The following steps are involved: Step 1: During the system initialization phase, the trusted node generates system parameters and the trusted third party generates node keys; Step 2: During the data upload phase, the terminal data collection device collects agricultural product data within a period T and generates an application for upload. When the blockchain network receives the application, it verifies the legitimacy and authenticity of the application. Once the verification is correct, the upload is completed. Step 3, virtual agricultural product growth and agricultural product circulation stage, verify the agricultural product data on the chain, and use the agricultural product data to trigger the agricultural product growth function in the smart contract after successful verification. The virtual agricultural products on the Metaverse visualization platform begin to grow, and the agricultural product circulation track is updated after they grow and mature; Step 4: Agricultural product trading stage: Agricultural products are sold on the trading platform. After consumers successfully purchase agricultural products, the blockchain network generates a traceability code. The agricultural product manufacturer pastes the traceability code and mails the agricultural products to consumers. Step 5, the agricultural product traceability stage, verifies the identity and data legitimacy between the Metaverse Visualization Platform and the consumer, and then determines the traceability process viewing permission of the open Metaverse Visualization Platform based on the verification results.

2. The agricultural product traceability method based on Metaverse according to claim 1, Features: The step 1 specifically comprises the following steps: A trusted node in the blockchain network selects a q-order multiplication cyclic group G and two generators v and p of the multiplication cyclic group G; A hash function H is selected by a trusted node: {0,1} * →{0,1} l , l is the number of bits output by H, H converts the input binary string of any length into an output binary string of fixed length; Trusted nodes select public key encryption algorithm E PK (.) and private key decryption algorithm D SK (.), public key encryption algorithm E PK (.) Used to generate public key PK, private key decryption algorithm D SK (.) is used to generate the private key SK; Trusted nodes generate and publish system parameters {G,q,v,p,H,E PK (.),D SK (.)}.

3. The agricultural product traceability method based on metaverse according to claim 1, Features: The step 2 specifically includes the following steps: Terminal data collection equipment S f The period for collecting agricultural product data is T, f represents the fth terminal data collection device, f=1,2,...,F, which is used to collect the AP of the jth agricultural product manufacturer in period T. j A kind of agricultural product data, j=1,2,...,m, t agricultural product data are collected in turn in period T, which are D 1 ,D 2 ,...,D t , generate the root of t agricultural product data using the hash chain method, and put the root of the hash chain on the chain, and let the initial value of the hash chain h 0 is 0; Terminal data collection equipment S f Collected agricultural product data i When i=1,2,...,t, calculate the corresponding hash chain h i =H(h i-1 ||D i ), the meta information {D i ,h i } is sent to the cloud server through a secure channel; when the period T expires, the terminal data acquisition device S f Get the root h of the hash chain t ; If the agricultural product manufacturer does not register its digital identity in the blockchain network, the agricultural product manufacturer AP j Send a digital identity registration application ReqInfo=(σ j ||PK j ||CheckInfo||TS), where CheckInfo is the information related to agricultural products, PK j For agricultural product manufacturers AP j The public key, SK j For agricultural product manufacturers AP j The private key of j For agricultural product manufacturers AP j Using the private key SK j Signature of the digital identity registration application ReqInfo, TS is the current timestamp, || is the connector; After receiving the application for registration of digital identity ReqInfo, the blockchain network checks the freshness of the current timestamp TS. If TS has expired, the application for registration of digital identity ReqInfo is rejected; otherwise, the issuing node uses the public key PK j Verify signature j , and check the CheckInfo information. After verification, the issuing node issues the AP to the agricultural product manufacturer. j Sign the k-th agricultural product related information σ jk ,k=1,2,...,K;Use hash function H to map the registration digital identity application ReqInfo to H(ReqInfo), and use H(ReqInfo) as the agricultural product manufacturer AP j The digital ID of the k-th agricultural product jk ; The issuing node will digitize the identity ID of agricultural products jk , signature σ jk The CheckInfo information is uploaded to the blockchain network, and the agricultural products are digitized and identified through blockchain network consensus. jk Go to the blockchain and get the blockchain network transaction number FID jk ; Issuing node to agricultural product manufacturer AP j Send digital ID of agricultural products jk , signature σ jk and blockchain network transaction number FID jk ; Terminal data collection equipment S f Calculate the signature σ f =Sign(SK f ||ID f ||ID jk ||h t ||TS`), apply for on-chain (SK f ||ID f ||ID jk ||h t ||TS`||σ f ) is sent to the blockchain network, where ID f For terminal data collection equipment S f Digital identity of SK f For terminal data collection equipment S f The private key of , TS` is the current timestamp; The blockchain network receives an application for on-chain (SK f ||ID f ||ID jk ||h t ||TS`||σ f ), check whether the timestamp TS' exceeds the specified legal time. If it exceeds, the terminal data collection device S is rejected. f Otherwise, retrieve the ID from the blockchain node f The corresponding public key certificate, if there is no public key certificate, the terminal data collection device S is rejected f If a public key certificate exists, the blockchain network uses the public key PK in the public key certificate. f Verify signature f , PK f For terminal data collection equipment S f If the verification fails, the terminal data collection device S is rejected. f Otherwise, the blockchain network will f ||ID jk ||h t ||TS`||σ f ) on the chain.

4. The agricultural product traceability method based on Metaverse according to claim 3, Features: The step 3 specifically includes the following steps: When agricultural product data i The root of the hash chain h t After the chain is successfully uploaded, the blockchain network sends the digital identity ID of agricultural products to the Metaverse Visualization Platform jk The Metaverse visualization platform uses the digital identity ID of agricultural products jk Get agricultural product data D from the cloud server 1 ,D 2 ,...,D t , and the corresponding hash chain value; The Metaverse visualization platform receives agricultural product data from the cloud server D i After that, calculate the value h of the hash chain i =H(h i-1 ||D i ), after t calculations, the Metaverse Visualization Platform obtains the root h of the recalculated hash chain t `; The Metaverse Visualization Platform takes out the root hash of the original hash chain from the blockchain network. t , if h t ` and h t If they are not equal, an error message indicating that the data is incorrect is sent to the cloud server, the verification of the agricultural product data on the chain fails, and the virtual agricultural product growth information is rejected; otherwise, the virtual agricultural product growth information is updated; When the agricultural product data on the chain is successfully verified, the Metaverse Visualization Platform uses D 1 ,D 2 ,...,D t Update the current growth status of virtual agricultural products.

5. The agricultural product traceability method based on Metaverse according to claim 4, Features: The step 4 specifically comprises the following steps: Consumer P selects and purchases agricultural products on the trading platform. If consumer P purchases agricultural products from n agricultural product manufacturers, n≤m, a random selection of The n random numbers generate the commitment value of the purchase amount, r j is the jth agricultural product manufacturer AP j A random number; for the j-th agricultural product manufacturer AP j , consumer P calculates the commitment value , where s j For consumers P in agricultural product manufacturers AP j The amount of consumption, Used to indicate that the consumer P promises to the agricultural product producer AP j The consumption amount is correct. Used to hide the consumer P in the agricultural product producer AP j The consumption amount j ; Consumer P uses public key PK j r j Encrypt the transaction amount ciphertext ,in For public key encryption algorithm, apply for transaction on-chain (PID||C 1 ||...||C n ||R 1 ||...||R n ||S) is sent to the blockchain network, where PID is a dynamic pseudonym randomly generated by consumer P, and the total amount of consumption is Sent to a trusted node in the blockchain network; The blockchain network receives the transaction on-chain application (PID||C 1 ||...||C n ||R 1 ||...||R n ||S), the trusted node calculates the total commitment value , if C j `With C j If they are not equal, the transaction on-chain application will be rejected and the total amount S of consumer P will be returned; otherwise, the agricultural product manufacturer AP j Using the private key SK j The transaction amount ciphertext R j Decrypt it to get ,in Decryption algorithm for the private key and verify With C j Are they equal? ​​If not, the transaction on-chain application will be rejected; If verification With C j If they are equal, then the transaction is applied for on-chain (PID||C 1 ||...||C n ||R 1 ||...||R n ||S) is verified by the blockchain network, and the blockchain network applies for the transaction to the chain (PID||C 1 ||...||C n ||R 1 ||...||R n ||S) on the chain and generate a traceability code (ID jk ||FID jk ||AP j ), where FID jk For agricultural product manufacturers AP j The transaction number of the agricultural product will be returned to the agricultural product manufacturer AP j ; Agricultural product manufacturers AP j Paste the traceability code onto the agricultural products and mail the agricultural products to consumer P; Agricultural product manufacturer AP j (r j ||s j ) is sent to the trusted node through a secure channel, and the trusted node calculates , verify C j `With C j Are they equal? ​​If not, an error is returned; otherwise, the trusted node will j Transaction amount s with consumer P j Sent to agricultural product manufacturers AP j .

6. The agricultural product traceability method based on Metaverse according to claim 5, Features: The step 5 specifically comprises the following steps: Consumer P scans the traceability code on the agricultural product to obtain (ID jk ||FID jk ||AP j ), select a random number x as a temporary private key, and calculate Y=g x , calculate the shared key Key=(PK meta ) x , where PK meta Public key of the Metaverse Visualization Platform; calculation traceability request , where TS 0 is the current timestamp; consumer P will trace the request (TrackReq||X||TS 0 ) is sent to the Metaverse Visualization Platform; The Metaverse Visualization Platform received a traceability request (TrackReq||X||TS 0 ) and check the timestamp TS 0 Whether it has expired. If it has expired, the traceability application will be rejected; otherwise, the shared key will be calculated. , where SK meta is the private key of the Metaverse Visualization Platform, calculated as ,calculate ; According to the AP in the traceability code j Take out the corresponding C from the blockchain network j With C j `Compare, if not equal, then return an error message that the basic information is incorrect to the consumer P; otherwise, jk As the key field, retrieve the ID from the cloud server jk The corresponding agricultural product data; Metaverse Visualization Platform Calculates Signature σ=Sign(Sk meta ,H(Data)), calculate the traceability information , where TS 1 is the current timestamp; the Metaverse Visualization Platform treats (TrackMsg||TS 1 ) is sent to consumer P; Consumer P receives (TrackMsg||TS 1 ) and check the timestamp TS 1 Whether it has expired. If it has expired, the tracing information TrackMsg is discarded; otherwise, the shared key Key and TS are used. 1 Solve (Data||σ) and use the public key PK meta Verify the signature σ. If the verification fails, the agricultural product data Data is rejected. If the verification succeeds, the agricultural product data Data is used to calculate the hash chain value h. t `, and query the value h of the hash chain from the blockchain network t , if h t ` and h t If they are equal, it means that the traceability information is true and complete.

Citation Information

Patent Citations

  • Agricultural product block chain traceability method and device

    CN109493082A

  • Block chain-based transaction processing method and device, and block chain-based transaction tracking method and device

    CN112115201A

  • Method for storing real state change of real object

    CN114266864A

  • Archive management method and system based on meta-universe block chain technology

    CN114707043A

  • Metacosm interaction system and method based on agricultural Internet of Things

    CN114971212A

Cited By

  • Digital agriculture full-chain management traceability system and method based on block chain and AI algorithm

    CN118941123A

  • Digital collection copyright intelligent monitoring method and platform based on block chain

    CN119598424A

  • Clothing order flow feedback method and system based on block chain

    CN120181974A

  • Fertilizer traceability system based on block chain and big data fusion

    CN120198141A

  • Modern agriculture digital authentication large model

    CN120811618A