CN115455460A - Data storage method, device, equipment and medium based on block chain - Google Patents

Data storage method, device, equipment and medium based on block chain Download PDF

Info

Publication number
CN115455460A
CN115455460A CN202110640018.8A CN202110640018A CN115455460A CN 115455460 A CN115455460 A CN 115455460A CN 202110640018 A CN202110640018 A CN 202110640018A CN 115455460 A CN115455460 A CN 115455460A
Authority
CN
China
Prior art keywords
consensus
block
target
service
chain
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.)
Pending
Application number
CN202110640018.8A
Other languages
Chinese (zh)
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 CN202110640018.8A priority Critical patent/CN115455460A/en
Publication of CN115455460A publication Critical patent/CN115455460A/en
Pending legal-status Critical Current

Links

Images

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/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Computer Security & Cryptography (AREA)
  • General Business, Economics & Management (AREA)
  • Finance (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Databases & Information Systems (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Marketing (AREA)
  • Medical Informatics (AREA)
  • Economics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a data storage method, a device, equipment and a medium based on a block chain, wherein the method comprises the following steps: acquiring a target consensus chain waiting for consensus in a block chain network, wherein the target consensus chain is the longest chain in at least one consensus chain; selecting a target consensus to-be-selected block from the target consensus chain, wherein the target consensus to-be-selected block is a consensus to-be-selected block at a target position on the target consensus chain; carrying out consensus verification on the target consensus candidate blocks; and if the target consensus candidate block successfully passes the consensus verification of the consensus committee, determining the target consensus candidate block as a final block, and storing the final block into the block chain. In the embodiment of the application, a safe and effective consensus scheme is designed in the process of data storage through the block chain, and the aims of centralized supervision and centralized management of service data can be realized on the basis of ensuring that the block chain can not be tampered.

Description

Data storage method, device, equipment and medium based on block chain
Technical Field
The present application relates to the field of computer technologies, and in particular, to the field of artificial intelligence, and more particularly, to a data storage method based on a block chain, a data storage apparatus based on a block chain, a data storage device based on a block chain, and a computer-readable storage medium.
Background
With the rapid development of computer technology, the blockchain technology gradually receives attention from users, and more users or enterprises select to store data to the blockchain to prevent the data from being tampered. The consensus is the basis of the blockchain technology, and the consensus refers to that a node in a blockchain network performs consensus verification on a newly generated block through a consensus algorithm, and the block is uplinked to the blockchain when the consensus verification is successful so as to store block data to the blockchain; the new block cannot be uplink to the blockchain if the consensus check fails. Therefore, how to realize safe and effective consensus in the process of data storage through the block chain is an important research topic.
Disclosure of Invention
The embodiment of the application provides a data storage method, a device, equipment and a medium based on a block chain, wherein a safe and effective consensus scheme is designed in the process of data storage through the block chain, and the aims of centralized supervision and centralized management of service data can be achieved on the basis of ensuring that the block chain cannot be tampered.
On one hand, the embodiment of the application provides a data storage method based on a block chain, wherein the block chain is located in a block chain network, the block chain network comprises a witness sub-network and a consensus sub-network, and the witness sub-network comprises at least one service node; the consensus sub-network comprises N consensus clusters and supervision nodes, wherein N is an integer greater than 1; each consensus cluster consists of a plurality of accounting nodes, and each consensus cluster elects one accounting node in the respective consensus cluster as a representative node; n consensus committees of block chains consisting of the representative nodes; the data storage method is executed by a target representative node in the consensus committee, wherein the target representative node is any representative node in the consensus committee; the data storage method comprises the following steps:
acquiring a target consensus chain waiting for consensus in a block chain network, wherein the block chain network comprises at least one consensus chain to be consensus, each consensus chain is formed by sequentially linking one or more consensus candidate blocks, and each consensus candidate block is a block inspected by a monitoring node; the target consensus strand is the longest strand of the at least one consensus strand;
selecting a target consensus to-be-selected block from the target consensus chain, wherein the target consensus to-be-selected block is a consensus to-be-selected block at a target position on the target consensus chain;
carrying out consensus verification on the target consensus to-be-selected block;
and if the target consensus candidate block successfully passes the consensus verification of the consensus committee, determining the target consensus candidate block as a final block, and storing the final block into the block chain.
In the embodiment of the application, a target consensus chain can be obtained from at least one consensus chain waiting for consensus in a blockchain network, where the target consensus chain is the longest chain in the at least one consensus chain; the consensus candidate blocks on the at least one consensus chain are all blocks which are examined by the monitoring node; the design ensures that only the block examined by the monitoring node can be executed with consensus processing, so that the service data in the block can be ensured to be centrally monitored and managed, the privacy of the service data in the block can be protected, and the safety is effectively improved. In addition, a target consensus to-be-selected block at a target position in the target consensus chain is selected for consensus, and the target consensus to-be-selected block is determined as a final block after the consensus verification is successful and is linked to the block chain; the process can orderly store the blocks proposed by the multiple common recognition clusters in the block chain network to the block chain, effectively maintains the data uplink process under the scene of the multiple common recognition clusters, and further improves the operation efficiency of the block chain network.
On one hand, the embodiment of the application provides a data storage method based on a block chain, wherein the block chain is located in a block chain network, the block chain network comprises a witness sub-network and a consensus sub-network, and the witness sub-network comprises at least one service node; the consensus sub-network comprises N consensus clusters and monitoring nodes, wherein N is an integer greater than 1; each consensus cluster consists of a plurality of accounting nodes, and each consensus cluster elects one accounting node in the respective consensus cluster as a representative node; n consensus committees of block chains consisting of the representative nodes; any representative node in the consensus committee is represented as a target representative node, and the data storage method is executed by the supervisory node; the data storage method comprises the following steps:
determining a target service block to be processed submitted by a target representative node from a consensus tree of a block chain;
examining a target service block to be processed;
if the examination is passed, extracting service data from a target service block to be processed;
carrying out signature processing on the extracted target service block to be processed to generate a target consensus block to be selected;
and updating the target service block to be processed into a target consensus candidate block on a consensus tree of the block chain so that a consensus committee performs consensus verification on the target consensus candidate block, wherein if the target consensus candidate block is a block at a target position on the target consensus chain in the block chain network, the consensus committee takes the target consensus candidate block as a final block and stores the final block into the block chain when the target consensus candidate block successfully passes the consensus verification of the consensus committee.
In the embodiment of the application, the target service block to be processed can be obtained, and the service data is extracted from the target service block to be processed for storage after the target service block to be processed is checked to be passed, so that the centralized storage and management of the service data in the block chain network can be realized, the privacy of the service data is improved, and the storage resource of the consensus node is also saved; and after extracting the service data of the target service block to be processed, signing the target service block to be processed to update the signed target service block to be a target consensus candidate block, so that the subsequent representative node can quickly verify the validity of the target consensus candidate block by verifying the signature of the supervision node, and further improve the consensus efficiency of the block chain network.
In another aspect, an embodiment of the present application provides a data storage device based on a blockchain, where the blockchain is located in a blockchain network, the blockchain network includes a witness sub-network and a consensus sub-network, and the witness sub-network includes at least one service node; the consensus sub-network comprises N consensus clusters and supervision nodes, wherein N is an integer greater than 1; each consensus cluster consists of a plurality of accounting nodes, and each consensus cluster elects one accounting node as a representative node in the respective consensus cluster; n consensus committees representing the chains of blocks formed by the nodes; the data storage device is mounted on a target representative node, wherein the target representative node is any one representative node in the consensus committee; the data storage device includes:
the block chain network comprises at least one consensus chain to be identified, each consensus chain is formed by sequentially linking one or more consensus blocks to be selected, and each consensus block to be selected is a block examined by a monitoring node; the target consensus strand is the longest strand of the at least one consensus strand;
the processing unit is used for selecting a target consensus to-be-selected block from the target consensus chain, wherein the target consensus to-be-selected block is a consensus to-be-selected block at a target position on the target consensus chain;
the processing unit is also used for carrying out consensus verification on the target consensus to-be-selected block;
and the processing unit is further used for determining the target consensus candidate block as a final block and storing the final block into the block chain if the target consensus candidate block successfully passes the consensus verification of the consensus committee.
In one implementation, the target consensus to-be-selected block is obtained by converting a target service block to be processed; a processing unit further to:
and submitting the target service block to be processed to the consensus tree of the block chain, triggering the supervision node to examine the target service block to be processed on the consensus tree, and processing the target service block to be processed into a target consensus block to be selected by the supervision node after the examination is passed.
In one implementation, the processing unit is further configured to:
when a target consensus cluster to which a target representative node belongs receives a data storage request of a service node, generating a service block according to service data carried in the data storage request;
performing consensus verification on the service blocks in the target consensus cluster;
and if the service block successfully passes the consensus verification of the target consensus cluster, determining the service block as the target service block to be processed.
In one implementation, the processing unit is further configured to:
if the target consensus to-be-selected block successfully passes the consensus verification of the consensus committee, screening out a consensus chain which is forked based on the target consensus to-be-selected block from at least one consensus chain;
and pruning all the consensus chains except the screened forked consensus chain in at least one consensus chain.
In one implementation, the pruning process includes: deleting the consensus blocks to be selected on the pruned consensus chain from the consensus tree of the block chain; and (c) a second step of,
and returning the deleted common identification candidate blocks to the corresponding representative nodes.
In one implementation, the target consensus candidate block includes: the signature of the transaction hash value, the Mercker tree root and the supervision node; when the processing unit performs consensus verification on the target consensus candidate block, the processing unit is specifically configured to:
performing consensus verification on the content contained in the target consensus block to be selected to obtain a consensus verification result;
broadcasting the consensus verification result to other representative nodes in the consensus committee;
and if the number of representative nodes successfully identified to the content contained in the target block to be identified in the consensus committee is greater than the number threshold, determining the consensus verification of the target block to be identified in the consensus committee.
In one implementation, the processing unit is further configured to:
obtaining auction information of a target consensus cluster to which a target representative node belongs, wherein the auction information is used for indicating the proposal authority of the target consensus cluster requesting for auction block chains;
in the process that the consensus committee performs consensus verification on the target consensus blocks, the consensus verification result of the target representative node on the target consensus blocks is broadcasted to other representative nodes of the consensus committee, and the consensus verification result carries auction information, so that the consensus committee determines acquirers of proposal authority of the block chain based on the auction information.
In one implementation, the processing unit is further configured to:
if the target service block to be processed on the consensus tree does not pass the examination of the supervision node, deleting the target service block to be processed from the consensus tree of the block chain;
if the common identification tree also comprises other service blocks to be processed which are linked with the target service block to be processed, deleting the other service blocks to be processed from the common identification tree of the block chain, and returning the deleted other service blocks to be processed to the corresponding representative node.
In this embodiment of the present application, the obtaining unit may obtain a target consensus chain from at least one consensus chain waiting for consensus in a blockchain network, where the target consensus chain is a longest chain in the at least one consensus chain; the common-recognition blocks to be selected on the at least one common-recognition chain are all blocks which are examined by the supervision node; the design ensures that only the blocks examined by the supervision node can be subjected to consensus processing, so that the service data in the blocks can be ensured to be subjected to centralized supervision and centralized management, the privacy of the service data in the blocks can be protected, and the safety is effectively improved. In addition, the processing unit may select a target co-recognition candidate block at a target position in the target co-recognition chain for co-recognition, and after the co-recognition verification is successful, determine the target co-recognition candidate block as a final block and uplink the final block to the block chain; the process can orderly store the blocks proposed by the multiple common recognition clusters in the block chain network to the block chain, effectively maintains the data uplink process under the scene of the multiple common recognition clusters, and further improves the operation efficiency of the block chain network.
In another aspect, an embodiment of the present application provides a data storage device based on a blockchain, where the blockchain is located in a blockchain network, the blockchain network includes a witness sub-network and a consensus sub-network, and the witness sub-network includes at least one service node; the consensus sub-network comprises N consensus clusters and supervision nodes, wherein N is an integer greater than 1; each consensus cluster consists of a plurality of accounting nodes, and each consensus cluster elects one accounting node as a representative node in the respective consensus cluster; n consensus committees of block chains consisting of the representative nodes; any representative node in the consensus committee is represented as a target representative node, and the data storage device is mounted on the supervision node; the data storage device includes:
the processing unit is used for determining a target service block to be processed submitted by a target representative node from a consensus tree of the block chain;
examining a target service block to be processed;
if the examination is passed, extracting service data from a target service block to be processed;
performing signature processing on the extracted target service block to be processed to generate a target consensus block to be selected;
and updating the target service block to be processed into a target consensus candidate block on a consensus tree of the block chain so that a consensus committee performs consensus verification on the target consensus candidate block, wherein if the target consensus candidate block is a block at a target position on the target consensus chain in the block chain network, the consensus committee takes the target consensus candidate block as a final block and stores the final block into the block chain when the target consensus candidate block successfully passes the consensus verification of the consensus committee.
In one implementation, the processing unit is further configured to:
if the service data contained in the target service block to be processed is successfully backed up in one or more data storage devices, triggering the step of carrying out signature processing on the extracted target service block to be processed to generate a target consensus block to be selected.
In one implementation, a data storage device includes one or more of N delegate nodes; alternatively, the data storage device comprises a storage device in a database;
the database comprises a public database of the block chain or a private database matched with the service type of the target service block to be processed.
In one implementation, the processing unit is further configured to:
when a data acquisition request sent by a service node is received, acquiring the address of data storage equipment where the requested service data is located;
and returning the address to the service node, so that the service node acquires the service data from the data storage equipment according to the address.
In the embodiment of the application, the processing unit can acquire the target service block to be processed, and extract the service data from the target service block to be processed for storage after the target service block to be processed is examined, so that the centralized storage and management of the service data in the block chain network can be realized, and the storage resources of the consensus node can be further saved; and after extracting the service data of the target service block to be processed, signing the target service block to be processed to update the signed target service block to be a target consensus candidate block, so that the subsequent representative node can quickly verify the validity of the target consensus candidate block by verifying the signature of the supervision node, and further improve the consensus efficiency of the block chain network.
In one aspect, the present application provides a data storage device based on a block chain, where the device includes:
a processor for loading and executing a computer program;
a computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, implements the above-mentioned blockchain-based data storage method.
In one aspect, the present application provides a computer-readable storage medium storing a computer program adapted to be loaded by a processor and to perform the above-mentioned blockchain-based data storage method.
In one aspect, the present application provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the data storage device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to execute the above-mentioned blockchain-based data storage method.
In the embodiment of the application, a target consensus chain can be obtained from at least one consensus chain waiting for consensus in a blockchain network, where the target consensus chain is the longest chain in the at least one consensus chain; the consensus candidate blocks on the at least one consensus chain are all blocks which are examined by the monitoring node; the design ensures that only the block examined by the monitoring node can be executed with consensus processing, so that the service data in the block can be ensured to be centrally monitored and managed, the privacy of the service data in the block can be protected, and the safety is effectively improved. In addition, a target consensus candidate block at a target position in the target consensus chain is selected for consensus, and the target consensus candidate block is determined as a final block after the consensus verification is successful and is linked to the block chain; the process can orderly store the blocks proposed by the multiple common recognition clusters in the block chain network to the block chain, effectively maintains the data uplink process under the scene of the multiple common recognition clusters, and further improves the operation efficiency of the block chain network.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1a is a block diagram illustrating an architecture of a data sharing system according to an exemplary embodiment of the present application;
fig. 1b is a schematic diagram illustrating a block chain according to an exemplary embodiment of the present application;
FIG. 1c is a schematic diagram illustrating a process for generating a tile according to an exemplary embodiment of the present application;
FIG. 1d illustrates an architectural diagram of a two-tier network provided by an exemplary embodiment of the present application;
FIG. 1e is a schematic diagram illustrating an architecture of a two-tier network according to an exemplary embodiment of the present application;
fig. 1f is a schematic diagram illustrating a scenario in which a consensus sub-network includes N consensus clusters according to an exemplary embodiment of the present application;
FIG. 1g illustrates a scene architecture diagram of a two-tier network-based electronic invoice service provided by an exemplary embodiment of the present application;
FIG. 1h is a diagram illustrating a scenario of a data storage scheme provided by an exemplary embodiment of the present application;
FIG. 1i is a diagram illustrating block types of a block during different time periods according to an exemplary embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for block chain based data storage according to an exemplary embodiment of the present application;
fig. 3 is a schematic flowchart illustrating another data storage method based on block chains according to an exemplary embodiment of the present application;
fig. 4 is a schematic flowchart illustrating another data storage method based on block chains according to an exemplary embodiment of the present application;
FIG. 5 is a block chain-based data storage device according to an exemplary embodiment of the present application;
FIG. 6 illustrates a block chain based data storage device according to an exemplary embodiment of the present application;
fig. 7 is a schematic structural diagram of another block chain-based data storage device according to an exemplary embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
The embodiments of the present application relate to a blockchain technology, and the following briefly introduces terms and concepts related to the blockchain technology:
the block chain (Blockchain) is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. It is essentially a decentralized database, a string of data blocks generated by using cryptographic method, each data block contains information of a batch of network transaction, and is used to verify the validity (anti-counterfeiting) of the information and generate the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The blockchain network may be understood as a data sharing system 100, and the data sharing system 100 may refer to a system for performing data sharing between nodes, and an exemplary structure of the data sharing system 100 may be shown in fig. 1a; as shown in fig. 1a, the data sharing system 100 refers to a system for performing data sharing between nodes, the data sharing system may include a plurality of nodes 101, and the plurality of nodes 101 may refer to respective clients in the data sharing system. Each node 101 may receive input information while operating normally and maintain shared data within the data sharing system based on the received input information. In order to ensure information intercommunication in the data sharing system, information connection can exist between each node in the data sharing system, and information transmission can be carried out between the nodes through the information connection. For example, when any node in the data sharing system receives input information, other nodes in the data sharing system acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored on all nodes in the data sharing system are consistent.
Each node in the data sharing system has a node identifier corresponding thereto, and each node in the data sharing system may store a node identifier of another node in the data sharing system, so that the generated block is broadcast to the other node in the data sharing system according to the node identifier of the other node in the following. Each node can maintain a node identification list as shown in the following table, and the node name and the node identification are correspondingly stored in the node identification list. The node identifier may be an IP (Internet Protocol ) address and any other information that can be used to identify the node; for example, the identifier of the node may also be a binary sequence code (e.g. 110001110), which is only illustrated by taking an IP address as an example in table 1:
TABLE 1
Node name Node identification
Node 1 117.114.151.174
Node 2 117.116.189.145
Node X (X isPositive integer number) xx.xxx.xxx.xxx
Each node in the data sharing system stores one identical blockchain. The block chain is composed of a plurality of blocks, referring to fig. 1b, the block chain is composed of a plurality of blocks, the starting block includes a block header and a block main body, the block header stores an input information characteristic value, a version number, a timestamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and so on, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured.
When each block in the block chain is generated, referring to fig. 1c, when the node where the block chain is located receives the input information, the input information is verified, after the verification is completed, the input information is stored in the memory pool, and the hash tree for recording the input information is updated; and then, updating the updating time stamp to the time when the input information is received, trying different random numbers, and calculating the characteristic value for multiple times, so that the calculated characteristic value can meet the following formula:
SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
wherein, SHA256 is a characteristic value algorithm used for calculating a characteristic value; version (version number) is version information of related block protocols in the block chain; prev _ hash is a block head characteristic value of a parent block of the current block; merkle _ root is a characteristic value of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, is a fixed value within a period of time, and is determined again after exceeding a fixed time period; x is a random number; TARGET is a feature threshold, which can be determined from nbits.
Therefore, when the random number meeting the formula is obtained through calculation, the information can be correspondingly stored, and the block head and the block main body are generated to obtain the current block. And then, the node where the block chain is located broadcasts the newly generated block to other nodes in the data sharing system where the newly generated block is located according to the node identifications of the other nodes in the data sharing system, the other nodes perform consensus check on the newly generated block, and the newly generated block is added to the block chain stored by the newly generated block after the consensus check is completed. Wherein, the node may perform consensus check on the newly generated block through a consensus algorithm, which may include but is not limited to:
1) Pow (Proof-of-Work, proof of Work):
workload certification refers to a metric set by a system (such as the aforementioned data sharing system) to achieve a certain goal. A simple understanding is a proof to confirm the workload. Who does much work by nature, who has a better chance of receiving additional rewards. The workload proves is commonly called 'mining', a random number meeting the rule is calculated through AND-OR operation, the accounting right of the time is obtained, data needing to be recorded in the current round are sent out, and the data are stored together after being verified by other nodes in the block chain network. This makes the workload prove to have the following advantages: and the centralization is completely removed, and the nodes freely enter and exit.
2) Pos (proof-of-stop, proof of rights):
the Pos entitlement certificate is an upgrade consensus mechanism for the Pow workload certificate; specifically, the longer who holds the electronic resource (the time length of holding the electronic resource = the number of holding the electronic resource vs. the time of holding the electronic resource), the more chance that he will obtain the billing right of the block, where the electronic resource may be a resource that is stored in an electronic account in an electronic form and can be circulated through the internet; according to the proportion and time of each node in the electronic resource; the ore excavation difficulty is reduced in an equal proportion, so that the speed of finding the random number is increased. Pos equity proves that the time for consensus to be achieved is somewhat shortened, but that mining is still required.
3) DPos (trusted Proof of title) share authorization mechanism:
the DPos equity proof mechanism is similar to the voting of board of directors, where people holding electronic resources cast a certain number of nodes and proxy them for verification and billing. To incentivize more people and elections, the system generates a small amount of electronic resources as rewards. The DPos shares proof of authority mechanism is to have each person holding a bit share vote, thus generating a 101-bit representation, which we can understand as 101 super nodes or pools, and the rights of the 101 super nodes are completely equal to each other. From a certain point of view, the DPos stock certification mechanism is somewhat like a conference system or a human representative congress system. If the selected representatives are unable to perform their duties (no blocks are generated when their turn is in), then the representatives are renamed and the network selects a new supernode to replace them. This enables the DPos share proof of authority mechanism to reduce the number of participating authentication and accounting nodes greatly, which can achieve second-level consensus authentication, but the whole consensus mechanism still depends on electronic resources.
4) pbft (Practical Byzantine Fault Tolerance algorithm):
the pbft byzantine fault tolerance algorithm is a message-passing based consensus algorithm that achieves agreement through three stages, which may be repeated due to failure. Specifically, assuming that the total number of nodes is 3f +1, and f is a Byzantine error node, first, when a node finds a leader (such as a representative node, a billing node or a super node) as a malicious node, other replica (nodes) are selected as the leader through an algorithm. Second, the leader broadcasts the value it selects to other replica nodes via pre-prepare messages, which send prepare messages if accepted and do not send if not accepted. Second, once the 2f nodes accept the preamble message, the nodes send a commit message. Finally, when 2f +1 nodes accept the commit message, the value is determined. The process enables the pbft Byzantine fault-tolerant algorithm to be capable of recognizing that each node is composed of a service participant or a monitoring party, and the safety and the stability are guaranteed by a service relevant party; moreover, the consensus time delay is about 2-5 seconds, the requirement of commercial real-time processing is basically met, the consensus efficiency is improved, and the requirement of high-frequency trading volume can be met.
5) Paxos (a distributed algorithm) algorithm:
the Paxos algorithm is a two-stage algorithm, mainly having three types of roles, proposer, acceptor, leaner. The proposer proposes an agreement, the accept agrees or refuses, and the learner obtains the final value after reaching the consensus. The Paxos algorithm includes two phases, respectively: (1) a preparation stage: the promoter selects a proposal number n and sends a prepare request to a majority of the acceptors; after the acceptor receives the prefix request, if the number of the proposal is larger than all the prefix requests which the acceptor already replies, the acceptor replies the proposal which is accepted last time to the promoter and commits that the proposal which is smaller than n is not replied any more. (2) An approval phase: when a promoter receives the reply of a plurality of acceptors to the prepare request, entering an approval stage; it is to send an accept request to the acceptors that reply to the prepare request, including the number n and value (if there is no value already accepted, it is free to decide value); on the premise of not violating the promise of the register to other processors, the register receives the accept request after receiving the accept request.
The Paxos algorithm is suitable for a simple fault-tolerant model, namely, only failure or fault nodes possibly exist in the system, and malicious nodes do not exist, and if the number of the failure nodes is x (x is a positive integer), the normal work of the system can be maintained only by setting the number of the non-failure nodes to be x + 1.
6) The Raft (a distributed consensus algorithm) algorithm:
the Raft algorithm comprises three roles, which are respectively: follower (follower), candidate (candidate) and leader (leader). A node can only be in one of the three states at a time, and the three roles can be mutually converted along with the change of time and conditions. All nodes are all in a blog initial state, the blog which does not receive the heartbeat packet after time out changes the avatar candidate and broadcasts a voting request, the nodes which obtain most votes change the avatar leader, the voting process is that who sends out the leader first, and each node only gives a vote. The leader node periodically sends heartbeat packets to other nodes, and a new polling process is triggered when the leader node fails.
In practical applications, when the blockchain is applied in some scenarios, for example: a ticket business scenario, a data storage scenario of a government or commercial institution, or the like; in these scenarios, not all nodes in the blockchain network have sufficient resources and the necessity to become nodes participating in blockchain consensus. For the safety of data, when related data of personal privacy or national safety is involved in the blockchain system, the common data peer-to-peer blockchain deployment mode is not applicable. In order to adapt to service requirements (such as internal and external networks, service networks, office network partitions, and the like) and further improve the security and confidentiality of data, the embodiment of the present application provides a dual-layer chain, which forms a "witness sub-network-consensus sub-network" dual-layer network architecture through a P2P (Peer to Peer) network, where the P2P network is a Peer-to-Peer connected network, and each node of the Peer-to-Peer connection is called a Peer node. The P2P network is based on a specific network protocol, so that a central node is not needed between peer nodes to maintain the network state, and each node maintains the node state of the whole network and the connection state of the node with the adjacent node through broadcast interaction with the adjacent node.
FIG. 1d illustrates an architecture diagram of a two-layer network provided by an exemplary embodiment of the present application; as shown in fig. 1d, the blockchain network includes a witness sub-network and a consensus sub-network, the service node is deployed in the witness sub-network in the public network, and the consensus sub-network is deployed with a billing node for running a blockchain consensus protocol; the witness subnetwork and the consensus subnetwork interact across routing boundaries. The service node in the witness sub-network mainly executes service execution, does not participate in accounting consensus, and obtains block header data and part of authorization visible block data from the consensus sub-network in an identity authentication mode. The consensus sub-network is a core network in the blockchain network and is used for performing accounting consensus on the blockchain network. Generally, the witness sub-network and the consensus sub-network are in different network environments, the witness sub-network being in a public network and the consensus sub-network being in a private network. Since the consensus sub-network is in the relatively secure private network, the mutual access of the consensus sub-network ensures the security by the consensus mechanism, and the identity management and the network control do not need to be added additionally. The service node is in the public network and may be accessed by other uncertain network terminals, so that the access behavior of the service node and other possible nodes to the consensus sub-network needs to be strictly controlled.
In a possible implementation, the accounting nodes in the consensus sub-network may be further divided into a plurality of consensus clusters, that is, a plurality of consensus clusters may be deployed in the consensus sub-network, and each consensus cluster may include at least one accounting node. The consensus clusters may be partitioned according to different rules, which may include: according to the service type division, for example, accounting nodes for processing service data of the same service type are divided into the same consensus cluster; for another example, the consensus cluster is divided according to the distance between the accounting nodes, such as dividing two or more accounting nodes with the distance smaller than the threshold value of the distance into the same consensus cluster, and so on. In this implementation, the architecture of the two-layer blockchain network may be changed to fig. 1e, as shown in fig. 1e, the blockchain network includes an witness sub-network and a consensus sub-network, where a plurality of consensus clusters are deployed in the consensus sub-network, and each consensus cluster includes at least one accounting node; any service node in the witness sub-network can be in information connection with an accounting node deployed by a certain consensus cluster in the consensus sub-network. Assuming that the consensus clusters shown in fig. 1e are divided by traffic type, each consensus cluster may be used to provide consensus services for traffic data of one or more traffic types. For example: the consensus cluster 1 in fig. 1e may be a cluster dedicated to providing consensus services for the invoice type of business data, i.e. each accounting node in the consensus cluster 1 performs consensus processing only on the invoice data; the consensus cluster 2 may be a cluster providing consensus service for the service data of the credit investigation service type, that is, each accounting node in the consensus cluster 2 performs consensus processing only on the service data related to the credit investigation; and so on.
In the architecture shown in fig. 1e, each consensus cluster commonly maintains one blockchain in the blockchain network, called the main chain, which contains all the information of all the traffic ecology in the blockchain network. And the service subchain of the self service can be organized in each common identification cluster, and the service subchain in each common identification cluster only contains the information of the self service of each common identification cluster. Each common recognition cluster can promote an accounting node in the common recognition cluster as a representative node; the representative node participates in the consensus processing of the service subchain in the consensus cluster to which the representative node belongs and also participates in the consensus processing of the main chain. And the non-representative nodes in the consensus cluster, namely other accounting nodes except the representative nodes in the consensus cluster, only participate in the consensus processing of the service subchain in the consensus cluster. In the consensus sub-network, the representative nodes deduced by each consensus cluster jointly form a consensus committee of the main chain, and the main chain is subjected to consensus processing jointly.
To describe the implementation manner of maintaining the service data of the consensus clusters included in the consensus sub-network in more detail, the following briefly introduces a process of maintaining the service data of N consensus clusters included in the consensus sub-network with reference to fig. 1f, where N is an integer greater than 1. As shown in fig. 1f, each consensus cluster included in the consensus sub-network may select one accounting node as a representative node, and the N representative nodes constitute a consensus committee, which maintains a blockchain 102 of the consensus sub-network, where the blockchain 102 is the main chain in the blockchain network. The proposal authority of the block chain network can be auction by N consensus clusters, after a certain consensus cluster obtains the proposal authority, the consensus cluster with the proposal authority is responsible for generating a new block, and a representative node of the consensus cluster with the proposal authority is responsible for uploading the new block to a main chain (namely a block chain 102) in the block chain network, and consensus committee carries out consensus processing. For example: block A1 in block chain 102 is submitted by a representative node in consensus cluster 3, again as: block C1 in block chain 102 is committed by a representative node in consensus cluster 1. The block chain maintained by the consensus committee can record the service data of the whole consensus sub-network, so that the management and the examination of the service data provided by different consensus clusters in the whole consensus sub-network are facilitated.
Certainly, each consensus cluster can also organize its own service subchain, and the service subchain only contains its own service block, so that the consensus cluster can manage its own service data conveniently. In a specific implementation, when a new block is generated in the consensus cluster, the new block may anchor a previous block generated in the consensus cluster, so as to organize the service subchain of the consensus cluster. As shown in fig. 1f, for the consensus cluster 1, the consensus cluster 1 may organize its own service subchain 103, where the service subchain 103 includes a block C1 and a block C2 generated in the consensus cluster 1; when the block C2 is generated in the common cluster 1, the block C2 may anchor the previous block C1 of the sub-chain 102 in the common cluster 1, that is, the hash value (subhash) of the previous block C1 of the sub-chain 103 in the common cluster 1, that is, the hash value of the block C1, is recorded in the block C2. When the block C2 is submitted to the block chain 102 of the consensus sub-network by the representative node for consensus processing, the block C2 may also anchor a previous block in the block chain 102, and the hash value (hash) of the block D1 in the block chain 102, that is, the hash value of the block D1, is recorded in the block 2. Based on the above description, each consensus cluster can organize its own sub-business chain through a subrehash in a block, so as to facilitate management of business data in the cluster, and the consensus committee can maintain the block chain of the whole consensus sub-network, so as to facilitate uniform management and examination of the business data of the whole consensus sub-network.
Taking the example that the blockchain network is a network providing a consensus service for the electronic invoice, a schematic view of a scene architecture of the two-layer network provided in the embodiment of the present application may be shown in fig. 1g. As shown in fig. 1g, the blockchain network comprises: the system comprises a service layer, a routing agent layer and a core consensus network layer, wherein the service layer, the routing agent layer and the core consensus network layer form a whole complete block chain service system; the service layer (1) is in the witness sub-network, the service layer comprises at least one service node, the service node can be specifically an SPV node, the SPV node maintains a normal unstructured P2P network, and the service node can process services such as tax (local tax bureau), bill (enterprise invoicing), payment (enterprise fund flow) and the like. (2) The core common-identification network layer is in a common-identification sub-network, the core common-identification network layer includes common-identification clusters, such as a common-identification cluster 104, a common-identification cluster 105, \8230, and so on, each common-identification cluster maintains a service subchain in the cluster, for example, the common-identification cluster 104 maintains a core chain 1 in the cluster, and the common-identification cluster 105 maintains a core chain 2 in the cluster. (3) The routing agent layer comprises at least one agent node, and the agent node can provide routing service, authentication service, certificate caching service, point-to-point (P2P) service and the like. The service layer and the core consensus network layer carry out information interaction through the routing agent layer, namely the service layer submits service operation interaction to the core consensus network layer through the routing agent layer, so that the routing agent layer plays a role in isolating the service layer from the core consensus network layer.
Based on the above description on the basic structure of the dual-layer network related to the embodiment of the present application, the following briefly introduces a data storage scheme based on the block chain proposed by the embodiment of the present application based on the above dual-layer network structure, where a monitoring node is added in a consensus sub-network to inspect and extract the service data contained in the block, so that it can be ensured that the service data in the block can be centrally monitored and centrally managed, and the privacy of the service data in the block can be protected, thereby effectively improving the security. In addition, the consensus committee acquires a target consensus chain from the block chain network, wherein the consensus candidate blocks on the target consensus chain are all blocks which are examined by the monitoring node; the consensus committee can select a target consensus candidate Block at a target position from the target consensus chain for consensus, and determine the target consensus candidate Block as a final Block (Finallize Block) to be linked to the Block chain after successful consensus. The process can orderly store the blocks proposed by the multiple common recognition clusters in the block chain network to the block chain, effectively maintains the data uplink process under the scene of the multiple common recognition clusters, and further improves the operation efficiency of the block chain network.
Referring to fig. 1h, a scene architecture diagram of the data storage scheme may be shown in fig. 1h, where a consensus sub-network includes a consensus tree of block chains, which may be referred to as a merkel (merkle) tree, and the consensus tree includes one or more chains formed by sequentially linking blocks. The consensus tree can be divided into three regions according to the characteristics of the blocks on the consensus tree, and the three regions respectively comprise: the monitoring data extraction area, the main chain consensus candidate area and the main chain final block area. Based on the region partition of the consensus tree, the block types involved in the consensus sub-network are represented as follows:
(1) A service block to be processed.
The service block to be processed is located in the supervision data extraction area, the service block to be processed refers to a block submitted to the consensus tree by the representative node, the service block to be processed is not checked by the supervision node, and the service block to be processed comprises complete service data.
(2) And identifying the blocks to be selected.
The service block to be processed becomes a common-recognition block to be selected after being examined by the supervision node. The consensus candidate block is located in the main chain consensus candidate area, and the consensus candidate block is a block which passes the examination of the supervision node but is not yet agreed by the consensus committee. In the process of examining by the supervision node, the service data in the service block to be processed is extracted by the supervision node, so that after the service block to be processed becomes a consensus candidate block, the consensus candidate block only contains the transaction Hash and the Mercker tree root, but does not contain the service data. And after the service block to be processed passes the examination, the supervisory node adds the signature of the supervisory node to the service block to be processed, so that after the service block to be processed becomes the common identification candidate block, the common identification candidate block also contains the signature of the supervisory node.
(3) And (5) a final Block (Finallize Block).
The consensus check of the consensus committee is successful, and then the block to be selected becomes the final block. The final block is located in the final block of the main chain, which is the block successfully passing the consensus of the consensus committee, and is determined to be the block linked to the main chain (e.g., block chain 102) and has non-tamper-ability. The final block contains only the transaction Hash and the merck tree root.
The consensus sub-network includes consensus clusters and supervisory nodes, which may include but are not limited to: an audit node and a management node. The supervision node is used for examining the service block to be processed, extracting service data in the service block to be processed, signing the service area to be processed passing the examination, and the like. Furthermore, the supervision node may be responsible for providing content distribution services to other devices outside the consensus sub-network, for example, when receiving a data acquisition request sent by a service node in the witness sub-network, the supervision node may respond to the data acquisition request to provide service data to the service node, and the like; it should be noted that the number of the policing nodes in the embodiment of the present application may be one or more, and the embodiment of the present application does not limit the number of the policing nodes.
The following describes an implementation manner of submitting a block to a block chain by a target representative node with reference to fig. 1h and fig. 1 i; unless otherwise specified, the blockchains of the subsequent embodiments of the present application refer to the main chain in the blockchain network, i.e., the blockchains that need to be commonly maintained by the community committee. The target representative node is a representative node in the target consensus cluster, and the target consensus cluster is any one of the consensus sub-networks.
First, when a new block transaction is packaged in the target consensus cluster, an auction for an exclusive block is performed on the block chain network through a target representative node of the target consensus cluster, that is, the target representative node performs auction to obtain proposal authority of a next block in the block chain, when the target representative node performs successful auction, the target consensus cluster is shown to obtain proposal authority of the next block in the block chain, and the representative node having the proposal authority can submit a new block generated by the consensus cluster to which the representative node belongs to the consensus cluster to the consensus tree, where the new block is called a target service block to be processed, as shown in fig. 1 i.
Secondly, the supervisory node acquires the target service block to be processed from the consensus tree, extracts and examines the service data of the target service block to be processed, signs the target service block to be processed after the examination is passed, and processes the target service block to be processed into a target consensus block to be selected.
Finally, the consensus committee can perform consensus verification on the target consensus candidate block, and after the consensus verification is successful, the target consensus candidate block becomes a final block, and the final block can be stored in the block chain.
Based on the above described data storage scheme based on the block chain, the embodiment of the present application provides a more detailed data storage method based on the block chain, and the following describes in detail the data storage method based on the block chain provided in the embodiment of the present application with reference to the accompanying drawings.
Fig. 2 is a schematic flowchart illustrating a method for storing data based on a blockchain according to an exemplary embodiment of the present application; the data storage method may be performed by a target representative node, which is any one of the consensus committees; the data storage method may include, but is not limited to, steps S201-S204:
s201: and acquiring a target consensus chain waiting for consensus in the block chain network.
Based on the related description of the consensus tree, the consensus tree of the block chains comprises a plurality of chains, the chains comprise at least one consensus chain to be consensus, each consensus chain is formed by sequentially linking one or more consensus blocks to be selected, each consensus block to be selected is a block examined by a monitoring node, and the target consensus chain is the longest chain in the at least one consensus chain. The length of the consensus chain can be represented by calculating the number of blocks included in the consensus chain.
In a specific implementation, the consensus committee may vote on the longest chain of the at least one consensus chain, determine the consensus chain with the largest number of votes as the target consensus chain, and vote based on the longest chain, so that the length of the target consensus chain obtained by voting is the longest chain among all the consensus chains. Taking 3 to-be-identified consensus chains of the main chain consensus region shown in fig. 1h as an example to describe the above, the number of the to-be-identified blocks included in the consensus chain 106 is 3, the number of the to-be-identified blocks included in the consensus chain 107 is 2, and the number of the to-be-identified blocks included in the consensus chain 108 is 2, and then it is determined that the number of the to-be-identified blocks included in the consensus chain 106 is the largest, and the consensus chain 106 is determined as the target consensus chain.
S202: and selecting a target consensus block to be selected from the target consensus chain.
The target consensus candidate block is a block at a target position on the target consensus chain, and specifically may be a block at a first position in the target consensus chain; referring to fig. 1h for explanation, as shown in fig. 1h, the target consensus chain is the consensus chain 106, and according to the trends of the sequential links of the blocks in the target consensus chain, the block to be selected which is the consensus block at the first position in the target consensus chain can be determined to be the block X, and then the block X is determined to be the target consensus block to be selected.
S203: and carrying out consensus verification on the target consensus to-be-selected block.
S204: and if the target consensus candidate block successfully passes the consensus verification of the consensus committee, determining the target consensus candidate block as a final block, and storing the final block into the block chain.
In steps S203-S204, after determining the target consensus candidate block from the target consensus chain, the consensus committee may perform consensus verification on the target consensus candidate block, and after the consensus verification is successful, determine the target consensus candidate block as a final block, where the final block may be added to the block chain for storage to become a block included in the block chain of the consensus sub-network.
Performing consensus verification on the target consensus candidate block, mainly performing consensus verification on contents contained in the target consensus candidate block to obtain a consensus verification result, where the contents may include: a transaction hash value, a mercker tree root, and a signature of a supervisory node. After the target consensus node obtains the consensus verification result of the target consensus candidate block, the consensus verification result can be broadcasted to other representative nodes in the consensus committee; if the number of the representative nodes successfully agreeing with the content contained in the target consensus candidate block in the consensus committee is greater than the number threshold, that is, the representative nodes greater than the number threshold in the consensus committee successfully agree with the target consensus candidate block, the consensus committee can determine that the consensus of the target consensus candidate block is successfully acknowledged. The transaction hash value contained in the target consensus candidate block is determined when the service data corresponding to the target consensus candidate block is received in the target consensus cluster, and the verification transaction hash value can be used for determining that the service data contained in the target consensus candidate block is not tampered. The step of verifying the root of the Mercker tree is to verify the root hash of the Mercker tree, verify that the root of the Mercker tree can be used for verifying whether blocks (or service data) on the consensus tree are tampered or not, determine the security of the consensus tree, and further determine whether the target consensus candidate blocks are tampered or not. The signature of the verification supervision node can be used for verifying whether the target consensus block to be selected passes the examination of the supervision node, and only the block which is successfully examined by the supervision node and signed is successfully verified, so that the uplink service data can be determined to meet the requirements of the blockchain network.
In this embodiment of the present application, a target consensus chain may be obtained from at least one consensus chain waiting for consensus in a blockchain network, where the target consensus chain is the longest chain in the at least one consensus chain; the consensus candidate blocks on the at least one consensus chain are all blocks which are examined by the monitoring node; the design ensures that only the block examined by the monitoring node can be executed with consensus processing, so that the service data in the block can be ensured to be centrally monitored and managed, the privacy of the service data in the block can be protected, and the safety is effectively improved. In addition, a target consensus candidate block at a target position in the target consensus chain is selected for consensus, and the target consensus candidate block is determined as a final block after the consensus verification is successful and is linked to the block chain; the process can orderly store the blocks proposed by the multiple common recognition clusters in the block chain network to the block chain, effectively maintains the data uplink process under the scene of the multiple common recognition clusters, and further improves the operation efficiency of the block chain network.
FIG. 3 is a flowchart illustrating another method for block chain based data storage according to an exemplary embodiment of the present application; the data storage method may be performed by a target representative node, which is any one of the joint council; the data storage method may include, but is not limited to, steps S301-S308:
s301: and when the target consensus cluster to which the target representative node belongs receives a data storage request of the service node, generating a service block according to service data carried in the data storage request.
Taking the data storage scenario shown in fig. 1e as an example, it is witnessed that any service node in the sub-network, such as the service node 109, may send a data storage request to any accounting node or representative node in the target consensus cluster, such as the service node 109 sends a data storage request to the accounting node 110 in the consensus cluster 1, where the data storage request carries service data to be stored; the target representative node may then obtain the service data from accounting node 110 and generate a service block based on the service data.
S302: and performing consensus verification on the service blocks in the target consensus cluster.
And performing consensus verification on the service blocks by each accounting node and the representative node in the target consensus cluster, and executing the step S303 after the consensus verification is successful. Specifically, the accounting node and the representative node store a consensus algorithm (or referred to as a consensus mechanism) for identifying the service blocks, and the accounting node and the representative node may call the consensus algorithm to perform consensus verification on the service blocks. The above-mentioned consensus verification is performed on the service data included in the service block; for example: verifying whether the service data is legal or data conforming to moral and moral, and determining that the service data is successfully verified when the verification result indicates that the service data conforms to legal regulations or moral specifications; for another example: verifying whether the data format of the service data is the data format supported by the block chain network; the following steps are repeated: verifying whether the source of the service data accords with a rule, if the target consensus cluster is set to receive the service data sent by the company A, and determining that the service data is failed to be verified when the service data comes from the company B; and so on.
S303: and if the service block successfully passes the consensus verification of the target consensus cluster, determining the service block as the target service block to be processed.
The target service block to be processed is successfully identified by the target consensus cluster, and the target service block to be processed can be stored in the service subchain organized by the target consensus cluster; when the target service block to be processed is submitted to the consensus tree in turn, the target representative node in the target consensus cluster submits the target service block to be processed to the consensus tree.
S304: and submitting the target service block to be processed to a consensus tree of the block chain, triggering a supervision node to inspect the target service block to be processed on the consensus tree, and processing the target service block to be processed into a consensus block to be selected by the supervision node after the inspection is passed.
The supervision node may pull a to-be-processed service block, such as a to-be-processed target service block submitted by the target representative node, from the consensus tree, and perform an examination on the to-be-processed target service block, and after the to-be-processed target service block successfully passes the examination, the to-be-processed target service block is processed into a consensus to-be-selected block. However, if the target service block to be processed on the consensus tree fails to be examined by the supervision node, which indicates that the target service block to be processed submitted by the target representative node is an invalid block, the target service block to be processed is deleted from the consensus tree of the block chain, and the target representative node is subjected to penalty alarm. Meanwhile, if the consensus tree further includes other to-be-processed service blocks linked to the to-be-processed target service block, and these other to-be-processed service blocks can be submitted by representative nodes of other consensus clusters in the consensus sub-network, deleting the other to-be-processed service blocks from the consensus tree of the block chain, and returning the deleted other to-be-processed service blocks to the corresponding representative nodes, so that the corresponding representative nodes submit the returned to-be-processed service blocks to the consensus tree again in the subsequent process. It should be noted that, since the pending service block returned to the corresponding representative node is already successfully identified in the corresponding identified cluster, there is no need to repeat the identification in the corresponding identified cluster, and the representative node can be directly submitted to the identified tree.
For example, a target service block to be processed submitted by a target representative node is linked with a service block 1 to be processed submitted by a representative node 1 of a first consensus cluster, and a service block 2 to be processed submitted by a representative node 2 of a second consensus cluster is linked with the service block 1 to be processed; and if the target service block to be processed does not pass the examination of the examination node, deleting the target service block to be processed on the consensus tree of the block chain, returning the service block 1 to be processed to the representative node 1 of the first consensus cluster, and returning the service block 2 to be processed to the representative node 2 of the second consensus cluster. It will be appreciated that since the representative node stores the pending traffic blocks, it is also possible that instead of the pending traffic blocks, a notification message is sent back to the representative node, which may be used to prompt: if the examination of the target service block to be processed before the service block to be processed fails, the representative node can continuously auction the proposal authority so as to submit the service block to be processed to the consensus tree again after obtaining the proposal authority. For example, a notification message is sent to the representative node 1 of the first consensus cluster, so that the representative node 1 is notified to continue to participate in the auction of proposal authority, so as to submit the pending service block 1 onto the consensus tree again in the following.
S305: and acquiring a target consensus chain waiting for consensus in the block chain network.
S306: and selecting a target consensus block to be selected from the target consensus chain.
S307: and carrying out consensus verification on the target consensus to-be-selected block.
S308: and if the target consensus candidate block successfully passes the consensus verification of the consensus committee, determining the target consensus candidate block as a final block, and storing the final block into the block chain.
It should be noted that, for the specific implementation manners shown in steps S305 to S308, reference may be made to the related descriptions of the specific implementation manners of the embodiments shown in steps S201 to S204 in the foregoing embodiment shown in fig. 2, which are not described herein again.
In addition, if the target consensus to-be-selected block successfully passes the consensus verification of the consensus committee, the embodiment of the application also supports screening of a consensus chain which is forked based on the target consensus to-be-selected block from at least one consensus chain; and pruning all the consensus chains except the screened forked consensus chain in at least one consensus chain to obtain a pruned consensus tree, and repeating the steps S305-S308 to continuously determine the consensus block to be selected as a final block. Among them, the so-called pruning treatment may include: deleting the common recognition candidate blocks on the pruned common recognition chain from the common recognition tree of the block chain, and returning the deleted common recognition candidate blocks to the corresponding representative nodes, so that the corresponding representative nodes submit the returned common recognition candidate blocks to the common recognition tree again after subsequently acquiring the auction qualification of the blocks. Continuing with the example of 3 consensus chains in the consensus tree shown in fig. 1h, as shown in fig. 1h, the consensus chain 106 includes a block X, a block X1, and a block X2, the consensus chain 107 includes a block Y and a block Y1, and the consensus chain 108 includes a block Y and a block Y2; based on the analysis, the target consensus chain is the consensus chain 106, and the target consensus candidate block is the block X in the consensus chain 106; the chains that branch based on the block X (i.e., the target consensus candidate block) are the consensus chain 106, and the chains that do not branch based on the target consensus candidate block are the consensus chains 107 and the consensus chains 108. After the target consensus candidate block successfully passes the consensus verification of the consensus committee, pruning the consensus chains 107 and 108, namely deleting the block Y, the block Y1 and the block Y2 from the consensus tree of the block chain, and returning the block Y, the block Y1 and the block Y2 to the corresponding representative nodes; for the corresponding representative nodes described herein, reference may be made to the foregoing description, which is not repeated herein.
It can be understood that, if a plurality of consensus clusters included in the consensus sub-network randomly submit respective to-be-processed service blocks to the consensus tree, it is likely that the to-be-processed service blocks sequentially linked in the consensus tree are relatively disordered, and the operation order of the block chain network is relatively poor. Based on this, the embodiment of the application supports that in the process of performing consensus verification on the target consensus candidate block by the consensus committee, the consensus committee simultaneously determines the acquirer of the proposal authority of the next block in the consensus tree, and the acquirer of the proposal authority can submit the own to-be-processed service block to the position of the next block in the consensus tree. Therefore, the method can ensure the order of the service blocks to be processed by a plurality of common identification clusters in order, maintain the operation order of the block chain network and ensure the operation efficiency of the block chain network.
The following takes the consensus cluster as a target consensus cluster and the representative node as a target representative node as an example, and simply explains the implementation manner of the proposal authority of the representative node auction block; specifically, the target representative node may obtain auction information of a target consensus cluster to which the target representative node belongs, where the auction information is used to indicate that the target consensus cluster requests proposal permission of a next block of the auction block chain; in the process that the consensus committee performs consensus verification on the target consensus blocks, the target representative node broadcasts the consensus verification result of the target representative node on the target consensus blocks to other representative nodes of the consensus committee, and the consensus verification result can carry auction information, so that the consensus committee determines acquirers of proposal authority of the block chain based on the auction information. Of course, if the node is not auctioned for the proposal authority of the next block during the process of performing consensus verification on the target consensus candidate block by the consensus committee, i.e. during the pre-commit stage of the target consensus candidate block, the next block may be set as a blank block (if not containing any data) or a specially configured block, etc. The pre-commit stage is a stage in which a representative node in the consensus committee performs pre-commit processing on the target consensus candidate block. The pre-submitting processing refers to a process of whether the target co-recognition candidate blocks are allowed to be pre-submitted or not, and if the target co-recognition candidate blocks are allowed to be pre-submitted, the pre-submitting means that the target co-recognition candidate blocks are allowed to be determined as final blocks and added to a block chain.
In this embodiment of the present application, a target consensus chain may be obtained from at least one consensus chain waiting for consensus in a blockchain network, where the target consensus chain is the longest chain in the at least one consensus chain; the common-recognition blocks to be selected on the at least one common-recognition chain are all blocks which are examined by the supervision node; the design ensures that only the block examined by the monitoring node can be executed with consensus processing, so that the service data in the block can be ensured to be centrally monitored and managed, the privacy of the service data in the block can be protected, and the safety is effectively improved. In addition, a target consensus to-be-selected block at a target position in the target consensus chain is selected for consensus, and the target consensus to-be-selected block is determined as a final block after the consensus verification is successful and is linked to the block chain; the process can orderly store the blocks proposed by the multiple common recognition clusters in the block chain network to the block chain, effectively maintains the data uplink process under the scene of the multiple common recognition clusters, and further improves the operation efficiency of the block chain network.
FIG. 4 is a flowchart illustrating another method for block chain based data storage according to an exemplary embodiment of the present application; the data storage method may be performed by a supervisory node; the data storage method may include, but is not limited to, steps S401-S405:
s401: and determining a target service block to be processed submitted by the target representative node from the consensus tree of the block chain.
S402: and examining the target service block to be processed.
In steps S401 to S402, the supervisory node may obtain a to-be-processed service block that has not been examined from the consensus tree of the block chain, including a to-be-processed target service block submitted by the target representative node, and examine the to-be-processed target service block, and if the supervisory node passes the examination of the to-be-processed target service block, that is, it is determined that the to-be-processed target service block is valid, then step S403 is executed; if the supervision node fails to review the target service block to be processed, that is, it is determined that the target service block to be processed is invalid, the operation of deleting the target service block to be processed and returning to other service blocks to be processed after the target service block to be processed, which is described in step S304 in fig. 3, may be performed.
The method for the supervision node to review the target service block to be processed may include, but is not limited to, the following: (1) examining whether the service type of the service data of the target service block to be processed is matched with the data type of the data commonly recognized by the target common recognition cluster to which the target representative node belongs; if the target representative node is a cluster for commonly identifying the electronic invoice, the service type of the service data of the target service block to be processed is the type of the electronic invoice; (2) checking whether the data format of the service data of the target service block to be processed meets the requirement of a block chain network on the data format of the service data; if the block chain network requires that the data format of the service data is in a file format, determining that the examination of the target service block to be processed fails when the data format of the service data of the target service block to be processed is in a table format; (3) checking whether the service data of the target service block to be processed is legal or data conforming to the moral; if the service data of the target service block to be processed contains violent data, false information and the like, when the condition that the service data of the target service block to be processed contains illegal data or information violating morals is detected, determining that the target service block to be processed of the multimedia data fails to be checked; and so on. The foregoing is merely an exemplary list of several examination implementations, and the present application does not limit the examination manner of the supervision node on the target service block to be processed, which is described herein.
S403: and if the checking is passed, extracting the service data from the target service block to be processed.
S404: and performing signature processing on the extracted target service block to be processed to generate a target consensus block to be selected.
After the target service block to be processed is successfully examined based on the step S402, the supervisory node performs an operation of extracting the service data from the target service block to be processed, so that the supervisory node can implement unified storage of the service data of the block, facilitate management of the service data, save storage resources of the representative node, and do not affect the storage performance and the block output performance of the representative node.
After the supervisory node extracts the service data from the target service block to be processed, the supervisory node may perform signature processing on the target service block to be processed to indicate that the target service block to be processed is approved by the supervisory node. In one implementation, before the supervisory node signs the to-be-processed target service block after the service data is extracted, it may further be verified whether the service data (or the to-be-processed target service block) is stored in one or more data storage devices, and if the service data included in the to-be-processed target service block is successfully backed up in the one or more data storage devices, the step of signing the extracted to-be-processed target service block to generate the target consensus to-be-selected block is triggered. In other words, after the supervisory node extracts the target service block to be processed, it is further ensured that the service data is successfully backed up to one or more data storage devices, and then the signature processing is performed on the extracted target service block to be processed. Therefore, the method is beneficial to realizing data index on the service data and organizing the storage of the service data by an organization. In this implementation, the device type of the data storage device for storing the service data may not be limited, for example, the data storage device may be one or more of N representative nodes, and the one or more representative nodes may be configured to process data of different service types; alternatively, the data storage device may comprise a storage device in a database, which may comprise a public database of blockchains that may be used to store business data for a plurality of business types.
In other implementations, before performing signature processing on the target service block to be processed, the supervisory node needs to verify whether the service data of the target service block to be processed is stored in one or more data storage devices, and also verify whether the one or more data storage devices storing the service data are devices allowed to be used for storing the service data of the target service block to be processed, that is, whether the service data is stored in a data storage device matched with the one or more data storage devices. For example, some service data can only be stored in a data storage device dedicated to storing data of a service type corresponding to the service data, in this case, the data storage device may include a storage device in a database, and the database may include a proprietary database matching the service type of the target service block to be processed.
S405: and updating the target service block to be processed into a target common-identification candidate block on a common-identification tree of the block chain.
Specifically, when the supervision node performs signature processing on the target service block to be processed after the service data is extracted, indicating that the target service block to be processed is successfully checked, the target service block to be processed may be updated to the target consensus candidate block on the consensus tree of the block chain, so that the consensus committee performs consensus verification on the target consensus candidate block. If the target consensus candidate block is a block at a target position on a target consensus chain in the block chain network, when the target consensus candidate block successfully passes the consensus verification of the consensus committee, the consensus committee takes the target consensus candidate block as a final block and stores the final block in the block chain. Through the process, the service blocks of the multiple common identification clusters can be orderly stored on the block chain, and the stability of the whole block chain network is maintained.
The embodiment of the application also supports that the supervision node organizes the cache of the business data (such as providing content distribution service outwards), data archiving, data tracing and the like according to the reading requirement of the business data. Taking the example that the supervision node provides content distribution service outwards, when the supervision node receives a data acquisition request sent by any service node in the witness sub-network, the address of the data storage device where the service data requested by the data acquisition request is located can be acquired, and when the number of the data storage devices storing the service data is multiple, the address of one data storage device can be selected from the multiple data storage devices according to a preset selection rule; and returning the address to the service node so that the service node acquires the service data from the data storage device according to the address. Taking the example that the monitoring node provides the data tracing service, when the monitoring node receives a request for checking and tracing a certain block in the block chain, the monitoring node can obtain the service data from the data storage device according to the address of the data storage device where the service data of the block is located, so as to recover the block and realize the checking and tracing of the block. Similar to the foregoing, when the number of the data storage devices storing the service data is multiple, the address of one data storage device may be selected from the multiple data storage devices according to a preset selection rule, so as to obtain the service data according to the selected address, thereby implementing the block recovery. The preset selection rule may include, but is not limited to: randomly selecting an address of a data storage device; or, judging the distance between each data storage device storing the service data and the service node sending the data acquisition request (or judging the distance between each data storage device storing the service data and the supervisory node), and acquiring the address of the data storage device with the shortest distance; or, detecting the network state of each data storage device storing the service data, and acquiring the address of the data storage device with the best network state; and so on. It should be understood that, the foregoing only provides several exemplary preset selection rules, and the preset selection rule for the supervisory node to select the address of the data storage device is not limited in the embodiments of the present application, and is described herein.
In the embodiment of the application, the target service block to be processed can be obtained, and the service data is extracted from the target service block to be processed for storage after the target service block to be processed is checked to be passed, so that the centralized storage and management of the service data in the block chain network can be realized, the privacy of the service data is improved, and the storage resource of the consensus node is saved; and after extracting the service data of the target service block to be processed, signing the target service block to be processed to update the signed target service block to be a target consensus candidate block, so that the subsequent representative node can quickly verify the validity of the target consensus candidate block by verifying the signature of the supervision node, and further improve the consensus efficiency of the block chain network. In addition, before signature processing is performed on the target service block to be processed, whether the service data of the target service block to be processed is stored in one or more data devices or not can be detected, and the signature operation is performed after the service data is determined to be stored in one or more data storage devices, so that the service data can be backed up for multiple times, and the service data is ensured not to be missed, or before signature processing is performed on the target service block to be processed, whether the service data of the target service block to be processed is stored in a data storage device matched with the service data or not can be detected, and the signature operation is performed on the target service block to be processed after the service data is stored in the data storage device matched with the service data, so that data indexing can be performed on the service data, and the storage of the service data can be effectively organized.
While the method of the embodiments of the present application has been described in detail above, to facilitate better performing the method of the embodiments of the present application, the apparatus of the embodiments of the present application is provided below accordingly.
FIG. 5 is a block diagram illustrating an exemplary embodiment of a blockchain-based data storage device, which may be a computer program (including program code) running in a target representative node (e.g., any representative node); the blockchain-based data storage device may be used to perform some or all of the steps in the method embodiments shown in fig. 2 and 3. The block chain is positioned in a block chain network, the block chain network comprises a witness sub-network and a consensus sub-network, and the witness sub-network comprises at least one service node; the consensus sub-network comprises N consensus clusters and supervision nodes, wherein N is an integer greater than 1; each consensus cluster consists of a plurality of accounting nodes, and each consensus cluster elects one accounting node as a representative node in the respective consensus cluster; n consensus committees of block chains consisting of the representative nodes; the data storage device can be mounted on a target representative node in the consensus committee, wherein the target representative node is any representative node in the consensus committee; referring to fig. 5, the block chain based data storage device includes the following units:
an obtaining unit 501, configured to obtain a target consensus chain waiting for consensus in a block chain network, where the block chain network includes at least one consensus chain to be consensus, each consensus chain is formed by sequentially linking one or more consensus blocks to be selected, and each consensus block to be selected is a block that is examined by a monitoring node; the target consensus strand is the longest strand of the at least one consensus strand;
a processing unit 502, configured to select a target consensus candidate block from the target consensus chain, where the target consensus candidate block is a candidate block at a target position on the target consensus chain;
the processing unit 502 is further configured to perform consensus verification on the target consensus candidate block;
the processing unit 502 is further configured to determine the target consensus candidate block as a final block if the target consensus candidate block successfully passes the consensus verification of the consensus committee, and store the final block in the block chain.
In one implementation, the target consensus candidate block is obtained by converting a target service block to be processed; the processing unit 502 is further configured to:
and submitting the target service block to be processed to the consensus tree of the block chain, triggering the supervision node to examine the target service block to be processed on the consensus tree, and processing the target service block to be processed into a target consensus block to be selected by the supervision node after the examination is passed.
In one implementation, the processing unit 502 is further configured to:
when a target consensus cluster to which a target representative node belongs receives a data storage request of a service node, generating a service block according to service data carried in the data storage request;
performing consensus verification on the service blocks in the target consensus cluster;
and if the service block successfully passes the consensus verification of the target consensus cluster, determining the service block as the target service block to be processed.
In one implementation, the processing unit 502 is further configured to:
if the target consensus to-be-selected block successfully passes the consensus verification of the consensus committee, screening out a consensus chain which is forked based on the target consensus to-be-selected block from at least one consensus chain;
and pruning all the consensus chains except the screened forked consensus chain in at least one consensus chain.
In one implementation, the pruning process includes: deleting the consensus blocks to be selected on the pruned consensus chain from the consensus tree of the block chain; and the number of the first and second groups,
and returning the deleted common identification candidate blocks to the corresponding representative nodes.
In one implementation, the target consensus candidate block includes: the signature of the transaction hash value, the Mercker tree root and the supervision node; when performing consensus verification on the target consensus candidate block, the processing unit 502 is specifically configured to:
performing consensus verification on the content contained in the target consensus block to be selected to obtain a consensus verification result;
broadcasting the consensus verification result to other representative nodes in the consensus committee;
and if the number of representative nodes successfully identified to the content contained in the target block to be identified in the consensus committee is greater than the number threshold, determining the consensus verification of the target block to be identified in the consensus committee.
In one implementation, the processing unit 502 is further configured to:
acquiring auction information of a target consensus cluster to which a target representative node belongs, wherein the auction information is used for indicating the target consensus cluster to request proposal authority of an auction block chain;
in the process that the consensus committee performs consensus verification on the target consensus blocks, the consensus verification result of the target representative node on the target consensus blocks is broadcasted to other representative nodes of the consensus committee, and the consensus verification result carries auction information, so that the consensus committee determines acquirers of proposal authority of the block chain based on the auction information.
In one implementation, the processing unit 502 is further configured to:
if the target service block to be processed on the consensus tree does not pass the examination of the supervision node, deleting the target service block to be processed from the consensus tree of the block chain;
if the common identification tree also comprises other service blocks to be processed which are linked with the target service block to be processed, deleting the other service blocks to be processed from the common identification tree of the block chain, and returning the deleted other service blocks to be processed to the corresponding representative node.
According to an embodiment of the present application, each unit in the data storage device based on the blockchain shown in fig. 5 may be respectively or entirely combined into one or several additional units to form the data storage device, or some unit(s) therein may be further split into multiple units smaller in function to form the data storage device, which may achieve the same operation without affecting the achievement of the technical effect of the embodiment of the present application. The units are divided based on logic functions, and in practical application, the functions of one unit can be realized by a plurality of units, or the functions of a plurality of units can be realized by one unit. In other embodiments of the present application, the blockchain-based data storage device may also include other units, and in practical applications, these functions may also be implemented by assistance of other units, and may be implemented by cooperation of a plurality of units. According to another embodiment of the present application, the block chain based data storage apparatus as shown in fig. 5 may be constructed by running a computer program (including program codes) capable of executing the steps involved in the corresponding method as shown in fig. 2 and fig. 3 on a general-purpose computing device such as a computer including a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and the like, and a storage element, and the block chain based data storage method of the embodiment of the present application may be implemented. The computer program may be recorded on a computer-readable recording medium, for example, and loaded and executed in the above-described computing apparatus via the computer-readable recording medium.
In this embodiment of the present application, the obtaining unit 501 may obtain a target consensus chain from at least one consensus chain waiting for consensus in a blockchain network, where the target consensus chain is the longest chain in the at least one consensus chain; the consensus candidate blocks on the at least one consensus chain are all blocks which are examined by the monitoring node; the design ensures that only the block examined by the monitoring node can be executed with consensus processing, so that the service data in the block can be ensured to be centrally monitored and managed, the privacy of the service data in the block can be protected, and the safety is effectively improved. In addition, the processing unit 502 may select a target co-recognition candidate block at a target position in the target co-recognition chain for co-recognition, and after the co-recognition verification is successful, determine the target co-recognition candidate block as a final block and uplink the final block to the block chain; the process can orderly store the blocks proposed by the multiple common recognition clusters in the block chain network to the block chain, effectively maintains the data uplink process under the scene of the multiple common recognition clusters, and further improves the operation efficiency of the block chain network.
FIG. 6 is a block diagram illustrating an exemplary embodiment of a blockchain-based data storage device, which may be a computer program (including program code) running in a target representative node (e.g., any representative node); the blockchain-based data storage device may be used to perform some or all of the steps in the method embodiment shown in fig. 4. The block chain is positioned in a block chain network, the block chain network comprises a witness sub-network and a consensus sub-network, and the witness sub-network comprises at least one service node; the consensus sub-network comprises N consensus clusters and supervision nodes, wherein N is an integer greater than 1; each consensus cluster consists of a plurality of accounting nodes, and each consensus cluster elects one accounting node in the respective consensus cluster as a representative node; n consensus committees of block chains consisting of the representative nodes; any representative node in the consensus committee is represented as a target representative node, and the data storage device can be mounted on the supervision node; referring to fig. 6, the block chain based data storage device includes the following units:
a processing unit 601, configured to determine, from a consensus tree of a block chain, a target service block to be processed submitted by a target representative node;
examining a target service block to be processed;
if the examination is passed, extracting service data from the target service block to be processed;
carrying out signature processing on the extracted target service block to be processed to generate a target consensus block to be selected;
and updating the target service block to be processed into a target consensus candidate block on a consensus tree of the block chain so that a consensus committee performs consensus verification on the target consensus candidate block, wherein if the target consensus candidate block is a block at a target position on the target consensus chain in the block chain network, the consensus committee takes the target consensus candidate block as a final block and stores the final block into the block chain when the target consensus candidate block successfully passes the consensus verification of the consensus committee.
In one implementation, the processing unit 601 is further configured to:
if the service data contained in the target service block to be processed is successfully backed up in one or more data storage devices, triggering the step of carrying out signature processing on the extracted target service block to be processed to generate a target consensus block to be selected.
In one implementation, a data storage device includes one or more of N delegate nodes; alternatively, the data storage device comprises a storage device in a database;
the database comprises a public database of the block chain or a private database matched with the service type of the target service block to be processed.
In one implementation, the processing unit 601 is further configured to:
when a data acquisition request sent by a service node is received, acquiring the address of data storage equipment where the requested service data is located;
and returning the address to the service node, so that the service node acquires the service data from the data storage equipment according to the address.
According to an embodiment of the present application, the units in the data storage apparatus based on the blockchain shown in fig. 6 may be respectively or entirely combined into one or several other units to form the data storage apparatus, or some unit(s) therein may be further split into multiple units with smaller functions to form the data storage apparatus, which may achieve the same operation without affecting the achievement of the technical effect of the embodiment of the present application. The units are divided based on logic functions, and in practical applications, the functions of one unit can also be implemented by a plurality of units, or the functions of a plurality of units can also be implemented by one unit. In other embodiments of the present application, the blockchain-based data storage device may also include other units, and in practical applications, these functions may also be implemented with the assistance of other units, and may be implemented by cooperation of multiple units. According to another embodiment of the present application, the block chain based data storage apparatus as shown in fig. 6 may be constructed by running a computer program (including program codes) capable of executing the steps involved in the corresponding method as shown in fig. 4 on a general purpose computing device such as a computer including a Central Processing Unit (CPU), a random access storage medium (RAM), a read only storage medium (ROM), and the like, and a storage element, and the block chain based data storage method of the embodiment of the present application may be implemented. The computer program may be recorded on a computer-readable recording medium, for example, and loaded and executed in the above-described computing apparatus via the computer-readable recording medium.
In this embodiment of the application, the processing unit 601 may obtain a target service block to be processed, and extract service data from the target service block to be processed for storage after the target service block to be processed is examined, so that centralized storage and management of the service data in the block chain network can be realized, and storage resources of the consensus node are saved; and after extracting the service data of the target service block to be processed, signing the target service block to be processed to update the signed target service block to be a target consensus candidate block, so that the subsequent representative node can quickly verify the validity of the target consensus candidate block by verifying the signature of the supervision node, and further improve the consensus efficiency of the block chain network.
Fig. 7 is a schematic structural diagram illustrating a data processing apparatus based on a blockchain according to an exemplary embodiment of the present application; referring to fig. 7, the blockchain-based data processing apparatus includes at least a processor 701, a communication interface 702, and a computer-readable storage medium 703. The terminal includes a processor 701, a communication interface 702, and a computer-readable storage medium 1203. The processor 701, the communication interface 702, and the computer-readable storage medium 703 may be connected by a bus or other means. The communication interface 702 is used, among other things, to receive and transmit data. A computer readable storage medium 703 may be stored in the memory of the terminal, the computer readable storage medium 703 being for storing a computer program comprising program instructions, the processor 701 being for executing the program instructions stored by the computer readable storage medium 703. The processor 701 (or CPU) is a computing core and a control core of the terminal, and is adapted to implement one or more instructions, and in particular, is adapted to load and execute the one or more instructions so as to implement a corresponding method flow or a corresponding function.
An embodiment of the present application further provides a computer-readable storage medium (Memory), which is a Memory device in a terminal and is used for storing programs and data. It is understood that the computer readable storage medium herein can include both a built-in storage medium in the terminal and, of course, an extended storage medium supported by the terminal. The computer readable storage medium provides a memory space that stores the processing system of the terminal. Also stored in the memory space are one or more instructions, which may be one or more computer programs (including program code), suitable for loading and execution by processor 701. It should be noted that the computer-readable storage medium may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), such as at least one disk memory; optionally, at least one computer readable storage medium located remotely from the aforementioned processor is also possible.
In one embodiment, the computer-readable storage medium has one or more instructions stored therein; one or more instructions stored in the computer-readable storage medium are loaded and executed by the processor 701 to implement the corresponding steps in the social conversation method embodiment described above; in a specific implementation, the blockchain is located in a blockchain network, the blockchain network comprises a witness sub-network and a consensus sub-network, and the witness sub-network comprises at least one service node; the consensus sub-network comprises N consensus clusters and monitoring nodes, wherein N is an integer greater than 1; each consensus cluster consists of a plurality of accounting nodes, and each consensus cluster elects one accounting node in the respective consensus cluster as a representative node; n consensus committees of block chains consisting of the representative nodes; the data storage device is mounted on a target representative node, and the target representative node is any one of the consensus committees; one or more instructions in the computer readable storage medium are loaded by the processor 701 and perform the steps of:
acquiring a target consensus chain waiting for consensus in a block chain network, wherein the block chain network comprises at least one consensus chain to be consensus, each consensus chain is formed by sequentially linking one or more consensus blocks to be selected, and each consensus block to be selected is a block inspected by a monitoring node; the target consensus strand is the longest strand of the at least one consensus strand;
selecting a target consensus to-be-selected block from the target consensus chain, wherein the target consensus to-be-selected block is a consensus to-be-selected block at a target position on the target consensus chain;
carrying out consensus verification on the target consensus to-be-selected block;
and if the target consensus candidate block successfully passes the consensus verification of the consensus committee, determining the target consensus candidate block as a final block, and storing the final block into the block chain.
In one implementation, the target consensus candidate block is obtained by converting a target service block to be processed; one or more instructions in the computer readable storage medium are loaded by the processor 701 and further perform the steps of:
and submitting the target service block to be processed to the consensus tree of the block chain, triggering the supervision node to examine the target service block to be processed on the consensus tree, and processing the target service block to be processed into a target consensus block to be selected by the supervision node after the examination is passed.
In one implementation, one or more instructions in a computer readable storage medium are loaded by processor 701 and further perform the steps of:
when a target consensus cluster to which a target representative node belongs receives a data storage request of a service node, generating a service block according to service data carried in the data storage request;
performing consensus verification on the service blocks in the target consensus cluster;
and if the service block successfully passes the consensus verification of the target consensus cluster, determining the service block as the target service block to be processed.
In one implementation, one or more instructions in a computer-readable storage medium are loaded by processor 701 and further perform the steps of:
if the target consensus to-be-selected block successfully passes the consensus verification of the consensus committee, screening out a consensus chain which is forked based on the target consensus to-be-selected block from at least one consensus chain;
and pruning all the consensus chains except the screened forked consensus chain in the at least one consensus chain.
In one implementation, the pruning process includes: deleting the consensus blocks to be selected on the pruned consensus chain from the consensus tree of the block chain; and (c) a second step of,
and returning the deleted common identification candidate blocks to the corresponding representative nodes.
In one implementation, the target consensus candidate block includes: signatures of the transaction hash value, the Mercker tree root, and the supervisory node; one or more instructions in the computer-readable storage medium are loaded by the processor 701 and when performing consensus verification on the target consensus candidate block, are specifically configured to perform the following steps:
performing consensus verification on the contents contained in the target consensus candidate block to obtain a consensus verification result;
broadcasting the consensus verification result to other representative nodes in the consensus committee;
and if the number of representative nodes successfully identified to the content contained in the target block to be identified in the consensus committee is greater than the number threshold, determining the consensus verification of the target block to be identified in the consensus committee.
In one implementation, one or more instructions in a computer readable storage medium are loaded by processor 701 and further perform the steps of:
obtaining auction information of a target consensus cluster to which a target representative node belongs, wherein the auction information is used for indicating the proposal authority of the target consensus cluster requesting for auction block chains;
in the process that the consensus committee performs consensus verification on the target consensus blocks, the consensus verification result of the target representative node on the target consensus blocks is broadcasted to other representative nodes of the consensus committee, and the consensus verification result carries auction information, so that the consensus committee determines acquirers of proposal authority of the block chain based on the auction information.
In one implementation, one or more instructions in a computer readable storage medium are loaded by processor 701 and further perform the steps of:
if the target service block to be processed on the consensus tree does not pass the examination of the supervision node, deleting the target service block to be processed from the consensus tree of the block chain;
if the common identification tree also comprises other service blocks to be processed which are linked with the target service block to be processed, deleting the other service blocks to be processed from the common identification tree of the block chain, and returning the deleted other service blocks to be processed to the corresponding representative node.
In this embodiment of the present application, the processor 701 may obtain a target consensus chain from at least one consensus chain waiting for consensus in the blockchain network, where the target consensus chain is a longest chain in the at least one consensus chain; the common-recognition blocks to be selected on the at least one common-recognition chain are all blocks which are examined by the supervision node; the design ensures that only the blocks examined by the supervision node can be subjected to consensus processing, so that the service data in the blocks can be ensured to be subjected to centralized supervision and centralized management, the privacy of the service data in the blocks can be protected, and the safety is effectively improved. In addition, a target consensus candidate block at a target position in the target consensus chain can be selected for consensus, and the target consensus candidate block is determined as a final block after the consensus verification is successful and is linked to the block chain; the process can orderly store the blocks proposed by the multiple common recognition clusters in the block chain network to the block chain, effectively maintains the data uplink process under the scene of the multiple common recognition clusters, and further improves the operation efficiency of the block chain network.
In another embodiment, the computer-readable storage medium has stored therein one or more instructions; one or more instructions stored in the computer-readable storage medium are loaded and executed by the processor 701 to implement the corresponding steps in the above embodiment of the social conversation method; in a specific implementation, the blockchain is located in a blockchain network, the blockchain network comprises a witness sub-network and a consensus sub-network, and the witness sub-network comprises at least one service node; the consensus sub-network comprises N consensus clusters and supervision nodes, wherein N is an integer greater than 1; each consensus cluster consists of a plurality of accounting nodes, and each consensus cluster elects one accounting node as a representative node in the respective consensus cluster; n consensus committees of block chains consisting of the representative nodes; any representative node in the consensus committee is represented as a target representative node, and the data storage device is mounted on the supervision node; one or more instructions in the computer readable storage medium are loaded by the processor 701 and perform the steps of:
determining a target service block to be processed submitted by a target representative node from a consensus tree of a block chain;
examining a target service block to be processed;
if the examination is passed, extracting service data from the target service block to be processed;
carrying out signature processing on the extracted target service block to be processed to generate a target consensus block to be selected;
and updating the target service block to be processed into a target consensus candidate block on a consensus tree of the block chain so that a consensus committee performs consensus verification on the target consensus candidate block, wherein if the target consensus candidate block is a block at a target position on the target consensus chain in the block chain network, the consensus committee takes the target consensus candidate block as a final block and stores the final block into the block chain when the target consensus candidate block successfully passes the consensus verification of the consensus committee.
In one implementation, one or more instructions in a computer readable storage medium are loaded by processor 701 and further perform the steps of:
and if the service data contained in the target service block to be processed is successfully backed up in one or more data storage devices, triggering the step of carrying out signature processing on the extracted target service block to be processed to generate a target consensus block to be selected.
In one implementation, a data storage device includes one or more of N delegate nodes; alternatively, the data storage device comprises a storage device in a database;
the database comprises a public database of the block chain or a private database matched with the service type of the target service block to be processed.
In one implementation, one or more instructions in a computer-readable storage medium are loaded by processor 701 and further perform the steps of:
when a data acquisition request sent by a service node is received, acquiring the address of data storage equipment where the requested service data is located;
and returning the address to the service node, so that the service node acquires the service data from the data storage device according to the address.
In the embodiment of the application, the processor 701 may acquire a target service block to be processed, and extract service data from the target service block to be processed for storage after the target service block to be processed is checked, so that centralized storage and management of the service data in a block chain network can be realized, and storage resources of consensus nodes are saved; and after extracting the service data of the target service block to be processed, signing the target service block to be processed to update the signed target service block to be a target consensus candidate block, so that the subsequent representative node can quickly verify the validity of the target consensus candidate block by verifying the signature of the supervision node, and further improve the consensus efficiency of the block chain network.
Embodiments of the present application also provide a computer program product or a computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the data storage device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the data storage device to execute the above block chain based data storage method.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the invention are all or partially effected when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center by wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The available media may be magnetic media (e.g., floppy disks, hard disks, tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid State Disks (SSDs)), among others.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (15)

1. A data storage method based on a block chain is characterized in that the block chain is located in a block chain network, the block chain network comprises a witness sub-network and a consensus sub-network, and the witness sub-network comprises at least one service node; the consensus sub-network comprises N consensus clusters and monitoring nodes, wherein N is an integer greater than 1; each consensus cluster consists of a plurality of accounting nodes, and each consensus cluster elects one accounting node as a representative node in the respective consensus cluster; n consensus committees by which the representative nodes constitute the block chain; the method is performed by a target representative node of the consensus committee, the target representative node being any representative node of the consensus committee; the method comprises the following steps:
acquiring a target consensus chain waiting for consensus in the block chain network, wherein the block chain network comprises at least one consensus chain to be consensus, each consensus chain is formed by sequentially linking one or more consensus blocks to be selected, and each consensus block to be selected is a block inspected by the monitoring node; the target consensus strand is the longest strand of the at least one consensus strand;
selecting a target consensus to-be-selected block from the target consensus chain, wherein the target consensus to-be-selected block is a consensus to-be-selected block at a target position on the target consensus chain;
carrying out consensus verification on the target consensus to-be-selected block;
and if the target consensus candidate block successfully passes the consensus verification of the consensus committee, determining the target consensus candidate block as a final block, and storing the final block into the block chain.
2. The method of claim 1, wherein the target co-aware candidate blocks are transformed from target traffic blocks to be processed; the method further comprises the following steps:
submitting the target service block to be processed to a consensus tree of the block chain, triggering the supervision node to examine the target service block to be processed on the consensus tree, and processing the target service block to be processed into the target consensus block to be selected by the supervision node after the examination is passed.
3. The method of claim 2, wherein the method further comprises:
when the target consensus cluster to which the target representative node belongs receives a data storage request of the service node, generating a service block according to service data carried in the data storage request;
performing consensus verification on the service blocks in the target consensus cluster;
and if the service block successfully passes the consensus verification of the target consensus cluster, determining the service block as the target service block to be processed.
4. The method of claim 1, wherein the method further comprises:
if the target consensus to-be-selected block successfully passes the consensus verification of the consensus committee, screening out a consensus chain which is forked based on the target consensus to-be-selected block from the at least one consensus chain;
and pruning all the consensus chains except the screened forked consensus chain in the at least one consensus chain.
5. The method of claim 4, wherein the pruning process comprises: deleting the consensus blocks to be selected on the pruned consensus chain from the consensus tree of the block chain; and (c) a second step of,
and returning the deleted common identification candidate blocks to the corresponding representative nodes.
6. The method of claim 1, wherein the target consensus candidate block comprises: a transaction hash value, a Mercker tree root, and a signature of the supervisory node; the performing consensus verification on the target consensus candidate block comprises:
performing consensus verification on the content contained in the target consensus candidate block to obtain a consensus verification result;
broadcasting the consensus verification result to other representative nodes in the consensus committee;
and if the number of the representative nodes successfully identified in the consensus committee for the content of the target consensus candidate block is greater than a number threshold, determining that the consensus verification of the target consensus candidate block by the consensus committee is successful.
7. The method of claim 1, wherein the method further comprises:
acquiring auction information of a target consensus cluster to which the target representative node belongs, wherein the auction information is used for indicating the target consensus cluster to request auction proposal permission of the block chain;
in the process that the consensus committee performs consensus verification on the target consensus candidate block, broadcasting a consensus verification result of the target representative node on the target consensus candidate block to other representative nodes of the consensus committee, wherein the consensus verification result carries auction information, so that the consensus committee determines an acquirer for proposal authority of the block chain based on the auction information.
8. The method of claim 2, wherein the method further comprises:
if the target service block to be processed on the consensus tree does not pass the examination of the supervision node, deleting the target service block to be processed from the consensus tree of the block chain;
and if the consensus tree further comprises other to-be-processed service blocks linked to the to-be-processed target service block, deleting the other to-be-processed service blocks from the consensus tree of the block chain, and returning the deleted other to-be-processed service blocks to the corresponding representative nodes.
9. A data storage method based on a block chain is characterized in that the block chain is located in a block chain network, the block chain network comprises a witness sub-network and a consensus sub-network, and the witness sub-network comprises at least one service node; the consensus sub-network comprises N consensus clusters and supervision nodes, wherein N is an integer greater than 1; each consensus cluster consists of a plurality of accounting nodes, and each consensus cluster elects one accounting node in the respective consensus cluster as a representative node; n representative nodes form a consensus committee of the block chain; any representative node of the consensus committee is represented as a target representative node, the method being performed by the supervising node; the method comprises the following steps:
determining a target service block to be processed submitted by the target representative node from a consensus tree of the block chain;
examining the target service block to be processed;
if the examination is passed, extracting service data from the target service block to be processed;
performing signature processing on the extracted target service block to be processed to generate a target consensus block to be selected;
and updating the target service block to be processed into the target consensus candidate block on the consensus tree of the block chain so that the consensus committee performs consensus verification on the target consensus candidate block, wherein if the target consensus candidate block is a block at a target position on the target consensus chain in the block chain network, the consensus committee takes the target consensus candidate block as a final block and stores the final block into the block chain when the target consensus candidate block successfully passes the consensus verification of the consensus committee.
10. The method of claim 9, wherein before the signing the extracted target service block to be processed to generate a target consensus candidate block, further comprising:
if the service data contained in the target service block to be processed is successfully backed up in one or more data storage devices, triggering the step of carrying out signature processing on the extracted target service block to be processed to generate a target consensus block to be selected;
wherein the data storage device comprises one or more of the N delegate nodes; or, the data storage device comprises a storage device in a database; the database comprises a public database of the block chain or a special database matched with the service type of the target service block to be processed.
11. The method of claim 10, wherein the method further comprises:
when a data acquisition request sent by a service node is received, acquiring the address of data storage equipment where the requested service data is located;
and returning the address to the service node, so that the service node acquires the service data from the data storage equipment according to the address.
12. A blockchain-based data storage device, wherein the blockchain is located in a blockchain network, the blockchain network comprising a witness sub-network and a consensus sub-network, the witness sub-network comprising at least one service node; the consensus sub-network comprises N consensus clusters and supervision nodes, wherein N is an integer greater than 1; each consensus cluster consists of a plurality of accounting nodes, and each consensus cluster elects one accounting node in the respective consensus cluster as a representative node; n representative nodes form a consensus committee of the block chain; the data storage device is mounted on a target representative node, wherein the target representative node is any one representative node in the consensus committee; the data storage device includes:
an obtaining unit, configured to obtain a target consensus chain waiting for consensus in the blockchain network, where the blockchain network includes at least one consensus chain to be consensus, each consensus chain is formed by sequentially linking one or more consensus blocks to be selected, and each consensus block to be selected is a block that is examined by the monitoring node; the target consensus strand is the longest strand of the at least one consensus strand;
a processing unit, configured to select a target consensus to-be-selected block from the target consensus chain, where the target consensus to-be-selected block is a consensus to-be-selected block at a target position on the target consensus chain;
the processing unit is further configured to perform consensus verification on the target consensus candidate block;
the processing unit is further configured to determine the target consensus candidate block as a final block if the target consensus candidate block successfully passes the consensus verification of the consensus committee, and store the final block in the block chain.
13. A blockchain-based data storage device, wherein the blockchain is located in a blockchain network, the blockchain network comprising a witness sub-network and a consensus sub-network, the witness sub-network comprising at least one service node; the consensus sub-network comprises N consensus clusters and monitoring nodes, wherein N is an integer greater than 1; each consensus cluster consists of a plurality of accounting nodes, and each consensus cluster elects one accounting node in the respective consensus cluster as a representative node; n consensus committees by which the representative nodes constitute the block chain; any representative node in the consensus committee is represented as a target representative node, and the data storage device is mounted on the supervision node; the data storage device includes:
the processing unit is used for determining a target service block to be processed submitted by the target representative node from a consensus tree of the block chain;
the processing unit is further configured to review the target service block to be processed;
the processing unit is further configured to extract service data from the target service block to be processed if the examination is passed;
the processing unit is further configured to perform signature processing on the extracted target service block to be processed to generate a target consensus block to be selected;
the processing unit is further configured to update the target service block to be processed to the target consensus candidate block on the consensus tree of the block chain, so that the consensus committee performs consensus verification on the target consensus candidate block, where if the target consensus candidate block is a block at a target position on the target consensus chain in the block chain network, the consensus committee takes the target consensus candidate block as a final block and stores the final block into the block chain when the target consensus candidate block successfully passes the consensus verification of the consensus committee.
14. A blockchain-based data storage device, comprising:
a processor adapted to execute a computer program;
computer readable storage medium, in which a computer program is stored which, when being executed by the processor, implements the blockchain based data storage method according to any one of claims 1 to 8 or implements the blockchain based data storage method according to any one of claims 9 to 11.
15. A computer-readable storage medium, characterized in that it stores a computer program adapted to be loaded by a processor and to perform a blockchain-based data processing method according to any one of claims 1 to 8 or to implement a blockchain-based data storage method according to any one of claims 9 to 11.
CN202110640018.8A 2021-06-08 2021-06-08 Data storage method, device, equipment and medium based on block chain Pending CN115455460A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110640018.8A CN115455460A (en) 2021-06-08 2021-06-08 Data storage method, device, equipment and medium based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110640018.8A CN115455460A (en) 2021-06-08 2021-06-08 Data storage method, device, equipment and medium based on block chain

Publications (1)

Publication Number Publication Date
CN115455460A true CN115455460A (en) 2022-12-09

Family

ID=84294480

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110640018.8A Pending CN115455460A (en) 2021-06-08 2021-06-08 Data storage method, device, equipment and medium based on block chain

Country Status (1)

Country Link
CN (1) CN115455460A (en)

Similar Documents

Publication Publication Date Title
CN113395363B (en) Data processing method, device and equipment based on block chain and storage medium
EP3659086B1 (en) Computer-implemented system and method for managing a large distributed memory pool in a blockchain network
CN109447795B (en) Byzantine consensus method supporting rapid achievement of final confirmation
Shukla et al. Online voting application using ethereum blockchain
KR20200032086A (en) Distributed blockchain data structure distribution through secure access restriction management
US20230315891A1 (en) Transaction data processing method and apparatus, computer device and storage medium
CN113256297B (en) Data processing method, device and equipment based on block chain and readable storage medium
US20230037932A1 (en) Data processing method and apparatus based on blockchain network, and computer device
CN111698315B (en) Data processing method and device for block and computer equipment
CN112597240B (en) Federal learning data processing method and system based on alliance chain
CN113518005B (en) Block consensus method, device, equipment and storage medium
CN113255014B (en) Data processing method based on block chain and related equipment
CN109450685B (en) local link node offline consensus method and node
CN113328997A (en) Alliance chain cross-chain system and method
US20220239668A1 (en) Blockchain-based message processing method and apparatus, device, and storage medium
US20230360046A1 (en) Blockchain-based block processing method and apparatus, device, storage medium, and program product
Wang et al. An efficient, secured, and infinitely scalable consensus mechanism for peer-to-peer energy trading blockchain
WO2023082883A1 (en) Cross-blockchain transaction processing method and apparatus, and computer device, computer storage medium and computer program product
Quamara et al. An In-depth Security and Performance Investigation in Hyperledger Fabric-configured Distributed Computing Systems
CN117061538A (en) Consensus processing method and related device based on block chain network
CN115455460A (en) Data storage method, device, equipment and medium based on block chain
CN113300853B (en) Financial credit information management method, device, electronic equipment and storage medium
WO2024093593A1 (en) Multi-blockchain-based data processing method and apparatus, and electronic device, computer-readable storage medium and computer program product
CN116112496A (en) Cross-chain interaction method based on blockchain network and related equipment
CN116186725A (en) Data processing method, device, equipment and storage medium

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