Search

CN-122027219-A - Data verification method, device, equipment, medium and product

CN122027219ACN 122027219 ACN122027219 ACN 122027219ACN-122027219-A

Abstract

The application relates to a data verification method, a device, equipment, a medium and a product, wherein the method comprises the steps of determining a block height range and determining a plurality of user accounts corresponding to blocks in the block height range, generating leaf nodes corresponding to the user accounts based on resource possession of the user accounts in the block height range for each user account in the plurality of user accounts, generating snapshot merck trees corresponding to the block height range based on each leaf node, and storing root nodes of the snapshot merck trees into block chain nodes, wherein the root nodes in the block chain nodes are used for comparing a second server with generated reference root nodes to verify the snapshot merck trees, the reference root nodes are generated according to merck paths corresponding to selected user accounts, and the merck paths are queried from the snapshot merck trees according to reference leaf nodes generated by the second server for the selected user accounts. The method and the device can effectively verify the snapshot merck tree and reduce the storage cost.

Inventors

  • LIU WEIWEI
  • WANG XIAOYI
  • YAO WENHAO
  • ZHANG SHUAI
  • LI XIAOJING

Assignees

  • 杭州高新区(滨江)区块链与数据安全研究院

Dates

Publication Date
20260512
Application Date
20260106
Priority Date
20251215

Claims (10)

  1. 1. A data verification method, applied to a first server, the method comprising: determining a block height range, and determining a plurality of user accounts corresponding to blocks in the block height range; generating leaf nodes corresponding to the user accounts based on the resource possession of the user accounts in the block height range for each user account in the plurality of user accounts; Generating a snapshot merck tree corresponding to the block height range based on each leaf node, and storing a root node of the snapshot merck tree into a blockchain node; The root node in the blockchain node is used for comparing a second server with a generated reference root node to verify the snapshot merck tree, the reference root node is generated according to a merck path corresponding to a selected user account, the merck path is queried from the snapshot merck tree according to a reference leaf node generated by the second server for the selected user account, and the selected user account is at least one of the plurality of user accounts.
  2. 2. The method of claim 1, wherein the generating a leaf node for the user account based on the resource ownership of the user account over the tile height range comprises: acquiring a current value and a reference value corresponding to the resource possession of the user account; Determining a value proportion of the user account according to the current value and the reference value; and generating leaf nodes corresponding to the user accounts based on the value proportion of the user accounts and the resource possession of the user accounts in the block height range.
  3. 3. The method according to claim 2, wherein after generating the snapshot merck tree corresponding to the block height range based on each of the leaf nodes, further comprising: publishing bulletin information corresponding to the snapshot merck tree, wherein the bulletin information comprises the block height range and the resource value version; Correspondingly, the reference leaf node is generated by the second server based on the resource possession of the selected user account in the block height range and the value proportion corresponding to the resource value version, wherein the value proportion corresponding to the resource value version is the ratio between the current value corresponding to the resource value version and the reference value.
  4. 4. The method of claim 1, wherein prior to determining the block height range, further comprising: publishing forenotice information, wherein the forenotice information comprises a block height range and a resource value version; The determining a block height range includes: Acquiring a block height range from the forecast information; wherein the current value is determined based on the resource value version in the forecast information.
  5. 5. The method of claim 1, wherein the generating a leaf node for the user account based on the resource ownership of the user account over the tile height range comprises: inquiring the identity verification state identification of the user account in the block height range; And generating leaf nodes corresponding to the user accounts based on the identity verification state identifiers of the user accounts and the resource possession of the user accounts in the block height range.
  6. 6. The method of claim 5, wherein the identity verification status of the selected user account at the block height range characterizes the selected user account as a valid user account.
  7. 7. A data verification device, deployed on a first server, the device comprising: The first determining module is used for determining the height range of the block and determining a plurality of user accounts corresponding to the block in the height range of the block; The first generation module is used for generating leaf nodes corresponding to the user accounts based on the resource possession of the user accounts in the block height range for each user account in the plurality of user accounts; the second generation module is used for generating a snapshot merck tree corresponding to the block height range based on each leaf node and storing a root node of the snapshot merck tree into a blockchain node; The root node in the blockchain node is used for comparing a second server with a generated reference root node to verify the snapshot merck tree, the reference root node is generated according to a merck path corresponding to a selected user account, the merck path is queried from the snapshot merck tree according to a reference leaf node generated by the second server for the selected user account, and the selected user account is at least one of the plurality of user accounts.
  8. 8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
  9. 9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
  10. 10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.

Description

Data verification method, device, equipment, medium and product Technical Field The present application relates to the field of blockchain technologies, and in particular, to a data verification method, apparatus, device, medium, and product. Background At present, snapshot data are often generated by an off-link server, and the risk of being tampered exists, so that a verifier cannot effectively verify the snapshot data generated by the off-link server, and whether the snapshot is credible is uncertain, so that the allocation rationality of subsequent resources is influenced. The related personnel attempt to generate and store snapshot data on the blockchain nodes, but the manner in which snapshot data is stored on the chain requires a relatively high storage cost. Disclosure of Invention In view of the foregoing, it is desirable to provide a data verification method, apparatus, device, medium, and product that can effectively verify a snapshot merck tree while reducing storage costs. In a first aspect, the present application provides a data verification method, applied to a first server, the method comprising: determining a block height range, and determining a plurality of user accounts corresponding to the blocks in the block height range; Generating leaf nodes corresponding to the user accounts based on the resource possession of the user accounts in the block height range for each of the plurality of user accounts; Generating a snapshot merck tree corresponding to the block height range based on each leaf node, and storing the root node of the snapshot merck tree into the blockchain node; The root node in the blockchain node is used for comparing the second server with the generated reference root node to verify the snapshot merck tree, the reference root node is generated according to the merck path corresponding to the selected user account, the merck path is queried from the snapshot merck tree according to the reference leaf node generated by the second server for the selected user account, and the selected user account is at least one of a plurality of user accounts. In one embodiment, the leaf node corresponding to the user account is generated based on the resource possession of the user account in the block height range, and the leaf node corresponding to the user account is generated based on the value proportion of the user account and the resource possession of the user account in the block height range. In one embodiment, after the snapshot merck tree corresponding to the block height range is generated based on each leaf node, the method further comprises the step of issuing notice information corresponding to the snapshot merck tree, wherein the notice information comprises the block height range and a resource value version, the reference leaf node is generated by a second server based on the resource possession of the selected user account in the block height range and the value proportion corresponding to the resource value version, and the value proportion corresponding to the resource value version is the ratio between the current value corresponding to the resource value version and the reference value. In one embodiment, before determining the block height range, the method further comprises issuing forenotice information, wherein the forenotice information comprises the block height range and a resource value version, and determining the block height range comprises the step of acquiring the block height range from the forenotice information, wherein the current value is determined according to the resource value version in the forenotice information. In one embodiment, the leaf node corresponding to the user account is generated based on the resource possession of the user account in the block height range, and the leaf node corresponding to the user account is generated based on the identity verification state identification of the user account in the block height range and the resource possession of the user account in the block height range. In one embodiment, the identity verification status identification of the selected user account at the block height range characterizes the selected user account as a valid user account. In a second aspect, the present application provides a data verification apparatus deployed on a first server, the apparatus comprising: The first determining module is used for determining the height range of the block and determining a plurality of user accounts corresponding to the block in the height range of the block; The first generation module is used for generating leaf nodes corresponding to the user accounts based on the resource possession of the user accounts in the block height range for each user account in the plurality of user accounts; The second generation module is used for generating a snapshot merck tree corresponding to the block height range based on each leaf node and storing the root node of the snapshot merck tree into the bloc