Blockchain transaction processing method and apparatus, electronic device, and readable medium
By generating transaction batches and using batch identification information to process transactions in blockchain nodes, the problem of transaction proposal broadcasting consuming communication resources in blockchain systems is solved, thereby improving transaction response speed and system efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2022-06-28
- Publication Date
- 2026-05-22
AI Technical Summary
In blockchain systems, broadcasting transaction proposals consumes a significant amount of communication resources, impacting transaction response speed and system efficiency, especially as the number of nodes increases, communication time increases substantially.
By generating transaction batches and using batch identification information in the proposal message, the amount of data in the transaction proposal message is reduced, and the blockchain node generates transaction blocks based on the batch identification information.
This reduces the communication resources consumed by transaction proposal messages during the communication process, and improves the transaction response speed of blockchain nodes and the overall operating efficiency of the system.
Smart Images

Figure CN115271942B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a blockchain transaction processing method, apparatus, electronic device, and readable medium. Background Technology
[0002] In a blockchain system, transaction forwarding is one of the most time-consuming processes, due to network transmission performance. In particular, as the number of blockchain nodes increases, the size of the proposal becomes the benchmark for the overall network communication time when the master node broadcasts proposals to other nodes.
[0003] Currently, when blockchain nodes broadcast transaction proposals, they typically package the transactions involved in the proposal into a single transaction proposal for broadcast, so that each node receiving the proposal can verify and execute the transaction.
[0004] However, transaction proposals that include transactions typically occupy a large amount of space, and the process of broadcasting transaction proposals among blockchain nodes consumes a lot of communication resources, affecting the transaction response speed of blockchain nodes and reducing the overall operating efficiency of the blockchain system. Summary of the Invention
[0005] To address the aforementioned technical issues, this application provides a blockchain transaction processing method, apparatus, electronic device, and readable medium to reduce the communication resources occupied by transaction proposal messages during communication, improve the transaction response speed of blockchain nodes, and enhance the overall operating efficiency of the blockchain system.
[0006] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0007] According to one aspect of the embodiments of this application, a blockchain transaction processing method is provided, including:
[0008] A transaction batch is generated based on at least two related blockchain transactions, and the transaction batch contains batch identification information corresponding to the transaction batch.
[0009] Receive transaction proposal messages sent by the proposal node, which include specified batch identification information;
[0010] Based on the transaction proposal message, obtain the specified transaction batch corresponding to the specified batch identification information from the generated transaction batches;
[0011] A transaction block is generated based on the blockchain transactions contained in a specified transaction batch.
[0012] According to one aspect of the embodiments of this application, a blockchain transaction processing apparatus is provided, comprising:
[0013] The transaction batch generation module is used to generate transaction batches based on at least two related blockchain transactions. Each transaction batch contains batch identification information corresponding to the transaction batch.
[0014] The proposal message receiving module is used to receive transaction proposal messages sent by the proposal node. The transaction proposal message includes specified batch identification information.
[0015] The transaction batch acquisition module is used to obtain a specified transaction batch corresponding to the specified batch identification information from the generated transaction batches based on the transaction proposal message;
[0016] The transaction block generation module is used to generate transaction blocks based on the blockchain transactions contained in a specified transaction batch.
[0017] In some embodiments of this application, based on the above technical solutions, the transaction batch generation module includes:
[0018] Create a message receiving submodule to receive batch creation messages, which contain batch identification information and blockchain transaction identifiers of at least two associated blockchain transactions;
[0019] The transaction acquisition submodule is used to acquire at least two blockchain transactions associated with the batch identification information from the transaction pool based on the blockchain transaction identifier in the batch creation message.
[0020] The transaction batch generation submodule is used to generate transaction batches corresponding to the batch identification information based on the batch identification information and at least two obtained blockchain transactions.
[0021] In some embodiments of this application, based on the above technical solutions, the batch identification information includes a batch identifier, which is generated based on the associated blockchain transaction identifier; the transaction acquisition submodule includes:
[0022] The identifier verification unit is used to verify the batch identifier based on the blockchain transaction identifier in the batch creation message;
[0023] The transaction acquisition unit is used to retrieve the blockchain transaction corresponding to the blockchain transaction identifier from the transaction pool based on the blockchain transaction identifier if the verification is successful.
[0024] The first message discard unit is used to stop processing and discard the batch creation message if verification fails.
[0025] In some embodiments of this application, based on the above technical solutions, the batch identification information further includes a node identifier, which is used to identify the batch creation node that generated the batch creation message; the transaction acquisition submodule also includes:
[0026] Other batch acquisition units are used to acquire other transaction batches containing node identifiers based on the node identifiers in the batch creation message;
[0027] The second message discarding unit is used to stop processing and discard the batch creation message if other transaction batches contain the acquired blockchain transaction.
[0028] In some embodiments of this application, based on the above technical solutions, the transaction batch acquisition module includes:
[0029] The transaction batch retrieval submodule is used to retrieve a specified transaction batch corresponding to the batch identification information from the transaction pool based on the transaction proposal message;
[0030] The batch acquisition message sending submodule is used by the transaction batch acquisition unit. If the transaction pool does not contain a specified transaction batch corresponding to the batch identification information, it sends a transaction batch acquisition message to the batch creation node corresponding to the node identifier in the specified batch identification information, so that the batch creation node responds to the transaction batch acquisition message and sends back the specified transaction batch.
[0031] In some embodiments of this application, based on the above technical solutions, the transaction block generation module includes:
[0032] The transaction set generation submodule is used to generate a transaction set to be processed based on at least two blockchain transactions in a specified transaction batch. The transaction set to be processed includes at least one blockchain transaction.
[0033] The proposal verification submodule is used to verify proposals based on each blockchain transaction and transaction proposal message in the transaction set to be processed, and to obtain the proposal verification result.
[0034] The transaction packaging submodule is used to package each blockchain transaction in the transaction set to be processed into a transaction block based on the proposal verification results.
[0035] In some embodiments of this application, based on the above technical solutions, the transaction set generation submodule includes:
[0036] The first transaction set acquisition unit is used to acquire at least two blockchain transactions from a specified transaction batch to obtain a transaction set to be processed.
[0037] The transaction confirmation unit is used to confirm whether each blockchain transaction in the transaction set exists in the blockchain.
[0038] The transaction deletion unit is used to delete any blockchain transaction from the transaction set to be processed if it exists in the blockchain.
[0039] In some embodiments of this application, based on the above technical solutions, the transaction proposal message includes multiple designated batch identification information, and the transaction set generation submodule includes:
[0040] The second transaction set acquisition unit is used to acquire blockchain transactions from any specified transaction batch among multiple specified transaction batches corresponding to multiple specified batch identification information, and obtain a transaction set to be processed;
[0041] The transaction addition unit is used to add the remaining blockchain transactions from multiple specified transaction batches to the pending transaction set if the remaining blockchain transactions do not exist in the pending transaction set.
[0042] The transaction skip unit is used to skip the remaining batch of blockchain transactions if the remaining batch of blockchain transactions exists in the transaction set.
[0043] In some embodiments of this application, based on the above technical solutions, the transaction proposal message includes block verification information, and the proposal verification submodule includes:
[0044] The verification information generation unit is used to generate block verification information based on the execution results and blockchain transaction identifiers of each blockchain transaction in the transaction set to be processed.
[0045] The first result generation unit is used to generate a pass result if the block verification information matches the block validation information, so as to indicate that the proposal verification has passed;
[0046] The second result generation unit is used to generate a failure result if the block verification information does not match the block validation information, so as to indicate that the proposal verification has failed.
[0047] In some embodiments of this application, based on the above technical solutions, the blockchain transaction processing device further includes:
[0048] The specified batch acquisition module is used to acquire a specified batch of transactions from the transaction pool when the preset proposal generation conditions are met.
[0049] The verification information generation module is used to generate block verification information based on the execution results and blockchain transaction identifiers of each blockchain transaction in each transaction batch.
[0050] The proposal message module is used to generate transaction proposal messages based on block verification information and batch identification information in each transaction batch.
[0051] In some embodiments of this application, based on the above technical solutions, the blockchain transaction processing device further includes:
[0052] The transaction message receiving module is used to receive blockchain transaction messages sent by transaction nodes and save the blockchain transaction messages to the transaction pool. The blockchain transaction messages carry blockchain transaction identifiers.
[0053] The node identifier confirmation module is used to determine the node identifier of the message receiving node based on the blockchain transaction identifier and the transaction identifier mapping relationship.
[0054] The transaction message forwarding module is used to forward blockchain transaction messages to the message receiving node based on the node identifier of the message receiving node.
[0055] In some embodiments of this application, based on the above technical solutions, the transaction batch generation module includes:
[0056] The Unpackaged Transaction Acquisition Submodule is used to acquire the node identifier of the blockchain node and the unpackaged transactions in the transaction pool that have not been packaged into transaction batches.
[0057] The identification information generation submodule is used to generate batch identification information for transaction batches based on node identifiers and transaction identifiers of unpackaged transactions if the unpackaged transactions meet the preset batch generation conditions.
[0058] Create a message generation submodule to generate transaction batches and batch creation messages based on batch identifiers and unpackaged transactions;
[0059] Create a message sending submodule to send batch creation messages to various blockchain nodes in the blockchain.
[0060] According to one aspect of the embodiments of this application, an electronic device is provided, the electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the blockchain transaction processing method as described above by executing the executable instructions.
[0061] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the blockchain transaction processing method as described above.
[0062] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the blockchain transaction processing method provided in the various optional implementations described above.
[0063] In the embodiments of this application, the blockchain node generates a transaction batch based on at least two associated blockchain transactions, and then generates a transaction block from the blockchain transactions in the transaction batch specified in the proposal message. Since the transaction proposal message only includes batch identification information and does not need to include the complete blockchain transaction, the amount of data contained in the proposal message can be reduced, thereby reducing the communication resources occupied by the transaction proposal message during the communication process, improving the transaction response speed of the blockchain node and the overall operating efficiency of the blockchain system.
[0064] 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
[0065] 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. In the drawings:
[0066] Figure 1 This is an optional structural diagram of the distributed system 100 provided in this embodiment of the invention applied to a blockchain system;
[0067] Figure 2 This is an optional schematic diagram of the block structure provided in an embodiment of the present invention;
[0068] Figure 3 This is a schematic flowchart of a blockchain transaction processing method according to an embodiment of this application;
[0069] Figure 4 This is a schematic flowchart of a blockchain transaction processing method according to an embodiment of this application;
[0070] Figure 5 This is a schematic flowchart of a blockchain transaction processing method according to an embodiment of this application;
[0071] Figure 6 This is a schematic flowchart of a blockchain transaction processing method according to an embodiment of this application;
[0072] Figure 7 This is a schematic flowchart of a blockchain transaction processing method according to an embodiment of this application;
[0073] Figure 8 This is a schematic flowchart illustrating the overall process of batch message creation in the embodiments of this application;
[0074] Figure 9 This is a schematic diagram of the transaction pool structure in an embodiment of this application;
[0075] Figure 10 This is a schematic flowchart of a blockchain transaction processing method according to an embodiment of this application;
[0076] Figure 11 This is a schematic flowchart of a blockchain transaction processing method according to an embodiment of this application;
[0077] Figure 12 This is a schematic flowchart of a blockchain transaction processing method according to an embodiment of this application;
[0078] Figure 13 This is a schematic flowchart of a blockchain transaction processing method according to an embodiment of this application;
[0079] Figure 14 This is a schematic flowchart of a blockchain transaction processing method according to an embodiment of this application;
[0080] Figure 15 This is a schematic diagram of a transaction proposal message in an embodiment of this application;
[0081] Figure 16 This is a schematic flowchart illustrating the transaction proposal message processing procedure in an embodiment of this application;
[0082] Figure 17 This is a schematic flowchart of a blockchain transaction processing method according to an embodiment of this application;
[0083] Figure 18 This is a schematic diagram illustrating the transaction broadcasting and batch broadcasting modes in the embodiments of this application;
[0084] Figure 19 This is a schematic flowchart illustrating the specific process of forwarding blockchain transaction messages in the embodiments of this application;
[0085] Figure 20 This is a schematic flowchart of a blockchain transaction processing method according to an embodiment of this application;
[0086] Figure 21 This is a schematic diagram illustrating the structure of the batch creation message in an embodiment of this application;
[0087] Figure 22 A schematic block diagram illustrating the composition of a blockchain transaction processing apparatus in an embodiment of this application is shown.
[0088] Figure 23 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation
[0089] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0090] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0091] 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.
[0092] 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.
[0093] It should be understood that this application can be applied to blockchain systems, specifically to scenarios where transaction processing is recorded on the blockchain. In a blockchain system, when a user wants to conduct a transaction, they need to initiate the transaction through a client. The client sends transaction messages to nodes in the blockchain, and the blockchain nodes, after verifying the received transactions, broadcast them to other nodes. The operation of recording transactions on the blockchain is usually performed by the master node. The master node periodically determines whether the current transaction state meets the conditions for generating a new block. When the conditions are met, it initiates a proposal message to record the transactions processed by each blockchain node on the blockchain. In the scenario where this application's solution is applied, each node in the blockchain packages the received transactions into transaction batches according to certain rules and sends the packaged results to other nodes in the blockchain. When other nodes receive transaction batches, they package the blockchain transactions in their local transaction pools into corresponding transaction batches. When the master node proposes a transaction, it generates a proposal message based on the transaction batches in the transaction pool and broadcasts it. After receiving the proposal message, the blockchain nodes also process the blockchain transactions in each batch according to the transaction batches in the proposal message.
[0094] The blockchain system involved in this invention can be a distributed system formed by connecting clients and multiple nodes (any form of computing device in the network, such as servers and user terminals) through network communication. For details, please refer to... Figure 1 , Figure 1 This is an optional structural diagram of the distributed system 100 provided in this embodiment of the invention applied to a blockchain system. It consists of multiple nodes (any form of computing device in the network, such as servers or user terminals) and clients, forming a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In the distributed system, any machine, such as a server or terminal, can join and become a node. A node includes a hardware layer, a middleware layer, an operating system layer, and an application layer.
[0095] See Figure 1 The functions of each node in the blockchain system shown include:
[0096] 1) Routing: A basic function of nodes used to support communication between nodes.
[0097] In addition to routing capabilities, nodes can also have the following functions:
[0098] 2) Applications are deployed in the blockchain to implement specific business needs. They record data related to the implementation of functions to form record data, carry digital signatures in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system. When other nodes successfully verify the source and integrity of the record data, they add the record data to a temporary block.
[0099] For example, the business logic implemented by the application includes:
[0100] 2.1) A wallet is used to provide the function of trading virtual resources, including initiating transactions (i.e., sending the transaction record of the current transaction to other nodes in the blockchain system; after other nodes successfully verify the transaction, they store the transaction record data in the temporary block of the blockchain as a response to acknowledge the validity of the transaction; of course, the wallet also supports querying the remaining virtual resources in the virtual resource address;
[0101] 2.2) Shared ledger, used to provide functions such as storage, query and modification of ledger data. It sends the record data of the operation on the ledger data to other nodes in the blockchain system. After the other nodes verify the validity, as a response to acknowledge the validity of the ledger data, they store the record data in a temporary block. They can also send confirmation to the node that initiated the operation.
[0102] 2.3) Smart contracts are computerized protocols that can execute the terms of a contract. They are implemented through code deployed on a shared ledger that executes when certain conditions are met. Based on actual business needs, the code is used to complete automated transactions, such as querying the logistics status of goods purchased by a buyer and transferring the buyer's virtual resources to the merchant's address after the buyer signs for the goods. Of course, smart contracts are not limited to executing contracts for transactions; they can also execute contracts for processing received information.
[0103] 3) A blockchain consists of a series of blocks that are sequentially generated. Once a new block is added to the blockchain, it will not be removed. The blocks contain the data submitted by the nodes in the blockchain system.
[0104] See Figure 2 , Figure 2This is an optional schematic diagram of the block structure provided in this embodiment of the invention. Each block includes the hash value of the transaction records stored in this block (the hash value of this block) and the hash value of the previous block. The blocks are connected through their hash values to form a blockchain. Additionally, the block may include information such as a timestamp when it was generated. A blockchain is essentially a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains relevant information used to verify the validity of the information (anti-counterfeiting) and to generate the next block.
[0105] Each blockchain node can be a terminal device or a server. 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 artificial intelligence platforms. This document does not limit the scope of these services. Terminal devices include, but are not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, vehicle terminals, and aircraft. This invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving. Terminal devices and servers can be connected directly or indirectly via wired or wireless communication, which is not limited herein. The number of terminal devices and servers is also not limited.
[0106] In this application, the transaction processing of each blockchain node can be intelligently controlled or implemented through artificial intelligence (AI). For example, AI can be used to determine whether the current transaction status of a node needs to be packaged into a batch, or the master node can use AI to determine whether the blockchain system needs to propose a transaction to generate a new block. Blockchain transactions themselves can also be initiated by AI based on actual conditions. Artificial Intelligence (AI) is the theory, methods, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. In other words, AI is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to have perception, reasoning, and decision-making functions. AI technology is a comprehensive discipline involving a wide range of fields, including both hardware and software technologies. Basic AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, and mechatronics.
[0107] The nodes of the blockchain system described in this application can be implemented using cloud computing. Cloud computing is a computing model that distributes computing tasks across a resource pool consisting of a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." From the user's perspective, the resources in the "cloud" are infinitely scalable, readily available, on-demand, expandable, and pay-as-you-go.
[0108] As a provider of fundamental cloud computing capabilities, a cloud resource pool (referred to as a cloud platform, generally called an IaaS (Infrastructure as a Service) platform) is established. Various types of virtual resources are deployed in the resource pool for external customers to choose from. The cloud resource pool mainly includes: computing devices (virtualized machines containing operating systems), storage devices, and network devices.
[0109] It is understood that the solution proposed in this application can be used in the aforementioned blockchain system for the process of clients initiating transactions and various blockchain nodes conducting transactions. The technical solution provided in this application will be described in detail below with reference to specific implementation methods.
[0110] For ease of explanation, please refer to Figure 3 , Figure 3This is a schematic flowchart illustrating a blockchain transaction processing method according to an embodiment of this application. This method can be applied to the aforementioned blockchain node. In this embodiment, the blockchain transaction processing method is described using a computer device of the blockchain node as the executing entity. The blockchain transaction processing method may include the following steps S310 to S340:
[0111] Step S310: Generate a transaction batch based on at least two related blockchain transactions. The transaction batch contains batch identification information corresponding to the transaction batch.
[0112] In this embodiment, blockchain nodes automatically generate transaction batches based on their own circumstances, or receive batch creation messages from other blockchain nodes and generate transaction batches at the request of those nodes. In the case of automatically generating transaction batches, the blockchain node periodically checks whether its current state meets the conditions for generating a transaction batch. If it does, it generates a transaction batch and a batch identification message, and notifies other nodes to generate the same transaction batch via the batch identification message. In the case of generating transaction batches at the request of other nodes, the batch creation message is a message generated by other blockchain nodes after packaging the blockchain transactions to be processed in their transaction pools into transaction batches. The batch creation message is used by the node receiving the message to create the corresponding transaction batch in its local transaction pool according to the batch identification information provided in the batch creation message. It is understood that the transaction batch created according to the batch creation message should be the same as the transaction batch created by the node that sent the message. The batch creation message contains batch identification information, which is used to identify the transaction batch. It typically includes the batch identifier (BatchID) and other relevant information, such as information about the blockchain transactions to be packaged into the batch. Each batch identifier is typically associated with at least two blockchain transactions; that is, each transaction batch usually includes at least two blockchain transactions that have been proposed but not yet processed in the blockchain system. Typically, the transactions in the batch creation message reside in the transaction pool of the node receiving the message. The specific number of blockchain transactions in a transaction batch depends on the rules for creating the batch; therefore, the number of blockchain transactions included in each transaction batch can vary.
[0113] After receiving a batch creation message, a blockchain node creates a corresponding transaction batch based on that message. Specifically, based on the batch identification information in the batch creation message, it retrieves the associated blockchain transactions from its local transaction pool. Then, it packages the batch identification information and the retrieved blockchain transactions together to generate the corresponding transaction batch. This transaction batch is then returned to the transaction pool. This organizes the pending transactions in the transaction pool into batches.
[0114] Step S320: Receive a transaction proposal message sent by the proposal node. The transaction proposal message includes designated batch identification information.
[0115] In a blockchain system, the master node periodically checks whether the current state of the blockchain meets the conditions for executing a transaction proposal. When the conditions are met, it creates and broadcasts a transaction proposal message based on the transaction batches in its transaction pool. The transaction proposal message specifies the transaction batches to be processed in the local proposal. Therefore, blockchain nodes receive transaction proposal messages from the master node. These messages instruct the receiving blockchain nodes to process the transaction batches in their transaction pools based on the information provided. The transaction proposal message includes batch identification information for the transaction batches to be processed. The blockchain transactions associated with the batch identification information in the transaction proposal message are the blockchain transactions to be executed and packaged in this transaction proposal message. It is understood that a transaction proposal message typically includes multiple specified batch identification information, and the specified transaction batches corresponding to each batch identification information can be created at the request of different blockchain nodes. For nodes other than the master node, the transaction batches specified in the transaction proposal message may be generated by the node itself, or by instructions from other nodes, or both.
[0116] Step S330: Based on the transaction proposal message, obtain the specified transaction batch corresponding to the specified batch identification information from the generated transaction batches.
[0117] After receiving a transaction proposal message, a blockchain node retrieves the specified transaction batch corresponding to the designated batch identification information based on the message. Transaction batches are typically stored in the blockchain node's local transaction pool. The blockchain node can retrieve the corresponding designated transaction batch from its local pool based on the designated batch identification information in the transaction proposal message. In some cases, due to communication delays or failures, the designated transaction batch corresponding to the designated batch identification information may not exist in the transaction pool. In such cases, the blockchain node can request the corresponding designated transaction batch from the master node or from the blockchain node that requested its generation. It's important to understand that the designated transaction batch is not necessarily all transaction batches currently existing in the transaction pool; it can be a subset of all transaction batches in the pool.
[0118] Step S340: Generate transaction blocks based on the blockchain transactions contained in the specified transaction batch.
[0119] Each transaction batch in the transaction pool contains at least two blockchain transactions. Blockchain nodes execute the transactions in each specified transaction batch sequentially, and perform batch verification for each batch to ensure there are no conflicts or duplicates. After all blockchain transactions in a specified batch have been executed and verified, the blockchain nodes package the transactions into a transaction block and upload it to the blockchain.
[0120] In the embodiments of this application, the blockchain node generates a transaction batch based on at least two associated blockchain transactions, and then generates a transaction block from the blockchain transactions in the transaction batch specified in the proposal message. Since the transaction proposal message only includes batch identification information and does not need to include the complete blockchain transaction, the amount of data contained in the proposal message can be reduced, thereby reducing the communication resources occupied by the transaction proposal message during the communication process, improving the transaction response speed of the blockchain node and the overall operating efficiency of the blockchain system.
[0121] In one embodiment of this application, based on the above technical solution, please refer to... Figure 4 , Figure 4 This is a schematic flowchart illustrating a blockchain transaction processing method according to an embodiment of this application. Figure 4 As shown, step S310 above generates a transaction batch based on at least two related blockchain transactions. The transaction batch contains batch identification information corresponding to the transaction batch, and specifically includes the following steps:
[0122] Step S410: Receive a batch creation message, which contains batch identification information and blockchain transaction identifiers of at least two associated blockchain transactions;
[0123] Step S420: Based on the blockchain transaction identifier in the batch creation message, retrieve at least two blockchain transactions associated with the batch identification information from the transaction pool;
[0124] Step S430: Generate a transaction batch corresponding to the batch identification information based on the batch identification information and the at least two obtained blockchain transactions.
[0125] In this embodiment, a blockchain node creates a transaction batch locally based on batch creation messages sent by other nodes. Specifically, the blockchain node receives a batch creation message broadcast by other nodes. The batch creation message includes a batch identification identifier and blockchain transaction identifiers for at least two associated blockchain transactions. Subsequently, the blockchain node retrieves at least two blockchain transactions associated with the batch identification information from its local transaction pool based on the blockchain transaction identifiers in the batch creation message. In some embodiments, if the blockchain transaction identifiers in the batch creation message do not exist in the local transaction pool, the blockchain node can request the blockchain transaction from the master node or from the node that generated the blockchain transaction based on the information in the batch creation message. After obtaining the required blockchain transactions, the blockchain node packages the at least two obtained blockchain transactions and associates them with the batch identification information to obtain a transaction batch corresponding to the batch identification information. The transaction batch is then returned to the transaction pool for subsequent use when adding transactions to the blockchain according to transaction proposals.
[0126] In this embodiment, blockchain nodes can create transaction batches according to the requirements of other blockchain nodes, thereby avoiding the excessive computing pressure on a single node due to the concentration of transaction batch creation computation work on a single node, which would become a bottleneck in operating efficiency and help improve the stability of the solution.
[0127] In one embodiment of this application, based on the above technical solution, the batch identification information includes a batch identifier, which is generated based on the associated blockchain transaction identifier. Please refer to... Figure 5 , Figure 5 This is a schematic flowchart illustrating a blockchain transaction processing method according to an embodiment of this application. Figure 5 As shown, step S420 above, which involves retrieving at least two blockchain transactions associated with the batch identification information from the transaction pool based on the blockchain transaction identifier in the batch creation message, specifically includes the following steps:
[0128] Step S510: Verify the batch identifier based on the blockchain transaction identifier in the batch creation message;
[0129] Step S520: If the verification is successful, retrieve the blockchain transaction corresponding to the blockchain transaction identifier from the transaction pool based on the blockchain transaction identifier.
[0130] In step S530, if verification fails, processing is stopped and the batch creation message is discarded.
[0131] In this embodiment, the batch identification information includes a batch identifier, which is generated based on the associated blockchain transaction identifier. When generating the transaction batch, the blockchain node initially requesting the creation of the transaction batch performs encryption or conversion operations based on the transaction identifiers of all blockchain transactions to be added to the batch, using the settlement result as the batch identifier. This batch identifier has a fixed and unique mapping relationship with the transaction identifiers of all blockchain transactions in the batch; that is, the batch identifier can only be obtained based on a specific transaction identifier. Any modification will prevent the batch identifier from being obtained based on the mapping relationship, thus ensuring that the blockchain transactions specified in the batch creation message match the blockchain transactions initially requested to be packaged into the transaction batch. Therefore, the blockchain node receiving the batch creation message verifies the batch identifier based on the blockchain transaction identifier in the batch creation message. Specifically, the batch identifier can be generated based on the Merkle root of the transaction identifiers of each blockchain transaction in the batch. If the blockchain node verifies the batch identifier successfully, it retrieves the blockchain transaction corresponding to the blockchain transaction identifier from the transaction pool based on the blockchain transaction identifier in the batch creation message. These blockchain transactions are typically received from broadcast messages from other blockchain nodes, and they exist independently in the transaction pool instead of being packaged into transaction batches. If a blockchain node fails to verify the batch identifier, it means that the blockchain transaction identifier specified in the batch creation message is different from the transactions that were originally intended to be included in the batch; that is, the batch creation message specified a blockchain transaction that should not be added to the batch. In this case, the blockchain node will discard the batch creation message and end the processing.
[0132] In this embodiment, the batch identifier is verified by using the blockchain transaction identifier in the batch creation message. This prevents the addition of blockchain transactions that do not belong to the batch to the transaction batch, avoids malicious behavior by blockchain nodes, and thus improves the security of the solution.
[0133] In one embodiment of this application, based on the above technical solution, the batch identification information further includes a node identifier, which is used to identify the batch creation node that generated the batch creation message. Please refer to [link to relevant documentation]. Figure 6 , Figure 6 This is a schematic flowchart illustrating a blockchain transaction processing method according to an embodiment of this application. Figure 6 As shown, step S520 above, which retrieves the blockchain transaction corresponding to the blockchain transaction identifier from the transaction pool based on the blockchain transaction identifier, specifically includes the following steps:
[0134] Step S610: Obtain other transaction batches containing node identifiers based on the node identifiers in the batch creation message;
[0135] In step S620, if other transaction batches contain the acquired blockchain transactions, processing is stopped and the batch creation message is discarded.
[0136] In this embodiment, when processing batch creation messages, blockchain nodes verify whether identical transactions exist among transaction batches requested by the same node. If so, the node is considered to be engaging in malicious activity, and the batch creation message being processed is discarded. Specifically, for the same node, the blockchain transactions it requests to be packaged into transaction batches should be different; that is, duplicate transactions are not allowed between different transaction batches of the same node. If any blockchain transaction is duplicated across different batches of the same node, it is considered malicious behavior, and the node will discard the transaction batch being processed. Specifically, the blockchain node retrieves other transaction batches containing the node identifier included in the batch identification information in the batch creation message from the transaction pool. The node identifier in the batch identification information is used to identify the batch creation node that generated the batch creation message; therefore, these other transaction batches obtained are created by the same batch creation node as the currently being created transaction batch. The blockchain node checks whether the blockchain transaction to be packaged into the transaction batch exists in the obtained other transaction batches based on the blockchain transaction identifier in the batch creation message. If the other transaction batches contain the obtained blockchain transaction, the blockchain node stops processing and discards the current batch creation message. If the acquired blockchain transaction is not included in other transaction batches, the next blockchain transaction will be checked until it is confirmed that all blockchain nodes are not duplicated in other transaction batches, then transaction batches can continue to be generated.
[0137] In this embodiment, the blockchain node checks that there are no duplicate transactions in the batch of transactions requested by the same node, thereby preventing nodes from maliciously adding conflicting or duplicate data to the blockchain and improving the security of the solution.
[0138] In one embodiment of this application, based on the above technical solution, please refer to... Figure 7 , Figure 7 This is a schematic flowchart illustrating a blockchain transaction processing method according to an embodiment of this application. Figure 7 As shown, step S330 above, which involves obtaining the specified transaction batch corresponding to the specified batch identification information from the generated transaction batches based on the transaction proposal message, specifically includes the following steps:
[0139] Step S710: Based on the transaction proposal message, retrieve the specified transaction batch corresponding to the batch identification information from the transaction pool;
[0140] Step S720: If the transaction pool does not contain a specified transaction batch corresponding to the batch identification information, then according to the node identifier in the specified batch identification information, a transaction batch acquisition message is sent to the batch creation node corresponding to the node identifier, so that the batch creation node responds to the transaction batch acquisition message and sends back the specified transaction batch.
[0141] In the embodiments of this application, if a blockchain node discovers that the transaction batch specified in the transaction proposal message does not exist in its local transaction pool, it will request the corresponding transaction batch from the batch creation node that requested the creation of the transaction batch. Specifically, the blockchain node will retrieve the specified transaction batch corresponding to the batch identification information from the transaction pool according to the transaction proposal message. If the specified transaction batch corresponding to the batch identification information can be obtained from the transaction pool, the subsequent processing will continue directly. If the transaction pool does not contain the specified transaction batch corresponding to the batch identification information, the blockchain node will obtain the node identifier of the batch creation node from the batch identification information, and then send a transaction batch retrieval message to the batch creation node according to the node identifier. This transaction batch retrieval message usually includes the batch identification information of the transaction batch. The batch creation node will then return the corresponding transaction batch to the blockchain node according to the transaction batch retrieval message, thereby continuing the subsequent processing.
[0142] In this embodiment, when a blockchain node cannot obtain the transaction batch specified in the transaction proposal message from the local transaction pool, it will obtain the transaction batch from the blockchain node that originally created the transaction batch, instead of obtaining it from the master node. This reduces the processing and computational pressure on the master node and improves the operating efficiency of the solution.
[0143] The following is a general overview of the overall processing procedure for batch creation messages in this embodiment of the application. Please refer to... Figure 8 , Figure 8 This is a schematic flowchart illustrating the overall process of batch message creation in this embodiment of the application. Figure 8As shown, after a node begins processing, in step 810, it receives a batch creation message from other nodes requesting the creation of a batch, and decodes the batch object instance from the message using the unmarshal function. Then, in step 820, it checks whether the batch identifier (BatchID) is valid. Specifically, it checks whether the BatchID meets specific generation rules. If it does not meet the rules, the batch creation message is discarded and the process ends. If it does meet the rules, in step 830, the transaction set A is initialized. Finally, in step 840, the traversal counter i=0 is initialized, and the traversal of each blockchain transaction TX in the batch begins. During the traversal, in step 850, the blockchain transaction TX=A[i] is obtained. Then, in step 860, it is determined whether the blockchain transaction TX is a duplicate of any blockchain transactions already received from the node's batch. If a duplicate is found, the batch creation message is discarded and the processing ends. If no duplicate is found, in step 870, the content of the blockchain transaction TX is determined to be valid. If valid, in step 880, the traversal process continues by incrementing the counter i. In step 890, it is determined whether the counter i is greater than the length of transaction set A. If the counter i is not greater than the length of transaction set A, execution proceeds to step 850. If the counter i is greater than the length of transaction set A, the process ends. The resulting transaction set A can then be packaged into a transaction batch.
[0144] Packaged transaction batches are stored in a transaction pool. For details, please refer to [link to relevant documentation]. Figure 9 , Figure 9 This is a schematic diagram of the transaction pool structure in an embodiment of this application. Figure 9 As shown, blockchain transactions in the transaction pool are organized in batches. Transaction batches Batch1_0 and Batch1_1 originate from the same node, while other batches originate from different nodes. Transactions can be duplicated between batches from different nodes, but transactions cannot be duplicated between different batches from the same node. Furthermore, transactions within a batch in the transaction pool can also overlap with transactions in the blockchain ledger; duplicate transactions are excluded during the packaging and on-chain process.
[0145] In one embodiment of this application, based on the above technical solution, please refer to... Figure 10 , Figure 10 This is a schematic flowchart illustrating a blockchain transaction processing method according to an embodiment of this application. Figure 10 As shown, step S340 above, which generates a transaction block based on the blockchain transactions included in the specified transaction batch, specifically includes the following steps:
[0146] Step S1010: Generate a set of transactions to be processed based on at least two blockchain transactions in a specified transaction batch. The set of transactions to be processed includes at least one blockchain transaction.
[0147] Step S1020: Perform proposal verification based on each blockchain transaction and transaction proposal message in the transaction set to be processed, and obtain the proposal verification result;
[0148] Step S1030: Based on the proposal verification results, package each blockchain transaction in the transaction set to be processed into a transaction block.
[0149] In this embodiment, during transaction proposal processing, blockchain nodes verify the proposal based on the blockchain transactions in the specified transaction batch and the transaction proposal message to determine whether the blockchain transactions to be packaged obtained by the blockchain node are the same as those specified in the transaction proposal. If they are the same, the execution and packaging process of the blockchain transactions continues; if they are different, the transaction will not be packaged and uploaded to the chain, and other nodes will be notified of their disagreement with the content proposed in the transaction proposal message. The blockchain node first performs deduplication on at least two blockchain transactions in the specified transaction batch to generate a set of transactions to be processed, which includes at least one blockchain transaction. The specified transaction batch may be created by different nodes, therefore, duplicate blockchain transactions may exist between transaction batches created by different nodes. Furthermore, when a batch with duplicate blockchain transactions is specified for uploading to the chain in two consecutive transaction proposal messages, there may also be duplicate transactions between the transaction batch and the blockchain ledger. During the generation of the set of transactions to be processed, these duplicate transactions are excluded. Therefore, it is understandable that the number of blockchain transactions included in the pending transaction set can be equal to or less than the total number of blockchain transactions included in the specified transaction batch in the transaction proposal message. Subsequently, the blockchain node performs proposal verification based on each blockchain transaction in the pending transaction set and the transaction proposal message, obtaining the proposal verification result. The specific verification mainly checks the matching between the blockchain transactions in the pending transaction set and the blockchain transactions in the transaction batch specified in the transaction proposal message. Since the blockchain transactions included in the pending transaction set are obtained from the local transaction pool, they may differ from the actual content of the blockchain transactions specified when the transaction proposal message was generated due to transmission problems or malicious behavior. Therefore, the blockchain node simulates the execution of the blockchain transactions based on the ledger content recorded in the node to confirm whether the transaction can be executed and whether the result matches. Merkle root calculations can also be performed to verify the accuracy of the transaction signatures, etc., thus obtaining the proposal verification result. Based on the proposal verification result, the blockchain node packages each blockchain transaction in the pending transaction set into a transaction block.
[0150] In the embodiments of this application, a specific processing method for transaction proposal messages is described, which helps to improve the operability of the solution.
[0151] In one embodiment of this application, based on the above technical solution, please refer to... Figure 11 , Figure 11 This is a schematic flowchart illustrating a blockchain transaction processing method according to an embodiment of this application. Figure 11As shown, step S1010 above generates a set of transactions to be processed based on at least two blockchain transactions in a specified transaction batch, specifically including the following steps:
[0152] Step S1110: Obtain at least two blockchain transactions from the specified transaction batch to obtain a set of transactions to be processed;
[0153] Step S1120: Confirm whether each blockchain transaction in the transaction set exists in the blockchain;
[0154] Step S1130: If any blockchain transaction in the transaction set to be processed exists in the blockchain, then the blockchain transaction is deleted from the transaction set to be processed.
[0155] In this embodiment, for blockchain transactions within a specified transaction batch, the blockchain node compares the blockchain transactions with the blockchain transactions already on the blockchain ledger. If a blockchain transaction in the specified batch already exists in the blockchain, it is skipped. Specifically, the blockchain node first obtains at least two blockchain transactions from the specified batch to form a set of transactions to be processed. Then, it confirms whether each blockchain transaction in the set exists in the blockchain. This confirmation process can be performed by comparing the blockchain transaction identifiers. If any blockchain transaction in the set exists in the blockchain, it is directly deleted from the set, ensuring that there are no duplicate transactions in the set. This process can be performed in a loop or recursively, sequentially checking whether each blockchain transaction exists in the blockchain.
[0156] In the embodiments of this application, when obtaining a blockchain transaction to be processed, it is necessary to confirm whether the blockchain transaction already exists in the blockchain. If it already exists, the processing of the blockchain transaction is skipped, thereby ensuring the consistency of transaction data in the blockchain and improving the accuracy and consistency of the data in this application.
[0157] In one embodiment of this application, based on the above technical solution, the transaction proposal message includes multiple designated batch identification information. Please refer to [link to relevant documentation]. Figure 12 , Figure 12 This is a schematic flowchart illustrating a blockchain transaction processing method according to an embodiment of this application. Figure 12 As shown, step S1010 above generates a set of transactions to be processed based on at least two blockchain transactions in a specified transaction batch, specifically including the following steps:
[0158] Step S1210: Obtain blockchain transactions from any specified transaction batch among multiple specified transaction batches corresponding to multiple specified batch identification information, and obtain a set of transactions to be processed;
[0159] Step S1210: For the remaining blockchain transactions in multiple specified transaction batches, if the remaining blockchain transactions do not exist in the pending transaction set, then add the remaining blockchain transactions to the pending transaction set.
[0160] Step S1210: If the blockchain transactions of the remaining transaction batch exist in the transaction set, then skip the blockchain transactions of the remaining transaction batch.
[0161] In this embodiment, when a blockchain node acquires blockchain transactions to be processed, it checks whether there are duplicates among multiple specified transaction batches. If duplicates are found, the duplicate blockchain transactions are skipped. Specifically, the blockchain node first acquires blockchain transactions from any specified transaction batch corresponding to multiple specified batch identification information, obtaining a set of transactions to be processed. Then, for the remaining transaction batches, it checks whether they exist in the set of transactions to be processed. If the remaining transaction batches do not exist in the set of transactions to be processed, the blockchain transaction can be added to the set. If the remaining transaction batches do exist in the set of transactions to be processed, it indicates that the blockchain transaction is a duplicate, and the blockchain node skips the transaction to continue processing the next blockchain transaction. This process continues until all blockchain transactions in the multiple specified transaction batches have been processed, resulting in the final set of transactions to be processed.
[0162] In the embodiments of this application, by checking whether there are duplicate transactions among multiple specified transaction batches to be processed and skipping duplicate transactions, it is ensured that they do not exist in the generated transaction blocks, thereby improving the accuracy of the scheme data.
[0163] In one embodiment of this application, based on the above technical solution, the transaction proposal message includes block verification information; please refer to... Figure 13 , Figure 13 This is a schematic flowchart illustrating a blockchain transaction processing method according to an embodiment of this application. Figure 13 As shown, step S1020 above verifies the proposal based on each blockchain transaction and the transaction proposal message in the transaction set to be processed, specifically including the following steps:
[0164] Step S1310: Generate block verification information based on the execution results and blockchain transaction identifiers of each blockchain transaction in the transaction set to be processed;
[0165] Step S1320: If the block verification information matches the block validation information, a pass result is generated to indicate that the proposal verification has passed;
[0166] In step S1330, if the block verification information does not match the block validation information, a failure result is generated to indicate that the proposal verification has failed.
[0167] In this embodiment, when the master node generates a transaction proposal message, it generates corresponding block verification information (BlockHash) based on the transactions in the specified transaction batch. Similarly, after determining the blockchain transactions to be packaged based on the transaction proposal message, the blockchain nodes also generate block verification information in the same way. Proposal verification is performed by checking if the block verification information matches the block verification information. Specifically, the blockchain node executes each blockchain transaction in the pending transaction set, obtains the execution result, and performs a hash operation or other type of encryption operation on the execution result along with the blockchain transaction identifier according to a predetermined algorithm to obtain the block verification information. If the block verification information matches the block verification information, the verification is successful, and a success result is generated. If the block verification information does not match the block verification information, it indicates a problem with the blockchain transactions in the pending transaction set, and the transaction does not match the blockchain transactions that should be packaged according to the transaction proposal message; in this case, a verification failure result is generated.
[0168] In one embodiment of this application, based on the above technical solution, please refer to... Figure 14 , Figure 14 This is a schematic flowchart illustrating a blockchain transaction processing method according to an embodiment of this application. Figure 14 As shown, before receiving the transaction proposal message sent by the proposal node in step S320 above, the solution of this application further includes the following steps:
[0169] Step S1410: When the preset proposal generation conditions are met, obtain the specified transaction batch in the transaction pool;
[0170] Step S1420: Generate block verification information based on the execution results and blockchain transaction identifiers of each blockchain transaction in each transaction batch;
[0171] Step S1430: Generate a transaction proposal message based on the block verification information and the batch identification information in each transaction batch.
[0172] In this embodiment, the blockchain node is the master node. The blockchain node periodically checks whether its current state meets preset proposal generation conditions, such as whether the number of transactions in the transaction pool meets the conditions or whether the time interval since the last proposal meets the conditions. When the preset proposal generation conditions are met, the blockchain node obtains a specified batch of transactions from the transaction pool. The specified batch of transactions is usually specified according to predetermined rules, such as the maximum number of batches or transactions contained in a single proposal, or the order in which the batches were created. Then, the blockchain node generates block verification information based on the execution results and blockchain transaction identifiers of each blockchain transaction in each batch. Specifically, the blockchain node simulates the execution of each blockchain transaction to obtain the execution results, which are then used in conjunction with the blockchain transaction identifiers to calculate the block verification information using a preset algorithm. Finally, the blockchain node generates a transaction proposal message based on the block verification information and the batch identification information in each transaction batch. For details, please refer to [link to relevant documentation]. Figure 15 , Figure 15 This is a schematic diagram of a transaction proposal message in an embodiment of this application. Figure 15 As shown, the transaction proposal message contains the block header of the transaction block and the batch identification information of the transaction batch specified in the transaction proposal.
[0173] In the embodiments of this application, transaction proposal messages are generated only based on block verification information and batch identification information of transaction batches, which helps to reduce the data volume of transaction proposal messages and thus speed up the transmission efficiency of transaction proposal messages.
[0174] The following specific embodiment describes the detailed processing procedure for transaction proposal messages in this application. Please refer to [link / reference]. Figure 16 , Figure 16 This is a schematic flowchart illustrating the transaction proposal message processing procedure in an embodiment of this application. Figure 16 As shown, the blockchain node receives messages from other nodes proposing to add a block to the chain, and obtains a Block object instance in step 1610. Then, in step 1620, it checks if the block height is compliant, primarily determining if the node that generated the block is a node that meets the rule requirements. If it is not compliant, the transaction proposal message is discarded and the process ends. If compliant, in step 1630, the blockchain node obtains the set of all batches BS in the block, and then initializes the transaction set TXSMap[TxID]Tx in step 1640. In step 1641, a traversal index i=0 is created and traversal of the batch set begins. In step 1650, the blockchain node obtains batch B=BS[i], and then, in step 1660, it obtains all transactions TS corresponding to batch B from the local transaction pool. iIn step 1670, the blockchain node will determine the TS (Transaction Term). i If the value is empty, proceed to step 1671, set the timeout, and retrieve the corresponding batch from the corresponding node. Then, in step 1672, check if the batch has been retrieved within the specified time; if not, vote against the transaction proposal. If TS i If the value is not empty or a batch is obtained within the specified time, proceed to step 1680 to initialize the transaction set TXArray[i]. Then, in step 1681, the blockchain node initializes the traversal index j=0 and begins traversing the transaction set. Specifically, in step 1682, transaction TX=TXArray[i][j] is obtained; then, in step 1683, it is determined whether transaction TX exists in the ledger, and in step 1684, it is determined whether transaction TX exists in TXS. If it does not exist in either, in step 1685, transaction TX is added to the transaction set TXS. Subsequently, in step 1686, the blockchain increments the traversal index j, and in step 1687, it is determined whether index j is greater than the length of the transaction set TXArray[i]. If index j is not greater than the length of the transaction set TXArray[i], then return to step 1682 to continue traversing the transaction set TXArray[i]. If index j is greater than the length of transaction set TXArray[i], then in step 1688, the traversal index i will be incremented, and in step 1689, it will be determined whether index i is greater than the length of batch set BS. If index i is not greater than the length of batch set BS, then return to step 1650 to continue traversing batch set BS. If index i is greater than the length of batch set BS, then proceed to step 1690, where the corresponding block hash value BlockHash is generated based on transaction set TXS, including but not limited to executing transactions and calculating Merkle roots. Subsequently, in step 1691, the blockchain node will determine whether the generated block hash value BlockHash is the same as the block hash value BlockHash carried in the block sent by the node. If they are different, the node will vote against the transaction proposal message; if they are the same, the node will vote in favor.
[0175] In one embodiment of this application, based on the above technical solution, please refer to... Figure 17 , Figure 17 This is a schematic flowchart illustrating a blockchain transaction processing method according to an embodiment of this application. Figure 17 As shown, before generating a transaction batch based on at least two associated blockchain transactions in step S310 above, the solution of this application further includes the following steps:
[0176] Step S1710: Receive the blockchain transaction message sent by the transaction node and save the blockchain transaction message to the transaction pool. The blockchain transaction message carries the blockchain transaction identifier.
[0177] Step S1720: Determine the node identifier of the message receiving node based on the blockchain transaction identifier and the transaction identifier mapping relationship;
[0178] Step S1730: Forward the blockchain transaction message to the message receiving node according to the node identifier of the message receiving node.
[0179] In the embodiments of this application, after receiving a blockchain transaction, a blockchain node broadcasts the transaction among itself according to certain rules. Specifically, the blockchain node receives the blockchain transaction message sent by the transaction node and saves it to the transaction pool. The transaction node is the blockchain node that initiated the transaction; it generates a blockchain transaction identifier, which is carried in the transaction message. Subsequently, the blockchain node determines the node identifier of the message receiving node based on the transaction identifier and its mapping relationship. The transaction identifier mapping relationship can be calculated using a modulo operation. Then, the blockchain node forwards the blockchain transaction message to the message receiving node based on its node identifier. It is understood that the above forwarding process can also be applied to the forwarding process of batch creation messages. In one embodiment, the blockchain node may not forward the blockchain transaction message; that is, the transaction node broadcasts the blockchain transaction message to all nodes in the blockchain system. For illustrative purposes, please refer to [link to documentation]. Figure 18 , Figure 18 This is a schematic diagram illustrating the transaction broadcasting and batch broadcasting modes in embodiments of this application. For example... Figure 18 As shown, in Mode 1, after generating a batch, Node0 sends the batch to all other nodes, Node1 through Node3. In Mode 2, the nodes forward the batches to each other. For example, Node0 sends a batch related to transaction Tx1 to Node1, which then forwards it to other nodes. Figure 18 The document also illustrates a scheme that combines the two modes: Mode 1 for broadcasting blockchain transaction messages and Mode 2 for broadcasting batch creation messages. Figure 19 This is a schematic flowchart illustrating the specific process of forwarding blockchain transaction messages in an embodiment of this application. Figure 19As shown, after receiving a transaction Tx, the blockchain node will use the Unmarshal function to find the transaction object instance in step 1910. Subsequently, in step 1920, it will determine whether the transaction is valid. Specifically, this includes checking whether the transaction is duplicated, whether the transaction sending event is valid, and whether the transaction timestamp matches. If the verification fails, the transaction Tx will be discarded. If the verification passes, in step 1930, the transaction will be forwarded to the corresponding node according to the transaction forwarding policy.
[0180] In one embodiment of this application, based on the above technical solution, please refer to... Figure 20 , Figure 20 This is a schematic flowchart illustrating a blockchain transaction processing method according to an embodiment of this application. Figure 20 As shown, before generating a transaction batch based on at least two associated blockchain transactions in step S310 above, the solution of this application further includes the following steps:
[0181] Step S2010: Obtain the node identifier of the blockchain node and the unpackaged transactions in the transaction pool that have not been packaged into transaction batches;
[0182] Step S2020: If the unpackaged transactions meet the preset batch generation conditions, then generate batch identification information for the transaction batch based on the node identifier and the transaction identifier of the unpackaged transactions.
[0183] Step S2030: Generate transaction batches and batch creation messages based on batch identifiers and unpackaged transactions;
[0184] Step S2040: Send batch creation messages to each blockchain node in the blockchain.
[0185] In this embodiment, when a blockchain node determines that a transaction batch needs to be created, it obtains the node identifier of the blockchain node and the unpackaged transactions in the transaction pool that have not yet been grouped into a transaction batch. If the unpackaged transactions meet the preset batch generation conditions, batch identification information for the transaction batch is generated based on the node identifier and the transaction identifiers of the unpackaged transactions. Subsequently, based on the batch identifier and the unpackaged transactions, a transaction batch and a batch creation message are generated, and the batch creation message is sent to each blockchain node in the blockchain. Please refer to [link to relevant documentation]. Figure 21 , Figure 21 This is a schematic diagram illustrating the structure of the batch creation message in an embodiment of this application. For example... Figure 21As shown, the batch creation message includes the unpackaged transaction Tx and batch identification information NodeID+BatchID, where NodeID is the node identifier and BatchID is the batch identifier. The batch identifier BatchID is generated by constructing a Merkle tree based on the transaction identifiers of each blockchain transaction. The batch creation message also includes a signature generated for the batch identifier BatchID to facilitate verification.
[0186] It should be noted that although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0187] The following describes the implementation of the apparatus of this application, which can be used to execute the blockchain transaction processing method in the above embodiments of this application. Figure 22 A schematic block diagram illustrating the composition of a blockchain transaction processing apparatus in an embodiment of this application is shown. Figure 22 As shown, the blockchain transaction processing device 2200 mainly includes:
[0188] The transaction batch generation module 2210 is used to generate a transaction batch based on at least two related blockchain transactions, and the transaction batch contains batch identification information corresponding to the transaction batch.
[0189] The proposal message receiving module 2220 is used to receive transaction proposal messages sent by the proposal node. The transaction proposal message includes specified batch identification information.
[0190] The transaction batch acquisition module 2230 is used to acquire a specified transaction batch corresponding to the specified batch identification information from the generated transaction batches according to the transaction proposal message;
[0191] The transaction block generation module 2240 is used to generate transaction blocks based on the blockchain transactions contained in a specified transaction batch.
[0192] In some embodiments of this application, based on the above technical solutions, the transaction batch generation module 2210 includes:
[0193] Create a message receiving submodule to receive batch creation messages, which contain batch identification information and blockchain transaction identifiers of at least two associated blockchain transactions;
[0194] The transaction acquisition submodule is used to acquire at least two blockchain transactions associated with the batch identification information from the transaction pool based on the blockchain transaction identifier in the batch creation message.
[0195] The transaction batch generation submodule is used to generate transaction batches corresponding to the batch identification information based on the batch identification information and at least two obtained blockchain transactions.
[0196] In some embodiments of this application, based on the above technical solutions, the batch identification information includes a batch identifier, which is generated based on the associated blockchain transaction identifier; the transaction acquisition submodule includes:
[0197] The identifier verification unit is used to verify the batch identifier based on the blockchain transaction identifier in the batch creation message;
[0198] The transaction acquisition unit is used to retrieve the blockchain transaction corresponding to the blockchain transaction identifier from the transaction pool based on the blockchain transaction identifier if the verification is successful.
[0199] The first message discard unit is used to stop processing and discard the batch creation message if verification fails.
[0200] In some embodiments of this application, based on the above technical solutions, the batch identification information further includes a node identifier, which is used to identify the batch creation node that generated the batch creation message; the transaction acquisition submodule also includes:
[0201] Other batch acquisition units are used to acquire other transaction batches containing node identifiers based on the node identifiers in the batch creation message;
[0202] The second message discarding unit is used to stop processing and discard the batch creation message if other transaction batches contain the acquired blockchain transaction.
[0203] In some embodiments of this application, based on the above technical solutions, the transaction batch acquisition module 2230 includes:
[0204] The transaction batch retrieval submodule is used to retrieve a specified transaction batch corresponding to the batch identification information from the transaction pool based on the transaction proposal message;
[0205] The batch acquisition message sending submodule is used by the transaction batch acquisition unit. If the transaction pool does not contain a specified transaction batch corresponding to the batch identification information, it sends a transaction batch acquisition message to the batch creation node corresponding to the node identifier in the specified batch identification information, so that the batch creation node responds to the transaction batch acquisition message and sends back the specified transaction batch.
[0206] In some embodiments of this application, based on the above technical solutions, the transaction block generation module 2240 includes:
[0207] The transaction set generation submodule is used to generate a transaction set to be processed based on at least two blockchain transactions in a specified transaction batch. The transaction set to be processed includes at least one blockchain transaction.
[0208] The proposal verification submodule is used to verify proposals based on each blockchain transaction and transaction proposal message in the set of transactions to be processed, and to obtain the proposal verification result.
[0209] The transaction packaging submodule is used to package each blockchain transaction in the transaction set to be processed into a transaction block based on the proposal verification results.
[0210] In some embodiments of this application, based on the above technical solutions, the transaction set generation submodule includes:
[0211] The first transaction set acquisition unit is used to acquire at least two blockchain transactions from a specified transaction batch to obtain a transaction set to be processed.
[0212] The transaction confirmation unit is used to confirm whether each blockchain transaction in the transaction set exists in the blockchain.
[0213] The transaction deletion unit is used to delete any blockchain transaction from the transaction set to be processed if it exists in the blockchain.
[0214] In some embodiments of this application, based on the above technical solutions, the transaction proposal message includes multiple designated batch identification information, and the transaction set generation submodule includes:
[0215] The second transaction set acquisition unit is used to acquire blockchain transactions from any specified transaction batch among multiple specified transaction batches corresponding to multiple specified batch identification information, and obtain a transaction set to be processed;
[0216] The transaction addition unit is used to add the remaining blockchain transactions from multiple specified transaction batches to the pending transaction set if the remaining blockchain transactions do not exist in the pending transaction set.
[0217] The transaction skip unit is used to skip the remaining batch of blockchain transactions if the remaining batch of blockchain transactions exists in the transaction set.
[0218] In some embodiments of this application, based on the above technical solutions, the transaction proposal message includes block verification information, and the proposal verification submodule includes:
[0219] The verification information generation unit is used to generate block verification information based on the execution results and blockchain transaction identifiers of each blockchain transaction in the transaction set to be processed.
[0220] The first result generation unit is used to generate a pass result if the block verification information matches the block validation information, so as to indicate that the proposal verification has passed;
[0221] The second result generation unit is used to generate a failure result if the block verification information does not match the block validation information, so as to indicate that the proposal verification has failed.
[0222] In some embodiments of this application, based on the above technical solutions, the blockchain transaction processing device further includes:
[0223] The specified batch acquisition module is used to acquire a specified batch of transactions from the transaction pool when the preset proposal generation conditions are met.
[0224] The verification information generation module is used to generate block verification information based on the execution results and blockchain transaction identifiers of each blockchain transaction in each transaction batch.
[0225] The proposal message module is used to generate transaction proposal messages based on block verification information and batch identification information in each transaction batch.
[0226] In some embodiments of this application, based on the above technical solutions, the blockchain transaction processing device further includes:
[0227] The transaction message receiving module is used to receive blockchain transaction messages sent by transaction nodes and save the blockchain transaction messages to the transaction pool. The blockchain transaction messages carry blockchain transaction identifiers.
[0228] The node identifier confirmation module is used to determine the node identifier of the message receiving node based on the blockchain transaction identifier and the transaction identifier mapping relationship.
[0229] The transaction message forwarding module is used to forward blockchain transaction messages to the message receiving node based on the node identifier of the message receiving node.
[0230] In some embodiments of this application, based on the above technical solutions, the transaction batch generation module 2210 includes:
[0231] The Unpackaged Transaction Acquisition Submodule is used to acquire the node identifier of the blockchain node and the unpackaged transactions in the transaction pool that have not been packaged into transaction batches.
[0232] The identification information generation submodule is used to generate batch identification information for transaction batches based on node identifiers and transaction identifiers of unpackaged transactions if the unpackaged transactions meet the preset batch generation conditions.
[0233] Create a message generation submodule to generate transaction batches and batch creation messages based on batch identifiers and unpackaged transactions;
[0234] Create a message sending submodule to send batch creation messages to various blockchain nodes in the blockchain.
[0235] It should be noted that the apparatus provided in the above embodiments and the method provided in the above embodiments belong to the same concept, and the specific way in which each module performs the operation has been described in detail in the method embodiments, and will not be repeated here.
[0236] Figure 23 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown.
[0237] It should be noted that, Figure 23 The computer system 2300 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.
[0238] like Figure 23 As shown, the computer system 2300 includes a Central Processing Unit (CPU) 2301, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 2302 or programs loaded from Storage Unit 2308 into Random Access Memory (RAM) 2303. The RAM 2303 also stores various programs and data required for system operation. The CPU 2301, ROM 2302, and RAM 2303 are interconnected via a bus 2304. An Input / Output (I / O) interface 2305 is also connected to the bus 2304.
[0239] The following components are connected to I / O interface 2305: an input section 2306 including a keyboard, mouse, etc.; an output section 2307 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 2308 including a hard disk, etc.; and a communication section 2309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 2309 performs communication processing via a network such as the Internet. A drive 2310 is also connected to I / O interface 2305 as needed. Removable media 2311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 2310 as needed so that computer programs read from them can be installed into storage section 2308 as needed.
[0240] Specifically, according to embodiments of this application, the processes described in the various method 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 containing program code 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 2309, and / or installed from removable medium 2311. When the computer program is executed by central processing unit (CPU) 2301, it performs various functions defined in the system of this application.
[0241] 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. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage 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 storage 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 computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code 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.
[0242] 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. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing 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.
[0243] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0244] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the methods according to the embodiments of this application.
[0245] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0246] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A blockchain transaction processing method, characterized in that, include: A transaction batch is generated based on at least two associated blockchain transactions. The transaction batch contains batch identification information corresponding to the transaction batch. The transaction batch is generated based on the current state of the blockchain node itself, or based on a batch creation message received from another blockchain node. The batch creation message is a message generated by the other blockchain node after packaging the blockchain transactions to be processed in its transaction pool into a transaction batch. Receive transaction proposal messages sent by proposal nodes, wherein the transaction proposal messages include multiple designated batch identification information, and the designated batch identification information is associated with at least two blockchain transactions; Based on the transaction proposal message, multiple designated transaction batches corresponding to the multiple designated batch identification information are obtained from the generated transaction batches, and each designated transaction batch contains at least two blockchain transactions; A transaction block is generated based on the blockchain transactions contained in each specified transaction batch.
2. The method according to claim 1, characterized in that, The step of generating a transaction batch based on at least two associated blockchain transactions, wherein the transaction batch contains batch identification information corresponding to the transaction batch, including: Receive a batch creation message, which includes batch identification information and blockchain transaction identifiers of at least two associated blockchain transactions; Based on the blockchain transaction identifier in the batch creation message, retrieve at least two blockchain transactions associated with the batch identification information from the transaction pool; The transaction batch corresponding to the batch identification information is generated based on the batch identification information and at least two obtained blockchain transactions.
3. The method according to claim 2, characterized in that, The batch identification information includes a batch identifier, which is generated based on an associated blockchain transaction identifier; the step of retrieving at least two blockchain transactions associated with the batch identification information from the transaction pool based on the blockchain transaction identifier in the batch creation message includes: The batch identifier is verified based on the blockchain transaction identifier in the batch creation message; If the verification is successful, the blockchain transaction corresponding to the blockchain transaction identifier is retrieved from the transaction pool according to the blockchain transaction identifier; If verification fails, processing is stopped and the batch creation message is discarded.
4. The method according to claim 3, characterized in that, The batch identification information also includes a node identifier, which is used to identify the batch creation node that generated the batch creation message; after obtaining the blockchain transaction corresponding to the blockchain transaction identifier from the transaction pool based on the blockchain transaction identifier, the method further includes: Based on the node identifier in the batch creation message, obtain other transaction batches containing the node identifier; If the other transaction batches contain the acquired blockchain transactions, then processing is stopped and the batch creation message is discarded.
5. The method according to claim 3, characterized in that, The step of obtaining the designated transaction batch corresponding to the designated batch identification information from the generated transaction batch according to the transaction proposal message includes: Based on the transaction proposal message, retrieve the specified transaction batch corresponding to the batch identification information from the transaction pool; If the transaction pool does not contain a specified transaction batch corresponding to the batch identification information, then a transaction batch retrieval message is sent to the batch creation node corresponding to the node identifier according to the node identifier in the specified batch identification information, so that the batch creation node responds to the transaction batch retrieval message and provides feedback on the specified transaction batch.
6. The method according to claim 1, characterized in that, The step of generating a transaction block based on the blockchain transactions included in the specified transaction batch includes: Based on the at least two blockchain transactions in the specified transaction batch, a set of transactions to be processed is generated, wherein the set of transactions to be processed includes at least one blockchain transaction; Based on each blockchain transaction in the set of transactions to be processed and the transaction proposal message, the proposal is verified to obtain the proposal verification result. Based on the proposal verification results, each blockchain transaction in the set of transactions to be processed is packaged to generate a transaction block.
7. The method according to claim 6, characterized in that, The step of generating a set of transactions to be processed based on at least two blockchain transactions in the specified transaction batch includes: Obtain at least two blockchain transactions from the specified transaction batch to obtain a set of transactions to be processed; Confirm whether each blockchain transaction in the transaction set exists in the blockchain; If any blockchain transaction in the set of transactions to be processed exists in the blockchain, then that blockchain transaction will be deleted from the set of transactions to be processed.
8. The method according to claim 6, characterized in that, The transaction proposal message includes multiple designated batch identification information; the step of generating a set of transactions to be processed based on at least two blockchain transactions in the designated transaction batch includes: Obtain blockchain transactions from any specified transaction batch among the multiple specified transaction batches corresponding to the multiple specified batch identification information to obtain a set of transactions to be processed; For the remaining blockchain transactions in multiple specified transaction batches, if the remaining blockchain transactions do not exist in the pending transaction set, then the remaining blockchain transactions are added to the pending transaction set. If the blockchain transactions of the remaining transaction batch exist in the transaction set, then the blockchain transactions of the remaining transaction batch are skipped.
9. The method according to claim 6, characterized in that, The transaction proposal message includes block verification information; the step of verifying the proposal based on each blockchain transaction in the set of transactions to be processed and the transaction proposal message to obtain the proposal verification result includes: Based on the execution results and blockchain transaction identifiers of each blockchain transaction in the set of transactions to be processed, block verification information is generated; If the block verification information matches the block validation information, a pass result is generated to indicate that the proposal verification has passed; If the block verification information does not match the block validation information, a failure result is generated to indicate that the proposal verification has failed.
10. The method according to claim 6, characterized in that, Before receiving the transaction proposal message sent by the proposal node, the method further includes: When the preset proposal generation conditions are met, the specified batch of transactions is retrieved from the transaction pool; Based on the execution results and blockchain transaction identifiers of each blockchain transaction in the specified transaction batch, block verification information is generated; The transaction proposal message is generated based on the block verification information and the batch identification information in the specified transaction batch.
11. The method according to any one of claims 1 to 10, characterized in that, Before generating a transaction batch based on at least two associated blockchain transactions, the method further includes: Receive blockchain transaction messages sent by transaction nodes and save the blockchain transaction messages to the transaction pool, wherein the blockchain transaction messages carry blockchain transaction identifiers; The node identifier of the message receiving node is determined based on the blockchain transaction identifier and the transaction identifier mapping relationship. The blockchain transaction message is forwarded to the message receiving node based on the node identifier of the message receiving node.
12. The method according to claim 11, characterized in that, Before generating a transaction batch based on at least two associated blockchain transactions, the method further includes: Obtain the node identifier of the blockchain node and the unpackaged transactions in the transaction pool that have not been packaged into transaction batches; If the unpackaged transaction meets the preset batch generation conditions, then batch identification information of the transaction batch is generated based on the node identifier and the transaction identifier of the unpackaged transaction; Based on the batch identification information and the unpackaged transactions, a transaction batch and a batch creation message are generated; The batch creation message is sent to each blockchain node in the blockchain.
13. A blockchain transaction processing device, characterized in that, include: A transaction batch generation module is used to generate a transaction batch based on at least two associated blockchain transactions. The transaction batch contains batch identification information corresponding to the transaction batch. The transaction batch is generated based on the current state of the blockchain node itself, or based on a batch creation message received from other blockchain nodes. The batch creation message is a message generated by the other blockchain nodes after they package the blockchain transactions to be processed in their transaction pool into a transaction batch. The proposal message receiving module is used to receive transaction proposal messages sent by the proposal node. The transaction proposal message includes multiple designated batch identification information, and the designated batch identification information is associated with at least two blockchain transactions. The transaction batch acquisition module is used to acquire multiple specified transaction batches corresponding to the specified batch identification information from the generated transaction batches according to the transaction proposal message, wherein each specified transaction batch contains at least two blockchain transactions; The transaction block generation module is used to generate transaction blocks based on the blockchain transactions contained in each specified transaction batch.
14. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor is configured to execute the blockchain transaction processing method according to any one of claims 1 to 12 by executing the executable instructions.
15. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the blockchain transaction processing method as described in any one of claims 1 to 12.
16. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, and a processor of a computer device reads and executes the computer instructions from the computer-readable storage medium, causing the computer device to perform the blockchain transaction processing method as described in any one of claims 1 to 12.