Data verification methods and equipment

By using a perfect binary tree structure and Pedersen commitment technology, a ring signature is generated to verify that the data to be verified is located in any interval [a,b]. This solves the problem that existing technologies cannot flexibly verify arbitrary intervals, and achieves efficient and secure data verification.

CN120880692BActive Publication Date: 2026-03-06BEIJING PUSH TIMES TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510838904.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2026-03-06
Estimated Expiration
2045-06-20

AI Technical Summary

Technical Problem

Existing interval proof schemes only support proofs for specific intervals of the form [0, 2^n], and cannot flexibly support the verification of arbitrary intervals [a, b], making it difficult to meet the diverse service needs of financial or voting systems.

Method used

The target interval is represented by a perfect binary tree structure. The data to be verified is located in any interval by generating a ring signature. Pedersen commitment is used to hide sub-values ​​and relationships. Sub-evidence is generated and signed and confirmed using private and public keys.

Benefits of technology

It enables efficient and secure inter-region verification of any interval [a,b] without disclosing the value to be verified, and supports data verification of any interval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120880692B_ABST
    Figure CN120880692B_ABST
Patent Text Reader

Abstract

This application provides a data verification method and apparatus. The method includes: determining a minimum set of nodes covering a target interval in a perfect binary tree structure, so as to use multiple nodes to represent the target interval; extracting bits of a specific length from the data to be verified to determine a first integer corresponding to each node; constructing a target set based on multiple first integers and the data to be verified; calculating an auxiliary value for each pair of adjacent elements in the target set; and generating sub-evidence based on the auxiliary value and the commitment value of each pair of adjacent elements to verify the association relationship between adjacent elements through the sub-evidence; constructing a public key corresponding to each node using the decimal value corresponding to each node and the first commitment value of the first integer corresponding to each node; and performing a ring signature using one of the real private keys matching the node, which can prove to the data verification end that the data to be verified is located within a specified arbitrary interval without exposing the specific numerical value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information security data processing technology, and in particular to a data verification method and device. Background Technology

[0002] With the continuous development of cryptography and blockchain technology, privacy protection has become an important research direction in the field of digital transactions. Among the many privacy protection technologies, zero-knowledge proof (ZKP) technology is widely used in scenarios such as identity authentication, verifiable computing, and privacy transactions because it can complete the verification process without disclosing the original data.

[0003] Range proof is an important branch of zero-knowledge proof. Its core objective is to prove to the verifier that a value belongs to a specified range of values ​​without revealing the specific content of the value. For example, in a privacy transaction scenario in a blockchain system, the sender needs to prove to the network that the amount c transferred is within a valid range (e.g., greater than 0 and less than the account balance), but does not want to disclose the specific amount c to prevent privacy leaks.

[0004] Currently, traditional interval proof schemes are mainly based on techniques such as Pedersen commitments and Bulletproofs, with a typical application being proving that a value lies within an interval of the form [0, 2^n]. However, in practical applications, this type of constrained interval often cannot meet diverse service requirements. For example, in some financial or voting systems, users may need to prove that a certain value lies within any given closed interval [a, b].

[0005] Therefore, there is an urgent need to propose a method that can support efficient and secure inter-regional verification of any interval [a,b] without disclosing the value to be verified.

[0006] Application content

[0007] This application provides a data verification method and device to prove to the data verification end that the data to be verified is located within a specified arbitrary interval, and supports efficient and secure inter-regional verification of the data to be verified being located within an arbitrary interval.

[0008] In a first aspect, embodiments of this application provide a data verification method applied to a data verification end, the method comprising:

[0009] In response to a data verification request triggered for data to be verified, the data to be verified and the target range corresponding to the data to be verified are obtained, and the data verification request is used to prove to the data verification end that the data to be verified is located within the target range;

[0010] Determine the minimum set of nodes that covers the target interval within the structure of a perfect binary tree;

[0011] For any node in the minimum node set, calculate the binary length i corresponding to the arbitrary node, extract the first i bits from the binary data corresponding to the data to be verified, and combine the first i bits into a first integer;

[0012] Based on the data to be verified and the first integer corresponding to each node in the minimum node set, a target set is constructed, and auxiliary values ​​corresponding to each pair of adjacent elements in the target set are constructed in sequence. Each element in the target set is arranged in descending order of bit length. The auxiliary value is the decimal value corresponding to the part remaining after subtracting the high-order part corresponding to the next element from the previous element.

[0013] Sub-evidence corresponding to each pair of adjacent elements is generated based on the first commitment value corresponding to each pair of adjacent elements and the second commitment value corresponding to the auxiliary value of each pair of adjacent elements, respectively.

[0014] Based on the decimal values ​​corresponding to each node and the first commitment values ​​corresponding to each first integer in the target set, a public key corresponding to each node is generated, and the public key corresponding to each node includes the public key corresponding to the data proof end.

[0015] Using the private key of the data proof terminal and the public key corresponding to each node, the concatenation result of the public keys corresponding to each node is signed to generate a ring signature. The multiple sub-evidences and the ring signature are then sent to the data verification terminal as target evidence. The data verification terminal verifies whether the association relationship between each pair of adjacent elements in the multiple sub-evidences within the target evidence is valid. If valid, the ring signature within the target evidence is verified to be valid. If valid, the data to be verified is confirmed to be located in the target interval.

[0016] Secondly, embodiments of this application provide a data verification device applied at a data verification end, the device comprising:

[0017] The acquisition module is used to respond to a data verification request triggered for the data to be verified, and to acquire the data to be verified and the target range corresponding to the data to be verified. The data verification request is used to prove to the data verification end that the data to be verified is located within the target range.

[0018] The determination module is used to determine the minimum set of nodes that cover the target interval in the structure of a perfect binary tree;

[0019] The calculation module is used to calculate the binary length i corresponding to any node in the minimum node set, extract the first i bits from the binary data corresponding to the data to be verified, and combine the first i bits into a first integer.

[0020] The construction module is used to construct a target set based on the data to be verified and the first integer corresponding to each node in the minimum node set, and to construct the auxiliary value corresponding to each pair of adjacent elements in the target set in turn. The elements in the target set are arranged in descending order of bit length. The auxiliary value is the decimal value corresponding to the part remaining after subtracting the high-bit part corresponding to the next element from the previous element.

[0021] The first generation module is used to generate sub-evidence corresponding to each pair of adjacent elements based on the first commitment value corresponding to each pair of adjacent elements and the second commitment value corresponding to the auxiliary value of each pair of adjacent elements, respectively.

[0022] The second generation module is used to generate a public key corresponding to each node based on the decimal value corresponding to each node and the first commitment value corresponding to each first integer in the target set. The public key corresponding to each node includes the public key corresponding to the data proof end.

[0023] The signature module is used to sign the concatenation result of the public keys corresponding to each node using the private key of the data proof terminal and the public key of each node, generating a ring signature, and sending the multiple sub-evidences and the ring signature as target evidence to the data verification terminal, so that the data verification terminal can verify whether the association relationship between each pair of adjacent elements in the multiple sub-evidences in the target evidence is valid. If it is valid, the terminal verifies whether the ring signature in the target evidence is valid. If it is valid, the terminal confirms that the data to be verified is located in the target interval.

[0024] Thirdly, embodiments of this application provide an electronic device applied to a sender, comprising: a memory, a processor, and a communication interface; wherein, the memory stores executable code, and when the executable code is executed by the processor, the processor can at least implement the data verification method as described in the first aspect.

[0025] Fourthly, embodiments of this application provide a non-transitory machine-readable storage medium storing executable code, which, when executed by a processor of an electronic device, enables the processor to at least implement the data verification method as described in the first aspect.

[0026] Fifthly, embodiments of this application provide a computer program product, including: a computer program or instructions, which, when executed by a processor of an electronic device, enable the processor to at least implement the data verification method as described in the first aspect.

[0027] Sixthly, embodiments of this application provide a data verification method applied to a data verification terminal, the method comprising:

[0028] The receiving end sends target evidence and information to be verified. The target evidence includes multiple sub-evidences and a ring signature. The information to be verified is to verify whether the data to be verified is located within the target range.

[0029] Verify whether the association relationship between each pair of adjacent elements in the plurality of sub-evidences within the target evidence is valid;

[0030] If the association relationship corresponding to each pair of adjacent elements is valid, then verify whether the ring signature in the target evidence is valid;

[0031] If the ring signature is valid, then the data to be verified is confirmed to be located in the target range;

[0032] The multiple sub-evidences are generated based on the first commitment value corresponding to each pair of adjacent elements in the target set and the second commitment value corresponding to the auxiliary value of each pair of adjacent elements. The target set is composed of the first integers corresponding to each node in the minimum node set covering the target interval corresponding to the data to be verified in the structure of a perfect binary tree, and the elements in the target set are arranged in descending order of bit length. The auxiliary value is the decimal value corresponding to the part remaining after subtracting the high-order part corresponding to the next element from the previous element in each pair of adjacent elements.

[0033] The ring signature is generated by signing the concatenated result of each node using the private key corresponding to the data proof end and the public key corresponding to each node in the minimum node set. The public key corresponding to each node in the minimum node set is generated based on the decimal value corresponding to each node in the minimum node set and the first commitment value corresponding to each first integer in the target set. Each first integer in the target set is obtained by calculating the binary length i corresponding to each node in the minimum node set, extracting the first i bits from the binary data corresponding to the data to be verified, and combining the first i bits.

[0034] Seventhly, embodiments of this application provide a data verification device applied at a data verification terminal, the device comprising:

[0035] The receiving module is used to receive the target evidence and the information to be verified sent by the data proof end. The target evidence includes multiple sub-evidences and a ring signature. The information to be verified is to verify whether the data to be verified is located within the target range.

[0036] The first verification module is used to verify whether the association relationship between each pair of adjacent elements in the plurality of sub-evidences within the target evidence is valid.

[0037] The second verification module is used to verify whether the ring signature in the target evidence is valid if the association relationship corresponding to each pair of adjacent elements is valid.

[0038] The confirmation module is used to confirm that the data to be verified is located in the target range if the ring signature is valid.

[0039] The multiple sub-evidences are generated based on the first commitment value corresponding to each pair of adjacent elements in the target set and the second commitment value corresponding to the auxiliary value of each pair of adjacent elements. The target set is composed of the first integers corresponding to each node in the minimum node set covering the target interval corresponding to the data to be verified in the structure of a perfect binary tree, and the elements in the target set are arranged in descending order of bit length. The auxiliary value is the decimal value corresponding to the part remaining after subtracting the high-order part corresponding to the next element from the previous element in each pair of adjacent elements.

[0040] The ring signature is generated by signing the concatenated result of each node using the private key corresponding to the data proof end and the public key corresponding to each node in the minimum node set. The public key corresponding to each node in the minimum node set is generated based on the decimal value corresponding to each node in the minimum node set and the first commitment value corresponding to each first integer in the target set. Each first integer in the target set is obtained by calculating the binary length i corresponding to each node in the minimum node set, extracting the first i bits from the binary data corresponding to the data to be verified, and combining the first i bits.

[0041] Eighthly, embodiments of this application provide an electronic device applied to a sender, comprising: a memory, a processor, and a communication interface; wherein, the memory stores executable code, and when the executable code is executed by the processor, the processor can at least implement the data verification method as described in the sixth aspect.

[0042] In a ninth aspect, embodiments of this application provide a non-transitory machine-readable storage medium storing executable code, which, when executed by a processor of an electronic device, enables the processor to at least implement the data verification method as described in the sixth aspect.

[0043] In a tenth aspect, embodiments of this application provide a computer program product, including: a computer program or instructions that, when executed by a processor of an electronic device, enable the processor to at least implement the data verification method as described in the sixth aspect.

[0044] In the data verification scheme provided in this application embodiment, in response to a data verification request triggered for the data to be verified, the data to be verified and the target interval corresponding to the data to be verified are obtained. The data verification request is used to prove to the data verification end that the data to be verified is located within the target interval. Then, the minimum set of nodes covering the target interval is determined in the structure of a perfect binary tree. For any node in the minimum set of nodes, the binary length i corresponding to any node is calculated. The first i bits are extracted from the binary data corresponding to the data to be verified, and the first i bits are combined into a first integer to obtain the first integer corresponding to each node. Next, based on the data to be verified and the first integers corresponding to each node in the minimum set of nodes, a target set is constructed, and auxiliary values ​​corresponding to each pair of adjacent elements in the target set are constructed sequentially. The elements in the target set are arranged in descending order of bit length. The auxiliary value is the decimal value corresponding to the part remaining after subtracting the high-order part corresponding to the next element from the previous element of the adjacent element. Then, based on the first commitment value corresponding to each pair of adjacent elements and the second commitment value corresponding to the auxiliary value of each pair of adjacent elements, sub-evidence corresponding to each pair of adjacent elements is generated. Then, based on the decimal values ​​corresponding to each node in the minimum node set and the first commitment values ​​corresponding to each first integer in the target set, a public key corresponding to each node in the minimum node set is generated. The public key of each node includes the public key corresponding to the data proof end. Finally, using the private key corresponding to the data proof end and the public key corresponding to each node in the minimum node set, the concatenation result of each node is signed to generate a ring signature. Multiple sub-evidences and the ring signature are then sent as target evidence to the data verification end. This allows the data verification end to verify whether the association relationship between each pair of adjacent elements in the multiple sub-evidences within the target evidence is valid. If valid, the ring signature within the target evidence is verified as valid. If valid, the data to be verified is confirmed to be within the target range.

[0045] In the above scheme, a minimum set of nodes covering the target interval is determined within the structure of a perfect binary tree. Multiple nodes in the perfect binary tree represent the target interval, and verification nodes are used to verify whether the data to be verified falls within the target interval. A specific length of bits is extracted from the data to be verified to determine the first integer corresponding to each node, i.e., to obtain the high-order bits representing the data to be verified. Then, a target set is constructed based on the first integer corresponding to each node and the data to be verified. An auxiliary value is calculated for each pair of adjacent elements in the target set, and sub-evidence is generated based on the auxiliary value and the commitment value of each pair of adjacent elements. This sub-evidence is used to verify the correlation between adjacent elements, ensuring the reliability of the data verification. Furthermore, by using the decimal values ​​corresponding to each node and the first commitment value of the first integer corresponding to each node, a public key corresponding to each node is constructed. By using the commitment values ​​corresponding to each high-order part of the data to be verified as public keys to form a public key ring, and using one of the real private keys that matches the node to perform ring signing, the verifier can be assured that the data to be verified is located in the target range without exposing the specific values. This enables the verifier to prove to the data verification end that the data to be verified is located in a certain specified arbitrary range, and supports efficient and secure inter-regional verification of the data to be verified being located in any range. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 A schematic diagram of a data verification system provided in an embodiment of this application;

[0048] Figure 2 A flowchart illustrating a data verification method provided in an embodiment of this application;

[0049] Figure 3 A schematic diagram of a perfect binary tree provided in an embodiment of this application;

[0050] Figure 4 A flowchart illustrating another data verification method provided in this application embodiment;

[0051] Figure 5 This is a schematic diagram of the structure of a data verification device provided in an embodiment of this application;

[0052] Figure 6 To and Figure 5 A schematic diagram of the electronic device corresponding to the data verification device provided in the illustrated embodiment;

[0053] Figure 7 A schematic diagram of another data verification device provided in an embodiment of this application;

[0054] Figure 8 To and Figure 7 The illustrated embodiment provides a schematic diagram of the electronic device corresponding to the data verification device. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0056] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. “Multiple” generally includes at least two, but does not exclude the inclusion of at least one. It should be understood that the term “and / or” as used herein is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Additionally, the character “ / ” in this document generally indicates that the preceding and following related objects are in an “or” relationship. Depending on the context, the words “if” or “when” as used herein can be interpreted as “when…” or “when…”.

[0057] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a product or system comprising a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a product or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the product or system that includes said element.

[0058] Furthermore, the timing of the steps in the following method embodiments is merely an example and not a strict limitation.

[0059] With the continuous development of cryptography and blockchain technology, privacy protection has become an important research direction in the field of digital transactions. Among numerous privacy protection technologies, zero-knowledge proof (ZKP) technology is widely used in scenarios such as identity authentication, verifiable computing, and privacy transactions because it can complete the verification process without disclosing the original data. Range proof is an important branch of zero-knowledge proof, and its core objective is to prove to the verifier that a value belongs to a specified range of values ​​without revealing the specific content of the value. For example, in a privacy transaction scenario in a blockchain system, the sender needs to prove to the network that the amount c transferred is within a valid range (e.g., greater than 0 and less than the account balance), but does not want to publicly disclose the specific amount c to prevent privacy leaks.

[0060] Currently, traditional interval proof schemes are mainly based on techniques such as Pedersen commitments and Bulletproofs, with a typical application being proving that a value lies within an interval of the form [0, 2^n]. However, in practical applications, this type of constrained interval often cannot meet diverse service requirements. For example, in some financial or voting systems, users may need to prove that a certain value lies within an arbitrarily given closed interval [a, b], where the interval does not necessarily start at 0 or end at a power of 2.

[0061] However, this scheme only supports proofs for specific intervals of the form [0, 2^n] and cannot flexibly support verification of arbitrary intervals. In scenarios that require precise control of the numerical range (such as financial asset transfers, privacy contract execution, etc.), traditional schemes are difficult to meet actual needs.

[0062] To address the aforementioned technical challenges and support efficient and secure inter-region verification of any interval [a, b] without disclosing the value to be verified, this application proposes a novel data verification method. This method uses multiple nodes in a perfect binary tree to represent the target interval and splits the data to be verified into multiple sub-values ​​(the first integer corresponding to each node). These sub-values ​​are associated with multiple nodes covering the target interval, thus representing the data to be verified as a set of high-order values ​​associated with the nodes covering the target interval, forming a structured representation. Pedersen commitments are used to hide these sub-values ​​and the relationships between them. Zero-knowledge proofs of these relationships are then used to verify that the concatenated sub-values ​​equal the original value and satisfy the structural constraints. Next, the commitment values ​​corresponding to multiple sub-values ​​are used as the public keys of each node, and a specific node that completely matches a certain high-order part of the data to be verified is found to obtain a usable private key. Then, a ring signature is generated using this private key and the public keys corresponding to each node. By verifying the ring signature, it is confirmed that the data to be verified is located within a specified target range, and the form of the target range is not restricted. This realizes the proof to the data verification end that the data to be verified is located within a specified arbitrary range, and supports efficient and secure inter-regional verification of the data to be verified being located within any range.

[0063] The data verification scheme will be illustrated below with reference to the following embodiments.

[0064] Figure 1 This is a schematic diagram of a data verification system provided in an embodiment of this application, such as... Figure 1 As shown, the system may include a data proof end and a data verification end.

[0065] The data proof terminal can be any device that needs to prove that the data to be verified is located within the target range. It can be any computing device with a certain data transmission capability; specifically, it can be a mobile phone, PC, tablet, application, etc. Alternatively, it can be any device capable of providing computing services, such as a cluster server, regular server, cloud server, cloud host, virtual data center, etc.

[0066] The data verification endpoint can be any device that needs to verify that the data to be verified is located within the target range. The data verification endpoint can be any computing device with a certain data transmission capability; specifically, it can be a mobile phone, personal computer (PC), tablet computer, application, etc. It can also be any device capable of providing computing services, such as a cluster server, regular server, cloud server, cloud host, virtual data center, etc.

[0067] In practical applications, when the data proof end wants to prove the data to be verified to the data verification end, the user can use the data proof end to trigger a data verification request for the data to be verified. The data verification device located at the data proof end will generate the target evidence corresponding to the data to be verified and send the generated target evidence to the corresponding data verification end. After receiving the target evidence, the data verification end can use the target evidence located at the data verification device to verify whether the data to be verified is within the target range.

[0068] Specifically, the data verification device at the data proof end first responds to the data verification request triggered for the data to be verified by obtaining the data to be verified and the target interval corresponding to the data to be verified. In this embodiment, the form of the target interval is not limited; for example, the data to be verified v∈[a,b], where a can be any number less than b and b can be any number greater than a.

[0069] Next, the data verification device at the data verification end determines the minimum set of nodes covering the target interval within the structure of the perfect binary tree. Each non-leaf node in the perfect binary tree represents an interval segment, and each leaf node represents an endpoint value of an interval segment. In this embodiment, nodes in the perfect binary tree are used to represent the target interval, transforming the problem of verifying whether the data to be verified is within the target interval into the problem of verifying nodes covering the target interval.

[0070] After determining the minimum set of nodes covering the target interval, the data verification device at the data verification end calculates the binary length i corresponding to any node in the minimum set of nodes, extracts the first i bits from the binary data corresponding to the data to be verified, and combines the first i bits into a first integer to obtain the first integer corresponding to each node.

[0071] The data verification device at the data verification end constructs a target set based on the data to be verified and the first integer corresponding to each node in the minimum node set. Furthermore, the elements in the target set are arranged in descending order of bit length. Based on each pair of adjacent elements in the target set, an auxiliary value is constructed for each pair of adjacent elements. The auxiliary value for each pair of adjacent elements is the decimal value of the remainder after subtracting the high-order part corresponding to the next element from the previous element in each pair of adjacent elements. Next, a first commitment value and a second commitment value corresponding to the auxiliary value for each pair of adjacent elements are determined, and sub-evidence corresponding to each pair of adjacent elements is generated based on both the first commitment value and the second commitment value.

[0072] Then, the data verification device at the data verification end generates a public key corresponding to each node in the minimum node set based on the decimal values ​​corresponding to each node in the minimum node set and the first commitment values ​​corresponding to each first integer in the target set. The public key for each node includes the public key corresponding to the data verification end. The private key of the data verification end is obtained by finding a specific node that completely matches a high-order part of the data to be verified, thus obtaining a usable private key, which is then used as the private key of the data verification end.

[0073] Finally, the data verification device at the data verification end uses the private key corresponding to the data proof end and the public keys corresponding to each node in the minimum node set to sign the concatenation result of all public keys in the minimum node set, generating a ring signature. The device then sends multiple sub-evidences and the ring signature as target evidence to the data verification end, so that the data verification device at the data verification end can verify whether the association relationship between each pair of adjacent elements in the multiple sub-evidences within the target evidence is valid. If the association relationship between each pair of adjacent elements in the multiple sub-evidences is valid, the device then verifies whether the ring signature within the target evidence is valid. If the ring signature is valid, the device then confirms that the data to be verified is located in the target range.

[0074] In this embodiment, the data verification end uses multiple nodes in a perfect binary tree to represent the target interval and splits the data to be verified into first integers corresponding to each node. This represents the data as a set of high-order values ​​associated with nodes covering the target interval, forming a structured representation. Pedersen commitments are used to hide these first integers and the relationships between them. A series of zero-knowledge proofs of these relationships are used to verify that the concatenated first integers equal the original value and satisfy the structural constraints. Next, the first commitment values ​​corresponding to the multiple first integers and the decimal values ​​of the first integers of each node are used as the public keys of each node. A specific node that perfectly matches a high-order part of the data to be verified is found, thereby obtaining the private key of the data verification end. This private key and the public keys corresponding to each node are then used to generate a ring signature. Verifying this ring signature confirms that the data to be verified is located within a specified target interval, without restricting the form of the target interval. This achieves the goal of proving to the data verification end that the data to be verified is located within any specified interval and supports efficient and secure inter-regional verification of data to be verified within any interval.

[0075] To facilitate understanding of the specific data verification processes corresponding to the data proof and data verification ends mentioned above, combined with... Figure 2 The specific process of generating target evidence of data to be verified at the data verification end is illustrated by an example.

[0076] Figure 2 A flowchart of a data verification method provided in this application embodiment is shown below. Figure 2 As shown, the execution entity of this method can be a data verification device located at the data verification end. It is understood that this data verification device can be implemented as software, or a combination of software and hardware. Specifically, the data verification method may include the following steps:

[0077] 201. In response to a data verification request triggered for the data to be verified, obtain the data to be verified and the target range corresponding to the data to be verified. The data verification request is used to prove to the data verification end that the data to be verified is located within the target range.

[0078] 202. Determine the minimum set of nodes that covers the target interval in the structure of a perfect binary tree.

[0079] 203. For any node in the set of smallest nodes, calculate the binary length i corresponding to the node, extract the first i bits from the binary data corresponding to the data to be verified, and combine the first i bits into the first integer.

[0080] 204. Based on the data to be verified and the first integer corresponding to each node in the minimum node set, construct a target set, and construct auxiliary values ​​corresponding to each pair of adjacent elements in the target set in sequence. The elements in the target set are arranged in descending order of bit length. The auxiliary value is the decimal value corresponding to the part remaining after subtracting the high-bit part corresponding to the next element from the previous element.

[0081] 205. Generate sub-evidence for each pair of adjacent elements based on the first commitment value corresponding to each pair of adjacent elements and the second commitment value corresponding to the auxiliary value of each pair of adjacent elements.

[0082] 206. Based on the decimal values ​​corresponding to each node in the minimum node set and the first commitment values ​​corresponding to each first integer in the target set, generate the public key corresponding to each node in the minimum node set. The public key corresponding to each node includes the public key corresponding to the data proof end.

[0083] 207. Using the private key corresponding to the data proof end and the public key corresponding to each node in the minimum node set, sign the concatenation result of the public keys of each node to generate a ring signature. Send multiple sub-evidences and the ring signature as target evidence to the data verification end so that the data verification end can verify whether the association relationship between each pair of adjacent elements in the multiple sub-evidences within the target evidence is valid. If it is valid, verify whether the ring signature within the target evidence is valid. If it is valid, confirm that the data to be verified is located in the target range.

[0084] Specifically, when a data verification request is received for the data to be verified, the system can respond to the request by obtaining the data to be verified and the corresponding target range. The data verification request is used to prove to the data verification end that the data to be verified is within the target range.

[0085] Next, obtain the perfect binary tree corresponding to the set of numbers. In the perfect binary tree, each non-leaf node represents an interval segment, and each leaf node represents the endpoint value of an interval segment. Then, determine the minimum set of nodes covering the target interval within the structure of the perfect binary tree.

[0086] Among these, a perfect binary tree corresponding to the set of numbers can be pre-constructed. Assume the set of numbers D = {0, 1…2} m -1}, construct with 2 m A perfect binary tree with n leaf nodes, starting from the left, where the i-th leaf node is represented by τ. i Represent this and assign the value i. Non-leaf nodes are represented by τ. i,j This represents the values ​​of the leftmost and rightmost descendant leaf nodes of the node, where i and j are the values ​​of the leftmost and rightmost descendant leaf nodes, respectively. Node τ i,j The interval value [i,j]∈D is assigned. For example, if m=3, a sequence is constructed as follows: Figure 3 The perfect binary tree shown has node τ. 0,7 It is assigned the interval value [0,7], i.e., τ 0,7 =[0,7], node τ 0,3 It is assigned the interval value [0,3], i.e., τ 0,3 = [0,3], node τ 0,1 It is assigned the interval value [0,1], i.e., τ 0,1 = [0,1], node τ0 is assigned the value 0, i.e., τ0 = 0, and node τ1 is assigned the value 1, i.e., τ1 = 1.

[0087] Furthermore, we can trace upwards from the first node corresponding to the left endpoint of the target interval and the second node corresponding to the right endpoint of the target interval until we find the common ancestor of the first and second nodes, and determine the minimum set of nodes covering the target interval based on the common ancestor. Alternatively, we can transform the interval covering problem into a bit-based covering problem, and quickly filter out multiple nodes covering the target interval through bit operations, so as to generate the minimum set of nodes based on multiple nodes. Therefore, assuming that the data to be verified v is located in the interval [2,7], we can determine that in a perfect binary tree structure, the minimum set of nodes covering the target interval is {τ}. 2,3 , τ 4,7}

[0088] Next, for any node in the minimum node set, calculate the binary length *i* corresponding to that node. Extract the first *i* bits from the binary data corresponding to the data to be verified, and combine these first *i* bits into a first integer. This method allows us to sequentially obtain the first integer corresponding to each node. The first integer corresponding to each node is a decimal value constructed by extracting a specific length of the high-order bits from the binary data corresponding to the data to be verified. This is equivalent to constructing integers representing each node in the minimum node set, thus representing the data to be verified as a set of high-order values ​​associated with the nodes covering the target interval, forming a structured representation.

[0089] For example, assuming the data to be verified is v, for each node τ i Using Len brc (τ i ), calculate τ for each node i The corresponding binary length i, continuing from the example above, for node τ in the minimum node set 2,3 The corresponding binary length, i.e., i = Len brc (τ 2,3 = 2. Where, Len is defined. brc (τ i ) is τ i The corresponding binary length. Obtain the high-order len of the data to be verified. brc (τ i The first integer consisting of ) bits is used to obtain the first integer v corresponding to each node. i That is, v i =Left(v,Len) brc (τ i ), where Left(v, Len brc (τ i )) is defined as obtaining the high Len of the data to be verified v. brc (τ i An integer consisting of bits.

[0090] Next, based on the data to be verified and the first integer corresponding to each node in the minimum node set, a target set is constructed. Furthermore, the elements in this target set are arranged in descending order of bit length. For example, the constructed target set S = {v}∪{v} i |τ i ∈S m}. The minimum set of nodes is S. m , τ i Represented as node i, v i Represents τ i The first integer corresponding to the node.

[0091] After constructing the target set, construct the auxiliary value corresponding to each pair of adjacent elements in the target set in sequence. The auxiliary value corresponding to each pair of adjacent elements is the decimal value of the remaining part after subtracting the high-order part corresponding to the next element from the previous element in the adjacent elements.

[0092] Specifically, in an optional embodiment, the auxiliary value corresponding to each pair of adjacent elements can be constructed as follows: For a target adjacent element, obtain the difference between the binary length i corresponding to the previous element in the target adjacent element and the target value n, where the target adjacent element is any pair of adjacent elements in the target set, and the target value n is the binary length corresponding to the next element in the target adjacent element. Based on the difference, calculate the corresponding power of 2, obtain the first product value corresponding to the next element in the target adjacent element and the corresponding power of 2, determine the first difference between the previous element in the target adjacent element and the first product value, and determine the first difference as the auxiliary value corresponding to the target adjacent element.

[0093] For example, suppose the preceding element of a pair of adjacent elements in the target set is v1 and the following element is v2. Based on the preceding and following elements, calculate the auxiliary value v′ corresponding to this pair of adjacent elements, i.e. Where bitlen(v1) is the number of bits corresponding to v1, and n is the binary length corresponding to the next element v2.

[0094] Next, determine the first commitment value corresponding to the preceding element in each pair of adjacent elements in the target set, the first commitment value corresponding to the following element in each pair of adjacent elements, and the second commitment value corresponding to the auxiliary value of each pair of adjacent elements. The Pedersen commitment algorithm can be used to determine these values.

[0095] The specific implementation of the first commitment value corresponding to each pair of adjacent elements and the second commitment value corresponding to the auxiliary value of each pair of adjacent elements is roughly the same. Here, we will only take the target adjacent elements as an example to illustrate the specific implementation process of determining the commitment value.

[0096] Specifically, in one optional embodiment, a first blinding factor, a second blinding factor, and a third blinding factor are determined, wherein the first blinding factor is the sum of the second product value and the third blinding factor, and the second product value is the product of the second blinding factor and the corresponding power of 2; a first generator and a second generator are selected from the additive group; based on the first blinding factor, the first generator, the second generator, and the previous element among the target neighboring elements, a first commitment value corresponding to the previous element among the target neighboring elements is generated; based on the second blinding factor, the first generator, the second generator, and the next element among the target neighboring elements, a first commitment value corresponding to the next element among the target neighboring elements is generated; based on the third blinding factor, the first generator, the second generator, and the auxiliary value of the target neighboring elements, a second commitment value corresponding to the auxiliary value of the target neighboring elements is generated.

[0097] Optionally, the specific implementation of generating the first commitment value corresponding to the previous element among the target neighboring elements based on the first blinding factor, the first generator, the second generator, and the previous element among the target neighboring elements can be as follows: obtain the third product value corresponding to the first blinding factor and the first generator; obtain the fourth product value corresponding to the previous element among the target neighboring elements and the second generator; determine the sum value corresponding to the third product value and the fourth product value, and determine the sum value as the first commitment value corresponding to the previous element among the target neighboring elements.

[0098] Optionally, the specific implementation of generating the first commitment value corresponding to the next element among the target neighboring elements based on the second blinding factor, the first generator, the second generator, and the next element among the target neighboring elements can be as follows: obtain the fifth product value between the second blinding factor and the first generator; obtain the sixth product value corresponding to the next element among the target neighboring elements and the second generator; determine the sum value corresponding to the fifth product value and the sixth product value, and determine the sum value as the first commitment value corresponding to the next element among the target neighboring elements.

[0099] Optionally, the specific implementation of generating the second commitment value corresponding to the auxiliary value of the target neighboring element based on the third blinding factor, the first generator, the second generator, and the auxiliary value of the target neighboring element can be as follows: obtain the seventh product value corresponding to the third blinding factor and the first generator; obtain the eighth product value corresponding to the auxiliary value of the target neighboring element and the second generator; determine the sum value corresponding to the seventh product value and the eighth product value, and determine the sum value as the second commitment value corresponding to the auxiliary value of the target neighboring element.

[0100] For example, suppose the first blinding factor is r1, the second blinding factor is r2, the third blinding factor is r′, the first generator is G, the second generator is H, the preceding element in the target's adjacent elements is v1, the following element is v2, and the auxiliary value is v′. Furthermore, it satisfies... Calculate the first commitment value com1 corresponding to the element preceding the target's adjacent element, i.e., com1 = r1G + v1H. Calculate the first commitment value com2 corresponding to the element following the target's adjacent element, i.e., com2 = r2G + v2H. Calculate the second commitment value com′ corresponding to the auxiliary value of the target's adjacent element, i.e., com′ = r′G + v′H.

[0101] Once the first commitment value for each pair of adjacent elements and the second commitment value for each pair of adjacent elements' auxiliary values ​​are determined, sub-evidence corresponding to each pair of adjacent elements is generated based on these values. Specifically, taking target adjacent elements as an example, the first commitment value corresponding to the preceding element, the first commitment value corresponding to the following element, and the second commitment value corresponding to the auxiliary value of the target adjacent element are determined as sub-evidence corresponding to the target adjacent element.

[0102] In other words, each adjacent element generates a corresponding sub-evidence, and each sub-evidence includes three commitment values. The number of sub-evidences generated is equal to the number of pairs of adjacent elements in the minimum set of nodes.

[0103] Next, based on the decimal values ​​corresponding to each node in the minimum node set and the first commitment values ​​corresponding to each first integer in the target set, a public key corresponding to each node in the minimum node set is generated. Furthermore, the public key corresponding to each node includes the public key corresponding to the data proof end.

[0104] For each node in the minimum node set, a corresponding public key is generated. The specific implementation process for generating the public key for each node is roughly the same. Here, we take the target node as an example for explanation. Specifically, for the target node, obtain the decimal value corresponding to the target node and the fifth product value corresponding to the second generator. The target node is any node in the minimum node set. Determine the second difference between the first commitment value of the first integer corresponding to the target node and the fifth product value. Use the second difference as the public key corresponding to the target node.

[0105] For example, when generating the public keys for each node, P can be used. i =com i -τ i H is used to calculate the public key corresponding to each node. Where P... i Represents τ i The public key corresponding to the node, com i For τ i The first commitment value corresponding to the node, and H is the second generator.

[0106] It is important to note that: within the set of minimum nodes, there exists a specific node whose target blinding factor is the private key of that specific node, and this private key is used as the private key for the data proof end. In other words, if the data to be verified v∈[a,b], then there must exist j such that τ j ∈S m ∧v j =τ j Established. At this time, P j =r j G. Then we can use r j The private key serves as the proof of data.

[0107] Using the private key corresponding to the data proof terminal and the public keys corresponding to each node in the minimum node set, the concatenated public keys of each node are signed to generate a ring signature. Specifically, the public key corresponding to each node in the minimum node set is determined as a public key ring; using the private key corresponding to the data proof terminal and the remaining public keys in the public key ring excluding the public key corresponding to the specific node, the concatenated public keys of all public keys are signed to generate a ring signature.

[0108] Finally, multiple sub-evidences and the ring signature are sent as target evidence to the data verification end, so that the data verification end can verify whether the association relationship between each pair of adjacent elements in the multiple sub-evidences within the target evidence is valid. If it is valid, the ring signature within the target evidence is verified to be valid. If it is valid, the data to be verified is confirmed to be located in the target interval.

[0109] Among them, multiple sub-evidences in the target evidence can be used to enable the data verification end to verify the association relationship of each pair of adjacent elements, and the ring signature can be used to enable the data verification end to verify that the data proof end does indeed know a data located in the target interval, that is, to confirm that the data to be extended corresponding to the data proof end is located in the target interval.

[0110] In summary, this embodiment of the application determines the minimum set of nodes covering the target interval within the structure of a perfect binary tree. Multiple nodes in the perfect binary tree represent the target interval, and the verification nodes verify whether the data to be verified is within the target interval. Furthermore, by extracting bits of a specific length from the data to be verified, the first integer corresponding to each node is determined, i.e., the high-order bits representing the data to be verified are obtained. Then, a target set is constructed based on the first integer corresponding to each node and the data to be verified. An auxiliary value is calculated for each pair of adjacent elements in the target set, and sub-evidence is generated based on the auxiliary value and the commitment value of each pair of adjacent elements. This sub-evidence verifies the correlation between adjacent elements, ensuring the reliability of data verification. Furthermore, by using the decimal values ​​corresponding to each node and the first commitment value of the first integer corresponding to each node, a public key corresponding to each node is constructed. By using the commitment values ​​corresponding to each high-order part of the data to be verified as public keys to form a public key ring, and using one of the real private keys that matches the node to perform ring signing, the verifier can be assured that the data to be verified is located in the target range without exposing the specific values. This enables the verifier to prove to the data verification end that the data to be verified is located in a certain specified arbitrary range, and supports efficient and secure inter-regional verification of the data to be verified being located in any range.

[0111] The following describes several exemplary ways to determine the minimum set of nodes covering the target interval in the structure of a perfect binary tree in the above embodiments.

[0112] In one possible implementation, the specific process of determining the minimum set of nodes covering the target interval in the structure of a perfect binary tree may include: determining the left endpoint value and the right endpoint value corresponding to the target interval; determining the first node corresponding to the left endpoint value in the structure of the perfect binary tree and the second node corresponding to the right endpoint value in the structure of the perfect binary tree; tracing upwards from the leaf nodes of the first node and the second node until the common ancestor of the first node and the second node is found, and generating the minimum set of nodes covering the target interval based on the common ancestor.

[0113] In another optional implementation, the specific process of determining the minimum set of nodes covering the target interval in the structure of the perfect binary tree may include: performing binary conversion on the left and right endpoint values ​​to obtain a first binary representation corresponding to the left endpoint value and a second binary representation corresponding to the right endpoint value; if the last bit of the first binary representation is equal to 1 or the last bit of the second binary representation is equal to 0, then insert the first or second binary representation into the candidate node set, and increment the value of the first binary representation by 1 or decrement the value of the second binary representation by 1 to obtain the boundary value corresponding to the first or second binary representation; if the boundary value corresponding to the first binary representation is equal to the boundary value corresponding to the second binary representation, then determine the node corresponding to each binary representation in the current candidate node set in the structure of the perfect binary tree; based on the node corresponding to each binary representation in the candidate node set in the structure of the perfect binary tree, generate the minimum set of nodes covering the target interval.

[0114] If the boundary value corresponding to the first binary representation is not equal to the boundary value corresponding to the second binary representation, the above binary bit operation process can continue to be executed until the boundary value corresponding to the first binary representation is equal to the boundary value corresponding to the second binary representation.

[0115] The above embodiments describe the specific implementation process of generating target evidence by the data verification end in the data verification system. The following describes the specific process by which the data verification end verifies the target evidence to confirm whether the data to be verified is within the target range.

[0116] Figure 4 A flowchart of another data verification method provided in the embodiments of this application is shown below. Figure 4 As shown, the execution entity of this method can be a data verification device located at the data verification end. It can be understood that this data verification device can be implemented as software, or a combination of software and hardware. Specifically, the data verification method may include the following steps:

[0117] 401. Receive the target evidence and the information to be verified sent by the data verification end. The target evidence includes multiple sub-evidences and a ring signature. The information to be verified is to verify whether the data to be verified is located within the target range.

[0118] 402. Verify whether the association relationship between each pair of adjacent elements in the multiple sub-evidences within the target evidence is valid.

[0119] 403. If the association relationship between each pair of adjacent elements is valid, then verify whether the ring signature in the target evidence is valid.

[0120] 404. If the ring signature is valid, then the data to be verified is confirmed to be within the target range.

[0121] The system receives target evidence and verification information from the data verification end. The verification information verifies whether the data to be verified falls within the target range. The target evidence includes multiple sub-evidence and a ring signature.

[0122] The multiple sub-evidences are generated based on the first commitment value corresponding to each pair of adjacent elements in the target set and the second commitment value corresponding to the auxiliary value of each pair of adjacent elements. The target set is composed of the first integers corresponding to each node in the smallest set of nodes covering the target interval corresponding to the data to be verified in the structure of a perfect binary tree, and the elements in the target set are arranged in descending order of bit length. The auxiliary value is the decimal value corresponding to the part remaining after subtracting the high-order part corresponding to the next element from the previous element in each pair of adjacent elements.

[0123] Ring signatures are generated by signing the concatenated result of each node using the private key of the data proof end and the public key of each node in the minimum node set. The public key of each node in the minimum node set is generated based on the decimal values ​​of each node in the minimum node set and the first commitment values ​​corresponding to the first integers in the target set. The first integers in the target set are obtained by calculating the binary length i of each node in the minimum node set, extracting the first i bits from the binary data corresponding to the data to be verified, and combining these first i bits.

[0124] The specific implementation process involved in the embodiments of this application can be referred to the content of the above embodiments, and will not be repeated here.

[0125] After the data verification end receives the target evidence and the information to be verified from the data proof end, it can verify whether the association relationship between each pair of adjacent elements in the multiple sub-evidences within the target evidence is valid. The number of sub-evidences is equal to the number of pairs of adjacent elements included in the target set. Each sub-evidence includes a first commitment value corresponding to the preceding element in a pair of adjacent elements, a first commitment value corresponding to the following element in a pair of adjacent elements, and a second commitment value corresponding to the auxiliary values ​​of a pair of adjacent elements. The verification process for each sub-evidence is roughly the same; here, we will take the target sub-evidence as an example to explain its implementation process in detail. The target sub-evidence is any one of the multiple sub-evidences within the target evidence.

[0126] Therefore, when verifying whether the association relationship between adjacent elements in the target sub-evidence within the target evidence is valid, it can be verified based on the first commitment value corresponding to the first element of a pair of adjacent elements in the target sub-evidence, the first commitment value corresponding to the second element of a pair of adjacent elements in the target sub-evidence, the second commitment value corresponding to the auxiliary value of a pair of adjacent elements in the target sub-evidence, the binary length n corresponding to the second element of a pair of adjacent elements in the target sub-evidence, and the binary length i corresponding to the first element of a pair of adjacent elements in the target sub-evidence.

[0127] Specifically, in an optional embodiment, the process of verifying whether the association relationship between a pair of adjacent elements in the target sub-evidence is valid, based on the first commitment value corresponding to the preceding element and the first commitment value corresponding to the following element in a pair of adjacent elements in the target sub-evidence, the second commitment value corresponding to the auxiliary value of a pair of adjacent elements in the target sub-evidence, the binary length n corresponding to the following element in a pair of adjacent elements in the target sub-evidence, and the binary length i corresponding to the preceding element in a pair of adjacent elements in the target sub-evidence, may include: obtaining the difference between the binary length i corresponding to the preceding element and the binary length n corresponding to the following element in a pair of adjacent elements in the target sub-evidence; generating a power of 2 based on the difference; determining the product of the power of 2 and the first commitment value corresponding to the following element in a pair of adjacent elements in the target sub-evidence; determining the sum of the product and the second commitment value corresponding to the auxiliary value of a pair of adjacent elements in the target sub-evidence; determining whether the first commitment value corresponding to the preceding element in a pair of adjacent elements in the target sub-evidence is equal to the sum; if equal, then confirming that the association relationship between a pair of adjacent elements in the target sub-evidence is valid.

[0128] For example, suppose that in a pair of adjacent elements within the target sub-evidence, the first commitment value corresponding to the preceding element is com1, the first commitment value corresponding to the following element is com2, and the second commitment value corresponding to the auxiliary value of the pair of adjacent elements is com′. If the following conditions are met... This proves that the association between the previous element and the next element is valid.

[0129] If the association between each pair of adjacent elements is valid, then the validity of the ring signature within the target evidence is verified. If the ring signature is valid, the data to be verified is confirmed to be within the target interval. The specific verification process can be as follows: Based on the target interval corresponding to the data to be verified, determine the minimum set of nodes covering the target interval in the structure of a perfect binary tree; extract each node sequentially from the minimum node set, and calculate the public key corresponding to each node based on the decimal value corresponding to each node and the first commitment value corresponding to each first integer in the target set; based on the public key corresponding to each node, verify the validity of the ring signature within the target evidence.

[0130] Using the same implementation method as in the above embodiments for determining the minimum set of nodes covering the target interval, the minimum set S of nodes covering the target interval in the structure of the perfect binary tree is determined based on the target interval corresponding to the data to be verified. m ′。 Wherein, the minimum set of nodes S m Each node in ' is represented by τ i '' represents the minimum set of nodes S. m Each node τ in ′ i ′, and based on the decimal value τ corresponding to each node. i The first commitment value com corresponding to the first integer of each node in the target set included in the sub-evidence. i Calculate the public key P corresponding to each node. i And based on the public key P corresponding to each node. i ′, to verify the validity of the ring signature.

[0131] In this embodiment, the association relationship between each pair of adjacent elements in multiple sub-evidences within the target evidence is verified. If the association relationship between each pair of adjacent elements is valid, the ring signature within the target evidence is verified. If the ring signature is valid, the data to be verified is confirmed to be within the target interval. This enables the verification of whether the data to be verified is within a specified arbitrary interval without exposing the specific numerical value, thus supporting efficient and secure inter-regional verification of data to be verified within any interval.

[0132] To facilitate understanding of the data verification process of the data proof end and the data verification end described above, a specific application scenario will be used for illustration. In a specific application, assuming that the data proof end A needs to prove the data to be verified, v∈[a,b], to the data verification end, its specific implementation process may include the following steps:

[0133] Step 1: Calculate the minimum set of nodes S corresponding to the target interval. m S m =GetBRC m (a,b). Where GetBRC m(a,b) represents the set of the smallest nodes corresponding to the interval a,b.

[0134] Step 2: For any node τ in the minimum node set i ∈S m Calculate the binary length Len for any node. i Len i =Len brc (τ i ), where Len brc (τ i ) indicates the calculation of τ i The corresponding binary length, Len i For τ i The corresponding binary length. And calculate the first integer v corresponding to each node. i That is, v i =Left(v,Len) i ),Left(v,Len i ) represents the integer formed by the high leni bits of v.

[0135] Step 3: Construct the target set, defining the target set S = {v} ∪ {v} i |τ i ∈S m The elements in S are arranged in descending order of length.

[0136] Step 4: Define the operation Left(v,n) to obtain the integer consisting of the high n bits of integer v. Define the operation Len. brc (τ) represents the length of the binary representation of τ. The operation bitlen(v) is defined as the number of binary bits of v.

[0137] Step 5: Assume v1 and v2 are two integers, representing a pair of adjacent elements in the target set. The two elements satisfy Left(v1,n) = v2. Choose r1, r2... And satisfy Calculate the first commitment value com1 = r1G + v1H for the preceding element among adjacent elements, and calculate the first commitment value com2 = r2G + v2H for the following element among adjacent elements. Calculate the auxiliary values ​​for adjacent elements. Calculate the second commitment value com′=r′G+v′H corresponding to the auxiliary values ​​of adjacent elements.

[0138] Step 6: Based on the first commitment value corresponding to each element and the second commitment value of the auxiliary value of the adjacent elements, generate the evidence proofs = {proof(v i′ ,v i′+1 )|i′=1,2…|S|-1}={(comi′ ,com i′+1 ,com i ′)|i′=1,2…|S|-1}。 At this point, com1 is the Perdersen evidence for v.

[0139] Step 7: For any node τ i ∈S m Calculate the public key P corresponding to each node. i =com i -τ i H. According to the definition of the minimum node set, if the data to be verified v∈[a,b], then there must exist j such that τ j ∈S m ∧v j =τ j Established. At this time, P j =r j G. with r j Use the private key to calculate the ring signature sig M =sign(M,P i …). Where M can be any P i The result obtained by cascading.

[0140] Step 8: Based on multiple sub-evidence proofs and ring signatures (SIGK) M Generate target evidence {proofs, sig M The target evidence is then sent to the data verification end.

[0141] Step 9: After receiving the target evidence, the data verification end first verifies whether the commitment value corresponding to the previous element, the first commitment value corresponding to the next element, and the second commitment value corresponding to the auxiliary value of the adjacent element in each sub-evidence satisfy the following conditions. This relationship is satisfied if adjacent elements in each sub-evidence satisfy a corresponding association relationship. If the association relationship between every pair of adjacent elements in each sub-evidence is valid, then the validity of the ring signature is verified.

[0142] Step 10: Calculate the minimum node set S based on the target interval [a, b]. m Based on the calculated minimum set of nodes τ i The first commitment value com corresponding to the first integer of each node in each sub-proof (proofs). i Calculate the public key P for each node i ′, based on the calculated public key set {P i '} Verify ring signature sig M The validity of the ring signature is verified. If the ring signature is valid, the interval verification passes, confirming that the data to be verified is within the target interval.

[0143] The above method enables precise interval proof without disclosing the data to be verified.

[0144] The following describes in detail one or more embodiments of the data verification apparatus of this application. Those skilled in the art will understand that these apparatuses can all be configured using commercially available hardware components through the steps taught in this solution.

[0145] Figure 5 This is a schematic diagram of the structure of a data verification device provided in an embodiment of this application, located at the data verification end, as shown below. Figure 5 As shown, the device includes: an acquisition module 11, a determination module 12, a calculation module 13, a construction module 14, a first generation module 15, a second generation module 16, and a signature module 17.

[0146] The acquisition module 11 is used to acquire the data to be verified and the target interval corresponding to the data to be verified in response to a data verification request triggered for the data to be verified. The data verification request is used to prove to the data verification end that the data to be verified is located within the target interval.

[0147] The determination module 12 is used to determine the minimum set of nodes that cover the target interval in the structure of a perfect binary tree.

[0148] Calculation module 13 is used to calculate the binary length i corresponding to any node in the minimum node set, extract the first i bits from the binary data corresponding to the data to be verified, and combine the first i bits into a first integer.

[0149] The construction module 14 is used to construct a target set based on the data to be verified and the first integer corresponding to each node in the minimum node set, and to construct the auxiliary value corresponding to each pair of adjacent elements in the target set in sequence. The elements in the target set are arranged in descending order of bit length. The auxiliary value is the decimal value corresponding to the part remaining after subtracting the high-bit part corresponding to the next element from the previous element.

[0150] The first generation module 15 is used to generate sub-evidence corresponding to each pair of adjacent elements based on the first commitment value corresponding to each pair of adjacent elements and the second commitment value corresponding to the auxiliary value of each pair of adjacent elements.

[0151] The second generation module 16 is used to generate a public key corresponding to each node based on the decimal value corresponding to each node and the first commitment value corresponding to each first integer in the target set. The public key corresponding to each node includes the public key corresponding to the data proof end.

[0152] The signature module 17 is used to sign the concatenation result of the public keys corresponding to each node using the private key of the data proof terminal and the public key of each node, generate a ring signature, and send the multiple sub-evidences and the ring signature as target evidence to the data verification terminal, so that the data verification terminal can verify whether the association relationship corresponding to each pair of adjacent elements in the multiple sub-evidences in the target evidence is valid. If it is valid, the terminal verifies whether the ring signature in the target evidence is valid. If it is valid, the terminal confirms that the data to be verified is located in the target interval.

[0153] Optionally, the determining module 12 is further configured to: construct a perfect binary tree corresponding to the set of numbers, wherein each non-leaf node in the perfect binary tree represents an interval segment, and each leaf node represents the endpoint value of an interval segment.

[0154] Optionally, the determining module 12 is specifically used to: determine the left endpoint value and the right endpoint value corresponding to the target interval; determine the first node corresponding to the left endpoint value in the structure of the perfect binary tree and the second node corresponding to the right endpoint value in the structure of the perfect binary tree; trace upwards from the leaf nodes of the first node and the second node until the common ancestor of the first node and the second node is found, and generate the minimum set of nodes covering the target interval based on the common ancestor.

[0155] Optionally, the determining module 12 is specifically used to: perform binary conversion processing on the left endpoint value and the right endpoint value to obtain a first binary representation corresponding to the left endpoint value and a second binary representation corresponding to the right endpoint value; if the last bit of the first binary representation is equal to 1 or the last bit of the second binary representation is equal to 0, then insert the first binary representation or the second binary representation into the candidate node set, and increment the value of the first binary representation by 1 or decrement the value of the second binary representation by 1 to obtain the boundary value corresponding to the first binary representation or the boundary value corresponding to the second binary representation; if the boundary value corresponding to the first binary representation is equal to the boundary value corresponding to the second binary representation, then determine the node corresponding to each binary representation in the current candidate node set in the structure of the perfect binary tree; based on the node corresponding to each binary representation in the candidate node set in the structure of the perfect binary tree, generate a minimum node set covering the target interval.

[0156] Optionally, the construction module 14 is specifically used to: for a target adjacent element, obtain the difference between the binary length i corresponding to the previous element in the target adjacent element and the target value n, wherein the target adjacent element is any pair of adjacent elements in the target set, and the target value n is the binary length corresponding to the next element in the target adjacent element; calculate the corresponding power of 2 based on the difference; obtain the first product value corresponding to the next element in the target adjacent element and the corresponding power of 2; determine the first difference between the previous element in the target adjacent element and the first product value; and determine the first difference as the auxiliary value corresponding to the target adjacent element.

[0157] Optionally, the first generation module 15 is further configured to: determine a first blinding factor, a second blinding factor, and a third blinding factor, wherein the first blinding factor is the sum of a second product value and the third blinding factor, and the second product value is the product of the second blinding factor and the corresponding power of 2; select a first generator and a second generator from the additive group; generate a first commitment value corresponding to the previous element among the target neighboring elements based on the first blinding factor, the first generator, the second generator, and the previous element among the target neighboring elements; generate a first commitment value corresponding to the next element among the target neighboring elements based on the second blinding factor, the first generator, the second generator, and the next element among the target neighboring elements; and generate a second commitment value corresponding to the auxiliary value of the target neighboring elements based on the third blinding factor, the first generator, the second generator, and the auxiliary value of the target neighboring elements.

[0158] Optionally, the first generation module 15 is further configured to: obtain the third product value corresponding to the first blinding factor and the first generator; obtain the fourth product value corresponding to the previous element among the target adjacent elements and the second generator; determine the sum value corresponding to the third product value and the fourth product value; and determine the sum value as the first commitment value corresponding to the previous element among the target adjacent elements.

[0159] Optionally, the first generation module 15 is specifically used to: determine the first commitment value corresponding to the previous element in the target adjacent element, the first commitment value corresponding to the next element in the target adjacent element, and the second commitment value corresponding to the auxiliary value of the target adjacent element as the sub-evidence corresponding to the target adjacent element.

[0160] Optionally, the second generation module 16 is specifically used to: for a target node, obtain the fifth product value of the decimal value corresponding to the target node and the second generator, wherein the target node is any node in the set of minimum nodes; determine the second difference between the first commitment value of the first integer corresponding to the target node and the fifth product value; and determine the second difference as the public key corresponding to the target node.

[0161] Optionally, in the minimum node set, there exists a target blinding factor corresponding to a specific node, which is the private key corresponding to that specific node, and the private key corresponding to that specific node is used as the private key of the data proof end.

[0162] Optionally, the signature module 17 is specifically used to: determine the public key corresponding to each node in the minimum node set as a public key ring; and use the private key corresponding to the data proof end and the remaining public keys in the public key ring excluding the public key corresponding to the specific node to sign the concatenation result of the public keys corresponding to each node, thereby generating a ring signature.

[0163] Figure 5 The device shown can perform the steps described in the foregoing embodiments. For detailed execution process and technical effects, please refer to the description in the foregoing embodiments, which will not be repeated here.

[0164] In one possible design, the above Figure 5 The structure of the data verification device shown can be implemented as an electronic device, such as... Figure 6 As shown, the electronic device may include: a memory 21, a processor 22, and a communication interface 23. The memory 21 stores executable code, which, when executed by the processor 22, enables the processor 22 to at least implement the data verification method provided in the foregoing embodiments.

[0165] Figure 7 This is a schematic diagram of another data verification device provided in an embodiment of this application, located at the data verification end, as shown below. Figure 7 As shown, the device includes: a receiving module 31, a first verification module 32, a second verification module 33, and a confirmation module 34.

[0166] The receiving module 31 is used to receive the target evidence and the information to be verified sent by the data proof end. The target evidence includes multiple sub-evidences and a ring signature. The information to be verified is to verify whether the data to be verified is located within the target range.

[0167] The first verification module 32 is used to verify whether the association relationship between each pair of adjacent elements in the plurality of sub-evidences within the target evidence is valid.

[0168] The second verification module 33 is used to verify whether the ring signature in the target evidence is valid if the association relationship corresponding to each pair of adjacent elements is valid.

[0169] The confirmation module 34 is used to confirm that the data to be verified is located in the target range if the ring signature is valid.

[0170] The multiple sub-evidences are generated based on the first commitment value corresponding to each pair of adjacent elements in the target set and the second commitment value corresponding to the auxiliary value of each pair of adjacent elements. The target set is composed of the data to be verified and the first integers corresponding to each node in the minimum node set covering the target interval corresponding to the data to be verified in the structure of a perfect binary tree. The elements in the target set are arranged in descending order of bit length. The auxiliary value is the decimal value corresponding to the part remaining after subtracting the high-order part corresponding to the next element from the previous element in each pair of adjacent elements. The ring signature is generated by signing the concatenated result of each node using the private key corresponding to the data proof end and the public key corresponding to each node in the minimum node set. The public key corresponding to each node in the minimum node set is generated based on the decimal value corresponding to each node in the minimum node set and the first commitment value corresponding to each first integer in the target set. Each first integer in the target set is obtained by calculating the binary length i corresponding to each node in the minimum node set, extracting the first i bits from the binary data corresponding to the data to be verified, and combining the first i bits.

[0171] Optionally, the number of the plurality of sub-evidences is equal to the number of pairs of adjacent elements included in the target set, and each sub-evidence includes a first commitment value corresponding to the preceding element of a pair of adjacent elements in the target set, a first commitment value corresponding to the following element of the pair of adjacent elements, and a second commitment value corresponding to the auxiliary value of the pair of adjacent elements; the first verification module 32 is specifically used to: for the target sub-evidence, based on the first commitment value corresponding to the preceding element of a pair of adjacent elements in the target sub-evidence, the first commitment value corresponding to the following element of a pair of adjacent elements in the target sub-evidence, the second commitment value corresponding to the auxiliary value of a pair of adjacent elements in the target sub-evidence, the binary length n corresponding to the following element of a pair of adjacent elements in the target sub-evidence, and the binary length i corresponding to the preceding element of a pair of adjacent elements in the target sub-evidence, verify whether the association relationship corresponding to a pair of adjacent elements in the target sub-evidence is valid; wherein, the target sub-evidence is any one of the plurality of sub-evidences in the target evidence.

[0172] Optionally, the first verification module 32 is specifically configured to: obtain the difference between the binary length i corresponding to the preceding element in a pair of adjacent elements within the target sub-evidence and the binary length n corresponding to the following element in a pair of adjacent elements within the target sub-evidence; generate a corresponding power of 2 based on the difference; determine the product of the corresponding power of 2 and the first commitment value corresponding to the following element in a pair of adjacent elements within the target sub-evidence; determine the sum of the product value and the second commitment value corresponding to the auxiliary value of a pair of adjacent elements within the target sub-evidence; determine whether the first commitment value corresponding to the preceding element in a pair of adjacent elements within the target sub-evidence is equal to the sum; if equal, then confirm that the association relationship corresponding to a pair of adjacent elements in the target sub-evidence is established.

[0173] Optionally, the second verification module 33 is specifically used to: determine the minimum set of nodes covering the target interval in the structure of a perfect binary tree according to the target interval corresponding to the data to be verified; extract each node sequentially from the minimum node set, and calculate the public key corresponding to each node based on the decimal value corresponding to each node and the first commitment value corresponding to each first integer in the target set; and verify whether the ring signature in the target evidence is valid based on the public key corresponding to each node.

[0174] Figure 7 The device shown can perform the steps described in the foregoing embodiments. For detailed execution process and technical effects, please refer to the description in the foregoing embodiments, which will not be repeated here.

[0175] In one possible design, the above Figure 7 The structure of the post-quantum signature device shown can be implemented as an electronic device, such as... Figure 8 As shown, the electronic device may include: a memory 41, a processor 42, and a communication interface 43. The memory 41 stores executable code, which, when executed by the processor 42, enables the processor 42 to at least implement the data verification method provided in the foregoing embodiments.

[0176] In addition, embodiments of this application provide a non-transitory machine-readable storage medium storing executable code, which, when executed by a processor of an electronic device, enables the processor to at least implement the data verification method provided in the foregoing embodiments.

[0177] Accordingly, this application also provides a computer program product, which includes a computer program or instructions that, when executed by a processor, cause the processor to implement the steps in the above method embodiments. It should be understood that each step or combination of steps in the above method flow can be implemented by the computer program or instructions. Furthermore, these computer programs or instructions can be applied to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device, enabling the processor of the general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to function as an apparatus for implementing the corresponding functions in the above method embodiments.

[0178] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0179] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of a necessary general-purpose hardware platform, or by a combination of hardware and software. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a computer product. This application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0180] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A data verification method, characterized by, The method applied to a data proof end comprises: In response to a data verification request triggered for to-be-verified data, obtaining the to-be-verified data and a target interval corresponding to the to-be-verified data, the data verification request being used to prove to a data verification end that the to-be-verified data is located in the target interval; Determining a minimum node set covering the target interval in a perfect binary tree structure; For any node in the minimum node set, calculating a binary length i corresponding to the node, extracting the first i bits from binary data corresponding to the to-be-verified data respectively, and combining the first i bits into a first integer; Based on the to-be-verified data and the first integer corresponding to each node in the minimum node set, constructing a target set, and sequentially constructing an auxiliary value corresponding to each pair of adjacent elements in the target set, each element in the target set being arranged in a descending order of bit length, the auxiliary value being a decimal value of a remainder obtained by subtracting a high bit part corresponding to a next element from a previous element; Based on a first commitment value corresponding to each pair of adjacent elements and a second commitment value corresponding to the auxiliary value of each pair of adjacent elements, generating a sub-evidence corresponding to each pair of adjacent elements; Based on the decimal value corresponding to each node and a first commitment value corresponding to each first integer in the target set, generating a public key corresponding to each node, the public key corresponding to each node including a public key corresponding to the data proof end; Using a private key of the data proof end and the public key corresponding to each node, signing a concatenation result of the public key corresponding to each node to generate a ring signature, and sending the multiple sub-evidences and the ring signature to the data verification end as a target evidence, so that the data verification end verifies whether an association relationship corresponding to each pair of adjacent elements in the multiple sub-evidences in the target evidence is established, if yes, verifies whether the ring signature in the target evidence is valid, if yes, confirms that the to-be-verified data is located in the target interval.

2. The method of claim 1, wherein, Before the determining the minimum node set covering the target interval in the perfect binary tree structure, the method further comprises: Constructing a perfect binary tree corresponding to a digital set, each non-leaf node in the perfect binary tree representing an interval segment, and each leaf node representing an endpoint value of an interval segment.

3. The method of claim 2, wherein, The determining the minimum node set covering the target interval in the perfect binary tree structure comprises: Determining a left endpoint value and a right endpoint value corresponding to the target interval; Determining a first node corresponding to the left endpoint value in the perfect binary tree structure and a second node corresponding to the right endpoint value in the perfect binary tree structure; Tracing from leaf nodes of the first node and the second node upwards until a common ancestor of the first node and the second node is found, and generating the minimum node set covering the target interval based on the common ancestor.

4. The method of claim 2, wherein, The determining the minimum node set covering the target interval in the perfect binary tree structure comprises: Determining a left endpoint value and a right endpoint value corresponding to the target interval; Conducting binary conversion processing on the left endpoint value and the right endpoint value to obtain a first binary representation corresponding to the left endpoint value and a second binary representation corresponding to the right endpoint value; If the last bit of the first binary representation is equal to 1 or the last bit of the second binary representation is equal to 0, inserting the first binary representation or the second binary representation into a candidate node set, and increasing the value of the first binary representation by 1 or decreasing the value of the second binary representation by 1 to obtain a boundary value corresponding to the first binary representation or a boundary value corresponding to the second binary representation; If the boundary value corresponding to the first binary representation is equal to the boundary value corresponding to the second binary representation, determining nodes corresponding to each binary representation in the candidate node set in the structure of the perfect binary tree; Based on the nodes corresponding to each binary representation in the candidate node set in the structure of the perfect binary tree, generating a minimum node set covering the target interval.

5. The method of claim 1, wherein, The auxiliary value corresponding to each pair of adjacent elements in the target set is sequentially constructed, including: For a target adjacent element, obtaining a difference value between a binary length i corresponding to a previous element in the target adjacent element and a target value n, the target adjacent element being any pair of adjacent elements in the target set, and the target value n being a binary length corresponding to a subsequent element in the target adjacent element; Based on the difference value, calculating a corresponding power of 2; Obtaining a first product value corresponding to the subsequent element in the target adjacent element and the corresponding power of 2; Determining a first difference value between the previous element in the target adjacent element and the first product value; Determining the first difference value as the auxiliary value corresponding to the target adjacent element.

6. The method of claim 5, wherein, Before generating the sub-evidence corresponding to each pair of adjacent elements based on the first commitment value corresponding to each pair of adjacent elements and the second commitment value corresponding to the auxiliary value of each pair of adjacent elements, the method further includes: Determining a first blinding factor, a second blinding factor, and a third blinding factor, and the first blinding factor being a sum of a second product value and the third blinding factor, the second product value being a product value of the second blinding factor and the corresponding power of 2; Selecting a first generator and a second generator from an additive group; Based on the first blinding factor, the first generator, the second generator, and the previous element in the target adjacent element, generating a first commitment value corresponding to the previous element in the target adjacent element; Based on the second blinding factor, the first generator, the second generator, and the subsequent element in the target adjacent element, generating a first commitment value corresponding to the subsequent element in the target adjacent element; Based on the third blinding factor, the first generator, the second generator, and the auxiliary value of the target adjacent element, generating a second commitment value corresponding to the auxiliary value of the target adjacent element.

7. The method of claim 6, wherein, The first commitment value corresponding to the previous element in the target adjacent elements is generated based on the first blinding factor, the first generation element, the second generation element, and the previous element in the target adjacent elements, and the method comprises the following steps of: obtaining a third product value corresponding to the first blinding factor and the first generation element; obtaining a fourth product value corresponding to the previous element in the target adjacent elements and the second generation element; determining a sum value corresponding to the third product value and the fourth product value; determining the sum value as the first commitment value corresponding to the previous element in the target adjacent elements.

8. The method of claim 7, wherein, The sub-evidence corresponding to each pair of adjacent elements is generated based on the first commitment value corresponding to each pair of adjacent elements and the second commitment value corresponding to the auxiliary value of each pair of adjacent elements, and the method comprises the following steps of: determining the first commitment value corresponding to the previous element in the target adjacent elements, the first commitment value corresponding to the next element in the target adjacent elements, and the second commitment value corresponding to the auxiliary value of the target adjacent elements as the sub-evidence corresponding to the target adjacent elements.

9. The method of claim 1, wherein, The public key corresponding to each node is generated based on the decimal value corresponding to each node and the first commitment value corresponding to each first integer in the target set, and the method comprises the following steps of: for a target node, obtaining a fifth product value corresponding to the decimal value corresponding to the target node and the second generation element, the target node being any one node in the minimum node set; determining a second difference value between the first commitment value of the first integer corresponding to the target node and the fifth product value; determining the second difference value as the public key corresponding to the target node.

10. The method of claim 1, wherein, The target blinding factor corresponding to a specific node in the minimum node set is the private key corresponding to the specific node, and the private key corresponding to the specific node is used as the private key of the data proof end.

11. The method of claim 10, wherein, The ring signature is generated by signing the public key concatenation result corresponding to each node using the private key of the data proof end and the public key corresponding to each node, and the method comprises the following steps of: determining the public key corresponding to each node in the minimum node set as a public key ring; signing the public key concatenation result corresponding to each node using the private key corresponding to the data proof end and the remaining public keys in the public key ring except the public key corresponding to the specific node to generate the ring signature.

12. A data verification method, characterized by, The method is applied to a data verification end, and the method comprises the following steps of: receiving a target evidence and to-be-verified information sent by a data proof end, the target evidence comprising a plurality of sub-evidences and a ring signature, and the to-be-verified information being used to verify whether to-be-verified data is located in a target interval; verifying whether the correlation relationship corresponding to each pair of adjacent elements in the plurality of sub-evidences in the target evidence is established; if the correlation relationship corresponding to each pair of adjacent elements is established, verifying whether the ring signature in the target evidence is valid; if the ring signature is valid, confirming that the to-be-verified data is located in the target interval; The multiple sub-evidences are respectively generated based on a first commitment value corresponding to each pair of adjacent elements in a target set and a second commitment value corresponding to an auxiliary value of the each pair of adjacent elements, the target set is constituted based on to-be-verified data and first integers corresponding to respective nodes in a minimum node set covering a target interval corresponding to the to-be-verified data in a structure of a perfect binary tree, and respective elements in the target set are arranged in a descending order of bit length; the auxiliary value is a decimal value corresponding to a residual part obtained by subtracting a high-bit part corresponding to a latter element in the each pair of adjacent elements from a former element in the each pair of adjacent elements; The ring signature is generated by signing the each node concatenated result using a private key corresponding to the data proof end and a public key corresponding to each node in the minimum node set; the public key corresponding to each node in the minimum node set is generated based on a decimal value corresponding to each node in the minimum node set and a first commitment value corresponding to each first integer in the target set; and the first integer in the target set is obtained by calculating a binary length i corresponding to each node in the minimum node set, extracting a first i-bit part from binary data corresponding to the to-be-verified data, and combining the first i-bit part.

13. The method of claim 12, wherein, The number of the multiple sub-evidences is equal to a logarithm of adjacent elements included in the target set, and each sub-evidence includes a first commitment value corresponding to a former element in a pair of adjacent elements in the target set, a first commitment value corresponding to a latter element in the pair of adjacent elements, and a second commitment value corresponding to an auxiliary value of the pair of adjacent elements. The verifying whether the association relationship corresponding to each pair of adjacent elements in the multiple sub-evidences in the target evidence is established includes: For a target sub-evidence, verifying whether an association relationship corresponding to a pair of adjacent elements in the target sub-evidence is established based on a first commitment value corresponding to a former element in the pair of adjacent elements in the target sub-evidence, a first commitment value corresponding to a latter element in the pair of adjacent elements in the target sub-evidence, a second commitment value corresponding to an auxiliary value of the pair of adjacent elements in the target sub-evidence, a binary length n corresponding to the latter element in the pair of adjacent elements in the target sub-evidence, and a binary length i corresponding to the former element in the pair of adjacent elements in the target sub-evidence. The target sub-evidence is any one of the multiple sub-evidences in the target evidence.

14. The method of claim 13, wherein, The verifying whether the association relationship corresponding to the pair of adjacent elements in the target sub-evidence is established based on the first commitment value corresponding to the former element in the pair of adjacent elements in the target sub-evidence, the first commitment value corresponding to the latter element in the pair of adjacent elements in the target sub-evidence, the second commitment value corresponding to the auxiliary value of the pair of adjacent elements in the target sub-evidence, the binary length n corresponding to the latter element in the pair of adjacent elements in the target sub-evidence, and the binary length i corresponding to the former element in the pair of adjacent elements in the target sub-evidence includes: obtaining a difference between a binary length i corresponding to a previous element in a pair of adjacent elements in the target sub-evidence and a binary length n corresponding to a next element in the pair of adjacent elements in the target sub-evidence; generating a corresponding power of 2 based on the difference; determining a product value of the corresponding power of 2 and a first commitment value corresponding to the next element in the pair of adjacent elements in the target sub-evidence; determining a sum value of the product value and a second commitment value corresponding to an auxiliary value of the pair of adjacent elements in the target sub-evidence; determining whether the first commitment value corresponding to the previous element in the pair of adjacent elements in the target sub-evidence is equal to the sum value; if yes, confirming that an association relationship corresponding to the pair of adjacent elements in the target sub-evidence is correct.

15. The method of claim 12, wherein, The method for verifying whether the ring signature in the target evidence is valid comprises: determining, according to a target interval corresponding to the to-be-verified data, a minimum node set covering the target interval in a perfect binary tree structure; extracting each node from the minimum node set in sequence, and calculating a public key corresponding to each node based on a decimal value corresponding to each node and a first commitment value corresponding to each first integer in the target set; verifying whether the ring signature in the target evidence is valid based on the public key corresponding to each node.

16. An electronic device, comprising: The method comprises: a memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the data verification method according to any one of claims 1 to 11 or claims 12 to 15.

Citation Information

Patent Citations

  • Block chain numerical value information transmission method, system and device and computer medium

    CN112769548A

  • Zero knowledge range proving method and device, terminal equipment and computer storage medium

    CN116318725A