WO2023070924A1 - Blockchain transaction processing method and system - Google Patents

Blockchain transaction processing method and system Download PDF

Info

Publication number
WO2023070924A1
WO2023070924A1 PCT/CN2021/141180 CN2021141180W WO2023070924A1 WO 2023070924 A1 WO2023070924 A1 WO 2023070924A1 CN 2021141180 W CN2021141180 W CN 2021141180W WO 2023070924 A1 WO2023070924 A1 WO 2023070924A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
pool
standard
point
current
Prior art date
Application number
PCT/CN2021/141180
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 WO2023070924A1 publication Critical patent/WO2023070924A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3226Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using a predetermined code, e.g. password, passphrase or PIN
    • H04L9/3228One-time or temporary data, i.e. information which is sent for every authentication or authorization, e.g. one-time-password, one-time-token or one-time-key
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/56Financial cryptography, e.g. electronic payment or e-cash
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Definitions

  • the invention relates to the technical field of block chains, in particular to a fragmentation and calling method of a block chain transaction pool.
  • the transaction of the blockchain system refers to a piece of request data sent to the blockchain system, which can be used to deploy smart contracts, call smart contract interfaces, maintain the life cycle of smart contracts, and manage assets and value exchanges.
  • the transaction is mainly composed of four parts: sender, receiver, transaction data and transaction signature, which is the basis of various applications of the blockchain system.
  • the user needs to use his own private key to sign the transaction created by himself, and then send the signed transaction to the blockchain, and then complete the consensus processing by multiple nodes of the blockchain system , and then execute the smart contract code related to the transaction to generate the status data specified by the transaction. Finally, the accounting node packs the transaction into the newly released block and stores it together with the status data. So far, the transaction has been confirmed by the blockchain system, and the confirmed transaction is considered to have both consistency and transactionality.
  • the blockchain transaction pool (TxPool transaction buffer pool) is used to temporarily store transactions that have not been added to the block (including transactions created by this node and transactions broadcast by other nodes). On the one hand, it is necessary to check the legitimacy of all submitted transactions; on the other hand, select legal transactions from them to be confirmed by the consensus mechanism of the blockchain system, and all pending legal transactions need to be cached. As the core component of the blockchain system, the transaction pool participates in the entire life cycle from transaction issuance to on-chain. Therefore, the performance of the transaction pool directly affects the performance of the blockchain system.
  • the resource scheduling of the blockchain transaction pool exists in the entire life cycle of each transaction from issuance to on-chain (including: RPC thread, Sync thread, Channel thread, Verify thread and packaged threads, etc).
  • RPC thread Sync thread
  • Channel thread Verify thread and packaged threads, etc.
  • the packaging process of the consensus module needs to obtain the read lock of the transaction pool (locked in shared mode) , extract the transaction from it for execution, when the transaction is executed and the block is obtained, obtain the write lock (locked in exclusive mode), and delete the packaged transaction from the transaction pool.
  • the patent with the publication number CN110599136A provides a method for controlling the flow of a blockchain transaction pool.
  • the Each user in the user set is respectively configured with a traffic threshold associated with the transaction pool to provide an overall utilization rate of the transaction pool.
  • FISCO BCOS optimizes the performance of the transaction pool by splitting and executing transaction verification tasks in parallel and asynchronous transaction notification strategies to optimize the efficiency of transaction pipeline processing.
  • the existing blockchain transaction pool performs read or write operations through threads, and threads are the basic unit of independent operation and scheduling.
  • the existing blockchain system has one and only one complete transaction pool, which is scheduled through read-write locks. In order to maintain data consistency, each operation needs to lock or unlock the transaction pool as a whole. Due to the use of a large number of Locks cause blocking between multiple operations.
  • the present invention provides a processing method for blockchain transactions, including:
  • Fragmentation step Divide the blockchain transaction pool into X standard transaction pools S i ; where X is a positive integer; 2 ⁇ i ⁇ X;
  • Calling step call 1 to X-1 of the standard transaction pool S i according to the feature value of the current transaction T j to complete the current transaction T j .
  • the fragmentation step includes:
  • Quantity determination determine the quantity X of the standard transaction pool S i ;
  • Mapping block perform hash operation on the unique identifier of each standard transaction pool S i , and map the unique identifier of each standard transaction pool S i to point A i on the hash ring, so as to block
  • the blockchain transaction pool is divided into X standard transaction pools S i .
  • the calling step includes:
  • Characteristic value generation generate the characteristic value of the current transaction T j ;
  • Mapping fixed point perform hash operation on the Nonce value of the current transaction T j , and map the current transaction T j to the point B j on the hash ring;
  • Judgment call according to the positions of points A i and B j , call 1 to X-1 of the standard transaction pool S i to complete the current transaction T j .
  • step of judging the call includes:
  • the step of invoking the standard transaction pool S i corresponding to the point A i to complete the current transaction if it coincides includes:
  • the steps to complete the current transaction include:
  • the calling of 1 to X-1 of the standard transaction pool S i , before completing the current transaction T j further includes the steps of:
  • the step of calling 1 to X-1 of the standard transaction pool Si to complete the current transaction Tj is not performed.
  • the step of judging whether the current transaction T j is a valid transaction includes:
  • the step of judging whether the current transaction T j is a valid transaction includes:
  • the present invention also provides a processing system for blockchain transactions, including:
  • the fragmentation module is used to divide the blockchain transaction pool into X standard transaction pools S i ; where X is a positive integer; 2 ⁇ i ⁇ X;
  • the calling module is connected with the sharding module, and is used to call 1 to X-1 of the standard transaction pool S i according to the characteristic value of the current transaction T j to complete the current transaction T j .
  • the fragmentation module includes:
  • Quantity determination unit used to determine the quantity X of the standard transaction pool S i ;
  • An identifier matching unit connected to the quantity determination unit, for matching a one-to-one unique identifier for each of the standard transaction pools S i ;
  • the mapping block unit is connected with the identification matching unit, and is used to perform a hash operation on the unique identification of each standard transaction pool S i , and map the unique identification of each standard transaction pool S i to the hash Point A i on the Greek ring to divide the blockchain transaction pool into X standard transaction pools S i .
  • the calling module includes:
  • a characteristic value generating unit configured to generate the characteristic value of the current transaction T j ;
  • a mapping fixed-point unit is connected with the characteristic value generating unit, and is used to perform a hash operation on the Nonce value of the current transaction T j , and map the current transaction T j to a point B j on the hash ring;
  • Judgment calling unit connected with the mapping block unit and mapping fixed-point unit, used to call 1 to X-1 of the standard transaction pool S i according to the positions of points A i and B j , and complete the current Transaction T j .
  • processing system is configured to execute any of the above processing methods.
  • the method and system for processing block chain transactions adopts the idea of divide and conquer, and proposes an improvement to the fragmentation of the transaction pool structure, and divides a single complete large block chain transaction pool into several small fragments.
  • the standard transaction pool according to the characteristic value of the current transaction, calls the appropriate small standard transaction pool to complete the processing, and controls the thread's competition for the read-write lock of the transaction pool within the limited range of the small standard transaction pool, and locks or unlocks the read-write lock During operation, there is no need to lock or unlock the read-write lock for the entire large blockchain transaction pool, avoiding the congestion problem between multiple operations, effectively reducing the frequency of conflicts, improving transaction throughput, and thus improving transaction
  • the overall processing efficiency of the pool improves the overall performance of the blockchain system.
  • Figure 1 is a schematic diagram of the transaction pool of Ethereum
  • Fig. 2 is the flowchart of an embodiment of the processing method of block chain transaction of the present invention
  • Fig. 3 is a schematic diagram of division of the marked transaction pool of the present invention.
  • Fig. 4 is the flow chart of step S1 of the processing method of block chain transaction of the present invention.
  • Figure 5 is a schematic diagram of the blockchain transaction pool divided into 4 standard transaction pools and mapped to the hash ring;
  • Fig. 6 is the flow chart of step S2 of the processing method of block chain transaction of the present invention.
  • Figures 7-8 are two schematic diagrams of the standard transaction pool and the position of transactions on the hash ring in the present invention.
  • FIG. 9 is a flowchart of step S23 of the processing method of blockchain transactions of the present invention.
  • FIG. 10 is a flowchart of an embodiment of step S23b of the method for processing blockchain transactions of the present invention.
  • FIG. 11 is a flow chart of another embodiment of step S23b of the method for processing blockchain transactions of the present invention.
  • Fig. 12 is a flowchart of step S0 of the processing method of blockchain transactions of the present invention.
  • FIG. 13 is a flowchart of an embodiment of step S01 of the method for processing blockchain transactions of the present invention.
  • FIG. 14 is a flow chart of another embodiment of step S01 of the method for processing blockchain transactions of the present invention.
  • Fig. 15 is a structural block diagram of an embodiment of the blockchain transaction processing system of the present invention.
  • S1 Divide a blockchain transaction pool Pool into X standard transaction pools (SubPool i , hereinafter referred to as S i ); where X is a positive integer; 2 ⁇ i ⁇ X.
  • the shard transaction pool system is optional but limited to include a blockchain transaction pool (shard transaction pool) and several standard transaction pools and other entities.
  • the roles and functions of each entity in the two-tier transaction pool system are introduced in detail as follows: 1.
  • Fragmented transaction pool The interface of this pool is the same as that of a common transaction pool.
  • the sharded transaction pool has two key components: (1) The transaction pool sharding device, which is optional but not limited to a transaction pool sharding algorithm based on a consistent hash ring. Since the transaction hash has a better Discrete, the transactions in the transaction pool have a better balance, which can achieve a more even distribution of transactions in each standard transaction pool; (2) transaction pool transaction merging device, which is mainly required for transaction sorting and acquisition of shard transaction pools Used to implement a first-in-first-out sorting method. In the public chain mode, the merger device also needs to sort the transactions based on the maximum yield. In addition, the device constructs a global transaction priority queue, which is used to realize the transaction sorting method for different standard transaction pools.
  • Standard transaction pool The X standard transaction pools are consistent and meet all the routine transaction processing procedures of the blockchain, which are related to the network module and consensus algorithm adopted by the specific blockchain, including writing to a separate standard transaction pool and ordering transactions , Read, delete several standard interfaces.
  • the block chain transaction processing method of the present invention adopts the idea of divide and conquer, proposes an improvement to the fragmentation of the transaction pool structure, and divides a single complete large block chain transaction pool into fragments
  • For several small standard transaction pools call the appropriate small standard transaction pool according to the characteristic value of the current transaction to complete the processing, and control the thread's read-write lock competition for the transaction pool within the limited small standard transaction pool.
  • the lock or unlock operation there is no need to lock or unlock the entire large blockchain transaction pool, which avoids the congestion problem between multiple operations, effectively reduces the frequency of conflicts, and improves transaction throughput. Thereby improving the overall processing efficiency of the transaction pool, thereby improving the overall performance of the blockchain system.
  • step S1 the dividing step may optionally include but is not limited to:
  • the number X is an empirical value, which can be optionally but not limited to be set freely in advance by those skilled in the art according to the core number N of the node's own CPU, that is, the parallel processing capability, preferably an integer equal to N/3. More specifically, the quantity X can be preset and directly input through the input device; or can be calculated according to the current situation.
  • each divided standard transaction pool S i (2 ⁇ i ⁇ X) match a one-to-one unique identifier.
  • it is optional but not limited to create an index ID i similar to an ID card for each standard transaction pool S i of the X standard transaction pools, as the unique identifier of the corresponding standard transaction pool.
  • Prefix represents the prefix of the transaction pool, which is optional but not limited to the host name or IP address of the node; i represents the i-th standard transaction pool, and is the serial number marked by X standard transaction pools.
  • S13 Perform a hash operation on the unique identifier of each standard transaction pool to map the unique identifier of each standard transaction pool S i (optional but not limited to index ID i ) to point A i on the hash ring (As shown in Figure 5, it is a schematic diagram of four standard transaction pools, A 1 -A 4 are respectively mapped to S 1 -S 4 ). Specifically, taking the unique identifier as index ID i as an example, Hash(IDi) is calculated, and all unique identifiers matching X standard transaction pools are mapped to the hash ring one by one.
  • index ID 1 .., ID i , .., ID x of all standard transaction pools S 1 , .., S i , .., S x as consistent hash operations in sequence
  • the input of the function Hash is mapped to the [0,2 32 -1] numerical space through Hash(IDi), and the intervals of the output results are connected end to end to form a clockwise-growing hash ring, as shown in Figure 5 (4 Schematic diagram of the hash ring formed after the division of standard transaction pools). More specifically, the hash operation Hash used during the period is optional but not limited to MurmurHash.
  • step S1 is, how to divide a complete large blockchain transaction pool Pool into multiple small standard transaction pools S i .
  • the consistent hash ring maps all the standard transaction pools to the numerical space of [0,2 32 -1] through the consistent hash algorithm, and then connects this numerical space end to end to form a hash ring, which not only solves the problem of standard
  • the one-to-one correspondence of the transaction pool avoids confusion and errors; and because the hash algorithm has better discreteness, the standard transaction pool has a better balance, which can make subsequent transactions more evenly distributed among standard transactions in the pool.
  • step S2 is optional but not limited to, including:
  • S21 Generate feature values of the current transaction (Transaction j , T j for short). Specifically, it is optional but not limited to adopting the Nonce value of the current transaction T j or the hash value of the current transaction T j itself as the characteristic value. Specifically, those skilled in the art may optionally, but not limited to, use a local UUID generator to generate a Nonce value for the new candidate transaction, that is, the current transaction. It is worth noting that, like each standard transaction pool, the Nonce value and hash value also have a unique identifier for each new candidate transaction, which can be applied to subsequent hash operations to convert each current transaction T j , are all mapped to a fixed point on the hash ring.
  • S22 Perform a hash operation on the characteristic value of the current transaction T j , that is, the above-mentioned determined Nonce value or hash value, so as to map the current transaction T j to the point B j on the hash ring.
  • the position B j of the current transaction T j on the hash ring coincides with the standard transaction pool S 2 , that is, Into the jurisdiction of the standard transaction pool S2 , priority is given to calling the standard transaction pool S2 to complete the transaction. More specifically, optional but not limited to, it is also necessary to consider whether the number of transactions in the standard transaction pool S i exceeds the set threshold. If it exceeds, it needs to wait or call its two adjacent standard transaction pools S i+1 , S i-1 (that is, calling S 1 or S 3 as shown in Figure 5 ), if not exceeded, directly call the standard transaction pool S i (S 2 ) to complete the transaction.
  • the position B j of the current transaction T j on the hash ring does not coincide with the position of any standard transaction pool S i , but is located on an arc formed by A 3 and A 2 . Then we can select any one of S 3 and S 2 corresponding to A 3 and A 2 to complete the current transaction by looking up the table. Of course, it is also necessary to consider whether the number of transactions in the two standard transaction pools S3 and S2 exceeds the set threshold.
  • the above S23 may optionally include, but is not limited to:
  • the processing method of the present invention is given.
  • processing the current transaction how to call a certain standard transaction pool S i in a balanced manner among X standard transaction pools to complete the current transaction.
  • each current transaction T j can be discretely allocated to X standard transaction pools S i , to further ensure the locking or unlocking of read-write locks During operation, there is no need to lock or unlock the read-write lock for the entire large blockchain transaction pool, avoiding the congestion problem between multiple operations, effectively reducing the frequency of conflicts, improving transaction throughput, and thus improving transaction
  • the overall processing efficiency of the pool improves the overall performance of the blockchain system.
  • step S23b may also optionally include, but is not limited to:
  • step S23c may also optionally include, but is not limited to:
  • step S23c5 If it exceeds the set threshold, wait and return to step S23c1 until the transaction quantity of one of the standard transaction pools S i and S i-1 does not exceed the set threshold, then call it to complete the current transaction. It is worth noting that which one or several of the standard transaction pools to call above, as well as the call priority level, only give the above example, but not limited to this specific embodiment, those skilled in the art can according to actual needs, such as Arbitrary settings such as the threshold size of the transaction quantity and the waiting time requirement. For example, you can only call the standard transaction pool S i , you can also call S i , S i-1 or even involve S i+1 , S i+2 , and S i-2 . It is judged clockwise first and then There is no restriction on whether to judge counterclockwise, or whether to judge counterclockwise first and then judge clockwise.
  • step S23b in another embodiment, may also optionally but not limited to include:
  • step S23b7' If it exceeds the set threshold, wait and return to step S23b1' until the transaction quantity of one of the standard transaction pools S i , S i+1 , and S i-1 does not exceed the set threshold, then call it to complete current transaction. It is worth noting that which one or several of the standard transaction pools to call above, as well as the call priority level, only give the above example, but not limited to this specific embodiment, those skilled in the art can according to actual needs, such as Arbitrary settings such as the threshold size of the transaction quantity and the waiting time requirement.
  • the order of priority such as judging clockwise first and then counterclockwise, or judging counterclockwise first and then clockwise, is not limited.
  • the method for processing blockchain transactions in the present invention may also optionally, but not limited to, include step S0 :include:
  • steps S01-S03 of judging whether the current transaction is a valid transaction are optional but not limited to being set before or during step S1 or S2, as long as it is before calling the standard transaction pool to complete the current transaction.
  • step S01 is optional but not limited to, including:
  • step S01 optionally but not limited to, includes:
  • the step of judging whether the current transaction T j is valid may optionally but not limited to include judging whether it is a legal transaction or a repeated transaction.
  • judging whether it is a legal transaction or a repeated transaction Those skilled in the art can understand that one of the judgments of legal transactions and repeated transactions can be selected, or a combination of the two, or involve more evaluation indicators for judging whether the transaction is a valid transaction.
  • the determination order and criteria can be arbitrarily set by those skilled in the art according to actual requirements.
  • the present invention also provides a blockchain transaction processing system based on the above processing method, including:
  • the fragmentation module 100 is used to divide the blockchain transaction pool into X standard transaction pools S i ; where X is a positive integer; 2 ⁇ i ⁇ X;
  • the calling module 200 is connected with the sharding module 100, and is used to call 1 to X-1 of the standard transaction pool S i according to the characteristic value of the current transaction T j to complete the current transaction T j .
  • the fragmentation module 100 may optionally include, but is not limited to:
  • a quantity determination unit 110 configured to determine the quantity X of the standard transaction pool S i ;
  • the identification matching unit 120 is connected with the quantity determination unit 110, and is used for matching a one-to-one unique identification for each standard transaction pool S i ;
  • the mapping block unit 130 is connected with the identification matching unit 120, and is used for hashing the unique identification of each standard transaction pool S i , and mapping the unique identification of each standard transaction pool S i to the hash ring. Point A i to divide the blockchain transaction pool into X standard transaction pools S i .
  • calling module 200 may optionally but not be limited to include:
  • a feature value generating unit 210 configured to generate a feature value of the current transaction T j ;
  • the mapping fixed-point unit 220 is connected with the characteristic value generating unit 210, and is used for performing a hash operation on the Nonce value of the current transaction T j , and mapping the current transaction T j to the point B j on the hash ring;
  • the judgment call unit 230 is connected with the mapping block unit 130 and the mapping fixed-point unit 220, and is used to call 1 to X-1 in the standard transaction pool S i for the current transaction T j according to the positions of points A i and B j , to complete the current transaction T j .
  • modules and units are functional divisions of the processing system of the blockchain transaction of the present invention, and do not substantially separate its structure and unit modules. The execution of the device is completed.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Signal Processing (AREA)
  • Development Economics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The present invention relates to a blockchain transaction processing method and system. The core of the invention is that fragmentation improvement of a blockchain transaction pool structure is provided by using the thought of divide and conquer, a single complete large blockchain transaction pool is divided into several small standard transaction pools, and a proper small standard transaction pool is called according to a feature value of a current transaction to complete processing. Readers-writer lock competition of a thread to the transaction pool is controlled within a defined small standard transaction pool range, and in the locking or unlocking operation of a readers-writer lock, the locking or unlocking operation of the readers-writer lock does not need to be performed on the whole large blockchain transaction pool, such that the congestion problem among a plurality of operations is avoided, the conflict frequency can be effectively reduced, and the transaction throughput is improved, thereby improving the overall processing efficiency of the transaction pool, and further improving the overall performance of a blockchain system.

Description

区块链交易的处理方法和系统Method and system for processing blockchain transactions 技术领域technical field
本发明涉及区块链技术领域,特别是涉及一种区块链交易池的分片及调用方法。The invention relates to the technical field of block chains, in particular to a fragmentation and calling method of a block chain transaction pool.
背景技术Background technique
区块链系统的交易是指发给区块链系统的一段请求数据,可用于部署智能合约,调用智能合约接口,维护智能合约的生命周期,以及管理资产和价值交换。交易主要由发送者、接受者、交易数据和交易签名四部分组成,是区块链系统各种应用的基础。The transaction of the blockchain system refers to a piece of request data sent to the blockchain system, which can be used to deploy smart contracts, call smart contract interfaces, maintain the life cycle of smart contracts, and manage assets and value exchanges. The transaction is mainly composed of four parts: sender, receiver, transaction data and transaction signature, which is the basis of various applications of the blockchain system.
以用户发起的交易为例,首先,用户需要用自己的私钥给自己创建的交易签名,然后把签名后的交易发送到区块链上,接着由区块链系统的多个节点完成共识处理,随后执行交易相关的智能合约代码,生成交易指定的状态数据,最后,由记账节点将交易打包到新发布区块里,和状态数据一起落盘存储。至此,该交易被区块链系统确认,而被确认的交易被认为同时具备了一致性和事务性。Taking the transaction initiated by the user as an example, first, the user needs to use his own private key to sign the transaction created by himself, and then send the signed transaction to the blockchain, and then complete the consensus processing by multiple nodes of the blockchain system , and then execute the smart contract code related to the transaction to generate the status data specified by the transaction. Finally, the accounting node packs the transaction into the newly released block and stores it together with the status data. So far, the transaction has been confirmed by the blockchain system, and the confirmed transaction is considered to have both consistency and transactionality.
区块链交易池(TxPool交易缓冲池),用来暂存未被加入到区块的交易(包括本节点创建的交易和其他节点广播过来的交易)。一方面,需要检验所有提交交易的合法性,另一方面,然后从中选择合法交易交由区块链系统的共识机制确认,并需要缓存所有待处理的合法交易。交易池作为区块链系统的核心部件,在交易发出到上链的整个生命周期里都有交易池的参与,因此,交易池的性能直接影响区块链系统性能。The blockchain transaction pool (TxPool transaction buffer pool) is used to temporarily store transactions that have not been added to the block (including transactions created by this node and transactions broadcast by other nodes). On the one hand, it is necessary to check the legitimacy of all submitted transactions; on the other hand, select legal transactions from them to be confirmed by the consensus mechanism of the blockchain system, and all pending legal transactions need to be cached. As the core component of the blockchain system, the transaction pool participates in the entire life cycle from transaction issuance to on-chain. Therefore, the performance of the transaction pool directly affects the performance of the blockchain system.
如图1所示(以太坊的交易池),区块链交易池的资源调度存在于每条交易从发出到上链的全生命周期里(包括:RPC线程,Sync线程,Channel线程,Verify线程和打包线程等)。例如,网络接收到一个待打包的交易,需要获取交易池的写锁(独占模式锁住),然后将交易写入交易池中,共识模块打包过程需要获取交易池读锁(共享模式锁住),从中提取交易进行执行,当交易执行完并 获得区块后,获取写锁(独占模式锁住),从交易池中删除已打包交易。但是,现有方法在该过程,对交易池整体频繁使用读写锁,导致交易池的锁竞争成为系统“热点”,制约了区块链系统的整体性能的进一步提升。尤其是,制约区块链系统交易吞吐率的提升(transaction-per-second,TPS每秒处理的交易的次数)随着用户量和交易量的增加,低TPS已经不能满足需求,成为制约区块链系统性能提升的瓶颈。As shown in Figure 1 (Ethereum’s transaction pool), the resource scheduling of the blockchain transaction pool exists in the entire life cycle of each transaction from issuance to on-chain (including: RPC thread, Sync thread, Channel thread, Verify thread and packaged threads, etc). For example, when the network receives a transaction to be packaged, it needs to obtain the write lock of the transaction pool (locked in exclusive mode), and then write the transaction into the transaction pool. The packaging process of the consensus module needs to obtain the read lock of the transaction pool (locked in shared mode) , extract the transaction from it for execution, when the transaction is executed and the block is obtained, obtain the write lock (locked in exclusive mode), and delete the packaged transaction from the transaction pool. However, the existing methods frequently use read-write locks on the entire transaction pool during this process, causing the lock competition in the transaction pool to become a "hot spot" in the system, which restricts the further improvement of the overall performance of the blockchain system. In particular, it restricts the improvement of the transaction throughput rate of the blockchain system (transaction-per-second, the number of transactions processed by TPS per second). With the increase in the number of users and transactions, low TPS can no longer meet the demand and become a restrictive block. The bottleneck of chain system performance improvement.
为了提升TPS,业界提出了不同的交易池优化方案。公开号为CN110599136A的专利,提供了一种区块链交易池流量管控的方法,通过获取区块链节点对应的用户集合,以及所述区块链节点对应的交易池的最大缓存容量,为所述用户集合中的每个用户分别配置与所述交易池关联的流量阈值,用以提供交易池的整体利用率。FISCO BCOS对交易池性能的优化采用拆分且并行执行交易验证任务、交易异步通知策略来优化交易流水线处理效率。In order to improve TPS, the industry has proposed different transaction pool optimization schemes. The patent with the publication number CN110599136A provides a method for controlling the flow of a blockchain transaction pool. By obtaining the user set corresponding to the blockchain node and the maximum cache capacity of the transaction pool corresponding to the blockchain node, the Each user in the user set is respectively configured with a traffic threshold associated with the transaction pool to provide an overall utilization rate of the transaction pool. FISCO BCOS optimizes the performance of the transaction pool by splitting and executing transaction verification tasks in parallel and asynchronous transaction notification strategies to optimize the efficiency of transaction pipeline processing.
现有区块链交易池进行读操作或写操作都是通过线程实现的,线程作为独立运行和调度的基本单位。现有的区块链系统有且仅有一个完整的交易池,通过读写锁进行调度,为了保持数据的一致性,每个操作都需要对交易池整体进行加锁或解锁,由于使用大量的锁导致多个操作之间产生堵塞。The existing blockchain transaction pool performs read or write operations through threads, and threads are the basic unit of independent operation and scheduling. The existing blockchain system has one and only one complete transaction pool, which is scheduled through read-write locks. In order to maintain data consistency, each operation needs to lock or unlock the transaction pool as a whole. Due to the use of a large number of Locks cause blocking between multiple operations.
因此,如何优化区块链交易池,以提升交易吞吐率、避免频繁读写锁,进而提升区块链系统的整体性能,是目前区块链技术领域亟待解决的技术问题。Therefore, how to optimize the blockchain transaction pool to improve transaction throughput, avoid frequent read-write locks, and then improve the overall performance of the blockchain system is a technical problem that needs to be solved urgently in the field of blockchain technology.
发明内容Contents of the invention
为解决上述技术问题,本发明提供一种区块链交易的处理方法,包括:In order to solve the above technical problems, the present invention provides a processing method for blockchain transactions, including:
分片步骤:将区块链交易池,划分为X个标准交易池S i;其中X为正整数;2≤i≤X; Fragmentation step: Divide the blockchain transaction pool into X standard transaction pools S i ; where X is a positive integer; 2≤i≤X;
调用步骤:根据当前交易T j的特征值,调用所述标准交易池S i中的1至X-1个,完成所述当前交易T jCalling step: call 1 to X-1 of the standard transaction pool S i according to the feature value of the current transaction T j to complete the current transaction T j .
进一步地,所述分片步骤,包括:Further, the fragmentation step includes:
数量确定:确定标准交易池S i的数量X; Quantity determination: determine the quantity X of the standard transaction pool S i ;
标识匹配:为每个所述标准交易池S i,匹配一一对应的唯一标识; Identification matching: for each standard transaction pool S i , match a one-to-one unique identification;
映射分块:将每个所述标准交易池S i的唯一标识,作哈希运算,将每个所述标准交易池S i的唯一标识映射至哈希环上的点A i,以将区块链交易池,划分为X个标准交易池S iMapping block: perform hash operation on the unique identifier of each standard transaction pool S i , and map the unique identifier of each standard transaction pool S i to point A i on the hash ring, so as to block The blockchain transaction pool is divided into X standard transaction pools S i .
进一步地,所述调用步骤,包括:Further, the calling step includes:
特征值生成:生成所述当前交易T j的特征值; Characteristic value generation: generate the characteristic value of the current transaction T j ;
映射定点:将所述当前交易T j的Nonce值,作哈希运算,将所述当前交易T j映射至哈希环上的点B jMapping fixed point: perform hash operation on the Nonce value of the current transaction T j , and map the current transaction T j to the point B j on the hash ring;
判断调用:根据点A i和B j的位置,调用所述标准交易池S i中的1至X-1个,完成所述当前交易T jJudgment call: according to the positions of points A i and B j , call 1 to X-1 of the standard transaction pool S i to complete the current transaction T j .
进一步地,所述判断调用的步骤,包括:Further, the step of judging the call includes:
判断点B j的位置是否与点A i的位置重合; Determine whether the position of point B j coincides with the position of point A i ;
若重合,则调用点A i所对应的标准交易池S i,完成当前交易; If they coincide, call the standard transaction pool S i corresponding to point A i to complete the current transaction;
若不重合,则调用与点B j顺时针方向最近的点A i所对应的标准交易池S i或与点B j逆时针方向最近的点A i-1所对应的标准交易池S i-1,完成当前交易。 If they do not overlap, call the standard transaction pool S i corresponding to the point A i closest to point B j in the clockwise direction or the standard transaction pool S i-1 corresponding to the point A i-1 closest to point B j in the counterclockwise direction 1 , to complete the current transaction.
进一步地,所述若重合,则调用点A i所对应的标准交易池S i,完成当前交易的步骤,包括: Further, the step of invoking the standard transaction pool S i corresponding to the point A i to complete the current transaction if it coincides includes:
若重合,则判断标准交易池S i的交易数量是否超过设定阈值; If they overlap, it is judged whether the number of transactions in the standard transaction pool S i exceeds the set threshold;
若未超过设定阈值,则调用标准交易池S i,完成当前交易; If the set threshold is not exceeded, call the standard transaction pool S i to complete the current transaction;
若超过设定阈值,则等待,并再次判断标准交易池S i的交易数量是否超过设定阈值,直到标准交易池S i的交易数量未超过设定阈值,完成当前交易。 If it exceeds the set threshold, wait, and judge again whether the transaction quantity of the standard transaction pool S i exceeds the set threshold, until the transaction quantity of the standard transaction pool S i does not exceed the set threshold, and complete the current transaction.
进一步地,所述若不重合,则调用与点B j顺时针方向最近的点A i所对应的标准交易池S i或与点B j逆时针方向最近的点A i-1所对应的标准交易池S i-1,完成当前交易的步骤,包括: Further, if there is no coincidence , call the standard transaction pool S i corresponding to the point A i closest to point B j in the clockwise direction or the standard transaction pool S i-1 corresponding to the point A i-1 closest to point B j in the counterclockwise direction Transaction pool S i-1 , the steps to complete the current transaction include:
若不重合,则判断与点B j顺时针方向最近的点A i所对应的标准交易池S i的交易数量,是否超过设定阈值; If they do not overlap, it is judged whether the transaction quantity of the standard transaction pool S i corresponding to the point A i closest to the point B j in the clockwise direction exceeds the set threshold;
若未超过设定阈值,则调用标准交易池S i,完成当前交易; If the set threshold is not exceeded, call the standard transaction pool S i to complete the current transaction;
若超过设定阈值,则判断与点B j逆时针方向最近的点A i-1所对应的标准交易池S i-1的交易数量,是否超过设定阈值; If it exceeds the set threshold, it is judged whether the transaction quantity of the standard transaction pool S i-1 corresponding to the point A i-1 closest to point B j in the counterclockwise direction exceeds the set threshold;
若未超过设定阈值,则调用标准交易池S i-1,完成当前交易; If the set threshold is not exceeded, call the standard transaction pool S i-1 to complete the current transaction;
若超过设定阈值,则等待,并返回若不重合,则判断与点B j顺时针方向最近的点A i所对应的标准交易池S i的交易数量,是否超过设定阈值的步骤,直到标准交易池S i、S i-1的其中一个的交易数量未超过设定阈值,则调用其完成当前交易。 If it exceeds the set threshold, wait, and return to the step of judging whether the transaction quantity of the standard transaction pool S i corresponding to the point A i closest to point B j in the clockwise direction exceeds the set threshold if it does not overlap, until If the number of transactions in one of the standard transaction pools S i and S i-1 does not exceed the set threshold, it is called to complete the current transaction.
进一步地,所述调用所述标准交易池S i中的1至X-1个,完成所述当前交易T j之前,还包括步骤: Further, the calling of 1 to X-1 of the standard transaction pool S i , before completing the current transaction T j , further includes the steps of:
判断所述当前交易T j是否为有效交易; Judging whether the current transaction T j is a valid transaction;
若所述当前交易Tj为有效交易,则进行调用所述标准交易池Si中的1至X-1个,完成所述当前交易Tj的步骤;If the current transaction Tj is a valid transaction, call 1 to X-1 of the standard transaction pool Si to complete the step of the current transaction Tj;
若所述当前交易Tj不为有效交易,则不进行调用所述标准交易池Si中的1至X-1个,完成所述当前交易Tj的步骤。If the current transaction Tj is not a valid transaction, the step of calling 1 to X-1 of the standard transaction pool Si to complete the current transaction Tj is not performed.
进一步地,所述判断所述当前交易T j是否为有效交易的步骤,包括: Further, the step of judging whether the current transaction T j is a valid transaction includes:
判断所述当前交易T j是否合法; Judging whether the current transaction T j is legal;
若不合法,则判定所述当前交易T j不为有效交易; If it is not legal, it is determined that the current transaction T j is not a valid transaction;
若合法,则判定所述当前交易T j为有效交易。 If it is legal, it is determined that the current transaction T j is a valid transaction.
进一步地,所述判断所述当前交易T j是否为有效交易的步骤,包括: Further, the step of judging whether the current transaction T j is a valid transaction includes:
判断所述当前交易T j是否合法; Judging whether the current transaction T j is legal;
若不合法,则判定所述当前交易T j不为有效交易; If it is not legal, it is determined that the current transaction T j is not a valid transaction;
若合法,则继续判断所述当前交易T j是否为重复交易; If legal, continue to judge whether the current transaction T j is a repeated transaction;
若为重复交易,则判定所述当前交易T j不为有效交易; If it is a repeated transaction, it is determined that the current transaction T j is not a valid transaction;
若不为重复交易,则判定所述当前交易T j为有效交易。 If it is not a repeated transaction, it is determined that the current transaction T j is a valid transaction.
另一方面,本发明还提供一种区块链交易的处理系统,包括:On the other hand, the present invention also provides a processing system for blockchain transactions, including:
分片模块,用于将区块链交易池,划分为X个标准交易池S i;其中X为正整数;2≤i≤X; The fragmentation module is used to divide the blockchain transaction pool into X standard transaction pools S i ; where X is a positive integer; 2≤i≤X;
调用模块,与所述分片模块连接,用于根据当前交易T j的特征值,调用所述标准交易池S i中的1至X-1个,完成所述当前交易T jThe calling module is connected with the sharding module, and is used to call 1 to X-1 of the standard transaction pool S i according to the characteristic value of the current transaction T j to complete the current transaction T j .
进一步地,所述分片模块,包括:Further, the fragmentation module includes:
数量确定单元,用于确定标准交易池S i的数量X; Quantity determination unit, used to determine the quantity X of the standard transaction pool S i ;
标识匹配单元,与所述数量确定单元连接,用于为每个所述标准交易池S i,匹配一一对应的唯一标识; An identifier matching unit, connected to the quantity determination unit, for matching a one-to-one unique identifier for each of the standard transaction pools S i ;
映射分块单元,与所述标识匹配单元连接,用于将每个所述标准交易池S i的唯一标识,作哈希运算,将每个所述标准交易池S i的唯一标识映射至哈希环上的点A i,以将区块链交易池,划分为X个标准交易池S iThe mapping block unit is connected with the identification matching unit, and is used to perform a hash operation on the unique identification of each standard transaction pool S i , and map the unique identification of each standard transaction pool S i to the hash Point A i on the Greek ring to divide the blockchain transaction pool into X standard transaction pools S i .
进一步地,所述调用模块,包括:Further, the calling module includes:
特征值生成单元,用于生成所述当前交易T j的特征值; A characteristic value generating unit, configured to generate the characteristic value of the current transaction T j ;
映射定点单元,与所述特征值生成单元连接,用于将所述当前交易T j的Nonce值,作哈希运算,将所述当前交易T j映射至哈希环上的点B jA mapping fixed-point unit is connected with the characteristic value generating unit, and is used to perform a hash operation on the Nonce value of the current transaction T j , and map the current transaction T j to a point B j on the hash ring;
判断调用单元,与所述映射分块单元和映射定点单元连接,用于根据点A i和B j的位置,调用所述标准交易池S i中的1至X-1个,完成所述当前交易T jJudgment calling unit, connected with the mapping block unit and mapping fixed-point unit, used to call 1 to X-1 of the standard transaction pool S i according to the positions of points A i and B j , and complete the current Transaction T j .
进一步地,所述处理系统,用于执行上述任意的处理方法。Further, the processing system is configured to execute any of the above processing methods.
本发明提供的区块链交易的处理方法和系统,采用分治法的思想,提出对交易池结构的分片改进,将单个完整的大的区块链交易池,分片划分为若干小的标准交易池,根据当前交易的特征值调用适合的小标准交易池处理完成,将线程对交易池的读写锁竞争控制在限定的小标准交易池范围内,在读写锁的加锁或解锁操作中,无需对整个大的区块链交易池进行读写锁的加锁或解锁操作,避免了多个操作之间的拥塞问题,能有效降低冲突的频率,提升交易吞吐率,从而提升交易池整体的处理效率、进而提升区块链系统的整体性能。The method and system for processing block chain transactions provided by the present invention adopts the idea of divide and conquer, and proposes an improvement to the fragmentation of the transaction pool structure, and divides a single complete large block chain transaction pool into several small fragments. The standard transaction pool, according to the characteristic value of the current transaction, calls the appropriate small standard transaction pool to complete the processing, and controls the thread's competition for the read-write lock of the transaction pool within the limited range of the small standard transaction pool, and locks or unlocks the read-write lock During operation, there is no need to lock or unlock the read-write lock for the entire large blockchain transaction pool, avoiding the congestion problem between multiple operations, effectively reducing the frequency of conflicts, improving transaction throughput, and thus improving transaction The overall processing efficiency of the pool improves the overall performance of the blockchain system.
附图说明Description of drawings
图1为以太坊的交易池示意图;Figure 1 is a schematic diagram of the transaction pool of Ethereum;
图2为本发明区块链交易的处理方法的一个实施例的流程图;Fig. 2 is the flowchart of an embodiment of the processing method of block chain transaction of the present invention;
图3为本发明的标注交易池的划分示意图;Fig. 3 is a schematic diagram of division of the marked transaction pool of the present invention;
图4为本发明的区块链交易的处理方法的步骤S1的流程图;Fig. 4 is the flow chart of step S1 of the processing method of block chain transaction of the present invention;
图5为区块链交易池划分为4个标准交易池,映射至哈希环的示意图;Figure 5 is a schematic diagram of the blockchain transaction pool divided into 4 standard transaction pools and mapped to the hash ring;
图6为本发明的区块链交易的处理方法的步骤S2的流程图;Fig. 6 is the flow chart of step S2 of the processing method of block chain transaction of the present invention;
图7-8为本发明的标准交易池与交易在哈希环上的位置的两种示意图;Figures 7-8 are two schematic diagrams of the standard transaction pool and the position of transactions on the hash ring in the present invention;
图9为本发明的区块链交易的处理方法的步骤S23的流程图;FIG. 9 is a flowchart of step S23 of the processing method of blockchain transactions of the present invention;
图10为本发明的区块链交易的处理方法的步骤S23b的一个实施例的流程图;FIG. 10 is a flowchart of an embodiment of step S23b of the method for processing blockchain transactions of the present invention;
图11为本发明的区块链交易的处理方法的步骤S23b的另一个实施例的流程图;FIG. 11 is a flow chart of another embodiment of step S23b of the method for processing blockchain transactions of the present invention;
图12为本发明的区块链交易的处理方法的步骤S0的流程图;Fig. 12 is a flowchart of step S0 of the processing method of blockchain transactions of the present invention;
图13为本发明的区块链交易的处理方法的步骤S01的一个实施例的流程图;FIG. 13 is a flowchart of an embodiment of step S01 of the method for processing blockchain transactions of the present invention;
图14为本发明的区块链交易的处理方法的步骤S01的另一个实施例的流程图;FIG. 14 is a flow chart of another embodiment of step S01 of the method for processing blockchain transactions of the present invention;
图15为本发明的区块链交易的处理系统的一个实施例的结构框图。Fig. 15 is a structural block diagram of an embodiment of the blockchain transaction processing system of the present invention.
具体实施方式Detailed ways
如图2所示,给出了本发明区块链交易的处理方法的一个具体实施例,包括:As shown in Figure 2, a specific embodiment of the processing method of the blockchain transaction of the present invention is provided, including:
S1:将一个区块链交易池Pool,划分为X个标准交易池(SubPool i,后续简称为S i);其中,X为正整数;2≤i≤X。具体的,(如图3所示),分片交易池系统,可选但仅限于包括一个区块链交易池(分片交易池)和若干个标准交易池等实体构成。各实体在两层交易池系统中所扮演的角色与拥有的功能具体介绍如下:1、分片交易池:该池接口和普通交易池接口相同,通过增加一个交易分片处理中间层,隔离交易池上层业务逻辑,实现与普通交易池无差异化的访问方式。分片交易池具备两个关键组件:(1)交易池分片装置,该装置可选但不仅限于采用一种基于一致性哈希环的交易池分片算法实现,由于交易哈希具备较好离散性,交易池交易具备较好的平衡性,可实现交易较均匀的分布在各标准交易池;(2)交易池交易合并装置,该装置主要是对分片交易池进行交易排序获取时需要用到,主要实现一个先进先出的排序方法。在公有链模式下,合并装置还需要基于最大收益率对交易进行排序。另外,该装置构建一个全局 的交易优先队列,用于实现对不同标准交易池的交易排序方法。2、标准交易池:X个标准交易池一致,满足区块链常规交易处理的所有流程,与具体区块链采用的网络模块和共识算法相关,包括对单独标准交易池的写入、交易排序、读取、删除几个标准接口。 S1: Divide a blockchain transaction pool Pool into X standard transaction pools (SubPool i , hereinafter referred to as S i ); where X is a positive integer; 2≤i≤X. Specifically, (as shown in Figure 3), the shard transaction pool system is optional but limited to include a blockchain transaction pool (shard transaction pool) and several standard transaction pools and other entities. The roles and functions of each entity in the two-tier transaction pool system are introduced in detail as follows: 1. Fragmented transaction pool: The interface of this pool is the same as that of a common transaction pool. By adding a transaction shard to process the middle layer, transactions are isolated The business logic on the upper layer of the pool realizes an access method that is indistinguishable from ordinary transaction pools. The sharded transaction pool has two key components: (1) The transaction pool sharding device, which is optional but not limited to a transaction pool sharding algorithm based on a consistent hash ring. Since the transaction hash has a better Discrete, the transactions in the transaction pool have a better balance, which can achieve a more even distribution of transactions in each standard transaction pool; (2) transaction pool transaction merging device, which is mainly required for transaction sorting and acquisition of shard transaction pools Used to implement a first-in-first-out sorting method. In the public chain mode, the merger device also needs to sort the transactions based on the maximum yield. In addition, the device constructs a global transaction priority queue, which is used to realize the transaction sorting method for different standard transaction pools. 2. Standard transaction pool: The X standard transaction pools are consistent and meet all the routine transaction processing procedures of the blockchain, which are related to the network module and consensus algorithm adopted by the specific blockchain, including writing to a separate standard transaction pool and ordering transactions , Read, delete several standard interfaces.
S2:根据当前交易的特征值,调用上述标准交易池中的1至X-1个,完成当前交易。S2: According to the characteristic value of the current transaction, call 1 to X-1 in the above standard transaction pool to complete the current transaction.
在该实施例中,本发明的区块链交易的处理方法,采用分治法的思想,提出对交易池结构的分片改进,将单个完整的大的区块链交易池,分片划分为若干小的标准交易池,根据当前交易的特征值调用适合的小标准交易池处理完成,将线程对交易池的读写锁竞争控制在限定的小标准交易池范围内,在读写锁的加锁或解锁操作中,无需对整个大的区块链交易池进行读写锁的加锁或解锁操作,避免了多个操作之间的拥塞问题,能有效降低冲突的频率,提升交易吞吐率,从而提升交易池整体的处理效率、进而提升区块链系统的整体性能。In this embodiment, the block chain transaction processing method of the present invention adopts the idea of divide and conquer, proposes an improvement to the fragmentation of the transaction pool structure, and divides a single complete large block chain transaction pool into fragments For several small standard transaction pools, call the appropriate small standard transaction pool according to the characteristic value of the current transaction to complete the processing, and control the thread's read-write lock competition for the transaction pool within the limited small standard transaction pool. In the lock or unlock operation, there is no need to lock or unlock the entire large blockchain transaction pool, which avoids the congestion problem between multiple operations, effectively reduces the frequency of conflicts, and improves transaction throughput. Thereby improving the overall processing efficiency of the transaction pool, thereby improving the overall performance of the blockchain system.
具体的,如图4所示,步骤S1中,划分步骤可选但不仅限于包括:Specifically, as shown in Figure 4, in step S1, the dividing step may optionally include but is not limited to:
S11:确定将原本完整的区块链交易池,划分为若干标准交易池的数量X。具体的,该数量X为经验值,可选但不仅限于由本领域技术人员根据节点自身CPU的核心数量N,即并行处理能力,而预先自由设定,优选为等于N/3的取整数。更为具体的,该数量X,可预先设置,通过输入设备直接输入;或根据当前情况计算得到。S11: Determine the number X of dividing the original complete blockchain transaction pool into several standard transaction pools. Specifically, the number X is an empirical value, which can be optionally but not limited to be set freely in advance by those skilled in the art according to the core number N of the node's own CPU, that is, the parallel processing capability, preferably an integer equal to N/3. More specifically, the quantity X can be preset and directly input through the input device; or can be calculated according to the current situation.
S12:为划分的每个标准交易池S i(2≤i≤X),匹配一一对应的唯一标识。具体的,可选但不仅限于为X个标准交易池的每个标准交易池S i创建类似于身份证名片一样的索引ID i,作为对应标准交易池的唯一标识。更为具体的,该索引ID i可选但不仅限于以Prefix+i表示(即:ID i=Prefix+i)。其中,Prefix代表交易池前缀,可选但不仅限于为节点的主机名或节点的IP地址;i代表第i个标准交易池,为X个标准交易池所标记的序号。 S12: For each divided standard transaction pool S i (2≤i≤X), match a one-to-one unique identifier. Specifically, it is optional but not limited to create an index ID i similar to an ID card for each standard transaction pool S i of the X standard transaction pools, as the unique identifier of the corresponding standard transaction pool. More specifically, the index ID i may be optionally but not limited to be represented by Prefix+i (ie: ID i =Prefix+i). Among them, Prefix represents the prefix of the transaction pool, which is optional but not limited to the host name or IP address of the node; i represents the i-th standard transaction pool, and is the serial number marked by X standard transaction pools.
S13:将每个标准交易池的唯一标识,作哈希运算,以将每个标准交易池S i的唯一标识(可选但不仅限于为索引ID i)映射至哈希环上的点A i(如图5所示,为划分为4个标准交易池的示意图,A 1-A 4分别映射为S 1-S 4)。具体的,以该唯 一标识为索引ID i为例,计算Hash(IDi),将匹配于X个标准交易池的所有唯一标识,一一映射到哈希环上。具体的,可选但不仅限于将所有标准交易池S 1,..,S i,..,S x的索引ID 1,..,ID i,..,ID x依次作为一致性哈希操作函数Hash的输入,经过Hash(IDi),映射到[0,2 32-1]数值空间上,把输出结果的区间首尾相连,形成一个顺时针增长的哈希环,如图5所示(4个标准交易池划分完成后,形成的哈希环示意图)。更为具体的,期间运用的哈希运算Hash可选但不仅限于为MurmurHash。 S13: Perform a hash operation on the unique identifier of each standard transaction pool to map the unique identifier of each standard transaction pool S i (optional but not limited to index ID i ) to point A i on the hash ring (As shown in Figure 5, it is a schematic diagram of four standard transaction pools, A 1 -A 4 are respectively mapped to S 1 -S 4 ). Specifically, taking the unique identifier as index ID i as an example, Hash(IDi) is calculated, and all unique identifiers matching X standard transaction pools are mapped to the hash ring one by one. Specifically, it is optional but not limited to use the index ID 1 , .., ID i , .., ID x of all standard transaction pools S 1 , .., S i , .., S x as consistent hash operations in sequence The input of the function Hash is mapped to the [0,2 32 -1] numerical space through Hash(IDi), and the intervals of the output results are connected end to end to form a clockwise-growing hash ring, as shown in Figure 5 (4 Schematic diagram of the hash ring formed after the division of standard transaction pools). More specifically, the hash operation Hash used during the period is optional but not limited to MurmurHash.
在该实施例中,给出了步骤S1的一个具体实施方式,即如何将一个完整的大区块链交易池Pool分块划分为多个小标准交易池S i。其基于一致性哈希环,把标准交易池通过一致性哈希算法全部映射到[0,2 32-1]的数值空间上,再将这个数值空间首尾相连形成哈希环,不仅解决了标准交易池的一一对应问题,避免造成混乱和误差;还由于哈希算法具备较好的离散性,使得标准交易池具备较好的平衡性,可使后续交易较均匀的散落分布在各标准交易池中。 In this embodiment, a specific implementation of step S1 is given, that is, how to divide a complete large blockchain transaction pool Pool into multiple small standard transaction pools S i . Based on the consistent hash ring, it maps all the standard transaction pools to the numerical space of [0,2 32 -1] through the consistent hash algorithm, and then connects this numerical space end to end to form a hash ring, which not only solves the problem of standard The one-to-one correspondence of the transaction pool avoids confusion and errors; and because the hash algorithm has better discreteness, the standard transaction pool has a better balance, which can make subsequent transactions more evenly distributed among standard transactions in the pool.
更为具体的,如图6所示,步骤S2,可选但不仅限于,包括:More specifically, as shown in Figure 6, step S2 is optional but not limited to, including:
S21:生成当前交易(Transaction j,简称为T j)的特征值。具体的,可选但不仅限于采用当前交易T j的Nonce值或者当前交易T j本身的哈希值作为特征值。具体的,本领域技术人员可选但不仅限于通过本地的通用唯一识别码生成器为新进候选交易,即当前交易生成Nonce值。值得注意的,与每个标准交易池一样,该Nonce值、哈希值对于每个新进候选交易而言,也是具有唯一标识的,其能应用于后续哈希运算,以将每个当前交易T j,都映射到哈希环上的固定一点。 S21: Generate feature values of the current transaction (Transaction j , T j for short). Specifically, it is optional but not limited to adopting the Nonce value of the current transaction T j or the hash value of the current transaction T j itself as the characteristic value. Specifically, those skilled in the art may optionally, but not limited to, use a local UUID generator to generate a Nonce value for the new candidate transaction, that is, the current transaction. It is worth noting that, like each standard transaction pool, the Nonce value and hash value also have a unique identifier for each new candidate transaction, which can be applied to subsequent hash operations to convert each current transaction T j , are all mapped to a fixed point on the hash ring.
S22:将当前交易T j的特征值,即上述确定的Nonce值或哈希值,作哈希运算,以将当前交易T j映射至哈希环上的点B jS22: Perform a hash operation on the characteristic value of the current transaction T j , that is, the above-mentioned determined Nonce value or hash value, so as to map the current transaction T j to the point B j on the hash ring.
S23:根据点A i和B j的位置,对当前交易T j,调用标准交易池S i,完成当前交易。 S23: According to the positions of points A i and B j , call the standard transaction pool S i for the current transaction T j to complete the current transaction.
为便于理解本发明,在详细讲述如何调用标准交易池S i之前,先以图5为例,做个示例性约定,本领域技术人员可以理解的,在哈希值与标准交易池的映射表中,通过查表可以确定从点A 1-A 2这段圆弧上的所有哈希值(0-2 32×1/4]所 对应的交易都优先调用A 2所对应标准交易池S 2;从点A 2-A 3这段圆弧上的所有哈希值(2 32×1/4‐2 32×1/2]所对应的交易都优先调用A 3所对应标准交易池S 3;从点A 3-A 4这段圆弧上的所有哈希值(2 32×1/2‐2 32×3/4]所对应的交易都优先调用A 4所对应标准交易池S 4;从点A 4-A 1这段圆弧上的所有哈希值(2 32×3/4‐2 32-1]所对应的交易都优先调用A 1所对应标准交易池S 1In order to facilitate the understanding of the present invention, before describing in detail how to call the standard transaction pool S i , first take Figure 5 as an example to make an exemplary agreement. Those skilled in the art can understand that the mapping table between the hash value and the standard transaction pool In , by looking up the table, it can be determined that all transactions corresponding to the hash value (0-2 32 ×1/4] on the arc from point A 1 to A 2 will preferentially call the standard transaction pool S 2 corresponding to A 2 ; All transactions corresponding to the hash value (2 32 × 1/4‐2 32 × 1/2] on the arc from point A 2 -A 3 will first call the standard transaction pool S 3 corresponding to A 3 ; All transactions corresponding to the hash value (2 32 × 1/2‐2 32 × 3/4] on the arc from point A 3 -A 4 will first call the standard transaction pool S 4 corresponding to A 4 ; All transactions corresponding to the hash value (2 32 ×3/4‐2 32 -1] on the arc of point A 4 -A 1 will first call the standard transaction pool S 1 corresponding to A 1 .
具体的,若点A i和B j重合,如图7所示,即该当前交易T j在哈希环上的位置B j恰好与某个标准交易池S i的位置A i重合(这种情况是很少的,因为哈希环上包括2 32-1个密密麻麻的点,均可对应某个交易,而标准交易池S i的数量没这么多,只是哈希环上均布的零散点),即落入标准交易池S i的管辖范围,则该当前交易T j优先于调用该标准交易池S i完成交易。如图7所示,在标准交易池S 1-S 4的四个点位A 1-A 4中,当前交易T j在哈希环上的位置B j与标准交易池S 2重合,即落入标准交易池S 2的管辖范围,优先考虑调用该标准交易池S 2完成交易。更为具体的,可选但不仅限于还需要考虑该标准交易池S i的交易数量是否超过设定阈值,若超过则需等待或者调用其相邻的两个标准交易池S i+1、S i-1(即如图5示例的,调用S 1或S 3),若未超过则直接调用标准交易池S i(S 2)完成交易。当然,更为具体的,还需要考虑S i+1、S i-1交易数量是否超过设定阈值,若超过则需等待,直至S i、S i+1、S i-1中的1至X-1个的交易数量未超过设定阈值,则选其完成当前交易T j。具体的S i、S i+1、S i-1的优先级及判断标准,可由本领域技术人员根据实际需求而任意设定。 Specifically, if points A i and B j coincide, as shown in Figure 7, that is, the position B j of the current transaction T j on the hash ring happens to coincide with the position A i of a certain standard transaction pool S i (this The situation is very rare, because the hash ring includes 2 32 -1 densely packed points, all of which can correspond to a certain transaction, while the number of standard transaction pool S i is not so many, just scattered points evenly distributed on the hash ring ), that is, falls under the jurisdiction of the standard transaction pool S i , then the current transaction T j has priority over calling the standard transaction pool S i to complete the transaction. As shown in Figure 7, in the four points A 1 -A 4 of the standard transaction pool S 1 -S 4 , the position B j of the current transaction T j on the hash ring coincides with the standard transaction pool S 2 , that is, Into the jurisdiction of the standard transaction pool S2 , priority is given to calling the standard transaction pool S2 to complete the transaction. More specifically, optional but not limited to, it is also necessary to consider whether the number of transactions in the standard transaction pool S i exceeds the set threshold. If it exceeds, it needs to wait or call its two adjacent standard transaction pools S i+1 , S i-1 (that is, calling S 1 or S 3 as shown in Figure 5 ), if not exceeded, directly call the standard transaction pool S i (S 2 ) to complete the transaction. Of course , more specifically, it is also necessary to consider whether the number of transactions of S i+1 and S i-1 exceeds the set threshold. If the number of X-1 transactions does not exceed the set threshold, it will be selected to complete the current transaction T j . The specific priorities and judgment criteria of S i , S i+1 , and S i-1 can be set arbitrarily by those skilled in the art according to actual needs.
若点A i和B j不重合,如图8所示,即该当前交易T j在哈希环上的位置B j没有与任何一个标准交易池S i的位置A i重合(这种情况更常见,因为2 32数量相当庞大,如上所述的恰巧重合的机会相当少),而是位于哈希环的相邻两个标准交易池(S i与S i-1)所组成的一段弧上(这段弧上散落了很多个哈希值),即落入该两个标准交易池的共同管辖范围,此时可以选择标准交易池S i和标准交易池S i-1中的任意一个来完成当前交易。具体选用哪个标准交易池可查找哈希值与标准交易池的映射表确定。 If the points A i and B j do not coincide, as shown in Figure 8, that is, the position B j of the current transaction T j on the hash ring does not coincide with the position A i of any standard transaction pool S i (this situation is more Common, because the number of 2 32 is quite large, and the chance of coincidence as mentioned above is quite small), but it is located on an arc formed by two adjacent standard transaction pools (S i and S i-1 ) of the hash ring (There are a lot of hash values scattered on this arc), that is, it falls under the common jurisdiction of the two standard transaction pools. At this time, you can choose any one of the standard transaction pool S i and the standard transaction pool S i-1 to Complete the current transaction. Which standard transaction pool to choose can be determined by looking up the mapping table between the hash value and the standard transaction pool.
如图8所示的,当前交易T j在哈希环上的位置B j没有与任何一个标准交易池S i的位置重合,而是位于A 3和A 2所组成的一段弧上。那么我们通过查表, 可以优选A 3、A 2所对应的S 3和S 2中的任何一个来完成当前交易。当然,同样的要考虑,这两个标准交易池S 3和S 2的交易数量是否超过设定阈值。具体的,可选但不仅限于优先考虑顺时针方向上离B j距离最近的A i所对应的S i(如图8所示的A 3),作为完成当前交易的首选交易池,若该标准交易池S i的交易数量未超过设定阈值,则调用S i,若超过,则考虑逆时针方向上离B j距离最近的A i-1所对应的S i-1(如图8所示的A 2),作为完成当前交易的二选交易池,若该标准交易池S i-1的交易数量未超过设定阈值,则调用S i-1,若超过则等待,再次判断S i,直到S i和S i-1中有一个的交易数量未超过设定阈值时,调用其一。 As shown in Figure 8, the position B j of the current transaction T j on the hash ring does not coincide with the position of any standard transaction pool S i , but is located on an arc formed by A 3 and A 2 . Then we can select any one of S 3 and S 2 corresponding to A 3 and A 2 to complete the current transaction by looking up the table. Of course, it is also necessary to consider whether the number of transactions in the two standard transaction pools S3 and S2 exceeds the set threshold. Specifically, it is optional but not limited to give priority to the S i corresponding to the A i closest to B j in the clockwise direction (A 3 as shown in Figure 8), as the preferred transaction pool for completing the current transaction, if the standard If the number of transactions in the transaction pool S i does not exceed the set threshold, call S i , if it exceeds, consider the S i-1 corresponding to A i-1 closest to B j in the counterclockwise direction (as shown in Figure 8 A 2 ), as the secondary transaction pool for completing the current transaction, if the number of transactions in the standard transaction pool S i-1 does not exceed the set threshold, call S i-1 , if it exceeds, wait, and judge S i again, Until the transaction quantity of one of S i and S i-1 does not exceed the set threshold, call one of them.
具体的,如图9所示,上述S23,可选但不仅限于包括:Specifically, as shown in Figure 9, the above S23 may optionally include, but is not limited to:
S23a:判断点B j的位置是否与某个标准交易池S i对应的点A i的位置重合; S23a: Judging whether the position of point B j coincides with the position of point A i corresponding to a certain standard trading pool S i ;
S23b:若重合,则调用点A i所对应的标准交易池S i,完成当前交易; S23b: If they overlap, call the standard transaction pool S i corresponding to point A i to complete the current transaction;
S23c:若不重合,则调用与点B j顺时针方向最近的点A i所对应的标准交易池S i或与点B j逆时针方向最近的点A i-1所对应的标准交易池S i-1,完成当前交易。 S23c: If there is no coincidence, call the standard transaction pool S i corresponding to the point A i closest to point B j in the clockwise direction or the standard transaction pool S corresponding to the point A i-1 closest to point B j in the counterclockwise direction i-1 , complete the current transaction.
在该实施例中,给出了本发明处理方法,在处理当前交易时,如何在X个标准交易池中,均衡调用某个标准交易池S i来完成当前交易的具体实施例。通过重合和不重合的两种判断,综合考虑两种情况,分别对待,能够将每个当前交易T j,离散分配至X个标准交易池S i,进一步确保在读写锁的加锁或解锁操作中,无需对整个大的区块链交易池进行读写锁的加锁或解锁操作,避免了多个操作之间的拥塞问题,能有效降低冲突的频率,提升交易吞吐率,从而提升交易池整体的处理效率、进而提升区块链系统的整体性能。 In this embodiment, the processing method of the present invention is given. When processing the current transaction, how to call a certain standard transaction pool S i in a balanced manner among X standard transaction pools to complete the current transaction. Through the two judgments of coincidence and non-coincidence, considering the two situations comprehensively and treating them separately, each current transaction T j can be discretely allocated to X standard transaction pools S i , to further ensure the locking or unlocking of read-write locks During operation, there is no need to lock or unlock the read-write lock for the entire large blockchain transaction pool, avoiding the congestion problem between multiple operations, effectively reducing the frequency of conflicts, improving transaction throughput, and thus improving transaction The overall processing efficiency of the pool improves the overall performance of the blockchain system.
优选的,为避免S23b某个标准交易池S i的处理数量达到设定上限,造成系统崩盘或紊乱,本领域技术人员可选但不仅限于在判断位置重合之后,及调用标准交易池S i之前,还插入一个判断该标准交易池S i的交易数量是否达到设定阈值的步骤。具体的,如图10所示,步骤S23b,还可选但不仅限于包括: Preferably, in order to prevent the processing quantity of a certain standard transaction pool S i from reaching the set upper limit in S23b, causing system crash or disorder, those skilled in the art can choose, but not limited to, after judging that the position overlaps, and before calling the standard transaction pool S i , a step of judging whether the transaction quantity of the standard transaction pool S i reaches a set threshold is also inserted. Specifically, as shown in Figure 10, step S23b may also optionally include, but is not limited to:
S23b1:若重合,则判断标准交易池S i的交易数量是否超过设定阈值; S23b1: If they overlap, judge whether the transaction quantity of the standard transaction pool S i exceeds the set threshold;
S23b2:若未超过设定阈值,则调用标准交易池S i,完成当前交易; S23b2: If the set threshold is not exceeded, call the standard transaction pool S i to complete the current transaction;
S23b3:若超过设定阈值,则等待,并返回S23b1再判断,直到标准交易池S i的交易数量未超过设定阈值,完成当前交易。 S23b3: If it exceeds the set threshold, wait, and return to S23b1 to judge again, until the transaction quantity of the standard transaction pool S i does not exceed the set threshold, the current transaction is completed.
类似的,为避免S23c某个标准交易池S i的处理数量达到设定上限,造成系统崩盘或紊乱,本领域技术人员可选但不仅限于在S i的处理数量达到设定上限时,考虑S i-1或其它可选的标准交易池,具体调用优先级及考虑哪些个标准交易池,可由本领域技术人员根据实际情况而自由设定。优选的,考虑S i或S i-1。更为优选的,在判断位置重合之后,及调用标准交易池S i或S i-1之前,还插入一个判断该标准交易池S i或S i-1的交易数量是否达到设定阈值的步骤。具体的,如图10所示,步骤S23c,还可选但不仅限于包括: Similarly, in order to avoid S23c when the processing quantity of a certain standard transaction pool S i reaches the set upper limit, causing system crash or disorder, those skilled in the art can choose but not limited to when the processing quantity of S i reaches the set upper limit, consider S i-1 or other optional standard transaction pools, the specific calling priority and which standard transaction pools are considered can be freely set by those skilled in the art according to the actual situation. Preferably, S i or S i-1 is considered. More preferably, after judging that the positions overlap, and before calling the standard transaction pool S i or S i-1 , a step of judging whether the transaction quantity of the standard transaction pool S i or S i-1 reaches the set threshold is also inserted . Specifically, as shown in FIG. 10, step S23c may also optionally include, but is not limited to:
S23c1:若不重合,则判断与点B j顺时针方向最近的点A i所对应的标准交易池S i的交易数量,是否超过设定阈值; S23c1: If they do not overlap, determine whether the transaction quantity of the standard transaction pool S i corresponding to the point A i closest to point B j in the clockwise direction exceeds the set threshold;
S23c2:若未超过设定阈值,则调用标准交易池S i,完成当前交易; S23c2: If the set threshold is not exceeded, call the standard transaction pool S i to complete the current transaction;
S23c3:若超过设定阈值,则判断与点B j逆时针方向最近的点A i-1所对应的标准交易池S i-1的交易数量,是否超过设定阈值; S23c3: If it exceeds the set threshold, judge whether the transaction quantity of the standard transaction pool S i-1 corresponding to the point A i-1 closest to point B j in the counterclockwise direction exceeds the set threshold;
S23c4:若未超过设定阈值,则调用标准交易池S i-1,完成当前交易; S23c4: If the set threshold is not exceeded, call the standard transaction pool S i-1 to complete the current transaction;
S23c5:若超过设定阈值,则等待,并返回步骤S23c1,直到标准交易池S i、S i-1的其中一个的交易数量未超过设定阈值,则调用其完成当前交易。值得注意的,上述调用的标准交易池的具体哪个或哪几个,以及调用优先级别,仅给出上述示例,但并不以此具体实施例为限,本领域技术人员可根据实际需求,如交易数量的设定阈值大小、等待时间要求等任意设定。示例的,可仅调用标准交易池S i,也可调用S i、S i-1的甚至是涉及到S i+1、S i+2、S i-2均可,其先判断顺时针再判断逆时针,还是先判断逆时针再判断顺时针等优先顺序也均不受限。 S23c5: If it exceeds the set threshold, wait and return to step S23c1 until the transaction quantity of one of the standard transaction pools S i and S i-1 does not exceed the set threshold, then call it to complete the current transaction. It is worth noting that which one or several of the standard transaction pools to call above, as well as the call priority level, only give the above example, but not limited to this specific embodiment, those skilled in the art can according to actual needs, such as Arbitrary settings such as the threshold size of the transaction quantity and the waiting time requirement. For example, you can only call the standard transaction pool S i , you can also call S i , S i-1 or even involve S i+1 , S i+2 , and S i-2 . It is judged clockwise first and then There is no restriction on whether to judge counterclockwise, or whether to judge counterclockwise first and then judge clockwise.
更为优选的,为减轻标准交易池S i的负担,并减少用户等待的时间,如图11所示,步骤S23b,在另一个实施例中,还可选但不仅限于包括: More preferably, in order to reduce the burden on the standard transaction pool S i and reduce the waiting time for users, as shown in Figure 11, step S23b, in another embodiment, may also optionally but not limited to include:
S23b1’:若重合,则判断标准交易池S i的交易数量是否超过设定阈值; S23b1': If they overlap, judge whether the transaction quantity of the standard transaction pool S i exceeds the set threshold;
S23b2’:若未超过设定阈值,则调用标准交易池S i,完成当前交易; S23b2': If the set threshold is not exceeded, call the standard transaction pool S i to complete the current transaction;
S23b3’:若超过设定阈值,则判断与点B j顺时针方向最近的点A i+1所对应的标准交易池S i+1的交易数量,是否超过设定阈值; S23b3': If it exceeds the set threshold, judge whether the transaction quantity of the standard transaction pool S i +1 corresponding to the point A i+1 closest to point B j in the clockwise direction exceeds the set threshold;
S23b4’:若未超过设定阈值,则调用标准交易池S i+1,完成当前交易; S23b4': If the set threshold is not exceeded, call the standard transaction pool S i+1 to complete the current transaction;
S23b5’:若超过设定阈值,则判断与点B j逆时针方向最近的点A i-1所对应 的标准交易池S i-1的交易数量,是否超过设定阈值; S23b5': If it exceeds the set threshold, judge whether the transaction quantity of the standard transaction pool S i-1 corresponding to the point A i-1 closest to point B j in the counterclockwise direction exceeds the set threshold;
S23b6’:若未超过设定阈值,则调用标准交易池S i-1,完成当前交易; S23b6': If the set threshold is not exceeded, call the standard transaction pool S i-1 to complete the current transaction;
S23b7’:若超过设定阈值,则等待,并返回步骤S23b1’,直到标准交易池S i、S i+1、S i-1的其中一个的交易数量未超过设定阈值,则调用其完成当前交易。值得注意的,上述调用的标准交易池的具体哪个或哪几个,以及调用优先级别,仅给出上述示例,但并不以此具体实施例为限,本领域技术人员可根据实际需求,如交易数量的设定阈值大小、等待时间要求等任意设定。示例的,可仅调用标准交易池S i,也可调用S i、S i+1、S i-1的任意两两或三个的组合,甚至是涉及到S i+2、S i-2均可,其先判断顺时针再判断逆时针,还是先判断逆时针再判断顺时针等优先顺序也均不受限。 S23b7': If it exceeds the set threshold, wait and return to step S23b1' until the transaction quantity of one of the standard transaction pools S i , S i+1 , and S i-1 does not exceed the set threshold, then call it to complete current transaction. It is worth noting that which one or several of the standard transaction pools to call above, as well as the call priority level, only give the above example, but not limited to this specific embodiment, those skilled in the art can according to actual needs, such as Arbitrary settings such as the threshold size of the transaction quantity and the waiting time requirement. For example, only the standard transaction pool S i can be called, or any combination of two or three of S i , S i+1 , and S i-1 can be called, even involving S i+2 , S i-2 Either way, the order of priority, such as judging clockwise first and then counterclockwise, or judging counterclockwise first and then clockwise, is not limited.
更为优选的,如图12所示,为避免对无效交易进行判断再处理,浪费运行空间和内存,节约运行时间,本发明区块链交易的处理方法,还可选但不仅限于包括步骤S0:包括:More preferably, as shown in Figure 12, in order to avoid judging and reprocessing invalid transactions, wasting running space and memory, and saving running time, the method for processing blockchain transactions in the present invention may also optionally, but not limited to, include step S0 :include:
S01:判断当前交易T j是否为有效交易; S01: Determine whether the current transaction T j is a valid transaction;
S02:若当前交易T j为有效交易,则进行后续调用完成步骤; S02: If the current transaction T j is a valid transaction, perform subsequent calls to complete the steps;
S03:若当前交易T j不为有效交易(为无效交易),则不进行后续调用完成步骤。 S03: If the current transaction T j is not a valid transaction (is an invalid transaction), do not perform subsequent calls to complete the step.
具体的,该判定当前交易是否为有效交易的步骤S01-S03,可选但不仅限于设置在步骤S1或S2之前或之中,只要是调用标准交易池完成当前交易之前,均可。Specifically, the steps S01-S03 of judging whether the current transaction is a valid transaction are optional but not limited to being set before or during step S1 or S2, as long as it is before calling the standard transaction pool to complete the current transaction.
具体的,如图13所示,步骤S01,可选但不仅限于,包括:Specifically, as shown in Figure 13, step S01 is optional but not limited to, including:
S01a:判断当前交易T j是否合法; S01a: Determine whether the current transaction T j is legal;
S01b:若不合法,则判定当前交易T j,不为有效交易(无效交易),舍弃; S01b: If it is illegal, determine that the current transaction T j is not a valid transaction (invalid transaction), and discard it;
S01c:若合法,则判定当前交易T j,为有效交易,执行后续步骤。 S01c: If it is legal, determine that the current transaction T j is a valid transaction, and execute the next steps.
优选的,如图14所示,在另一个实施例中,步骤S01,可选但不仅限于,包括:Preferably, as shown in FIG. 14, in another embodiment, step S01, optionally but not limited to, includes:
S01a’:判断当前交易T j是否合法; S01a': Determine whether the current transaction T j is legal;
S01b’:若不合法,则判定当前交易T j不为有效交易; S01b': If it is illegal, determine that the current transaction T j is not a valid transaction;
S01c’:若合法,则继续判断当前交易T j是否为重复交易; S01c': If it is legal, continue to judge whether the current transaction T j is a repeated transaction;
S01d’:若为重复交易,则判定当前交易T j不为有效交易; S01d': If it is a repeated transaction, it is determined that the current transaction T j is not a valid transaction;
S01e’:若不为重复交易,则判定当前交易T j为有效交易。 S01e': If it is not a repeated transaction, determine that the current transaction T j is a valid transaction.
值得注意的,该判定当前交易T j是否有效的步骤,可选但不仅限于包括判定其是否为合法交易和重复交易。本领域技术人员可以理解的,可选合法交易和重复交易的其一判定,或者二者综合,或者涉及更多判定该交易是否为有效交易的评判指标。另外,其判定顺序以及标准均可由本领域技术人员根据实际要求而任意设定。 It should be noted that the step of judging whether the current transaction T j is valid may optionally but not limited to include judging whether it is a legal transaction or a repeated transaction. Those skilled in the art can understand that one of the judgments of legal transactions and repeated transactions can be selected, or a combination of the two, or involve more evaluation indicators for judging whether the transaction is a valid transaction. In addition, the determination order and criteria can be arbitrarily set by those skilled in the art according to actual requirements.
另一方面,如图15所示,本发明基于上述处理方法,还提供一种区块链交易的处理系统,包括:On the other hand, as shown in Figure 15, the present invention also provides a blockchain transaction processing system based on the above processing method, including:
分片模块100,用于将区块链交易池,划分为X个标准交易池S i;其中X为正整数;2≤i≤X; The fragmentation module 100 is used to divide the blockchain transaction pool into X standard transaction pools S i ; where X is a positive integer; 2≤i≤X;
调用模块200,与分片模块100连接,用于根据当前交易T j的特征值,调用标准交易池S i中的1至X-1个,完成当前交易T jThe calling module 200 is connected with the sharding module 100, and is used to call 1 to X-1 of the standard transaction pool S i according to the characteristic value of the current transaction T j to complete the current transaction T j .
具体的,分片模块100,可选但不仅限于包括:Specifically, the fragmentation module 100 may optionally include, but is not limited to:
数量确定单元110,用于确定标准交易池S i的数量X; A quantity determination unit 110, configured to determine the quantity X of the standard transaction pool S i ;
标识匹配单元120,与数量确定单元110连接,用于为每个标准交易池S i,匹配一一对应的唯一标识; The identification matching unit 120 is connected with the quantity determination unit 110, and is used for matching a one-to-one unique identification for each standard transaction pool S i ;
映射分块单元130,与标识匹配单元120连接,用于将每个标准交易池S i的唯一标识,作哈希运算,将每个标准交易池S i的唯一标识映射至哈希环上的点A i,以将区块链交易池,划分为X个标准交易池S iThe mapping block unit 130 is connected with the identification matching unit 120, and is used for hashing the unique identification of each standard transaction pool S i , and mapping the unique identification of each standard transaction pool S i to the hash ring. Point A i to divide the blockchain transaction pool into X standard transaction pools S i .
更为具体的,调用模块200,可选但不仅限于包括:More specifically, calling module 200 may optionally but not be limited to include:
特征值生成单元210,用于生成当前交易T j的特征值; A feature value generating unit 210, configured to generate a feature value of the current transaction T j ;
映射定点单元220,与特征值生成单元210连接,用于将当前交易T j的Nonce值,作哈希运算,将当前交易T j映射至哈希环上的点B jThe mapping fixed-point unit 220 is connected with the characteristic value generating unit 210, and is used for performing a hash operation on the Nonce value of the current transaction T j , and mapping the current transaction T j to the point B j on the hash ring;
判断调用单元230,与映射分块单元130和映射定点单元220连接,用于根据点A i和B j的位置,对当前交易T j,调用标准交易池S i中的1至X-1个,完成当前交易T jThe judgment call unit 230 is connected with the mapping block unit 130 and the mapping fixed-point unit 220, and is used to call 1 to X-1 in the standard transaction pool S i for the current transaction T j according to the positions of points A i and B j , to complete the current transaction T j .
需要说明的,上述模块和单元,为本发明区块链交易的处理系统的功能性划分,并不对其结构、单元模块作实质意义上的割裂,可选但不仅限于通过整块CPU单元或处理器执行完成。It should be noted that the above-mentioned modules and units are functional divisions of the processing system of the blockchain transaction of the present invention, and do not substantially separate its structure and unit modules. The execution of the device is completed.
上述区块链交易的处理系统和上述处理方法一致,其技术特征的组合、技术作用和有益效果在此不再赘述,以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The processing system of the above-mentioned block chain transaction is consistent with the above-mentioned processing method, and the combination of its technical features, technical functions and beneficial effects will not be repeated here. The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise All possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered as within the scope of the description.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present invention, and the descriptions thereof are relatively specific and detailed, but should not be construed as limiting the patent scope of the invention. It should be pointed out that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be based on the appended claims.

Claims (13)

  1. 一种区块链交易的处理方法,其特征在于,包括:A method for processing blockchain transactions, characterized in that it comprises:
    分片步骤:将区块链交易池,划分为X个标准交易池S i;其中X为正整数;2≤i≤X; Fragmentation step: Divide the blockchain transaction pool into X standard transaction pools S i ; where X is a positive integer; 2≤i≤X;
    调用步骤:根据当前交易T j的特征值,调用所述标准交易池S i中的1至X-1个,完成所述当前交易T jCalling step: call 1 to X-1 of the standard transaction pool S i according to the feature value of the current transaction T j to complete the current transaction T j .
  2. 根据权利要求1所述的处理方法,其特征在于,所述分片步骤,包括:The processing method according to claim 1, wherein the fragmentation step comprises:
    数量确定:确定标准交易池S i的数量X; Quantity determination: determine the quantity X of the standard transaction pool S i ;
    标识匹配:为每个所述标准交易池S i,匹配一一对应的唯一标识; Identification matching: for each standard transaction pool S i , match a one-to-one unique identification;
    映射分块:将每个所述标准交易池S i的唯一标识,作哈希运算,将每个所述标准交易池S i的唯一标识映射至哈希环上的点A i,以将区块链交易池,划分为X个标准交易池S iMapping block: perform hash operation on the unique identifier of each standard transaction pool S i , and map the unique identifier of each standard transaction pool S i to point A i on the hash ring, so as to block The blockchain transaction pool is divided into X standard transaction pools S i .
  3. 根据权利要求2所述的处理方法,其特征在于,调用步骤,包括:The processing method according to claim 2, wherein the calling step comprises:
    特征值生成:生成所述当前交易T j的特征值; Characteristic value generation: generate the characteristic value of the current transaction T j ;
    映射定点:将所述当前交易T j的特征值,作哈希运算,将所述当前交易T j映射至哈希环上的点B jMapping fixed point: perform hash operation on the characteristic value of the current transaction T j , and map the current transaction T j to the point B j on the hash ring;
    判断调用:根据点A i和点B j的位置,调用所述标准交易池S i中的1至X-1个,完成所述当前交易T jJudgment call: According to the positions of point A i and point B j , call 1 to X-1 of the standard transaction pool S i to complete the current transaction T j .
  4. 根据权利要求3所述的处理方法,其特征在于,所述判断调用的步骤,包括:The processing method according to claim 3, wherein the step of judging and calling includes:
    判断点B j的位置是否与点A i的位置重合; Determine whether the position of point B j coincides with the position of point A i ;
    若重合,则调用点A i所对应的标准交易池S i,完成当前交易; If they coincide, call the standard transaction pool S i corresponding to point A i to complete the current transaction;
    若不重合,则调用与点B j顺时针方向最近的点A i所对应的标准交易池S i或与点B j逆时针方向最近的点A i-1所对应的标准交易池S i-1,完成当前交易。 If they do not overlap, call the standard transaction pool S i corresponding to the point A i closest to point B j in the clockwise direction or the standard transaction pool S i-1 corresponding to the point A i-1 closest to point B j in the counterclockwise direction 1 , to complete the current transaction.
  5. 根据权利要求4所述的处理方法,其特征在于,所述若重合,则调用点A i所对应的标准交易池S i,完成当前交易的步骤,包括: The processing method according to claim 4, wherein the step of invoking the standard transaction pool S i corresponding to the point A i to complete the current transaction includes:
    若重合,则判断标准交易池S i的交易数量是否超过设定阈值; If they overlap, it is judged whether the number of transactions in the standard transaction pool S i exceeds the set threshold;
    若未超过设定阈值,则调用标准交易池S i,完成当前交易; If the set threshold is not exceeded, call the standard transaction pool S i to complete the current transaction;
    若超过设定阈值,则等待,并再次判断标准交易池S i的交易数量是否超过 设定阈值,直到标准交易池S i的交易数量未超过设定阈值,完成当前交易。 If it exceeds the set threshold, wait, and judge again whether the transaction quantity of the standard transaction pool S i exceeds the set threshold, until the transaction quantity of the standard transaction pool S i does not exceed the set threshold, and complete the current transaction.
  6. 根据权利要求4所述的处理方法,其特征在于,所述若不重合,则调用与点B j顺时针方向最近的点A i所对应的标准交易池S i或与点B j逆时针方向最近的点A i-1所对应的标准交易池S i-1,完成当前交易的步骤,包括: The processing method according to claim 4, characterized in that, if there is no coincidence, call the standard transaction pool S i corresponding to the point A i closest to point B j clockwise or counterclockwise to point B j The standard transaction pool S i-1 corresponding to the nearest point A i-1 , the steps to complete the current transaction include:
    若不重合,则判断与点B j顺时针方向最近的点A i所对应的标准交易池S i的交易数量,是否超过设定阈值; If they do not overlap, it is judged whether the number of transactions in the standard transaction pool S i corresponding to the point A i closest to point B j in the clockwise direction exceeds the set threshold;
    若未超过设定阈值,则调用标准交易池S i,完成当前交易; If the set threshold is not exceeded, call the standard transaction pool S i to complete the current transaction;
    若超过设定阈值,则判断与点B j逆时针方向最近的点A i-1所对应的标准交易池S i-1的交易数量,是否超过设定阈值; If it exceeds the set threshold, it is judged whether the transaction quantity of the standard transaction pool S i-1 corresponding to the point A i-1 closest to point B j in the counterclockwise direction exceeds the set threshold;
    若未超过设定阈值,则调用标准交易池S i-1,完成当前交易; If the set threshold is not exceeded, call the standard transaction pool S i-1 to complete the current transaction;
    若超过设定阈值,则等待,并返回若不重合,则判断与点B j顺时针方向最近的点A i所对应的标准交易池S i的交易数量,是否超过设定阈值的步骤,直到标准交易池S i、S i-1的其中一个的交易数量未超过设定阈值,则调用其完成当前交易。 If it exceeds the set threshold, wait, and return to the step of judging whether the transaction quantity of the standard transaction pool S i corresponding to the point A i closest to point B j in the clockwise direction exceeds the set threshold if it does not overlap, until If the number of transactions in one of the standard transaction pools S i and S i-1 does not exceed the set threshold, it is called to complete the current transaction.
  7. 根据权利要求1-6任意一项所述的处理方法,其特征在于,调用所述标准交易池S i中的1至X-1个,完成所述当前交易T j之前,还包括步骤: According to the processing method described in any one of claims 1-6, it is characterized in that calling 1 to X-1 in the standard transaction pool S i , and before completing the current transaction T j , further includes the steps of:
    判断所述当前交易T j是否为有效交易; Judging whether the current transaction T j is a valid transaction;
    若所述当前交易T j为有效交易,则进行调用所述标准交易池S i中的1至X-1个,完成所述当前交易T j的步骤; If the current transaction T j is a valid transaction, then call 1 to X-1 of the standard transaction pool S i to complete the step of the current transaction T j ;
    若所述当前交易T j不为有效交易,则不进行调用所述标准交易池S i中的1至X-1个,完成所述当前交易T j的步骤。 If the current transaction T j is not a valid transaction, the step of calling 1 to X-1 of the standard transaction pool S i to complete the current transaction T j is not performed.
  8. 根据权利要求7所述的处理方法,其特征在于,所述判断所述当前交易T j是否为有效交易的步骤,包括: The processing method according to claim 7, wherein the step of judging whether the current transaction Tj is a valid transaction comprises:
    判断所述当前交易T j是否合法; Judging whether the current transaction T j is legal;
    若不合法,则判定所述当前交易T j不为有效交易; If it is not legal, it is determined that the current transaction T j is not a valid transaction;
    若合法,则判定所述当前交易T j为有效交易。 If it is legal, it is determined that the current transaction T j is a valid transaction.
  9. 根据权利要求7所述的处理方法,其特征在于,所述判断所述当前交易T j是否为有效交易的步骤,包括: The processing method according to claim 7, wherein the step of judging whether the current transaction Tj is a valid transaction comprises:
    判断所述当前交易T j是否合法; Judging whether the current transaction T j is legal;
    若不合法,则判定所述当前交易T j不为有效交易; If it is not legal, it is determined that the current transaction T j is not a valid transaction;
    若合法,则继续判断所述当前交易T j是否为重复交易; If legal, continue to judge whether the current transaction T j is a repeated transaction;
    若为重复交易,则判定所述当前交易T j不为有效交易; If it is a repeated transaction, it is determined that the current transaction T j is not a valid transaction;
    若不为重复交易,则判定所述当前交易T j为有效交易。 If it is not a repeated transaction, it is determined that the current transaction T j is a valid transaction.
  10. 一种区块链交易的处理系统,其特征在于,包括:A processing system for blockchain transactions, characterized in that it includes:
    分片模块,用于将区块链交易池,划分为X个标准交易池S i;其中X为正整数;2≤i≤X; The fragmentation module is used to divide the blockchain transaction pool into X standard transaction pools S i ; where X is a positive integer; 2≤i≤X;
    调用模块,与所述分片模块连接,用于根据当前交易T j的特征值,调用所述标准交易池S i中的1至X-1个,完成所述当前交易T jThe calling module is connected with the sharding module, and is used to call 1 to X-1 of the standard transaction pool S i according to the characteristic value of the current transaction T j to complete the current transaction T j .
  11. 根据权利要求10所述的处理系统,其特征在于,所述分片模块,包括:The processing system according to claim 10, wherein the fragmentation module comprises:
    数量确定单元,用于确定标准交易池S i的数量X; Quantity determination unit, used to determine the quantity X of the standard transaction pool S i ;
    标识匹配单元,与所述数量确定单元连接,用于为每个所述标准交易池S i,匹配一一对应的唯一标识; An identifier matching unit, connected to the quantity determination unit, for matching a one-to-one unique identifier for each of the standard transaction pools S i ;
    映射分块单元,与所述标识匹配单元连接,用于将每个所述标准交易池S i的唯一标识,作哈希运算,将每个所述标准交易池S i的唯一标识映射至哈希环上的点A i,以将区块链交易池,划分为X个标准交易池S iThe mapping block unit is connected with the identification matching unit, and is used to perform a hash operation on the unique identification of each standard transaction pool S i , and map the unique identification of each standard transaction pool S i to the hash Point A i on the Greek ring to divide the blockchain transaction pool into X standard transaction pools S i .
  12. 根据权利要求11所述的处理系统,其特征在于,所述调用模块,包括:The processing system according to claim 11, wherein the calling module comprises:
    特征值生成单元,用于生成所述当前交易T j的特征值; A characteristic value generating unit, configured to generate the characteristic value of the current transaction T j ;
    映射定点单元,与所述特征值生成单元连接,用于将所述当前交易T j的特征值,作哈希运算,将所述当前交易T j映射至哈希环上的点B jThe mapping fixed-point unit is connected with the characteristic value generating unit, and is used to perform a hash operation on the characteristic value of the current transaction T j , and map the current transaction T j to the point B j on the hash ring;
    判断调用单元,与所述映射分块单元和所述映射定点单元连接,用于根据点A i和B j的位置,调用所述标准交易池S i中的1至X-1个,完成所述当前交易T jThe judging calling unit is connected with the mapping block unit and the mapping fixed-point unit, and is used to call 1 to X-1 of the standard transaction pool S i according to the positions of points A i and B j to complete all Describe the current transaction T j .
  13. 根据权利要求10-12任意一项所述的处理系统,其特征在于,所述处理系统,用于执行权利要求1-9任意一项所述的处理方法。The processing system according to any one of claims 10-12, wherein the processing system is configured to execute the processing method according to any one of claims 1-9.
PCT/CN2021/141180 2021-10-28 2021-12-24 Blockchain transaction processing method and system WO2023070924A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111259077.7A CN113708937B (en) 2021-10-28 2021-10-28 Processing method and system for block chain transaction
CN202111259077.7 2021-10-28

Publications (1)

Publication Number Publication Date
WO2023070924A1 true WO2023070924A1 (en) 2023-05-04

Family

ID=78647228

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/141180 WO2023070924A1 (en) 2021-10-28 2021-12-24 Blockchain transaction processing method and system

Country Status (2)

Country Link
CN (1) CN113708937B (en)
WO (1) WO2023070924A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113708937B (en) * 2021-10-28 2022-03-01 湖南天河国云科技有限公司 Processing method and system for block chain transaction
CN114205160B (en) * 2021-12-13 2024-05-28 深圳前海微众银行股份有限公司 Block chain-based data processing method and device and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110717762A (en) * 2019-12-16 2020-01-21 腾讯科技(深圳)有限公司 Data processing method, data processing device, node equipment and storage medium
US20200076573A1 (en) * 2018-08-30 2020-03-05 International Business Machines Corporation Special relationships in a blockchain
CN111127013A (en) * 2019-12-24 2020-05-08 深圳大学 Decentralized data transaction method, device, equipment and medium based on block chain
CN111507695A (en) * 2020-04-17 2020-08-07 腾讯科技(深圳)有限公司 Data processing method, data processing device, node equipment and storage medium
CN111611321A (en) * 2020-06-29 2020-09-01 上海优扬新媒信息技术有限公司 Data storage method and device and block chain system
CN112260836A (en) * 2020-09-28 2021-01-22 电子科技大学 Method for improving block chain throughput based on fragmentation technology
CN113708937A (en) * 2021-10-28 2021-11-26 湖南天河国云科技有限公司 Processing method and system for block chain transaction

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106991008B (en) * 2016-01-20 2020-12-18 华为技术有限公司 Resource lock management method, related equipment and system
CN110489059B (en) * 2019-07-11 2022-04-12 平安科技(深圳)有限公司 Data cluster storage method and device and computer equipment
CN110737668B (en) * 2019-12-17 2020-12-22 腾讯科技(深圳)有限公司 Data storage method, data reading method, related device and medium
CN111181715B (en) * 2019-12-30 2022-07-12 杭州云象网络技术有限公司 Multi-party cross-linking method based on consistent Hash consensus protocol
CN112839086B (en) * 2021-01-06 2022-02-08 中山大学 Network resource allocation method and device based on block chain fragmentation technology, terminal equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200076573A1 (en) * 2018-08-30 2020-03-05 International Business Machines Corporation Special relationships in a blockchain
CN110717762A (en) * 2019-12-16 2020-01-21 腾讯科技(深圳)有限公司 Data processing method, data processing device, node equipment and storage medium
CN111127013A (en) * 2019-12-24 2020-05-08 深圳大学 Decentralized data transaction method, device, equipment and medium based on block chain
CN111507695A (en) * 2020-04-17 2020-08-07 腾讯科技(深圳)有限公司 Data processing method, data processing device, node equipment and storage medium
CN111611321A (en) * 2020-06-29 2020-09-01 上海优扬新媒信息技术有限公司 Data storage method and device and block chain system
CN112260836A (en) * 2020-09-28 2021-01-22 电子科技大学 Method for improving block chain throughput based on fragmentation technology
CN113708937A (en) * 2021-10-28 2021-11-26 湖南天河国云科技有限公司 Processing method and system for block chain transaction

Also Published As

Publication number Publication date
CN113708937B (en) 2022-03-01
CN113708937A (en) 2021-11-26

Similar Documents

Publication Publication Date Title
WO2023070924A1 (en) Blockchain transaction processing method and system
JP7114629B2 (en) System and method for parallel verification of blockchain transactions
US9154442B2 (en) Concurrent linked-list traversal for real-time hash processing in multi-core, multi-thread network processors
CN107657438B (en) Block chain generation method, data verification method, node and system
CN107807951B (en) Block chain generation method, data verification method, node and system
WO2017133623A1 (en) Data stream processing method, apparatus, and system
US8321385B2 (en) Hash processing in a network communications processor architecture
US8539199B2 (en) Hash processing in a network communications processor architecture
CN106406896B (en) Block chain block building method based on parallel Pipeline technology
US9158810B2 (en) Hardware message queues for intra-cluster communication
EP3493084B1 (en) Method for processing data in bloom filter and bloom filter
CN112041872A (en) Maintaining blocks of a blockchain in a partitioned blockchain network
CN105531713A (en) Generating multiple secure hashes from a single data buffer
JP2016535337A (en) Efficient packet processing model in network environment and system and method for supporting optimized buffer utilization for packet processing
US20220057966A1 (en) Memory system and method of controlling nonvolatile memory
WO2011123991A1 (en) Memory access method for parallel computing
WO2019080232A1 (en) Task information transmission method and apparatus in workflow system, and computer device
WO2023070925A1 (en) Sharding method for blockchain transaction pool, system, storage medium and computer system
CN116455559B (en) Implementation method and device of soft and hard collaboration high-speed password equipment and electronic equipment
US20230102617A1 (en) Repeat transaction verification method, apparatus, and device, and medium
CN111158878A (en) Resource transfer request thread control method, device and storage medium
EP4022843A1 (en) Methods and devices for secure symbiotic mining
WO2024098613A1 (en) Hmac algorithm processing system and method, device, and non-volatile readable storage medium
CN113157450B (en) Method and apparatus for executing blocks in a blockchain system
CN110162395B (en) Memory allocation method and device

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE