Transaction processing method and apparatus of blockchain network, device, and medium

By separating the consensus of transaction execution order and execution result in the blockchain network and having them handled by nodes with matching performance, the problem of low consensus efficiency caused by the performance differences of blockchain nodes is solved, achieving more efficient consensus and faster transaction on-chain processing.

CN117155924BActive Publication Date: 2026-07-31TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2022-05-23
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Low consensus efficiency is caused by differences in the performance of blockchain nodes. In existing technologies, the time required for each blockchain node is different, which affects the consensus efficiency.

Method used

By separating the consensus on the order of transaction execution from the consensus on the result of transaction execution, and having them executed by a first blockchain node with moderate performance and a second blockchain node with superior performance respectively, different consensus strategies are adopted to improve consensus efficiency.

Benefits of technology

It improves the consensus efficiency of the blockchain network, shortens the transaction recording time on the chain, and enhances the user experience of client objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117155924B_ABST
    Figure CN117155924B_ABST
Patent Text Reader

Abstract

This application discloses a transaction processing method, apparatus, device, and medium for a blockchain network. The method includes: a first blockchain node initiating consensus on the execution order of multiple transactions to be uploaded to the blockchain; after consensus is reached, adding a first block to the first blockchain locally on the first blockchain node; and simultaneously broadcasting the first block. This allows a second blockchain node to initiate consensus on the execution results of multiple transactions to be uploaded to the blockchain; and after consensus is reached, adding a second block to the second blockchain locally on the second blockchain node. The technical solution of this application improves the block consensus efficiency of the blockchain network and greatly optimizes the block consensus scheme of the blockchain network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of blockchain technology, and more specifically, to a transaction processing method for a blockchain network, a transaction processing device for a blockchain network, an electronic device, and a computer-readable medium. Background Technology

[0002] Blockchain technology is widely used in finance, credit reporting, banking, and other fields. In this technology, each blockchain node participates in the consensus process for blocks. Only when a specified consensus strategy is met will the corresponding blockchain node add the block to its local blockchain. However, due to the performance limitations of the blockchain nodes themselves (some blockchain nodes have superior performance, some have moderate performance, and some have poor performance, etc.), the time required for each blockchain node to participate in the consensus process varies; thus, to some extent, this reduces the efficiency of block consensus.

[0003] It is clear that improving the consensus efficiency of blocks is an urgent problem to be solved. Summary of the Invention

[0004] To address the aforementioned technical problems, embodiments of this application provide a transaction processing method, apparatus, device, and medium for a blockchain network, thereby improving the consensus efficiency of blocks to at least a certain extent.

[0005] According to one aspect of the embodiments of this application, this application provides a transaction processing method for a blockchain network, applied to a first blockchain node. The method includes: acquiring multiple transactions to be uploaded to the blockchain with an execution order; generating a first block based on the multiple transactions to be uploaded to the blockchain; initiating a consensus process for the first block, wherein the consensus process of the first block is used to reach a consensus on the execution order of the multiple transactions to be uploaded to the blockchain; if the consensus on the first block passes, adding the first block to the first blockchain locally on the first blockchain node, and broadcasting the first block, so that a second blockchain node reaches a consensus on the execution results of the multiple transactions to be uploaded to the blockchain based on the multiple transactions to be uploaded to the blockchain contained in the first block.

[0006] According to one aspect of the embodiments of this application, this application provides a transaction processing method for a blockchain network, applied to a second blockchain node. The method includes: receiving a first block broadcast by a first blockchain node; wherein the first block includes multiple transactions to be added to the blockchain, and the first block is broadcast by the first blockchain node after consensus is reached on the first block, and the consensus of the first block is a consensus on the execution order of the multiple transactions to be added to the blockchain; generating a second block based on the execution results of the multiple transactions to be added to the blockchain; initiating a consensus process for the second block, the consensus process of the second block being used to reach consensus on the execution results; and if the consensus for the second block is reached, adding the second block to the second blockchain local to the second blockchain node.

[0007] According to one aspect of the embodiments of this application, this application provides a transaction processing apparatus for a blockchain network. The apparatus is configured on a first blockchain node and includes: a first acquisition module configured to acquire a transaction set containing multiple transactions to be uploaded to the blockchain in an execution order; a first generation module configured to generate a first block based on the execution order sequence of the multiple transactions to be uploaded to the blockchain; a first consensus module configured to initiate a consensus process for the first block, the consensus process of the first block being used to reach consensus on the execution order of the multiple transactions to be uploaded to the blockchain; and an addition and broadcast module configured to, if the consensus on the first block is passed, add the first block to the first blockchain on the local first blockchain of the first blockchain node and broadcast the first block, so that a second blockchain node reaches consensus on the execution results of the multiple transactions to be uploaded to the blockchain based on the multiple transactions to be uploaded contained in the first block.

[0008] In one embodiment of this application, based on the aforementioned scheme, the first generation module is specifically configured to: obtain the timestamp information of each transaction to be uploaded to the blockchain; sort the multiple transactions to be uploaded to the blockchain based on the timestamp information of each transaction to be uploaded to the blockchain to obtain an execution sorting sequence of the multiple transactions to be uploaded to the blockchain; and generate the first block based on the execution sorting sequence of the multiple transactions to be uploaded to the blockchain.

[0009] In one embodiment of this application, based on the foregoing scheme, the device further includes: a first receiving module configured to receive a second block broadcast by the second blockchain node; wherein the second block includes the execution results of the multiple transactions to be added to the chain, and the second block is broadcast by the second blockchain node after the consensus of the second block is passed, and the consensus of the second block is a consensus on the execution results; and a first verification module configured to verify the execution results contained in the second block, and add the second block to the second blockchain local to the first blockchain node based on the verification results.

[0010] In one embodiment of this application, based on the aforementioned scheme, the first verification module is specifically configured to: verify the endorsement signature information associated with the execution result contained in the second block based on a first preset endorsement strategy; if the verification passes, the second block is added to the second blockchain local to the first blockchain node.

[0011] In one embodiment of this application, based on the foregoing scheme, the add and broadcast module is specifically configured to: obtain the latest block of the second blockchain on the local side of the first blockchain node; add the second block after the latest block; wherein the block height of the second block on the local second blockchain matches the block height of the first block on the local first blockchain.

[0012] In one embodiment of this application, based on the foregoing scheme, the device further includes: a first selection module, configured to acquire performance parameter values ​​of multiple blockchain nodes; and, based on the performance parameter values ​​of each blockchain node, select a blockchain node whose performance parameter value is lower than a preset performance parameter threshold from the multiple blockchain nodes as the first blockchain node.

[0013] According to one aspect of the embodiments of this application, this application provides a transaction processing apparatus for a blockchain network. The apparatus is configured on a second blockchain node and includes: a second acquisition module configured to receive a first block broadcast by a first blockchain node; wherein the first block includes multiple transactions to be added to the blockchain, and the first block is broadcast by the first blockchain node after consensus is reached on the first block, and the consensus of the first block is a consensus on the execution order of the multiple transactions to be added to the blockchain; a second generation module configured to generate a second block based on the execution results of the multiple transactions to be added to the blockchain; a second consensus module configured to initiate a consensus process for the second block, the consensus process of the second block being used to reach consensus on the execution results; and an addition module configured to add the second block to the second blockchain local to the second blockchain node if consensus on the second block is reached.

[0014] In one embodiment of this application, based on the aforementioned scheme, the second generation module is specifically configured to: execute the multiple transactions to be uploaded to the blockchain respectively to obtain the execution results of the multiple transactions to be uploaded to the blockchain; and generate the second block based on the execution results of the multiple transactions to be uploaded to the blockchain.

[0015] In one embodiment of this application, based on the aforementioned scheme, the second generation module is specifically configured to: obtain the block height of the first block; associate the block height, the identifier information of the multiple transactions to be uploaded to the blockchain, and the execution results of the multiple transactions to be uploaded to the blockchain to obtain the association result of the multiple transactions to be uploaded to the blockchain; and generate the second block based on the association result of the multiple transactions to be uploaded to the blockchain.

[0016] In one embodiment of this application, based on the foregoing scheme, the second generation module is further configured to: generate key elements based on the identification information of the multiple transactions to be uploaded to the blockchain, and generate value elements based on the execution results of the multiple transactions to be uploaded to the blockchain; associate the block height with the key element and value element corresponding to the same transaction to be uploaded to the blockchain, respectively, to obtain the association result of the multiple transactions to be uploaded to the blockchain.

[0017] In one embodiment of this application, based on the foregoing scheme, the device further includes: a second verification module, configured to verify the execution order contained in the first block, and add the first block to the first blockchain local to the second blockchain node based on the verification result.

[0018] In one embodiment of this application, based on the aforementioned scheme, the second verification module is specifically configured to: verify the endorsement signature information associated with the execution order contained in the first block based on a second preset endorsement strategy; if the verification is successful, the first block is added to the first blockchain on the local blockchain of the second blockchain node.

[0019] In one embodiment of this application, based on the foregoing scheme, the adding module is specifically configured to: obtain the latest block of the second blockchain on the local side of the second blockchain node; add the second block after the latest block; wherein the block height of the second block on the local second blockchain matches the block height of the first block on the local first blockchain.

[0020] In one embodiment of this application, based on the foregoing scheme, the device further includes: a second selection module, configured to acquire performance parameter values ​​of a plurality of blockchain nodes; and, based on the performance parameter values ​​of each blockchain node, select a blockchain node whose performance parameter value is higher than or equal to a preset performance parameter threshold from the plurality of blockchain nodes as the second blockchain node.

[0021] In one embodiment of this application, based on the foregoing scheme, the device further includes: a second receiving module configured to receive a query request for a transaction execution result, wherein the query request for the transaction execution result carries transaction identification information; a third obtaining module configured to obtain an execution result matching the transaction identification information from a local second blockchain; and a returning module configured to return a transaction query result based on the obtaining status of the execution result matching the transaction identification information.

[0022] In one embodiment of this application, based on the foregoing scheme, the return module is specifically configured as follows: if the acquisition status indicates that an execution result matching the identifier information of the transaction has been obtained, then the transaction query result is generated based on the obtained transaction execution result, and the transaction query result is returned; if the acquisition status indicates that no execution result matching the identifier information of the transaction has been obtained, then transaction execution incomplete information is generated, and the transaction execution incomplete information is used as the transaction query result, and the transaction query result is returned.

[0023] According to one aspect of the embodiments of this application, an electronic device is provided, including one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the transaction processing method of the blockchain network as described above.

[0024] According to one aspect of the embodiments of this application, the embodiments of this application provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the transaction processing method of a blockchain network as described above.

[0025] According to one aspect of the embodiments of this application, the embodiments of this application provide a computer program product, including computer instructions, which, when executed by a processor, implement the transaction processing method of the blockchain network as described above.

[0026] In the technical solutions provided by the embodiments of this application:

[0027] On one hand, the first blockchain node initiates a consensus on the execution order of multiple transactions awaiting on-chain processing, and after the consensus is passed, the first block is added to the first blockchain on the first blockchain node's local blockchain. This allows for on-chain processing as soon as the execution order of multiple transactions is agreed upon. Compared to related technologies that require consensus on both the execution order and results of multiple transactions before on-chain processing, this method offers a relatively faster on-chain processing speed for client applications, thus improving the user experience to some extent.

[0028] On one hand, the first blockchain node broadcasts the first block, allowing the second blockchain node to initiate consensus on the execution results of multiple transactions awaiting on-chain processing. Once consensus is reached, the second block is added to the second blockchain node's local blockchain. This separates the execution order of multiple transactions from the consensus on their execution results. Since the consensus on the execution order of multiple transactions takes different amounts of time than the consensus on the execution results, separating the two allows for execution by blockchain nodes with matching performance. This avoids the problem of low consensus efficiency caused by significant differences in consensus time among blockchain nodes due to performance limitations (for example, for a block consensus, although a blockchain node completes its processing quickly, it needs to wait for other corresponding blockchain nodes to complete their processing, resulting in relatively low consensus efficiency for that block). Furthermore, separating the two allows for the use of appropriate consensus mechanisms for separate consensus processes, offering greater flexibility and potentially improving consensus efficiency to some extent.

[0029] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0030] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0031] Figure 1 This is a schematic diagram of the blockchain network structure;

[0032] Figure 2 This is a diagram illustrating the connection relationships between blocks in a blockchain.

[0033] Figure 3 This is a schematic diagram illustrating an exemplary implementation environment in which the technical solutions of the embodiments of this application can be applied;

[0034] Figure 4 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in an exemplary embodiment of this application;

[0035] Figure 5 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in another exemplary embodiment of this application;

[0036] Figure 6 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in another exemplary embodiment of this application;

[0037] Figure 7 This is a schematic diagram of the local blockchain of the first blockchain node, as shown in another exemplary embodiment of this application;

[0038] Figure 8 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in another exemplary embodiment of this application;

[0039] Figure 9 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in another exemplary embodiment of this application;

[0040] Figure 10 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in an exemplary embodiment of this application;

[0041] Figure 11 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in another exemplary embodiment of this application;

[0042] Figure 12 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in another exemplary embodiment of this application;

[0043] Figure 13 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in another exemplary embodiment of this application;

[0044] Figure 14 This is a schematic diagram illustrating the association result of another exemplary embodiment of this application;

[0045] Figure 15 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in another exemplary embodiment of this application;

[0046] Figure 16 This is a schematic diagram of the local blockchain of the second blockchain node, as illustrated in another exemplary embodiment of this application;

[0047] Figure 17 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in another exemplary embodiment of this application;

[0048] Figure 18 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in another exemplary embodiment of this application;

[0049] Figure 19 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in another exemplary embodiment of this application;

[0050] Figure 20 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in an exemplary embodiment of this application;

[0051] Figure 21 This is a schematic diagram of a blockchain shown in another exemplary embodiment of this application;

[0052] Figure 22 This is a schematic diagram illustrating a blockchain and associated storage, as shown in another exemplary embodiment of this application;

[0053] Figure 23 This is a schematic diagram of a blockchain shown in another exemplary embodiment of this application;

[0054] Figure 24 This is a schematic diagram of a blockchain shown in another exemplary embodiment of this application;

[0055] Figure 25 This is a schematic diagram of a blockchain shown in another exemplary embodiment of this application;

[0056] Figure 26 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in an exemplary embodiment of this application;

[0057] Figure 27 This is a block diagram of a transaction processing apparatus for a blockchain network according to one embodiment of this application;

[0058] Figure 28 This is a block diagram of a transaction processing apparatus for a blockchain network according to one embodiment of this application;

[0059] Figure 29 This is a schematic diagram of the structure of a computer system suitable for implementing the electronic devices of the present application embodiments. Detailed Implementation

[0060] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments identical to those of this application. Rather, they are merely examples of apparatuses and methods identical to some aspects of this application as detailed in the appended claims.

[0061] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0062] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0063] It should be noted that "multiple" as mentioned in this application refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0064] Before introducing the technical solutions of the embodiments of this application, the blockchain technology used in the embodiments of this application will be introduced first.

[0065] Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and cryptographic algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks (i.e., blocks) linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and to generate the next block. A blockchain can include an underlying platform, a platform product and service layer, and an application service layer.

[0066] As mentioned above, a blockchain is essentially a decentralized database, and it is maintained collaboratively by nodes within a blockchain network. For example, please refer to [link to relevant documentation]. Figure 1 ,exist Figure 1 The blockchain network shown may include multiple nodes 101, which can be various clients forming the blockchain network. Each node 101, in its normal operation, receives input information and maintains shared data within the blockchain network based on this information. To ensure information exchange within the blockchain network, information connections can exist between each node, allowing for information transmission. For example, when any node in the blockchain network receives input information, other nodes in the network obtain this input information according to a consensus algorithm and store it as shared data, ensuring data consistency across all nodes in the blockchain network.

[0067] Each node in a blockchain network has a corresponding node identifier, and each node can store the node identifiers of other nodes. This allows for the broadcast of generated blocks to other nodes in the blockchain network based on their node identifiers. Each node can maintain a list of node identifiers, storing the node name and its corresponding node identifier in this list. The node identifier can be an IP (Internet Protocol) address or any other information that can be used to identify the node.

[0068] Each node in a blockchain network stores the same blockchain. A blockchain consists of multiple blocks; please refer to [link to relevant documentation]. Figure 2 A blockchain consists of multiple blocks. The genesis block includes a block header and a block body. The block header stores input information features, version number, timestamp, and difficulty value, while the block body stores the input information. The next block after the genesis block is the parent block of the genesis block. The next block also includes a block header and a block body. The block header stores the input information features of the current block, the block header features of the parent block, version number, timestamp, and difficulty value, and so on. This ensures that the block data stored in each block is related to the block data stored in the parent block, guaranteeing the security of the input information in the blocks.

[0069] In a blockchain network, each node can be a server or a terminal device. A server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and intelligent platforms. Terminal devices can be smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, etc., but are not limited to these. Nodes can be directly or indirectly connected via wired or wireless communication, and this application does not impose any restrictions on this.

[0070] The aforementioned cloud computing refers to the delivery and usage model of IT infrastructure, specifically the acquisition of required resources through the network in an on-demand and easily scalable manner. In a broader sense, cloud computing refers to the delivery and usage model of services, namely, the acquisition of required services through the network in an on-demand and easily scalable manner. These services can be IT and software-related, internet-related, or other services. Cloud computing is a product of the convergence and development of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing. Driven by the development of the internet, real-time data streams, the diversification of connected devices, and the demands of search services, social networks, mobile commerce, and open collaboration, cloud computing has rapidly developed. Unlike previous parallel and distributed computing, the emergence of cloud computing will, conceptually, drive a revolutionary change in the entire internet model and enterprise management model.

[0071] In related technologies, each blockchain node participates in the consensus process for blocks. Only when the specified consensus strategy is met will the corresponding blockchain node add the block to its local blockchain. However, due to the performance limitations of the blockchain nodes themselves (some blockchain nodes have superior performance, some have moderate performance, and some have poor performance, etc.), the time required for each blockchain node to participate in the consensus process varies; thus, to some extent, the consensus efficiency of blocks is reduced.

[0072] Understandably, the complete consensus process for a block may involve consensus on the order of transaction execution and the results of transaction execution. Consensus on the order of transaction execution typically takes less time, while consensus on the results of transaction execution usually takes longer. This is because each blockchain node needs to execute the transactions contained in the block. Therefore, due to their own performance limitations, different blockchain nodes have different execution times, affecting the consensus efficiency of the block. Furthermore, if the execution time of some blockchain nodes is very long, it will significantly impact the consensus efficiency of the block.

[0073] Based on the aforementioned blockchain technology and the problem of low block consensus efficiency in related technologies, embodiments of this application provide a transaction processing scheme for a blockchain network. Specifically, in one application scenario of this application, please refer to... Figure 3 It mainly includes the transaction initiator 301 and the blockchain network 302.

[0074] It is understandable that the transaction initiator 301 is the party that initiates the transaction request, which can be done through any electronic device with an object input interface. These electronic devices include, but are not limited to, smartphones, tablets, laptops, computers, smart voice interaction devices, smart home appliances, in-vehicle terminals, aircraft, etc., and the object input interface includes, but is not limited to, touchscreens, keyboards, physical buttons, audio pickup devices, etc. The blockchain network 302 is the party responding to the transaction request; it is the aforementioned blockchain network, and will not be elaborated upon here.

[0075] In one embodiment of this application, performance parameter values ​​of multiple blockchain nodes in blockchain network 302 can be obtained, and then the multiple blockchain nodes can be classified into different types based on the performance parameter values ​​of each blockchain node.

[0076] For example, based on the performance parameter values ​​of each blockchain node, multiple blockchain nodes are classified into types, including: classifying blockchain nodes into a first type and a second type based on the relationship between the performance parameter values ​​of each blockchain node and a preset performance parameter threshold. Specifically, blockchain nodes with performance parameter values ​​lower than the preset performance parameter threshold are selected as first blockchain nodes (i.e., blockchain nodes of the first type), such as blockchain nodes 3021 and 3022 in blockchain network 302; blockchain nodes with performance parameter values ​​higher than or equal to the preset performance parameter threshold are selected as second blockchain nodes (i.e., blockchain nodes of the second type), such as blockchain nodes 3023 and 3024 in blockchain network 302.

[0077] Accordingly, since the first blockchain node has moderate performance, it can be responsible for reaching consensus on the order of transaction execution in the block. Since the second blockchain node has superior performance, it can be responsible for reaching consensus on the result of transaction execution in the block.

[0078] In this way, blockchain network 302 separates the consensus on transaction execution order from the consensus on transaction execution results. On the one hand, the first blockchain node with moderate performance reaches consensus on the transaction execution order, while the second blockchain node with superior performance reaches consensus on the transaction execution results. This avoids the phenomenon of long consensus time for transaction execution results, greatly improving consensus efficiency. On the other hand, different consensus strategies can be adopted, such as consensus strategy A for transaction execution order and consensus strategy B for transaction execution results, providing greater flexibility. Furthermore, for the transaction initiator 301, the transaction is uploaded to the blockchain quickly. As long as the consensus on the transaction execution order is passed, the transaction is considered uploaded to the blockchain, although it is currently in an unexecuted state. However, since the consensus on the transaction execution results is performed by the second blockchain node with superior performance, the execution time is also relatively short, which can improve the user experience for the transaction initiator to some extent.

[0079] In one embodiment of this application, it is not necessary to classify the multiple blockchain nodes in the blockchain network 302 by type; that is, the same blockchain node can be both the first blockchain node and the second blockchain node.

[0080] The following text uses the first blockchain node as an example, representing a blockchain node with moderate performance, and the second blockchain node as an example, representing a blockchain node with superior performance.

[0081] It should be noted that in the specific implementation of this application, data related to the object is involved. When the embodiments of this application are applied to specific products or technologies, permission or consent from the object is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0082] The following details the various implementation details of the technical solutions in the embodiments of this application:

[0083] Please see Figure 4 , Figure 4 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in one embodiment of this application. This transaction processing method can be executed by a first blockchain node in the blockchain network. Figure 4 As shown, the transaction processing method of this blockchain network includes at least steps S401 to S404, which are described in detail below:

[0084] Step S401: Obtain multiple transactions to be uploaded to the blockchain with an execution order.

[0085] In this embodiment, "transactions to be uploaded to the blockchain" refers to transactions to be stored in the blockchain network. It is understood that blocks are typically generated from multiple (at least two or more) transactions to be uploaded to the blockchain; that is, a block contains transaction data corresponding to multiple transactions to be uploaded to the blockchain. These transactions have an execution order. For example, if there are transactions A, B, C, D, and E to be uploaded to the blockchain, their execution order from earliest to latest is A>C>B>D>E. Only by executing according to this order (which is the order after consensus is reached) can the correctness of the transaction execution be guaranteed.

[0086] Step S402: Generate the first block based on multiple transactions to be uploaded to the blockchain.

[0087] In this embodiment, the first blockchain node obtains multiple transactions to be uploaded to the blockchain in an execution order, and then generates the first block based on the multiple transactions to be uploaded to the blockchain.

[0088] In this embodiment of the application, the first block refers to a block containing multiple transactions to be uploaded to the chain and the execution order of multiple transactions to be uploaded to the chain. For example, the first block Block(1) includes transactions A, B, C, D, and E to be uploaded to the chain, and the execution order (from earliest to latest) of transactions A, B, C, D, and E to be uploaded to the chain is A>C>B>D>E.

[0089] Step S403: Initiate a consensus process for the first block. The consensus process for the first block is used to reach a consensus on the execution order of multiple transactions to be uploaded to the blockchain.

[0090] In this embodiment of the application, the first blockchain node generates the first block based on multiple transactions to be uploaded to the chain, and then can initiate a consensus process for the first block.

[0091] In this embodiment of the application, the consensus process of the first block refers to the process of reaching a consensus on the execution order of multiple transactions to be uploaded to the chain, such as reaching a consensus on the execution order (from earliest to latest) A>C>B>D>E of the transactions to be uploaded to the chain A, B, C, D and E contained in the first block (1).

[0092] Step S404: If the consensus for the first block is passed, the first block is added to the first blockchain on the local first blockchain of the first blockchain node and broadcast, so that the second blockchain node can reach a consensus on the execution results of the multiple transactions to be uploaded to the blockchain based on the multiple transactions to be uploaded to the blockchain contained in the first block.

[0093] In this embodiment of the application, the first blockchain node initiates a consensus process for the first block, in which the following two situations exist:

[0094] In scenario one, if consensus is reached on the first block, the first block can be added to the first blockchain on the local blockchain of the first blockchain node and broadcast. In this way, the second blockchain node can reach consensus on the execution results of multiple transactions to be added to the blockchain based on the multiple transactions to be added to the blockchain contained in the first block.

[0095] For example, continuing from the previous example, suppose that the consensus on the execution order (from earliest to latest) of the transactions A, B, C, D, and E to be added to the blockchain contained in the first block (1) is passed, then the first block (1) can be added to the first blockchain of the first blockchain node, and the first block (1) can be broadcast. In this way, the second blockchain node can reach a consensus on the execution results of the multiple transactions to be added to the blockchain based on the multiple transactions to be added to the blockchain contained in the first block (1).

[0096] Scenario 2: If consensus on the first block fails, no action can be taken, or a new consensus on the first block can be initiated.

[0097] For example, continuing from the previous example, if the consensus on the execution order (from earliest to latest) A>C>B>D>E of the transactions A, B, C, D, and E to be added to the chain contained in the first block (1) fails, then the consensus on the first block (1) can be re-initiated.

[0098] In this embodiment, the execution order and consensus of multiple transactions to be uploaded to the blockchain are separated. After separation, they can be executed by blockchain nodes with matching performance (for example, the consensus of the execution order is executed by the first blockchain node with moderate performance, and the consensus of the execution result is executed by the second blockchain node with superior performance because each transaction needs to be executed). This avoids the phenomenon of low consensus efficiency caused by large differences in the consensus time of blockchain nodes due to performance reasons in related technologies (for example, for the consensus of a certain block, although the blockchain node with superior performance completes the corresponding processing quickly, it needs to wait for other blockchain nodes with moderate or poor performance to complete the corresponding processing, and the consensus efficiency for that block is relatively low). At the same time, after separating the two, each reasonable consensus mechanism can be used to conduct consensus separately, which is more flexible and can also improve consensus efficiency to a certain extent.

[0099] In one embodiment of this application, another transaction processing method for a blockchain network is provided, which can be executed by a first blockchain node in the blockchain network. Figure 5 As shown, the transaction processing method of this blockchain network may include steps S501 to S503, step S401, and steps S403 to S404.

[0100] Steps S501 to S503 are described in detail below:

[0101] Step S501: Obtain the timestamp information for each transaction to be uploaded to the blockchain.

[0102] In this embodiment, the timestamp information of the transaction to be added to the chain refers to the time information that triggers the transaction. For example, when the transaction initiator triggers the transfer control to trigger the transfer transaction, the moment when the transfer control is triggered is the time information that triggers the transfer transaction.

[0103] Step S502: Sort the multiple transactions to be uploaded to the blockchain based on the timestamp information of each transaction to be uploaded to the blockchain, and obtain the execution sorting sequence of the multiple transactions to be uploaded to the blockchain.

[0104] In this embodiment, the first blockchain node obtains the timestamp information of each transaction to be uploaded to the blockchain. Then, it can sort the multiple transactions to be uploaded to the blockchain based on the timestamp information of each transaction to obtain the execution sorting sequence of the multiple transactions to be uploaded to the blockchain.

[0105] For example, suppose the timestamps of transactions A, B, C, D, and E to be uploaded to the blockchain are t1, t3, t2, t4, and t5, respectively. Sorting them from earliest to latest, we get t1>t2>t3>t4>t5. Correspondingly, sorting transactions A, B, C, D, and E to be uploaded to the blockchain results in the execution sorting sequence A>C>B>D>E.

[0106] Step S503: Generate the first block based on the execution sorting sequence of multiple transactions to be uploaded to the blockchain.

[0107] In this embodiment, the first blockchain node sorts multiple transactions to be uploaded to the blockchain based on the timestamp information of each transaction to be uploaded, and obtains an execution sorting sequence of multiple transactions to be uploaded to the blockchain. Then, the first block can be generated based on the execution sorting sequence of multiple transactions to be uploaded to the blockchain.

[0108] For example, continuing from the previous example, if we obtain the execution sorting sequence A>C>B>D>E for transactions A, B, C, D, and E to be added to the blockchain, then we can generate the first block based on this sequence.

[0109] It should be noted that, Figure 5 For detailed descriptions of steps S401, S403 to S404 shown, please refer to [link to relevant documentation]. Figure 4 Steps S401, S403 to S404 shown will not be repeated here.

[0110] In this embodiment, the first blockchain node sorts multiple transactions to be uploaded to the blockchain based on the timestamp information of each transaction to be uploaded to the blockchain, so as to obtain an execution sorting sequence of multiple transactions to be uploaded to the blockchain, which improves the accuracy of sorting multiple transactions to be uploaded to the blockchain. Correspondingly, the consensus pass probability of the first block generated based on the execution sorting sequence of multiple transactions to be uploaded to the blockchain is also higher.

[0111] In one embodiment of this application, another transaction processing method for a blockchain network is provided, which can be executed by a first blockchain node in the blockchain network. Figure 6 As shown, the transaction processing method of this blockchain network is... Figure 4 Steps S601 to S602 are added after step S404 shown.

[0112] Steps S601 to S602 are described in detail below:

[0113] Step S601: Receive the second block broadcast by the second blockchain node; wherein, the second block includes the execution results of multiple transactions to be uploaded to the chain, and the second block is broadcast by the second blockchain node after the consensus of the second block is passed, and the consensus of the second block is the consensus of the execution results.

[0114] Understandably, since the second blockchain node can receive the first block broadcast by the first blockchain node, and reach a consensus on the execution results of the multiple transactions to be uploaded to the blockchain based on the first block, a second block containing the execution results of these transactions will be generated during the consensus process. After the second block reaches consensus, the second blockchain node will also broadcast it. Details regarding the second block's content will be provided later. Accordingly, the first blockchain node can receive the second block broadcast by the second blockchain node.

[0115] In this embodiment of the application, the second block refers to a block containing the execution results of multiple transactions to be uploaded to the blockchain. For example, following the previous example, if the multiple transactions to be uploaded to the blockchain are A, B, C, D, and E, then the second block Block(1') includes the execution results corresponding to the transactions to be uploaded to the blockchain A, B, C, D, and E.

[0116] Step S602: Verify the execution result contained in the second block, and add the second block to the second blockchain on the local side of the first blockchain node based on the verification result.

[0117] In this embodiment of the application, the first blockchain node receives the second block broadcast by the second blockchain node, and then can verify the execution results of multiple transactions to be added to the chain contained in the second block, and add the second block to the second blockchain on the local side of the first blockchain node based on the verification results.

[0118] That is, in this embodiment of the application, there are at least two blockchains on the first blockchain node side (referred to as the first blockchain and the second blockchain, respectively). The first block containing the execution order of multiple transactions to be uploaded to the chain, which has been agreed upon by consensus, is added to the local first blockchain, and the second block containing the execution result of multiple transactions to be uploaded to the chain, which has been agreed upon by consensus, is added to the local second blockchain.

[0119] For example, please see [link to example]. Figure 7 As shown, there are two blockchains on the local machine of the first blockchain node, namely the first blockchain and the second blockchain. The blocks in the first blockchain are blocks that have been agreed upon by consensus and contain the execution order of multiple transactions to be uploaded to the chain. The blocks in the second blockchain are blocks that have been agreed upon by consensus and contain the execution results of multiple transactions to be uploaded to the chain.

[0120] It should be noted that, Figure 6 For detailed information on steps S401 to S404 shown, please refer to [link to relevant documentation]. Figure 4 Steps S401 to S404 shown will not be repeated here.

[0121] In this embodiment, the execution order and consensus of multiple transactions to be uploaded to the blockchain are separated. Furthermore, the execution order and results of multiple transactions to be uploaded to the blockchain are stored separately through two chains, thus achieving the separation of the storage of the execution order and results of multiple transactions to be uploaded to the blockchain.

[0122] In one embodiment of this application, another transaction processing method for a blockchain network is provided, which can be executed by a first blockchain node in the blockchain network. Figure 8 As shown, the transaction processing method of the blockchain network may include steps S801 to S802, step S601, and steps S401 to S404.

[0123] Steps S801 to S802 are described in detail below:

[0124] Step S801: Based on the first preset endorsement strategy, verify the endorsement signature information associated with the execution result contained in the second block.

[0125] In this embodiment of the application, the first preset endorsement strategy refers to the endorsement strategy used to verify the second block. The endorsement strategy can be simply understood as the number or proportion of blockchain nodes that endorse a certain type / transaction. For example, endorsement strategy 1 requires blockchain nodes 1, 2, 3, and 4 in the blockchain network to endorse a transaction of type T. Endorsement strategy 2 requires blockchain nodes 2, 3, 4, 5, 6, and 7 in the blockchain network to endorse a transaction of type U.

[0126] In this embodiment of the application, the first blockchain node can verify the endorsement signature information associated with the execution result contained in the second block based on the first preset endorsement strategy, and obtain the verification result.

[0127] For example, continuing from the previous example, the second block (1') includes the execution results corresponding to transactions A, B, C, D, and E to be uploaded to the blockchain. Assuming that transactions A, B, C, D, and E are of the same type, the first blockchain node verifies the endorsement signature information associated with the execution results of transactions A, B, C, D, and E to be uploaded to the blockchain based on the first preset endorsement strategy, and obtains the verification results of the execution results corresponding to transactions A, B, C, D, and E to be uploaded to the blockchain.

[0128] Step S802: If the verification is successful, the second block is added to the second blockchain on the local blockchain of the first blockchain node.

[0129] In this embodiment, the first blockchain node verifies the endorsement signature information associated with the execution result contained in the second block based on the first preset endorsement strategy, obtains the verification result, and then determines whether to add the second block to the local second blockchain of the first blockchain node based on the verification result.

[0130] Optionally, if the verification result indicates that the verification is successful, the first blockchain node can add the second block to the second blockchain on its local blockchain; if the verification result indicates that the verification is unsuccessful, the first blockchain node will not add the second block to the second blockchain on its local blockchain, that is, it can do nothing or discard the second block.

[0131] For example, continuing from the previous example, if the verification results of the execution results corresponding to transactions A, B, C, D, and E to be uploaded to the blockchain all indicate that the verification has passed, then the first blockchain node can add the second block Block(1') to the second blockchain on the local first blockchain node; if one or more of the verification results of the execution results corresponding to transactions A, B, C, D, and E to be uploaded to the blockchain indicate that the verification has failed, then the first blockchain node can discard the second block Block(1').

[0132] It should be noted that, Figure 8 For a detailed description of step S601 shown, please refer to [link to relevant documentation]. Figure 6 Step S601 shown, Figure 8 For detailed information on steps S401 to S404 shown, please refer to [link to relevant documentation]. Figure 4 Steps S401 to S404 shown will not be repeated here.

[0133] In this embodiment, the first blockchain node adds the second block to its local second blockchain only after the second blockchain node has verified the second block broadcast by the second blockchain node through the first preset endorsement strategy, thus ensuring the accuracy of the second block being added to the chain.

[0134] In one embodiment of this application, another transaction processing method for a blockchain network is provided, which can be executed by a first blockchain node in the blockchain network. Figure 9 As shown, the transaction processing method of the blockchain network may include steps S901 to S902, step S801, step S601, and steps S401 to S404.

[0135] Steps S901 to S902 are described in detail below:

[0136] Step S901: Obtain the latest block of the second blockchain on the local machine of the first blockchain node.

[0137] In this embodiment of the application, the latest block of the second blockchain refers to the last block on the second blockchain, or the block with the highest height on the second blockchain.

[0138] In this embodiment of the application, after the first blockchain node passes the verification of the second block, it can obtain the latest block of the second blockchain on its local machine.

[0139] For example, if the highest block height on the second blockchain of the first blockchain node is H, then the first blockchain node can obtain the block with block height H as the latest block.

[0140] Step S902: Add the second block after the latest block; wherein the block height of the second block on the local second blockchain matches the block height of the first block on the local first blockchain.

[0141] In this embodiment of the application, the first blockchain node obtains the latest block of the second blockchain on its local network, and then adds the second block after the latest block to achieve the on-chaining of the second block.

[0142] For example, continuing from the previous example, the first blockchain node obtains the block with block height H as the latest block. Then, the first blockchain node can add the second block Block(1') after the block with block height H. At this time, the second block becomes the block with block height H+1 on the first blockchain node's local second blockchain, that is, it is the latest block on the current local second blockchain.

[0143] It is understandable that the block height of the second block on the local second blockchain matches the block height of the first block on the local first blockchain. For example, in the previous example, the block height of the second block (1') on the local second blockchain of the first blockchain node is H+1, and the block height of the first block (1) on the local first blockchain of the first blockchain node is also H+1. That is, although the first block and the second block reside on different blockchains, there is a certain relationship between them. This is because both the first block and the second block deal with the same multiple transactions to be uploaded to the blockchain; one deals with the execution order of these transactions, and the other deals with the execution result. Thus, the block height establishes a connection between blocks uploaded to different blockchains, facilitating the acquisition or use of relevant data in practical applications.

[0144] It should be noted that, Figure 9 For a detailed description of step S801 shown, please refer to [link to relevant documentation]. Figure 8 The step S801 shown is... Figure 9 For a detailed description of steps S601 to S602 shown, please refer to [link to relevant documentation]. Figure 6 Steps S601 to S602 shown are as follows: Figure 9 For detailed information on steps S401 to S403 shown, please refer to [link / reference]. Figure 4 Steps S401 to S403 shown will not be repeated here.

[0145] In this embodiment, the first blockchain node adds the second block after the latest block of the second blockchain on its local blockchain, and the block height of the second block on the local second blockchain matches the block height of the first block on the local first blockchain, thus establishing a connection between the first block in the first blockchain and the second block in the second blockchain, which facilitates the acquisition or use of relevant data in practical applications.

[0146] Figures 4 to 9 The illustrated embodiment is presented from the perspective of the first blockchain node. The following description, combined with... Figures 10 to 19 The implementation details of the technical solution in this application embodiment are described in detail from the perspective of the second blockchain node:

[0147] Please see Figure 10 , Figure 10 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in one embodiment of this application. This transaction processing method can be executed by a second blockchain node in the blockchain network. Figure 10 As shown, the transaction processing method of this blockchain network includes at least steps S1001 to S1004, which are described in detail below:

[0148] Step S1001: Receive the first block broadcast by the first blockchain node; wherein, the first block includes multiple transactions to be uploaded to the chain, and the first block is broadcast by the first blockchain node after the consensus of the first block is passed, and the consensus of the first block is a consensus on the execution order of the multiple transactions to be uploaded to the chain.

[0149] In this embodiment of the application, the first blockchain node broadcasts the first block after consensus is passed. Correspondingly, the second blockchain node can receive the first block broadcast by the first blockchain node. The relevant content of the first block can be found in the foregoing description and will not be repeated here.

[0150] Step S1002: Based on the execution results of multiple transactions to be uploaded to the blockchain, generate the second block.

[0151] In this embodiment of the application, the second blockchain node receives the first block broadcast by the first blockchain node, and then can generate the second block based on the execution results of multiple transactions to be uploaded to the chain.

[0152] In this embodiment of the application, the second block refers to a block containing the execution results of multiple transactions to be uploaded to the blockchain. For example, following the previous example, if the multiple transactions to be uploaded to the blockchain are A, B, C, D, and E, then the second block Block(1') includes the execution results corresponding to the transactions to be uploaded to the blockchain A, B, C, D, and E.

[0153] Step S1003: Initiate a consensus process for the second block. The consensus process for the second block is used to reach a consensus on the execution result.

[0154] In this embodiment of the application, the second blockchain node generates a second block based on the execution results of multiple transactions to be uploaded to the chain. Then, a consensus process for the second block can be initiated. The consensus process for the second block is used to reach a consensus on the execution results.

[0155] In this embodiment of the application, the consensus process of the second block refers to the process of reaching consensus on the execution results of multiple transactions to be uploaded to the chain, such as reaching consensus on the execution results of transactions A, B, C, D, and E to be uploaded to the chain contained in the second block Block(1').

[0156] Step S1004: If consensus is reached on the second block, then the second block is added to the second blockchain on the local second blockchain node.

[0157] In this embodiment of the application, the second blockchain node initiates a consensus process for the second block, in which the following two situations exist:

[0158] In scenario one, if consensus is reached on the second block, the second block can be added to the second blockchain on the local second blockchain node.

[0159] For example, continuing from the previous example, if the consensus on the execution results of transactions A, B, C, D, and E to be added to the blockchain contained in the second block (1') is passed, then the second block (1') can be added to the second blockchain on the local second blockchain of the second blockchain node.

[0160] Scenario 2: If consensus on the second block fails, no action can be taken, or a new consensus on the second block can be initiated.

[0161] For example, continuing from the previous example, if the consensus on the execution results of transactions A, B, C, D, and E to be added to the chain contained in the second block (1') fails, then the consensus on the second block (1') can be re-initiated.

[0162] Optionally, if consensus is reached on the second block, the second block can be broadcast. This allows the first blockchain node to verify the execution results of the multiple transactions to be added to the chain contained in the second block, and add the second block to the local second blockchain of the first blockchain node based on the verification results. Please refer to the foregoing introduction for details, which will not be repeated here.

[0163] In this embodiment, the first blockchain node initiates a consensus on the execution order of multiple transactions to be uploaded to the blockchain. After the consensus is passed, the first block is added to the first blockchain on the local blockchain of the first blockchain node, and the first block is broadcast. Thus, the second blockchain node can initiate a consensus on the execution results of multiple transactions to be uploaded to the blockchain. After the consensus is passed, the second block is added to the second blockchain on the local blockchain of the second blockchain node. This separates the consensus on the execution order and execution results of multiple transactions to be uploaded to the blockchain, thereby improving consensus efficiency.

[0164] In one embodiment of this application, another transaction processing method for a blockchain network is provided, which can be executed by a second blockchain node in the blockchain network. Figure 11 As shown, the transaction processing method of the blockchain network may include steps S1101 to S1102, step S1001, and steps S1003 to S1004.

[0165] Steps S1101 to S1102 are described in detail below:

[0166] Step S1101: Execute multiple transactions to be uploaded to the blockchain and obtain the execution results of the multiple transactions to be uploaded to the blockchain.

[0167] In this embodiment, the second blockchain node needs to execute multiple transactions to be uploaded to the blockchain to obtain the execution results of the multiple transactions to be uploaded to the blockchain.

[0168] For example, following the previous example, the first block (1) contains transactions A, B, C, D, and E to be uploaded to the blockchain. At this time, the second blockchain node needs to execute transactions A, B, C, D, and E to obtain the execution results of transactions A, B, C, D, and E.

[0169] Step S1102: Based on the execution results of multiple transactions to be uploaded to the blockchain, generate the second block.

[0170] In this embodiment of the application, the second blockchain node executes multiple transactions to be uploaded to the blockchain, obtains the execution results of the multiple transactions to be uploaded to the blockchain, and then generates a second block based on the execution results of the multiple transactions to be uploaded to the blockchain.

[0171] For example, continuing from the previous example, the second blockchain node executes transactions A, B, C, D, and E to be uploaded to the blockchain, and obtains the execution results of transactions A, B, C, D, and E. Then, the second block can be generated based on the execution results of transactions A, B, C, D, and E to be uploaded to the blockchain.

[0172] It should be noted that, Figure 11 For detailed descriptions of steps S1001, S1003 to S1004 shown, please refer to [link to relevant documentation]. Figure 10 Steps S1001, S1003 to S1004 shown will not be described again here.

[0173] In this embodiment, the second blockchain node executes multiple transactions to be uploaded to the blockchain to obtain the execution results of the multiple transactions to be uploaded to the blockchain, thereby improving the accuracy of the execution results of the multiple transactions to be uploaded to the blockchain. Correspondingly, the consensus pass probability of the second block generated based on the execution results of the multiple transactions to be uploaded to the blockchain is also higher.

[0174] In one embodiment of this application, another transaction processing method for a blockchain network is provided, which can be executed by a second blockchain node in the blockchain network. Figure 12 As shown, the transaction processing method of the blockchain network may include steps S1201 to S1203, step S1001, and steps S1003 to S1004.

[0175] Steps S1201 to S1202 are described in detail below:

[0176] Step S1201: Obtain the block height of the first block.

[0177] Optionally, the second blockchain node can send a request to the first blockchain node to obtain the block height of the first block, and then receive the block height of the first block sent by the first blockchain node to obtain the block height of the first block.

[0178] Optionally, the first blockchain node can broadcast the first block and its block height together, so that the second blockchain node can obtain the block height of the first block.

[0179] Optionally, before adding the first block to its local first blockchain, the first blockchain node can determine the block height of the latest block in its local first blockchain, then determine the block height of the first block to be added to its local first blockchain based on the block height of the latest block, add the block height to the first block, and then add the first block containing the block height to its local first blockchain; in this way, the second blockchain node can obtain the block height of the first block from the first block.

[0180] Step S1202: Associate the block height, the identifier information of multiple transactions to be uploaded to the blockchain, and the execution results of multiple transactions to be uploaded to the blockchain to obtain the association result of multiple transactions to be uploaded to the blockchain.

[0181] In this embodiment, the second blockchain node obtains the block height of the first block, and then associates the block height, the identifier information of multiple transactions to be uploaded to the blockchain, and the execution results of the multiple transactions to be uploaded to the blockchain to obtain the association result of the multiple transactions to be uploaded to the blockchain.

[0182] For example, suppose the block height of the first block Block(1) obtained by the second blockchain node is H+1, and the identification information of multiple transactions to be uploaded to the chain is A, B, C, D, E, and the execution results of multiple transactions to be uploaded to the chain are R1, R2, R3, R4, R5, respectively. By associating the block height H+1, the identification information of multiple transactions to be uploaded to the chain A, B, C, D, E, and the execution results R1, R2, R3, R4, R5 of multiple transactions to be uploaded to the chain, we can obtain the association result of multiple transactions to be uploaded to the chain A, B, C, D, E.

[0183] Step S1203: Based on the correlation results of multiple transactions to be uploaded to the blockchain, generate the second block.

[0184] In this embodiment, the second blockchain node associates the block height, the identifier information of multiple transactions to be uploaded to the chain, and the execution results of the multiple transactions to be uploaded to the chain to obtain the association results of the multiple transactions to be uploaded to the chain. Then, based on the association results of the multiple transactions to be uploaded to the chain, a second block can be generated.

[0185] For example, continuing from the previous example, the second blockchain node obtains the association results of multiple transactions A, B, C, D, and E to be uploaded to the blockchain, and then can generate a second block based on the association results of multiple transactions A, B, C, D, and E to be uploaded to the blockchain.

[0186] It should be noted that, Figure 12 For detailed descriptions of steps S1001, S1003 to S1004 shown, please refer to [link to relevant documentation]. Figure 10 Steps S1001, S1003 to S1004 shown will not be described again here.

[0187] In this embodiment, the second blockchain node generates a second block based on the block height of the first block, the identification information of multiple transactions to be uploaded to the chain, and the association results of the execution results of the multiple transactions to be uploaded to the chain. This establishes a connection between the first block and the second block, facilitating the acquisition or use of relevant data in practical applications.

[0188] In one embodiment of this application, another transaction processing method for a blockchain network is provided, which can be executed by a second blockchain node in the blockchain network. Figure 13 As shown, the transaction processing method of the blockchain network may include steps S1301 to S1302, step S1201, step S1203, step S1001, and steps S1003 to S1004.

[0189] Steps S1301 to S1302 are described in detail below:

[0190] Step S1301: Generate key elements based on the identification information of multiple transactions to be uploaded to the blockchain, and generate value elements based on the execution results of multiple transactions to be uploaded to the blockchain.

[0191] In this embodiment of the application, the second blockchain node can generate key elements based on the identification information of multiple transactions to be uploaded to the blockchain, and generate value elements based on the execution results of multiple transactions to be uploaded to the blockchain.

[0192] For example, following the previous example, the second blockchain node can generate a key element (key) based on the identifier information A of the transaction A to be uploaded to the blockchain, and generate a value element (value) based on the execution result R1 of the transaction A to be uploaded to the blockchain. The key elements (key) and value elements (value) of other transactions to be uploaded to the blockchain can be generated in the same way. That is, in this embodiment of the application, the identifier information and execution result of the transaction to be uploaded to the blockchain can be associated in the form of key-value pairs.

[0193] Step S1302: Associate the block height with the key element and value element corresponding to the same transaction to be uploaded to the blockchain, and obtain the association results of multiple transactions to be uploaded to the blockchain.

[0194] In this embodiment, the second blockchain node generates key elements based on the identification information of multiple transactions to be uploaded to the blockchain, and generates value elements based on the execution results of multiple transactions to be uploaded to the blockchain. Then, the block height can be associated with the key element and value element corresponding to the same transaction to be uploaded to the blockchain to obtain the association result of multiple transactions to be uploaded to the blockchain.

[0195] For example, continuing from the previous example, we associate block height H+1 with the key-value pair of transaction A to be added to the blockchain, thus obtaining the association result of transaction A. We associate block height H+1 with the key-value pair of transaction B to be added to the blockchain, thus obtaining the association result of transaction B. The association results of other transactions to be added to the blockchain can be obtained in the same way, thus obtaining the association results of multiple transactions A, B, C, D, and E to be added to the blockchain.

[0196] For easier understanding, please refer to Figure 14 The image shows an example of the associated result, which includes the identifier key of the transaction to be added to the blockchain, the execution result value of the transaction to be added to the blockchain, and the block height.

[0197] It should be noted that, Figure 13 For detailed information on steps S1201 and S1203 shown, please refer to [link / reference]. Figure 12 The steps S1201 and S1203 shown are as follows: Figure 13 For detailed descriptions of steps S1001, S1003 to S1004 shown, please refer to [link to relevant documentation]. Figure 10 Steps S1001, S1003 to S1004 shown will not be described again here.

[0198] In this embodiment, the second blockchain node associates the identification information and execution result of the transaction to be uploaded to the chain in the form of key-value pairs, and highly correlates the identification information and execution result of the transaction to be uploaded to the chain in the form of key-value pairs with the block height of the first block to obtain the association result of the three. This is simple, convenient, less prone to error, and the association result obtained is more accurate.

[0199] In one embodiment of this application, another transaction processing method for a blockchain network is provided, which can be executed by a second blockchain node in the blockchain network. Figure 15 As shown, the transaction processing method of this blockchain network is... Figure 10 Step S1501 is added after step S1001 shown.

[0200] Step S1501 is described in detail below:

[0201] Step S1501: Verify the execution order contained in the first block, and add the first block to the first blockchain on the local blockchain of the second blockchain node based on the verification result.

[0202] In this embodiment, the second blockchain node receives the first block broadcast by the first blockchain node, and then verifies the execution order of multiple transactions to be added to the chain contained in the first block, and adds the first block to the local first blockchain of the second blockchain node based on the verification result.

[0203] That is, in this embodiment of the application, there are at least two blockchains on the second blockchain node side (referred to as the first blockchain and the second blockchain, respectively). The first block containing the execution order of multiple transactions to be uploaded to the chain, which has been agreed upon by consensus, is added to the local first blockchain, and the second block containing the execution result of multiple transactions to be uploaded to the chain, which has been agreed upon by consensus, is added to the local second blockchain.

[0204] For example, please see [link to example]. Figure 16 As shown, there are two blockchains on the local machine of the second blockchain node, namely the first blockchain and the second blockchain. The blocks in the first blockchain are blocks that have been agreed upon by consensus and contain the execution order of multiple transactions to be uploaded to the chain. The blocks in the second blockchain are blocks that have been agreed upon by consensus and contain the execution results of multiple transactions to be uploaded to the chain.

[0205] It should be noted that, Figure 15 For a detailed description of steps S1001 to S1004 shown, please refer to [link to relevant documentation]. Figure 10 Steps S1001 to S1004 shown will not be repeated here.

[0206] In this embodiment, the execution order and consensus of multiple transactions to be uploaded to the blockchain are separated. Furthermore, the execution order and results of multiple transactions to be uploaded to the blockchain are stored separately through two chains, thus achieving the separation of the storage of the execution order and results of multiple transactions to be uploaded to the blockchain.

[0207] In one embodiment of this application, another transaction processing method for a blockchain network is provided, which can be executed by a second blockchain node in the blockchain network. Figure 17 As shown, the transaction processing method of this blockchain network may include steps S1701 to S1702 and steps S1001 to S1004.

[0208] Steps S1701 to S1702 are described in detail below:

[0209] Step S1701: Based on the second preset endorsement strategy, verify the endorsement signature information associated with the execution order contained in the first block.

[0210] In this embodiment of the application, the second preset endorsement strategy refers to the endorsement strategy used to verify the first block.

[0211] In this embodiment of the application, the second blockchain node can verify the endorsement signature information associated with the execution order contained in the first block based on the second preset endorsement strategy, and obtain the verification result.

[0212] For example, following the previous example, the first block (1) includes the execution order of transactions A, B, C, D, and E to be uploaded to the blockchain. Assuming that transactions A, B, C, D, and E are of the same type, the second blockchain node verifies the endorsement signature information associated with the execution order of transactions A, B, C, D, and E based on the second preset endorsement strategy, and obtains the verification results of the execution order of transactions A, B, C, D, and E to be uploaded to the blockchain.

[0213] Step S1702: If the verification is successful, the first block is added to the first blockchain on the local blockchain of the second blockchain node.

[0214] In this embodiment, the second blockchain node verifies the endorsement signature information associated with the execution order contained in the first block based on the second preset endorsement strategy, obtains the verification result, and then determines whether to add the first block to the local first blockchain of the second blockchain node based on the verification result.

[0215] Optionally, if the verification result indicates that the verification is successful, the second blockchain node can add the first block to the first blockchain on its local network; if the verification result indicates that the verification is unsuccessful, the second blockchain node will not add the first block to the first blockchain on its local network, that is, it can either leave it as is or discard the first block.

[0216] For example, continuing from the previous example, if the verification results of the execution order corresponding to the transactions A, B, C, D, and E to be added to the blockchain all indicate that the verification has passed, then the second blockchain node can add the first block (1) to the first blockchain on the local blockchain of the second blockchain node; if one or more of the verification results of the execution order corresponding to the transactions A, B, C, D, and E to be added to the blockchain indicate that the verification has failed, then the second blockchain node can discard the first block (1).

[0217] It should be noted that, Figure 17 For a detailed description of steps S1001 to S1004 shown, please refer to [link to relevant documentation]. Figure 10 Steps S1001 to S1004 shown will not be repeated here.

[0218] In this embodiment, the second blockchain node adds the first block to its local first blockchain only after the first blockchain node has verified the first block broadcast by the first blockchain node through the second preset endorsement strategy, thus ensuring the accuracy of the first block being uploaded to the chain.

[0219] In one embodiment of this application, another transaction processing method for a blockchain network is provided, which can be executed by a second blockchain node in the blockchain network. Figure 18 As shown, the transaction processing method of the blockchain network may include steps S1801 to S1802, step S1501, and steps S1001 to S1003.

[0220] Steps S1801 to S1802 are described in detail below:

[0221] Step S1801: Obtain the latest block of the second blockchain on the local side of the second blockchain node.

[0222] In this embodiment of the application, the latest block of the second blockchain refers to the last block on the second blockchain, or the block with the highest height on the second blockchain.

[0223] In this embodiment of the application, the second blockchain node needs to obtain the latest block of the second blockchain on the local side of the second blockchain node.

[0224] For example, if the highest block height on the second blockchain of the second blockchain node is H, then the second blockchain node needs to obtain the block with block height H as the latest block.

[0225] Step S1802: Add the second block after the latest block; wherein the block height of the second block on the local second blockchain matches the block height of the first block on the local first blockchain.

[0226] In this embodiment of the application, the second blockchain node obtains the latest block of the second blockchain on its local network, and then adds the second block after the latest block to achieve the on-chaining of the second block.

[0227] For example, continuing from the previous example, the second blockchain node obtains the block with block height H as the latest block. Then, the second blockchain node can add the second block Block(1') after the block with block height H. At this time, the second block becomes the block with block height H+1 on the second blockchain of the second blockchain node, that is, it is the latest block on the current local second blockchain.

[0228] It is understandable that the block height of the second block on the local second blockchain matches the block height of the first block on the local first blockchain. For example, in the previous example, the block height of the second block (1') on the local second blockchain of the second blockchain node is H+1, and the block height of the first block (1) on the local first blockchain of the second blockchain node is also H+1. That is, although the first and second blocks reside on different blockchains, there is a certain relationship between them. This is because both the first and second blocks deal with the same multiple transactions to be uploaded to the blockchain; one deals with the execution order of these transactions, and the other with the execution result. Thus, the block height establishes a connection between blocks uploaded to different blockchains, facilitating the acquisition or use of relevant data in practical applications.

[0229] It should be noted that, Figure 18 For a detailed description of step S1501 shown, please refer to [link to relevant documentation]. Figure 15 The step S1501 shown is... Figure 18 For a detailed description of steps S1001 to S1003 shown, please refer to [link to relevant documentation]. Figure 10 Steps S1001 to S1003 shown will not be repeated here.

[0230] In this embodiment, the second blockchain node adds the first block to the first blockchain on its local network, and simultaneously adds the second block to the second blockchain on its local network. The block height of the second block on the local network matches the block height of the first block on the local network, thus establishing a connection between the first block in the first blockchain and the second block in the second blockchain. This facilitates the acquisition or use of relevant data in practical applications.

[0231] In one embodiment of this application, another transaction processing method for a blockchain network is provided, which can be executed by a second blockchain node in the blockchain network. For example... Figure 19 As shown, the transaction processing method of this blockchain network is... Figure 10 Steps S1901 to S1903 are added after step S1004 shown.

[0232] Steps S1901 to S1903 are described in detail below:

[0233] Step S1901: Receive a query request for the transaction execution result, which carries the transaction identification information.

[0234] In this embodiment of the application, the transaction initiator can send a query request for the transaction execution result to the blockchain network. Correspondingly, the second blockchain node receives the query request for the transaction execution result, wherein the query request for the transaction execution result carries the transaction identification information.

[0235] Step S1902: Obtain the execution result that matches the transaction's identification information from the local second blockchain.

[0236] Understandably, since the second blockchain node stores the transaction execution results in its local second blockchain, the second blockchain node receives a query request for the transaction execution results and then retrieves the execution results that match the transaction's identifier information from its local second blockchain.

[0237] Step S1903: Based on the acquisition of execution results matching the transaction identification information, return the transaction query results.

[0238] In this embodiment of the application, the second blockchain node returns transaction query results based on the execution results obtained by matching the transaction's identifier information. The following two scenarios exist:

[0239] In case one, if the obtained transaction identifier information matches the execution result, then the obtained transaction execution result is used to generate a transaction query result and return the transaction query result.

[0240] Scenario 2: If the retrieval status indicates that no execution result matching the transaction identifier information is found, then transaction execution incomplete information is generated and returned as the transaction query result.

[0241] It is understandable that the first blockchain node can also receive query requests for transaction execution results, and then obtain the execution results that match the transaction identification information from its local second blockchain. After that, based on the acquisition of the execution results that match the transaction identification information, it returns the transaction query results. Please refer to the above introduction for details, which will not be repeated here.

[0242] It should be noted that, Figure 19 For a detailed description of steps S1001 to S1004 shown, please refer to [link to relevant documentation]. Figure 10 Steps S1001 to S1004 shown will not be repeated here.

[0243] In this embodiment of the application, the second blockchain node can receive a query request for the transaction execution result and obtain the execution result that matches the transaction identification information from the local second blockchain. Based on the acquisition of the execution result that matches the transaction identification information, the node returns the transaction query result to meet the needs of different scenarios.

[0244] The technical solutions of the embodiments of this application have been described above from the perspectives of the first blockchain node and the second blockchain node, respectively. The following describes in detail a specific application scenario of the embodiments of this application in conjunction with the first blockchain node (taking the sorting node as an example) and the second blockchain node (taking the execution node as an example):

[0245] First, let's introduce the consensus process.

[0246] Please see Figure 20 , Figure 20 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in one embodiment of this application. Figure 20 As shown, the transaction processing method of this blockchain network includes at least steps S2001 to S2017, which are detailed below:

[0247] Step S2001: The sorting node obtains multiple transactions to be uploaded to the chain with an execution order.

[0248] In step S2002, the sorting node generates the first block based on multiple transactions to be added to the chain.

[0249] Optionally, the sorting node obtains the timestamp information of each transaction to be uploaded to the blockchain, and then sorts the multiple transactions to be uploaded to the blockchain based on the timestamp information of each transaction to be uploaded to the blockchain to obtain the execution sorting sequence of the multiple transactions to be uploaded to the blockchain. Then, based on the execution sorting sequence of the multiple transactions to be uploaded to the blockchain, the first block is generated.

[0250] Step S2003: The sorting node initiates a consensus process for the first block.

[0251] The consensus process of the first block is used to reach a consensus on the execution order of multiple transactions to be uploaded to the blockchain.

[0252] Step S2004: If the consensus of the sorting nodes for the first block is passed, the first block is added to the first blockchain on the local sorting nodes and the first block is broadcast.

[0253] Step S2005: Execute the node to detect the newly generated first block.

[0254] Step S2006: The execution node receives the first block broadcast by the sorting node.

[0255] In step S2007, the execution node verifies the execution order contained in the first block received; if the verification passes, step S2009 is executed; if the verification fails, step S2008 is executed.

[0256] Optionally, the execution node verifies the endorsement signature information associated with the execution result contained in the first block based on the second preset endorsement strategy.

[0257] Step S2008: The execution node discards the first block.

[0258] In step S2009, the execution node adds the first block to the first blockchain on the execution node's local machine.

[0259] In step S2010, the execution node executes multiple transactions to be uploaded to the blockchain, and obtains the execution results of the multiple transactions to be uploaded to the blockchain.

[0260] In step S2011, the execution node generates a second block based on the execution results of multiple transactions to be uploaded to the blockchain.

[0261] Optionally, the execution node generates key elements based on the identification information of multiple transactions to be uploaded to the blockchain, and generates value elements based on the execution results of multiple transactions to be uploaded to the blockchain. The block height of the first block is then associated with the key element and value element corresponding to the same transaction to be uploaded to the blockchain, respectively, to obtain the association result of multiple transactions to be uploaded to the blockchain.

[0262] Step S2012: The execution node initiates a consensus process for the second block.

[0263] The consensus process in the second block is used to reach a consensus on the execution result.

[0264] In step S2013, if the consensus of the execution node for the second block is passed, the second block is added to the second blockchain on the execution node's local network and broadcast.

[0265] Optionally, the executing node obtains the latest block of the second blockchain on its local machine and adds the second block after the latest block; wherein the block height of the second block on the local second blockchain matches the block height of the first block on the local first blockchain.

[0266] In step S2014, the sorting node receives the second block broadcast by the execution node.

[0267] In step S2015, the sorting node verifies the execution result contained in the received second block; if the verification passes, step S2017 is executed; if the verification fails, step S2016 is executed.

[0268] Optionally, the sorting node verifies the endorsement signature information associated with the execution order contained in the second block based on the first preset endorsement strategy.

[0269] In step S2016, the sorting node discards the second block.

[0270] In step S2017, the sorting node adds the second block to the second blockchain on the sorting node's local machine.

[0271] Optionally, the sorting node obtains the latest block of the second blockchain on its local blockchain and adds the second block after the latest block; wherein the block height of the second block on the local second blockchain matches the block height of the first block on the local first blockchain.

[0272] It should be noted that, Figure 20 For a detailed description of steps S2001 to S2017 shown, please refer to the foregoing embodiments, which will not be repeated here.

[0273] In one embodiment of this application, please refer to Figures 21 to 22 Both sorting nodes and execution nodes correspond to two blockchains. The first blockchain (also called the transaction chain, chain1) contains blocks that have reached consensus and represent the execution order of multiple transactions awaiting on-chain processing. Specifically, blocks on the transaction chain include ordered sets of transactions such as Tx(0), Tx(0), Tx(...), and Tx(n). The second blockchain (also called the execution chain, chain2) contains blocks that have reached consensus and represent the execution results of multiple transactions awaiting on-chain processing. Specifically, blocks on the execution chain include ordered sets of execution results such as key(0), value(0), height, key(1), value(1), height, key(...), value(...), height, and key(n), value(n), height. It is understood that the validator signature information can be the signature information of the blockchain node endorsing the transaction. For details regarding the block header and block body, please refer to the aforementioned introduction; further details will not be repeated here.

[0274] In one embodiment of this application, please refer to Figure 23 Depending on changes in business needs, in certain scenarios, the aforementioned Figure 22 It can be extended, namely, transaction chain, extended chain chain(1), extended chain chain(...), and extended chain chain(k). It can be understood that the extended chain chain(1) can be the aforementioned execution chain chain. For the extended chain chain, the data contained in its blocks all depend on the transaction chain chain.

[0275] In one embodiment of this application, please refer to Figure 24 Depending on changes in business needs, in certain scenarios, the aforementioned Figure 22It can be extended, namely, transaction chain, extended chain chain(1), extended chain chain(...), and extended chain chain(k). It can be understood that the extended chain chain(1) can be the aforementioned execution chain chain. For the extended chain chain, the data contained in the block of each layer of extended chain depends on the adjacent upper layer extended chain chain.

[0276] In one embodiment of this application, please refer to Figure 25 Depending on changes in business needs, in certain scenarios, the aforementioned Figure 22 It can be extended, namely, transaction chain, extended chain chain(1), extended chain chain(...), and extended chain chain(k). It can be understood that the extended chain chain(1) can be the aforementioned execution chain chain. For the extended chain chain, the data contained in the block of each layer of extended chain can depend on the transaction chain chain or on the adjacent upper layer extended chain chain.

[0277] Secondly, the query process will be introduced.

[0278] Please see Figure 26 , Figure 26 This is a flowchart illustrating a transaction processing method for a blockchain network, as shown in one embodiment of this application. Figure 26 As shown, the transaction processing method of this blockchain network includes at least steps S2601 to S2616, which are described in detail below:

[0279] In step S2601, the sorting node or execution node receives a query request for the transaction execution result sent by the client (i.e., the transaction initiator).

[0280] The query request for the transaction execution result includes the transaction's identification information.

[0281] In step S2602, the sorting node or execution node retrieves a second block from the local second blockchain that matches the identification information of the transaction.

[0282] In step S2603, the sorting node or execution node determines the execution status of the second block on the second blockchain; if the execution status representation is complete, then step S2604 is executed; if the execution status representation is not complete, then step S2605 is executed.

[0283] In step S2604, the sorting node or execution node obtains the execution result that matches the identification information of the transaction from the second block, generates the transaction query result based on the obtained transaction execution result, and returns the transaction query result to the client (i.e. the transaction initiator).

[0284] In step S2605, the sorting node or execution node generates transaction execution incomplete information and returns the transaction query result to the client (i.e., the transaction initiator) as the transaction query result.

[0285] It should be noted that, Figure 26 For a detailed description of steps S2601 to S2605 shown, please refer to the foregoing embodiments, which will not be repeated here.

[0286] Figure 27 This is a block diagram illustrating a transaction processing apparatus for a blockchain network, as shown in one embodiment of this application. Figure 27 As shown, the transaction processing device of this blockchain network includes:

[0287] The first acquisition module 2701 is configured to acquire a transaction set, which contains multiple transactions to be uploaded to the blockchain with an execution order.

[0288] The first generation module 2702 is configured to generate the first block based on the execution sorting sequence of multiple transactions to be uploaded to the chain;

[0289] The first consensus module 2703 is configured to initiate a consensus process for the first block. The consensus process for the first block is used to reach a consensus on the execution order of multiple transactions to be uploaded to the chain.

[0290] Add and broadcast module 2704, configured to add the first block to the first blockchain on the local first blockchain of the first blockchain node and broadcast the first block if consensus is passed for the first block, so that the second blockchain node can reach consensus on the execution results of multiple transactions to be uploaded to the chain based on the multiple transactions to be uploaded to the chain contained in the first block.

[0291] In one embodiment of this application, the first generation module 2702 is specifically configured as follows:

[0292] Obtain the timestamp information of each transaction to be uploaded to the blockchain;

[0293] Based on the timestamp information of each transaction to be uploaded to the blockchain, multiple transactions to be uploaded to the blockchain are sorted to obtain an execution sorting sequence for the multiple transactions to be uploaded to the blockchain.

[0294] The first block is generated based on the execution order sequence of multiple transactions to be uploaded to the blockchain.

[0295] In one embodiment of this application, the apparatus further includes:

[0296] The first receiving module is configured to receive the second block broadcast by the second blockchain node; wherein the second block includes the execution results of multiple transactions to be uploaded to the chain, and the second block is broadcast by the second blockchain node after the consensus of the second block is passed, and the consensus of the second block is the consensus of the execution results;

[0297] The first verification module is configured to verify the execution result contained in the second block and add the second block to the second blockchain on the local side of the first blockchain node based on the verification result.

[0298] In one embodiment of this application, the first verification module is specifically configured as follows:

[0299] Based on the first preset endorsement strategy, the endorsement signature information associated with the execution result contained in the second block is verified.

[0300] If the verification passes, the second block is added to the second blockchain on the local machine of the first blockchain node.

[0301] In one embodiment of this application, a broadcast module 2704 is added, specifically configured as follows:

[0302] Retrieve the latest block of the second blockchain on the local machine of the first blockchain node;

[0303] Add the second block after the latest block; wherein the block height of the second block on the local second blockchain matches the block height of the first block on the local first blockchain.

[0304] In one embodiment of this application, the apparatus further includes:

[0305] The first selection module is configured to obtain the performance parameter values ​​of multiple blockchain nodes; based on the performance parameter values ​​of each blockchain node, select the blockchain node whose performance parameter value is lower than a preset performance parameter threshold as the first blockchain node.

[0306] Figure 28 This is a block diagram illustrating a transaction processing apparatus for a blockchain network, as shown in one embodiment of this application. Figure 28 As shown, the transaction processing device of this blockchain network includes:

[0307] The second acquisition module 2801 is configured to receive the first block broadcast by the first blockchain node; wherein, the first block includes multiple transactions to be uploaded to the chain, and the first block is broadcast by the first blockchain node after the consensus of the first block is passed, and the consensus of the first block is a consensus on the execution order of the multiple transactions to be uploaded to the chain.

[0308] The second generation module 2802 is configured to generate a second block based on the execution results of multiple transactions to be uploaded to the blockchain;

[0309] The second consensus module 2803 is configured to initiate a consensus process for the second block, which is used to reach a consensus on the execution result.

[0310] Add module 2804 and configure it to add the second block to the second blockchain on the local second blockchain node if consensus on the second block passes.

[0311] In one embodiment of this application, the second generation module 2802 is specifically configured as follows:

[0312] Execute multiple transactions awaiting on-chain processing to obtain the execution results for each transaction.

[0313] The second block is generated based on the execution results of multiple transactions to be uploaded to the blockchain.

[0314] In one embodiment of this application, the second generation module 2802 is specifically configured as follows:

[0315] Get the block height of the first block;

[0316] By associating the block height, the identifier information of multiple transactions to be uploaded to the blockchain, and the execution results of multiple transactions to be uploaded to the blockchain, the association result of multiple transactions to be uploaded to the blockchain is obtained.

[0317] Based on the correlation results of multiple transactions to be uploaded to the blockchain, a second block is generated.

[0318] In one embodiment of this application, the second generation module 2802 is further configured as follows:

[0319] Generate key elements based on the identification information of multiple transactions to be uploaded to the blockchain, and generate value elements based on the execution results of multiple transactions to be uploaded to the blockchain;

[0320] By associating the block height with the key and value elements corresponding to the same transaction to be uploaded to the blockchain, the association results of multiple transactions to be uploaded to the blockchain are obtained.

[0321] In one embodiment of this application, the apparatus further includes:

[0322] The second verification module is configured to verify the execution order contained in the first block and add the first block to the first blockchain on the local blockchain of the second blockchain node based on the verification result.

[0323] In one embodiment of this application, the second verification module is specifically configured as follows:

[0324] Based on the second preset endorsement strategy, the endorsement signature information associated with the execution order contained in the first block is verified;

[0325] If the verification passes, the first block is added to the first blockchain on the local blockchain of the second blockchain node.

[0326] In one embodiment of this application, module 2804 is added, specifically configured as follows:

[0327] Retrieve the latest block of the second blockchain on the local second blockchain node;

[0328] Add the second block after the latest block; wherein the block height of the second block on the local second blockchain matches the block height of the first block on the local first blockchain.

[0329] In one embodiment of this application, the apparatus further includes:

[0330] The second selection module is configured to obtain the performance parameter values ​​of multiple blockchain nodes;

[0331] Based on the performance parameter values ​​of each blockchain node, a blockchain node whose performance parameter value is higher than or equal to a preset performance parameter threshold is selected as the second blockchain node.

[0332] In one embodiment of this application, the apparatus further includes:

[0333] The second receiving module is configured to receive a query request for the transaction execution result, and the query request for the transaction execution result carries the transaction identification information.

[0334] The third acquisition module is configured to retrieve the execution result that matches the transaction's identifier information from the local second blockchain;

[0335] The return module is configured to retrieve the execution results based on the matching of transaction identifier information, and return the transaction query results.

[0336] In one embodiment of this application, the return module is specifically configured as follows:

[0337] If the obtained status indicates that the obtained transaction identification information matches the execution result, then the obtained transaction execution result is used to generate a transaction query result and return the transaction query result.

[0338] If the retrieval status indicates that no execution result matching the transaction identifier information was obtained, then transaction execution incomplete information is generated and returned as the transaction query result.

[0339] It should be noted that the apparatus provided in the foregoing embodiments and the method provided in the foregoing embodiments belong to the same concept, and the specific way in which each module and unit performs operations has been described in detail in the method embodiments.

[0340] Embodiments of this application also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by one or more processors, enable the electronic device to implement the transaction processing method of the aforementioned blockchain network.

[0341] Figure 29 This is a schematic diagram of the structure of a computer system suitable for implementing the electronic devices of the present application embodiments.

[0342] It should be noted that, Figure 29 The computer system 2900 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0343] like Figure 29 As shown, the computer system 2900 includes a Central Processing Unit (CPU) 2901, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 2902 or programs loaded from storage portion 2908 into Random Access Memory (RAM) 2903. The RAM 2903 also stores various programs and data required for system operation. The CPU 2901, ROM 2902, and RAM 2903 are interconnected via a bus 2904. An Input / Output (I / O) interface 2905 is also connected to the bus 2904.

[0344] The following components are connected to I / O interface 2905: input section 2906 including keyboard, mouse, etc.; output section 2907 including cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; storage section 2908 including hard disk, etc.; and communication section 2909 including network interface card, modem, etc. Communication section 2909 performs communication processing via a network such as the Internet. Drive 2910 is also connected to I / O interface 2905 as needed. Removable media 2911, such as disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 2910 as needed so that computer programs read from them can be installed into storage section 2908 as needed.

[0345] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 2909, and / or installed from removable medium 2911. When the computer program is executed by central processing unit (CPU) 2901, it performs various functions defined in the system of this application.

[0346] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. For example, a computer-readable medium can be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0347] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0348] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0349] Another aspect of this application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the transaction processing method of the blockchain network as described above. This computer-readable medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.

[0350] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable medium. A processor of a computer device reads the computer instructions from the computer-readable medium and executes the computer instructions, causing the computer device to perform the transaction processing method of the blockchain network provided in the various embodiments described above.

[0351] The above description is merely a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.

Claims

1. A blockchain-based transaction processing method, characterized by, Applied to a first blockchain node, which is a blockchain node selected from multiple blockchain nodes whose performance parameter values ​​are lower than a preset performance parameter threshold, the method includes: Retrieve multiple transactions to be uploaded to the blockchain with an execution order; The first block is generated based on the multiple transactions to be uploaded to the blockchain; Initiate a consensus process for the first block, the consensus process for the first block being used to reach a consensus on the execution order of the multiple transactions to be uploaded to the blockchain; If the consensus for the first block is passed, the first block is added to the first blockchain on the local first blockchain of the first blockchain node and the first block is broadcast so that the second blockchain node can reach a consensus on the execution results of the multiple transactions to be added to the chain based on the multiple transactions to be added to the chain contained in the first block. The second blockchain node is a blockchain node whose performance parameter value is higher than or equal to the preset performance parameter threshold selected from the multiple blockchain nodes. The second block is received from the second blockchain node; wherein the second block includes the execution results of the multiple transactions to be uploaded to the chain, and the second block is broadcast by the second blockchain node after the consensus of the second block is passed, and the consensus of the second block is the consensus of the execution results; The execution result contained in the second block is verified, and the second block is added to the second blockchain on the local side of the first blockchain node based on the verification result.

2. The method as described in claim 1, characterized in that, The process of generating the first block based on the multiple transactions to be uploaded to the blockchain includes: Obtain the timestamp information of each transaction to be uploaded to the blockchain; The multiple transactions to be uploaded to the blockchain are sorted based on the timestamp information of each transaction to be uploaded to the blockchain to obtain the execution sorting sequence of the multiple transactions to be uploaded to the blockchain. The first block is generated based on the execution sorting sequence of the multiple transactions to be uploaded to the blockchain.

3. The method as described in claim 1, characterized in that, The verification of the execution results contained in the second block includes: Based on the first preset endorsement strategy, the endorsement signature information associated with the execution result contained in the second block is verified; The step of adding the second block to the second blockchain local to the first blockchain node based on the verification result includes: If the verification passes, the second block is added to the second blockchain on the local blockchain of the first blockchain node.

4. The method as described in claim 3, characterized in that, Adding the second block to the second blockchain local to the first blockchain node includes: Obtain the latest block of the second blockchain on the local machine of the first blockchain node; The second block is added after the latest block; wherein the block height of the second block on the local second blockchain matches the block height of the first block on the local first blockchain.

5. The method of any one of claims 1 to 4, wherein, The method further includes: Obtain performance parameter values ​​from multiple blockchain nodes; Based on the performance parameter values ​​of each blockchain node, a blockchain node whose performance parameter value is lower than a preset performance parameter threshold is selected from the plurality of blockchain nodes as the first blockchain node. 6.A blockchain-based transaction processing method, characterized by, The method, applied to a second blockchain node selected from multiple blockchain nodes whose performance parameter values ​​are higher than or equal to a preset performance parameter threshold, includes: The first block is received from the first blockchain node. The first block includes multiple transactions to be uploaded to the blockchain. The first block is broadcast by the first blockchain node after the consensus of the first block is passed. The consensus of the first block is a consensus on the execution order of the multiple transactions to be uploaded to the blockchain. The first blockchain node is a blockchain node whose performance parameter value is lower than the preset performance parameter threshold selected from the multiple blockchain nodes. The execution order contained in the first block is verified, and the first block is added to the first blockchain on the local blockchain of the second blockchain node based on the verification result; Based on the execution results of the multiple transactions to be uploaded to the blockchain, a second block is generated; Initiate a consensus process for the second block, the consensus process for the second block being used to reach a consensus on the execution result; If consensus is reached on the second block, the second block is added to the second blockchain on the local second blockchain node.

7. The method of claim 6, wherein, The generation of a second block based on the execution results of the multiple transactions to be uploaded to the blockchain includes: Execute each of the multiple transactions to be uploaded to the blockchain to obtain the execution results of the multiple transactions to be uploaded to the blockchain; Based on the execution results of the multiple transactions to be uploaded to the blockchain, the second block is generated.

8. The method as described in claim 6, characterized in that, The generation of a second block based on the execution results of the multiple transactions to be uploaded to the blockchain includes: Obtain the block height of the first block; The block height, the identifier information of the multiple transactions to be uploaded to the blockchain, and the execution results of the multiple transactions to be uploaded to the blockchain are correlated to obtain the correlation result of the multiple transactions to be uploaded to the blockchain. Based on the correlation results of the multiple transactions to be uploaded to the blockchain, the second block is generated.

9. The method of claim 8, wherein, The step of associating the block height, the identifier information of the multiple transactions to be uploaded to the blockchain, and the execution results of the multiple transactions to be uploaded to the blockchain to obtain the association result of the multiple transactions to be uploaded to the blockchain includes: Generate key elements based on the identification information of the multiple transactions to be uploaded to the blockchain, and generate value elements based on the execution results of the multiple transactions to be uploaded to the blockchain. The block height is associated with the key and value elements corresponding to the same transaction to be uploaded to the blockchain, respectively, to obtain the association result of the multiple transactions to be uploaded to the blockchain.

10. The method of claim 6, wherein, The verification of the execution order contained in the first block includes: Based on the second preset endorsement strategy, the endorsement signature information associated with the execution order contained in the first block is verified; The step of adding the first block to the local first blockchain of the second blockchain node based on the verification result includes: If the verification passes, the first block is added to the first blockchain on the local blockchain of the second blockchain node.

11. The method as described in claim 6, characterized in that, Adding the second block to the second blockchain local to the second blockchain node includes: Obtain the latest block of the second blockchain on the local machine of the second blockchain node; The second block is added after the latest block; wherein the block height of the second block on the local second blockchain matches the block height of the first block on the local first blockchain.

12. The method of any one of claims 6 to 11, wherein, The method further includes: Obtain performance parameter values ​​from multiple blockchain nodes; Based on the performance parameter values ​​of each blockchain node, a blockchain node whose performance parameter value is higher than or equal to a preset performance parameter threshold is selected from the plurality of blockchain nodes as the second blockchain node.

13. The method of any one of claims 6 to 11, wherein, The method further includes: Receive a query request for the transaction execution result, wherein the query request for the transaction execution result carries the transaction identification information; Retrieve the execution result that matches the identification information of the transaction from the local second blockchain; Based on the acquisition of execution results that match the identification information of the transaction, the transaction query results are returned.

14. The method of claim 13, wherein, The acquisition of the execution result matching the identifier information of the transaction, and the return of the transaction query result, include: If the acquisition status indicates that an execution result matching the identification information of the transaction has been obtained, then the transaction query result is generated based on the acquired transaction execution result and the transaction query result is returned. If the acquisition status indicates that no execution result matching the identification information of the transaction is obtained, then transaction execution incomplete information is generated, and the transaction execution incomplete information is used as the transaction query result and returned.

15. A blockchain-based transaction processing device, characterized in that, The device is configured on a first blockchain node, which is a blockchain node selected from multiple blockchain nodes whose performance parameter values ​​are lower than a preset performance parameter threshold. The device includes: The first acquisition module is configured to acquire a transaction set, which contains multiple transactions to be uploaded to the blockchain in an execution order. The first generation module is configured to generate a first block based on the execution sorting sequence of the multiple transactions to be uploaded to the blockchain; The first consensus module is configured to initiate a consensus process for the first block, and the consensus process for the first block is used to reach a consensus on the execution order of the multiple transactions to be uploaded to the chain. The addition and broadcasting module is configured to add the first block to the first blockchain on the local first blockchain of the first blockchain node and broadcast the first block if the consensus for the first block is passed, so that the second blockchain node can reach a consensus on the execution results of the multiple transactions to be uploaded to the chain contained in the first block. The second blockchain node is a blockchain node whose performance parameter value is higher than or equal to the preset performance parameter threshold selected from the multiple blockchain nodes. The first receiving module is configured to receive a second block broadcast by the second blockchain node; wherein the second block includes the execution results of the multiple transactions to be uploaded to the chain, and the second block is broadcast by the second blockchain node after the consensus of the second block is passed, and the consensus of the second block is the consensus of the execution results; The first verification module is configured to verify the execution result contained in the second block, and add the second block to the second blockchain on the local side of the first blockchain node based on the verification result.

16. A blockchain-based transaction processing device, characterized in that, The device is configured on a second blockchain node, which is a blockchain node selected from multiple blockchain nodes whose performance parameter values ​​are higher than or equal to a preset performance parameter threshold. The device includes: The second acquisition module is configured to receive a first block broadcast by a first blockchain node; wherein the first block includes multiple transactions to be uploaded to the blockchain, and the first block is broadcast by the first blockchain node after the consensus of the first block is passed, the consensus of the first block is a consensus on the execution order of the multiple transactions to be uploaded to the blockchain, and the first blockchain node is a blockchain node selected from the multiple blockchain nodes whose performance parameter value is lower than the preset performance parameter threshold. The second verification module is configured to verify the execution order contained in the first block, and add the first block to the first blockchain on the local blockchain of the second blockchain node based on the verification result. The second generation module is configured to generate a second block based on the execution results of the multiple transactions to be uploaded to the blockchain; The second consensus module is configured to initiate a consensus process for the second block, and the consensus process for the second block is used to reach a consensus on the execution result. Add a module configured to add the second block to the second blockchain on the local second blockchain node if consensus on the second block is passed.

17. An electronic device, comprising: include: One or more processors; A storage device for storing one or more programs that, when executed by the electronic device, cause the electronic device to implement the blockchain-based transaction processing method as described in any one of claims 1 to 14.

18. A computer readable medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the blockchain-based transaction processing method as described in any one of claims 1 to 14.

19. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the blockchain-based transaction processing method as described in any one of claims 1 to 14.