CN110602239A - Block chain information storage method and related equipment - Google Patents

Block chain information storage method and related equipment Download PDF

Info

Publication number
CN110602239A
CN110602239A CN201910902073.2A CN201910902073A CN110602239A CN 110602239 A CN110602239 A CN 110602239A CN 201910902073 A CN201910902073 A CN 201910902073A CN 110602239 A CN110602239 A CN 110602239A
Authority
CN
China
Prior art keywords
node
transaction
hash value
tree
hash
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910902073.2A
Other languages
Chinese (zh)
Other versions
CN110602239B (en
Inventor
刘攀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910902073.2A priority Critical patent/CN110602239B/en
Publication of CN110602239A publication Critical patent/CN110602239A/en
Application granted granted Critical
Publication of CN110602239B publication Critical patent/CN110602239B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the invention provides a block chain information storage method and related equipment, wherein the method comprises the following steps: generating a first transaction aiming at the first transaction, and carrying out first hash operation on the first transaction to obtain a first hash value; obtaining a first Merck tree of the latest version; inserting a first leaf node corresponding to the first hash value into the first Merck tree, and updating the first Merck tree to obtain a second Merck tree with an updated version; sending the first transaction, the position of the first leaf node in the second Mercker tree and the hash value corresponding to the root node of the second Mercker tree to the consensus node; and under the condition that the received signature confirmation message sent by the consensus node meets a preset consensus strategy, sending the first transaction, the second Mercker tree and the position of the first leaf node in the second Mercker tree to a corresponding storage of an accounting node. The invention refines the storage granularity of the block chain information, thereby improving the efficiency of inquiring the block chain information.

Description

Block chain information storage method and related equipment
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a block chain information storage method and a related device.
Background
With the more mature block chain technology, more and more industries, such as supply chain industry, financial industry, hotel management industry, e-commerce industry and logistics industry, deploy their own services in a block chain system to operate, upload generated service data to the block chain, and ensure the normal operation of the services of each industry by the characteristics of difficult tampering, repudiation prevention and the like of the block chain.
The current block chain generally uses blocks as basic units, and the block header of each block on the chain includes the block hash value of the previous block, so that the chain structure of the block chain is realized. A block usually contains all transactions occurring within a fixed time window, there is a merkel tree corresponding to all transactions contained in the block body of the block, for example, a block contains 8 transactions, then the merkel tree in the block body of the block contains a merkel tree corresponding to all the 8 transactions, and the 8 transactions are verified through the root node of the merkel tree, that is, if a lawbreaker needs to tamper with 8 transactions in the block, only the root node of one merkel tree needs to be tampered with correspondingly, the tampering difficulty is low, and therefore, the form of the block results in poor security of the transactions on the block chain.
Disclosure of Invention
The invention provides a block chain information storage method and related equipment, which can improve the safety of transactions on a block chain.
An embodiment of the present invention provides a method for storing block chain information, including:
under the condition that a first transaction is detected, generating a first transaction aiming at the first transaction, and carrying out first hash operation on the first transaction to obtain a first hash value;
obtaining a first Mercker tree of a latest version from Mercker trees of different versions pre-stored aiming at transaction transactions, wherein the first Mercker tree comprises a plurality of nodes, the nodes comprise leaf nodes corresponding to the different transaction transactions, the nodes have hash values corresponding to the nodes, and the hash values corresponding to the leaf nodes are obtained by performing first hash operation on the transaction transactions corresponding to the leaf nodes;
determining the first hash value as a hash value corresponding to a first leaf node, inserting the first leaf node into the first merkel tree, and updating the hash values corresponding to nodes except the leaf node in the first merkel tree to obtain a second merkel tree with an updated version, wherein the second merkel tree comprises a root node;
acquiring the position of the first leaf node in the second Mercker tree, and sending the first transaction, the position of the first leaf node in the second Mercker tree and a hash value corresponding to a root node of the second Mercker tree to a common identification node, so that the common identification node verifies the hash value corresponding to the root node of the second Mercker tree according to the first transaction and the position of the first leaf node in the second Mercker tree, and generates a signature confirmation message after the verification is passed;
and under the condition that the received signature confirmation message sent by the consensus node meets a preset consensus strategy, sending the first transaction, the second Mercker tree and the first leaf node to a billing node at the position of the second Mercker tree, so that the billing node correspondingly stores the first transaction, the second Mercker tree and the first leaf node at the position of the second Mercker tree.
Another aspect of an embodiment of the present invention provides a block chain information storage apparatus, including:
the transaction generation module is used for generating a first transaction aiming at the first transaction under the condition that the first transaction is detected to occur, and carrying out first hash operation on the first transaction to obtain a first hash value;
the system comprises a Mercker tree acquisition module, a transaction processing module and a data processing module, wherein the Mercker tree acquisition module is used for acquiring a latest version of a first Mercker tree from different versions of Mercker trees prestored aiming at transaction transactions, the first Mercker tree comprises a plurality of nodes, the nodes comprise leaf nodes corresponding to different transaction transactions, the nodes have hash values corresponding to the nodes, and the hash values corresponding to the leaf nodes are obtained by performing first hash operation on the transaction transactions corresponding to the leaf nodes;
the merkel tree updating module is used for determining the first hash value as a hash value corresponding to a first leaf node, inserting the first leaf node into the first merkel tree, and updating the hash values corresponding to nodes except the leaf node in the first merkel tree to obtain a second merkel tree with an updated version, wherein the second merkel tree comprises a root node;
the consensus module is used for acquiring the position of the first leaf node in the second Mercker tree, and sending the first transaction, the position of the first leaf node in the second Mercker tree and a hash value corresponding to a root node of the second Mercker tree to a consensus node, so that the consensus node verifies the hash value corresponding to the root node of the second Mercker tree according to the first transaction and the position of the first leaf node in the second Mercker tree, and generates a signature confirmation message after the verification is passed;
and the accounting module is used for sending the first transaction, the second Mercker tree and the first leaf node to an accounting node at the position of the second Mercker tree under the condition that the received signature confirmation message sent by the consensus node meets a preset consensus strategy, so that the accounting node correspondingly stores the first transaction, the second Mercker tree and the first leaf node at the position of the second Mercker tree.
Each node in the first merkel tree is distributed in different node layers, wherein a leaf node layer is a node layer positioned at the bottommost layer of the first merkel tree, and the leaf nodes are distributed in the leaf node layer;
the merkel tree updating module comprises:
a target node layer determining unit, configured to determine the leaf node layer as a target node layer;
a hash value determining unit, configured to determine, according to a hash value corresponding to each node in the target node layer, a hash value corresponding to a node in a node layer above the target node layer through a second hash operation;
a loop unit, configured to, in a case where it is determined that a node layer higher than the target node layer includes only a unique node, end updating the first mercker tree, and determine the unique node as a root node of the second mercker tree;
and the circulation unit is further configured to determine, when it is determined that the upper node layer of the target node layer includes two or more nodes, the upper node layer of the target node layer as the target node layer, and trigger the hash value determination unit to determine, according to the hash value corresponding to each node in the target node layer, a hash value corresponding to the node in the upper node layer of the target node layer through a second hash operation.
Determining the hash value of a parent node corresponding to each node in the target node layer in a node layer above the target node layer according to the hash value corresponding to each node in the target node layer;
the hash value determination unit includes:
the judging subunit is used for judging whether nodes exist at the back sides of the nodes at the odd-numbered sorting positions in the target node layer or not;
a parent node determining child unit, configured to splice the hash value corresponding to the node whose determination result is yes in the target node layer with hash values corresponding to respective rear-side adjacent nodes, perform a second hash operation on the spliced values, and use the hash value obtained after the operation as the hash value of the parent node corresponding to the node whose determination result is yes in the target node layer;
and the father node determining subunit is further configured to determine, according to the hash value corresponding to the node with the negative determination result in the target node layer, the hash value of the father node corresponding to the node with the negative determination result through a second hash operation.
Wherein the father node determines a child unit, and is specifically configured to:
and performing second hash operation on the hash value corresponding to the node with the judgment result of no, and taking the hash value obtained after operation as the hash value of the father node corresponding to the node with the judgment result of no in the target node layer.
Wherein the father node determines a child unit, and is specifically configured to:
and splicing the hash value corresponding to the node with the judgment result of no with the copy value of the node, performing second hash operation on the spliced value, and taking the hash value obtained after the operation as the hash value of the father node corresponding to the node with the judgment result of no in the target node layer.
The transaction generation module is further configured to generate a second transaction for a second transaction when the occurrence of the second transaction is detected;
the merkel tree obtaining module is further configured to:
under the condition that the Mercker tree pre-stored aiming at the transaction does not exist, carrying out first hash operation on the second transaction to obtain a second hash value;
splicing the second hash value with the copy value of the second hash value, and performing second hash operation on the spliced value to obtain a third hash value;
and determining the second hash value as a hash value corresponding to a leaf node of the Mercker tree of the initial version of the transaction, determining the third hash value as a hash value corresponding to a root node of the Mercker tree of the initial version, and establishing the Mercker tree of the initial version.
Wherein the block chain information storage device further comprises a query module configured to:
under the condition that a read request of a client for the first transaction is received, acquiring the second Mercker tree stored corresponding to the first transaction from a plurality of versions of Mercker trees prestored for the transaction, and the position of the first leaf node stored corresponding to the first transaction in the second Mercker tree;
determining a first verification path from the first leaf node to a root node of the second merkel tree according to the position of the first leaf node in the second merkel tree and the second merkel tree;
obtaining at least one first branch node matched with the first verification path from the second Merck tree;
and responding to the reading request, and returning the first transaction, the hash value corresponding to the root node of the second Mercker tree, the first branch node and the first verification path to the client, so that the client verifies the received first transaction according to the hash value corresponding to the root node of the second Mercker tree and the first verification path.
Yet another aspect of the present invention provides a blockchain information storage device, including a processor, a memory, and a communication interface, where the processor, the memory, and the communication interface are connected to each other, where the communication interface is configured to receive and transmit data, the memory is configured to store program codes, and the processor is configured to call the program codes to perform the method in the above aspect of the embodiments of the present invention.
Yet another aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program, the computer program comprising program instructions that, when executed by a processor, perform a method as in one aspect of an embodiment of the present invention.
In the embodiment of the invention, under the condition that a first transaction is detected, a first transaction is generated aiming at the first transaction, a first hash value of the first transaction is calculated, then a first merkel tree of the latest version is obtained from merkel trees of different versions pre-stored aiming at the transaction, the first hash value is taken as a hash value corresponding to a first leaf node, the first leaf node is inserted into the first merkel tree, hash values corresponding to nodes except leaf nodes in the first merkel tree are further updated, a second merkel tree after version updating is obtained, the position of the first leaf node in the second merkel tree, the first transaction, the position of the first leaf node in the second merkel tree and the hash value corresponding to a root node of the second merkel tree are further sent to a common recognition node for verification, and a signature confirmation message is generated after the verification is passed, and under the condition that the received signature confirmation message sent by the consensus node meets a preset consensus strategy, sending the first transaction, the second Mercker tree and the first leaf node to an accounting node at the position of the second Mercker tree for corresponding storage. In the embodiment of the invention, when the block chain account book is updated aiming at the first transaction, the update is carried out on the basis of the Mercker tree of the latest version, so that not only is the chain structure of the block chain account book maintained, but also each transaction has the corresponding Mercker tree to verify the reliability of the transaction, and the way improves the security of the transaction on the block chain.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of a Mercker tree according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a block chain information storage method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a block-node pre-stored Merck tree of different versions according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of another block chain information storage method according to the present invention;
FIG. 5a is a diagram illustrating an update to a first Mercker tree according to an embodiment of the present invention;
FIG. 5b is a diagram illustrating another example of updating the first Mercker tree according to the present invention;
FIG. 6a is a diagram illustrating a first authentication path according to an embodiment of the present invention;
FIG. 6b is a diagram illustrating another first authentication path according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a block chain information storage device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another block chain information storage apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The block chain information storage method provided by the embodiment of the invention is a memory method based on a merkel tree, and before introducing the block chain information storage method provided by the invention, brief introduction is made to related technologies of the merkel tree:
a Merkle tree (Merkle Trees), also called Merkle tree, is usually a binary tree or a multi-branch tree, and has all the characteristics of a tree structure, the Merkle tree includes a plurality of nodes, the plurality of nodes at least includes at least one leaf node and one root node, and usually includes a plurality of intermediate nodes between the leaf node and the root node, each node has a corresponding hash value, wherein the hash value of the leaf node is usually a hash value obtained by performing hash operation on a transaction, the hash value of the intermediate node is a hash value obtained by performing hash operation on every two leaf nodes, and the obtained hash value is used as the hash value of the root node of the Merkle tree after layer-by-layer splicing and hash calculation of the intermediate nodes. Taking fig. 1 as an example, referring to fig. 1, fig. 1 is a schematic diagram of a merkel tree according to an embodiment of the present invention, as shown in the merkel tree, nodes 101, 102, 103, and 104 are respectively 4 leaf nodes, and respective hash values are obtained by performing hash operations on transaction 1, transaction 2, transaction 3, and transaction 4, respectively; nodes 105 and 106 are 2 intermediate nodes, the hash value of node 105 is obtained by performing hash operation after the hash values of node 101 and node 102 are spliced, and the hash value of node 106 is obtained by performing hash operation after the hash values of node 103 and node 104 are spliced; the node 107 is a root node, and the corresponding hash value is obtained by performing hash operation after the hash values of the node 105 and the node 106 are spliced. The hash operation performed on the transaction when determining the hash value of the leaf node and the hash operation performed after splicing the hash values when determining the intermediate node and the root node may be the same hash operation or different hash operations.
As can be seen from the corresponding example in fig. 1, a plurality of nodes in the merkel tree are distributed in different node layers, leaf nodes are located in the node layer at the bottom, root nodes are located in the node layer at the top, intermediate nodes are located in the node layers between the leaf nodes and the root nodes, and in any two adjacent node layers, hash values corresponding to the node points in the upper node layer are determined according to hash values corresponding to the node points in the lower node layer.
In the process of determining the hash value corresponding to the node in the upper node layer according to the hash value corresponding to the node in the lower node layer, firstly, judging whether the number of nodes in the lower node layer is an even number or an odd number, if the number of nodes in the lower node layer is the even number, respectively grouping each node at an odd-numbered ordering position in the lower node layer with a node at the rear side thereof according to the position of the node in the lower node layer, splicing the hash values corresponding to the nodes grouped into a group, and performing hash operation on the spliced values to obtain the hash value of the node corresponding to each grouped node in the lower node layer above the node layer; if the number of the nodes in the lower node layer is odd, dividing each node at an even (except 0) sorting position in the lower node layer into a group with the nodes on the left side thereof according to the positions of the nodes in the lower node layer, splicing the hash values corresponding to the nodes divided into the group, and performing hash operation on the spliced values to obtain the hash value of each grouped node in the lower node layer corresponding to the node in the upper node layer, directly performing hash operation on the hash value corresponding to the node at the last sorting position in the lower node layer to obtain the hash value corresponding to the last node in the upper node layer, or splicing the corresponding hash value with the copy value of the node, performing hash operation on the spliced value to obtain the hash value corresponding to the last node in the upper node layer, in order to ensure the reliability and accuracy of data verification through the merkel tree in the same block chain, a fixed mode is selected from a mode of directly performing hash operation and a mode of performing hash operation after splicing with a copy value of the node at the last sequencing position and is uniformly used in the same block chain.
Next, a method for storing blockchain information according to an embodiment of the present invention is described, referring to fig. 2, where fig. 2 is a schematic flow chart of a method for storing blockchain information according to an embodiment of the present invention, as shown in the figure, the method may include:
s201, under the condition that a first transaction is detected, generating a first transaction aiming at the first transaction, and carrying out first hash operation on the first transaction to obtain a first hash value.
The method for processing the blockchain information provided by the embodiment of the present invention may be applied to any blockchain node, that is, the execution subject in the embodiment may be any blockchain node in the blockchain system. In one implementation, the block link point may periodically detect whether the first transaction occurs based on a preset intelligent contract. The first transaction may be any transaction generated by a block chain node, or may be a transaction based on a block chain uploaded by the block chain node, for example, a transaction including a virtual asset performed between two block chain nodes, a transaction for generating a hotel order in a hotel management scenario, a transaction for generating a commodity order in an e-commerce scenario, or the like.
The first transaction may include, in addition to the first transaction, generation time of the first transaction, a version corresponding to the first transaction, a blockchain channel identifier of a blockchain of the block chain to which the transaction is uploaded, and the like. After the first transaction is generated, a first Hash operation is performed on the first transaction, where the first Hash operation may be one of encryption algorithms such as SHA-2(Secure Hash Algorithm 2) and MD5(Message-digestal Algorithm 5).
S202, obtaining the first Mercker tree of the latest version from the Mercker trees of different versions pre-stored aiming at the transaction.
Here, the block link point may maintain a transaction block chain ledger for a transaction, in which transaction transactions corresponding to different transactions are recorded, and store, in the block link point, a version of the mercker tree corresponding to each transaction for each transaction recorded in the block chain ledger. Except for the first transaction on the uplink, the Merck trees of different versions pre-stored for other transactions are the Merck trees of the initial version established for the first transaction based on the block chain node points, and are obtained after at least one version update.
In one implementation, if the unified manner specified by the hash value corresponding to the node above the node in the blockchain system is determined to be hash operation after splicing the corresponding hash value with the copy value of the node, for the node at the odd-numbered sorting position and without other nodes on the rear side, the establishing of the initial version of the merkel tree may include the following steps: generating a second transaction for the second transaction if the occurrence of the second transaction is detected; under the condition that the Mercker tree pre-stored aiming at the transaction does not exist, performing first hash operation on the second transaction to obtain a second hash value; splicing the second hash value with the copy value of the second hash value, and performing second hash operation on the spliced value to obtain a third hash value; and determining the second hash value as a hash value corresponding to a leaf node of the Mercker tree of the initial version of the transaction, determining the third hash value as a hash value corresponding to a root node of the Mercker tree of the initial version, and establishing the Mercker tree of the initial version.
Referring to fig. 3, fig. 3 is a schematic diagram of different versions of a mercker tree pre-stored in a block link point according to an embodiment of the present invention, as shown in the figure, the mercker tree pre-stored in the block link point includes n mercker trees corresponding to n transaction transactions, where transaction 1 is the first transaction of an upper chain in a block chain ledger maintained by the block link point, an initial version of the block chain ledger, i.e., the mercker tree of version 1, is established according to transaction 1, after transaction 2 is generated, update is performed on the basis of the mercker tree of version 1 according to transaction 2, so as to obtain the mercker tree for a second version of the block chain ledger, i.e., the mercker tree of version 2 corresponding to transaction 2, after transaction 3 is generated, update is performed on the basis of the mercker tree of version 2 according to transaction 3, obtaining a Merck tree of a third version of the block chain account book, namely the Merck tree of the version 3 corresponding to the transaction 3, and so on, after the transaction n is generated, updating the Merck tree on the basis of the Merck tree corresponding to the version n-1 according to the transaction n to obtain the Merck tree of the nth version of the block chain account book, namely the Merck tree of the version n corresponding to the transaction n, and maintaining the structure of the chain account book of the block chain in a Merck tree updating mode.
In this step, the latest version of the Mercker tree is obtained from the prestored different versions of the Mercker trees as the first Mercker tree. In the corresponding example of fig. 3, transaction n is the last transaction on the uplink in the blockchain ledger maintained by the blockchain node, that is, the mercker tree of version n is the latest version of the mercker tree, and then the mercker tree of version n is taken as the first mercker tree.
The first Mercker tree comprises a plurality of nodes, and the plurality of nodes comprise leaf nodes corresponding to different transaction transactions and a root node of the first Mercker tree. In the case where the first merkel tree is a merkel tree of an initial version of the block chain ledger maintained by the block chain node points, or a merkel tree of a second version corresponding to the block chain ledger maintained by the block chain node points, the plurality of nodes of the first merkel tree include only leaf nodes and root nodes; in the case where the first merkel tree is not a merkel tree that maintains the original starting version of the blockchain ledger, nor is a log merkel tree of a second version of the blockchain ledger maintained by a blockchain node, the plurality of nodes of the first merkel tree include leaf nodes, root nodes, and intermediate nodes between the leaf nodes and the root nodes. Each node of the first merkel tree has a corresponding hash value, the hash value corresponding to the leaf node is obtained by performing a first hash operation on the transaction corresponding to the leaf node, the hash value corresponding to the intermediate node can be determined according to the hash value corresponding to the leaf node, and the hash value corresponding to the root node can be determined according to the hash value of the intermediate node. The hash algorithm for determining the hash value corresponding to the intermediate node according to the hash value corresponding to the leaf node and the hash algorithm for determining the hash value corresponding to the root node according to the hash value corresponding to the intermediate node are both second hash operations, the second hash operation may be one of encryption algorithms such as SHA-2 and MD5, and the second hash operation may be the same as or different from the first hash operation.
S203, determining the first hash value as a hash value corresponding to a first leaf node, inserting the first leaf node into the first Merck tree, and updating the hash values corresponding to nodes except the leaf node in the first Merck tree to obtain a second Merck tree with an updated version, wherein the second Merck tree comprises a root node.
Here, the first leaf node is inserted into the first merkel tree as a corresponding leaf node in the first merkel tree for the first transaction, specifically, the first leaf node may be inserted into a position of any leaf node in the first merkel tree, taking the merkel tree of version n in fig. 3 as an example, the first leaf node may be inserted into a position before the leaf node 1, the first leaf node may be inserted into a position after the leaf node n, or the first leaf node may be inserted into a position between any two leaf nodes between the leaf node 1 and the leaf node n.
Wherein, each node in the first merkel tree is distributed in different node layers, and after the first leaf node is inserted into the first merkel tree, the process of updating the hash value corresponding to each node except the leaf node in the first merkel tree actually starts from the leaf node layer of the bottommost layer where the leaf node of the first merkel tree is located, and the process of determining the hash value of the node in the node layer of the upper layer according to the hash value of the node in the node layer of the lower layer up layer by layer is specific: determining the leaf node layer as a target node layer; determining a hash value corresponding to a node in a node layer above the target node layer through a second hash operation according to the hash value corresponding to each node in the target node layer; if the last node layer of the target node layer only contains the unique node, ending the updating of the first Mercker tree, and determining the unique node as the root node of the second Mercker tree; and if the last node layer of the target node layer contains two or more nodes, re-determining the last node layer of the target node layer as the only target node layer, returning to execute the hash value corresponding to each node in the target node layer, and determining the hash value corresponding to the node in the last node layer of the target node layer through a second hash operation.
Optionally, the block link point stores, for each mercker tree, the position of the leaf node corresponding to each transaction in the mercker tree, and after the first leaf node is inserted into the first mercker tree, records the position of the first leaf node in the first mercker tree, and updates the positions of the leaf nodes whose other positions are changed, so as to obtain the position of the leaf node corresponding to each transaction in the second mercker tree.
S204, obtaining the position of the first leaf node in the second Mercker tree, and sending the first transaction, the position of the first leaf node in the second Mercker tree, and the hash value corresponding to the root node of the second Mercker tree to a common recognition node.
Here, the consensus node may be a consensus node predetermined based on a consensus mechanism of the block chain system, such as a PoW (Proof of workload) consensus mechanism, a PoS (Proof of rights and interests) consensus mechanism, a DPoS (freed Proof of rights and rights) consensus mechanism, and so on. The position of the leaf node (i.e., the first leaf node) corresponding to the first transaction in the second merkel tree can be determined from the stored positions of the leaf nodes corresponding to the transaction transactions in the second merkel tree, and then the first log transaction, the position of the first leaf node in the second merkel tree, and the hash value corresponding to the root node of the second merkel tree are sent to the common recognition node.
The consensus node verifies a hash value corresponding to a root node of a second Mercker tree according to a first transaction and the position of a first leaf node in the second Mercker tree, specifically, the consensus node performs a first hash operation on the first transaction to obtain a Mercker tree of a latest version stored in the consensus node or a credible Mercker tree of a latest version obtained from other ways, the consensus node determines a hash value of the root node obtained after inserting the leaf node corresponding to the first transaction in a log Mercker tree in the latest version obtained by the consensus node at a position corresponding to the position of the first leaf node in the second Mercker tree, and if the hash value of the finally determined root node is consistent with the hash value corresponding to the root node of the second Mercker tree, the hash verification is passed. And under the condition that the verification is passed, the consensus node can perform consensus signature on the hash value corresponding to the root node of the second Mercker tree through a private key of the consensus node, and returns the consensus signature to the execution main body block chain node through a signature confirmation message. In the process, the hash value of the root node of the second Mercker tree is identified through the common identification node, so that the reliability of the first transaction of the uplink is guaranteed.
S205, under the condition that the received signature confirmation message sent by the consensus node meets a preset consensus strategy, the first transaction, the second Mercker tree and the first leaf node are sent to an accounting node at the position of the second Mercker tree.
Specifically, the preset consensus strategy specifies that the consensus is successful when the number of the received signature confirmation messages returned by different consensus nodes is larger than a preset number, or the consensus is successful when the signature confirmation messages returned by the specified consensus node are received. After the block chain node receives the signature confirmation message, the consensus signature in the signature confirmation message is obtained, the consensus signature is checked, only the signature confirmation message passing the check signature is valid, the block chain node can count the number of valid signature confirmation messages to judge whether the consensus strategy is met, and whether the sending node of the signature confirmation message is the designated consensus node or not can be identified through the consensus signature in the valid signature confirmation message, so that whether the consensus strategy is met or not is judged.
And under the condition that the consensus strategy is confirmed to be met, the block link node sends the first transaction, the second Mercker tree and the position of the first leaf node in the second Mercker tree to the accounting node, and the accounting node stores the first transaction, the second Mercker tree and the position of the first leaf node in the second Mercker tree in a log transaction database of the block link node in a one-to-one correspondence mode.
Optionally, the execution subject blockchain node in this embodiment may also be one of the accounting nodes, and then the execution subject blockchain node itself stores the first transaction, the second merkel tree, and the first leaf node in the log transaction database of itself at the position of the second merkel tree.
In the embodiment of the invention, under the condition that a first transaction is detected, a first transaction is generated aiming at the first transaction, a first hash value of the first transaction is calculated, then a first merkel tree of the latest version is obtained from merkel trees of different versions pre-stored aiming at the transaction, the first hash value is taken as a hash value corresponding to a first leaf node, the first leaf node is inserted into the first merkel tree, hash values corresponding to nodes except leaf nodes in the first merkel tree are further updated, a second merkel tree after version updating is obtained, the position of the first leaf node in the second merkel tree, the first transaction, the position of the first leaf node in the second merkel tree and the hash value corresponding to a root node of the second merkel tree are further sent to a common recognition node for verification, and a signature confirmation message is generated after the verification is passed, and under the condition that the received signature confirmation message sent by the consensus node meets a preset consensus strategy, sending the first transaction, the second Mercker tree and the first leaf node to an accounting node at the position of the second Mercker tree for corresponding storage. In the embodiment of the invention, when the block chain account book is updated aiming at the first transaction, the update is carried out on the basis of the Mercker tree of the latest version, so that not only is the chain structure of the block chain account book maintained, but also each transaction has the corresponding Mercker tree to verify the reliability of the transaction, and the way improves the security of the transaction on the block chain.
Referring to fig. 4, fig. 4 is a schematic flowchart of another block chain information storage method provided by the present invention, and the block chain information storage method in the embodiment corresponding to fig. 4 may be implemented at any accounting node in the block chain link points, as shown in the figure, the method may include:
s401, under the condition that the first transaction is detected to occur, generating a first transaction for the first transaction, and performing a first hash operation on the first transaction to obtain a first hash value.
S402, obtaining the first Mercker tree of the latest version from the Mercker trees of different versions pre-stored for the transaction.
The first Mercker tree comprises a plurality of nodes, the plurality of nodes comprise leaf nodes corresponding to different transaction transactions, the plurality of nodes have hash values corresponding to the nodes, and the hash values corresponding to the leaf nodes are obtained by performing first hash operation on the transaction transactions corresponding to the leaf nodes.
S403, determining the first hash value as the hash value corresponding to the first leaf node, and inserting the first leaf node into the first Mercker tree.
The specific implementation manner of step S401 to step S403 may refer to the specific implementation details of step S201 to step S203 in the embodiment corresponding to fig. 2, and is not described herein again.
S404, determining the leaf node layer where the leaf node in the first Mercker tree is located as a target node layer.
Each node in the first Merck tree is distributed in different node layers, leaf nodes are distributed in a leaf node layer at the bottom, root nodes are distributed in a root node layer at the top, and intermediate nodes are distributed in an intermediate node layer between the leaf node layer and the root node layer.
S405, according to the hash value corresponding to each node in the target node layer, determining the hash value corresponding to the node in the node layer above the target node layer through a second hash operation.
Here, the hash value corresponding to the node in the node layer higher than the destination node layer is determined by the second hash operation based on the hash value corresponding to each node in the destination node layer, which is actually the hash value of the parent node corresponding to each node in the destination node layer higher than the destination node layer. And the corresponding hash value of the father node of any first node in the target node layer is the node determined according to the hash value corresponding to the first node. Specifically, the method comprises the following steps: whether nodes exist at the rear sides of the nodes at odd-numbered sorting positions in the target node layer or not can be judged; splicing the hash value corresponding to the node with the judgment result of yes in the target node layer with the hash values corresponding to the nodes adjacent to the rear sides of the node, performing second hash operation on the spliced values, and taking the hash value obtained after operation as the hash value of the parent node corresponding to the node with the judgment result of yes in the target node layer; and determining the hash value of the father node corresponding to the node with the negative judgment result through a second hash operation according to the hash value corresponding to the node with the negative judgment result in the target node layer.
The hash value corresponding to the node can be subjected to the second hash operation directly according to a designated uniform mode in the block link node to obtain the hash value of the parent node, or the hash value corresponding to the node and the copy value of the node are spliced and then subjected to the second hash operation to obtain the hash value of the parent node.
S406, judging whether the number of the nodes in the node layer above the target node layer is more than 1.
If not, step S407 is executed, and if yes, step S408 is executed.
If the number of nodes in the node layer above the target node layer is 1 or more than 1, under the condition that the number is 1, the node layer above the target node layer is a root node layer, and the updating of the first Mercker tree is completed; if the number is greater than 1, it indicates that the node layer above the target node layer is an intermediate node layer, and the update of the first merkel tree is not completed yet, and further update is required.
S407, ending the updating of the first Mercker tree, and determining one node in the node layer above the target node layer as the root node of the second Mercker tree to obtain the second Mercker tree with the updated version.
The following steps S404 to S407 are exemplified: referring to fig. 5a, fig. 5a is a schematic diagram of updating a first merkel tree according to an embodiment of the present invention, as shown in the figure, the first merkel tree includes five leaf nodes, namely, a leaf node 1 to a leaf node 5, the first leaf node may be inserted into a position behind the leaf node 5, and then, in a process of updating hash values corresponding to nodes other than the leaf node, a leaf node layer is first determined as a target node layer, and hash values corresponding to nodes in a node layer above the leaf node layer are determined, because hash values of nodes corresponding to respective lower layers of an intermediate node 1, an intermediate node 2, and an intermediate node 4 are not changed, the corresponding hash values are not changed; the hash value of the intermediate node 3 is determined in the first merkel tree only according to the hash value of the leaf node 5, after the first leaf node is inserted, the hash value is determined by the leaf node 5 and the hash value corresponding to the first leaf node, and the hash value is updated to obtain the updated hash value of the intermediate node 3' in the second merkel tree; because the upper node layer of the leaf node layer comprises three nodes of the intermediate node 1, the intermediate node 2 and the intermediate node 3', the node layer where the three nodes are located is determined as the target node layer again, and the hash value corresponding to the node in the upper node layer of the target node layer is updated; because the hash value of the node corresponding to the lower layer of the intermediate node 4 is unchanged, the hash value corresponding to the intermediate node 4 is unchanged; and the intermediate node 3 is updated to be the intermediate node 3 ", therefore, according to the specified unified mode, the second hash operation is performed on the hash value of the intermediate node 3", the hash value of the intermediate node 3 "is obtained and spliced with the self-copied value, and then the second hash operation is performed to obtain the hash value of the intermediate node 5 'after the intermediate node 5 is updated, and similarly, the hash value of the root node 1 is updated to obtain the hash value of the root node 1' after the update in the second merkel tree, and the update is completed to finally obtain the second merkel tree.
Referring to fig. 5b, fig. 5b is another schematic diagram of updating a first merkel tree according to an embodiment of the present invention, as shown in fig. 5b, the first merkel tree in fig. 5b is the same as the first merkel tree shown in fig. 5a, but a first leaf node is exemplarily inserted between a leaf node 2 and a leaf node 3, and in this case, the hash values corresponding to other nodes are not changed, and only the hash values corresponding to the intermediate nodes 2, 3, 4, 5, and 1 respectively need to be updated, the hash values corresponding to the intermediate nodes 2 ", 3", 4 ", 5", and 1 "in the second merkel tree are determined, and finally, an updated second merkel tree is obtained.
S408, determining the node layer above the target node layer as the target node layer.
And updating the corresponding hash values in each node layer by updating the target node layer.
S409, the position of the first leaf node in the second Mercker tree is obtained, and the first transaction, the position of the first leaf node in the second Mercker tree and the hash value corresponding to the root node of the second Mercker tree are sent to the consensus node.
And the consensus node verifies the hash value corresponding to the root node of the second Mercker tree according to the first transaction and the position of the first leaf node in the second Mercker tree, and generates a signature confirmation message after the verification is passed.
S410, under the condition that the received signature confirmation message sent by the consensus node meets the preset consensus strategy, correspondingly storing the first transaction, the second Mercker tree and the position of the first leaf node in the second Mercker tree.
And under the condition that the signature confirmation message sent by the consensus node meets the preset consensus strategy, the accounting node can also send the first transaction, the second Mercker tree and the position of the first leaf node in the second Mercker tree to other accounting nodes in the blockchain system, and the other accounting nodes also correspondingly store the positions of the first transaction, the second Mercker tree and the first leaf node in the second Mercker tree.
S411, receiving a read request of a client for a first transaction, and obtaining a second Mercker tree stored corresponding to the first transaction from the Mercker trees of a plurality of versions pre-stored for the transaction, and a position of a first leaf node stored corresponding to the first transaction in the second Mercker tree.
S412, according to the position of the first leaf node in the second Merck tree and the second Merck tree, determining a first verification path from the first leaf node to the root node of the second Merck tree.
Here, the first verification path includes a plurality of first path nodes, and the first path nodes include a first leaf node and a root node of the second merkel tree. The plurality of first path nodes on the first verification path may be determined in the second merkel tree by sequentially determining parent nodes from the first leaf node upward.
If the second merkel tree is the merkel tree of the initial version corresponding to the block chain account maintained by the accounting node or the merkel tree of the second version of the block chain account maintained by the accounting node, the first path node on the first verification path only comprises the first leaf node and the root node of the second merkel tree; if the second merkel tree is not the original version of the merkel tree, nor the second version of the merkel tree, then the first path node on the first verification path includes, in addition to the first leaf node, the root node of the second merkel tree, at least one intermediate node between the first leaf node and the root node of the second merkel tree.
For example, if the second merkel tree is the original version of the merkel tree corresponding to the block chain ledger maintained by the accounting node, referring to fig. 6a, fig. 6a is a schematic diagram of a first verification path provided by an embodiment of the present invention, the second merkel tree corresponding to the first transaction is as shown in fig. 6a, the parent node of the first leaf node is the root node, and the first path node on the first verification path only includes the first leaf node and the root node of the second merkel tree. If the second merkel tree is not the original version merkel tree corresponding to the blockchain account maintained by the accounting node, and is not the second version merkel tree corresponding to the blockchain account maintained by the blockchain node, see fig. 6b, and fig. 6b is a schematic diagram of another first verification path provided in the embodiment of the present invention, as shown in the figure, assuming that the second merkel tree corresponding to the first transaction is as shown in the merkel tree in fig. 6b, the parent node of the first leaf node is intermediate node 1, the parent node of intermediate node 1 is intermediate node 2, and the parent node of intermediate node 2 is the root node of the second merkel tree, the first verification path is determined completely, and the first path node on the first verification path includes the first leaf node, intermediate node 1, intermediate node 2, and the root node of the second merkel tree.
S413, obtaining at least one first branch node matched with the first verification path from the second merkel tree.
The first branch node is a node having a common father node with the first path node. In a specific implementation, whether a node having a common parent node with a first leaf node exists or not may be determined from the first leaf node along a first verification path, and if so, a node having the same parent node with the first leaf node is determined as a first branch node; further judging whether the father node of the first leaf node is the root node of the second Merck tree, if so, finishing the determining process of the first branch node, if not, further judging whether a node which has a common father node with the father node of the first leaf node exists, and if so, determining the node which has the common father node with the father node of the first leaf node as a first branch node; and judging whether the father node of the first leaf node is the root node of the second Merck tree or not, and so on until all the nodes except the root node on the first verification path are used for determining the first branch node.
S414, responding to the reading request, and returning the first transaction, the hash value corresponding to the root node of the second Mercker tree, the first branch node and the first verification path to the client.
After receiving the first transaction, the hash value corresponding to the root node of the second Mercker tree, the first branch node and the first verification path, the client verifies the received first transaction according to the hash value corresponding to the root node of the second Mercker tree, the first branch node and the first verification path.
Specifically, if the first verification path only includes the first leaf node and the root node of the second merkel tree, the first branch node received by the client is empty, and the client determines that the received first branch node is empty, directly carrying out first hash operation on the first transaction, directly carrying out second hash operation on the obtained hash value according to a uniform mode of determining hash value assignment corresponding to the node above the node aiming at the node which is at the odd number sorting position and has no other node at the rear side, or after splicing with the copy value of the self, performing second hash operation, comparing the hash value obtained by the second hash operation with the hash value corresponding to the root node of the second Mercker tree, if the hash value is consistent with the hash value, confirming that the verification is passed, and indicating that the first transaction is a reliable transaction stored by the accounting node, otherwise, confirming that the verification is not passed, and indicating that the received first transaction is an unreliable transaction which is possibly tampered.
If the first verification path comprises the first leaf node, the root node of the second Merck tree and at least one intermediate node, the first branch node received by the client comprises at least one, each first branch node carries information indicating a first path node matched with the first branch node, the client performs first hash operation on a first transaction, and determining a verification root hash value by a second hash operation along the first verification path according to the hash value obtained by the first hash operation and the hash value corresponding to each first branch node, and under the condition that the verification root hash value is consistent with the hash value of the root node of the second Mercker tree, confirming that the verification is passed, wherein the first transaction is a reliable transaction stored by the accounting node, and otherwise, confirming that the verification is not passed, wherein the received first transaction is an unreliable transaction which is possibly tampered.
In the process of determining the verification root hash value, sequentially determining each first path node as a target path node along a first verification path according to a direction from a first leaf node to a root node, and determining a hash value obtained by performing first hash operation on a first transaction as a target node hash value; judging whether the target path node has a matched first branch node, if so, splicing the hash value of the target node with the hash value of the first branch node, then performing second hash operation, determining the obtained hash value as a new hash value of the target node, if not, determining a unified mode designated by the hash value corresponding to the node above the node according to the node at the odd-numbered sorting position and without other nodes on the rear side in the block chain system, directly performing the second hash operation on the hash value of the target node, or splicing the hash value with the copy value of the target node, then performing the second hash operation, and determining the obtained hash value as the new hash value of the target node; and then, repeatedly executing the processes on the target path node and the target node hash value until the root node is determined as the target path node, and determining the target node hash value at the moment as a verification root hash value.
Taking the first verification path shown in fig. 6b as an example, the first path nodes on the first verification path include a first leaf node, an intermediate node 1, an intermediate node 2 and a root node, the first branch nodes include a leaf node 1 (matched with the first leaf node), an intermediate node 5 (matched with the intermediate node 1) and an intermediate node 3 (matched with the intermediate node 2), the client performs a first hash operation on the first transaction to obtain a hash1, and performs a second hash operation after splicing hash values corresponding to the leaf node 1, which is the first branch node matched with the first leaf node, of the hash 1; splicing the hash2 with the hash value corresponding to the first branch node matched with the intermediate node 1, namely the intermediate node 5, and then performing second hash operation to obtain a hash 3; and splicing the hash values corresponding to the first branch node matched with the hash3 and the intermediate node 2, namely the intermediate node 3, and then performing second hash operation to obtain a hash4, and further judging whether the hash4 is compared with the hash value corresponding to the root node of the second Mercker tree, wherein if the hash is kept, the verification is passed, and if the hash is not passed, the verification is not passed.
In the embodiment of the invention, a first hash value obtained by carrying out first hash operation on a first transaction is used as a hash value corresponding to a first leaf node, the first leaf node is inserted into a first Merck tree of the latest version of the transaction, then a leaf node layer of the first Merck tree is determined as a target node layer, according to the hash value corresponding to each node in the target node layer, a hash value corresponding to a node in the last node layer of the target node layer is determined through second hash operation, under the condition that the number of nodes in the last node layer of the target node layer is 1, the updating of the first Merck tree is finished to obtain a second Merck tree, under the condition that the number is more than 1, the last node layer of the target node layer is re-determined as a unique target node layer, and the process returns to circularly execute the hash value corresponding to each node in the target node layer, determining a hash value corresponding to a node in a node layer above the target node layer through a second hash operation; when the number of nodes in the upper layer of the target node layer is 1, updating the first Mercker tree to obtain a second Mercker tree, verifying the hash value of the root node of the second Mercker tree by the consensus node, and correspondingly storing the first transaction, the second Mercker tree and the position of the first leaf node in the second Mercker tree after receiving a signature confirmation message sent by the consensus node; and then when a reading request sent by the client for the first transaction is received, acquiring a first verification path from the first leaf node to the root node and a first branch node matched with the first verification path, and responding to the reading request and returning the first transaction, the hash value corresponding to the root node of the second Mercker tree, the first branch node and the first verification path to the client so as to enable the client to verify the first transaction. The updating of the block chain account book by taking the transaction as the granularity is realized, the security of the transaction on the block chain is improved, the storage granularity of the block chain information is refined, and the query efficiency for the transaction is improved.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a blockchain information storage device according to an embodiment of the present invention, as shown in the figure, the blockchain information storage device 70 at least may include a transaction generation module 701, a mercker tree acquisition module 702, a mercker tree update module 703, a consensus module 704, and a billing module 705, where:
a transaction generating module 701, configured to generate a first transaction for a first transaction when the occurrence of the first transaction is detected, and perform a first hash operation on the first transaction to obtain a first hash value;
a merck tree obtaining module 702, configured to obtain a first merck tree of a latest version from merck trees of different versions prestored for a transaction, where the first merck tree includes multiple nodes, the multiple nodes include leaf nodes corresponding to different transaction transactions, the multiple nodes have hash values corresponding to the multiple nodes, and the hash values corresponding to the leaf nodes are obtained by performing a first hash operation on the transaction transactions corresponding to the leaf nodes;
a merkel tree updating module 703, configured to determine the first hash value as a hash value corresponding to a first leaf node, insert the first leaf node into the first merkel tree, and update hash values corresponding to nodes in the first merkel tree except the leaf node, so as to obtain a second merkel tree with an updated version, where the second merkel tree includes a root node;
a consensus module 704, configured to obtain a position of the first leaf node in the second merkel tree, and send the first transaction, the position of the first leaf node in the second merkel tree, and a hash value corresponding to a root node of the second merkel tree to a consensus node, so that the consensus node verifies the hash value corresponding to the root node of the second merkel tree according to the first transaction and the position of the first leaf node in the second merkel tree, and generates a signature confirmation message after the verification is passed;
a billing module 705, configured to send the first transaction, the second merkel tree, and the first leaf node to a billing node at the location of the second merkel tree when the received signature confirmation message sent by the consensus node satisfies a preset consensus policy, so that the billing node correspondingly stores the first transaction, the second merkel tree, and the first leaf node at the location of the second merkel tree.
Each node in the first merkel tree is distributed in different node layers, wherein a leaf node layer is a node layer positioned at the bottommost layer of the first merkel tree, and the leaf nodes are distributed in the leaf node layer;
the merkel tree updating module 703 includes:
a target node layer determining unit 7301, configured to determine the leaf node layer as a target node layer;
a hash value determining unit 7302, configured to determine, according to a hash value corresponding to each node in the target node layer, a hash value corresponding to a node in a node layer above the target node layer through a second hash operation;
a loop unit 7303, configured to, in a case where it is determined that a node layer higher than the target node layer only includes a unique node, end updating the first mercker tree, and determine the unique node as a root node of the second mercker tree;
the loop unit 7303 is further configured to determine, when it is determined that the upper node layer of the target node layer includes two or more nodes, the upper node layer of the target node layer as the target node layer, and trigger the hash value determination unit to determine, according to the hash value corresponding to each node in the target node layer, a hash value corresponding to the node in the upper node layer of the target node layer through a second hash operation.
Optionally, the hash value of a parent node corresponding to each node in the target node layer in a node layer above the target node layer is determined according to the hash value corresponding to each node in the target node layer;
the hash value determination unit 7303 includes:
a determining subunit 3031, configured to determine whether a node exists on the back side of a node in the odd-numbered ranking position in the target node layer;
a parent node determining subunit 3032, configured to splice the hash value corresponding to the node whose determination result is yes in the target node layer with hash values corresponding to respective nodes adjacent to the rear side of the target node layer, perform a second hash operation on the spliced values, and use the hash value obtained after the second hash operation as the hash value of the parent node corresponding to the node whose determination result is yes in the target node layer;
the parent node determining subunit 3032 is further configured to determine, according to the hash value corresponding to the node whose determination result is negative in the target node layer, the hash value of the parent node corresponding to the node whose determination result is negative through a second hash operation.
Optionally, the parent node determining subunit 3032 is specifically configured to:
and performing second hash operation on the hash value corresponding to the node with the judgment result of no, and taking the hash value obtained after operation as the hash value of the father node corresponding to the node with the judgment result of no in the target node layer.
The parent node determining subunit 3032 is specifically configured to:
and splicing the hash value corresponding to the node with the judgment result of no with the copy value of the node, performing second hash operation on the spliced value, and taking the hash value obtained after the operation as the hash value of the father node corresponding to the node with the judgment result of no in the target node layer.
Optionally, the transaction generating module 701 is further configured to generate a second transaction for a second transaction when the occurrence of the second transaction is detected;
the mercker tree obtaining module 702 is further configured to:
under the condition that the Mercker tree pre-stored aiming at the transaction does not exist, carrying out first hash operation on the second transaction to obtain a second hash value;
splicing the second hash value with the copy value of the second hash value, and performing second hash operation on the spliced value to obtain a third hash value;
and determining the second hash value as a hash value corresponding to a leaf node of the Mercker tree of the initial version of the transaction, determining the third hash value as a hash value corresponding to a root node of the Mercker tree of the initial version, and establishing the Mercker tree of the initial version.
Optionally, the blockchain information storage device 70 further includes a query module 706, configured to:
under the condition that a read request of a client for the first transaction is received, acquiring the second Mercker tree stored corresponding to the first transaction from a plurality of versions of Mercker trees prestored for the transaction, and the position of the first leaf node stored corresponding to the first transaction in the second Mercker tree;
determining a first verification path from the first leaf node to a root node of the second merkel tree according to the position of the first leaf node in the second merkel tree and the second merkel tree;
obtaining at least one first branch node matched with the first verification path from the second Merck tree;
and responding to the reading request, and returning the first transaction, the hash value corresponding to the root node of the second Mercker tree, the first branch node and the first verification path to the client, so that the client verifies the received first transaction according to the hash value corresponding to the root node of the second Mercker tree and the first verification path.
In a specific implementation, the block chain information storage device may execute, through each built-in functional module, each step in the block chain information storage method shown in fig. 2 and 5, and specific implementation details may refer to implementation details of each step in the embodiment corresponding to fig. 2 and 5, which are not described herein again.
In the embodiment of the invention, a transaction generation module generates a first transaction aiming at the first transaction and calculates a first hash value of the first transaction under the condition that the first transaction is detected to occur, a Mercker tree acquisition module acquires a first Mercker tree of the latest version from Mercker trees of different versions pre-stored aiming at the transaction, a Mercker tree updating module takes the first hash value as a hash value corresponding to a first leaf node and inserts the first leaf node into the first Mercker tree so as to update hash values corresponding to nodes except leaf sub nodes in the first Mercker tree to obtain a second Mercker tree with updated versions, a consensus module further sends the position of the first leaf node in the second Mercker tree, the position of the first transaction, the position of the first leaf node in the second Mercker tree and the hash value corresponding to the root of the second node to a common node for verification, and generating a signature confirmation message after the verification is passed, and sending the first transaction, the second Mercker tree and the first leaf node to the accounting node for corresponding storage at the position of the second Mercker tree by the accounting module under the condition that the received signature confirmation message sent by the consensus node meets a preset consensus strategy. In the embodiment of the invention, when the block chain account book is updated aiming at the first transaction, the update is carried out on the basis of the Mercker tree of the latest version, so that not only is the chain structure of the block chain account book maintained, but also each transaction has the corresponding Mercker tree to verify the reliability of the transaction, and the way improves the security of the transaction on the block chain.
Referring to fig. 8, fig. 8 is a schematic structural diagram of another block chain information storage apparatus according to an embodiment of the present invention, and as shown in the drawing, the service data transfer apparatus 80 includes a processor 801, a memory 802, and a communication interface 803. The processor 801 is connected to the memory 802 and the communication interface 803, for example, the processor 801 may be connected to the memory 802 and the communication interface 803 through a bus.
The processor 801 is configured to support the blockchain information storage device to perform corresponding functions in the blockchain information storage methods described in fig. 2 and 5. The Processor 801 may be a Central Processing Unit (CPU), a Network Processor (NP), a hardware chip, or any combination thereof. The hardware chip may be an Application-Specific Integrated Circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a Field-Programmable Gate Array (FPGA), General Array Logic (GAL), or any combination thereof.
The memory 802 is used for storing program codes and the like. The memory 802 comprises an internal memory that may include at least one of: volatile memory (e.g., Dynamic Random Access Memory (DRAM), Static RAM (SRAM), Synchronous Dynamic RAM (SDRAM), etc.) and non-volatile memory (e.g., one-time programmable read-only memory (OTPROM), Programmable ROM (PROM), Erasable Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM). memory 802 may also include external memory, which may include at least one of a Hard Disk (Hard Disk Drive, HDD) or a Solid-State Drive (SSD), flash drives, such as high-density flash (CF), Secure Digital (SD), micro SD, mini SD, extreme digital (xD), memory sticks, etc.
The communication interface 803 is used for receiving or transmitting data.
The processor 801 may call the program code to perform the following operations:
under the condition that a first transaction is detected, generating a first transaction aiming at the first transaction, and carrying out first hash operation on the first transaction to obtain a first hash value;
obtaining a first Mercker tree of a latest version from Mercker trees of different versions pre-stored aiming at transaction transactions, wherein the first Mercker tree comprises a plurality of nodes, the nodes comprise leaf nodes corresponding to the different transaction transactions, the nodes have hash values corresponding to the nodes, and the hash values corresponding to the leaf nodes are obtained by performing first hash operation on the transaction transactions corresponding to the leaf nodes;
determining the first hash value as a hash value corresponding to a first leaf node, inserting the first leaf node into the first merkel tree, and updating the hash values corresponding to nodes except the leaf node in the first merkel tree to obtain a second merkel tree with an updated version, wherein the second merkel tree comprises a root node;
acquiring the position of the first leaf node in the second Mercker tree, and sending the first transaction, the position of the first leaf node in the second Mercker tree and a hash value corresponding to a root node of the second Mercker tree to a common identification node, so that the common identification node verifies the hash value corresponding to the root node of the second Mercker tree according to the first transaction and the position of the first leaf node in the second Mercker tree, and generates a signature confirmation message after the verification is passed;
and under the condition that the received signature confirmation message sent by the consensus node meets a preset consensus strategy, sending the first transaction, the second Mercker tree and the first leaf node to a billing node at the position of the second Mercker tree, so that the billing node correspondingly stores the first transaction, the second Mercker tree and the first leaf node at the position of the second Mercker tree.
It should be noted that, the implementation of each operation may also correspond to the corresponding description of the method embodiments shown in fig. 2 and fig. 5; the processor 801 may also be used to perform other operations in the above-described method embodiments.
Embodiments of the present invention also provide a computer storage medium storing a computer program, the computer program comprising program instructions, which when executed by a computer, which may be part of the above-mentioned blockchain information storage apparatus, cause the computer to perform the method according to the foregoing embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (10)

1. A method for storing blockchain information, comprising:
under the condition that a first transaction is detected, generating a first transaction aiming at the first transaction, and carrying out first hash operation on the first transaction to obtain a first hash value;
obtaining a first Mercker tree of a latest version from Mercker trees of different versions pre-stored aiming at transaction transactions, wherein the first Mercker tree comprises a plurality of nodes, the nodes comprise leaf nodes corresponding to the different transaction transactions, the nodes have hash values corresponding to the nodes, and the hash values corresponding to the leaf nodes are obtained by performing first hash operation on the transaction transactions corresponding to the leaf nodes;
determining the first hash value as a hash value corresponding to a first leaf node, inserting the first leaf node into the first merkel tree, and updating the hash values corresponding to nodes except the leaf node in the first merkel tree to obtain a second merkel tree with an updated version, wherein the second merkel tree comprises a root node;
acquiring the position of the first leaf node in the second Mercker tree, and sending the first transaction, the position of the first leaf node in the second Mercker tree and a hash value corresponding to a root node of the second Mercker tree to a common identification node, so that the common identification node verifies the hash value corresponding to the root node of the second Mercker tree according to the first transaction and the position of the first leaf node in the second Mercker tree, and generates a signature confirmation message after the verification is passed;
and under the condition that the received signature confirmation message sent by the consensus node meets a preset consensus strategy, sending the first transaction, the second Mercker tree and the first leaf node to a billing node at the position of the second Mercker tree, so that the billing node correspondingly stores the first transaction, the second Mercker tree and the first leaf node at the position of the second Mercker tree.
2. The method according to claim 1, wherein each node in the first merkel tree is distributed in different node layers, wherein a leaf node layer is a node layer located at the lowest layer of the first merkel tree, and the leaf nodes are distributed in the leaf node layer;
the updating the hash value corresponding to each node except the leaf node in the first merkel tree to obtain the second merkel tree with the updated version comprises:
determining the leaf node layer as a target node layer;
determining a hash value corresponding to a node in a node layer above the target node layer through a second hash operation according to the hash value corresponding to each node in the target node layer;
if the node layer above the target node layer is determined to only contain a unique node, finishing the updating of the first Mercker tree, and determining the unique node as the root node of the second Mercker tree;
and if the last node layer of the target node layer contains two or more nodes, determining the last node layer of the target node layer as the target node layer, returning to execute the hash value corresponding to each node in the target node layer, and determining the hash value corresponding to the node in the last node layer of the target node layer through a second hash operation.
3. The method of claim 2, wherein the hash value of the parent node corresponding to each node in the target node layer in the node layer above the target node layer is determined according to the hash value corresponding to each node in the target node layer;
the determining, according to the hash value corresponding to each node in the target node layer, a hash value corresponding to a node in a node layer above the target node layer through a second hash operation includes:
judging whether nodes exist at the rear sides of the nodes at odd-numbered sorting positions in the target node layer or not;
splicing the hash value corresponding to the node with the judgment result of yes in the target node layer with the hash values corresponding to the nodes adjacent to the rear sides of the node, performing second hash operation on the spliced values, and taking the hash value obtained after operation as the hash value of the father node corresponding to the node with the judgment result of yes in the target node layer;
and determining the hash value of the father node corresponding to the node with the negative judgment result through a second hash operation according to the hash value corresponding to the node with the negative judgment result in the target node layer.
4. The method of claim 3, wherein the determining, according to the hash value corresponding to the node with the negative determination result in the target node layer, the hash value of the parent node corresponding to the node with the negative determination result through a second hash operation comprises:
and performing second hash operation on the hash value corresponding to the node with the judgment result of no, and taking the hash value obtained after operation as the hash value of the father node corresponding to the node with the judgment result of no in the target node layer.
5. The method of claim 3, wherein the determining, according to the hash value corresponding to the node with the negative determination result in the target node layer, the hash value of the parent node corresponding to the node with the negative determination result through a second hash operation comprises:
and splicing the hash value corresponding to the node with the judgment result of no with the copy value of the node, performing second hash operation on the spliced value, and taking the hash value obtained after the operation as the hash value of the father node corresponding to the node with the judgment result of no in the target node layer.
6. The method of claim 1, wherein, prior to generating a first transaction for a first transaction if occurrence of the first transaction is detected, further comprising:
generating a second transaction for a second transaction if occurrence of the second transaction is detected;
under the condition that the Mercker tree pre-stored aiming at the transaction does not exist, carrying out first hash operation on the second transaction to obtain a second hash value;
splicing the second hash value with the copy value of the second hash value, and performing second hash operation on the spliced value to obtain a third hash value;
and determining the second hash value as a hash value corresponding to a leaf node of the Mercker tree of the initial version of the transaction, determining the third hash value as a hash value corresponding to a root node of the Mercker tree of the initial version, and establishing the Mercker tree of the initial version.
7. The method of claim 1, further comprising:
under the condition that a read request of a client for the first transaction is received, acquiring the second Mercker tree stored corresponding to the first transaction from a plurality of versions of Mercker trees prestored for the transaction, and the position of the first leaf node stored corresponding to the first transaction in the second Mercker tree;
determining a first verification path from the first leaf node to a root node of the second merkel tree according to the position of the first leaf node in the second merkel tree and the second merkel tree;
obtaining at least one first branch node matched with the first verification path from the second Merck tree;
and responding to the reading request, and returning the first transaction, the hash value corresponding to the root node of the second Mercker tree, the first branch node and the first verification path to the client, so that the client verifies the received first transaction according to the hash value corresponding to the root node of the second Mercker tree and the first verification path.
8. A block chain information storage apparatus, comprising:
the transaction generation module is used for generating a first transaction aiming at the first transaction under the condition that the first transaction is detected to occur, and carrying out first hash operation on the first transaction to obtain a first hash value;
the system comprises a Mercker tree acquisition module, a transaction processing module and a data processing module, wherein the Mercker tree acquisition module is used for acquiring a latest version of a first Mercker tree from different versions of Mercker trees prestored aiming at transaction transactions, the first Mercker tree comprises a plurality of nodes, the nodes comprise leaf nodes corresponding to different transaction transactions, the nodes have hash values corresponding to the nodes, and the hash values corresponding to the leaf nodes are obtained by performing first hash operation on the transaction transactions corresponding to the leaf nodes;
the merkel tree updating module is used for determining the first hash value as a hash value corresponding to a first leaf node, inserting the first leaf node into the first merkel tree, and updating the hash values corresponding to nodes except the leaf node in the first merkel tree to obtain a second merkel tree with an updated version, wherein the second merkel tree comprises a root node;
the consensus module is used for acquiring the position of the first leaf node in the second Mercker tree, and sending the first transaction, the position of the first leaf node in the second Mercker tree and a hash value corresponding to a root node of the second Mercker tree to a consensus node, so that the consensus node verifies the hash value corresponding to the root node of the second Mercker tree according to the first transaction and the position of the first leaf node in the second Mercker tree, and generates a signature confirmation message after the verification is passed;
and the accounting module is used for sending the first transaction, the second Mercker tree and the first leaf node to an accounting node at the position of the second Mercker tree under the condition that the received signature confirmation message sent by the consensus node meets a preset consensus strategy, so that the accounting node correspondingly stores the first transaction, the second Mercker tree and the first leaf node at the position of the second Mercker tree.
9. A blockchain information storage device comprising a processor, a memory and a communication interface, wherein the processor, the memory and the communication interface are connected to each other, wherein the communication interface is configured to receive and transmit data, the memory is configured to store program code, and the processor is configured to call the program code to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executed by a processor to implement the method of any one of claims 1 to 7.
CN201910902073.2A 2019-09-20 2019-09-20 Block chain information storage method and related equipment Active CN110602239B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910902073.2A CN110602239B (en) 2019-09-20 2019-09-20 Block chain information storage method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910902073.2A CN110602239B (en) 2019-09-20 2019-09-20 Block chain information storage method and related equipment

Publications (2)

Publication Number Publication Date
CN110602239A true CN110602239A (en) 2019-12-20
CN110602239B CN110602239B (en) 2023-09-19

Family

ID=68862467

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910902073.2A Active CN110602239B (en) 2019-09-20 2019-09-20 Block chain information storage method and related equipment

Country Status (1)

Country Link
CN (1) CN110602239B (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111125449A (en) * 2019-12-24 2020-05-08 腾讯科技(深圳)有限公司 Object information storage method, device and storage medium
CN111414648A (en) * 2020-03-04 2020-07-14 传神语联网网络科技股份有限公司 Corpus authentication method and apparatus
CN111428277A (en) * 2020-03-20 2020-07-17 中国建设银行股份有限公司 Block chain data verification method, device and system
CN111488611A (en) * 2020-04-08 2020-08-04 北京瑞策科技有限公司 Relation data storage method and device of business data block chain
CN111506658A (en) * 2020-04-17 2020-08-07 腾讯科技(深圳)有限公司 Data processing method and device, first equipment and storage medium
CN111553669A (en) * 2020-04-28 2020-08-18 腾讯科技(深圳)有限公司 Transaction routing method, device and computer readable storage medium
CN111915301A (en) * 2020-08-05 2020-11-10 腾讯科技(深圳)有限公司 Data processing method and device based on block chain, electronic equipment and readable medium
CN112348518A (en) * 2020-10-15 2021-02-09 深圳前海微众银行股份有限公司 Block chain transaction certification method and device
CN112380209A (en) * 2020-10-29 2021-02-19 华东师范大学 Block chain multi-channel state data-oriented structure tree aggregation method
CN112559518A (en) * 2020-12-10 2021-03-26 杭州趣链科技有限公司 Merck tree updating method, terminal device and storage medium
CN112579602A (en) * 2020-12-22 2021-03-30 杭州趣链科技有限公司 Multi-version data storage method and device, computer equipment and storage medium
CN113657900A (en) * 2021-07-13 2021-11-16 中国人民银行数字货币研究所 Cross-chain transaction verification method and system and cross-chain transaction system
CN113794558A (en) * 2021-09-16 2021-12-14 烽火通信科技股份有限公司 L-tree calculation method, device and system in XMSS algorithm
CN114254395A (en) * 2022-03-01 2022-03-29 南开大学 Content distribution-oriented consensus forming method for autonomous network
CN114499872A (en) * 2021-12-24 2022-05-13 山东浪潮工业互联网产业股份有限公司 Industrial internet-based star fire chain cross-linking method and equipment
CN114745131A (en) * 2022-04-06 2022-07-12 广东钜联信息科技有限公司 PBFT (basis weight function) improved consensus algorithm of block chain

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108711052A (en) * 2018-05-18 2018-10-26 电子科技大学 A kind of information authentication system based on block chain
CN109409889A (en) * 2018-11-13 2019-03-01 杭州秘猿科技有限公司 A kind of block in block chain determines method, apparatus and electronic equipment
WO2019093574A1 (en) * 2017-11-10 2019-05-16 부산대학교 산학협력단 Block chain system and method employing hash-based signature scheme
CN110175840A (en) * 2019-04-19 2019-08-27 华中科技大学 Method, client, alliance's chain and the system of light wallet mechanism are realized in alliance's chain
CN110175188A (en) * 2019-05-31 2019-08-27 杭州复杂美科技有限公司 A kind of block chain state data buffer storage and querying method, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019093574A1 (en) * 2017-11-10 2019-05-16 부산대학교 산학협력단 Block chain system and method employing hash-based signature scheme
CN108711052A (en) * 2018-05-18 2018-10-26 电子科技大学 A kind of information authentication system based on block chain
CN109409889A (en) * 2018-11-13 2019-03-01 杭州秘猿科技有限公司 A kind of block in block chain determines method, apparatus and electronic equipment
CN110175840A (en) * 2019-04-19 2019-08-27 华中科技大学 Method, client, alliance's chain and the system of light wallet mechanism are realized in alliance's chain
CN110175188A (en) * 2019-05-31 2019-08-27 杭州复杂美科技有限公司 A kind of block chain state data buffer storage and querying method, equipment and storage medium

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111125449A (en) * 2019-12-24 2020-05-08 腾讯科技(深圳)有限公司 Object information storage method, device and storage medium
CN111414648A (en) * 2020-03-04 2020-07-14 传神语联网网络科技股份有限公司 Corpus authentication method and apparatus
CN111414648B (en) * 2020-03-04 2023-05-12 传神语联网网络科技股份有限公司 Corpus authentication method and device
CN111428277A (en) * 2020-03-20 2020-07-17 中国建设银行股份有限公司 Block chain data verification method, device and system
CN111428277B (en) * 2020-03-20 2023-08-18 中国建设银行股份有限公司 Block chain data verification method, device and system
CN111488611A (en) * 2020-04-08 2020-08-04 北京瑞策科技有限公司 Relation data storage method and device of business data block chain
CN111506658A (en) * 2020-04-17 2020-08-07 腾讯科技(深圳)有限公司 Data processing method and device, first equipment and storage medium
CN111553669B (en) * 2020-04-28 2021-09-10 腾讯科技(深圳)有限公司 Transaction routing method, device and computer readable storage medium
CN111553669A (en) * 2020-04-28 2020-08-18 腾讯科技(深圳)有限公司 Transaction routing method, device and computer readable storage medium
CN111915301A (en) * 2020-08-05 2020-11-10 腾讯科技(深圳)有限公司 Data processing method and device based on block chain, electronic equipment and readable medium
CN112348518B (en) * 2020-10-15 2022-09-16 深圳前海微众银行股份有限公司 Block chain transaction certification method and device
CN112348518A (en) * 2020-10-15 2021-02-09 深圳前海微众银行股份有限公司 Block chain transaction certification method and device
CN112380209A (en) * 2020-10-29 2021-02-19 华东师范大学 Block chain multi-channel state data-oriented structure tree aggregation method
CN112559518A (en) * 2020-12-10 2021-03-26 杭州趣链科技有限公司 Merck tree updating method, terminal device and storage medium
CN112579602A (en) * 2020-12-22 2021-03-30 杭州趣链科技有限公司 Multi-version data storage method and device, computer equipment and storage medium
CN113657900A (en) * 2021-07-13 2021-11-16 中国人民银行数字货币研究所 Cross-chain transaction verification method and system and cross-chain transaction system
CN113657900B (en) * 2021-07-13 2024-03-22 中国人民银行数字货币研究所 Cross-chain transaction verification method and system and cross-chain transaction system
CN113794558B (en) * 2021-09-16 2024-02-27 烽火通信科技股份有限公司 L-tree calculation method, device and system in XMS algorithm
CN113794558A (en) * 2021-09-16 2021-12-14 烽火通信科技股份有限公司 L-tree calculation method, device and system in XMSS algorithm
CN114499872B (en) * 2021-12-24 2024-05-28 浪潮工业互联网股份有限公司 Starfire chain crossing method and device based on industrial Internet
CN114499872A (en) * 2021-12-24 2022-05-13 山东浪潮工业互联网产业股份有限公司 Industrial internet-based star fire chain cross-linking method and equipment
CN114254395A (en) * 2022-03-01 2022-03-29 南开大学 Content distribution-oriented consensus forming method for autonomous network
CN114254395B (en) * 2022-03-01 2022-05-06 南开大学 Content-publishing-oriented consensus formation method for autonomous network
CN114745131A (en) * 2022-04-06 2022-07-12 广东钜联信息科技有限公司 PBFT (basis weight function) improved consensus algorithm of block chain

Also Published As

Publication number Publication date
CN110602239B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
CN110602239A (en) Block chain information storage method and related equipment
CN113329031B (en) Method and device for generating state tree of block
EP3678346B1 (en) Blockchain smart contract verification method and apparatus, and storage medium
JP7126174B2 (en) Verification system and method for collaboration of blockchain and off-chain devices
CN110599346B (en) Block chain information acquisition method and related equipment
CN110599174B (en) Block chain information processing method and related equipment
CN108710681B (en) File acquisition method, device, equipment and storage medium
JP7279904B2 (en) Chain data verification system and method
CN110597918B (en) Account management method, account management device and computer readable storage medium
CN111314172B (en) Block chain-based data processing method, device, equipment and storage medium
CN108388438B (en) System base table updating method and device, computer equipment and storage medium
CN106650496B (en) Data processing method and device
CN110599267B (en) Electronic invoice issuing method and device, computer readable storage medium and computer equipment
EP3739493A1 (en) File verification method, file verification system and file verification server
CN109101232B (en) Method, device, computer equipment and storage medium for product development
CN109254956B (en) Data downloading method and device and electronic equipment
CN111432009B (en) Method and device for synchronizing block chain data, electronic equipment and storage medium
CN111010282A (en) Information processing method based on block chain and related device
CN115134069A (en) Block chain editing method and block chain link point
CN111489156A (en) Transaction method based on block chain, electronic device and readable storage medium
CN113961908B (en) Data storage method and device, computer equipment and storage medium
CN113362068B (en) Method for verifying block chain state transfer by light node
CN109858285B (en) Block chain data processing method, device, equipment and medium
CN110569240B (en) Data storage method and device, computer equipment and storage medium
CN110597822A (en) Information searching method and device in block chain, storage medium and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant