Blockchain information asynchronous processing method and system
By asynchronously executing transaction sorting and execution in the blockchain system and separating block consensus and drop-off steps, the problem of low processing speed in the existing technology is solved, and efficient transaction processing and TPS improvement is achieved.
Patent Information
- Application Number
- CN202111631435.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2041-12-28
AI Technical Summary
The existing blockchain system has a low processing speed and cannot implement asynchronous processing because the chain structure relies on the information of the previous block.
By splitting the transaction processing steps, it is transaction sorting, transaction execution, block consensus and block dropping. The asynchronous execution method is adopted. The transaction sorting and execution are separated. The block consensus and dropping are parallel. Only the sorting results are broadcast to reduce the size of transmission information, allowing pre-processing of transactions.
It improves transaction processing speed (tps), reduces network complexity, enhances the processing capabilities of blockchain systems, reduces the time for nodes to do nothing, and optimizes overall performance.
Smart Images

Figure CN114266573B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of blockchain, and in particular to a method and system for asynchronous information processing in blockchain. Background Art
[0002] In the chain structure of a blockchain system, block generation depends on the information in the previous block, so current blockchains still use a serial blocking block processing method. Research on consortium blockchain scenarios has found that few consortium chains frequently experience erroneous blocks. Therefore, a different approach can be adopted: treating received information as correct and processing it accordingly. Since it has not yet been uploaded to the chain, any errors can be rolled back.
[0003] A patent document with publication number CN110990418A discloses an asynchronous processing method and device based on blockchain user data. The blockchain system includes a storage node and a block-producing node, which is applied to a first blockchain storage node. The first blockchain storage node includes a first public key and a first private key, and the first public key corresponds to the first private key. The method includes: receiving a user data storage request sent by a user device, where the user data includes the data to be stored and the time to be stored; storing the user data through a local database and generating a first storage certificate; wherein the storage certificate includes a user ID, user data, user data ID, a hash value of the user data, a storage address of the user data, a signature of the user data by the first private key, and the first public key; and sending the first storage certificate to the user device to prompt the user that the user data has been stored.
[0004] Therefore, it is necessary to propose a new technical solution. Summary of the Invention
[0005] In view of the defects in the prior art, the purpose of the present invention is to provide a method and system for asynchronous information processing of blockchain.
[0006] According to the present invention, a method for asynchronously processing information on a blockchain is provided, the method comprising the following steps:
[0007] Step S1: The transaction is broadcast to the network through the client, with priority given to the consensus node;
[0008] Step S2: The block producer and consensus node are selected according to the election rules and the block producer is judged to be the current legal block producer. If the sorting result is signed and broadcast by the legal block producer, a simple consensus is performed on the sorting and transaction pre-execution is started based on the sorting. Otherwise, the illegal sorting is directly discarded.
[0009] Step S3: After receiving the block producer’s ranking, each consensus node performs a missing check on the ranking;
[0010] Step S4: After receiving the sort and successfully pulling the missing transactions, execute the transactions and cache the execution results, and start the block consensus;
[0011] Step S5: Select the consensus algorithm according to the needs and proceed with the consensus process. After confirming that the previous block consensus is successful, a new round of consensus begins. If the consensus is successful, the transaction begins.
[0012] Step S6: After consensus is successful, the cached transaction execution results are written to the chain.
[0013] Preferably, the consensus nodes in step S1 receive the transaction. If some consensus nodes do not collect complete transactions, the missing transactions are obtained in step S3.
[0014] Preferably, in step S2, when the number of local transactions of the block producer reaches a threshold, the received transactions are sorted by time and the sorting results are broadcast to all consensus nodes. All consensus nodes conduct a simple consensus on the sorting to confirm that the sorting has been accepted by the nodes. If the consensus times out, the next block producer is allowed to start sorting.
[0015] Preferably, in step S3, if there are transactions that are not available locally in the sorting, the transaction set is pulled from the block producer. If the block producer does not respond for a long time, the block producer is replaced through the CFT consensus algorithm.
[0016] Preferably, in step S4, if the order of the next block has been received, execution starts directly without waiting for the consensus result of the previous block;
[0017] If the consensus fails in step S5, the sorting and transaction execution cache are rolled back, and a new block producer is re-elected for sorting.
[0018] The present invention also provides a blockchain information asynchronous processing system, which includes the following modules:
[0019] Module M1: broadcasts the transaction to the network through the client, giving priority to transmitting it to the consensus node;
[0020] Module M2: The block producer and consensus node are selected according to the election rules and the block producer is judged to be the current legal block producer. If the sorting result is signed and broadcast by the legal block producer, a simple consensus is performed on the sorting and transaction pre-execution is started based on the sorting. Otherwise, the illegal sorting is directly discarded.
[0021] Module M3: After receiving the block producer’s ranking, each consensus node performs a missing check on the ranking;
[0022] Module M4: After receiving the sort order and successfully pulling the missing transactions, it executes the transactions and caches the execution results, starting the block consensus;
[0023] Module M5: Select the consensus algorithm based on the needs and proceed with the consensus process. After confirming that the previous block consensus is successful, a new round of consensus begins. If the consensus is successful, the transaction begins.
[0024] Module M6: After consensus is successful, the cached transaction execution results are written to the chain.
[0025] Preferably, the consensus nodes in the module M1 receive transactions. If some consensus nodes do not collect complete transactions, the missing transactions are obtained in the module M3.
[0026] Preferably, when the number of local transactions of the block producer in the module M2 reaches a threshold, the received transactions are sorted by time and the sorting results are broadcast to all consensus nodes. All consensus nodes conduct a simple consensus on the sorting to confirm that the sorting has been accepted by the nodes. If the consensus times out, the next block producer will start sorting.
[0027] Preferably, in the module M3, if there are transactions that are not available locally in the sorting, the transaction set is pulled from the block producer. If the block producer does not respond for a long time, the block producer is replaced through the CFT consensus algorithm.
[0028] Preferably, if the module M4 has received the order of the next block, it starts executing directly without waiting for the consensus result of the previous block;
[0029] If the consensus fails in the module M5, the sorting and transaction execution cache are rolled back, and a new block producer is re-elected for sorting.
[0030] Compared with the prior art, the present invention has the following beneficial effects:
[0031] 1. This invention solves the long-standing problem of slow processing speed in blockchain systems. Because the chain structure relies on the information of the previous block, asynchronous processing has always been impossible. While ensuring system consistency and activity, this invention splits each processing step and executes them asynchronously, increasing transaction throughput (TPS). The solution of only broadcasting the sorting results eliminates the block size limit, further increasing transaction throughput (TPS).
[0032] 2. This invention improves the TPS of the blockchain system as a whole and reduces network complexity. It transforms the broadcast transmission of blocks into sorted broadcast transmission, significantly reducing the size of transmitted information.
[0033] 3. The present invention uses a pre-transaction sorting solution to allow the blockchain to pre-process transactions, eliminating the need to wait for the previous block to be fully uploaded to the chain before proceeding to the next step, thereby reducing the inactivity time of each node and improving time utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings:
[0035] Figure 1 A flowchart for block processing in the existing blockchain;
[0036] Figure 2 It is a processing flow chart of the present invention. DETAILED DESCRIPTION
[0037] The present invention will be described in detail below with reference to specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those skilled in the art, several changes and improvements can be made without departing from the scope of the present invention. These all fall within the scope of protection of the present invention.
[0038] Reference Figure 1 and Figure 2 The present invention provides a method and system for asynchronous information processing of blockchain. The method performs asynchronous information processing based on blockchain and provides a solution for efficient transaction processing for blockchain systems. The method includes several asynchronous modules: transaction sorting, transaction execution, block consensus, and block storage. In existing blockchain systems, the above four steps are performed in a blocking serial manner, resulting in low transaction processing speed. The present system separates transaction sorting from execution, allowing the entire network to sort and broadcast transactions based on received transactions. This eliminates the need to wait for the corresponding block producer's sorting before transaction execution, thereby achieving the purpose of transaction preprocessing. Block consensus and block storage are also parallel and do not affect each other's processing speed. If an error occurs in any of the four steps, the system will roll back to the first block before the error and restart the entire process from transaction sorting.
[0039] Receiving transactions: The client broadcasts the transaction to the network, giving priority to transmitting it to the consensus nodes. Generally, it can be considered that most consensus nodes have received the transaction. If some consensus nodes do not collect the complete transaction, they can obtain the missing transactions in the third step.
[0040] Transaction sorting: Block producers and consensus nodes are selected based on a specific election rule and determine whether they are the current legitimate block producers. If the sorting result is signed and broadcast by a legitimate block producer, a simple consensus is established on the sorting and transaction pre-execution begins based on the sorting. Otherwise, the block producer with the illegitimate sorting is discarded. After a period of time, or when the number of local transactions reaches a threshold, the received transactions are sorted by time and the sorting result is broadcast to all consensus nodes. In this embodiment, the sorting result is a key-value pair. All consensus nodes perform a simple consensus on the sorting to confirm that the sorting has been accepted by a majority of nodes. This consensus only requires the CFT algorithm and does not require Byzantine fault tolerance. Because the block consensus is based on the BFT Byzantine consensus, even if the result is problematic, it will not cause consistency issues. If the consensus timeout expires, the next block producer will begin sorting. After receiving the sorting consensus result, the next block producer begins sorting transactions. There is no limit on the number of transactions during sorting, as only the sorting result needs to be sent, not the entire transaction. Therefore, the amount of information required is not large. This allows for unlimited block size, significantly improving overall transaction throughput.
[0041] Pulling missing transactions: After receiving the block producer's sorting, each consensus node performs a missing check on the sorting. If there are transactions in the sorting that are not available locally, the transaction set is pulled from the block producer. If the block producer does not respond for a long time, the block producer can be replaced through the CFT consensus algorithm.
[0042] Transaction execution: After receiving the sorting and successfully pulling the missing transactions, the transaction can be executed and the execution result can be cached, and the consensus of the block can be started. If the sorting of the next block has been received, there is no need to wait for the consensus result of the previous block, and execution can be started directly. After all, the result is only cached after execution, and it will not be uploaded to the chain until consensus is passed.
[0043] Consensus: Select a consensus algorithm based on your needs and proceed with the consensus process. A new round of consensus begins after confirming the success of the previous block consensus. If consensus succeeds, the transaction is committed to disk. If it fails, the sorting and transaction execution cache are rolled back, and a new block producer is elected to sort. The propose step can be omitted during consensus because each node already has the corresponding block and its execution result.
[0044] Disk write: After consensus is successful, the cached transaction execution results are written to the chain. This process will not block other processes.
[0045] All alliance chains are suitable for using this system to optimize block processing speed, making the alliance chain applicable to a wider range of scenarios, such as games, metaverse, etc. that require the use of blockchain and have high TPS requirements.
[0046] The present invention also provides a blockchain information asynchronous processing system, which includes the following modules:
[0047] Module M1: Broadcasts transactions to the network through the client, giving priority to consensus nodes. Consensus nodes receive transactions. If some consensus nodes do not collect complete transactions, they obtain missing transactions in module M3.
[0048] Module M2: The block producer and consensus node are selected according to the election rules and it is determined whether the block producer is the current legal block producer. If the sorting result is signed and broadcast by the legal block producer, a simple consensus is performed on the sorting and transaction pre-execution is started based on the sorting. Otherwise, the illegal sorting block producer is directly discarded. When the number of local transactions of the block producer reaches the threshold, the received transactions are sorted by time and the sorting result is broadcast to all consensus nodes. All consensus nodes perform a simple consensus on the sorting to confirm that the sorting has been accepted by the nodes. If the consensus times out, the next block producer is allowed to start sorting.
[0049] Module M3: After receiving the block producer’s ranking, each consensus node performs a missing check on the ranking. If there are transactions in the ranking that are not available locally, the node pulls the transaction set from the block producer. If the block producer does not respond for a long time, the node replaces the block producer through the CFT consensus algorithm.
[0050] Module M4: After receiving the sorting and successfully pulling the missing transactions, it executes the transactions and caches the execution results, and starts the block consensus. If the sorting of the next block has been received, it starts execution directly without waiting for the consensus result of the previous block.
[0051] Module M5: Select the consensus algorithm according to the needs to carry out the consensus process. After confirming that the previous block consensus is successful, a new round of consensus begins. If the consensus is successful, the transaction is put on the disk. If the consensus fails, the sorting and transaction execution cache are rolled back, and a new block producer is re-elected for sorting.
[0052] Module M6: After consensus is successful, the cached transaction execution results are written to the chain.
[0053] The present invention solves the long-criticized problem of low processing speed in blockchain systems. Because the chain structure depends on the information of the previous block, asynchronous processing has been impossible. The present invention splits the various processing steps while ensuring system consistency and activity, enabling asynchronous execution and increasing TPS. The solution of only broadcasting the sorting results removes the block size limit, further increasing TPS. The present invention improves the TPS of the blockchain system as a whole and reduces network complexity. It converts the broadcast transmission of blocks into the broadcast transmission of sorting, significantly reducing the size of the transmitted information. The present invention uses a pre-transaction sorting solution to allow the blockchain to pre-process transactions, eliminating the need to wait for the previous block to be fully on-chain before proceeding to the next step, thereby reducing the inactivity time of each node and improving time utilization.
[0054] Those skilled in the art will appreciate that, in addition to implementing the system and its various devices, modules, and units provided by the present invention in purely computer-readable program code, it is entirely possible to implement the same functions of the system and its various devices, modules, and units provided by the present invention in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; the devices, modules, and units for implementing various functions can also be considered as both software modules implementing the method and structures within the hardware component.
[0055] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. The embodiments of this application and the features in the embodiments may be combined with each other in any manner unless there is a conflict.
Claims
1. A method for asynchronous information processing of a blockchain, characterized in that: The method comprises the following steps: Step S1: The transaction is broadcast to the network through the client, with priority given to the consensus node; Step S2: The block producer and consensus node are selected according to the election rules and the block producer is judged to be the current legal block producer. If the sorting result is signed and broadcast by the legal block producer, a simple consensus is performed on the sorting and transaction pre-execution is started based on the sorting. Otherwise, the illegal sorting is directly discarded. Step S3: After receiving the block producer’s ranking, each consensus node performs a missing check on the ranking; Step S4: After receiving the sort and successfully pulling the missing transactions, execute the transactions and cache the execution results, and start the block consensus; Step S5: Select the consensus algorithm according to the needs and proceed with the consensus process. After confirming that the previous block consensus is successful, a new round of consensus begins. If the consensus is successful, the transaction begins. Step S6: After consensus is successful, the cached transaction execution results are written to the chain; In step S2, when the number of local transactions of the block producer reaches the threshold, the received transactions are sorted by time and the sorting result is broadcast to all consensus nodes. All consensus nodes conduct a simple consensus on the sorting to confirm that the sorting has been accepted by the nodes. If the consensus times out, the next block producer will start sorting. If the consensus fails in step S5, the sorting and transaction execution cache are rolled back, and a new block producer is re-elected for sorting.
2. The method for asynchronous information processing of blockchain according to claim 1, characterized in that: The consensus nodes in step S1 receive the transaction. If some consensus nodes do not collect the complete transaction, they obtain the missing transaction in step S3.
3. The method for asynchronous information processing of blockchain according to claim 1, characterized in that: In step S3, if there are transactions in the sorting that are not available locally, the transaction set is pulled from the block producer. If the block producer does not respond for a long time, the block producer is replaced through the CFT consensus algorithm.
4. The method for asynchronous information processing of blockchain according to claim 1, characterized in that: In step S4, if the order of the next block has been received, execution can be started directly without waiting for the consensus result of the previous block.
5. A blockchain information asynchronous processing system, characterized in that: The system includes the following modules: Module M1: broadcasts the transaction to the network through the client, giving priority to transmitting it to the consensus node; Module M2: The block producer and consensus node are selected according to the election rules and the block producer is judged to be the current legal block producer. If the sorting result is signed and broadcast by the legal block producer, a simple consensus is performed on the sorting and transaction pre-execution is started based on the sorting. Otherwise, the illegal sorting is directly discarded. Module M3: After receiving the block producer’s ranking, each consensus node performs a missing check on the ranking; Module M4: After receiving the sort order and successfully pulling the missing transactions, it executes the transactions and caches the execution results, starting the block consensus; Module M5: Select the consensus algorithm based on the needs and proceed with the consensus process. After confirming that the previous block consensus is successful, a new round of consensus begins. If the consensus is successful, the transaction begins. Module M6: After consensus is successful, the cached transaction execution results are written to the chain; In the module M2, when the number of local transactions of the block producer reaches the threshold, the received transactions are sorted by time and the sorting results are broadcast to all consensus nodes. All consensus nodes conduct a simple consensus on the sorting to confirm that the sorting has been accepted by the nodes. If the consensus times out, the next block producer will start sorting; If the consensus fails in the module M5, the sorting and transaction execution cache are rolled back, and a new block producer is re-elected for sorting.
6. The blockchain information asynchronous processing system according to claim 5, characterized in that: The consensus nodes in the module M1 receive the transaction. If some consensus nodes do not collect the complete transaction, the missing transaction is obtained in the module M3.
7. The blockchain information asynchronous processing system according to claim 5, characterized in that: In the module M3, if there are transactions that are not available locally in the sorting, the transaction set will be pulled from the block producer. If the block producer does not respond for a long time, the block producer will be replaced through the CFT consensus algorithm.
8. The blockchain information asynchronous processing system according to claim 5, characterized in that: If the module M4 has received the order of the next block, it starts execution directly without waiting for the consensus result of the previous block.
Citation Information
Patent Citations
Asynchronous processing method and device based on block chain user data
CN110990418A
Multi-round voting type fault-tolerant sorting consensus mechanism and method based on block chain
CN112541758A
Transaction preprocessing method based on consensus sorting
CN113810378A