A role-separated blockchain system and data storage management method
By dividing node roles and building different chains in the blockchain system, the problems of low throughput and high storage requirements are solved, and a high-throughput, low-latency, and decentralized blockchain system is achieved.
Patent Information
- Application Number
- CN202411600708.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2044-11-11
AI Technical Summary
Existing blockchain systems suffer from low throughput, high node storage requirements, low decentralization, and an inability to effectively utilize node resource advantages.
The nodes in the blockchain system are divided into ordinary nodes, sorting nodes, execution nodes, and confirmation nodes, each undertaking different responsibilities. By constructing sorting chains, execution chains, and confirmation chains, the division of labor for processing transaction data and resource optimization are achieved.
It improves the throughput and decentralization of the blockchain system, reduces node load, and enhances the user experience and data security of transaction data processing.
Smart Images

Figure CN119449811B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computers, and in particular, to a role separation chain blockchain system and a data storage management method. BACKGROUND
[0002] In most blockchain systems, each node in the P2P network maintains and updates the same complete data. Such traditional blockchain systems have low throughput and cannot improve the throughput by expanding the network size. On the other hand, each node needs to store complete blockchain data. As the number of blocks increases, the amount of data on the blockchain also increases, which puts higher requirements on the storage capacity of the blockchain node, resulting in fewer and fewer nodes that can store complete blockchain data, thereby reducing the decentralization of the blockchain. In addition, when a node stores a large amount of data, the efficiency of data management will be reduced, and the operating cost of the node will also be significantly increased. 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, and the existing blockchain system cannot well exert the resource advantages of different nodes. SUMMARY
[0003] The present application provides a blockchain system and a data storage management method, which can overcome some or some of the defects of the prior art.
[0004] According to the blockchain system, nodes of different role categories are included, the nodes of different role categories include ordinary nodes, ordering nodes, execution nodes and confirmation nodes; the nodes jointly construct a blockchain network, the ordering nodes jointly construct an ordering subnetwork, the execution nodes jointly construct an execution subnetwork, and the confirmation nodes jointly construct a confirmation subnetwork; each node is configured with a memory pool, and the memory pool is used to temporarily store transaction data; wherein the ordinary nodes are used to receive transaction data, and the transaction data received by each ordinary node is stored in the memory pool to form a transaction set, that is, the transaction set includes multiple pieces of transaction data; the ordering nodes are used to perform transaction ordering actions on the multiple pieces of transaction data to generate a to-be-confirmed ordering block, wherein the to-be-confirmed ordering block includes a block header and a block body, and the block body sequentially stores multiple pieces of transaction data based on a transaction ordering result, the ordering subnetwork appends a final ordering block confirmed from multiple to-be-confirmed ordering blocks generated by multiple ordering nodes to an ordering chain; the execution nodes are used to perform transaction actions, and construct an execution block according to transaction receipt data of all executed transaction data, the execution subnetwork is used to append the execution block to an execution chain; and the confirmation nodes are used to receive block headers of the to-be-confirmed ordering block and the execution block to confirm a final ordering block and a final execution block, and construct a confirmation block according to index data of the final ordering block and the final execution block, and the confirmation subnetwork is used to append the confirmation block to a confirmation chain.
[0005] In the application, multiple nodes in the entire blockchain system are divided into ordinary nodes, ordering nodes, execution nodes and confirmation nodes to assume different responsibilities, that is, the multiple nodes are divided into different roles according to node responsibilities, and the nodes of different roles process different tasks in the process of executing transaction data on-chain, for example: the ordinary nodes are used to realize access and broadcast actions of transaction data to the blockchain system; the ordering nodes are used to realize ordering and storage actions of transaction data; the execution nodes are used to realize transaction execution and record / update actions of the current blockchain state; and the confirmation nodes are used to realize confirmation of ordering blocks and execution blocks, and management of subnetwork node updates and reporting data. Through cooperation of the nodes of different roles, the node roles, chains and data storage are separated, the nodes of different roles can use their own advantages to perform different tasks, thereby fully utilizing the advantages of each node, reducing the load of the node and improving the degree of decentralization of the blockchain.
[0006] Specifically, in the ordering subnetwork, transaction ordering actions are performed by constructing an ordering chain, in the execution subnetwork, on-chain transaction data is executed and the state is updated by constructing an execution chain, and in the confirmation subnetwork, action supervision and management of the ordering subnetwork and the execution subnetwork are realized by constructing a confirmation chain.
[0007] As preferred, the execution node is further configured to receive the transaction data sent by the common node and verify the transaction data.
[0008] In the present application, it can be known that, since the latest state data of the current chain transaction data recorded by each execution block of the execution chain, the validity of each transaction data can be authenticated by the execution node, thereby the verification of the transaction data can be better implemented. 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 described here.
[0009] As preferred, the execution node is specifically configured to: receive the confirmation block; retrieve the corresponding transaction data based on the index data of the final sorting block included in the confirmation block; perform based on all the transaction data in the final sorting block, and construct an execution block according to the transaction receipt data.
[0010] In the present application, when constructing the confirmation block, only the block header of all the to-be-sorted blocks needs to be sent to the confirmation node for selecting the final sorting block according to the preset rules, therefore, the execution node and the confirmation node do not need to store all the transaction data additionally, and when the execution node performs the execution task, the corresponding transaction data is retrieved according to the index data in the final sorting block to realize the ordered execution of the transaction data. Since the block header data is small and fast in transmission, it can effectively reduce the storage data amount of the confirmation node and the execution node under the premise of ensuring data security and data availability.
[0011] As preferred, the sorting node is further configured to send a record evidence 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 configured to send an execution response to the user corresponding to the transaction data corresponding to the execution block after the execution block is appended to the execution chain; and the confirmation node is further configured to send a transaction confirmation response to the user corresponding to the transaction data corresponding to the confirmation block after the confirmation block is appended to the confirmation chain.
[0012] In the present application, based on the above, three-stage responses to the user are realized, wherein the data of the record evidence response, the execution response and the confirmation response can be the time information when the related action is executed, thereby the transaction record time, the transaction execution time and the transaction confirmation time can be presented according to the user's requirement for the transaction return time, so as to enhance the user experience in the transaction data processing process.
[0013] The application further provides a data storage management method of a role separation-based blockchain system, wherein the blockchain system comprises nodes of different role categories, the nodes of different role categories comprise ordinary nodes, ordering nodes, execution nodes and confirmation nodes; a plurality of the nodes jointly construct a blockchain network, a plurality of the ordering nodes jointly construct an ordering 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 for temporarily storing transaction data and comprises the following steps:
[0014] Step S1, transaction data is received based on the ordinary nodes, wherein the transaction data accepted by each ordinary node is stored in a memory pool to form a transaction set, that is, the transaction set comprises a plurality of pieces of transaction data;
[0015] Step S2, the plurality of pieces of transaction data are synchronously subjected to transaction ordering actions based on the ordering nodes of the ordering subnetwork to generate a plurality of to-be-confirmed ordering blocks, wherein the to-be-confirmed ordering block comprises a block header and a block body, and the block body sequentially stores a plurality of pieces of transaction data based on a transaction ordering result;
[0016] Step S3, the block header of the plurality of to-be-confirmed ordering blocks and the corresponding transaction data incorporated therein are sent to the execution nodes, and the block header of the plurality of to-be-confirmed ordering blocks is sent to the confirmation nodes;
[0017] Step S4, the plurality of to-be-confirmed ordering blocks are confirmed based on the confirmation nodes of the confirmation subnetwork to select one to-be-confirmed ordering block from the plurality of to-be-confirmed ordering blocks as a final ordering block, and the final ordering block is attached to an ordering chain based on the ordering subnetwork;
[0018] Step S5, the confirmation nodes construct a confirmation block based on index data of the final ordering block and broadcast the confirmation block to the execution subnetwork, and the confirmation block is attached to a confirmation chain based on the confirmation subnetwork;
[0019] Step S6, the execution nodes execute a transaction action based on index data of the final ordering block incorporated in the confirmation block, construct an execution block based on transaction reply data of all transaction data in the final ordering block, and attach the execution block to an execution chain based on the execution subnetwork;
[0020] Step S7, the confirmation nodes construct a confirmation block based on index data of the execution block, and attach the confirmation block to the confirmation chain based on the confirmation subnetwork.
[0021] In the present application, by the data management method of the role separation-based blockchain of the present application, the plurality of nodes in the entire blockchain system are divided into ordinary nodes, ordering nodes, execution nodes and confirmation nodes to undertake different responsibilities. In the process of executing the transaction data on-chain, these nodes with different roles undertake different responsibilities, for example: the ordinary nodes are used to realize the access of transaction data to the blockchain system and the broadcast action, the ordering nodes are used to realize the ordering and storage of transaction data, the execution nodes are used to realize the transaction execution and the record / update action of the current chain state, and the confirmation nodes are used to realize the confirmation of the ordering block and the execution block, as well as the management of the node update and the report data of the sub-network. The method has the advantages that according to the different concerns in each stage of the transaction data on-chain process, the node roles, the chain and the data storage are separated, the nodes with different roles respectively utilize the advantage resources to perform different tasks, and different data are respectively stored in the process of the transaction data on-chain, thereby effectively reducing the load of the nodes and realizing the full utilization of the advantage resources of each node to improve the degree of decentralization of the blockchain.
[0022] Specifically, in the ordering sub-network, the transaction ordering action is performed by constructing an ordering chain, and the ordering nodes store all the on-chain transaction data; in the execution sub-network, the on-chain transaction data is executed by constructing an execution chain, and the state of the current on-chain transaction data is updated, and the execution nodes store the latest state data of the on-chain transaction data; the confirmation sub-network realizes the action supervision and management of the ordering sub-network and the execution sub-network by constructing a confirmation chain, and the confirmation nodes store the index data of the final ordering block, the index data of the execution block, the error report data and the network update data.
[0023] It can be understood that, in the process of the scheme of the present disclosure, the plurality of ordinary nodes receive the transaction data uploaded by the corresponding users, which will be stored in the memory pool of each node and form a transaction set; then the plurality of ordering nodes respectively order the transaction data in the transaction set based on the transaction set in the respective memory pool to generate a plurality of to-be-confirmed ordering blocks; then the block headers of all the to-be-confirmed ordering blocks are sent to the confirmation node, and the block headers of all the to-be-confirmed ordering blocks and the transaction digest information (such as the transaction hash list) of the transaction data included therein are sent to the execution node; at the confirmation node, the final ordering block is selected from the plurality of to-be-confirmed ordering blocks based on a predetermined rule (for example, the ordering block constructed by the ordering node that completes the ordering action the fastest is taken as the final ordering block), and the confirmation block is constructed according to the index data (for example, the hash value of the block or the hash value of the block header) of the final ordering block, while the final ordering block is appended to the ordering chain in the ordering node, and the related transaction data is also stored in the ordering node, that is, the related transaction data is chained and stored; at the same time when the final ordering block is included in the confirmation chain, the execution transaction action is triggered, at this time, the execution node updates the state data of the transaction data on the execution chain according to the state of each transaction data after the execution, and constructs the execution block based on the transaction receipt data of each transaction data, and stores the transaction receipt data in the execution chain; then, the block header of the execution block is sent to the confirmation node, and the confirmation node constructs the confirmation block based on the index data (for example, the hash value of the block or the hash value of the block header) of the execution block and appends it to the confirmation chain. In the process of chaining the transaction data, when constructing the ordering block or the execution block, the confirmation node always listens to and accepts new ordering blocks, execution blocks, and generates new confirmation blocks including these data based on the index data (for example, the hash value of the block or the hash value of the block header) of the final ordering block, the index data (for example, the hash value of the block or the hash value of the block header) of the execution block, error reporting data (for example, reporting information from the remaining nodes), network update data (for example, state change information of the node), etc.
[0024] Based on the above, the ordering subnetwork, the execution subnetwork and the confirmation subnetwork in the blockchain network can asynchronously and in parallel perform different tasks, and the ordering of the verified transaction data, the execution of the ordered transaction data and the verification of the executed transaction data can be performed simultaneously in different subnetworks, so as to improve the performance of the blockchain, so as to achieve the goal of high throughput and low delay of the blockchain system.
[0025] In the present application, 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. Each sorting node will generate a new sorting block locally when performing the sorting action, which is a to-be-confirmed sorting block. Each to-be-confirmed sorting block has a block header and a block body, and the block body will store multiple transaction data and corresponding transaction data summary information (such as hash value) according to the transaction order. The trigger of each sorting node to perform the sorting action needs to meet one of the two conditions: the data amount of the to-be-verified transaction data in the transaction set reaches a preset threshold (such as the data amount of the transaction data reaches 100); the predetermined sorting time interval is reached (such as the time from the last sorting action reaches 3 min). 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.
[0026] As a preferred, based on the transaction data received by the ordinary node, each ordinary node will send the corresponding transaction data to the execution node for verification after receiving the transaction data uploaded by the corresponding user; if the verification fails, the transaction based on the corresponding transaction data will be terminated, and if the verification succeeds, the transaction based on the corresponding transaction data will continue to be executed.
[0027] It can be known that since each execution block of the execution chain records the latest state data of the current chain transaction data, the effectiveness authentication of each transaction data can be preferably realized by the execution node, thereby preferably realizing the verification of the transaction data. The execution node can perform verification on the transaction data based on the preset verification rule, such as whether the account balance of the transfer transaction is sufficient, whether the transaction signature is correct, etc., which will not be described here. After the execution node verifies the transaction data successfully, the summary information (such as hash value) of the related transaction data is forwarded to the sorting node, and the related transaction data can also continue to be broadcast among the execution nodes.
[0028] As a preferred, based on the execution sub-network, the plurality of execution nodes 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 performs the transaction action in order based on the index data of the final sorting block; the execution node constructs an execution block according to the transaction execution reply data, and broadcasts the block header of the execution block to the confirmation sub-network, and broadcasts the execution block to the ordinary node; the execution sub-network appends the execution block to the execution chain.
[0029] In the present application, since the block header has the characteristics of small data volume and fast transmission, after a new ordering block is generated in the ordering subnetwork, the block header of the new ordering 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 ordering block is broadcast to the confirmation node to transmit the necessary data information. When performing the transaction data in the final ordering block, the execution node receives the confirmation block included in the final ordering block, then performs the transaction action in order according to the index data of the final ordering block, and constructs an execution block according to the transaction execution reply data. The block header of the execution block is broadcast to the confirmation subnetwork for verification of the executed transaction data. Through the data information transmission between nodes with different roles by the block header, the nodes with different roles can still ensure smooth execution of different tasks without storing the complete information of the transaction data, thereby reducing the data volume stored by the nodes, effectively reducing the node load, and ensuring data security and data availability.
[0030] Preferably, the execution node obtains the block header of the final ordering block and the list of transaction summary information in the block body of the final ordering block based on the final ordering block; and queries the transaction data corresponding to the list of transaction summary information based on the list of transaction summary information and the ordering subnetwork.
[0031] In the present application, the execution node queries or temporarily stores in the memory pool of the execution node to obtain the related transaction data information for the execution of the transaction data according to the block header of the final ordering block and the transaction summary information. Therefore, the execution node does not need to store all the transaction data, but only needs to query in the ordering subnetwork or temporarily store in the memory pool of the execution node when verifying or executing the transaction data. After the execution of the transaction data is completed, the execution node only stores or updates the state data of the transaction data, thereby greatly reducing the data volume stored by the execution node, and more advantageously, the execution node can exert its resource advantage in terms of computing power.
[0032] Preferably, after the final ordering block is appended to the ordering chain, the ordering node sends a notarization response to the user corresponding to the transaction data included in the final ordering block; after the execution block is appended to the execution chain, the execution node sends an execution response to the user corresponding to the transaction data corresponding to the execution block; and after the confirmation block or the confirmation block is appended to the confirmation chain, the confirmation node sends a confirmation response to the user corresponding to the transaction data corresponding to the confirmation block or the confirmation block.
[0033] In the present application, three-stage responses to the user are realized through the storage response, execution response and confirmation response to enhance the user experience in the storage management process of transaction data, and the data of the storage response, execution response and confirmation response are time information when the related actions are completed.
[0034] As preferred, the sorting block, execution block and confirmation block exist and are respectively attached to the sorting chain, execution chain and confirmation chain, and are broadcast to the general nodes.
[0035] After the execution block is generated and broadcast to the confirmation node and confirmed, the user who submitted the related transaction data in the transaction data included in the execution block will receive a confirmation response, i.e., be informed that the transaction submitted by the user has been confirmed, at which time the transaction data submitted by the user has completed all storage management stages of on-chain storage, execution and confirmation, i.e., at which time the complete storage of the on-chain data of the transaction data is realized. BRIEF DESCRIPTION OF DRAWINGS
[0036] Figure 1 A schematic diagram of the blockchain system in the present embodiment.
[0037] Figure 2 A schematic diagram of the blockchain-based data storage management method in the present embodiment. DETAILED DESCRIPTION
[0038] For a further understanding of the present application, the application will be described in detail with reference to the embodiments. It should be understood that the embodiments are only used to explain the present application and are not limiting.
[0039] In general, in most blockchain projects or schemes, each node in the P2P network is usually equal, 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 puzzle to produce a new block. Only the first generated valid block 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 are also different at different stages. For example, the main resource required in the execution stage of transaction data is the computing resource of the node, and 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 with different roles to perform different tasks according to their resource advantages. 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.
[0040] Generally speaking, a blockchain system has only one single chain, but more and more blockchain systems use multi-chain architecture to realize the scalability of the blockchain, and 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 a separation of chains, that is, the data on the blockchain is separated into other multiple chains according to certain rules, and a reasonable and effective separation rule is the key to realizing chain separation.
[0041] The idea that "every node in the blockchain system should store complete blockchain data" is gradually being broken, and 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 the blockchain node: a general personal computer may no longer be able to meet the data storage requirements of the blockchain system for the node, and the number of nodes that can store complete blockchain data is decreasing, 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 the node's data management will decrease, and the operating cost of the node will increase significantly. The implementation of "storage separation" in the process of storage and management 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 cooperative storage, compressed storage, etc. The goal of these solutions is to minimize the amount of data stored by the node while ensuring data security and data availability.
[0042] As shown in Figure 1 The embodiment provides a blockchain system, which comprises nodes of different role categories, the nodes of different role categories comprising ordinary nodes, ordering nodes, execution nodes and confirmation nodes; a plurality of the nodes jointly construct a blockchain network, a plurality of the ordering nodes jointly construct an ordering 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 for realizing temporary storage of transaction data.
[0043] The ordinary node is configured to receive transaction data, and each ordinary node receives transaction data and stores the transaction data in a memory pool to form a transaction set, i.e., the transaction set includes multiple pieces of transaction data; the ordering node is configured to perform transaction ordering on the multiple pieces of transaction data to generate a to-be-confirmed ordering block, wherein the to-be-confirmed ordering block includes a block header and a block body, the block body stores multiple pieces of transaction data in an order based on a transaction ordering result, the ordering subnetwork appends a confirmed final ordering block from multiple to-be-confirmed ordering blocks generated by multiple ordering nodes to an ordering chain; the execution node is configured to perform a transaction action and build an execution block based on transaction receipt data of all executed transaction data; the execution subnetwork is configured to append the execution block to an execution chain; and the confirmation node is configured to receive a block header of the to-be-confirmed ordering block and the execution block to confirm a final ordering block and a final execution block, and build a confirmation block based on index data of the final ordering block and the final execution block, and the confirmation subnetwork is configured to append the confirmation block to a confirmation chain.
[0044] In this embodiment, multiple nodes in the entire blockchain system are divided into ordinary nodes, ordering nodes, execution nodes and confirmation nodes to assume different responsibilities, i.e., the multiple nodes are divided into different roles according to node responsibilities, and the nodes with different roles process different tasks in the process of executing transaction data on-chain, for example: the ordinary node is configured to realize transaction data access to the blockchain system and broadcast action; the ordering node is configured to realize transaction data ordering and storage action; the execution node is configured to realize transaction execution and record / update action of the current blockchain state; and the confirmation node is configured to realize transaction data ordering result confirmation and ordering node, execution node ordering and execution process storage action. The confirmation node is configured to realize ordering block and execution block confirmation, and management of subnetwork node update and reporting data. Through the division of labor of nodes with different roles, the node roles, chains and data storage are separated, the nodes with different roles can use their own advantages to perform different tasks, thereby fully utilizing the advantages of each node, reducing the load of the node and improving the degree of decentralization of the blockchain.
[0045] The blockchain system of this embodiment separates the node roles, chains and storage horizontally according to different points of attention in each stage of the transaction data on-chain process, and unifies the separation of the node roles, chains and storage vertically, i.e., the nodes with each role form a chain through a consensus mechanism and store block data of the chain.
[0046] In the network structure of the blockchain system of the embodiment, each node can dynamically join any subnetwork or leave any subnetwork at any time, and the state of each subnetwork mainly includes a list of all nodes that have staked deposits and the amount of deposits 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 state of the blockchain system changes.
[0047] To ensure the security and activity of the blockchain network, the P2P network must meet the following conditions:
[0048] 1. The rights of honest nodes are greater than 2 / 3. In addition, it is required that more than 2 / 3 of the rights come from honest nodes in each role in the ordering subnetwork, the execution subnetwork, and the confirmation subnetwork.
[0049] 2. To join each subnetwork, a node must stake the required deposit for the role of the subnetwork. Honest nodes obtain certain benefits through block rewards, transaction fees, and the like after at least one period. If a node violates the rules of the agreement, the deposit of the node is confiscated.
[0050] 3. The blockchain network is partially synchronized. There is an upper limit to the message transmission time and relative processing time between nodes in the blockchain network.
[0051] 4. Each node of the blockchain network can use a reliable and redundant message routing system to receive each message with a high probability.
[0052] Specifically, in the ordering subnetwork, transaction ordering actions are performed by constructing an ordering chain, in the execution subnetwork, on-chain transaction data is executed and the state is updated by constructing an execution chain, and in the confirmation subnetwork, the actions of the ordering subnetwork and the execution subnetwork are supervised and managed by constructing a confirmation chain.
[0053] In the embodiment, the execution node is also used to receive transaction data sent by the ordinary node and verify the transaction data.
[0054] It can be known that since each execution block of the execution chain records the latest state data of the current on-chain transaction data, the effectiveness of each transaction data can be authenticated by the execution node, thereby verifying the transaction data. The execution node can verify the transaction data based on a predetermined verification rule, such as whether the account balance of a transfer transaction is sufficient, whether the transaction signature is correct, and the like, which will not be described here.
[0055] In this embodiment, the execution node is specifically configured to: receive the confirmation block; retrieve corresponding transaction data based on index data of the final sorting block included in the confirmation block; perform based on all transaction data in the final sorting block, and construct an execution block for transaction receipt data.
[0056] When constructing the confirmation block, only the block headers of all to-be-sorted blocks need to be sent to the confirmation node for selecting 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. When the execution node performs the execution task, the corresponding transaction data is retrieved according to the index data in the final sorting block to realize the ordered execution of the transaction data. Because the block header data is small and fast to transmit, the storage data amount of the confirmation node and the execution node can be effectively reduced under the premise of ensuring data security and data availability.
[0057] In this embodiment, the sorting node is further configured to send a record storage response to a user corresponding to transaction data contained in the final sorting block after the final sorting block is appended to the sorting chain; the execution node is further configured to send an execution response to a user corresponding to transaction data corresponding to the execution block after the execution block is appended to the execution chain; and the confirmation node is further configured to send a transaction confirmation response to a user corresponding to transaction data corresponding to the confirmation block after the confirmation block is appended to the confirmation chain.
[0058] Based on the above, three-stage responses to the user are realized. The data of the record storage response, the execution response, and the confirmation response can be time information when the related action is performed. Therefore, the transaction record storage time, the transaction execution time, and the transaction confirmation time can be displayed according to the user's requirement for the transaction return time, thereby enhancing the user experience in the transaction data processing process.
[0059] As shown in Figure 2 Based on the role-separated blockchain system of the present embodiment, the present embodiment further provides a data storage management method of a role-separated blockchain system. The blockchain system includes nodes of different role categories, including ordinary nodes, sorting nodes, execution nodes, and confirmation nodes. A plurality of nodes jointly construct a blockchain network, a plurality of sorting nodes jointly construct a sorting subnetwork, a plurality of execution nodes jointly construct an execution subnetwork, and a plurality of confirmation nodes jointly construct a confirmation subnetwork. Each node is configured with a memory pool for temporarily storing transaction data, which includes the following steps:
[0060] Step S1, receiving transaction data based on the ordinary node, wherein the transaction data accepted by each ordinary node is stored in the memory pool to form a transaction set, that is, the transaction set includes a plurality of transaction data;
[0061] Step S2, synchronously performing transaction ordering action on the multiple transaction data based on the ordering nodes of the ordering subnetwork to generate multiple to-be-confirmed ordering blocks, wherein the to-be-confirmed ordering block comprises a block header and a block body, and the block body sequentially stores multiple pieces of transaction data based on transaction ordering results;
[0062] Step S3, sending the block header of the multiple to-be-confirmed ordering blocks and the corresponding transaction data incorporated therein to the execution node, and sending the block header of the multiple to-be-confirmed ordering blocks to the confirmation node;
[0063] Step S4, confirming the multiple to-be-confirmed ordering blocks based on the confirmation node of the confirmation subnetwork to select one to-be-confirmed ordering block from the multiple to-be-confirmed ordering blocks as a final ordering block, and appending the final ordering block to the ordering chain based on the ordering subnetwork;
[0064] Step S5, the confirmation node constructs a confirmation block based on the index data of the final ordering block and broadcasts it to the execution subnetwork, and appends the confirmation block to the confirmation chain based on the confirmation subnetwork;
[0065] Step S6, the execution node performs transaction action based on the index data of the final ordering block incorporated in the confirmation block, and constructs an execution block based on the transaction reply data of all transaction data in the final ordering block, and appends the execution block to the execution chain based on the execution subnetwork;
[0066] 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.
[0067] In this embodiment, by using the role separation based blockchain data management method, the plurality of nodes in the entire blockchain system are divided into ordinary nodes, ordering nodes, execution nodes and confirmation nodes to undertake different responsibilities. In the process of executing the transaction data on-chain, these nodes with different roles undertake different responsibilities, for example: the ordinary nodes are used to realize the access of transaction data to the blockchain system and the broadcast action, the ordering nodes are used to realize the ordering and storage of transaction data, the execution nodes are used to realize the transaction execution and the record / update of the current chain state, and the confirmation nodes are used to realize the confirmation of the ordering block and the execution block, and the management of the node update and the report data of the subnetwork. The method has the advantages that according to the different concerns in the process of transaction data on-chain, the node roles, the chain and the data storage are separated, the nodes with different roles respectively use their own advantage resources to perform different tasks, and different data are respectively stored in the process of transaction data on-chain, thereby effectively reducing the load of the nodes and fully utilizing the advantage resources of each node to improve the degree of decentralization of the blockchain.
[0068] Specifically, in the ordering subnetwork, the transaction ordering action is performed by constructing an ordering chain, and the ordering nodes store all the on-chain transaction data; in the execution subnetwork, the on-chain transaction data is executed by constructing an execution chain, and the state of the current on-chain transaction data is updated, and the execution nodes store the latest state data of the on-chain transaction data; the confirmation subnetwork realizes the action supervision and management of the ordering subnetwork and the execution subnetwork by constructing a confirmation chain, and the confirmation nodes store the index data of the final ordering block, the index data of the execution block, the error report data and the network update data.
[0069] It can be understood that, in the process of the scheme, the plurality of ordinary nodes receive the transaction data uploaded by the corresponding users, which will be stored in the memory pool of each node and form a transaction set; then the plurality of ordering nodes respectively order the transaction data in the transaction set based on the transaction set in the respective memory pool to generate a plurality of to-be-confirmed ordering blocks; then the block headers of all the to-be-confirmed ordering blocks are sent to the confirmation node, and the block headers of all the to-be-confirmed ordering blocks and the transaction digest information (such as the transaction hash list) of the transaction data included therein are sent to the execution node; at the confirmation node, the final ordering block is selected from the plurality of to-be-confirmed ordering blocks based on a predetermined rule (for example, the ordering block constructed by the ordering node that completes the ordering action the fastest is taken as the final ordering block), and the confirmation block is constructed according to the index data (for example, the hash value of the block or the hash value of the block header) of the final ordering block, while the final ordering block is appended to the ordering chain in the ordering node, and the related transaction data is also stored in the ordering node, that is, the related transaction data is chained and stored; at the same time when the final ordering block is included in the confirmation chain, the execution transaction action is triggered, at this time, the execution node updates the state data of the transaction data on the execution chain according to the state of each transaction data after the execution, and constructs the execution block based on the transaction receipt data of each transaction data, and stores the transaction receipt data in the execution chain; then, the block header of the execution block is sent to the confirmation node, and the confirmation node constructs the confirmation block based on the index data (for example, the hash value of the block or the hash value of the block header) of the execution block and appends it to the confirmation chain. In the process of chaining the transaction data, when constructing the ordering block or the execution block, the confirmation node always listens to and accepts new ordering blocks, execution blocks, and generates new confirmation blocks including these data based on the index data (for example, the hash value of the block or the hash value of the block header) of the final ordering block, the index data (for example, the hash value of the block or the hash value of the block header) of the execution block, error reporting data (for example, reporting information from the remaining nodes), network update data (for example, state change information of the node), etc.
[0070] Based on the above, the ordering subnetwork, the execution subnetwork and the confirmation subnetwork in the blockchain network can asynchronously and in parallel perform different tasks, and the ordering of the verified transaction data, the execution of the ordered transaction data and the verification of the executed transaction data can be performed simultaneously in different subnetworks, so as to improve the performance of the blockchain, so as to achieve the goal of high throughput and low delay of the blockchain system.
[0071] 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 transaction sorting action of the sorting node. Each sorting node generates a new sorting block locally when performing the sorting action, which is a to-be-confirmed sorting block. Each to-be-confirmed sorting block has a block header and a block body, and the block body will store multiple transaction data and corresponding transaction data summary information (such as hash value) in the order of transaction. The trigger of the sorting action performed by each sorting node needs to meet one of the two conditions: the data amount of the to-be-verified transaction data in the transaction set reaches a preset threshold (for example, the data amount of the transaction data reaches 100); the predetermined sorting time interval is reached (for example, the time from the last sorting action reaches 3 min). When the final sorting block is confirmed, the confirmation node includes the index data (such as the hash value of the final sorting block) of the final sorting block in the current confirmation block, and sends the current confirmation block to the execution node.
[0072] In this embodiment, based on the transaction data received by the ordinary node, each ordinary node sends the corresponding transaction data to the execution node for verification after receiving the transaction data uploaded by the corresponding user. If the verification fails, the transaction based on the corresponding transaction data is terminated. If the verification is successful, the transaction based on the corresponding transaction data continues to be executed.
[0073] Since each execution block of the execution chain records the latest state data of the current chain transaction data, the effectiveness of each transaction data can be authenticated by the execution node, thereby verifying the transaction data. The execution node can perform verification on the transaction data based on the preset verification rule, such as whether the account balance of the transfer transaction is sufficient, whether the transaction signature is correct, and the like, which is not described here. After the execution node verifies the transaction data successfully, the summary information (such as hash value) of the related transaction data is forwarded to the sorting node, and the related transaction data can also continue to be broadcast among the execution nodes.
[0074] In this embodiment, the plurality of execution nodes of the execution subnetwork receive the confirmation block; the execution nodes retrieve the corresponding transaction data based on the index data of the final sorting block included in the confirmation block; the execution nodes perform the transaction action in order based on the index data of the final sorting block; the execution nodes construct an execution block according to the transaction execution receipt data, broadcast the block header of the execution block to the confirmation subnetwork, broadcast the execution block to the ordinary node; and the execution subnetwork appends the execution block to the execution chain.
[0075] Due to the small amount of data and fast transmission of the block header, after a new ordering block is generated in the ordering subnetwork, the block header of the new ordering 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 ordering block is broadcast to the confirmation node to transmit the necessary data information. When performing the transaction data in the final ordering block, the execution node receives the confirmation block included in the final ordering block, then performs the transaction action in order according to the index data of the final ordering block, and constructs an execution block according to the transaction execution reply data. The block header of the execution block is broadcast to the confirmation subnetwork for verification of the executed transaction data. Through the data information transmission between nodes with different roles by the block header, the nodes with different roles can still ensure smooth execution of different tasks without storing the complete information of the transaction data, thereby reducing the amount of data stored by the nodes, effectively reducing the load of the nodes, and ensuring data security and data availability.
[0076] In this embodiment, the execution node obtains the block header of the final ordering block and the transaction summary information list in the block body of the final ordering block based on the final ordering block; and queries the transaction data corresponding to the transaction summary information list based on the transaction summary information list and the ordering subnetwork.
[0077] The execution node retrieves in its memory pool or queries in the ordering subnetwork according to the block header of the final ordering block and the transaction summary information to obtain the related transaction data information for the execution of the transaction data. Therefore, the execution node does not need to store all the transaction data, but only needs to temporarily store in the memory pool of the execution node or query in the ordering subnetwork when verifying or executing the transaction data. After the execution of the transaction data is completed, the execution node only stores or updates the state data of the transaction data, thereby greatly reducing the amount of data stored by the execution node and more effectively utilizing the computing power of the execution node.
[0078] In this embodiment, after the final ordering block is appended to the ordering chain, the ordering node sends a notarization response to the user corresponding to the transaction data included in the final ordering block; after the execution block is appended to the execution chain, the execution node sends an execution response to the user corresponding to the transaction data corresponding to the execution block; and after the confirmation block or the confirmation block is appended to the confirmation chain, the confirmation node sends a confirmation response to the user corresponding to the transaction data corresponding to the confirmation block or the confirmation block.
[0079] Through the storage certificate response, the execution response and the confirmation response, three-stage responses to the user are realized to enhance the user experience in the storage management process of transaction data, and the data of the storage certificate response, the execution response and the confirmation response are time information when the related actions are completed.
[0080] In the embodiment, the sorting block, the execution block and the confirmation block exist and are respectively attached to the sorting chain, the execution chain and the confirmation chain, and are broadcast to the ordinary node.
[0081] After the execution block is generated and broadcast to the confirmation node and confirmed, the user who submits the related transaction data in the transaction data included in the execution block will be returned and informed that the transaction submitted by the user has been confirmed, at this time, the transaction data submitted by the user completes all storage management stages of on-chain storage, execution and confirmation, that is, at this time, the complete storage of the on-chain data of the transaction data is realized.
[0082] In the entire data storage management process based on the blockchain system: from the time point when the user submits the transaction data to the time point when the transaction data is included in a final sorting block, the time experienced is called storage certificate response time; from the time point when the transaction is submitted to the time point when the transaction is included in an execution block, the time experienced is called executed response time; from the time point when the transaction is submitted to the time when the transaction is included in a confirmation block, the time is called confirmation response time.
[0083] Through the three-stage response to the user and the storage certificate response time, the execution response time and the confirmation response time according to the user's requirement for the return time of the transaction data, the user experience in the entire data storage management process is enhanced.
[0084] It is easy to understand that, based on one or more embodiments provided in the present application, other embodiments can be obtained by combining, splitting, recombining, etc. of the embodiments of the present application, and these embodiments do not exceed the protection scope of the present application.
[0085] The above describes the present application and its embodiments in a schematic manner, and the description is not restrictive, and the embodiments shown are only part of the embodiments of the present application, and the actual structure is not limited thereto. Therefore, if a person skilled in the art is inspired thereby, without departing from the spirit of the present application, similar structural modes and embodiments can be designed without creativity, which should belong to the protection scope of the present application.
Claims
1. A role-separated blockchain system, characterized in that: The blockchain system includes nodes with different roles, including ordinary nodes, sorting nodes, execution nodes, and confirmation nodes. Multiple nodes jointly construct the 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, which is used for temporary storage of transaction data. The ordinary nodes are used to receive transaction data. The transaction data received by each ordinary node is stored in a memory pool to form a transaction set, that is, the transaction set includes multiple transaction data. The sorting node is used to sort the multiple transaction data to generate a sorting block to be confirmed. The sorting block to be confirmed includes a block header and a block body. The block body stores multiple transaction data in an orderly manner based on the transaction sorting results. The sorting sub-network appends one confirmed final sorting block from the multiple sorting blocks to be confirmed generated by the multiple sorting nodes to the sorting chain. The execution node is used to execute transaction actions and construct an execution block based on the transaction receipt data of all executed transaction data. The execution sub-network 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 and the execution block to confirm the final sorting and the final execution block, and to construct a confirmation block based on the index data of the final sorting and the execution block. The confirmation sub-network is used to attach the confirmation block to the confirmation chain.
2. A role-separation blockchain system 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 role-separation blockchain system according to claim 1, wherein, The execution node is specifically used for: Receive the confirmation block; Retrieve the corresponding transaction data based on the index data of the final sorted blocks included in the confirmed 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 role-separation blockchain system according to claim 1, characterized in that: The sorting node is also used to send a proof-of-existence response to the user corresponding to the transaction data contained in the final sorted block after the final sorted 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.
5. A data storage management method for a role-based blockchain system, wherein, The blockchain system includes nodes with different roles, including 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, which is used for temporary storage of transaction data and includes: Based on the transaction data received by the ordinary nodes, the transaction data received by each ordinary node is stored in a memory pool to form a transaction set, that is, the transaction set includes multiple transaction data. The sorting nodes of the sorting sub-network synchronously perform transaction sorting operations on the multiple transaction data to generate multiple sorting blocks to be confirmed. Each sorting block to be confirmed 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 results. The block headers of the multiple unconfirmed sorted blocks and the corresponding transaction data they contain are sent to the execution node, and the block headers of the multiple unconfirmed sorted blocks are sent to the confirmation node. The confirmation nodes of the confirmation subnetwork confirm the plurality of unconfirmed sorting blocks, select one unconfirmed sorting block from the plurality of unconfirmed sorting blocks as the final sorting block, and attach the final sorting block to the sorting chain based on the sorting subnetwork. The confirming node constructs a confirming block based on the index data of the final sorted block and broadcasts it to the execution sub-network, and appends the confirming block to the confirming chain based on the confirming sub-network; The execution node executes transaction actions based on the index data of the final sorted block included in the confirmation block, 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 sub-network; The confirmation node constructs a confirmation block based on the index data of the execution block, and attaches the confirmation block to the confirmation chain based on the confirmation sub-network.
6. The data storage management method for a role-separation-based blockchain system according to claim 5, characterized in that: In the transaction data received by 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 is successful, the transaction based on the corresponding transaction data continues to be executed.
7. The data storage management method for a role-separation-based blockchain system according to claim 5, characterized in that, The execution node executes transaction actions based on the index data of the final sorted block included in the confirmation block, constructs an execution block based on the transaction receipt data of all transaction data in the final sorted block, and appends the execution block to the execution chain based on the execution sub-network, including: The plurality of execution nodes in the execution sub-network receive the confirmation block; The execution node retrieves the corresponding transaction data based on the index data of the final sorted blocks included in the confirmation block; The execution node executes transaction actions in an orderly manner based on the index data of the final sorted block; The execution node constructs an execution block based on the transaction execution receipt data, broadcasts the block header of the execution block to the confirmation sub-network, and broadcasts the execution block to ordinary nodes; The execution block is attached to the execution chain based on the execution sub-network.
8. The data storage management method for a role-separation-based blockchain system according to claim 7, characterized in that, The execution node retrieves the corresponding transaction data based on the index data of the final sorted blocks included in the confirmation block, including: The execution node obtains a list of transaction digest information from the block header and 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 retrieved.
9. A data storage management method for a role-separation-based blockchain system according to claim 5, characterized in that: After the final sorted block is appended to the sorting chain, a proof of transaction response is sent to the user corresponding to the transaction data contained in the final sorted block through the sorting node. After the execution block is attached to the execution chain, the execution node sends an execution response to the user corresponding to the transaction data in the execution block. After the confirmation block or confirmation block is attached to the confirmation chain, the confirmation node sends a confirmation response to the user corresponding to the corresponding transaction data in the confirmation block or the confirmation block.
10. A data storage management method for a role-separation-based blockchain system according to claim 5, characterized in that: Once a sorting block, execution block, or confirmation block exists and is appended to its corresponding sorting chain, execution chain, or confirmation chain, it is broadcast to ordinary nodes.
Citation Information
Patent Citations
Blockchain efficient management architecture based on cross-chain technology and working method thereof
CN112418860A
Data transmission method and device, network node and block chain system
CN115733640A