An item information verification method and system based on zero-knowledge proof and a blockchain
This method for verifying item information by combining zero-knowledge proofs with blockchain solves the privacy and efficiency problems of batch item authenticity authentication in existing technologies, and achieves efficient and flexible item information verification, which is applicable to scenarios such as supply chain finance, brand channel compliance audits, and product traceability on cross-border e-commerce platforms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-14
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies struggle to achieve efficient, flexible, and verifiable batch item authenticity verification in scenarios such as supply chain finance, brand channel compliance audits, and government procurement supplier reviews. They also suffer from issues such as insufficient privacy protection, high computational overhead, and inadequate adaptability to business scenarios.
By employing a zero-knowledge proof and blockchain-based method for verifying item information, including on-chain commitments, proof generation, and proof verification processes, and utilizing cryptographic commitments, Merkle trees, and smart contracts, privacy protection and efficient verification of batch item data are achieved.
It enables efficient and flexible adaptation to various verification requirements, such as quantity thresholds, geographic attribution, and authenticity identification, while protecting business privacy. This significantly improves data credibility and the reliability of verification results, reduces computational overhead, and is suitable for practical application scenarios such as supply chain traceability and batch compliance verification.
Smart Images

Figure CN121530749B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of blockchain technology, specifically relating to a method and system for verifying item information based on zero-knowledge proofs and blockchain. Background Technology
[0002] In the process of digital transformation of enterprise operations and supply chain management, scenarios such as movable asset pledge in supply chain finance, compliance audits of brand channels, and supplier reviews in government procurement are increasingly demanding a dual need for "privacy protection and trusted verification." Enterprises need to prove the authenticity and compliance of assets or inventory to third parties such as financial institutions, brand owners, and bidding parties, but are unwilling to disclose core business secrets such as product categories, quantities, purchase prices, and supply chain details to avoid data security risks and potential competitive threats. Against this backdrop, the combination of zero-knowledge proof technology and blockchain has become a key direction for exploring solutions to the "contradiction between data disclosure and privacy protection," and related technical solutions have been applied in multiple fields.
[0003] Currently, several patents have explored the application path of integrating zero-knowledge proofs and blockchain:
[0004] Chinese patent CN116091049B proposes a "Payment Method, Device, and Cloud Platform Based on Big Data and Blockchain," whose core technology involves generating a unique digital fingerprint and ID for items through a third-party institution, encrypting transaction data using zero-knowledge proofs, and then verifying the validity of the proofs through blockchain. It is primarily applied to payment verification scenarios for physical goods transactions, aiming to reduce the risk of information leakage during transactions. Chinese patent CN111159694A discloses a "Private Use Method of Blockchain Digital Assets Based on Zero-Knowledge Proofs." This method completes the issuance and distribution of digital assets through blockchain, using zero-knowledge proof technology to hide sensitive information such as the identity of asset owners and participants, while supporting on-chain verification of validity. It is mainly suitable for scenarios involving the private use of digital assets. Chinese patent CN107274184A provides a "Blockchain Data Processing Method and Device Based on Zero-Knowledge Proofs," which verifies the validity of cross-node shared data through zero-knowledge proof smart contracts, realizing a "verify first, pay later" transaction model that balances data privacy and transaction security. It is suitable for cross-node data sharing and validity verification scenarios.
[0005] In addition, traditional verification schemes include full data auditing schemes, hash commitment-based schemes, and general zero-knowledge proof schemes. However, all existing technical solutions have significant drawbacks and are difficult to meet the actual needs of batch item information verification.
[0006] Privacy risks associated with full data auditing solutions: The proving party must provide all inventory details, supply chain data, and other core information, completely sacrificing data sovereignty and commercial privacy. This not only poses a risk of sensitive information leakage and fails to meet compliance requirements, but may also be used by the verifying party for unfair business competition, harming the proving party's interests. Functional limitations of hash commitment-based solutions: They can only provide basic proofs of data existence and cannot support verification of complex business logic such as "a specific subset meets the conditions," "total inventory meets the target," and "geographical region compliance." They also lack adaptability to dynamic business strategies and have insufficient privacy protection. Practical limitations of general zero-knowledge proof solutions: They have high computational overhead and time-consuming proof generation, making it difficult to meet the real-time requirements of batch verification. They also lack integration with physical world identity authentication systems. The deep integration leads to a disconnect between the proof content and the physical assets; the lack of dedicated circuits designed for specific business scenarios such as supply chains results in low proof efficiency, and deployment and use require professional cryptographic knowledge, posing a high barrier to entry; the limitations of existing related patents in terms of scenarios and efficiency: although the aforementioned patents have achieved the technical integration of zero-knowledge proofs and blockchain, they are all limited to the verification of single data or customized applications in specific scenarios (such as payment transactions and digital assets), lacking the ability to efficiently verify information on large quantities of goods; some solutions rely on third-party institutions to participate in data collection or authentication, increasing trust costs and process complexity, and cannot flexibly adapt to diverse business needs such as quantity verification, geographical compliance, and total value verification, making it difficult to meet the large-scale application demands of scenarios such as supply chain finance and channel auditing.
[0007] In summary, existing technical solutions have shortcomings in terms of privacy protection integrity, batch verification efficiency, business scenario adaptability, and integration with the physical world. There is an urgent need in this field for a solution that can overcome these deficiencies and achieve efficient, flexible, and verifiable batch item authenticity authentication while strictly protecting commercial privacy. Summary of the Invention
[0008] This invention addresses the technical problems in existing technologies by providing a method for verifying item information based on zero-knowledge proofs and blockchain, comprising:
[0009] On-chain commitment: The certifier registers a cryptographic commitment representing its collection of items on the blockchain;
[0010] Proof generation: The proving party generates a zero-knowledge proof off-chain based on its private item data, the cryptographic commitment, and a verification strategy through a zero-knowledge proof circuit; wherein the zero-knowledge proof circuit is configured to internally verify that the private item data satisfies the verification strategy and is consistent with the cryptographic commitment;
[0011] Proof Verification: The verifier verifies the validity of the zero-knowledge proof on the blockchain. If the verification passes, it is confirmed that the set of items owned by the verifier that corresponds to the cryptographic commitment satisfies the verification strategy.
[0012] The verification strategy includes at least one of the following:
[0013] This proves that all items in the private item data have passed authenticity verification;
[0014] Prove that the number of items in the private item data that have passed the authenticity verification is greater than or equal to a preset threshold;
[0015] Prove that the geographical locations of all items in the private item data are within an authorized geographical area.
[0016] Furthermore, on-chain commitments: The specific process by which the proving party registers the cryptographic commitment representing its collection of items on the blockchain is as follows:
[0017] The proving party receives batch item data to be verified, performs data standardization processing on the batch item data, constructs a Merkle tree based on the standardized batch item data, and uploads the root hash of the Merkle tree to the blockchain for storage.
[0018] Furthermore, the proof generation process is as follows: The proving party, off-chain, generates a zero-knowledge proof based on its private item data, the cryptographic commitment, and a verification strategy using a zero-knowledge proof circuit.
[0019] The proving party receives a preset verification strategy, digitally expresses the verification strategy based on standardized batch item data and generates corresponding circuit constraints, and performs constraint optimization processing on the circuit constraints.
[0020] The proving party designs a circuit based on the constrained and optimized circuit constraints, generates a key pair containing a proof key and a verification key through the circuit design, and deploys the verification key into the smart contract of the blockchain.
[0021] The proving party prepares private input data based on standardized batch item data, and performs proof computation by combining the private input data, constraint-optimized circuit constraints, and the proof key to generate a zero-knowledge proof. ;
[0022] The zero-knowledge proof circuit internally verifies that the private item data satisfies the verification strategy and that the private item data is consistent with the cryptographic commitment, and only outputs the zero-knowledge proof to the outside. .
[0023] Furthermore, the verification process involves the verifier validating the zero-knowledge proof on-chain. If the verification passes, the specific process confirming that the set of items owned by the verifier, corresponding to the cryptographic commitment, satisfies the verification strategy is as follows:
[0024] The verifier submits the zero-knowledge proof π to a smart contract on the blockchain, which then calls a preset verification algorithm.
[0025] The smart contract combines the verification key deployed by the prover with the Merkle root hash uploaded by the prover to the blockchain storage to perform validity verification on the zero-knowledge proof π.
[0026] If the zero-knowledge proof If the verification result is valid, the verifier records the successful verification information of the batch of items on the blockchain; if the zero-knowledge proof... If the verification result is invalid, the verifier returns the corresponding verification error message.
[0027] Furthermore, the specific process of data standardization and Merkle tree construction is as follows:
[0028] The certifying party extracts information from the batch of item data, including the item's unique identification code, physical characteristic parameters, traceability identifier, and authenticity verification field.
[0029] The unique identification code for each item is generated by encrypting the item's factory serial number using the SHA-256 hash algorithm; the extracted information is then converted into structured data according to preset rules.
[0030] Numerical parameters retain a preset number of decimal places and are uniformly converted to decimal format. Character information is standardized using UTF-8 encoding. Traceability identifiers are recombined using a combination of timestamp and geographic location code. Integrity checks are performed on the standardized structured data using the following formula:
[0031] ;
[0032] in, It is the SHA-256 hash function. to Standardized data for individual items. Indicates the first Standardized data for each item If the result is 0, the data is considered complete; otherwise, the corresponding invalid data is removed.
[0033] Merkle trees are constructed using a binary tree structure, with standardized data hash values as leaf nodes and non-leaf nodes being the concatenation hashes of their two child nodes. The root hash is calculated using the following formula:
[0034] ,in, These are the data of the adjacent left and right child nodes, respectively. This is for string concatenation operations.
[0035] Furthermore, the proving party receives a preset verification strategy, digitizes the verification strategy based on standardized batch item data, generates corresponding circuit constraints, and performs constraint optimization processing on the circuit constraints as follows:
[0036] The preset verification strategies accepted by the certifying party include quantity threshold strategy, geographic attribution strategy, and authenticity identification strategy. For different types of verification strategies, the standardized batch item data fields are used for digital expression. The quantity threshold strategy is transformed into the logic that the quantity field value is greater than or equal to the preset threshold. The geographic attribution strategy is transformed into the logic that the geographic code field belongs to the preset code set. The authenticity identification strategy is transformed into the logic that the authenticity field value is a preset valid identifier.
[0037] Based on the logic of the digitized verification strategy, circuit constraints are generated by combining the standardized batch item data fields. The circuit constraints include data consistency constraints, range constraints, and enumeration constraints.
[0038] Data consistency constraints are ,in, For the field values in the standardized batch item data, The corresponding field value in the cryptographic commitment; the range constraint is... ,in, This refers to the quantity field value in the batch item data. To preset the minimum threshold, The preset maximum threshold is used; the enumerated matching constraints are... ,in, This refers to the geocoding field value in the batch item data. For a pre-defined set of valid geocodes,
[0039] All three types of constraints are based on finite fields. Build, Representing a finite field The order;
[0040] The generated circuit constraints are optimized by classifying data consistency constraints and range constraints as basic constraints, and enumerated matching constraints as extended constraints. A general constraint library is then constructed based on the basic constraints.
[0041] Encapsulate recurring constraint logic into callable modules for reuse, classify and stratify extended constraints by geocode, delete redundant constraints and merge related constraints;
[0042] Convert all optimized constraints to R1CS format to satisfy... The constraints, among which, This is a line value vector, containing dummy variables with a value of 1, private input variables, and intermediate calculation variables. Let be the left constraint vector. The right constraint vector, To output the constraint vector, the dot product operation is defined as follows: The three vectors contain only 0, 1, and the index of the corresponding variable.
[0043] Furthermore, the proving party designs a circuit based on the constrained and optimized circuit constraints, generates a key pair containing a proof key and a verification key through the circuit design, and deploys the verification key into the blockchain smart contract as follows:
[0044] A zero-knowledge proof circuit is designed based on the constraint-optimized R1CS format. The circuit includes a constraint parsing module, a data calculation module, and a proof output module.
[0045] The constraint parsing module parses R1CS format. , , vector;
[0046] The data calculation module performs finite field operations. The addition, subtraction, and multiplication operations within the module demonstrate that the output module is used to generate a set of polynomials conforming to the QAP format.
[0047] The circuit input consists of standardized batch item data and verification strategy parameters, and the output consists of three sets of polynomials. , , and objective polynomial ,in, The number of multiplication gates in the circuit. For the first Abstract assignment of a multiplication method;
[0048] The Groth16 algorithm is used to generate a common reference string (CRS) based on the designed zero-knowledge proof circuit. The CRS contains the group of elliptic curve BN254. Generator ,group Generator and polynomial sets , , At random points The result of the evaluation;
[0049] Derivation of the proof key based on the public reference string CRS and verification key ;
[0050] in It is a random number. , , The left, right, and output polynomials are respectively located in The value of the point, ,in, It is a random number;
[0051] The certifier employs a non-escrow key model, constructing a transaction request through the blockchain's smart contract deployment interface. This transaction request includes the verification key. The complete data and the digital signature of the certifier are provided; the transaction request is sent to the blockchain network, and after verification by node consensus, it is written into a block. The smart contract will verify the key. The key is stored in a pre-defined key storage mapping table, which uses the certifier's identity identifier as the key to verify the key. Value;
[0052] The private input data preparation process involves filtering field values corresponding to circuit constraints from the standardized batch item data, including field values corresponding to data consistency constraints. Quantity field value corresponding to range constraints Enumerate the geocoding field values corresponding to the matching constraints. Eliminate those outside the finite field Data with values ranging from a certain range and that does not meet the basic requirements of the validation strategy; convert the filtered field values into a finite field. The elements within form a private input data set. And perform hash verification on the data set.
[0053] Furthermore, the proving party prepares private input data based on standardized batch item data, and performs proof computation by combining the private input data, constraint-optimized circuit constraints, and the proof key to generate a zero-knowledge proof. The specific process is as follows:
[0054] Private input data set Substitute the constrained R1CS format constraints after constraint optimization and verify. Heng was established, among which, Includes private input data set and intermediate calculation variables in the circuit;
[0055] Subsequently, a set of polynomials based on the QAP format was used. , , Calculate polynomial product And calculate using polynomial division ,in For quotient polynomial, It is a remainder polynomial and its degree is less than The degree of verification of the remainder polynomial. To confirm that the input data meets the circuit constraints;
[0056] Based on the proof key The above calculation results are then used to perform group operations to generate a proof component:
[0057] calculate ,in Private input data set Elements in;
[0058] calculate ;
[0059] calculate ,in, For random parameters in CRS;
[0060] Final zero-knowledge proof ,in, Zero-knowledge proofs generated Perform integrity verification, the verification content includes , , The validity of group affiliation and the consistency of operational logic.
[0061] A system for verifying item information based on zero-knowledge proofs and blockchain, used in the aforementioned method for verifying item information based on zero-knowledge proofs and blockchain, includes:
[0062] The proving client is configured to store private item data and includes a zero-knowledge proof generator for generating the zero-knowledge proof;
[0063] A blockchain network is used to store the cryptographic commitments and run a verification smart contract to verify the zero-knowledge proofs.
[0064] The verification client is configured to initiate a verification request to the verification smart contract and obtain the verification result.
[0065] The certifying client also communicates with an item authenticity verification service to obtain the verification results and geographical location information from the private item data.
[0066] Furthermore, the system also includes a policy engine for compiling user-defined business policies into constraints that the zero-knowledge proof circuit can execute.
[0067] The positive and progressive effects of this invention are as follows:
[0068] This invention employs a collaborative technology solution combining zero-knowledge proofs and blockchain. It leverages zero-knowledge proofs to achieve privacy protection by making batch item information data available but invisible, preventing the leakage of sensitive fields and verification strategy details. Furthermore, through dynamic transformation and optimization of circuit constraints, it flexibly adapts to various verification needs such as quantity thresholds, geographical attribution, and authenticity identification, addressing the pain point of insufficient adaptability in existing technologies. Simultaneously, it combines hash verification to ensure the integrity and immutability of private input data, and deploys the verification key chain on-chain to utilize the immutability of blockchain to prevent forgery, significantly improving the credibility of data and verification results. Finally, through the Groth16 algorithm and constraint redundancy elimination optimization, it greatly reduces computational overhead, achieving rapid proof generation and millisecond-level on-chain verification. This efficiently adapts to practical application scenarios such as supply chain traceability and batch compliance verification, balancing privacy compliance, adaptability flexibility, verification credibility, and computational efficiency. Attached Figure Description
[0069] Figure 1 This is a flowchart of the steps of the present invention. Detailed Implementation
[0070] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention.
[0071] Reference Figure 1 A method for verifying item information based on zero-knowledge proofs and blockchain includes:
[0072] On-chain commitment: The certifier registers a cryptographic commitment representing its collection of items on the blockchain;
[0073] Proof generation: The proving party generates a zero-knowledge proof off-chain based on its private item data, the cryptographic commitment, and a verification strategy through a zero-knowledge proof circuit; wherein the zero-knowledge proof circuit is configured to internally verify that the private item data satisfies the verification strategy and is consistent with the cryptographic commitment;
[0074] Proof Verification: The verifier verifies the validity of the zero-knowledge proof on the blockchain. If the verification passes, it is confirmed that the set of items owned by the verifier that corresponds to the cryptographic commitment satisfies the verification strategy.
[0075] The verification strategy includes at least one of the following:
[0076] This proves that all items in the private item data have passed authenticity verification;
[0077] Prove that the number of items in the private item data that have passed the authenticity verification is greater than or equal to a preset threshold;
[0078] Prove that the geographical locations of all items in the private item data are within an authorized geographical area.
[0079] Furthermore, on-chain commitments: The specific process by which the proving party registers the cryptographic commitment representing its collection of items on the blockchain is as follows:
[0080] The proving party receives batch item data to be verified, performs data standardization processing on the batch item data, constructs a Merkle tree based on the standardized batch item data, and uploads the root hash of the Merkle tree to the blockchain for storage.
[0081] Furthermore, the proof generation process is as follows: The proving party, off-chain, generates a zero-knowledge proof based on its private item data, the cryptographic commitment, and a verification strategy using a zero-knowledge proof circuit.
[0082] The proving party receives a preset verification strategy, digitally expresses the verification strategy based on standardized batch item data and generates corresponding circuit constraints, and performs constraint optimization processing on the circuit constraints.
[0083] The proving party designs a circuit based on the constrained and optimized circuit constraints, generates a key pair containing a proof key and a verification key through the circuit design, and deploys the verification key into the smart contract of the blockchain.
[0084] The proving party prepares private input data based on standardized batch item data, and performs proof computation by combining the private input data, constraint-optimized circuit constraints, and the proof key to generate a zero-knowledge proof. ;
[0085] The zero-knowledge proof circuit internally verifies that the private item data satisfies the verification strategy and that the private item data is consistent with the cryptographic commitment, and only outputs the zero-knowledge proof to the outside. .
[0086] Furthermore, the verification process involves the verifier validating the zero-knowledge proof on-chain. If the verification passes, the specific process confirming that the set of items owned by the verifier, corresponding to the cryptographic commitment, satisfies the verification strategy is as follows:
[0087] The verifier submits the zero-knowledge proof π to a smart contract on the blockchain, which then calls a preset verification algorithm.
[0088] The smart contract combines the verification key deployed by the prover with the Merkle root hash uploaded by the prover to the blockchain storage to perform validity verification on the zero-knowledge proof π.
[0089] If the zero-knowledge proof If the verification result is valid, the verifier records the successful verification information of the batch of items on the blockchain; if the zero-knowledge proof... If the verification result is invalid, the verifier returns the corresponding verification error message.
[0090] Furthermore, the specific process of data standardization and Merkle tree construction is as follows:
[0091] The certifying party extracts information from the batch of item data, including the item's unique identification code, physical characteristic parameters, traceability identifier, and authenticity verification field.
[0092] The unique identification code for each item is generated by encrypting the item's factory serial number using the SHA-256 hash algorithm; the extracted information is then converted into structured data according to preset rules.
[0093] Numerical parameters retain a preset number of decimal places and are uniformly converted to decimal format. Character information is standardized using UTF-8 encoding. Traceability identifiers are recombined using a combination of timestamp and geographic location code. Integrity checks are performed on the standardized structured data using the following formula:
[0094] ;
[0095] in, It is the SHA-256 hash function. to Standardized data for individual items. Indicates the first Standardized data for each item If the result is 0, the data is considered complete; otherwise, the corresponding invalid data is removed.
[0096] Merkle trees are constructed using a binary tree structure, with standardized data hash values as leaf nodes and non-leaf nodes being the concatenation hashes of their two child nodes. The root hash is calculated using the following formula:
[0097] ,in, These are the data of the adjacent left and right child nodes, respectively. This is for string concatenation operations.
[0098] Furthermore, the proving party receives a preset verification strategy, digitizes the verification strategy based on standardized batch item data, generates corresponding circuit constraints, and performs constraint optimization processing on the circuit constraints as follows:
[0099] The preset verification strategies accepted by the certifying party include quantity threshold strategy, geographic attribution strategy, and authenticity identification strategy. For different types of verification strategies, the standardized batch item data fields are used for digital expression. The quantity threshold strategy is transformed into the logic that the quantity field value is greater than or equal to the preset threshold. The geographic attribution strategy is transformed into the logic that the geographic code field belongs to the preset code set. The authenticity identification strategy is transformed into the logic that the authenticity field value is a preset valid identifier.
[0100] Based on the logic of the digitized verification strategy, circuit constraints are generated by combining the standardized batch item data fields. The circuit constraints include data consistency constraints, range constraints, and enumeration constraints.
[0101] Data consistency constraints are ,in, For the field values in the standardized batch item data, The corresponding field value in the cryptographic commitment; the range constraint is... ,in, This refers to the quantity field value in the batch item data. To preset the minimum threshold, The preset maximum threshold is used; the enumerated matching constraints are... ,in, This refers to the geocoding field value in the batch item data. For a pre-defined set of valid geocodes,
[0102] All three types of constraints are based on finite fields. Build, Representing a finite field The order;
[0103] The generated circuit constraints are optimized by classifying data consistency constraints and range constraints as basic constraints, and enumerated matching constraints as extended constraints. A general constraint library is then constructed based on the basic constraints.
[0104] Encapsulate recurring constraint logic into callable modules for reuse, classify and stratify extended constraints by geocode, delete redundant constraints and merge related constraints;
[0105] Convert all optimized constraints to R1CS format to satisfy... The constraints, among which, This is a line value vector, containing dummy variables with a value of 1, private input variables, and intermediate calculation variables. Let be the left constraint vector. The right constraint vector, To output the constraint vector, the dot product operation is defined as follows: The three vectors contain only 0, 1, and the index of the corresponding variable.
[0106] Furthermore, the proving party designs a circuit based on the constrained and optimized circuit constraints, generates a key pair containing a proof key and a verification key through the circuit design, and deploys the verification key into the blockchain smart contract as follows:
[0107] A zero-knowledge proof circuit is designed based on the constraint-optimized R1CS format. The circuit includes a constraint parsing module, a data calculation module, and a proof output module.
[0108] The constraint parsing module parses R1CS format. , , vector;
[0109] The data calculation module performs finite field operations. The addition, subtraction, and multiplication operations within the module demonstrate that the output module is used to generate a set of polynomials conforming to the QAP format.
[0110] The circuit input consists of standardized batch item data and verification strategy parameters, and the output consists of three sets of polynomials. , , and objective polynomial ,in, The number of multiplication gates in the circuit. For the first Abstract assignment of a multiplication method;
[0111] The Groth16 algorithm is used to generate a common reference string (CRS) based on the designed zero-knowledge proof circuit. The CRS contains the group of elliptic curve BN254. Generator ,group Generator and polynomial sets , , At random points The result of the evaluation;
[0112] Derivation of the proof key based on the public reference string CRS and verification key ;
[0113] in It is a random number. , , The left, right, and output polynomials are respectively located in The value of the point, ,in, It is a random number;
[0114] The certifier employs a non-escrow key model, constructing a transaction request through the blockchain's smart contract deployment interface. This transaction request includes the verification key. The complete data and the digital signature of the certifier are provided; the transaction request is sent to the blockchain network, and after verification by node consensus, it is written into a block. The smart contract will verify the key. The key is stored in a pre-defined key storage mapping table, which uses the certifier's identity identifier as the key to verify the key. Value;
[0115] The private input data preparation process involves filtering field values corresponding to circuit constraints from the standardized batch item data, including field values corresponding to data consistency constraints. Quantity field value corresponding to range constraints Enumerate the geocoding field values corresponding to the matching constraints. Eliminate those outside the finite field Data with values ranging from a certain range and that does not meet the basic requirements of the validation strategy; convert the filtered field values into a finite field. The elements within form a private input data set. And perform hash verification on the data set.
[0116] Furthermore, the proving party prepares private input data based on standardized batch item data, and performs proof computation by combining the private input data, constraint-optimized circuit constraints, and the proof key to generate a zero-knowledge proof. The specific process is as follows:
[0117] Private input data set Substitute the constrained R1CS format constraints after constraint optimization and verify. Heng was established, among which, Includes private input data set and intermediate calculation variables in the circuit;
[0118] Subsequently, a set of polynomials based on the QAP format was used. , , Calculate polynomial product And calculate using polynomial division ,in For quotient polynomial, It is a remainder polynomial and its degree is less than The degree of verification of the remainder polynomial. To confirm that the input data meets the circuit constraints;
[0119] Based on the proof key The above calculation results are then used to perform group operations to generate a proof component:
[0120] calculate ,in Private input data set Elements in;
[0121] calculate ;
[0122] calculate ,in, For random parameters in CRS;
[0123] Final zero-knowledge proof ,in, Zero-knowledge proofs generated Perform integrity verification, the verification content includes , , The validity of group affiliation and the consistency of operational logic.
[0124] A system for verifying item information based on zero-knowledge proofs and blockchain, used in the aforementioned method for verifying item information based on zero-knowledge proofs and blockchain, includes:
[0125] The proving client is configured to store private item data and includes a zero-knowledge proof generator for generating the zero-knowledge proof;
[0126] A blockchain network is used to store the cryptographic commitments and run a verification smart contract to verify the zero-knowledge proofs.
[0127] The verification client is configured to initiate a verification request to the verification smart contract and obtain the verification result.
[0128] The certifying client also communicates with an item authenticity verification service to obtain the verification results and geographical location information from the private item data.
[0129] Furthermore, the system also includes a policy engine for compiling user-defined business policies into constraints that the zero-knowledge proof circuit can execute.
[0130] As further illustrative, in one example, a liquor manufacturer needs to apply for supply chain finance financing from a bank. The bank requires proof that "there are no fewer than 100,000 bottles of liquor in the inventory that have passed authenticity verification," and the company is unwilling to disclose specific inventory locations, batch numbers, or other trade secrets. This invention achieves efficient adaptation through the following technical process:
[0131] On-chain commitment phase: The enterprise, acting as the certifier, collects batch data of all its inventory of liquor (including authenticity verification fields, quantity fields, etc.), performs data standardization processing—extracting unique product identification codes, authenticity markers, and other information, standardizing character data using UTF-8 encoding, retaining 6 decimal places for numeric quantity fields and converting them to decimal, and ensuring data integrity through SHA-256 hash verification. A Merkle tree is constructed based on the standardized data, and the root hash is uploaded to the blockchain storage, completing the cryptographic commitment registration.
[0132] Proof generation phase: The enterprise receives the bank's pre-set verification strategy of "genuine product quantity ≥ 100,000 bottles" and digitizes it into a range constraint. ( For the quantity of liquor, The circuit constraints are generated by combining data consistency constraints. After optimization and conversion to R1CS format, a zero-knowledge proof circuit is designed. The Groth16 algorithm is used to generate proof keys and verification keys, and the verification key is deployed to the blockchain smart contract. Subsequently, private input data (quantity of genuine items, authenticity identification fields) is selected from standardized data, hashed and verified, and then input into the circuit. Combined with the proof key, a zero-knowledge proof is generated.
[0133] Verification phase: The bank, as the verifier, will provide the proof. The application is submitted to the smart contract. The smart contract calls the Groth16 verification algorithm, combining the verification key stored on-chain with the Merkle tree root hash, to perform format verification, bilinear mapping verification, and baseline consistency verification. Upon successful verification, the bank confirms that the company meets the financing requirements and that the company has not disclosed any sensitive inventory information, achieving "data usable but not visible," thus ensuring both the financial institution's risk control needs and protecting the company's trade secrets.
[0134] II. Brand Owner's Cross-Regional Channel Compliance Audit: Channel Control Without Data Leaks
[0135] In one example, a cosmetics brand headquarters needs to conduct random checks on distributors in East China to verify that "all inventory products are located within the authorized region" and that "the authenticity rate is higher than 95%", preventing distributors from selling counterfeit goods across regions and preventing the leakage of core sales data from distributors. The technology implementation process is as follows:
[0136] On-chain commitment phase: The distributor, as the certifier, collects batch data of the inventory of beauty products (including geocoding and authenticity verification fields), performs standardized processing - the geocoding is recombined according to preset rules, the authenticity identifier is unified as a valid / invalid identifier, and after integrity verification, a Merkle tree is constructed and the root hash is stored on the chain.
[0137] Proof generation phase: The brand headquarters issues verification strategies through the strategy engine, and the dealers receive and digitize them into two types of constraints: enumerated matching constraints. ( The system uses a set of authorized geographic codes for the East China region and a range constraint (genuine product quantity / total inventory 295%). Circuit constraints are optimized and key pairs are generated. After the keys are verified and uploaded to the blockchain, geographic codes and authenticity fields are selected as private input data to generate a zero-knowledge proof π, which is then submitted to the brand headquarters.
[0138] Verification and validation phase: The brand headquarters will Submissions are sent to a blockchain smart contract, which verifies the data using on-chain keys and Merkle root hashes. Successful verification confirms the distributor's compliance. Throughout the process, distributors do not need to provide detailed inventory lists or sales data, and brand headquarters does not need to directly intervene in distributor inventory management. This technological approach builds mutual trust, ensuring both channel compliance and protecting the distributor's operational autonomy.
[0139] III. Product Traceability on Cross-Border E-commerce Platforms: Building Consumer Trust Under Privacy Protection
[0140] In one example, a cross-border e-commerce platform requires overseas luxury goods merchants to prove that "all listed products are certified by the brand" and that "the inventory quantity is consistent with the sales commitment," reassuring consumers while protecting sensitive information such as the merchant's procurement channels and inventory size. The technical implementation process is as follows:
[0141] On-chain commitment phase: Luxury merchants collect batch data of listed products (brand certification marks, inventory quantity, traceability codes) and perform standardized processing - the certification marks are unified into a valid format recognized by the brand, the traceability codes are recombined by timestamp + geocode, and after integrity verification, a Merkle tree is constructed and the root hash is stored on the chain.
[0142] Proof Generation Phase: Merchants receive the platform's verification strategy, digitizing it into authenticity constraints (authentication identifier is valid) and range constraints (inventory quantity ≥ sales commitment quantity). Circuit constraints are optimized and a key pair is generated. After the verification key is uploaded to the blockchain, private input data (authentication identifier, inventory quantity) is prepared and, after hash verification, a zero-knowledge proof is generated. Submit it to the e-commerce platform.
[0143] Verification phase: The platform will The submission is sent to a smart contract, where verification is completed using the on-chain key and the Merkle tree root hash. Upon successful verification, the platform displays a "Compliance Verification Passed" icon to consumers. Consumers can trust the authenticity of the goods and the accuracy of the inventory without needing to know the merchant's sourcing channels or inventory size. Merchants meet platform regulatory requirements while protecting core business information, improving the credibility and efficiency of cross-border transactions.
[0144] The present invention has been described in detail above with reference to the accompanying drawings and embodiments. Those skilled in the art can make various modifications to the present invention based on the above description. Therefore, certain details in the embodiments should not be construed as limiting the present invention, and the scope of protection of the present invention shall be defined by the appended claims.
Claims
1. A method for verifying item information based on zero-knowledge proofs and blockchain, characterized in that, include: On-chain commitment: The certifier registers a cryptographic commitment representing its collection of items on the blockchain; Proof generation: The proving party generates a zero-knowledge proof off-chain based on its private item data, the cryptographic commitment, and a verification strategy, using a zero-knowledge proof circuit; wherein the zero-knowledge proof circuit is configured to internally verify that the private item data satisfies the verification strategy and is consistent with the cryptographic commitment; Proof Verification: The verifier verifies the validity of the zero-knowledge proof on the blockchain. If the verification passes, it is confirmed that the set of items owned by the verifier that corresponds to the cryptographic commitment satisfies the verification strategy. The verification strategy includes at least one of the following: This proves that all items in the private item data have passed authenticity verification; This proves that the number of items in the private item data that have passed the authenticity verification is greater than or equal to a preset threshold. Prove that the geographical locations of all items in the private item data are within an authorized geographical area; On-chain commitment: The specific process by which the proving party registers the cryptographic commitment representing its collection of items on the blockchain is as follows: The proving party receives batch item data to be verified, performs data standardization processing on the batch item data, constructs a Merkle tree based on the standardized batch item data, and uploads the root hash of the Merkle tree to the blockchain for storage. Proof Generation: The proof-provider, operating off-chain, generates a zero-knowledge proof using its private item data, the cryptographic commitment, and a verification strategy via a zero-knowledge proof circuit. The specific process is as follows: The proving party receives a preset verification strategy, digitally expresses the verification strategy based on standardized batch item data and generates corresponding circuit constraints, and performs constraint optimization processing on the circuit constraints. The proving party designs a circuit based on the constrained and optimized circuit constraints, generates a key pair containing a proof key and a verification key through the circuit design, and deploys the verification key into the smart contract of the blockchain. The proving party prepares private input data based on standardized batch item data, and performs proof computation by combining the private input data, constraint-optimized circuit constraints, and the proof key to generate a zero-knowledge proof. ; The zero-knowledge proof circuit internally verifies that the private item data satisfies the verification strategy and that the private item data is consistent with the cryptographic commitment, and only outputs the zero-knowledge proof to the outside. ; The proving party receives a preset verification strategy, digitizes the verification strategy based on standardized batch item data, generates corresponding circuit constraints, and performs constraint optimization on the circuit constraints as follows: The preset verification strategies accepted by the certifying party include quantity threshold strategy, geographic attribution strategy, and authenticity identification strategy. For different types of verification strategies, the standardized batch item data fields are used for digital expression. The quantity threshold strategy is transformed into the logic that the quantity field value is greater than or equal to the preset threshold. The geographic attribution strategy is transformed into the logic that the geographic code field belongs to the preset code set. The authenticity identification strategy is transformed into the logic that the authenticity field value is a preset valid identifier. Based on the logic of the digitized verification strategy, circuit constraints are generated by combining the standardized batch item data fields. The circuit constraints include data consistency constraints, range constraints, and enumeration constraints. Data consistency constraints are ,in, For the field values in the standardized batch item data, The corresponding field value in the cryptographic commitment; the range constraint is... ,in, This refers to the quantity field value in the batch item data. To preset the minimum threshold, The preset maximum threshold is used; the enumerated matching constraints are... ,in, This refers to the geocoding field value in the batch item data. To pre-define a set of legal geocodes, All three types of constraints are based on finite fields. Build, Representing a finite field The order; The generated circuit constraints are optimized by classifying data consistency constraints and range constraints as basic constraints, and enumerated matching constraints as extended constraints. A general constraint library is then constructed based on the basic constraints. Encapsulate recurring constraint logic into callable modules for reuse, classify and stratify extended constraints by geocode, delete redundant constraints and merge related constraints; Convert all optimized constraints to R1CS format to satisfy... The constraints, among which, This is a vector of line values, containing dummy variables with a value of 1, private input variables, and intermediate calculation variables. Let be the left constraint vector. The right constraint vector, To output the constraint vector, the dot product operation is defined as follows: The three vectors contain only 0, 1 and the index of the corresponding variable.
2. The method for verifying item information based on zero-knowledge proof and blockchain according to claim 1, characterized in that, Proof Verification: The verifier verifies the validity of the zero-knowledge proof on the blockchain. If the verification passes, the specific process of confirming that the set of items owned by the verifier corresponding to the cryptographic commitment satisfies the verification strategy is as follows: The verifier submits the zero-knowledge proof π to a smart contract on the blockchain, which then calls a preset verification algorithm. The smart contract combines the verification key deployed by the prover with the Merkle root hash uploaded by the prover to the blockchain storage to perform validity verification on the zero-knowledge proof π. If the zero-knowledge proof If the verification result is valid, the verifier records the successful verification information of the batch of items on the blockchain; if the zero-knowledge proof... If the verification result is invalid, the verifier returns the corresponding verification error message.
3. The method for verifying item information based on zero-knowledge proof and blockchain according to claim 1, characterized in that, The specific process of data standardization and Merkle tree construction is as follows: The certifying party extracts information from the batch of item data, including the item's unique identification code, physical characteristic parameters, traceability identifier, and authenticity verification field. The unique identification code for each item is generated by encrypting the item's factory serial number using the SHA-256 hash algorithm; the extracted information is then converted into structured data according to preset rules. Numerical parameters retain a preset number of decimal places and are uniformly converted to decimal format. Character information is standardized using UTF-8 encoding. Traceability identifiers are recombined using a combination of timestamp and geographic location code. Integrity checks are performed on the standardized structured data using the following formula: ; in, The SHA-256 hash function is used. to Standardized data for individual items. Indicates the first Standardized data for each item If the result is 0, the data is considered complete; otherwise, the corresponding invalid data is removed. Merkle trees are constructed using a binary tree structure, with standardized data hash values as leaf nodes and non-leaf nodes being the concatenation hashes of their two child nodes. The root hash is calculated using the following formula: ,in, These are the data of the adjacent left and right child nodes, respectively. This is for string concatenation operations.
4. The method for verifying item information based on zero-knowledge proof and blockchain according to claim 1, characterized in that, The proving party designs a circuit based on the constraint-optimized circuit constraints, generates a key pair containing a proof key and a verification key through the circuit design, and deploys the verification key into the blockchain smart contract as follows: A zero-knowledge proof circuit is designed based on the constraint-optimized R1CS format constraints. The circuit includes a constraint parsing module, a data calculation module, and a proof output module. The constraint parsing module parses R1CS format. , , vector; The data calculation module performs finite field operations. The addition, subtraction, and multiplication operations within the module demonstrate that the output module is used to generate a set of polynomials conforming to the QAP format. The circuit input consists of standardized batch item data and verification strategy parameters, and the output consists of three sets of polynomials. , , and objective polynomial ,in, The number of multiplication gates in the circuit. For the first Abstract assignment of a multiplication method; The Groth16 algorithm is used to generate a common reference string (CRS) based on the designed zero-knowledge proof circuit. The CRS contains the group of elliptic curve BN254. Generator ,group Generator and polynomial sets , , At random points The result of the evaluation; Derivation of the proof key based on the public reference string CRS and verification key ; in It is a random number. , , The left, right, and output polynomials are respectively located in The value of the point, ,in, It is a random number; The certifier employs a non-escrow key model, constructing a transaction request through the blockchain's smart contract deployment interface. This transaction request includes the verification key. The complete data and the digital signature of the certifier are provided; the transaction request is sent to the blockchain network, and after verification by node consensus, it is written into a block. The smart contract will verify the key. The key is stored in a pre-defined key storage mapping table, which uses the certifier's identity identifier as the key to verify the key. Value; The private input data preparation process involves filtering field values corresponding to circuit constraints from the standardized batch item data, including field values corresponding to data consistency constraints. Quantity field value corresponding to range constraints Enumerate the geocoding field values corresponding to the matching constraints. Eliminate those outside the finite field Data with values ranging from a certain range and not meeting the basic requirements of the validation strategy; convert the filtered field values into a finite field. The elements within form a private input data set. And perform hash verification on the data set.
5. The method for verifying item information based on zero-knowledge proof and blockchain according to claim 4, characterized in that, The proving party prepares private input data based on standardized batch item data, and performs proof computation by combining the private input data, constraint-optimized circuit constraints, and the proof key to generate a zero-knowledge proof. The specific process is as follows: Private input data set Substitute the R1CS format constraints after constraint optimization and verify. Heng was established, among which, Includes private input data set and intermediate calculation variables in the circuit; Subsequently, a set of polynomials based on the QAP format was established. , , Calculate polynomial product And calculate using polynomial division ,in For quotient polynomial, It is a remainder polynomial and its degree is less than The degree of verification of the remainder polynomial. To confirm that the input data meets the circuit constraints; Based on the proof key The above calculation results are then used to perform group operations to generate a proof component: calculate ,in Private input data set Elements in; calculate ; calculate ,in, For random parameters in CRS; Final zero-knowledge proof ,in, Zero-knowledge proofs generated Perform integrity verification, the verification content includes , , The validity of group affiliation and the consistency of operational logic.
6. A system for verifying item information based on zero-knowledge proofs and blockchain, used in the item information verification method based on zero-knowledge proofs and blockchain as described in any one of claims 1 to 5, characterized in that, include: The proving client is configured to store private item data and includes a zero-knowledge proof generator for generating the zero-knowledge proof; A blockchain network is used to store the cryptographic commitments and run a verification smart contract to verify the zero-knowledge proofs. The verification client is configured to initiate a verification request to the verification smart contract and obtain the verification result. The certifying client also communicates with an item authenticity verification service to obtain the verification results and geographical location information from the private item data.
7. The item information verification system based on zero-knowledge proof and blockchain as described in claim 6, characterized in that, It also includes a strategy engine for compiling user-defined business strategies into constraints that the zero-knowledge proof circuit can execute.
Citation Information
Patent Citations
Block-chain data processing based on zero-knowledge proof
CN107274184A
Private use authorization method for blockchain digital assets based on zero knowledge proof
CN111159694A
A payment method, device, and cloud platform based on big data and blockchain.
CN116091049B
Equipment attribute verification method based on block chain and zero-knowledge proof
CN119939566A