WO2023160088A1 - Procédé de traitement de transactions de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique - Google Patents

Procédé de traitement de transactions de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique Download PDF

Info

Publication number
WO2023160088A1
WO2023160088A1 PCT/CN2022/135434 CN2022135434W WO2023160088A1 WO 2023160088 A1 WO2023160088 A1 WO 2023160088A1 CN 2022135434 W CN2022135434 W CN 2022135434W WO 2023160088 A1 WO2023160088 A1 WO 2023160088A1
Authority
WO
WIPO (PCT)
Prior art keywords
transactions
batch
batches
transaction
consensus
Prior art date
Application number
PCT/CN2022/135434
Other languages
English (en)
Chinese (zh)
Inventor
李帅
Original Assignee
蚂蚁区块链科技(上海)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 蚂蚁区块链科技(上海)有限公司 filed Critical 蚂蚁区块链科技(上海)有限公司
Publication of WO2023160088A1 publication Critical patent/WO2023160088A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06311Scheduling, planning or task assignment for a person or group
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0633Workflow analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management

Definitions

  • This document relates to the field of blockchain technology, and in particular to a processing method for blockchain transactions, blockchain nodes and electronic equipment.
  • the processing flow of the blockchain for a round of views mainly includes four stages: transaction collection, transaction consensus, transaction execution, and block writing. In the prior art, these four stages are executed serially, resulting in relatively low processing efficiency of blockchain transactions. In addition, every time a round of views is completed, a block write operation needs to be performed, and excessive block write operations will also have a negative impact on the processing efficiency of blockchain transactions.
  • the purpose of the embodiments of this specification is to provide a processing method of blockchain transactions, blockchain nodes and electronic equipment, which can improve the processing efficiency of blockchain transactions.
  • a method for processing blockchain transactions including:
  • a method for processing blockchain transactions including:
  • a blockchain node including:
  • the first transaction collection module collects the first batch of transactions in the target transaction set of the block chain, the target transaction set includes multiple batches of transactions, and the number of transactions exceeds the upper limit of the number of transactions in one consensus of the block chain;
  • the first transaction consensus module performs a consensus operation on the first batch of transactions, and if there is a second batch of transactions, the first transaction collection module simultaneously executes the second batch of transactions in batch order in parallel A collection operation, wherein the second batch of transactions is a batch of transactions that have not been collected by the target transaction set;
  • the first transaction execution module performs transaction execution operations on the first batch of transactions. If there is a third batch of transactions, the first transaction consensus module simultaneously executes the consensus on the third batch of transactions in parallel. Operation, wherein the third batch of transactions is a batch of transactions for which the target transaction set has been collected and consensus has not yet been completed;
  • the first transaction confirmation module sends the transaction execution results of the first batch of transactions in the blockchain to confirm the first batch of transactions
  • the first transaction block writing module executes a block writing operation on all batches of transactions in the target transaction set after obtaining the transaction confirmations of all batches of transactions in the target transaction set.
  • an electronic device comprising: a memory, a processor, and a computer program stored on the memory and operable on the processor, the computer program being executed by the processor:
  • a computer-readable storage medium is provided.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program is executed by a processor, the following steps are implemented:
  • a blockchain node including:
  • the second transaction collection module collects the first batch of transactions in the target transaction set of the block chain, the target transaction set includes multiple batches of transactions, and the number of transactions exceeds the upper limit of the number of transactions in one consensus of the block chain;
  • the second transaction consensus module performs a consensus operation on the first batch of transactions, and if there is a second batch of transactions, the second transaction consensus module simultaneously executes the collection operation of the second batch of transactions in batch order in parallel , wherein, the second batch of transactions is a batch of transactions that have not been collected by the target transaction set;
  • the second transaction execution module if all batches of transactions in the target transaction set have reached a consensus, perform a transaction execution operation on all batches of transactions in the target set;
  • the second transaction confirmation module sends the transaction execution results of all batches of transactions in the target transaction set in the block chain to perform transaction confirmation on all batches of transactions in the target transaction set
  • the second transaction block writing module executes a block writing operation on all batches of transactions in the target transaction set after obtaining the transaction confirmations of all batches of transactions in the target transaction set.
  • an electronic device comprising: a memory, a processor, and a computer program stored on the memory and operable on the processor, the computer program being executed by the processor:
  • a computer-readable storage medium is provided.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program is executed by a processor, the following steps are implemented:
  • the blockchain nodes perform transaction collection, transaction consensus, transaction execution, and transaction confirmation in batches for the target transaction set with a large amount of data.
  • the intermediate batch of transactions executes the consensus operation, it also executes the execution operation of the previous batch of transactions and the collection operation of the next batch of transactions, thereby shortening the processing time of blockchain transactions in a parallel manner.
  • a block write operation is performed uniformly, thereby improving the processing efficiency of blockchain transactions by reducing the number of block writes.
  • the whole solution can significantly improve the throughput of the blockchain, which can meet the needs of high-concurrency business scenarios.
  • Fig. 1 is a schematic flow chart of the first method for processing blockchain transactions provided by the embodiment of this specification.
  • Fig. 2 is a schematic diagram of the first time slot of the blockchain transaction processing method provided by the embodiment of this specification.
  • FIG. 3 is a schematic diagram of the second time slot of the blockchain transaction processing method provided by the embodiment of this specification.
  • Fig. 4 is a second schematic flowchart of the processing method of a blockchain transaction provided by the embodiment of this specification.
  • Fig. 5 is a schematic diagram of the third time slot of the blockchain transaction processing method provided by the embodiment of this specification.
  • Fig. 6 is a schematic structural diagram of the first type of blockchain node provided by the embodiment of this specification.
  • Fig. 7 is a schematic structural diagram of the second type of blockchain node provided by the embodiment of this specification.
  • FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of this specification.
  • the current block chain completes the four operations of transaction collection, consensus, execution and block writing in a serial manner, which leads to relatively low processing efficiency of block chain transactions and limits the use of block chains. throughput.
  • a block write operation needs to be performed, and excessive block write operations will also have a negative impact on the processing efficiency of blockchain transactions.
  • the business volume will also show explosive growth.
  • the current transaction processing method is difficult to apply to scenarios with high business concurrency in the future. In response to this problem, this document aims to provide a technical solution that can improve the efficiency of blockchain transaction processing.
  • Fig. 1 is a flow chart of a processing method of a blockchain transaction according to an embodiment of this specification. The method shown in Figure 1 can be executed by the corresponding blockchain nodes below, including the following steps:
  • S102 Collect the first batch of transactions in the target transaction set of the blockchain, where the target transaction set includes multiple batches of transactions, and the number of transactions exceeds the upper limit of the number of transactions in one consensus of the blockchain.
  • each blockchain node of the blockchain can divide all transactions of the target transaction set into batches in an orderly manner according to the corresponding transaction initiation time based on the smart contract set in advance . Or, according to the order of transactions in the consensus proposal, all transactions of the target transaction set are divided into batches.
  • S104 perform a consensus operation on the first batch of transactions, and if there is a second batch of transactions, perform a collection operation on the second batch of transactions in parallel in batch order, the second batch of transactions is the target transaction set that has not yet been collected Batch transactions.
  • batch transactions that have not been collected in this step may include batch transactions that have not yet started collection, or batch transactions that have started collection but have not yet completed collection.
  • the batch order is the batch division order described in S102 above.
  • the blockchain nodes collect the transactions of the target transaction set in batches. After the target batch of transactions is collected, it can be executed at the same time: the consensus execution operation of the target batch of transactions and the collection operation of the next batch of transactions corresponding to the target batch of transactions. That is to say, the second batch of transactions mentioned in this step refers to the next batch of transactions of the first batch of transactions.
  • S106 perform transaction execution operations on the first batch of transactions, and if there is a consensus operation on the third batch of transactions in parallel execution of the third batch of transactions, the third batch of transactions is that the target transaction set has been collected and Batch transactions that have not yet completed consensus.
  • batches of transactions whose consensus has not been completed in this step may include batches of transactions that have not yet started consensus, or batches of transactions that have started consensus but have not yet completed consensus.
  • the blockchain nodes perform consensus operations on the transactions of the target transaction set in batches. After the consensus operation of the target batch of transactions is completed, it can be executed simultaneously: the execution operation of the target batch of transactions and the consensus operation of the next batch of transactions corresponding to the target batch of transactions. That is to say, the third batch of transactions mentioned in this step refers to the next batch of transactions of the second batch of transactions.
  • the collection operation of the second batch of transactions in batch order can also be executed in parallel.
  • the block chain node as the execution subject of this step can send the transaction confirmation request of the transaction execution result of the first batch of transactions to other block chain nodes in the block chain; if 2f other block chain nodes are received later If the transaction confirmation feedback is sent, the transaction confirmation of the first batch of transactions is confirmed.
  • f is the maximum number of abnormal consensus nodes allowed by the blockchain.
  • the blockchain nodes perform consensus operations on the transactions of the target transaction set in batches, but in the end, only one block writing operation may be performed. That is to say, in the embodiment of this specification, all batches of transactions in the target transaction set can be recorded in one block.
  • the block chain node executes transaction collection, transaction consensus, transaction execution and transaction confirmation in batches for the target transaction set with a large amount of data.
  • the intermediate batch of transactions executes the consensus operation, it also executes the execution operation of the previous batch of transactions and the collection operation of the next batch of transactions, thereby shortening the processing time of blockchain transactions in a parallel manner.
  • a block write operation is performed uniformly, thereby improving the processing efficiency of blockchain transactions by reducing the number of block writes. The whole solution can significantly improve the throughput of the blockchain, which can meet the needs of high-concurrency business scenarios.
  • the transaction execution results of the first batch of transactions can also be fed back to the corresponding blockchain client. That is to say, in the method of the embodiment of this specification, the block chain node can immediately feed back the transaction execution to the block chain client after each batch of transactions completes the transaction execution and gets the transaction confirmation, thereby significantly reducing the transaction time.
  • the transaction confirmation delay on the client side of the block chain improves the user experience.
  • the transaction execution results of all batches of transactions in the target transaction set can be uniformly fed back to The corresponding blockchain client.
  • the feedback strategy for transaction execution results can be determined according to the transaction quantity in the target transaction set. For example, when the number of transactions in the target transaction set exceeds the preset threshold, you can choose to immediately feed back the transaction execution results to the blockchain client after each batch of transactions is executed and confirmed. Similarly, when the number of transactions in the target transaction set does not exceed the preset threshold, you can choose to transfer all batches of transactions in the target transaction set to The transaction execution results are uniformly fed back to the corresponding blockchain client.
  • the method in the embodiment of this specification can process blockchain transactions in batches at the granularity of each round of blockchain views.
  • the target transaction set in the embodiment of this specification is all transactions in the Nth round view of the blockchain.
  • the method of the embodiment of this specification can set the first thread, the second thread, the third thread, the fourth thread and the fifth thread to be executed in parallel, so as to respectively execute the collection, consensus, and transaction of blockchain transactions.
  • These five operations are execution, transaction confirmation, and block writing.
  • the first thread is used to collect transactions in batches, that is, the first thread does not collect other batches of transactions before collecting a batch of transactions;
  • the second thread is used to perform consensus operations on transactions in batches, that is, the first thread The second thread does not execute the consensus operations of other batches of transactions before executing the consensus operation of a batch of transactions;
  • the third thread is used to execute the execution operations of transactions in batches, that is, before executing the execution operations of a batch of transactions The execution operations of other batches of transactions are not executed.
  • the fourth thread performs transaction confirmation in batches, that is, the transaction confirmation of other batches of transactions is not performed before the transaction confirmation of one batch of transactions is completed.
  • the fifth thread executes block writing operations uniformly after all batches of transactions in each round of views are confirmed.
  • the views of round N and round N+1 are divided into three batches of transactions as an example.
  • the views of round N and round N+1 can present the time slots shown in Figure 2 relation.
  • the transactions of each round of views are divided into multiple small batches, which can reduce the time-consuming execution of each batch of transactions, that is, reduce the length of T in Figure 2, thereby improving the block The processing efficiency of chain transactions.
  • first thread, second thread, third thread, fourth thread and fifth thread may belong to different cores of the processor. That is to say, the embodiment of this description can perform the transaction collection operation, consensus operation, and execution operation on the same round of views in a multi-core and multi-thread parallel manner.
  • the operation of feeding back the transaction execution result to the client can be executed immediately after the transaction is executed, one thread can be used to execute the transaction execution operation and the feedback operation of the transaction execution result. That is, the fourth thread mentioned above is the third thread mentioned above, and the views of round N and round N+1 of the blockchain can present the time slot relationship shown in Figure 3 .
  • the method in the embodiment of this specification can also perform the execution operation and block writing operation on all batches of transactions in the N-th round of views in a unified manner after all batches of transactions in the N-th round of views have completed consensus. That is, the processing method of the blockchain transaction in the embodiment of this specification can also be shown in Figure 4, including the following steps:
  • S402. Collect the first batch of transactions in the target transaction set of the blockchain, where the target transaction set includes multiple batches of transactions, and the number of transactions exceeds the upper limit of the number of transactions in one consensus of the blockchain.
  • S404 perform a consensus operation on the first batch of transactions, and perform a collection operation on the second batch of transactions in parallel if there is a second batch of transactions, the second batch of transactions is the target transaction set that has not yet been collected Batch transactions.
  • S408 sending transaction execution results of all batches of transactions in the target transaction set in the blockchain to perform transaction confirmation on all batches of transactions in the target transaction set.
  • FIG. 5 is a time slot relationship diagram for the Nth round and the N+1th round of views based on the method shown in FIG. 4 . It should be understood that the execution operations of all batches of transactions in the N-th round view can be performed at least after the execution operations of all batches of transactions in the N-1 round view are completed.
  • the method shown in Figure 4 uses the first thread to collect transactions in batch order for each round of views, that is, the first thread does not collect other batches of transactions before collecting a batch of transactions;
  • the view executes the consensus operations of transactions in batch order, that is, the second thread does not execute the consensus operations of other batches of transactions before executing the consensus operations of one batch of transactions; through the third thread, all batches in each round of view
  • the transactions are executed in a unified manner; through the fourth thread, all batches of transactions in each round of views are uniformly confirmed; through the fifth thread, all batches of transactions in each round of views are uniformly written into blocks.
  • the first thread, the second thread, the third thread, the fourth thread, and the fifth thread are threads executed in parallel.
  • the method shown in FIG. 4 can also perform transaction collection and transaction consensus on the target transaction set in batches.
  • the consensus operation is performed on the intermediate batch of transactions
  • the collection operation of the next batch of transactions is also performed, so that the processing time of blockchain transactions can also be shortened in parallel.
  • a block write operation is performed uniformly, thereby improving the processing efficiency of blockchain transactions by reducing the number of block writes.
  • the whole solution can significantly improve the throughput of the blockchain, which can meet the needs of high-concurrency business scenarios.
  • the methods in the embodiments of this specification are not limited to taking each round view of the blockchain as the execution granularity. However, when the block chain accumulates to a transaction set that cannot be completed on the chain through a consensus, the method of the embodiment of this specification can be used to realize the data on-chain that only initiates a block writing operation once.
  • FIG. 6 is a schematic structural diagram of a blockchain node 600 according to an embodiment of this specification, including:
  • the first transaction collection module 610 collects the first batch of transactions in the target transaction set of the block chain, the target transaction set includes multiple batches of transactions, and the number of transactions exceeds the upper limit of the number of transactions agreed upon by the block chain at one time .
  • the first transaction consensus module 620 performs a consensus operation on the first batch of transactions, and if there is a second batch of transactions, executes the collection operation of the second batch of transactions in batch order in parallel, wherein the The second batch of transactions is a batch of transactions for which the target transaction set has not yet been collected.
  • the first transaction execution module 630 performs transaction execution operations on the first batch of transactions, and if there is a third batch of transactions in parallel, executes a consensus operation on the third batch of transactions in batch order, wherein the The third batch of transactions is a batch of transactions for which the target transaction set has been collected and consensus has not yet been completed.
  • the first transaction confirmation module 640 sends the transaction execution result of the first batch of transactions in the block chain to perform transaction confirmation on the first batch of transactions.
  • the first transaction block writing module 650 executes a block writing operation on all batches of transactions in the target transaction set after obtaining the transaction confirmations of all batches of transactions in the target transaction set.
  • the block chain node in the embodiment of this specification executes transaction collection, transaction consensus, transaction execution, and transaction confirmation in batches for a target transaction set with a large amount of data.
  • the intermediate batch of transactions executes the consensus operation, it also executes the execution operation of the previous batch of transactions and the collection operation of the next batch of transactions, thereby shortening the processing time of blockchain transactions in a parallel manner.
  • a block write operation is performed uniformly, thereby improving the processing efficiency of blockchain transactions by reducing the number of block writes.
  • the whole solution can significantly improve the throughput of the blockchain, which can meet the needs of high-concurrency business scenarios.
  • the first transaction execution module 630 simultaneously executes the second batch of transactions in batch order The collection operation for the transaction.
  • the target transaction set is all transactions in the Nth round view of the blockchain, where N is a positive integer.
  • the first transaction collection module 610 executes the N+1th round of views in batch order The collection operation for batch transactions in .
  • the first transaction collection module 610 executes the collection operation of the second batch of transactions in parallel in batch order.
  • the first transaction collection module 610 executes the N+1th round of views in batch order The collection operation for batch transactions in .
  • the first transaction collection module 610 executes the N+1th round of views in batch order The collection operation for batch transactions in .
  • the first transaction collection module 610 executes the N+1th round of views in batch order Consensus operations for batches of transactions that have been collected but have not yet completed consensus in .
  • the first transaction confirmation module 640 sends a transaction confirmation request of the transaction execution result of the first batch of transactions to other blockchain nodes of the blockchain. Afterwards, if the transaction confirmation feedback sent by 2f other blockchain nodes is received, it is confirmed that the transaction confirmation of the first batch of transactions is obtained, and f is the maximum number of abnormal consensus nodes allowed by the blockchain.
  • the blockchain node shown in Figure 6 of the embodiment of this specification also includes:
  • the first transaction feedback module after obtaining the transaction confirmation of the first batch of transactions, feeds back the transaction execution results of the first batch of transactions to the corresponding block chain client; or, after obtaining the Nth After the transactions of all batches of transactions in the round view are confirmed, the transaction execution results of all batches of transactions in the Nth round view are fed back to the corresponding blockchain client.
  • the first transaction collection module 610 collects all batches of transactions in the Nth round of views through a first thread, and the first thread does not collect other batches of transactions before collecting one batch of transactions.
  • the first transaction consensus module 620 executes consensus operations on all batches of transactions in the Nth round of views through the second thread, and the second thread does not execute other batches of transactions before completing the consensus operation of one batch of transactions Consensus operation.
  • the first transaction execution module 630 executes execution operations on all batches of transactions in the Nth round view through a third thread, and the third thread does not execute other batches of transactions before executing the execution operation of one batch of transactions.
  • the execution operation; the first transaction confirmation module 640 executes the transaction confirmation of all batches of transactions in the Nth round view through the fourth thread.
  • the first transaction block writing module 650 executes block writing operations on all batches of transactions in the Nth round of views through the fifth thread. Wherein, the first thread, the second thread, the third thread, the fourth thread and the fifth thread are threads executed in parallel.
  • the second thread after the first thread collects the first batch of transactions, notify the second thread to perform a consensus operation on the first batch of transactions; After the consensus operation of a batch of transactions, notify the third thread to perform operations on the first batch of transactions; after the third thread executes the execution operations of the first batch of transactions, notify the The fourth thread performs transaction confirmation on the first batch of transactions.
  • the block chain node shown in FIG. 6 can be used as the execution subject of the processing method shown in FIG. 1 above, so it can realize the functions realized by the processing method in FIG. 1 to FIG. 3 . Since the principle is the same, this article will not repeat them.
  • FIG. 7 is a schematic structural diagram of a block chain node 700 according to an embodiment of this specification, including:
  • the second transaction collection module 710 collects the first batch of transactions in the target transaction set of the block chain, the target transaction set includes multiple batches of transactions, and the number of transactions exceeds the upper limit of the transaction number of the block chain consensus at one time .
  • the second transaction consensus module 720 performs a consensus operation on the first batch of transactions, and if there is a second batch of transactions, executes the collection operation of the second batch of transactions in batch order in parallel, wherein the The second batch of transactions is a batch of transactions for which the target transaction set has not yet been collected.
  • the second transaction execution module 730 if all batches of transactions in the target transaction set have completed the consensus, perform a transaction execution operation on all batches of transactions in the target set.
  • the second transaction confirmation module 740 sends the transaction execution results of all batches of transactions in the target transaction set in the block chain to perform transaction confirmation on all batches of transactions in the target transaction set
  • the second transaction block writing module 750 executes a block writing operation on all batches of transactions in the target transaction set after obtaining the transaction confirmations of all batches of transactions in the target transaction set.
  • the second transaction collection module 710 simultaneously executes the second batch of transactions in batch order The collection operation for the transaction.
  • the target transaction set is all transactions in the Nth round view of the blockchain, where N is a positive integer.
  • the second transaction collection module 710 executes the N+1th round of consensus in batch order The collection operation for batch transactions in .
  • the second transaction collection module 710 executes the N+1th round of consensus in batch order The collection operation for batch transactions in .
  • the second transaction collection module 710 executes the N+1th round of consensus in batch order The collection operation for batch transactions in .
  • the second transaction collection module 710 executes the Nth round of transactions in batch order +1 Consensus operations for batches of transactions that have been collected but not yet completed consensus in a consensus round.
  • the second transaction confirmation module 740 sends a transaction confirmation request of the transaction execution result of the first batch of transactions to other blockchain nodes of the blockchain. Afterwards, if the transaction confirmation feedback sent by 2f other blockchain nodes is received, it is confirmed that the transaction confirmation of the first batch of transactions is obtained, and f is the maximum number of abnormal consensus nodes allowed by the blockchain.
  • the blockchain node shown in Figure 7 of the embodiment of this specification also includes:
  • the second transaction feedback module after obtaining the transaction confirmation of all batches of transactions in the Nth round of consensus, feeds back the transaction execution results of all batches of transactions in the Nth round of consensus to the corresponding block chain client.
  • the second transaction collection module 710 collects all batches of transactions in the N-th round of consensus through a first thread, and the first thread does not collect other batches of transactions before collecting one batch of transactions.
  • the second transaction consensus module 720 executes consensus operations on all batches of transactions in the N-th round of consensus through the second thread, and the second thread does not execute other batches of transactions before completing the consensus operation of one batch of transactions Consensus operation.
  • the second transaction execution module 730 executes the execution operation on all batches of transactions in the N-round consensus through the third thread; the second transaction confirmation module 740 executes all batches in the N-round consensus through the fourth thread A transaction confirmation for a transaction.
  • the second transaction block writing module 750 executes block writing operations on all batches of transactions in the N-th round of consensus through the fifth thread. Wherein, the first thread, the second thread, the third thread, the fourth thread and the fifth thread are threads executed in parallel.
  • the second thread is notified to perform a consensus operation on the first batch of transactions.
  • block chain node node shown in FIG. 7 can be used as the execution body of the processing method shown in FIG. 4 above, so it can realize the functions realized by the processing method in FIG. 4 and FIG. 5 . Since the principle is the same, this article will not repeat them.
  • Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present specification.
  • the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory.
  • the memory may include a memory, such as a high-speed random-access memory (Random-Access Memory, RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
  • RAM random-Access Memory
  • non-volatile memory such as at least one disk memory.
  • the electronic device may also include hardware required by other services.
  • the processor, the network interface and the memory can be connected to each other through an internal bus, which can be an ISA (Industry Standard Architecture, industry standard architecture) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnection standard) bus or an EISA (Extended Industry Standard Architecture, extended industry standard architecture) bus, etc.
  • the bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one double-headed arrow is used in FIG. 8 , but it does not mean that there is only one bus or one type of bus.
  • Memory for storing programs.
  • the program may include program code, and the program code includes computer operation instructions.
  • Storage which can include internal memory and nonvolatile storage, provides instructions and data to the processor.
  • the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to form a processing device for blockchain transactions on a logical level, which can be used as the block shown in Figure 6 A chain node or a component in a blockchain node.
  • the processor executes the program stored in the memory, and is specifically used to perform the following operations:
  • the target transaction set includes multiple batches of transactions, and the number of transactions exceeds the upper limit of the number of transactions in one consensus of the block chain.
  • the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to form a processing device for blockchain transactions on a logical level, which can be used as the block shown in Figure 7 A chain node or a component in a blockchain node.
  • the processor executes the program stored in the memory, and is specifically used to perform the following operations:
  • the target transaction set includes multiple batches of transactions, and the number of transactions exceeds the upper limit of the number of transactions in one consensus of the block chain.
  • a processor may be an integrated circuit chip with signal processing capabilities.
  • each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software.
  • the above-mentioned processor can be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processor, DSP), a dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the steps of the method disclosed in the embodiments of this specification may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
  • the electronic equipment in this specification does not exclude other implementations, such as logic devices or the combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, It can also be a hardware or logic device.
  • the embodiment of this specification also proposes a computer-readable storage medium, where the computer-readable storage medium stores one or more programs, and the one or more programs include instructions.
  • the portable electronic device can execute the method of the embodiment shown in FIG. 1 , and is specifically used to perform the following methods:
  • the target transaction set includes multiple batches of transactions, and the number of transactions exceeds the upper limit of the number of transactions in one consensus of the block chain.
  • the above instructions when executed by a portable electronic device including multiple application programs, can cause the portable electronic device to execute the method of the embodiment shown in FIG. 4 , and are specifically used to execute the following methods:
  • the target transaction set includes multiple batches of transactions, and the number of transactions exceeds the upper limit of the number of transactions in one consensus of the block chain.
  • the block chain node shown in FIG. 6 can realize the functions of the embodiments shown in FIG. 1 to FIG.
  • the block chain node shown realizes the functions of the embodiments shown in Fig. 4 and Fig. 5 . Since the principle is the same, this article will not repeat them.

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Educational Administration (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Data Mining & Analysis (AREA)
  • Technology Law (AREA)
  • Retry When Errors Occur (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Sont prévus dans les modes de réalisation de la présente description un procédé de traitement de transactions de chaîne de blocs, un nœud de chaîne de blocs et un dispositif électronique. Le procédé consiste à : collecter un premier lot de transactions à partir d'un ensemble de transactions cibles d'une chaîne de blocs, l'ensemble de transactions cibles comprenant une pluralité de lots de transactions et le nombre de transactions dépassant la limite supérieure du nombre de transactions sur lesquelles une opération de consensus peut être effectuée par la chaîne de blocs en une étape ; s'il existe un deuxième lot de transactions lorsque le premier lot de transactions est collecté, exécuter, en parallèle, une opération de consensus sur le deuxième lot de transactions, le deuxième lot de transactions étant un ensemble de transactions issues de l'ensemble de transactions cibles qui ont été collectées et n'ont pas été soumises à une opération de consensus ; s'il existe un troisième lot de transactions lorsque le premier lot de transactions est collecté, exécuter, en parallèle, une opération d'exécution sur le troisième lot de transactions, le troisième lot de transactions étant un ensemble de transactions issues de l'ensemble de transactions cibles qui ont été soumises à une opération de consensus et n'ont pas été exécutées ; et après que la confirmation de transaction de tous les lots de transactions dans l'ensemble de transactions cibles est obtenue, effectuer une instance d'une opération d'écriture de bloc sur tous les lots de transactions dans l'ensemble de transactions cibles.
PCT/CN2022/135434 2022-02-24 2022-11-30 Procédé de traitement de transactions de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique WO2023160088A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210178479.2 2022-02-24
CN202210178479.2A CN114547201A (zh) 2022-02-24 2022-02-24 一种区块链交易的处理方法、区块链节点及电子设备

Publications (1)

Publication Number Publication Date
WO2023160088A1 true WO2023160088A1 (fr) 2023-08-31

Family

ID=81679201

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/135434 WO2023160088A1 (fr) 2022-02-24 2022-11-30 Procédé de traitement de transactions de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique

Country Status (2)

Country Link
CN (1) CN114547201A (fr)
WO (1) WO2023160088A1 (fr)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114547201A (zh) * 2022-02-24 2022-05-27 蚂蚁区块链科技(上海)有限公司 一种区块链交易的处理方法、区块链节点及电子设备
CN114529413A (zh) * 2022-02-24 2022-05-24 蚂蚁区块链科技(上海)有限公司 一种区块链交易的处理方法、区块链节点及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111221639A (zh) * 2020-01-09 2020-06-02 杭州趣链科技有限公司 一种区块链平台的区块流水线执行方法
CN112887436A (zh) * 2021-04-28 2021-06-01 支付宝(杭州)信息技术有限公司 一种共识方法、共识节点和流水线方式的区块链系统
US20210318859A1 (en) * 2020-04-13 2021-10-14 International Business Machines Corporation Optimization of execution of smart contracts
CN114529413A (zh) * 2022-02-24 2022-05-24 蚂蚁区块链科技(上海)有限公司 一种区块链交易的处理方法、区块链节点及电子设备
CN114547201A (zh) * 2022-02-24 2022-05-27 蚂蚁区块链科技(上海)有限公司 一种区块链交易的处理方法、区块链节点及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111221639A (zh) * 2020-01-09 2020-06-02 杭州趣链科技有限公司 一种区块链平台的区块流水线执行方法
US20210318859A1 (en) * 2020-04-13 2021-10-14 International Business Machines Corporation Optimization of execution of smart contracts
CN112887436A (zh) * 2021-04-28 2021-06-01 支付宝(杭州)信息技术有限公司 一种共识方法、共识节点和流水线方式的区块链系统
CN114529413A (zh) * 2022-02-24 2022-05-24 蚂蚁区块链科技(上海)有限公司 一种区块链交易的处理方法、区块链节点及电子设备
CN114547201A (zh) * 2022-02-24 2022-05-27 蚂蚁区块链科技(上海)有限公司 一种区块链交易的处理方法、区块链节点及电子设备

Also Published As

Publication number Publication date
CN114547201A (zh) 2022-05-27

Similar Documents

Publication Publication Date Title
WO2023160088A1 (fr) Procédé de traitement de transactions de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique
WO2023160092A1 (fr) Procédé de traitement de transactions de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique
TWI714847B (zh) 區塊鏈共識網路中處理共識請求的方法、裝置和電子設備
CN103262030B (zh) 经由动态聚合操作的快速且线性化并发优先级队列
US9582334B2 (en) Resource management in MapReduce architecture and architectural system
CN113918101B (zh) 一种写数据高速缓存的方法、系统、设备和存储介质
WO2016011811A1 (fr) Procédé et appareil de gestion de mémoire, et support de stockage
WO2022166673A1 (fr) Procédé et appareil de traitement de transaction dans une chaîne de blocs, et dispositif électronique
CN109101662B (zh) 区块生成方法、装置、设备及存储介质
CN111142938A (zh) 一种异构芯片的任务处理方法、任务处理装置及电子设备
WO2023045203A1 (fr) Procédé de planification de tâche, puce et dispositif électronique
CN111125013A (zh) 一种数据入库方法、装置、设备及介质
CN103995827A (zh) MapReduce计算框架中的高性能排序方法
CN115099352A (zh) 模型训练系统、模型训练方法及装置
AU2019241002B2 (en) Transaction processing method and system, and server
CN114218135A (zh) 一种基于Redis缓存的源端流控方法及系统
US20240095172A1 (en) Data packet processing method and appratus
CN110597627A (zh) 基于虚拟fpga的数据库运算加速装置及加速方法
CN104461931A (zh) 多核存储装置及多核环境的跟踪日志输出处理方法
CN114912618A (zh) 一种量子计算任务调度方法、装置及量子计算机操作系统
CN110502337B (zh) 针对Hadoop MapReduce中混洗阶段的优化系统
WO2023160086A1 (fr) Procédé de traitement de transaction de chaîne de blocs, nœud de chaîne de blocs et dispositif électronique
CN113867796B (zh) 利用多状态机提高读性能的协议转换桥及实现方法
US12001427B2 (en) Systems, methods, and devices for acceleration of merge join operations
WO2020253575A1 (fr) Procédé et dispositif de détermination de nombre d'itérations de décodeur, support de stockage et dispositif électronique

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22928348

Country of ref document: EP

Kind code of ref document: A1