Blockchain data processing method and system

By processing blockchain transaction data in parallel, determining state dependencies, and executing transactions, the performance bottleneck of the blockchain network is resolved, and transaction processing capabilities are improved without increasing system complexity.

CN116436925BActive Publication Date: 2026-02-27SHANGHAI ENCRYPTION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310134667.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-17
Publication Date
2026-02-27
Estimated Expiration
2043-02-17

AI Technical Summary

Technical Problem

The performance bottleneck of blockchain networks is insufficient to support large-scale decentralized applications, and existing on-chain and off-chain scaling solutions have problems such as high technical difficulty or increased system complexity.

Method used

By processing the data to be executed within a block in parallel, determining state dependencies, and executing transactions based on state dependencies, a transaction parallelization processing engine is adopted to improve transaction efficiency without modifying the underlying blockchain structure or introducing additional execution environments.

Benefits of technology

Without changing the underlying blockchain structure, it improves transaction performance, reduces system complexity, and achieves higher transaction processing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116436925B_ABST
    Figure CN116436925B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a blockchain data processing method and system, comprising: obtaining a plurality of to-be-executed data in a block; performing preprocessing on the plurality of to-be-executed data in parallel to obtain preprocessing results, and determining a state dependency corresponding to each to-be-executed data; for each to-be-executed data, if the to-be-executed data has the same state dependency, executing the plurality of to-be-executed data according to the state dependency to obtain a target transaction result, and outputting the target transaction result. Through the transaction parallelization processing mode, the consensus layer, the ledger structure and other underlying layers of the blockchain itself are not modified, other execution environments or dependencies are not introduced, and the complexity of the blockchain system is not increased. In the minimum degree of invasiveness modification to the original blockchain, the performance of the blockchain transaction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of blockchain, and in particular to a blockchain data processing method and system, a computer device, and a computer readable storage medium. BACKGROUND

[0002] With the continuous development of the Internet, blockchain technology emerged as the times required, and in the following years, blockchain became the core component of electronic currency: as a public ledger of all transactions. By using a peer-to-peer network and a distributed timestamp server, a blockchain database can be self-managed, and the Ethereum network and smart contracts emerged as the times required as a blockchain 2.0 solution to solve more and more application problems. However, as a large number of applications are implemented based on smart contracts, it is increasingly found that the performance bottleneck of the blockchain is not enough to support large-scale decentralized applications.

[0003] At present, in order to solve the performance problem of the blockchain network, the industry has proposed various solutions, mainly divided into two directions of on-chain expansion and off-chain expansion. However, the on-chain expansion solution involves modifying the underlying blockchain, which is difficult from a technical and community perspective, and there has been no progress. The off-chain expansion solution needs to rely on additional components, increasing the complexity of the entire blockchain system and being difficult to implement. SUMMARY

[0004] An embodiment of the present application provides a blockchain data processing method, system, computer device, and computer readable storage medium, which are used to solve the problem of how to improve the transaction efficiency of the blockchain network.

[0005] One aspect of an embodiment of the present application provides a blockchain data processing method, comprising:

[0006] obtaining a plurality of to-be-executed data in a block;

[0007] parallelly pre-processing the plurality of to-be-executed data to obtain a preprocessing result, and determining a state dependency corresponding to each to-be-executed data;

[0008] for each to-be-executed data, if the to-be-executed data has the same state dependency, executing the plurality of to-be-executed data according to the state dependency to obtain a target transaction result, and outputting the target transaction result.

[0009] Optionally, the to-be-executed data includes a first state and a second state, and the determination of the state dependency corresponding to each to-be-executed data comprises:

[0010] determining the state dependency corresponding to each to-be-executed data according to the first state of the to-be-executed data.

[0011] Optionally, the executing the plurality of to-be-executed data according to the state dependency to obtain a target transaction result comprises:

[0012] Merging to-be-executed data with the same state dependency to obtain a plurality of transaction queues;

[0013] Serially executing to-be-executed data in each transaction queue respectively, and executing to-be-executed data in different transaction queues in parallel to obtain a target transaction result.

[0014] Optionally, the merging to-be-executed data with the same state dependency to obtain a plurality of transaction queues comprises:

[0015] For each to-be-executed data, determining whether there is a same first state;

[0016] Merging to-be-executed data with the same first state into one transaction queue, until all to-be-executed data are completed in the loop, and outputting a plurality of transaction queues.

[0017] Optionally, the method further comprises:

[0018] If the to-be-executed data do not have the same state dependency, outputting the preprocessing result.

[0019] Optionally, the method further comprises:

[0020] Persistently storing the output target transaction result or preprocessing result.

[0021] Optionally, before the step of obtaining a plurality of to-be-executed data, the method further comprises:

[0022] Obtaining a plurality of to-be-executed data from a preset transaction pool, and packaging the plurality of to-be-executed data to obtain a block.

[0023] An aspect of an embodiment of the present application further provides a blockchain data processing system, comprising:

[0024] A transaction obtaining module, configured to obtain a plurality of to-be-executed data in a block;

[0025] A preprocessing module, configured to preprocess the plurality of to-be-executed data in parallel to obtain a preprocessing result, and determine a state dependency corresponding to each to-be-executed data;

[0026] A transaction processing module, configured to, for each to-be-executed data, if the to-be-executed data have the same state dependency, execute the plurality of to-be-executed data according to the state dependency to obtain a target transaction result, and output the target transaction result.

[0027] An aspect of an embodiment of the present application further provides a computer device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the blockchain data processing method as described above when executing the computer program.

[0028] An aspect of an embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executable by at least one processor to cause the at least one processor to implement the steps of the blockchain data processing method as described above when executing the computer program.

[0029] The blockchain data processing method, system, device and computer readable storage medium provided by the embodiments of the present application can parallelly execute transactions through a transaction parallelization processing engine, without modifying the consensus layer, the ledger structure and other underlying layers of the blockchain, without introducing other execution environments or dependencies, and without increasing the complexity of the blockchain system. The blockchain transaction performance is improved with minimal invasiveness to the original blockchain. BRIEF DESCRIPTION OF DRAWINGS

[0030] Figure 1 An application environment diagram of the blockchain data processing method according to an embodiment of the present application is schematically shown;

[0031] Figure 2 A flowchart of the blockchain data processing method according to the first embodiment of the present application is schematically shown;

[0032] Figure 3 A state machine diagram of the blockchain transaction according to the first embodiment of the present application is schematically shown;

[0033] Figure 4 A flowchart of another blockchain data processing method according to the first embodiment of the present application is schematically shown;

[0034] Figure 5 A block diagram of the blockchain data processing device according to the second embodiment of the present application is schematically shown; and

[0035] Figure 6 A hardware architecture diagram of a computer device suitable for implementing the blockchain data processing method according to the third embodiment of the present application is schematically shown. DETAILED DESCRIPTION

[0036] In order to make the purposes, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0037] It should be noted that the description of "first", "second" and the like in the embodiments of the present application is only for the purpose of description and should not be understood as indicating or implying the relative importance of the technical features indicated or implicitly indicating the number of technical features. Therefore, the features limited by "first", "second" can explicitly or implicitly include at least one of the features. In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the fact that those of ordinary skill in the art can realize it. When the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist and is not within the scope of protection claimed by the present application.

[0038] Since the concept of blockchain was first proposed by Nakamoto in 2008, in the following years, the blockchain has become the core component of electronic currency: as a public ledger of all transactions. Through the use of peer-to-peer networks and distributed timestamp servers, blockchain databases can be self-managed. Then, the Ethereum network and smart contracts emerged as a blockchain 2.0 solution application, solving more and more application problems. But as a large number of applications are implemented based on smart contracts, it is found that the performance bottleneck of the blockchain is not enough to support large-scale decentralized applications. Among them, the TPS (Transaction Per Second) of the blockchain network is about 7, and the TPS of the Ethereum network is about 15-20.

[0039] In order to solve the performance problem of the blockchain network, various solutions have been proposed in the industry. They can be divided into two directions: on-chain expansion and off-chain expansion.

[0040] I. On-chain expansion direction includes the following solutions:

[0041] 1. Consensus layer optimization. Through innovative consensus algorithm, reduce block time, improve block speed and increase the number of transactions packaged in a single block, etc. to increase the number of executable transactions per unit time.

[0042] 2、Block structure optimization. The traditional blockchain is based on a chain structure, starting from the genesis block, each block is the only forward block of the next block, and only one valid block can be generated at each block time. Based on DAG (Directed Acyclic Graph) technology, parallel block generation can be achieved, that is, multiple blocks are generated at the same block height, thereby providing the number of blocks per unit time to improve the TPS of blockchain transactions.

[0043] 3、Sharding. This solution is similar to the solution of traditional databases, including data sharding and state sharding, for different ledger data and contract data, stored in different ledger partitions, the state of the partition is maintained by the verification node of the partition, and the ledgers between partitions are independent of each other to improve the TPS of blockchain transactions.

[0044] II. Off-chain expansion direction includes the following solutions:

[0045] 1、Off-chain computing. By means of SGX or secure multi-party computing, the transaction execution process of the smart contract is placed in a trusted environment off-chain, and the execution result is sent to the on-chain after execution to improve the TPS of blockchain transactions. One of the performance bottlenecks of this solution is the low efficiency of the smart contract engine.

[0046] 2、Rollup solution, also known as Layer2 solution. The corresponding main chain is Layer1, and the performance problem of Layer1 needs to be solved. Layer2 is a blockchain parasitic on Layer1, and its chain security depends on Layer1. The two communicate through a cross-chain bridge, and the transactions originally executed on Layer1 are transferred to Layer2 through the cross-chain bridge for execution, and the Layer2 transaction state is written back to Layer1 periodically to improve the TPS of blockchain transactions.

[0047] The above-mentioned on-chain expansion and off-chain expansion solutions have more or less problems in the implementation process, as follows:

[0048] 1、On-chain expansion solutions include consensus layer optimization, block structure optimization, and sharding solutions. This optimization solution involves modifying the consensus layer and ledger layer of the blockchain. For a blockchain that is already running normally, modifying the consensus algorithm or modifying the ledger data structure involves very complex interests of all parties (developers, application parties, etc.). From a technical and community perspective, it is difficult for all parties to reach a consensus. The sharding solution is difficult because it involves cross-shard state calls and has made little progress.

[0049] 2. Off-chain scaling solutions include off-chain computation and rollup solutions. Moving transactions from on-chain to off-chain, or moving transactions from Layer 1 to Layer 2 for execution, requires addressing the issue of malicious transactions. This means that the off-chain execution environment or Layer 2 may be subject to malicious attacks. While this can be achieved through techniques such as secure multi-party computation, fraud proofs, or zero-knowledge proofs, scaling solutions based on secure multi-party computation and zero-knowledge proofs are currently progressing slowly; solutions based on fraud proofs lack usability. Furthermore, these solutions rely on additional components, adding complexity to the original blockchain and increasing the overall system complexity.

[0050] In view of this, this application aims to propose a blockchain data processing method, comprising: acquiring multiple data to be executed within a block; performing parallel preprocessing on the multiple data to be executed to obtain a preprocessing result, and determining the state dependency corresponding to each data to be executed; for each data to be executed, if the data to be executed has the same state dependency, executing the multiple data to be executed according to the state dependency to obtain a target transaction result, and outputting the target transaction result. By using a transaction parallelization processing engine to execute transactions in parallel, and then re-executing transactions that need to be executed again, the efficiency of blockchain transactions is improved. This approach avoids modifying the underlying blockchain structure, such as the consensus layer and ledger structure, and does not introduce other execution environments or dependencies, thus not increasing the complexity of the blockchain system. It achieves improved blockchain transaction performance with minimal invasive modifications to the original blockchain.

[0051] This application provides several embodiments to further illustrate the blockchain data processing scheme, as detailed below.

[0052] In the description of this application, it should be understood that the numerical labels before the steps do not indicate the order of the steps, but are only used to facilitate the description of this application and to distinguish each step, and therefore should not be construed as a limitation of this application.

[0053] The following is a definition of the terminology used in this application:

[0054] TPS (Transactions Per Second): The number of transactions processed per second, a performance metric that expresses the system's processing capacity, specifically the number of messages processed per second.

[0055] Layer 1: Layer 1 blockchain networks are the underlying blockchain networks, including complete blockchain modules (consensus layer, network layer, ledger layer, execution layer, etc.), and have independent blockchain functions. Examples include blockchain networks and the Ethereum network.

[0056] Layer2: Layer1 network expansion solution, whose consensus security relies on Layer1 network. For example, ZKSync of Ethereum is a Layer2 expansion solution of Ethereum network.

[0057] Figure 1 An environment application schematic diagram according to an embodiment of the present application is schematically shown. As shown in Figure 1

[0058] The computer device 10000 can connect the client 30000 through the network 20000.

[0059] The computer device 10000 can provide services, such as network debugging, or return blockchain data processing result data to the client 30000, etc.

[0060] The computer device 10000 can be located in a data center such as a single site, or distributed in different geographical locations (for example, in multiple sites). The computer device 10000 can provide services via one or more networks 20000. The network 20000 includes various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and / or the like. The network 20000 can include physical links, such as coaxial cable links, twisted-pair cable links, fiber-optic links, combinations thereof, and the like. The network 20000 can include wireless links, such as cellular links, satellite links, Wi-Fi links, and the like.

[0061] The computer device 10000 can be implemented by one or more computing nodes. The one or more computing nodes can include virtualized computing instances. The virtualized computing instances can include virtual machines, such as emulations of computer systems, operating systems, servers, and the like. The computing nodes can load the virtual machines based on virtual images and / or other data defining specific software (e.g., operating systems, specialized applications, servers) for emulation. As the demand for different types of processing services changes, different virtual machines can be loaded and / or terminated on the one or more computing nodes. A hypervisor can be implemented to manage the use of different virtual machines on the same computing node.

[0062] The client 30000 can be configured to access the content and services of the computer device 10000. The client 30000 can include any type of electronic device, such as a mobile device, a tablet device, a laptop computer, a workstation, a virtual reality device, a gaming device, a set-top box, a digital streaming media device, a vehicle terminal, a smart television, a set-top box, and the like.

[0063] The client 30000 can output (e.g., display, render, present) the blockchain data processing result data and the like to a user. ​

[0064] The network debugging scheme will be introduced through multiple embodiments. The scheme can be implemented by the computer device 10000.

[0065] Embodiment one

[0066] Figure 2 A flowchart of a blockchain data processing method according to the embodiment one of the present application is schematically shown. It includes steps S202-S206, wherein,

[0067] Step S202, obtaining multiple to-be-executed data in a block;

[0068] The to-be-executed data is a blockchain smart contract transaction that needs to be processed. Specifically, from the perspective of a state machine, the to-be-executed data is used to transform a first state of a ledger to a second state of the ledger when executed. Therefore, the state dependency of the to-be-executed data execution can be considered as the first state, and the transaction result obtained after the transaction execution is the second state. As an example, as shown in a schematic diagram of a state machine of a blockchain transaction, by executing “transaction 1”, the ledger “state 1” can be transformed to the ledger “state 2”. It can be considered that the state dependency of the “transaction 1” execution is “state 1”, and the transaction result obtained after the “transaction 1” execution is “state 2”. Figure 3

[0069] In a preferred embodiment of the present application, the step S202 can further include the following steps before the step S202:

[0070] Obtaining multiple to-be-executed data from a preset transaction pool, and packing the multiple to-be-executed data to obtain a block.

[0071] The preset transaction pool is a pre-maintained database for storing blockchain contract transactions submitted by users. In the embodiment, a preset number (such as 1000) of multiple to-be-executed data are selected from the preset transaction pool, and the to-be-executed data are packed to form a block. When packing, the to-be-executed data can also be sorted according to the generation time corresponding to each to-be-executed data, so as to facilitate serial execution of the to-be-executed data in the order in the block when processing in a serial manner.

[0072] Step S204, pre-processing the multiple to-be-executed data in parallel to obtain a preprocessing result, and determining a state dependency corresponding to each to-be-executed data;

[0073] For different transactions, if there is a state dependency between them, for example, they are all update operations on the same state / value, then these transactions need to be executed in series. If the state dependencies between the transactions are different, they can be executed in parallel.

[0074] ​In the embodiment, the pre-processing result is obtained by pre-processing the to-be-executed data. In the pre-processing stage, it is assumed that all the to-be-executed data have no same state dependency and can be executed in parallel. The pre-processing result is obtained by pre-processing the to-be-executed data in parallel. Meanwhile, the state dependency corresponding to each to-be-executed data can be determined and returned during the transaction execution.

[0075] In a preferred embodiment of the present application, the to-be-executed data includes a first state and a second state, and the determination of the state dependency corresponding to each to-be-executed data includes:

[0076] In the embodiment, the to-be-executed data can include a first state and a second state, wherein the first state can be the state of the ledger / transaction before the transaction execution, and the second state can be the state of the ledger / transaction after the transaction execution.

[0077] In the embodiment, the state dependency corresponding to each to-be-executed data is determined according to the first state of the to-be-executed data, for example, Figure 3 In the embodiment, the state dependency corresponding to each to-be-executed data is determined according to the first state of the to-be-executed data, for example,

[0078] In the embodiment, the state dependency corresponding to each to-be-executed data is determined according to the first state of the to-be-executed data, for example,

[0079] In the embodiment, the state dependency corresponding to each to-be-executed data is determined according to the first state of the to-be-executed data, for example,

[0080] If the to-be-executed data and other to-be-executed data have no same state dependency, the pre-processing result obtained in the pre-processing stage can be marked as a commit state, and the pre-processing result is outputted.

[0081] If the to-be-executed data and other to-be-executed data have no same state dependency, the pre-processing result obtained in the pre-processing stage can be marked as a commit state, and the pre-processing result is outputted.

[0082] The following provides several optional embodiments to optimize the blockchain data processing method, as follows:

[0083] In a preferred embodiment of the present application, the step S206 can include the following steps:

[0084] Merge the to-be-executed data with the same state dependency to obtain a plurality of transaction queues; execute the to-be-executed data in each transaction queue in series respectively, and execute the to-be-executed data in different transaction queues in parallel to obtain a target transaction result.

[0085] In this embodiment, when the to-be-executed data with the same state dependency is executed, the to-be-executed data can be divided into a plurality of transaction queues according to the state dependency between the to-be-executed data and the order of the to-be-executed data in the block. The to-be-executed data in the same transaction queue has the same state dependency; the to-be-executed data in different transaction queues has different state dependencies. For the to-be-executed data in each transaction queue, the to-be-executed data with the same state dependency is divided into the same transaction queue, and can be executed in series according to the order. At the same time, since the state dependencies of different transaction queues are different, in order to further speed up the efficiency of transaction execution, the to-be-executed data in different transaction queues can be executed in parallel to obtain a target transaction result.

[0086] In a preferred embodiment of the present application, the step of merging the to-be-executed data with the same state dependency to obtain a plurality of transaction queues can include the following steps:

[0087] For each to-be-executed data, it is judged whether there is the same first state; the to-be-executed data with the same first state is merged into a transaction queue; until all the to-be-executed data are completed in the loop, a plurality of transaction queues are output.

[0088] In this embodiment, when the transaction queue is divided, for each to-be-executed data, it is judged whether there is the same first state between the to-be-executed data and other to-be-executed data, the to-be-executed data with the same first state is merged into a transaction queue, until all the to-be-executed data are completed in the loop, and a plurality of transaction queues are output. In specific implementation, the union-find set + DAG data structure can be used, and the to-be-executed data with the same first state is merged into a transaction queue in combination with the order of the to-be-executed data in the block.

[0089] In a preferred embodiment of the present application, the method further includes:

[0090] If the to-be-executed data does not have the same state dependency, the pre-processing result is output.

[0091] In this embodiment, after the to-be-executed data is pre-processed, the to-be-executed data without the same state dependency does not need to be re-determined for execution order and re-executed, and therefore the pre-processing result can be directly output.

[0092] In a preferred embodiment of the present application, the method can further include the following steps:

[0093] persistently store the target transaction result or the pre-processing result output by the to-be-executed data in the commit state.

[0094] Specifically, after the execution is completed, each to-be-executed data is marked as a commit state, and the target transaction result or the pre-processing result output by the to-be-executed data in the commit state is persistently stored.

[0095] The block chain data processing method of the first embodiment of the present application is further explained below. The method includes two stages of transaction preprocessing and transaction execution, i.e., a transaction preprocessing stage and a transaction execution stage, wherein,

[0096] In the first stage, the transaction preprocessing stage, it is optimistically considered that there is no state dependency between all to-be-executed data, and they can be executed in parallel. In this stage, simulation execution is performed, and the simulation execution environment is completely the same as that in the transaction execution stage. During the transaction execution process, the state dependency corresponding to the to-be-executed data needs to be recorded and returned, and the pre-processing result is cached.

[0097] In the second stage, the transaction execution stage, the pre-processing result of the to-be-executed data without the same dependency cached in the preprocessing stage is marked as a commit state, and such a transaction does not need to be executed again. The to-be-executed data with the same state dependency is divided into several transaction queues using the union-find set + DAG data structure and in combination with the order of the to-be-executed data in the block. After the transaction queues are divided, the to-be-executed data in the same transaction queue has the same state dependency, and the state dependency of the to-be-executed data between different transaction queues is different. The to-be-executed data within one transaction queue is executed in series according to the order, and the to-be-executed data of different transaction queues is executed in parallel. The transaction result is cached and marked as a commit state. Finally, after all the transactions are executed, the transaction execution result of the commit state in the cache is persistently stored.

[0098] As Figure 4 A step flowchart of a block chain data processing method is shown, which specifically includes the following steps:

[0099] Step S401, packing a block. A preset number of to-be-executed data is selected from a preset transaction pool by a block node to pack a block.

[0100] Step S402, transaction preprocessing. The to-be-executed data in the block is preprocessed. In this stage, it is optimistically considered that there is no state dependency between all to-be-executed data, and they can be executed in parallel.

[0101] Step S403, obtaining a transaction preprocessing result. The execution result of all transaction preprocessing stages is obtained, and the state dependency of the transaction execution is obtained.

[0102] Step S404, it is judged whether the to-be-executed data exists the same state dependency. Each to-be-executed data is judged one by one, if the to-be-executed data does not exist the same state dependency, it is not needed to execute again, and can be directly jumped to step S406 to output the execution result of the preprocessing stage. If the to-be-executed data exists the same state dependency, it is needed to execute again, and jumps to step S405.

[0103] Step S405, if the to-be-executed data exists the same state dependency, it is divided into several independent transaction queues according to the transaction state dependency, and the to-be-executed data in each transaction queue is executed. For the to-be-executed data existing the same state dependency, the data structure such as the union-find set and the DAG can be used, and the to-be-executed data is divided into several transaction queues in combination with the order of the to-be-executed data in the block. The to-be-executed data in the same transaction queue has the same state dependency; the state dependencies between different transaction queues are different. The to-be-executed data in the transaction queue is executed in series according to the order; the transactions of different transaction queues are executed in parallel. The number of the parallel transaction queues is related to the CPU core number of the computer of the execution environment.

[0104] Step S406, all transactions are waited to be executed. All transactions are listened to and waited to be executed.

[0105] Step S407, the state is submitted, and the block is persisted. The state of the to-be-executed data is submitted, and the state and the block data are persisted.

[0106] Embodiment two

[0107] Figure 5 A block diagram of a blockchain data processing system according to the embodiment two of the present application is schematically shown, the blockchain data processing device can be divided into one or more program modules, the one or more program modules are stored in a storage medium and executed by one or more processors to complete the embodiment of the present application. The program module referred to in the embodiment of the present application refers to a series of computer program instruction segments capable of completing a specific function, and the functions of the program modules in the embodiment of the present application will be specifically described below.

[0108] As shown in Figure 5 , the blockchain data processing system 500 can include the following modules:

[0109] The transaction acquisition module 510 is configured to acquire a plurality of to-be-executed data in a block.

[0110] The preprocessing module 520 is configured to preprocess the plurality of to-be-executed data in parallel to obtain a preprocessing result, and determine a state dependency corresponding to each to-be-executed data.

[0111] The transaction processing module 530 is used to, for each of the data to be executed, if the data to be executed has the same state dependency, execute the multiple data to be executed according to the state dependency to obtain the target transaction result, and output the target transaction result.

[0112] In a preferred embodiment of this application, the data to be executed includes a first state and a second state, and the preprocessing module 520 includes:

[0113] The state dependency determination submodule is used to determine the state dependency corresponding to each piece of data to be executed based on the first state of each piece of data to be executed.

[0114] In a preferred embodiment of this application, the transaction processing module 530 includes:

[0115] The queue partitioning submodule is used to merge pending data with the same state dependency to obtain multiple transaction queues;

[0116] The serial execution submodule is used to execute the data to be executed in each transaction queue in sequence, and to execute the data to be executed in different transaction queues in parallel to obtain the target transaction result.

[0117] In a preferred embodiment of this application, the queue partitioning submodule includes:

[0118] The judgment unit is used to determine whether there is a common first state for each of the data to be executed;

[0119] The queue partitioning unit is used to merge pending data with the same first state into a single transaction queue; until all pending data is completed in a loop, multiple transaction queues are output.

[0120] In a preferred embodiment of this application, it further includes:

[0121] The preprocessing result output module is used to output the preprocessing result if the data to be executed does not have the same state dependency.

[0122] In a preferred embodiment of this application, it further includes:

[0123] The transaction result storage module is used to persistently store the output target transaction result or preprocessing result.

[0124] In a preferred embodiment of this application, it further includes:

[0125] The block packaging module is used to obtain multiple data to be executed from a preset transaction pool and package the multiple data to be executed to obtain a block.

[0126] Example 3

[0127] Figure 6 A schematic diagram of a hardware architecture of a computer device 10000 suitable for implementing the blockchain data processing method according to Embodiment Three of the present application is shown. In this embodiment, the computer device 10000 is a device capable of automatically performing numerical calculation and / or information processing according to pre-set or stored instructions. For example, it can be a smartphone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack-mounted server (including a FEN independent server or a server cluster composed of multiple servers), etc. As shown, the computer device 10000 at least includes, but is not limited to, a memory 10010, a processor 10020, and a network interface 10030 which are communicatively linked through a system bus. Among them: Figure 6

[0128] The memory 10010 at least includes one type of computer readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 10010 can be an internal storage module of the computer device 10000, such as a hard disk or a memory of the computer device 10000. In other embodiments, the memory 10010 can also be an external storage device of the computer device 10000, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 10000. Of course, the memory 10010 can also include both the internal storage module and the external storage device of the computer device 10000. In this embodiment, the memory 10010 is usually used to store the operating system and various application software installed on the computer device 10000, such as the program code of the blockchain data processing method, etc. In addition, the memory 10010 can also be used to temporarily store various data that have been output or will be output.

[0129] ​The processor 10020 may, in some embodiments, be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 10020 is generally used to control the overall operation of the computer device 10000, such as performing control and processing related to data interaction or communication of the computer device 10000. In this embodiment, the processor 10020 is used to run program codes or process data stored in the memory 10010.

[0130] The network interface 10030 can include a wireless network interface or a wired network interface, and is generally used to establish a communication link between the computer device 10000 and other computer devices. For example, the network interface 10030 is used to connect the computer device 10000 with an external terminal through a network, establish a data transmission channel and a communication link between the computer device 10000 and the external terminal, and the like. The network can be an intranet, the Internet, a Global System for Mobile Communications (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth, Wi-Fi, or other wireless or wired networks.

[0131] It should be noted that, Figure 6 Only a computer device with components 10010-10030 is shown, but it should be understood that all the shown components are not required to be implemented, and more or fewer components can be alternatively implemented.

[0132] In this embodiment, the blockchain data processing method stored in the memory 10010 can also be divided into one or more program modules and executed by one or more processors (processor 10020 in this embodiment) to complete the embodiments of the present application.

[0133] Embodiment Four

[0134] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the steps of the blockchain data processing method in the embodiments.

[0135] In this embodiment, the computer readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the computer readable storage medium can be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Of course, the computer readable storage medium can also include both the internal storage unit and the external storage device of the computer device. In this embodiment, the computer readable storage medium is usually used to store an operating system and various application software installed on the computer device, such as program codes of the blockchain data processing method in the embodiments, etc. In addition, the computer readable storage medium can also be used to temporarily store various data that have been output or will be output.

[0136] Obviously, those skilled in the art should understand that each module or each step of the above-mentioned embodiments of the present application can be realized by a general computing device, which can be concentrated on a single computing device or distributed on a network composed of multiple computing devices, and optionally, they can be realized by program codes executable by the computing device, so that they can be stored in the storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in different order, or they can be manufactured into each integrated circuit module, or multiple modules or steps among them can be manufactured into a single integrated circuit module. Therefore, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0137] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the specification and drawings of the present application, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A blockchain data processing method, characterized in that, The method comprises the following steps: obtaining a plurality of to-be-executed data from a preset transaction pool, and packing the plurality of to-be-executed data to obtain a block; obtaining a plurality of to-be-executed data in the block; parallelly pre-processing the plurality of to-be-executed data to obtain a pre-processing result, and determining a state dependency corresponding to each to-be-executed data; for each to-be-executed data, if the to-be-executed data has the same state dependency, executing the plurality of to-be-executed data according to the state dependency to obtain a target transaction result, and outputting the target transaction result; wherein, the step of executing the plurality of to-be-executed data according to the state dependency to obtain a target transaction result comprises: merging to-be-executed data with the same state dependency to obtain a plurality of transaction queues; serially executing to-be-executed data in each transaction queue respectively, and parallelly executing to-be-executed data in different transaction queues to obtain a target transaction result. 2.The blockchain data processing method of claim 1, wherein, The step of merging to-be-executed data with the same state dependency to obtain a plurality of transaction queues comprises: for each to-be-executed data, determining whether there is a same first state; merging to-be-executed data with the same first state into a transaction queue, until all to-be-executed data are processed, and outputting a plurality of transaction queues. 3.The blockchain data processing method of claim 1, wherein, The method further comprises: if the to-be-executed data does not have the same state dependency, outputting the pre-processing result. 4.The method of claim 3, wherein, The method further comprises: persistently storing the output target transaction result or pre-processing result.

5. A blockchain data processing system, characterized by, The method comprises the following steps: a block packing module, configured to obtain a plurality of to-be-executed data from a preset transaction pool, and pack the plurality of to-be-executed data to obtain a block; a transaction obtaining module, configured to obtain a plurality of to-be-executed data in the block; a preprocessing module, configured to parallelly pre-process the plurality of to-be-executed data to obtain a pre-processing result, and determine a state dependency corresponding to each to-be-executed data; a transaction processing module, configured to, for each to-be-executed data, if the to-be-executed data has the same state dependency, execute the plurality of to-be-executed data according to the state dependency to obtain a target transaction result, and output the target transaction result; wherein, the step of executing the plurality of to-be-executed data according to the state dependency to obtain a target transaction result comprises: merging to-be-executed data with the same state dependency to obtain a plurality of transaction queues; serially executing to-be-executed data in each transaction queue respectively, and parallelly executing to-be-executed data in different transaction queues to obtain a target transaction result.

6. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the block chain data processing method in any one of claims 1 to 4.

7. A computer readable storage medium characterized by The computer readable storage medium stores a computer program, which can be executed by at least one processor to make the at least one processor execute the steps of the block chain data processing method in any one of claims 1 to 4.