WO2021027612A1 - Method and apparatus for executing transaction in blockchain - Google Patents

Method and apparatus for executing transaction in blockchain Download PDF

Info

Publication number
WO2021027612A1
WO2021027612A1 PCT/CN2020/106670 CN2020106670W WO2021027612A1 WO 2021027612 A1 WO2021027612 A1 WO 2021027612A1 CN 2020106670 W CN2020106670 W CN 2020106670W WO 2021027612 A1 WO2021027612 A1 WO 2021027612A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
contract
transactions
shared variable
executed
Prior art date
Application number
PCT/CN2020/106670
Other languages
French (fr)
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 WO2021027612A1 publication Critical patent/WO2021027612A1/en

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

Definitions

  • This application relates to the field of Fintech and Blockchain, and in particular to a method and device for executing transactions in a blockchain.
  • This application provides a transaction execution method and device in a blockchain to solve the problem of long transaction completion time in a blockchain in the prior art.
  • this application provides a transaction execution method in the blockchain, which is suitable for smart contracts that include multiple contract interfaces.
  • the method includes: for any one of the N transactions to be processed, first determining the contract interface corresponding to the transaction in the smart contract, and then according to the shared variable information of the contract interface and the variables of the transaction Information, determine the shared variables of the transaction, and then determine at least two first transactions executed in parallel according to the shared variables of the N transactions, so as to execute the at least two first transactions in parallel.
  • N is an integer greater than 1
  • the shared variable information is used to record the shared variable of the contract interface
  • the shared variable is a variable possessed by at least two contract interfaces
  • the at least two first transactions correspond to different And the at least two first transactions do not have the same shared variable.
  • the contract interface corresponding to each of the N transactions to be processed in the smart contract can be determined, and the shared variable of each contract interface recorded in the shared variable information of the N transactions can be determined At least two transactions executed in parallel. Since at least two transactions executed in parallel correspond to different contract interfaces, and at least two transactions do not have the same shared variable, when at least two transactions are executed in parallel, the existence of the same shared variable will not cause transaction execution conflicts. It can be seen that this method can execute transactions in parallel on the basis of ensuring the normal execution of transactions, thereby helping to reduce the completion time of N transactions.
  • the shared variable contract is a contract that records the contract address, contract interface, and contract interface corresponding to shared variable information of the smart contract.
  • a shared variable contract that records the smart contract's contract address, contract interface, and contract interface corresponding to shared variable information is formed in advance, so that subsequent use can be directly based on the contract address and transaction of a smart contract in the smart contract
  • the corresponding contract interface determines the shared variable information corresponding to the transaction from the shared variable contract to improve the reliability of the shared variable information corresponding to the determined transaction.
  • the second transaction in the serial transaction combination is executed first, and then after the second transaction is executed serially, if the shared variable of the transaction that has not been executed in the serial transaction combination is determined, If there are at least two third transactions executed in parallel, the at least two third transactions are executed in parallel.
  • the second transaction is any transaction in a serial transaction combination
  • the serial transaction combination is a transaction other than a transaction executed in parallel among the N transactions, and the at least two third transactions correspond to different And the at least two third transactions do not have the same shared variable.
  • the second transaction in the serial transaction combination is executed serially, so that one or more transactions in the serial transaction combination can be executed in parallel only with transactions that share variables with the second transaction.
  • the shared variables of the transactions that have not been executed in the serial transaction combination if it is determined that there are at least two third transactions executed in parallel, the at least two third transactions are executed in parallel.
  • the transactions that share variables with the second transaction in the serial transaction combination are executed in parallel, which can further increase the transactions that can be executed in parallel and reduce the completion time of the transaction.
  • the second transaction is the transaction with the largest number of public transactions in the serial transaction combination.
  • the public transaction is a transaction that shares variables with the transaction among all transactions except the transaction in the serial transaction combination.
  • the remaining transactions in the serial transaction combination can be released to the maximum extent that share variables with the second transaction Transactions, thereby maximizing the number of at least two third transactions that can continue to be executed in parallel.
  • this application provides a transaction execution device in the blockchain, which is suitable for smart contracts that include multiple contract interfaces.
  • the device includes:
  • the determining module is used for determining the contract interface corresponding to the transaction in the smart contract for any one of the N transactions to be processed, and then according to the shared variable information of the contract interface and the variables of the transaction Information to determine the shared variables of the transaction;
  • the processing module is configured to determine at least two first transactions executed in parallel according to the shared variables of the N transactions, and then execute the at least two first transactions in parallel.
  • N is an integer greater than 1
  • the shared variable information is used to record the shared variable of the contract interface
  • the shared variable is a variable possessed by at least two contract interfaces
  • the at least two first transactions correspond to different And the at least two first transactions do not have the same shared variable.
  • the determining module is further configured to: determine the transaction corresponding to the transaction from the shared variable contract according to the contract address of the smart contract and the contract interface corresponding to the transaction in the smart contract Shared variable information.
  • the shared variable contract is a contract that records the contract address, contract interface, and contract interface corresponding to shared variable information of the smart contract.
  • the processing module is further configured to: serially execute the second transaction in the serial transaction combination, after the serial execution is completed, if the transaction is not executed according to the transaction in the serial transaction combination Shared variable, it is determined that there are at least two third transactions executed in parallel, then the at least two third transactions are executed in parallel.
  • the second transaction is any transaction in a serial transaction combination
  • the serial transaction combination is a transaction other than a transaction executed in parallel among the N transactions, and the at least two third transactions correspond to different And the at least two third transactions do not have the same shared variable.
  • the second transaction is the transaction with the largest number of public transactions in the serial transaction combination.
  • the public transaction is a transaction that shares variables with the transaction among all transactions except the transaction in the serial transaction combination.
  • the present application provides a computer device including a program or instruction, and when the program or instruction is executed, it is used to execute the method described in the first aspect and any one of the first aspect.
  • the present application provides a storage medium including a program or instruction, when the program or instruction is executed, the method described in the first aspect and any one of the first aspect is executed.
  • Figure 1 is a schematic diagram of the block chain
  • FIG. 2 is a schematic diagram of the process flow of a method for executing transactions in a blockchain according to an embodiment of the application;
  • FIG. 3 is a schematic diagram of a step flow diagram of deploying a shared variable contract on a blockchain according to an embodiment of the application
  • FIG. 4 is a schematic diagram of a step flow diagram of extracting shared variables of transactions on the blockchain according to an embodiment of the application;
  • FIG. 5 is a schematic structural diagram of a transaction execution device in a blockchain provided by an embodiment of the application.
  • Blockchain As shown in Figure 1, a blockchain is a chain composed of a series of blocks. In addition to recording the data of this block, each block will also record the hash value of the previous block. Through this Way to form a chain.
  • Node Each participant in the network is a node, and the node participates in network formation and data exchange.
  • a node refers to a participant with a unique identity.
  • the node has a complete copy of the ledger and has the ability to participate in the consensus and maintenance of the blockchain network.
  • Smart contract is a computer protocol designed to spread, verify, or execute a contract in an information-based way. Smart contracts allow trusted transactions without a third party, which are traceable and irreversible.
  • the specific form of the smart contract is the code deployed on the blockchain to complete a specific function.
  • Solidity is a mainstream smart contract programming language. Smart contracts written in Solidity language are called Solidity contracts.
  • a contract address will be generated, and users can call this smart contract through the contract address.
  • the function defined in the smart contract is called the contract interface.
  • the call to the smart contract is to call a contract interface in the contract through the contract address.
  • a transaction is a user's request for an operation of the smart contract interface deployed on the blockchain.
  • the transaction is initiated by the user and sent from the user's client to the blockchain node. After the blockchain node receives the transaction, it calls the corresponding smart contract according to the contract address and interface specified by the transaction.
  • Shared variables The interface (function) of the smart contract operates on some global variables, and these global variables may be manipulated by the interface of another contract.
  • the global variables manipulated in the interface of the smart contract are called shared variables.
  • a transaction calls an interface of a smart contract, which involves the operation of some shared variables. These shared variables are called the shared variables of this transaction.
  • an embodiment of the present application proposes a transaction execution method in the blockchain, which is suitable for smart contracts including multiple contract interfaces, and a schematic diagram of the specific steps of the method is shown in FIG. 2.
  • Step 201 For any one of the N transactions to be processed, determine the contract interface corresponding to the transaction in the smart contract, and determine the contract interface based on the shared variable information of the contract interface and the variable information of the transaction. The shared variables of the transaction.
  • N is an integer greater than 1
  • the shared variable information is used to record the shared variable of the contract interface
  • the shared variable is a variable possessed by at least two contract interfaces.
  • Step 202 Determine at least two first transactions to be executed in parallel according to the shared variables of the N transactions.
  • the at least two first transactions correspond to different contract interfaces, and the at least two first transactions do not have the same shared variable.
  • Step 203 execute the at least two first transactions in parallel.
  • the target transaction has been marked with the contract address of the smart contract and the corresponding target contract interface in the smart contract .
  • Shared variable information is the concept proposed in this application.
  • Shared variable information is a reference for extracting shared variables in transactions. Before a transaction is executed, shared variables can be extracted according to the corresponding shared variable information.
  • the shared variable information can have a one-to-one correspondence with the contract interface of the smart contract, and one contract interface has a corresponding shared variable information. It should be pointed out that this application only explains how the shared variable information is stored on the blockchain and at which stage it is used.
  • the specific form of shared variable information for example, a table or an array
  • the method of extracting shared variables in transactions based on shared variable information are not limited. As long as the shared variable information and the transaction can be correctly matched, and the shared variable can be extracted, the method described in this application can be used.
  • the contract developer can define shared variable information for the interface when developing each contract interface.
  • Shared variable information can also be stored on the blockchain in the form of a contract.
  • the shared variable information When the contract is deployed, the shared variable information will be recorded on the blockchain at the same time.
  • the blockchain node Before the transaction is executed, the blockchain node will query the shared variable information of the contract interface according to the contract interface called by the transaction, and then extract the shared variable from the transaction based on the shared variable information.
  • step 201 after determining the contract interface corresponding to the transaction in the smart contract, and before determining the shared variable of the transaction, the transaction corresponding to the share can be determined in the following manner Variable information:
  • the shared variable information corresponding to the transaction is determined from the shared variable contract.
  • the shared variable contract is a contract that records the contract address, contract interface, and contract interface corresponding to shared variable information of the smart contract.
  • a shared variable contract is built in the nodes of the blockchain to record the shared variable information corresponding to each contract interface.
  • the shared variable information corresponding to each contract interface can be defined for each contract interface when the contract developer develops the contract interface.
  • the smart contract is deployed on the blockchain, the blockchain will call the shared variable contract and record the shared variable information on the blockchain.
  • the contract interface corresponds to the shared variable information one to one.
  • the shared variable template contract is also a smart contract, and its operation will also be agreed on by the blockchain. That is to say, the operation of the shared variable template contract when deploying the contract will also be agreed by all nodes in the blockchain, recorded on the blockchain, and visible to all nodes. Therefore, when a smart contract is deployed, the shared variable information corresponding to its contract interface will also be agreed upon, recorded on the blockchain, and visible to all nodes. In this way, the shared variable information is equivalent to being deployed on the blockchain.
  • Step 301 The contract developer writes a smart contract.
  • Step 302 The contract developer writes shared variable information corresponding to the contract interface.
  • step 302 may be executed in parallel while step 301 is executed, that is, while writing the contract interface of the smart contract, the shared variable information corresponding to the contract interface is written.
  • the shared variable information in step 302 must be correct, so as to provide a reference for the extraction of shared variables in the future.
  • Step 303 The node performs the operation of deploying the smart contract and calls the shared variable contract.
  • Step 304 Use the contract address of the smart contract, the contract interface, and the shared variable information corresponding to the contract interface as parameters, and pass them into the interface of the shared variable contract.
  • Step 305 The blockchain reaches a consensus and the smart contract is successfully deployed. At the same time, the shared variable contract was successfully deployed and visible to all nodes.
  • FIG. 4 exemplarily shows a schematic diagram of a step flow diagram of extracting shared variables of a transaction on a blockchain provided by an embodiment of the present application. As shown in FIG. 4, the method includes:
  • Step 401 The user of the smart contract sends a transaction and calls the contract interface of the smart contract.
  • Step 402 After receiving the transaction, the node takes out the contract address and the called contract interface from the transaction.
  • Step 403 The node queries the shared variable information of the transaction from the shared variable contract according to the contract address and the contract interface.
  • Step 404 The node extracts the shared variable of the transaction from the transaction according to the shared variable information.
  • step 201 takes a specific example to illustrate the implementation process of step 201 to step 202.
  • the N transactions to be processed are:
  • the contract interface has many input parameters, some are required parameters, and some are optional parameters. Therefore, the parameters entered in transaction 1 are not necessarily all the input parameters of the contract interface.
  • Shared variable information 1 a, b, d, f, l, m corresponding to contract interface 1;
  • Shared variable information 2 corresponding to contract interface 2 c, e, k, n;
  • Shared variable information 3 corresponding to contract interface 3 a, b, c, j, u;
  • Shared variable information 6 corresponding to contract interface 6 p, q, r.
  • the shared variable 1 of transaction 1 is the variable recorded in the shared variable information 1 of the variables of transaction 1, namely a, b, d, f, l.
  • the shared variable 2 of transaction 2 is the variable recorded in the shared variable information 2 of the variables of transaction 2, namely c, e, and k.
  • the shared variable 3 of transaction 3 is the variables recorded in the shared variable information 3 of the variables of transaction 3, namely a, b, c, j.
  • the shared variable 4 of transaction 4 is the variable recorded in the shared variable information 4 among the variables of transaction 4, namely b, k.
  • the shared variable 5 of transaction 5 is the variable recorded in the shared variable information 5 of the variable of transaction 5, namely c, l.
  • the shared variable 6 of transaction 6 is the variable recorded in the shared variable information 6 of the variable of transaction 6, that is, p, q.
  • the at least two first transactions that can be executed in parallel may be transaction 1, transaction 2, and transaction 6.
  • step 201 to step 203 is as follows:
  • the second transaction in the serial transaction combination is executed first. After the second transaction is executed serially, if it is determined that there are at least two transactions executed in parallel according to the shared variable of the transaction that has not been executed in the serial transaction combination. Third transactions, then the at least two third transactions are executed in parallel.
  • the serial transaction combination is a transaction other than the transaction executed in parallel among the N transactions
  • the second transaction is any transaction in the serial transaction combination
  • the at least two third transactions correspond to different And the at least two third transactions do not have the same shared variable.
  • the second transaction is transaction 3, there are at least two third transactions executed in parallel, including transaction 4 and transaction 5. If the second transaction is transaction 4, there are no at least two third transactions executed in parallel.
  • the embodiment of the present application may also select the second transaction according to a predetermined rule.
  • the second transaction may be the transaction with the largest number of public transactions in the serial transaction combination.
  • a public transaction is a transaction that has a shared variable with the transaction among all transactions except the transaction in the serial transaction combination.
  • the number of public transactions in transaction 3 is 2
  • the number of public transactions in transaction 4 is 1
  • the number of public transactions in transaction 5 is 1, so the second transaction can be transaction 3.
  • the transaction can be directly executed serially.
  • FIG. 5 is a schematic structural diagram of a transaction execution device in a blockchain provided by an embodiment of the application, and the device is suitable for a smart contract including multiple contract interfaces. As shown in Figure 5, the device includes:
  • the determining module 501 is configured to determine the contract interface corresponding to the transaction in the smart contract for any one of the N transactions to be processed, according to the shared variable information of the contract interface and the variable information of the transaction , Determine the shared variable of the transaction; where N is an integer greater than 1, and the shared variable information is used to record the shared variable of the contract interface; the shared variable is a variable that both at least two contract interfaces have;
  • the processing module 502 is configured to determine at least two first transactions to be executed in parallel according to the shared variables of the N transactions, and to execute the at least two first transactions in parallel; wherein the at least two first transactions correspond to different And the at least two first transactions do not have the same shared variable.
  • the determining module 501 is further configured to:
  • the shared variable information corresponding to the transaction is determined from the shared variable contract.
  • the shared variable contract is a contract that records the contract address, contract interface, and contract interface corresponding to shared variable information of the smart contract.
  • processing module 502 is further configured to:
  • the second transaction in the serial transaction combination is executed serially, and after the second transaction is executed serially, if it is determined that there are at least two third transactions executed in parallel according to the shared variable of the transaction that has not been executed in the serial transaction combination Transaction, the at least two third transactions are executed in parallel.
  • the serial transaction combination is a transaction other than the transaction executed in parallel among the N transactions
  • the second transaction is any transaction in the serial transaction combination
  • the at least two third transactions correspond to different And the at least two third transactions do not have the same shared variable.
  • the second transaction is the transaction with the largest number of public transactions in the serial transaction combination.
  • a public transaction is a transaction that has a shared variable with the transaction among all transactions except the transaction in the serial transaction combination.
  • An embodiment of the present application also provides a computer device, including a program or instruction, when the program or instruction is executed, it is used to execute the transaction execution method in any block chain described in FIGS. 2 to 4.
  • An embodiment of the present application also provides a storage medium including a program or instruction, when the program or instruction is executed, it is used to execute the transaction execution method in any block chain described in FIGS. 2 to 4.
  • the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program codes.
  • a computer-usable storage media including but not limited to disk storage, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Abstract

A method and apparatus for executing a transaction in a blockchain, wherein same are applied to the field of Fintech and are used for reducing the duration for completing a transaction. The method is applicable to a smart contract comprising a plurality of contract interfaces. The method comprises: for any one transaction from among N transactions to be processed, determining a contract interface, corresponding to the transaction, in a smart contract, and determining shared variables of the N transactions according to shared variable information of contract interfaces corresponding to the N transactions and variable information of the N transactions; determining, according to the shared variables of the N transactions, at least two first transactions that correspond to different contract interfaces and do not have the same shared variable; and executing the at least two first transactions in parallel. According to the method, N transactions can be executed in parallel on the basis of normal execution of transactions, thereby facilitating a reduction in the duration for completing the N transactions.

Description

一种区块链中的交易执行方法及装置Method and device for executing transaction in blockchain
相关申请的交叉引用Cross references to related applications
本申请要求在2019年08月13日提交中国专利局、申请号为201910744161.4、申请名称为“一种区块链中的交易执行方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on August 13, 2019, the application number is 201910744161.4, and the application name is "a method and device for transaction execution in a blockchain", the entire content of which is by reference Incorporated in this application.
技术领域Technical field
本申请涉及金融科技(Fintech)领域和区块链(Blockchain)领域,尤其涉及一种区块链中的交易执行方法及装置。This application relates to the field of Fintech and Blockchain, and in particular to a method and device for executing transactions in a blockchain.
背景技术Background technique
随着计算机技术的发展,越来越多的技术(例如大数据、分布式、区块链(Blockchain)、人工智能等)应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变。目前,由于区块链具有不可篡改性,因此金融科技领域中常通过区块链进行交易。With the development of computer technology, more and more technologies (such as big data, distributed, Blockchain, artificial intelligence, etc.) are applied in the financial field, and the traditional financial industry is gradually transforming to Fintech. At present, because the blockchain is immutable, transactions are often carried out through the blockchain in the field of financial technology.
现有技术通常使用串行方式或并行方式执行交易。然而,随着交易量的不断增加,串行执行交易会导致大量的交易处于长期排队的状态,导致交易完成的时长较长。而并行执行交易又可能会因为交易与交易之间的共享变量存在冲突导致交易错误,这种情况下,重试或排查错误更会增加完成交易的时长。显然地,目前的区块链节点的性能越来越不能支撑起庞大的交易量。基于此,如何减少在区块链中完成交易的时长,是一个亟待解决的问题。In the prior art, transactions are usually executed in a serial or parallel manner. However, with the continuous increase in transaction volume, serial execution of transactions will result in a large number of transactions in a long-term queue, resulting in a longer time for transaction completion. Parallel execution of transactions may cause transaction errors due to conflicts in shared variables between transactions and transactions. In this case, retrying or troubleshooting errors will increase the time to complete the transaction. Obviously, the performance of current blockchain nodes is increasingly unable to support the huge transaction volume. Based on this, how to reduce the time to complete transactions in the blockchain is an urgent problem to be solved.
发明内容Summary of the invention
本申请提供一种区块链中的交易执行方法及装置,用以解决现有技术中区块链中完成交易的时长较长的问题。This application provides a transaction execution method and device in a blockchain to solve the problem of long transaction completion time in a blockchain in the prior art.
第一方面,本申请提供一种区块链中的交易执行方法,该方法适用于包 括多个合约接口的智能合约。该方法包括:针对待处理的N个交易中的任一个交易,先确定所述交易在所述智能合约中对应的合约接口,再根据所述合约接口的共享变量信息和所述交易的各变量信息,确定所述交易的共享变量,进而根据所述N个交易的共享变量,确定并行执行的至少两个第一交易,以并行执行所述至少两个第一交易。其中,N为大于1的整数,所述共享变量信息用于记录所述合约接口的共享变量,所述共享变量为至少两个合约接口均具有的变量,所述至少两个第一交易对应不同的合约接口且所述至少两个第一交易不具有相同的共享变量。In the first aspect, this application provides a transaction execution method in the blockchain, which is suitable for smart contracts that include multiple contract interfaces. The method includes: for any one of the N transactions to be processed, first determining the contract interface corresponding to the transaction in the smart contract, and then according to the shared variable information of the contract interface and the variables of the transaction Information, determine the shared variables of the transaction, and then determine at least two first transactions executed in parallel according to the shared variables of the N transactions, so as to execute the at least two first transactions in parallel. Wherein, N is an integer greater than 1, the shared variable information is used to record the shared variable of the contract interface, the shared variable is a variable possessed by at least two contract interfaces, and the at least two first transactions correspond to different And the at least two first transactions do not have the same shared variable.
通过上述方法,能够确定出待处理的N个交易中每个交易在所述智能合约中对应的合约接口,且能够根据N个交易的共享变量信息中记录的各合约接口的共享变量,确定出并行执行的至少两个交易。由于并行执行的至少两个交易对应不同的合约接口,且至少两个交易不具有相同的共享变量,因此在并行执行至少两个交易时,不会因为存在相同的共享变量导致交易执行冲突。由此可知,这种方式能够在保证交易执行正常的基础上并行执行交易,从而有助于降低N个交易的完成时长。Through the above method, the contract interface corresponding to each of the N transactions to be processed in the smart contract can be determined, and the shared variable of each contract interface recorded in the shared variable information of the N transactions can be determined At least two transactions executed in parallel. Since at least two transactions executed in parallel correspond to different contract interfaces, and at least two transactions do not have the same shared variable, when at least two transactions are executed in parallel, the existence of the same shared variable will not cause transaction execution conflicts. It can be seen that this method can execute transactions in parallel on the basis of ensuring the normal execution of transactions, thereby helping to reduce the completion time of N transactions.
一种可选实施方式中,在确定所述交易在所述智能合约中对应的合约接口之后,确定所述交易的共享变量之前,还可以根据所述智能合约的合约地址和所述交易在所述智能合约中对应的合约接口,从共享变量合约中确定所述交易对应的共享变量信息。其中,所述共享变量合约为记录智能合约的合约地址、合约接口及合约接口对应共享变量信息的合约。In an optional implementation manner, after determining the contract interface corresponding to the transaction in the smart contract, before determining the shared variable of the transaction, it may also be based on the contract address of the smart contract and the transaction in the The corresponding contract interface in the smart contract determines the shared variable information corresponding to the transaction from the shared variable contract. Wherein, the shared variable contract is a contract that records the contract address, contract interface, and contract interface corresponding to shared variable information of the smart contract.
上述方法中,通过预先形成记录智能合约的合约地址、合约接口及合约接口对应共享变量信息的共享变量合约,使得后续在使用时可直接根据某个智能合约的合约地址和交易在该智能合约中对应的合约接口,从共享变量合约中确定交易对应的共享变量信息,以提高确定出的交易对应共享变量信息的可靠性。In the above method, a shared variable contract that records the smart contract's contract address, contract interface, and contract interface corresponding to shared variable information is formed in advance, so that subsequent use can be directly based on the contract address and transaction of a smart contract in the smart contract The corresponding contract interface determines the shared variable information corresponding to the transaction from the shared variable contract to improve the reliability of the shared variable information corresponding to the determined transaction.
一种可选实施方式中,先串行执行串行交易组合中的第二交易,然后在串行执行所述第二交易之后,若根据串行交易组合中尚未执行的交易的共享 变量,确定存在并行执行的至少两个第三交易,则并行执行所述至少两个第三交易。其中,所述第二交易为串行交易组合中任一交易,所述串行交易组合为所述N个交易中除并行执行的交易之外的交易,所述至少两个第三交易对应不同的合约接口且所述至少两个第三交易不具有相同的共享变量。In an alternative embodiment, the second transaction in the serial transaction combination is executed first, and then after the second transaction is executed serially, if the shared variable of the transaction that has not been executed in the serial transaction combination is determined, If there are at least two third transactions executed in parallel, the at least two third transactions are executed in parallel. Wherein, the second transaction is any transaction in a serial transaction combination, and the serial transaction combination is a transaction other than a transaction executed in parallel among the N transactions, and the at least two third transactions correspond to different And the at least two third transactions do not have the same shared variable.
上述方法中,通过串行执行串行交易组合中的第二交易,使得串行交易组合中的一个或多个交易仅与第二交易有共享变量的交易便可并行执行,如此,若根据所述串行交易组合中尚未执行的交易的共享变量,确定存在并行执行的至少两个第三交易,则并行执行所述至少两个第三交易。通过在串行执行第二交易之后,并行执行串行交易组合中与第二交易有共享变量的交易,能够进一步增加可并行执行的交易,减少交易的完成时长。In the above method, the second transaction in the serial transaction combination is executed serially, so that one or more transactions in the serial transaction combination can be executed in parallel only with transactions that share variables with the second transaction. For the shared variables of the transactions that have not been executed in the serial transaction combination, if it is determined that there are at least two third transactions executed in parallel, the at least two third transactions are executed in parallel. After the second transaction is executed serially, the transactions that share variables with the second transaction in the serial transaction combination are executed in parallel, which can further increase the transactions that can be executed in parallel and reduce the completion time of the transaction.
一种可选实施方式中,所述第二交易为所述串行交易组合中公共交易个数最多的交易。其中,公共交易为所述串行交易组合中除该交易外的所有交易中,与该交易存在共享变量的交易。In an optional implementation manner, the second transaction is the transaction with the largest number of public transactions in the serial transaction combination. Wherein, the public transaction is a transaction that shares variables with the transaction among all transactions except the transaction in the serial transaction combination.
上述方式下,通过执行串行交易组合中公共交易个数最多的第二交易,可以在第二交易执行后,可最大限度从串行交易组合剩余的交易中释放与第二交易有共享变量的交易,从而最大限度增加可继续并行执行的至少两个第三交易的数量。In the above method, by executing the second transaction with the largest number of public transactions in the serial transaction combination, after the execution of the second transaction, the remaining transactions in the serial transaction combination can be released to the maximum extent that share variables with the second transaction Transactions, thereby maximizing the number of at least two third transactions that can continue to be executed in parallel.
第二方面,本申请提供一种区块链中的交易执行装置,适用于包括多个合约接口的智能合约。所述装置包括:In the second aspect, this application provides a transaction execution device in the blockchain, which is suitable for smart contracts that include multiple contract interfaces. The device includes:
确定模块,用于针对待处理的N个交易中任一个交易,先确定所述交易在所述智能合约中对应的合约接口,再根据所述合约接口的共享变量信息和所述交易的各变量信息,确定所述交易的共享变量;The determining module is used for determining the contract interface corresponding to the transaction in the smart contract for any one of the N transactions to be processed, and then according to the shared variable information of the contract interface and the variables of the transaction Information to determine the shared variables of the transaction;
处理模块,用于根据所述N个交易的共享变量,确定并行执行的至少两个第一交易,再并行执行所述至少两个第一交易。The processing module is configured to determine at least two first transactions executed in parallel according to the shared variables of the N transactions, and then execute the at least two first transactions in parallel.
其中,N为大于1的整数,所述共享变量信息用于记录所述合约接口的共享变量,所述共享变量为至少两个合约接口均具有的变量,所述至少两个第一交易对应不同的合约接口且所述至少两个第一交易不具有相同的共享变 量。Wherein, N is an integer greater than 1, the shared variable information is used to record the shared variable of the contract interface, the shared variable is a variable possessed by at least two contract interfaces, and the at least two first transactions correspond to different And the at least two first transactions do not have the same shared variable.
一种可选实施方式中,所述确定模块还用于:根据所述智能合约的合约地址和所述交易在所述智能合约中对应的合约接口,从共享变量合约中确定所述交易对应的共享变量信息。其中,所述共享变量合约为记录智能合约的合约地址、合约接口及合约接口对应共享变量信息的合约。In an optional implementation manner, the determining module is further configured to: determine the transaction corresponding to the transaction from the shared variable contract according to the contract address of the smart contract and the contract interface corresponding to the transaction in the smart contract Shared variable information. Wherein, the shared variable contract is a contract that records the contract address, contract interface, and contract interface corresponding to shared variable information of the smart contract.
一种可选实施方式中,所述处理模块还用于:串行执行串行交易组合中的第二交易,在串行执行完成之后,若根据所述串行交易组合中尚未执行的交易的共享变量,确定存在并行执行的至少两个第三交易,则并行执行所述至少两个第三交易。其中,所述第二交易为串行交易组合中任一交易,所述串行交易组合为所述N个交易中除并行执行的交易之外的交易,所述至少两个第三交易对应不同的合约接口且所述至少两个第三交易不具有相同的共享变量。In an optional implementation manner, the processing module is further configured to: serially execute the second transaction in the serial transaction combination, after the serial execution is completed, if the transaction is not executed according to the transaction in the serial transaction combination Shared variable, it is determined that there are at least two third transactions executed in parallel, then the at least two third transactions are executed in parallel. Wherein, the second transaction is any transaction in a serial transaction combination, and the serial transaction combination is a transaction other than a transaction executed in parallel among the N transactions, and the at least two third transactions correspond to different And the at least two third transactions do not have the same shared variable.
一种可选实施方式中,所述第二交易为所述串行交易组合中公共交易个数最多的交易。其中,公共交易为所述串行交易组合中除该交易外的所有交易中,与该交易存在共享变量的交易。In an optional implementation manner, the second transaction is the transaction with the largest number of public transactions in the serial transaction combination. Wherein, the public transaction is a transaction that shares variables with the transaction among all transactions except the transaction in the serial transaction combination.
上述第二方面及第二方面各个实施方式的有益效果,可以参考上述第一方面及第一方面各个实施方式的有益效果,这里不再赘述。For the beneficial effects of the above-mentioned second aspect and the implementation manners of the second aspect, reference may be made to the beneficial effects of the above-mentioned first aspect and the implementation manners of the first aspect, which will not be repeated here.
第三方面,本申请提供一种计算机设备,包括程序或指令,当所述程序或指令被执行时,用以执行上述第一方面及第一方面任一实施方式所述的方法。In a third aspect, the present application provides a computer device including a program or instruction, and when the program or instruction is executed, it is used to execute the method described in the first aspect and any one of the first aspect.
第四方面,本申请提供一种存储介质,包括程序或指令,当所述程序或指令被执行时,用以执行上述第一方面及第一方面任一实施方式所述的方法。In a fourth aspect, the present application provides a storage medium including a program or instruction, when the program or instruction is executed, the method described in the first aspect and any one of the first aspect is executed.
附图说明Description of the drawings
图1为区块链的结构示意图;Figure 1 is a schematic diagram of the block chain;
图2为本申请实施例提供的一种区块链中交易执行方法的步骤流程示意图;FIG. 2 is a schematic diagram of the process flow of a method for executing transactions in a blockchain according to an embodiment of the application;
图3为本申请实施例提供的一种在区块链部署共享变量合约的步骤流程示意图;FIG. 3 is a schematic diagram of a step flow diagram of deploying a shared variable contract on a blockchain according to an embodiment of the application;
图4为本申请实施例提供的一种在区块链提取交易的共享变量的步骤流程示意图;FIG. 4 is a schematic diagram of a step flow diagram of extracting shared variables of transactions on the blockchain according to an embodiment of the application;
图5为本申请实施例提供的一种区块链中交易执行装置的结构示意图。FIG. 5 is a schematic structural diagram of a transaction execution device in a blockchain provided by an embodiment of the application.
具体实施方式detailed description
为了更好的理解上述技术方案,下面将结合说明书附图及具体的实施方式对上述技术方案进行详细的说明,应当理解本申请实施例以及实施例中的具体特征是对本申请技术方案的详细的说明,而不是对本申请技术方案的限定,在不冲突的情况下,本申请实施例以及实施例中的技术特征可以相互结合。In order to better understand the above technical solutions, the above technical solutions will be described in detail below with reference to the drawings and specific implementations of the specification. It should be understood that the embodiments of the application and the specific features in the embodiments are detailed to the technical solutions of the application. Note, rather than limiting the technical solution of the present application, the embodiments of the present application and the technical features in the embodiments can be combined with each other if there is no conflict.
下面首先解释本申请实施例中出现的名词。The following first explains the terms appearing in the embodiments of this application.
区块链:如图1所示,区块链是由一系列区块组成的一条链,每个块上除了记录本块的数据还会记录上一块的哈希(Hash)值,通过这种方式组成一条链。区块链的核心理念有两个,一个是密码学技术,另一个是去中心化思想,基于这两个理念能够做到区块链上的历史信息无法被篡改。Blockchain: As shown in Figure 1, a blockchain is a chain composed of a series of blocks. In addition to recording the data of this block, each block will also record the hash value of the previous block. Through this Way to form a chain. There are two core concepts of the blockchain, one is cryptography and the other is decentralization. Based on these two concepts, historical information on the blockchain cannot be tampered with.
节点:网络中的每一个参与者就是一个节点,节点参与网络组建和数据交换。在区块链网络中,一个节点是指一个具有唯一身份的参与者,该节点具有一份完整的账本拷贝,具有参与区块链网络共识和账本维护的能力。Node: Each participant in the network is a node, and the node participates in network formation and data exchange. In the blockchain network, a node refers to a participant with a unique identity. The node has a complete copy of the ledger and has the ability to participate in the consensus and maintenance of the blockchain network.
智能合约:智能合约是一种旨在以信息化方式传播、验证或执行合同的计算机协议。智能合约允许在没有第三方的情况下进行可信交易,这些交易可追踪且不可逆转。智能合约具体形式为部署在区块链上的完成特定功能的代码。举例来说,Solidity是一种主流的智能合约编程语言,用Solidity语言编写的智能合约,叫Solidity合约。当智能合约被部署到区块链上时,会产生合约地址,用户可通过该合约地址调用此智能合约。智能合约中定义的函数,称为合约接口,对智能合约的调用,就是通过合约地址调用合约中的某个合 约接口。Smart contract: A smart contract is a computer protocol designed to spread, verify, or execute a contract in an information-based way. Smart contracts allow trusted transactions without a third party, which are traceable and irreversible. The specific form of the smart contract is the code deployed on the blockchain to complete a specific function. For example, Solidity is a mainstream smart contract programming language. Smart contracts written in Solidity language are called Solidity contracts. When a smart contract is deployed on the blockchain, a contract address will be generated, and users can call this smart contract through the contract address. The function defined in the smart contract is called the contract interface. The call to the smart contract is to call a contract interface in the contract through the contract address.
交易:交易是用户对部署在区块链上智能合约接口的一次操作请求。交易由用户发起,从用户的客户端发往区块链节点,区块链节点收到交易后,根据交易指定的合约地址和接口去调用相应的智能合约。Transaction: A transaction is a user's request for an operation of the smart contract interface deployed on the blockchain. The transaction is initiated by the user and sent from the user's client to the blockchain node. After the blockchain node receives the transaction, it calls the corresponding smart contract according to the contract address and interface specified by the transaction.
共享变量:智能合约的接口(函数)对一些全局的变量进行了操作,这些全局变量有可能会被另一个合约的接口进行操作。在智能合约的接口中所操作的全局变量,称为共享变量。一笔交易调用了一个智能合约的接口,涉及到对某些共享变量的操作。这些共享变量,称为这笔交易的共享变量。Shared variables: The interface (function) of the smart contract operates on some global variables, and these global variables may be manipulated by the interface of another contract. The global variables manipulated in the interface of the smart contract are called shared variables. A transaction calls an interface of a smart contract, which involves the operation of some shared variables. These shared variables are called the shared variables of this transaction.
基于区块链的不可篡改性,金融机构(例如银行机构、保险机构或证券机构)在进行业务(如银行的贷款业务、存款业务等)运转的过程中,常通过区块链进行交易。串行执行交易和并行执行交易是两种常用的交易执行方法。然而,随着交易量的不断增加,串行执行交易可能会使得大量交易长期排队,而并行执行交易又可能因为交易与交易之间的共享变量存在冲突导致交易错误,对错误交易的重试或排查更会增加完成交易的时长。由此可知,目前区块链节点的性能,越来越不能支撑起庞大的交易量。而这种情况显然不符合银行等金融机构的需求,无法保证金融机构各项业务的高效运转。Based on the immutability of the blockchain, financial institutions (such as banking institutions, insurance institutions, or securities institutions) often conduct transactions through the blockchain during the operation of their businesses (such as bank loan business, deposit business, etc.). Serial execution of transactions and parallel execution of transactions are two commonly used methods of transaction execution. However, with the continuous increase in transaction volume, serial execution of transactions may cause a large number of transactions to be queued for a long time, and parallel execution of transactions may cause transaction errors due to conflicts in shared variables between transactions and transactions. Retry or retry of wrong transactions The investigation will increase the time to complete the transaction. It can be seen that the current performance of blockchain nodes is increasingly unable to support a huge transaction volume. This situation obviously does not meet the needs of banks and other financial institutions, and cannot guarantee the efficient operation of various businesses of financial institutions.
为此,本申请实施例提出一种区块链中的交易执行方法,该方法适用于包括多个合约接口的智能合约,该方法具体步骤流程示意图如图2所示。To this end, an embodiment of the present application proposes a transaction execution method in the blockchain, which is suitable for smart contracts including multiple contract interfaces, and a schematic diagram of the specific steps of the method is shown in FIG. 2.
步骤201:针对待处理的N个交易中任一个交易,确定所述交易在所述智能合约中对应的合约接口,根据所述合约接口的共享变量信息和所述交易的各变量信息,确定所述交易的共享变量。Step 201: For any one of the N transactions to be processed, determine the contract interface corresponding to the transaction in the smart contract, and determine the contract interface based on the shared variable information of the contract interface and the variable information of the transaction. The shared variables of the transaction.
本申请实施例中,N为大于1的整数,所述共享变量信息用于记录所述合约接口的共享变量,所述共享变量为至少两个合约接口均具有的变量。In the embodiment of the present application, N is an integer greater than 1, the shared variable information is used to record the shared variable of the contract interface, and the shared variable is a variable possessed by at least two contract interfaces.
步骤202:根据所述N个交易的共享变量,确定并行执行的至少两个第一交易。Step 202: Determine at least two first transactions to be executed in parallel according to the shared variables of the N transactions.
本申请实施例中,所述至少两个第一交易对应不同的合约接口,且所述至少两个第一交易不具有相同的共享变量。In the embodiment of the present application, the at least two first transactions correspond to different contract interfaces, and the at least two first transactions do not have the same shared variable.
步骤203:并行执行所述至少两个第一交易。Step 203: execute the at least two first transactions in parallel.
在上述步骤201中,对于待处理的N个交易中的任一个交易,区块链在收到该交易之前,目标交易已标记了智能合约的合约地址,以及在智能合约中对应的目标合约接口。In the above step 201, for any one of the N transactions to be processed, before the block chain receives the transaction, the target transaction has been marked with the contract address of the smart contract and the corresponding target contract interface in the smart contract .
下面详细说明共享变量信息。The following describes the shared variable information in detail.
“共享变量信息”是本申请提出的概念。共享变量信息是提取交易中共享变量的参考。一笔交易在执行前,可根据相应的共享变量信息提取出共享变量。本申请中,共享变量信息可以与智能合约的合约接口一一对应,一个合约接口有一个对应的共享变量信息。需要指出的是,本申请只对共享变量信息如何在区块链上存储,以及在哪个阶段使用进行说明。但不限定共享变量信息的具体形式(例如可以为一个表格或一个数组)和根据共享变量信息提取交易中共享变量的方法。只要共享变量信息和交易能正确匹配,能提取出共享变量,则都可以采用本申请所述的方法。本申请中可通过合约开发者在开发每个合约接口时,为接口定义共享变量信息。"Shared variable information" is the concept proposed in this application. Shared variable information is a reference for extracting shared variables in transactions. Before a transaction is executed, shared variables can be extracted according to the corresponding shared variable information. In this application, the shared variable information can have a one-to-one correspondence with the contract interface of the smart contract, and one contract interface has a corresponding shared variable information. It should be pointed out that this application only explains how the shared variable information is stored on the blockchain and at which stage it is used. However, the specific form of shared variable information (for example, a table or an array) and the method of extracting shared variables in transactions based on shared variable information are not limited. As long as the shared variable information and the transaction can be correctly matched, and the shared variable can be extracted, the method described in this application can be used. In this application, the contract developer can define shared variable information for the interface when developing each contract interface.
共享变量信息也可以通过合约的形式存储在区块链上。当合约部署时,共享变量信息会同时被记录到区块链上。在交易执行前,区块链节点会根据交易调用的合约接口,查询出合约接口的共享变量信息,再根据共享变量信息从交易中提取出共享变量。Shared variable information can also be stored on the blockchain in the form of a contract. When the contract is deployed, the shared variable information will be recorded on the blockchain at the same time. Before the transaction is executed, the blockchain node will query the shared variable information of the contract interface according to the contract interface called by the transaction, and then extract the shared variable from the transaction based on the shared variable information.
因此,在上述步骤201的一种可选实施方式中,在确定所述交易在所述智能合约中对应的合约接口之后,确定所述交易的共享变量之前,可以按照以下方式确定交易对应的共享变量信息:Therefore, in an optional implementation manner of step 201 above, after determining the contract interface corresponding to the transaction in the smart contract, and before determining the shared variable of the transaction, the transaction corresponding to the share can be determined in the following manner Variable information:
根据所述智能合约的合约地址和所述交易在所述智能合约中对应的合约接口,从共享变量合约中确定所述交易对应的共享变量信息。其中,所述共享变量合约为记录智能合约的合约地址、合约接口及合约接口对应共享变量信息的合约。According to the contract address of the smart contract and the contract interface corresponding to the transaction in the smart contract, the shared variable information corresponding to the transaction is determined from the shared variable contract. Wherein, the shared variable contract is a contract that records the contract address, contract interface, and contract interface corresponding to shared variable information of the smart contract.
本申请在区块链的节点中内置了一种共享变量合约,用于记录每个合约接口对应的共享变量信息。其中,每个合约接口对应的共享变量信息可以是 合约开发者在开发合约接口时为每个合约接口定义的。当智能合约部署到区块链时,区块链会调用共享变量合约,并将共享变量信息记录到区块链上。在共享变量合约中,合约接口与共享变量信息一一对应。In this application, a shared variable contract is built in the nodes of the blockchain to record the shared variable information corresponding to each contract interface. Among them, the shared variable information corresponding to each contract interface can be defined for each contract interface when the contract developer develops the contract interface. When the smart contract is deployed on the blockchain, the blockchain will call the shared variable contract and record the shared variable information on the blockchain. In the shared variable contract, the contract interface corresponds to the shared variable information one to one.
共享变量模板合约也是一个智能合约,对它的操作也会被区块链进行共识。也就是说,部署合约时对共享变量模板合约的操作,也会被区块链中的所有节点共识,并记录到区块链上,且对所有的节点可见。因此,当一个智能合约被部署时,其合约接口对应的共享变量信息也会被共识,并记录到区块链上,且对所有的节点可见。这样,共享变量信息相当于部署到了区块链上。The shared variable template contract is also a smart contract, and its operation will also be agreed on by the blockchain. That is to say, the operation of the shared variable template contract when deploying the contract will also be agreed by all nodes in the blockchain, recorded on the blockchain, and visible to all nodes. Therefore, when a smart contract is deployed, the shared variable information corresponding to its contract interface will also be agreed upon, recorded on the blockchain, and visible to all nodes. In this way, the shared variable information is equivalent to being deployed on the blockchain.
下面结合图3,详细说明本申请实施例提供的一种在区块链部署共享变量合约的方法的步骤流程。The following describes in detail the step flow of a method for deploying a shared variable contract on a blockchain provided by an embodiment of the present application with reference to FIG. 3.
步骤301:合约开发者编写智能合约。Step 301: The contract developer writes a smart contract.
步骤302:合约开发者编写与合约接口对应的共享变量信息。Step 302: The contract developer writes shared variable information corresponding to the contract interface.
在一种可选地实施方式中,可以在步骤301执行的同时并行执行步骤302,即编写智能合约的合约接口的同时,编写与合约接口对应的共享变量信息。In an optional implementation manner, step 302 may be executed in parallel while step 301 is executed, that is, while writing the contract interface of the smart contract, the shared variable information corresponding to the contract interface is written.
需要说明的是,由于共享变量信息在区块链的各节点达成共识后,便不可篡改,因此步骤302中共享变量信息必须保证正确,以便后续能为共享变量的提取提供参考。It should be noted that, since the shared variable information cannot be tampered with after each node of the blockchain reaches a consensus, the shared variable information in step 302 must be correct, so as to provide a reference for the extraction of shared variables in the future.
步骤303:节点进行部署智能合约操作,并调用共享变量合约。Step 303: The node performs the operation of deploying the smart contract and calls the shared variable contract.
步骤304:将智能合约的合约地址、合约接口和与合约接口对应的共享变量信息作为参数,传入共享变量合约的接口。Step 304: Use the contract address of the smart contract, the contract interface, and the shared variable information corresponding to the contract interface as parameters, and pass them into the interface of the shared variable contract.
步骤305:区块链达成共识,智能合约部署成功。与此同时,共享变量合约也部署成功,且对所有的节点可见。Step 305: The blockchain reaches a consensus and the smart contract is successfully deployed. At the same time, the shared variable contract was successfully deployed and visible to all nodes.
图4示例性示出本申请实施例提供的一种在区块链提取交易的共享变量的步骤流程示意图,如图4所示,该方法包括:FIG. 4 exemplarily shows a schematic diagram of a step flow diagram of extracting shared variables of a transaction on a blockchain provided by an embodiment of the present application. As shown in FIG. 4, the method includes:
步骤401:智能合约的使用者发送交易,调用智能合约的合约接口。Step 401: The user of the smart contract sends a transaction and calls the contract interface of the smart contract.
步骤402:节点收到交易后,从交易中取出合约地址和调用的合约接口。Step 402: After receiving the transaction, the node takes out the contract address and the called contract interface from the transaction.
步骤403:节点根据合约地址和合约接口,从共享变量合约中查询出交易的共享变量信息。Step 403: The node queries the shared variable information of the transaction from the shared variable contract according to the contract address and the contract interface.
步骤404:节点根据共享变量信息,从交易中提取出交易的共享变量。Step 404: The node extracts the shared variable of the transaction from the transaction according to the shared variable information.
下面以一个具体的例子来说明步骤201~步骤202的实现过程。The following takes a specific example to illustrate the implementation process of step 201 to step 202.
在该示例中,待处理的N个交易为:In this example, the N transactions to be processed are:
交易1,对应合约接口1,变量为a,b,d,f,l,x;Transaction 1, corresponding to contract interface 1, the variables are a, b, d, f, l, x;
交易2,对应合约接口2,变量为c,e,k,y;Transaction 2, corresponding to contract interface 2, variables are c, e, k, y;
交易3,对应合约接口3,变量为a,b,c,j,z;Transaction 3, corresponding to contract interface 3, the variables are a, b, c, j, z;
交易4,对应合约接口4,变量为b,k,q;Transaction 4, corresponding to contract interface 4, the variables are b, k, q;
交易5,对应合约接口5,变量为c,l,p;Transaction 5, corresponding to contract interface 5, with variables c, l, p;
交易6,对应合约接口6,变量为p,q。Transaction 6, corresponding to contract interface 6, variables are p, q.
需要说明的是,合约接口有许多输入参数,有些为必填参数,有些为选填参数,因此交易1输入的参数并不一定是合约接口的全部输入参数。It should be noted that the contract interface has many input parameters, some are required parameters, and some are optional parameters. Therefore, the parameters entered in transaction 1 are not necessarily all the input parameters of the contract interface.
假设该示例中各合约接口对应的共享变量信息为:Assume that the shared variable information corresponding to each contract interface in this example is:
合约接口1对应的共享变量信息1:a,b,d,f,l,m;Shared variable information 1: a, b, d, f, l, m corresponding to contract interface 1;
合约接口2对应的共享变量信息2:c,e,k,n;Shared variable information 2 corresponding to contract interface 2: c, e, k, n;
合约接口3对应的共享变量信息3:a,b,c,j,u;Shared variable information 3 corresponding to contract interface 3: a, b, c, j, u;
合约接口4对应的共享变量信息4:b,k,o;Shared variable information corresponding to contract interface 4: b, k, o;
合约接口5对应的共享变量信息5:c,l,w;Shared variable information 5 corresponding to contract interface 5: c, l, w;
合约接口6对应的共享变量信息6:p,q,r。Shared variable information 6 corresponding to contract interface 6: p, q, r.
因此可知,交易1的共享变量1为交易1的变量中在共享变量信息1中记录的变量,即a,b,d,f,l。相应地,交易2的共享变量2为交易2的变量中在共享变量信息2中记录的变量,即c,e,k。交易3的共享变量3为交易3的变量中在共享变量信息3中记录的变量,即a,b,c,j。交易4的共享变量4为交易4的变量中在共享变量信息4中记录的变量,即b,k。交易5的共享变量5为交易5的变量中在共享变量信息5中记录的变量,即c,l。交易6的共享变量6为交易6的变量中在共享变量信息6中记录的变量,即p,q。Therefore, it can be seen that the shared variable 1 of transaction 1 is the variable recorded in the shared variable information 1 of the variables of transaction 1, namely a, b, d, f, l. Correspondingly, the shared variable 2 of transaction 2 is the variable recorded in the shared variable information 2 of the variables of transaction 2, namely c, e, and k. The shared variable 3 of transaction 3 is the variables recorded in the shared variable information 3 of the variables of transaction 3, namely a, b, c, j. The shared variable 4 of transaction 4 is the variable recorded in the shared variable information 4 among the variables of transaction 4, namely b, k. The shared variable 5 of transaction 5 is the variable recorded in the shared variable information 5 of the variable of transaction 5, namely c, l. The shared variable 6 of transaction 6 is the variable recorded in the shared variable information 6 of the variable of transaction 6, that is, p, q.
在该示例中,可并行执行的至少两个第一交易可以为交易1、交易2和交易6。In this example, the at least two first transactions that can be executed in parallel may be transaction 1, transaction 2, and transaction 6.
本申请实施例中,步骤201~步骤203的一种可选实施方式如下:In the embodiment of the present application, an optional implementation manner of step 201 to step 203 is as follows:
先串行执行串行交易组合中的第二交易,在串行执行所述第二交易完成之后,若根据所述串行交易组合中尚未执行的交易的共享变量,确定存在并行执行的至少两个第三交易,则再并行执行所述至少两个第三交易。其中,所述串行交易组合为所述N个交易中除并行执行的交易之外的交易,所述第二交易为串行交易组合中任一交易,所述至少两个第三交易对应不同的合约接口且所述至少两个第三交易不具有相同的共享变量。The second transaction in the serial transaction combination is executed first. After the second transaction is executed serially, if it is determined that there are at least two transactions executed in parallel according to the shared variable of the transaction that has not been executed in the serial transaction combination. Third transactions, then the at least two third transactions are executed in parallel. Wherein, the serial transaction combination is a transaction other than the transaction executed in parallel among the N transactions, the second transaction is any transaction in the serial transaction combination, and the at least two third transactions correspond to different And the at least two third transactions do not have the same shared variable.
举例来说,若第二交易为交易3,则存在并行执行的至少两个第三交易,包括交易4和交易5。若第二交易为交易4,则不存在并行执行的至少两个第三交易。For example, if the second transaction is transaction 3, there are at least two third transactions executed in parallel, including transaction 4 and transaction 5. If the second transaction is transaction 4, there are no at least two third transactions executed in parallel.
需要说明的是,本申请实施例也可根据预定的规则选择所述第二交易,例如第二交易可以为所述串行交易组合中公共交易个数最多的交易。其中,公共交易为所述串行交易组合中除该交易外的所有交易中与该交易存在共享变量的交易。在上述例子中,交易3的公共交易个数为2,交易4的公共交易个数为1,交易5的公共交易个数为1,因此第二交易可以为交易3。另外,如果串行交易组合中只有一个交易,则可以直接串行执行该交易。It should be noted that the embodiment of the present application may also select the second transaction according to a predetermined rule. For example, the second transaction may be the transaction with the largest number of public transactions in the serial transaction combination. Wherein, a public transaction is a transaction that has a shared variable with the transaction among all transactions except the transaction in the serial transaction combination. In the above example, the number of public transactions in transaction 3 is 2, the number of public transactions in transaction 4 is 1, and the number of public transactions in transaction 5 is 1, so the second transaction can be transaction 3. In addition, if there is only one transaction in the serial transaction combination, the transaction can be directly executed serially.
图5为本申请实施例提供的一种区块链中的交易执行装置的结构示意图,该装置适用于包括多个合约接口的智能合约。如图5所示,所述装置包括:FIG. 5 is a schematic structural diagram of a transaction execution device in a blockchain provided by an embodiment of the application, and the device is suitable for a smart contract including multiple contract interfaces. As shown in Figure 5, the device includes:
确定模块501,用于针对待处理的N个交易中任一个交易,确定所述交易在所述智能合约中对应的合约接口,根据所述合约接口的共享变量信息和所述交易的各变量信息,确定所述交易的共享变量;其中,N为大于1的整数,所述共享变量信息用于记录所述合约接口的共享变量;所述共享变量为至少两个合约接口均具有的变量;The determining module 501 is configured to determine the contract interface corresponding to the transaction in the smart contract for any one of the N transactions to be processed, according to the shared variable information of the contract interface and the variable information of the transaction , Determine the shared variable of the transaction; where N is an integer greater than 1, and the shared variable information is used to record the shared variable of the contract interface; the shared variable is a variable that both at least two contract interfaces have;
处理模块502,用于根据所述N个交易的共享变量,确定并行执行的至少两个第一交易,并行执行所述至少两个第一交易;其中,所述至少两个第 一交易对应不同的合约接口且所述至少两个第一交易不具有相同的共享变量。The processing module 502 is configured to determine at least two first transactions to be executed in parallel according to the shared variables of the N transactions, and to execute the at least two first transactions in parallel; wherein the at least two first transactions correspond to different And the at least two first transactions do not have the same shared variable.
一种可选实施方式中,所述确定模块501还用于:In an optional implementation manner, the determining module 501 is further configured to:
根据所述智能合约的合约地址和所述交易在所述智能合约中对应的合约接口,从共享变量合约中确定所述交易对应的共享变量信息。其中,所述共享变量合约为记录智能合约的合约地址、合约接口及合约接口对应共享变量信息的合约。According to the contract address of the smart contract and the contract interface corresponding to the transaction in the smart contract, the shared variable information corresponding to the transaction is determined from the shared variable contract. Wherein, the shared variable contract is a contract that records the contract address, contract interface, and contract interface corresponding to shared variable information of the smart contract.
一种可选实施方式中,所述处理模块502还用于:In an optional implementation manner, the processing module 502 is further configured to:
串行执行串行交易组合中的第二交易,串行执行所述第二交易完成之后,若根据所述串行交易组合中尚未执行的交易的共享变量确定存在并行执行的至少两个第三交易,则并行执行所述至少两个第三交易。其中,所述串行交易组合为所述N个交易中除并行执行的交易之外的交易,所述第二交易为串行交易组合中任一交易,所述至少两个第三交易对应不同的合约接口,且所述至少两个第三交易不具有相同的共享变量。The second transaction in the serial transaction combination is executed serially, and after the second transaction is executed serially, if it is determined that there are at least two third transactions executed in parallel according to the shared variable of the transaction that has not been executed in the serial transaction combination Transaction, the at least two third transactions are executed in parallel. Wherein, the serial transaction combination is a transaction other than the transaction executed in parallel among the N transactions, the second transaction is any transaction in the serial transaction combination, and the at least two third transactions correspond to different And the at least two third transactions do not have the same shared variable.
一种可选实施方式中,所述第二交易为所述串行交易组合中公共交易个数最多的交易。其中,公共交易为所述串行交易组合中除该交易外的所有交易中与该交易存在共享变量的交易。In an optional implementation manner, the second transaction is the transaction with the largest number of public transactions in the serial transaction combination. Wherein, a public transaction is a transaction that has a shared variable with the transaction among all transactions except the transaction in the serial transaction combination.
本申请实施例还提供一种计算机设备,包括程序或指令,当所述程序或指令被执行时,用以执行上述图2至图4中任意所述的区块链中的交易执行方法。An embodiment of the present application also provides a computer device, including a program or instruction, when the program or instruction is executed, it is used to execute the transaction execution method in any block chain described in FIGS. 2 to 4.
本申请实施例还提供一种存储介质,包括程序或指令,当所述程序或指令被执行时,用以执行上述图2至图4中任意所述的区块链中的交易执行方法。An embodiment of the present application also provides a storage medium including a program or instruction, when the program or instruction is executed, it is used to execute the transaction execution method in any block chain described in FIGS. 2 to 4.
最后应说明的是:本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、光学存储器等)上实施的计算机程序产品的形 式。Finally, it should be noted that those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program codes.
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。This application is described with reference to flowcharts and/or block diagrams of methods, equipment (systems), and computer program products according to this application. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the application without departing from the scope of the application. In this way, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application also intends to include these modifications and variations.

Claims (10)

  1. 一种区块链中的交易执行方法,其特征在于,适用于包括多个合约接口的智能合约;所述方法包括:A transaction execution method in a blockchain, characterized in that it is suitable for a smart contract including multiple contract interfaces; the method includes:
    针对待处理的N个交易中的任一个交易,确定所述交易在所述智能合约中对应的合约接口;根据所述合约接口的共享变量信息和所述交易的各变量信息,确定所述交易的共享变量;所述共享变量信息用于记录所述合约接口的共享变量;所述共享变量为至少两个合约接口均具有的变量;N为大于1的整数;For any one of the N transactions to be processed, determine the contract interface corresponding to the transaction in the smart contract; determine the transaction according to the shared variable information of the contract interface and the variable information of the transaction The shared variable information; the shared variable information is used to record the shared variable of the contract interface; the shared variable is a variable that has at least two contract interfaces; N is an integer greater than 1;
    根据所述N个交易的共享变量,确定并行执行的至少两个第一交易;所述至少两个第一交易对应不同的合约接口,且所述至少两个第一交易不具有相同的共享变量;According to the shared variables of the N transactions, determine at least two first transactions to be executed in parallel; the at least two first transactions correspond to different contract interfaces, and the at least two first transactions do not have the same shared variable ;
    并行执行所述至少两个第一交易。The at least two first transactions are executed in parallel.
  2. 如权利要求1所述的方法,其特征在于,所述确定所述交易在所述智能合约中对应的合约接口之后,所述确定所述交易的共享变量之前,还包括:The method according to claim 1, wherein after determining the contract interface corresponding to the transaction in the smart contract and before determining the shared variable of the transaction, the method further comprises:
    根据所述智能合约的合约地址和所述交易在所述智能合约中对应的合约接口,从共享变量合约中确定所述交易对应的共享变量信息;所述共享变量合约为记录智能合约的合约地址、合约接口及合约接口对应共享变量信息的合约。According to the contract address of the smart contract and the contract interface corresponding to the transaction in the smart contract, determine the shared variable information corresponding to the transaction from the shared variable contract; the shared variable contract records the contract address of the smart contract , Contract interface and contract interface correspond to contracts that share variable information.
  3. 如权利要求1或2所述的方法,其特征在于,还包括:The method of claim 1 or 2, further comprising:
    串行执行第二交易;所述第二交易为串行交易组合中的任一交易;所述串行交易组合为所述N个交易中除并行执行的交易之外的交易;The second transaction is executed serially; the second transaction is any transaction in a serial transaction combination; the serial transaction combination is a transaction other than the transactions executed in parallel among the N transactions;
    串行执行所述第二交易之后,若根据所述串行交易组合中尚未执行的交易的共享变量,确定存在并行执行的至少两个第三交易,则并行执行所述至少两个第三交易;所述至少两个第三交易对应不同的合约接口,且所述至少两个第三交易不具有相同的共享变量。After the second transaction is executed serially, if it is determined that there are at least two third transactions executed in parallel according to the shared variables of the transactions that have not been executed in the serial transaction combination, then the at least two third transactions are executed in parallel ; The at least two third transactions correspond to different contract interfaces, and the at least two third transactions do not have the same shared variable.
  4. 如权利要求3所述的方法,其特征在于,所述第二交易为所述串行交 易组合中公共交易个数最多的交易;其中,所述公共交易为所述串行交易组合中除该交易外的所有交易中,与该交易存在共享变量的交易。The method of claim 3, wherein the second transaction is the transaction with the largest number of public transactions in the serial transaction combination; wherein the public transaction is the serial transaction combination except the In all transactions other than the transaction, there is a transaction that shares variables with the transaction.
  5. 一种区块链中的交易执行装置,其特征在于,适用于包括多个合约接口的智能合约;所述装置包括:A transaction execution device in a blockchain, which is characterized in that it is suitable for smart contracts including multiple contract interfaces; the device includes:
    确定模块,用于针对待处理的N个交易中的任一个交易,确定所述交易在所述智能合约中对应的合约接口;根据所述合约接口的共享变量信息和所述交易的各变量信息,确定所述交易的共享变量;所述共享变量信息用于记录所述合约接口的共享变量;所述共享变量为至少两个合约接口均具有的变量;N为大于1的整数;The determining module is used to determine the contract interface corresponding to the transaction in the smart contract for any one of the N transactions to be processed; according to the shared variable information of the contract interface and the variable information of the transaction , Determine the shared variable of the transaction; the shared variable information is used to record the shared variable of the contract interface; the shared variable is a variable possessed by at least two contract interfaces; N is an integer greater than 1;
    处理模块,用于根据所述N个交易的共享变量,确定并行执行的至少两个第一交易,并行执行所述至少两个第一交易;所述至少两个第一交易对应不同的合约接口,且所述至少两个第一交易不具有相同的共享变量。The processing module is configured to determine at least two first transactions to be executed in parallel according to the shared variables of the N transactions, and to execute the at least two first transactions in parallel; the at least two first transactions correspond to different contract interfaces , And the at least two first transactions do not have the same shared variable.
  6. 如权利要求5所述的装置,其特征在于,所述确定模块还用于:The device according to claim 5, wherein the determining module is further configured to:
    根据所述智能合约的合约地址和所述交易在所述智能合约中对应的合约接口,从共享变量合约中确定所述交易对应的共享变量信息;所述共享变量合约为记录智能合约的合约地址、合约接口及合约接口对应共享变量信息的合约。According to the contract address of the smart contract and the contract interface corresponding to the transaction in the smart contract, determine the shared variable information corresponding to the transaction from the shared variable contract; the shared variable contract records the contract address of the smart contract , Contract interface and contract interface correspond to contracts that share variable information.
  7. 如权利要求5或6所述的装置,其特征在于,所述处理模块还用于:The device according to claim 5 or 6, wherein the processing module is further configured to:
    串行执行第二交易;所述第二交易为串行交易组合中的任一交易;所述串行交易组合为所述N个交易中除并行执行的交易之外的交易;The second transaction is executed serially; the second transaction is any transaction in a serial transaction combination; the serial transaction combination is a transaction other than the transactions executed in parallel among the N transactions;
    串行执行所述第二交易之后,若根据所述串行交易组合中尚未执行的交易的共享变量,确定存在并行执行的至少两个第三交易,则并行执行所述至少两个第三交易;所述至少两个第三交易对应不同的合约接口,且所述至少两个第三交易不具有相同的共享变量。After the second transaction is executed serially, if it is determined that there are at least two third transactions executed in parallel according to the shared variables of the transactions that have not been executed in the serial transaction combination, then the at least two third transactions are executed in parallel ; The at least two third transactions correspond to different contract interfaces, and the at least two third transactions do not have the same shared variable.
  8. 如权利要求7所述的装置,其特征在于,所述第二交易为所述串行交易组合中公共交易个数最多的交易;其中,公共交易为所述串行交易组合中除该交易外的所有交易中,与该交易存在共享变量的交易。The device of claim 7, wherein the second transaction is the transaction with the largest number of public transactions in the serial transaction combination; wherein the public transaction is the transaction except the transaction in the serial transaction combination Among all transactions in, there are transactions that share variables with this transaction.
  9. 一种计算机设备,其特征在于,包括程序或指令,当所述程序或指令被执行时,如权利要求1至4中任意一项所述的方法被执行。A computer device characterized by comprising a program or instruction, and when the program or instruction is executed, the method according to any one of claims 1 to 4 is executed.
  10. 一种存储介质,其特征在于,包括程序或指令,当所述程序或指令被执行时,如权利要求1至4中任意一项所述的方法被执行。A storage medium, characterized by comprising a program or instruction, and when the program or instruction is executed, the method according to any one of claims 1 to 4 is executed.
PCT/CN2020/106670 2019-08-13 2020-08-03 Method and apparatus for executing transaction in blockchain WO2021027612A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910744161.4A CN110490742B (en) 2019-08-13 2019-08-13 Transaction execution method and device in blockchain
CN201910744161.4 2019-08-13

Publications (1)

Publication Number Publication Date
WO2021027612A1 true WO2021027612A1 (en) 2021-02-18

Family

ID=68550868

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/106670 WO2021027612A1 (en) 2019-08-13 2020-08-03 Method and apparatus for executing transaction in blockchain

Country Status (2)

Country Link
CN (1) CN110490742B (en)
WO (1) WO2021027612A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110490742B (en) * 2019-08-13 2024-04-12 深圳前海微众银行股份有限公司 Transaction execution method and device in blockchain
CN111292192A (en) * 2020-02-18 2020-06-16 杭州复杂美科技有限公司 Transaction parallel execution method, device and storage medium
CN113867903B (en) * 2021-12-06 2022-04-01 深圳前海微众银行股份有限公司 Method and device for determining parallel conflict domain of intelligent contract in block chain

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108510389A (en) * 2018-03-30 2018-09-07 深圳前海微众银行股份有限公司 Intelligent contract call method, equipment and readable storage medium storing program for executing based on block chain
CN109636592A (en) * 2017-10-20 2019-04-16 北京航空航天大学 High-performance intelligence Contract Design
US20190228409A1 (en) * 2017-09-13 2019-07-25 Vijay Madisetti Transaction Pools Using Smart Contracts and Blockchains
CN110490742A (en) * 2019-08-13 2019-11-22 深圳前海微众银行股份有限公司 A kind of transaction in block chain executes method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10572361B2 (en) * 2017-04-28 2020-02-25 The Boeing Company Concurrent production use of a production enterprise system and testing of a modified enterprise system
CN107679857B (en) * 2017-10-10 2021-04-27 马晶瑶 Block chain cross-chain transaction method and storage medium
CN108537543B (en) * 2018-03-30 2023-07-28 百度在线网络技术(北京)有限公司 Parallel processing method, device, equipment and storage medium for blockchain data
CN108681565B (en) * 2018-04-28 2020-11-10 百度在线网络技术(北京)有限公司 Block chain data parallel processing method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190228409A1 (en) * 2017-09-13 2019-07-25 Vijay Madisetti Transaction Pools Using Smart Contracts and Blockchains
CN109636592A (en) * 2017-10-20 2019-04-16 北京航空航天大学 High-performance intelligence Contract Design
CN108510389A (en) * 2018-03-30 2018-09-07 深圳前海微众银行股份有限公司 Intelligent contract call method, equipment and readable storage medium storing program for executing based on block chain
CN110490742A (en) * 2019-08-13 2019-11-22 深圳前海微众银行股份有限公司 A kind of transaction in block chain executes method and device

Also Published As

Publication number Publication date
CN110490742B (en) 2024-04-12
CN110490742A (en) 2019-11-22

Similar Documents

Publication Publication Date Title
WO2021027612A1 (en) Method and apparatus for executing transaction in blockchain
EP3560143B1 (en) Data isolation in a blockchain network
TWI714847B (en) Method, device and electronic equipment for processing consensus request in blockchain consensus network
US10255108B2 (en) Parallel execution of blockchain transactions
WO2018214898A1 (en) Method and device for writing service data in block chain system
WO2021047541A1 (en) Method and device for obtaining transaction dependency relationship in blockchain
WO2021057482A1 (en) Method and device for generating bloom filter in blockchain
US10963854B2 (en) Blockchain-based electronic bill reimbursement method, apparatus, and electronic device
TW201901482A (en) Blockchain system and method of creating blockchain
US20190052709A1 (en) Clustered storage system synchronization
US20230275771A1 (en) Pre-execution of block chain transaction in parallel during block consensus
US20210263905A1 (en) Blockchain based hierarchical data storage
WO2022048358A1 (en) Data processing method and device, and storage medium
CN111163149B (en) Intelligent contract platform method based on block chain
US20200279309A1 (en) Blockchain-based electronic bill cancellation method, apparatus, and electronic device
US11017307B2 (en) Explanations generation with different cognitive values using generative adversarial networks
CN112258188B (en) Processing method, device, equipment and system for block chain transaction
US20200286090A1 (en) Blockchain-based reimbursement splitting
US10891615B1 (en) Transaction exchange platform having streaming transaction data and microservices
WO2023078097A1 (en) Blockchain attack interception method and apparatus
CN110879900A (en) Data processing method and device based on block chain system
CN110046172A (en) In line computation data processing method and system
CN111581108B (en) Input data acquisition method and device based on business system transaction test
CN113506035A (en) Method, device and equipment for determining approval process
US8856069B2 (en) Combined save and validation logic

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: 20853238

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20853238

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 03/08/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20853238

Country of ref document: EP

Kind code of ref document: A1