Role-separated block chain system and data storage management method
By dividing different role nodes in the blockchain system and separating roles and chain separation, the existing blockchain system has solved the problems of high storage capacity, low degree of decentralization and low throughput, and achieved high throughput and low throughput Delay and higher decentralization.
Patent Information
- Application Number
- CN202411600708.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-11
AI Technical Summary
Since each node needs to store complete blockchain data, the existing blockchain system has high storage capacity requirements, reduced degree of decentralization, low throughput, and cannot increase throughput by expanding the network scale.
Divide nodes in the blockchain system into different roles, such as ordinary nodes, sorting nodes, execution nodes and confirmation nodes. Each node undertakes specific tasks according to its resource advantages, and stores and processes data through role separation and chain separation. .
The resource advantages of each node are fully utilized, the node load is reduced, the blockchain is improved, and the system's high throughput and low latency performance is improved through asynchronous parallel processing.
Smart Images

Figure CN119449811A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a role-separated blockchain system and a data storage management method. Background Art
[0002] In most blockchain systems, each node in its P2P network maintains and updates the same complete data. This traditional blockchain system has a low throughput and cannot be improved by expanding the network scale. On the other hand, each node needs to store complete blockchain data. As the number of blocks continues to increase, the amount of data on the blockchain is also increasing, which puts higher requirements on the storage capacity of blockchain nodes. This leads to fewer and fewer nodes that can store complete blockchain data, thereby reducing the degree of decentralization of the blockchain. In addition, when a node stores a large amount of data, the efficiency of data management will decrease and the operating cost of the node will increase significantly. In addition, the resource advantages of each node are different, and the resources required in different process stages of the blockchain system are also different. The existing blockchain system cannot give full play to the resource advantages of different nodes. Summary of the invention
[0003] The present invention provides a blockchain system and a data storage management method, which can overcome certain or some defects of the prior art.
[0004] According to a blockchain system of the present invention, it includes nodes of different role types, and the nodes of different role types include ordinary nodes, sorting nodes, execution nodes and confirmation nodes; a plurality of the nodes jointly construct a blockchain network, a plurality of the sorting nodes jointly construct a sorting subnetwork, a plurality of the execution nodes jointly construct an execution subnetwork, and a plurality of the confirmation nodes jointly construct a confirmation subnetwork; each node is configured with a memory pool, and the memory pool is used to realize temporary storage of transaction data; wherein the ordinary node is used to receive transaction data, and the transaction data received by each ordinary node is stored in the memory pool to constitute a transaction set, that is, the transaction set includes multiple transaction data; the sorting node is used to perform transaction sorting actions on the multiple transaction data to generate a to-be-confirmed queue. The method comprises the following steps: a first block is a block block and a second block is a block body, wherein the block body stores a plurality of transaction data in an orderly manner based on the transaction sorting result, and the sorting subnetwork adds a confirmed final sorting block among a plurality of sorting blocks to be confirmed generated by a plurality of sorting nodes to the sorting chain; the execution node is used to execute the transaction action, and construct an execution block according to the transaction receipt data of all the executed transaction data, and the execution subnetwork is used to attach the execution block to the execution chain; the confirmation node is used to receive the block headers of the sorting block to be confirmed and the execution block to confirm the final sorting and the final execution block, and construct a confirmation block according to the index data of the final sorting and the execution block, and the confirmation subnetwork is used to attach the confirmation block to the confirmation chain.
[0005] In the present invention, multiple nodes in the entire blockchain system are divided into common nodes, sorting nodes, execution nodes and confirmation nodes for assuming different responsibilities, that is, multiple nodes are divided into different roles according to node responsibilities. In the process of executing transaction data on the chain, the nodes of these different roles are divided into different tasks, for example: common nodes are used to realize the access of transaction data to the blockchain system and broadcast actions; sorting nodes are used to realize the sorting and storage actions of transaction data; execution nodes are used to realize transaction execution and record / update actions on the status of the current blockchain; confirmation nodes are used to realize the confirmation of sorting blocks and execution blocks, as well as the management of sub-network node updates and reporting data. Through the division of labor and cooperation of nodes with different roles, the node roles, chains and data storage are separated, and nodes with different roles can use their own advantageous resources to perform different tasks, thereby realizing the full utilization of the advantageous resources of each node, reducing the load of the node, and improving the degree of decentralization of the blockchain.
[0006] Specifically, in the sorting subnetwork, transaction sorting actions are performed by building a sorting chain. In the execution subnetwork, transaction data on the chain is executed and the status is updated by building an execution chain. In the confirmation subnetwork, action supervision and management of the sorting subnetwork and the execution subnetwork are achieved by building a confirmation chain.
[0007] Preferably, the execution node is also used to receive transaction data sent by the ordinary node and verify the transaction data.
[0008] In the present invention, it can be known that, since each execution block of the execution chain records the latest status data of the transaction data on the current chain, the validity authentication of each transaction data can be better realized through the execution node, thereby better realizing the verification of the transaction data. Among them, the execution node can verify the transaction data based on the preset verification rules, such as whether the account balance of the transfer transaction is sufficient, whether the transaction signature is correct, etc., which will not be elaborated here.
[0009] Preferably, the execution node is specifically used to: receive the confirmation block; retrieve corresponding transaction data based on the index data of the final sorting block included in the confirmation block; execute based on all transaction data in the final sorting block, and construct an execution block based on the transaction receipt data.
[0010] In the present invention, when constructing a confirmation block, it is only necessary to send the block headers of all the blocks to be sorted to the confirmation node, so that it can select the final sorting block according to the preset rules. Therefore, the execution node and the confirmation node do not need to store all transaction data additionally. When the execution node performs a task, the corresponding transaction data is retrieved according to the index data in the final sorting block to realize the orderly execution of the transaction data. Since the block header data volume is small and the transmission is fast, it can effectively reduce the storage data volume of the confirmation node and the execution node under the premise of ensuring data security and data availability.
[0011] Preferably, the sorting node is further used to send a proof response to the user corresponding to the transaction data contained in the final sorting block after the final sorting block is appended to the sorting chain; the execution node is further used to send an execution response to the user corresponding to the transaction data in the execution block after the execution block is appended to the execution chain; the confirmation node is further used to send a transaction confirmation response to the user corresponding to the transaction data in the confirmation block after the confirmation block is appended to the confirmation chain.
[0012] In the present invention, based on the above, a three-stage response to the user is implemented, wherein the data of the evidence response, execution response and confirmation response can be the time information when the relevant action is completed, so that the transaction evidence time, transaction execution time and transaction confirmation time can be expressed according to the user's requirements for the transaction return time, so as to enhance the user experience during the transaction data processing process.
[0013] The present invention also provides a data storage management method for a blockchain system based on role separation, wherein the blockchain system includes nodes of different role types, and the nodes of different role types include ordinary nodes, sorting nodes, execution nodes and confirmation nodes; a plurality of the nodes jointly construct a blockchain network, a plurality of the sorting nodes jointly construct a sorting subnetwork, a plurality of the execution nodes jointly construct an execution subnetwork, and a plurality of the confirmation nodes jointly construct a confirmation subnetwork; each node is configured with a memory pool, and the memory pool is used to realize temporary storage of transaction data, which includes the following steps: Step S1, receiving transaction data based on the common node, wherein the transaction data received by each common node is stored in a memory pool to form a transaction set, that is, the transaction set includes multiple transaction data; Step S2, synchronously performing transaction sorting on the plurality of transaction data based on the sorting node of the sorting subnetwork to generate a plurality of sorted blocks to be confirmed, wherein the sorted blocks to be confirmed include a block header and a block body, and the block body stores a plurality of transaction data in an orderly manner based on the transaction sorting result; Step S3, sending the block headers of the plurality of to-be-confirmed sorted blocks and the corresponding transaction data included therein to the execution node, and sending the block headers of the plurality of to-be-confirmed sorted blocks to the confirmation node; Step S4, confirming the multiple to-be-confirmed sorting blocks based on the confirmation node of the confirmation subnetwork, so as to select one to-be-confirmed sorting block from the multiple to-be-confirmed sorting blocks as the final sorting block, and appending the final sorting block to the sorting chain based on the sorting subnetwork; Step S5, the confirmation node constructs a confirmation block based on the index data of the final sorted block and broadcasts it to the execution subnetwork, and appends the confirmation block to the confirmation chain based on the confirmation subnetwork; Step S6, the execution node executes the transaction action based on the index data of the final sorted block included in the confirmation block, and constructs an execution block based on the transaction receipt data of all transaction data in the final sorted block, and attaches the execution block to the execution chain based on the execution subnetwork; Step S7, the confirmation node constructs a confirmation block based on the index data of the execution block, and appends the confirmation block to the confirmation chain based on the confirmation subnetwork.
[0014] In the present invention, through the data management method of the blockchain based on role separation of the present invention, multiple nodes in the entire blockchain system are divided into ordinary nodes, sorting nodes, execution nodes and confirmation nodes for assuming different responsibilities. In the process of executing transaction data on the chain, these nodes with different roles assume different responsibilities, for example: ordinary nodes are used to realize the access of transaction data to the blockchain system and broadcast actions, sorting nodes are used to realize the sorting and storage actions of transaction data, execution nodes are used to realize transaction execution, and record / update actions of the current state on the chain, and confirmation nodes are used to realize the confirmation of sorting blocks and execution blocks, as well as the management of node updates and reporting data of sub-networks. The advantage of this method is that according to the different concerns of each stage in the process of transaction data on the chain, node roles, chains and data storage are separated, and nodes with different roles respectively use their own advantageous resources to perform different tasks, and store different data respectively in the process of transaction data on the chain, thereby effectively reducing the load of the node, and realizing the full utilization of the advantageous resources of each node, so as to improve the degree of decentralization of the blockchain.
[0015] Specifically, in the sorting subnetwork, transaction sorting is performed by building a sorting chain, and the sorting nodes store all the transaction data on the chain; in the execution subnetwork, the on-chain transaction data is executed by building an execution chain, and the status of the current on-chain transaction data is updated, and the execution nodes store the latest status data of the on-chain transaction data; the confirmation subnetwork implements action supervision and management of the sorting subnetwork and the execution subnetwork by building a confirmation chain, and the confirmation nodes store the index data of the final sorting block, the index data of the execution block, the error reporting data, and the network update data.
[0016] It can be understood that when the scheme of the present disclosure is in progress, multiple ordinary nodes receive the transaction data uploaded by the corresponding users, and these transaction data will be synchronously stored in the memory pool of each node to form a transaction set; then multiple sorting nodes sort the transaction data in the transaction set based on the transaction sets in their respective memory pools to generate multiple sorted blocks to be confirmed; then all the block headers of the sorted blocks to be confirmed are sent to the confirmation node, and at the same time, all the block headers of the sorted blocks to be confirmed and the transaction summary information of the transaction data included therein (such as the transaction hash list) will be sent to the execution node; at the confirmation node, the final sorted block is selected from the multiple sorted blocks to be confirmed based on the preset rules (for example, the sorted block constructed by the sorting node that completes the sorting action the fastest is used as the final sorted block), and the final sorted block is selected according to the final sorted block. The confirmation block is constructed based on the index data of the block (such as the hash value of the block or the hash value of the block header), and the sorting node attaches the final sorting block to the sorting chain, and the relevant transaction data is also stored in the sorting node, that is, the relevant transaction data is stored on the chain; when the final sorting block is included in the confirmation chain, the transaction execution action will be triggered. At this time, the execution node updates the status data of the transaction data on the execution chain according to the transaction order in the final sorting block after the execution of each transaction data, and constructs an execution block based on the transaction receipt data of each transaction data, and stores these transaction receipt data in the execution chain; after that, the block header of the execution block is sent to the confirmation node, and the confirmation node constructs a confirmation block based on the index data of the execution block (such as the hash value of the block or the hash value of the block header), and attaches it to the confirmation chain. During the process of uploading transaction data to the chain, when constructing a sorting block or an execution block, the confirmation node always listens to and accepts new sorting blocks and execution blocks, and generates a new confirmation block including these data based on the index data of the final sorting block (such as the hash value of the block or the hash value of the block header), the index data of the execution block (such as the hash value of the block or the hash value of the block header), the error reporting data (such as the reporting information from the remaining nodes), the network update data (such as the node status change information), etc.
[0017] Based on the above, the sorting subnetwork, execution subnetwork and confirmation subnetwork in the blockchain network can asynchronously and parallelly execute different tasks. The sorting of verified transaction data, the execution of sorted transaction data and the verification of executed transaction data can be performed simultaneously in different subnetworks, thereby improving the performance of the blockchain and achieving the goal of high throughput and low latency of the blockchain system.
[0018] In the present invention, in order to further improve the security of the blockchain system, only the summary information (hash value) of the transaction data is used for the sorting node to perform the transaction sorting action. When each sorting node performs the sorting action, it will generate a new sorting block locally, that is, a sorting block to be confirmed. Each sorting block to be confirmed has a block header and a block body, and the multiple transaction data and the corresponding transaction data summary information (such as hash value) will be stored in its block body in the order of the transaction. Among them, the triggering of each sorting node to perform the sorting action needs to meet one of the two conditions: the amount of transaction data to be stored in the transaction set reaches a preset threshold (for example, the amount of transaction data reaches 100); the predetermined sorting time interval is reached (for example, the time from the last sorting action reaches 3 minutes). When the final sorting block is confirmed, the confirmation node includes the index data of the final sorting block (such as the hash value of the final sorting block) into the current confirmation block, and sends the current confirmation block to the execution node.
[0019] Preferably, based on the transaction data received by ordinary nodes, after each ordinary node receives the transaction data uploaded by the corresponding user, the ordinary node sends the corresponding transaction data to the execution node for verification; if the verification fails, the transaction based on the corresponding transaction data is terminated, and if the verification succeeds, the transaction based on the corresponding transaction data continues to be executed.
[0020] It can be known that, since each execution block of the execution chain records the latest status data of the transaction data on the current chain, the validity authentication of each transaction data can be better realized through the execution node, so that the verification of the transaction data can be better realized. Among them, the execution node can verify the transaction data based on the preset verification rules, such as whether the account balance of the transfer transaction is sufficient, whether the transaction signature is correct, etc., which will not be repeated here. After the execution node successfully verifies the transaction data, the summary information (such as the hash value) of the relevant transaction data is forwarded to the sorting node, and the relevant transaction data can continue to be broadcast between the execution nodes.
[0021] Preferably, the multiple execution nodes based on the execution subnetwork receive the confirmation block; the execution node retrieves the corresponding transaction data based on the index data of the final sorting block included in the confirmation block; the execution node executes the transaction action in an orderly manner based on the index data of the final sorting block; the execution node constructs an execution block according to the transaction execution receipt data, and broadcasts the block header of the execution block to the confirmation subnetwork, and broadcasts the execution block to ordinary nodes; and the execution block is attached to the execution chain in the execution subnetwork.
[0022] In the present invention, since the block header has the characteristics of small data volume and fast transmission, after a new sorting block is generated in the sorting subnetwork, the block header of the new sorting block and the summary information of the transaction data related thereto are sent to the execution node and the ordinary node, and the block header of the new sorting block is broadcast to the confirmation node to transmit the necessary data information. When the transaction data in the final sorting block is executed, the execution node receives the confirmation block incorporating the final sorting block, and then executes the transaction action in order according to the index data of the final sorting block, and constructs the execution block according to the transaction execution receipt data, and the block header of the execution block is broadcast to the confirmation subnetwork for verification of the executed transaction data. Data information is transmitted between nodes of different roles through the block header, so that the nodes of each role can still ensure the smooth execution of different tasks without storing the complete information of the transaction data, thereby reducing the amount of data stored by the node, effectively reducing the node load, and ensuring data security and data availability.
[0023] Preferably, the execution node obtains a block header of the final sorted block and a list of transaction summary information in the block body of the final sorted block based on the final sorted block; and based on the transaction summary information list and the sorting subnetwork, queries and obtains transaction data corresponding to the transaction summary information list.
[0024] In the present invention, the execution node searches in its memory pool according to the block header and transaction summary information of the final sorted block, or queries in the sorting sub-network to obtain relevant transaction data information for the execution of these transaction data. Therefore, the execution node does not need to store all transaction data. It only needs to query in the sorting sub-network or temporarily store in the memory pool of the execution node when verifying or executing the transaction data. After completing the execution of a transaction data, the execution node only stores or updates the status data of the transaction data, thereby greatly reducing the amount of data stored by the execution node, which is more conducive to the execution node to give full play to its resource advantages in computing power.
[0025] Preferably, after the final sorting block is attached to the sorting chain, a proof response is sent to the user corresponding to the transaction data contained therein in the final sorting block through the sorting node; after the execution block is attached to the execution chain, an execution response is sent to the user corresponding to the transaction data corresponding to the execution block through the execution node; after the confirmation block or the confirmation block is attached to the confirmation chain, a confirmation response is sent to the confirmation block or the user corresponding to the transaction data corresponding to the confirmation block through the confirmation node.
[0026] In the present invention, a three-stage response to the user is implemented through evidence response, execution response and confirmation response to enhance the user experience in the storage and management process of transaction data, and the data of evidence response, execution response and confirmation response serve as time information when the relevant actions are completed.
[0027] Preferably, after the sorting block, execution block and confirmation block exist and are attached to the sorting chain, execution chain and confirmation chain respectively, they are all broadcast to ordinary nodes.
[0028] After the execution block is generated and broadcast to the confirmation node for confirmation, the user who submitted the relevant transaction data in the transaction data included in the execution block will receive a confirmation response, that is, he will be informed that the transaction he submitted has been confirmed. At this point, the transaction data submitted by the user has completed all storage management stages of chain storage, execution and confirmation, that is, the complete storage of the on-chain data of the transaction data is realized at this time. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 Schematic diagram of the blockchain system in this embodiment.
[0030] Figure 2 Schematic diagram of the blockchain-based data storage management method in this embodiment. DETAILED DESCRIPTION
[0031] In order to further understand the content of the present invention, the present invention is described in detail in conjunction with the embodiments. It should be understood that the embodiments are only for explaining the present invention and are not intended to limit it.
[0032] In general, in most blockchain projects or solutions, each node in the P2P network is usually peer-to-peer, and each node does the same thing, which is considered to be a waste of resources. For example, all miners in the Bitcoin blockchain need to solve the PoW problem to generate a new block. Only the first valid block generated is verified and linked to the chain, and the computing power of other miners is wasted. On the other hand, the resource advantages of each node are different, and the resources required by the blockchain at different stages of the process are also different. For example, the main resource required in the execution stage of transaction data is the computing resources of the node, while the main resource required after the block is generated or received is the disk storage space of the node. Therefore, in the storage management process of transaction data, it is necessary for nodes of different roles to perform different tasks according to the resource advantages they have. In fact, the principle of "role separation" is applied to more and more blockchain systems to improve their performance, such as Hyperledger Fabric, Danksharding, Flow, etc.
[0033] Generally speaking, a blockchain system has only one single chain, but more and more blockchain systems adopt multi-chain architecture to achieve the scalability of blockchain. There are multiple chains in sidechain, cross-chain and some sharding solutions: sidechain is a relatively independent blockchain, connected to its main blockchain using a two-way hook, such as Bitcoin sidechain; cross-chain is the connection of multiple chains to form a blockchain network, such as Cosmos, Polkadot, etc.; some blockchain sharding solutions also have multiple chains, that is, one chain per shard, such as Monoxide, Danksharding, Multi-channel Fabric, etc. Multi-chain architecture is essentially the separation of chains, that is, the data on the blockchain is separated into blocks of multiple other chains according to certain rules, among which reasonable and effective separation rules are the key to achieving chain separation.
[0034] The idea that "each node in the blockchain system should store complete blockchain data" is gradually being broken. As the number of blocks in the blockchain system continues to grow, the amount of data on the blockchain is also increasing, which puts higher requirements on the storage capacity of blockchain nodes: general personal computers may no longer meet the data storage requirements of the blockchain system for nodes, and fewer and fewer nodes can store complete blockchain data, thereby reducing the degree of decentralization of the blockchain. On the other hand, when a node stores a large amount of data, the efficiency of data management of the node will decrease, and the operating cost of the node will increase significantly. Realizing "storage separation" in the storage management process of transaction data is an effective way to solve the node storage problem: off-chain storage solutions store part of the data in the cloud or other distributed storage systems, such as SlimChain; on-chain storage solutions include collaborative storage, compressed storage, etc. The goal of these solutions is to minimize the amount of data stored by nodes while ensuring data security and data availability.
[0035] like Figure 1 As shown, this embodiment provides a blockchain system, which includes nodes of different role types, and the nodes of different role types include ordinary nodes, sorting nodes, execution nodes and confirmation nodes; multiple nodes jointly construct a blockchain network, multiple sorting nodes jointly construct a sorting subnetwork, multiple execution nodes jointly construct an execution subnetwork, and multiple confirmation nodes jointly construct a confirmation subnetwork; each node is configured with a memory pool, and the memory pool is used to realize temporary storage of transaction data.
[0036] The common node is used to receive transaction data, and the transaction data received by each common node is stored in the memory pool to form a transaction set, that is, the transaction set includes multiple transaction data; the sorting node is used to perform transaction sorting actions on the multiple transaction data to generate a to-be-confirmed sorting block, wherein the to-be-confirmed sorting block includes a block header and a block body, and the block body stores multiple transaction data in order based on the transaction sorting result, and the sorting subnetwork adds a confirmed final sorting block among the multiple to-be-confirmed sorting blocks generated by the multiple sorting nodes to the sorting chain; the execution node is used to execute transaction actions, and construct an execution block according to the transaction receipt data of all the executed transaction data, and the execution subnetwork is used to attach the execution block to the execution chain; the confirmation node is used to receive the block headers of the to-be-confirmed sorting block and the execution block to confirm the final sorting and the final execution block, and construct a confirmation block according to the index data of the final sorting and the execution block, and the confirmation subnetwork is used to attach the confirmation block to the confirmation chain.
[0037] In this embodiment, multiple nodes in the entire blockchain system are divided into common nodes, sorting nodes, execution nodes, and confirmation nodes for assuming different responsibilities, that is, multiple nodes are divided into different roles according to node responsibilities. In the process of executing transaction data on the chain, these nodes of different roles are divided into different tasks, for example: common nodes are used to realize the access of transaction data to the blockchain system and broadcast actions; sorting nodes are used to realize the sorting and storage actions of transaction data; execution nodes are used to realize transaction execution and record / update actions on the current status of the blockchain; confirmation nodes are used to realize the confirmation of the sorting results of transaction data and the sorting and execution process storage actions of sorting nodes and execution nodes. Confirmation nodes are used to realize the confirmation of sorting blocks and execution blocks, as well as the management of sub-network node updates and reporting data. Through the division of labor and cooperation of nodes with different roles, the node roles, chains, and data storage are separated, and nodes with different roles can use their own advantageous resources to perform different tasks, thereby realizing the full utilization of the advantageous resources of each node, reducing the load of the node, and improving the degree of decentralization of the blockchain.
[0038] The blockchain system of this embodiment realizes the horizontal separation of node roles, chains, and storage according to the different focuses of each stage of the transaction data chain process, and unifies the separation of node roles, chains, and storage vertically, that is, nodes of each role form a chain through a consensus mechanism and store the block data of the chain.
[0039] In the network structure of the blockchain system of this embodiment, each node can dynamically join or leave any subnetwork at any time. The status of each subnetwork mainly includes a list of all nodes that have pledged deposits and the deposit amount of each node. Each node can join or leave each subnetwork by sending transaction data. When a node joins or leaves a subnetwork, the network status of the blockchain system will change.
[0040] In order to ensure the security and activity of the blockchain network, the P2P network must meet the following conditions: 1. The stake of the honest node is greater than 2 / 3. In addition, it is required that more than 2 / 3 of the stake from the sorting subnetwork, execution subnetwork, and confirmation subnetwork is controlled by the honest node of each role.
[0041] 2. To join each sub-network, a node must pledge the required deposit for the sub-network of that role. Honest nodes receive certain benefits through block rewards and transaction fees after at least one cycle. If a node violates the rules of the protocol, the node's deposit will be confiscated.
[0042] 3. The blockchain network is partially synchronous. There is an upper limit on the message transmission time and relative processing time between nodes in the blockchain network.
[0043] 4. Every node in the blockchain network can receive every message with high probability using a reliable and redundant message routing system.
[0044] Specifically, in the sorting subnetwork, transaction sorting actions are performed by building a sorting chain. In the execution subnetwork, transaction data on the chain is executed and the status is updated by building an execution chain. In the confirmation subnetwork, action supervision and management of the sorting subnetwork and the execution subnetwork are achieved by building a confirmation chain.
[0045] In this embodiment, the execution node is also used to receive transaction data sent by the ordinary node and verify the transaction data.
[0046] It can be known that, since each execution block of the execution chain records the latest status data of the current on-chain transaction data, the validity authentication of each transaction data can be better realized through the execution node, thereby better realizing the verification of the transaction data. Among them, the execution node can verify the transaction data based on the preset verification rules, such as whether the account balance of the transfer transaction is sufficient, whether the transaction signature is correct, etc., which will not be elaborated here.
[0047] In this embodiment, the execution node is specifically used to: receive a confirmation block; retrieve corresponding transaction data based on the index data of the final sorting block included in the confirmation block; execute based on all transaction data in the final sorting block, and construct an execution block for the transaction receipt data.
[0048] When building a confirmation block, it is only necessary to send the block headers of all the blocks to be sorted to the confirmation node, so that it can select the final sorted block according to the preset rules. Therefore, the execution node and the confirmation node do not need to store all transaction data additionally. When the execution node performs tasks, it retrieves the corresponding transaction data according to the index data in the final sorted block to realize the orderly execution of transaction data. Since the block header data volume is small and the transmission speed is fast, it can effectively reduce the storage data volume of the confirmation node and the execution node under the premise of ensuring data security and data availability.
[0049] In this embodiment, the sorting node is also used to send a proof response to the user corresponding to the transaction data contained in the final sorting block after the final sorting block is attached to the sorting chain; the execution node is also used to send an execution response to the user corresponding to the transaction data in the execution block after the execution block is attached to the execution chain; the confirmation node is also used to send a transaction confirmation response to the user corresponding to the transaction data in the confirmation block after the confirmation block is attached to the confirmation chain.
[0050] Based on the above, a three-stage response to the user is implemented, in which the data of the evidence response, execution response and confirmation response can be the time information when the relevant actions are completed. Therefore, according to the user's requirements for the transaction return time, the transaction evidence time, transaction execution time and transaction confirmation time can be displayed, so as to enhance the user experience during the transaction data processing process.
[0051] like Figure 2 As shown, a role-separated blockchain system based on this embodiment, this embodiment also provides a data storage management method for a role-separated blockchain system, wherein the blockchain system includes nodes of different role types, and the nodes of different role types include ordinary nodes, sorting nodes, execution nodes and confirmation nodes; a plurality of the nodes jointly construct a blockchain network, a plurality of the sorting nodes jointly construct a sorting subnetwork, a plurality of the execution nodes jointly construct an execution subnetwork, and a plurality of the confirmation nodes jointly construct a confirmation subnetwork; each node is configured with a memory pool, and the memory pool is used to realize temporary storage of transaction data, which includes the following steps: Step S1, receiving transaction data based on the common node, wherein the transaction data received by each common node is stored in a memory pool to form a transaction set, that is, the transaction set includes multiple transaction data; Step S2, synchronously performing transaction sorting on the plurality of transaction data based on the sorting node of the sorting subnetwork to generate a plurality of sorted blocks to be confirmed, wherein the sorted blocks to be confirmed include a block header and a block body, and the block body stores a plurality of transaction data in an orderly manner based on the transaction sorting result; Step S3, sending the block headers of the plurality of to-be-confirmed sorted blocks and the corresponding transaction data included therein to the execution node, and sending the block headers of the plurality of to-be-confirmed sorted blocks to the confirmation node; Step S4, confirming the multiple to-be-confirmed sorting blocks based on the confirmation node of the confirmation subnetwork, so as to select one to-be-confirmed sorting block from the multiple to-be-confirmed sorting blocks as the final sorting block, and appending the final sorting block to the sorting chain based on the sorting subnetwork; Step S5, the confirmation node constructs a confirmation block based on the index data of the final sorted block and broadcasts it to the execution subnetwork, and appends the confirmation block to the confirmation chain based on the confirmation subnetwork; Step S6, the execution node executes the transaction action based on the index data of the final sorted block included in the confirmation block, and constructs an execution block based on the transaction receipt data of all transaction data in the final sorted block, and attaches the execution block to the execution chain based on the execution subnetwork; Step S7, the confirmation node constructs a confirmation block based on the index data of the execution block, and appends the confirmation block to the confirmation chain based on the confirmation subnetwork.
[0052] In this embodiment, through the data management method of blockchain based on role separation in this case, multiple nodes in the entire blockchain system are divided into ordinary nodes, sorting nodes, execution nodes and confirmation nodes for assuming different responsibilities. In the process of executing transaction data on the chain, these nodes with different roles assume different responsibilities, for example: ordinary nodes are used to realize the access and broadcasting of transaction data to the blockchain system, sorting nodes are used to realize the sorting and storage of transaction data, execution nodes are used to realize transaction execution, and record / update the status on the current chain, and confirmation nodes are used to realize the confirmation of sorting blocks and execution blocks, as well as the management of node updates and reporting data of sub-networks. The advantage of this method is that according to the different concerns of each stage in the process of transaction data on the chain, the node roles, chains and data storage are separated, and nodes with different roles use their own advantageous resources to perform different tasks, and store different data in the process of transaction data on the chain, thereby effectively reducing the load of the node and realizing the full utilization of the advantageous resources of each node to improve the degree of decentralization of the blockchain.
[0053] Specifically, in the sorting subnetwork, transaction sorting is performed by building a sorting chain, and the sorting nodes store all the transaction data on the chain; in the execution subnetwork, the on-chain transaction data is executed by building an execution chain, and the status of the current on-chain transaction data is updated, and the execution nodes store the latest status data of the on-chain transaction data; the confirmation subnetwork implements action supervision and management of the sorting subnetwork and the execution subnetwork by building a confirmation chain, and the confirmation nodes store the index data of the final sorting block, the index data of the execution block, the error reporting data, and the network update data.
[0054] It can be understood that when the scheme of the present disclosure is in progress, multiple ordinary nodes receive the transaction data uploaded by the corresponding users, and these transaction data will be synchronously stored in the memory pool of each node to form a transaction set; then multiple sorting nodes sort the transaction data in the transaction set based on the transaction sets in their respective memory pools to generate multiple sorted blocks to be confirmed; then all the block headers of the sorted blocks to be confirmed are sent to the confirmation node, and at the same time, all the block headers of the sorted blocks to be confirmed and the transaction summary information of the transaction data included therein (such as the transaction hash list) will be sent to the execution node; at the confirmation node, the final sorted block is selected from the multiple sorted blocks to be confirmed based on the preset rules (for example, the sorted block constructed by the sorting node that completes the sorting action the fastest is used as the final sorted block), and the final sorted block is selected according to the final sorted block. The confirmation block is constructed based on the index data of the block (such as the hash value of the block or the hash value of the block header), and the sorting node attaches the final sorting block to the sorting chain, and the relevant transaction data is also stored in the sorting node, that is, the relevant transaction data is stored on the chain; when the final sorting block is included in the confirmation chain, the transaction execution action will be triggered. At this time, the execution node updates the status data of the transaction data on the execution chain according to the transaction order in the final sorting block after the execution of each transaction data, and constructs an execution block based on the transaction receipt data of each transaction data, and stores these transaction receipt data in the execution chain; after that, the block header of the execution block is sent to the confirmation node, and the confirmation node constructs a confirmation block based on the index data of the execution block (such as the hash value of the block or the hash value of the block header), and attaches it to the confirmation chain. During the process of uploading transaction data to the chain, when constructing a sorting block or an execution block, the confirmation node always listens to and accepts new sorting blocks and execution blocks, and generates a new confirmation block including these data based on the index data of the final sorting block (such as the hash value of the block or the hash value of the block header), the index data of the execution block (such as the hash value of the block or the hash value of the block header), the error reporting data (such as the reporting information from the remaining nodes), the network update data (such as the node status change information), etc.
[0055] Based on the above, the sorting subnetwork, execution subnetwork and confirmation subnetwork in the blockchain network can asynchronously and parallelly execute different tasks. The sorting of verified transaction data, the execution of sorted transaction data and the verification of executed transaction data can be performed simultaneously in different subnetworks, thereby improving the performance of the blockchain and achieving the goal of high throughput and low latency of the blockchain system.
[0056] In order to further improve the security of the blockchain system, only the summary information (hash value) of the transaction data is used for the sorting node to perform transaction sorting actions. When each sorting node performs the sorting action, it will generate a new sorting block locally, that is, a to-be-confirmed sorting block. Each to-be-confirmed sorting block has a block header and a block body. In its block body, multiple transaction data and corresponding transaction data summary information (such as hash value) will be stored in the order of transactions. Among them, the triggering of each sorting node to perform the sorting action needs to meet one of the two conditions: the amount of transaction data to be stored in the transaction set reaches the preset threshold (for example, the amount of transaction data reaches 100); the predetermined sorting time interval is reached (for example, the time from the last sorting action reaches 3 minutes). When the final sorting block is confirmed, the confirmation node will include the index data of the final sorting block (such as the hash value of the final sorting block) into the current confirmation block, and send the current confirmation block to the execution node.
[0057] In this embodiment, based on the transaction data received by ordinary nodes, after each ordinary node receives the transaction data uploaded by the corresponding user, the ordinary node sends the corresponding transaction data to the execution node for verification; if the verification fails, the transaction based on the corresponding transaction data is terminated, if the verification succeeds, the transaction based on the corresponding transaction data continues to be executed.
[0058] Since each execution block of the execution chain records the latest status data of the transaction data on the current chain, the validity authentication of each transaction data can be better realized through the execution node, so that the transaction data can be better verified. Among them, the execution node can verify the transaction data based on the preset verification rules, such as whether the account balance of the transfer transaction is sufficient, whether the transaction signature is correct, etc., which will not be repeated here. After the execution node successfully verifies the transaction data, the summary information (such as hash value) of the relevant transaction data is forwarded to the sorting node, and the relevant transaction data can continue to be broadcast between the execution nodes.
[0059] In this embodiment, the multiple execution nodes based on the execution subnetwork receive the confirmation block; the execution node retrieves the corresponding transaction data based on the index data of the final sorting block included in the confirmation block; the execution node executes the transaction action in an orderly manner based on the index data of the final sorting block; the execution node constructs an execution block according to the transaction execution receipt data, and broadcasts the block header of the execution block to the confirmation subnetwork, and broadcasts the execution block to ordinary nodes; and the execution block is attached to the execution chain in the execution subnetwork.
[0060] Since the block header has the characteristics of small data volume and fast transmission, after a new sorting block is generated in the sorting subnetwork, the block header of the new sorting block and the summary information of the transaction data related to it are sent to the execution node and the ordinary node, and the block header of the new sorting block is broadcast to the confirmation node to transmit the necessary data information. When executing the transaction data in the final sorting block, the execution node receives the confirmation block that includes the final sorting block, and then executes the transaction action in order according to the index data of the final sorting block, and builds the execution block according to the transaction execution receipt data. The block header of the execution block is broadcast to the confirmation subnetwork for verification of the executed transaction data. Through the block header, data information is transmitted between nodes of different roles, so that the nodes of each role can still ensure the smooth execution of different tasks without storing the complete information of the transaction data, thereby reducing the amount of data stored by the node, effectively reducing the node load, and ensuring data security and data availability.
[0061] In this embodiment, the execution node obtains a block header of the final sorted block and a transaction summary information list in the block body of the final sorted block based on the final sorted block; based on the transaction summary information list and the sorting subnetwork, the execution node queries and obtains transaction data corresponding to the transaction summary information list.
[0062] The execution node searches the memory pool according to the block header and transaction summary information of the final sorted block, or queries the sorting sub-network to obtain relevant transaction data information for the execution of these transaction data. Therefore, the execution node does not need to store all transaction data. It only needs to query the sorting sub-network or temporarily store it in the memory pool of the execution node when verifying or executing the transaction data. After completing the execution of a transaction data, the execution node only stores or updates the status data of the transaction data, thereby greatly reducing the amount of data stored by the execution node, which is more conducive to the execution node to give full play to its resource advantages in computing power.
[0063] In this embodiment, after the final sorting block is attached to the sorting chain, a proof response is sent to the user corresponding to the transaction data contained in the final sorting block through the sorting node; after the execution block is attached to the execution chain, an execution response is sent to the user corresponding to the transaction data corresponding to the execution block through the execution node; after the confirmation block or the confirmation block is attached to the confirmation chain, a confirmation response is sent to the confirmation block or the user corresponding to the transaction data corresponding to the confirmation block through the confirmation node.
[0064] Through evidence response, execution response and confirmation response, a three-stage response to users is achieved to enhance the user experience in the storage and management process of transaction data, and the data of evidence response, execution response and confirmation response serve as time information when the relevant actions are completed.
[0065] In this embodiment, after the sorting block, execution block, and confirmation block exist and are attached to the sorting chain, execution chain, and confirmation chain respectively, they are all broadcast to ordinary nodes.
[0066] After the execution block is generated and broadcast to the confirmation node for confirmation, the user who submitted the relevant transaction data in the transaction data included in the execution block will be returned and informed that the transaction he submitted has been confirmed. At this time, the transaction data submitted by the user has completed all storage management stages of chain storage, execution and confirmation, that is, the complete storage of the on-chain data of the transaction data is realized at this time.
[0067] In the entire data storage management process based on the blockchain system: the time from the time the user submits the transaction data to the time the transaction data is included in a final sorted block is called the evidence response time; the time from the time the transaction is submitted to the time the transaction is included in an execution block is called the executed response time; the time from the time the transaction is submitted to the time the transaction is included in a confirmation block is called the confirmation response time.
[0068] By proposing a three-stage response to users and based on the user's requirements for the return time of transaction data, the evidence response time, execution response time and confirmation response time are proposed, thereby enhancing the user experience in the entire data storage management process.
[0069] It is easy to understand that those skilled in the art can combine, split, reorganize, etc. the embodiments of the present application to obtain other embodiments based on one or several embodiments provided in the present application, and these embodiments do not exceed the protection scope of the present application.
[0070] The present invention and its implementation methods are described schematically above, and the description is not restrictive. The embodiments shown in the embodiments are only part of the implementation methods of the present invention, and the actual structure is not limited thereto. Therefore, if a person skilled in the art is inspired by the embodiments and designs a structure and an implementation method similar to the technical solution without creativity without departing from the purpose of the invention, they should all fall within the protection scope of the present invention.
Claims
1. A blockchain system with role separation, characterized by: The blockchain system includes nodes of different roles, including common nodes, sorting nodes, execution nodes and confirmation nodes; multiple nodes jointly construct a blockchain network, multiple sorting nodes jointly construct a sorting sub-network, multiple execution nodes jointly construct an execution sub-network, and multiple confirmation nodes jointly construct a confirmation sub-network; each node is configured with a memory pool, which is used to realize temporary storage of transaction data; The common node is used to receive transaction data, and the transaction data received by each common node is stored in the memory pool to form a transaction set, that is, the transaction set includes multiple transaction data; The sorting node is used to perform a transaction sorting action on the multiple transaction data to generate a to-be-confirmed sorting block, wherein the to-be-confirmed sorting block includes a block header and a block body, and the block body stores multiple transaction data in an orderly manner based on the transaction sorting result, and the sorting subnetwork adds a confirmed final sorting block among the multiple to-be-confirmed sorting blocks generated by the multiple sorting nodes to the sorting chain; The execution node is used to execute transaction actions and construct an execution block according to the transaction receipt data of all executed transaction data, and the execution subnetwork is used to attach the execution block to the execution chain; The confirmation node is used to receive the block headers of the sorting blocks and execution blocks to be confirmed to confirm the final sorting and final execution blocks, and to build a confirmation block according to the index data of the final sorting and execution blocks. The confirmation subnetwork is used to attach the confirmation block to the confirmation chain.
2. A blockchain system with role separation according to claim 1, wherein: The execution node is also used for: Receive transaction data sent by ordinary nodes and verify the transaction data.
3. A blockchain system with role separation according to claim 1, wherein: The execution node is specifically used for: receiving the confirmation block; Retrieving corresponding transaction data based on the index data of the final sorted block included in the confirmation block; Execution is performed based on all transaction data in the final sorted block, and an execution block is constructed based on the transaction receipt data.
4. A blockchain system with role separation according to claim 1, characterized in that: The sorting node is further used to send a proof response to the user corresponding to the transaction data contained in the final sorting block after the final sorting block is attached to the sorting chain; The execution node is further used to send an execution response to a user corresponding to the transaction data corresponding to the execution block in the execution block after the execution block is attached to the execution chain; The confirmation node is also used to send a transaction confirmation response to the user corresponding to the transaction data in the confirmation block after the confirmation block is attached to the confirmation chain.
5. A data storage management method for a blockchain system based on role separation, wherein: The blockchain system includes nodes of different roles, including common nodes, sorting nodes, execution nodes and confirmation nodes; a plurality of the nodes jointly construct a blockchain network, a plurality of the sorting nodes jointly construct a sorting subnetwork, a plurality of the execution nodes jointly construct an execution subnetwork, and a plurality of the confirmation nodes jointly construct a confirmation subnetwork; Each node is configured with a memory pool, which is used to implement temporary storage of transaction data, and includes: Receiving transaction data based on the common node, wherein the transaction data received by each common node is stored in a memory pool to form a transaction set, that is, the transaction set includes multiple transaction data; The sorting node based on the sorting subnetwork synchronously performs a transaction sorting action on the multiple transaction data to generate a plurality of sorted blocks to be confirmed, wherein the sorted blocks to be confirmed include a block header and a block body, and the block body stores multiple transaction data in an orderly manner based on the transaction sorting result; Sending the block headers of the plurality of to-be-confirmed sorted blocks and the corresponding transaction data included therein to the execution node, and sending the block headers of the plurality of to-be-confirmed sorted blocks to the confirmation node; Confirming the plurality of to-be-confirmed sorting blocks based on the confirmation node of the confirmation subnetwork, so as to select one to-be-confirmed sorting block from the plurality of to-be-confirmed sorting blocks as a final sorting block, and appending the final sorting block to the sorting chain based on the sorting subnetwork; The confirmation node constructs a confirmation block based on the index data of the final sorted block and broadcasts it to the execution subnetwork, and appends the confirmation block to the confirmation chain based on the confirmation subnetwork; The execution node executes the transaction action based on the index data of the final sorted block included in the confirmation block, constructs the execution block based on the transaction receipt data of all transaction data in the final sorted block, and attaches the execution block to the execution chain based on the execution subnetwork; The confirmation node constructs a confirmation block based on the index data of the execution block, and appends the confirmation block to the confirmation chain based on the confirmation subnetwork.
6. According to claim 5, a data storage management method for a blockchain system based on role separation is characterized in that: In the transaction data received based on the ordinary nodes, after each ordinary node receives the transaction data uploaded by the corresponding user, the ordinary node sends the corresponding transaction data to the execution node for verification; if the verification fails, the transaction based on the corresponding transaction data is terminated, and if the verification succeeds, the transaction based on the corresponding transaction data continues to be executed.
7. According to claim 5, a data storage management method for a blockchain system based on role separation is characterized in that: The execution node executes the transaction action based on the index data of the final sorted block included in the confirmation block, builds the execution block based on the transaction receipt data of all transaction data in the final sorted block, and attaches the execution block to the execution chain based on the execution subnetwork, including: Receiving the confirmation block based on the plurality of execution nodes of the execution subnetwork; The execution node retrieves corresponding transaction data based on the index data of the final sorted block included in the confirmation block; The execution node executes transaction actions in order based on the index data of the final sorted block; The execution node constructs an execution block according to the transaction execution receipt data, broadcasts the block header of the execution block to the confirmation subnetwork, and broadcasts the execution block to ordinary nodes; The execution block is appended to an execution chain based on the execution sub-network.
8. A data storage management method for a blockchain system based on role separation according to claim 7, characterized in that: The execution node retrieves corresponding transaction data based on the index data of the final sorting block included in the confirmation block, including: The execution node obtains a block header of the final sorted block and a list of transaction summary information in a block body of the final sorted block based on the final sorted block; Based on the transaction summary information list and the sorting subnetwork, the transaction data corresponding to the transaction summary information list is queried and obtained.
9. According to claim 5, a data storage management method for a blockchain system based on role separation is characterized in that: After the final sorting block is attached to the sorting chain, a proof response is sent to the user corresponding to the transaction data contained in the final sorting block through the sorting node; After the execution block is attached to the execution chain, an execution response is sent to a user corresponding to the transaction data corresponding to the execution block through the execution node; After the confirmation block or the confirmation block is attached to the confirmation chain, a confirmation response is sent to the confirmation block or the user corresponding to the corresponding transaction data in the confirmation block through the confirmation node.
10. According to claim 5, a data storage management method for a blockchain system based on role separation is characterized in that: After the sorting block, execution block or confirmation block exists and is attached to the corresponding sorting chain, execution chain or confirmation chain respectively, it is broadcast to ordinary nodes.
Citation Information
Patent Citations
Blockchain efficient management architecture based on cross-chain technology and working method thereof
CN112418860A
Multi-round voting type fault-tolerant sorting consensus mechanism and method based on block chain
CN112541758A
Transaction cochain method and device based on block chain, electronic equipment and storage medium
CN115222410A
Data transmission method and device, network node and block chain system
CN115733640A
Stateless fragmentation block chain system
CN117240860A