Transaction processing method and device based on blockchain, and electronic device

By maintaining the Nonce list in the blockchain and using the increment mechanism of Nonce value, the problem of insufficient transaction concurrency capability in blockchain technology is solved, and the effect of improving transaction concurrency capability is achieved while preventing replay attacks.

CN112232817BActive Publication Date: 2024-12-27ANTCHAIN TECHNOLOGY PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011103271.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-10-25
Publication Date
2024-12-27
Estimated Expiration
2038-10-25

AI Technical Summary

Technical Problem

While preventing transaction replay attacks, existing blockchain technology limits the transaction concurrency capability of single accounts and cannot be effectively applied in high concurrency scenarios.

Method used

By maintaining the Nonce list in the blockchain, the client obtains the same available Nonce records with the packet identification, adds to multiple transactions, and matches and executes by the node device to achieve concurrent execution, while preventing replay attacks through monotonous increments of the Nonce value.

Benefits of technology

On the basis of avoiding transaction replay attacks, the client's single account transaction concurrency capability is improved, and the processing performance of the blockchain system and the transaction efficiency of users are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112232817B_ABST
    Figure CN112232817B_ABST
Patent Text Reader

Abstract

A transaction processing method based on blockchain is disclosed, wherein a Nonce list corresponding to the user account is maintained in the blockchain; wherein the Nonce list includes multiple Nonce records; the Nonce record includes a group identifier and a Nonce value; the method includes: obtaining available Nonce records with the same group identifier for multiple transactions initiated by the user through the user account and requiring concurrent execution from the Nonce list; adding the obtained available Nonce records to the multiple transactions respectively; publishing the multiple transactions to the blockchain, so that the node device in the blockchain matches the available Nonce record in the transaction published by the client with the Nonce record in the Nonce list, and accepting the transaction when the available Nonce record matches any target Nonce record in the Nonce list, and concurrently executing multiple transactions with the same group identifier in the accepted transactions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of this specification relate to the field of blockchain technology, and in particular, to a transaction processing method and device based on blockchain, and an electronic device. Background Art

[0002] Blockchain technology, also known as distributed ledger technology, is an emerging technology in which several computing devices jointly participate in "bookkeeping" and jointly maintain a complete distributed database. Since blockchain technology is decentralized, open and transparent, each computing device can participate in database records, and data can be quickly synchronized between computing devices, blockchain technology is used to build a decentralized system, and various execution programs are included in the distributed database of the blockchain for automatic execution. It has been widely used in many fields. Summary of the invention

[0003] This specification proposes a transaction processing method based on blockchain, which is applied to a client, wherein the blockchain maintains a Nonce list corresponding to the user account; wherein the Nonce list includes multiple Nonce records; the Nonce record includes a group identifier and a Nonce value; the method includes:

[0004] Obtaining available Nonce records with the same grouping identifier from the Nonce list for multiple transactions initiated by the user through the user account that need to be executed concurrently;

[0005] Add the obtained available Nonce records to the multiple transactions respectively;

[0006] The multiple transactions are published to the blockchain, so that the node device in the blockchain matches the available Nonce record in the transaction published by the client with the Nonce record in the Nonce list, and accepts the transaction when the available Nonce record matches any target Nonce record in the Nonce list, and concurrently executes multiple transactions with the same grouping identifier in the accepted transactions.

[0007] Optionally, the multiple transactions that need to be executed concurrently include multiple transactions of the same transaction type.

[0008] Optionally, also include:

[0009] If the transaction initiated by the user through the user account includes multiple groups of transactions that need to be executed concurrently, determine the execution order of the multiple groups of transactions;

[0010] Obtain available Nonce records from the Nonce list for the multiple groups of transactions, each of which has the same group identifier and indicates an execution order of the multiple groups of transactions.

[0011] Optionally, before respectively obtaining available Nonce records with the same grouping identifier for multiple transactions initiated by the user through the user account and requiring concurrent execution from the Nonce list, the method further includes:

[0012] In response to an initialization instruction for the client, obtain the Nonce list maintained in the blockchain, and maintain the obtained Nonce list locally on the client;

[0013] Obtaining available Nonce records with the same grouping identifier from the Nonce list for multiple transactions initiated by the user through the user account that need to be executed concurrently, respectively, including:

[0014] From the Nonce list maintained locally by the client, available Nonce records with the same grouping identifier are obtained for multiple transactions initiated by the user through the user account that need to be executed concurrently.

[0015] Optionally, the Nonce record in the Nonce list maintained locally by the client is marked as available by default;

[0016] The method further comprises:

[0017] After respectively obtaining available Nonce records with the same grouping identifier for multiple transactions initiated by the user through the user account and requiring concurrent execution from the Nonce list locally maintained by the client, the available Nonce records are marked as unavailable in the Nonce list.

[0018] Optionally, also include:

[0019] Determining whether a notification message returned by the node device indicating that the transaction is accepted is received;

[0020] If yes, the Nonce value in the available Nonce record is monotonically increased based on a preset amplitude, and after the Nonce value is monotonically increased, the available Nonce record is re-marked as available in the Nonce list.

[0021] Optionally, the client is a multi-threaded client; the number of Nonce records in the Nonce list indicates the transaction concurrency capability of the user account.

[0022] Optionally, the Nonce record further includes: an index identifier of the Nonce record.

[0023] This specification also proposes a transaction processing method based on blockchain, which is applied to a node device in a blockchain, wherein the blockchain maintains a Nonce list set; the Nonce list set includes Nonce lists corresponding to a number of user accounts; wherein the Nonce list includes multiple Nonce records; the Nonce record includes a group identifier and a Nonce value; the method includes:

[0024] Receiving a transaction initiated by a user through a user account sent by a client; wherein the transaction is added with an available Nonce record obtained from a Nonce list corresponding to the user account maintained in the blockchain;

[0025] Matching the available Nonce record in the received transaction with the Nonce record in the Nonce list corresponding to the user account maintained in the blockchain;

[0026] If the available Nonce record matches any target Nonce record in the Nonce list, the transaction is accepted; and multiple transactions with the same grouping identifier in the accepted transactions are concurrently executed.

[0027] Optionally, the transactions sent by the client include multiple groups of transactions having the same group identifiers of the multiple transactions included therein; the group identifiers in the available Nonce records added by the client for the multiple groups of transactions indicate the execution order of the multiple groups of transactions;

[0028] The method further comprises:

[0029] If there are multiple groups of transactions with the same grouping identifiers of the multiple transactions included in the transactions sent by the client, the multiple groups of transactions are sequentially executed according to the execution order indicated by the grouping identifiers of the multiple groups of transactions.

[0030] Optionally, also include:

[0031] If the available Nonce record matches any target Nonce record in the Nonce list, monotonically increasing the Nonce value of the target Nonce record based on a preset amplitude; and

[0032] A notification message that the transaction is accepted is returned to the client.

[0033] Optionally, the Nonce record further includes: an index identifier of the Nonce record.

[0034] This specification also proposes a transaction processing device based on blockchain, which is applied to a client, wherein the blockchain maintains a Nonce list corresponding to the user account; wherein the Nonce list includes multiple Nonce records; the Nonce record includes a group identifier and a Nonce value; the method includes:

[0035] An acquisition module, for respectively acquiring available Nonce records with the same grouping identifier for multiple transactions initiated by the user through the user account and requiring concurrent execution from the Nonce list;

[0036] An adding module is used to add the obtained available Nonce records to the multiple transactions respectively;

[0037] The publishing module publishes the multiple transactions to the blockchain, so that the node device in the blockchain matches the available Nonce record in the transaction published by the client with the Nonce record in the Nonce list, and accepts the transaction when the available Nonce record matches any target Nonce record in the Nonce list, and concurrently executes multiple transactions with the same grouping identifier in the accepted transactions.

[0038] Optionally, the multiple transactions that need to be executed concurrently include multiple transactions of the same transaction type.

[0039] Optionally, the acquisition module further:

[0040] If the transaction initiated by the user through the user account includes multiple groups of transactions that need to be executed concurrently, determine the execution order of the multiple groups of transactions;

[0041] Obtain available Nonce records from the Nonce list for the multiple groups of transactions, each of which has the same group identifier and indicates an execution order of the multiple groups of transactions.

[0042] Optionally, the acquisition module further:

[0043] Before respectively obtaining available Nonce records with the same grouping identifier for multiple transactions initiated by the user through the user account and requiring concurrent execution from the Nonce list, in response to an initialization instruction for the client, obtaining the Nonce list maintained in the blockchain, and maintaining the obtained Nonce list locally on the client;

[0044] From the Nonce list maintained locally by the client, available Nonce records with the same grouping identifier are obtained for multiple transactions initiated by the user through the user account that need to be executed concurrently.

[0045] Optionally, the Nonce record in the Nonce list maintained locally by the client is marked as available by default;

[0046] The acquisition module:

[0047] After respectively obtaining available Nonce records with the same grouping identifier for multiple transactions initiated by the user through the user account and requiring concurrent execution from the Nonce list locally maintained by the client, the available Nonce records are marked as unavailable in the Nonce list.

[0048] Optionally, the acquisition module further:

[0049] Determining whether a notification message returned by the node device indicating that the transaction is accepted is received;

[0050] If yes, the Nonce value in the available Nonce record is monotonically increased based on a preset amplitude, and after the Nonce value is monotonically increased, the available Nonce record is re-marked as available in the Nonce list.

[0051] Optionally, the client is a multi-threaded client; the number of Nonce records in the Nonce list indicates the transaction concurrency capability of the user account.

[0052] Optionally, the Nonce record further includes: an index identifier of the Nonce record.

[0053] This specification also proposes a transaction processing device based on blockchain, which is applied to a node device in a blockchain, wherein the blockchain maintains a Nonce list set; the Nonce list set includes Nonce lists corresponding to a number of user accounts; wherein the Nonce list includes multiple Nonce records; the Nonce record includes a group identifier and a Nonce value; the method includes:

[0054] A receiving module, receiving a transaction initiated by a user through a user account sent by a client; wherein the transaction is added with an available Nonce record obtained from a Nonce list corresponding to the user account maintained in the blockchain;

[0055] A matching module, matching the available Nonce record in the received transaction with the Nonce record in the Nonce list corresponding to the user account maintained in the blockchain;

[0056] The execution module accepts the transaction if the available Nonce record matches any target Nonce record in the Nonce list; and concurrently executes multiple transactions with the same grouping identifier among the accepted transactions.

[0057] Optionally, the transactions sent by the client include multiple groups of transactions having the same group identifiers of the multiple transactions included therein; the group identifiers in the available Nonce records added by the client for the multiple groups of transactions indicate the execution order of the multiple groups of transactions;

[0058] The execution module further:

[0059] If there are multiple groups of transactions with the same grouping identifiers of the multiple transactions included in the transactions sent by the client, the multiple groups of transactions are sequentially executed according to the execution order indicated by the grouping identifiers of the multiple groups of transactions.

[0060] Optionally, the execution module further:

[0061] If the available Nonce record matches any target Nonce record in the Nonce list, monotonically increasing the Nonce value of the target Nonce record based on a preset amplitude; and

[0062] A notification message that the transaction is accepted is returned to the client.

[0063] Optionally, the Nonce record further includes: an index identifier of the Nonce record.

[0064] This specification also proposes an electronic device, comprising:

[0065] processor;

[0066] memory for storing machine-executable instructions;

[0067] Wherein, by reading and executing the machine executable instructions corresponding to the control logic of blockchain-based transaction processing stored in the memory, the processor is prompted to:

[0068] From the Nonce list corresponding to the user account maintained in the blockchain, for multiple transactions initiated by the user through the user account that need to be executed concurrently, obtain available Nonce records with the same group identifier respectively; wherein the Nonce list includes multiple Nonce records; and the Nonce record includes a group identifier and a Nonce value;

[0069] Add the obtained available Nonce records to the multiple transactions respectively;

[0070] The multiple transactions are published to the blockchain, so that the node device in the blockchain matches the available Nonce record in the transaction published by the client with the Nonce record in the Nonce list, and accepts the transaction when the available Nonce record matches any target Nonce record in the Nonce list, and concurrently executes multiple transactions with the same grouping identifier in the accepted transactions.

[0071] This specification also proposes an electronic device, comprising:

[0072] processor;

[0073] memory for storing machine-executable instructions;

[0074] Wherein, by reading and executing the machine executable instructions corresponding to the control logic of blockchain-based transaction processing stored in the memory, the processor is prompted to:

[0075] Receiving a transaction initiated by a user through a user account sent by a client; wherein the transaction is added with an available Nonce record obtained from a Nonce list corresponding to the user account maintained in the blockchain; wherein the Nonce list includes multiple Nonce records; and the Nonce record includes a group identifier and a Nonce value;

[0076] Matching the available Nonce record in the received transaction with the Nonce record in the Nonce list corresponding to the user account maintained in the blockchain;

[0077] If the available Nonce record matches any target Nonce record in the Nonce list, the transaction is accepted; and multiple transactions with the same grouping identifier in the accepted transactions are concurrently executed.

[0078] Through the above embodiments, it is possible to further improve the technical solution of the transaction concurrency capability of a single account on the client on the basis of avoiding replay attacks on transactions. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 It is a schematic diagram of a replay attack detection on a transaction provided by an exemplary embodiment.

[0080] Figure 2 It is a flowchart of a transaction processing method based on blockchain provided by an exemplary embodiment.

[0081] Figure 3 This is a structural diagram of a Nonce list set maintained in a blockchain provided by an exemplary embodiment.

[0082] Figure 4 It is a schematic diagram of another method of performing replay attack detection on transactions provided by an exemplary embodiment.

[0083] Figure 5 It is a structural diagram of a Nonce list maintained by a client provided by an exemplary embodiment.

[0084] Figure 6 It is a schematic structural diagram of an electronic device provided by an exemplary embodiment.

[0085] Figure 7 It is a block diagram of a blockchain-based transaction processing device provided by an exemplary embodiment.

[0086] Figure 8 It is a block diagram of another blockchain-based transaction processing device provided by an exemplary embodiment. DETAILED DESCRIPTION

[0087] Replay attacks in the blockchain field refer to attacks that publish duplicate transactions in the blockchain, causing the same transaction to be executed multiple times, causing losses to users.

[0088] If a transfer transaction is intercepted by an illegal node after being signed and authorized by the user's private key, the illegal node can launch a replay attack based on the intercepted transaction after the transaction is executed, and repeatedly publish and execute the transaction in the blockchain, causing the transfer transaction to be executed multiple times, thereby causing financial losses to the user.

[0089] In one embodiment shown, a densely increasing Nonce value (a densely increasing integer) can usually be carried in the transaction to deal with the risk of replay attacks on the transaction;

[0090] See also Figure 1 , Figure 1 This is a schematic diagram of a transaction replay attack detection method shown in this specification.

[0091] like Figure 1 As shown in the figure, each transaction initiated by the user through the personal user account on the client can specify a Nonce value, and use the private key held by the user to sign the transaction body and the specified Nonce value of the transaction. Among them, the signature is an overall signature of [transaction body, Nonce value], which can ensure that the Nonce in the transaction cannot be tampered with.

[0092] When the signature is completed, the client can publish the transaction in the blockchain. After receiving the transaction, the node device in the blockchain needs to verify whether the signature of the transaction is legal, and also needs to check whether the Nonce value in the transaction is strictly and densely incremented with the Nonce value in the most recent transaction that has been successfully accepted. If the Nonce value in the transaction is strictly and densely incremented with the Nonce value in the most recent transaction that has been successfully accepted, the transaction can be accepted; otherwise, the compared transaction can be deemed to be an illegal transaction.

[0093] For example, suppose a user initiates a transaction with a Nonce value of 1 through his personal user account Account1 on the client. After the transaction is successfully accepted by the blockchain, when the user initiates a transaction again through Account1 on the client, the Nonce value in the transaction must be specified as 2, so that it will be recognized as a legal transaction and accepted by the node device in the blockchain.

[0094] Correspondingly, the blockchain system will maintain the Nonce status of the user's personal user account. Every time a transaction initiated by Account1 is successfully accepted, the blockchain system will increase the Nonce value of the user account by 1. After receiving a transaction issued by the client, the node device in the blockchain will compare the Nonce value in the transaction with the Nonce value in the maintained Nonce status to determine whether the Nonce value in the transaction is strictly increased by 1 compared with the Nonce value in the most recent transaction that has been successfully accepted. If so, the transaction can be accepted.

[0095] Through the above method, although the risk of transaction replay attack can be avoided to a certain extent, for the user account, it is necessary to initiate the next transaction after the previous transaction is accepted. Therefore, the transaction concurrency capability of a single account is insufficient and cannot be applied in high-concurrency scenarios.

[0096] Based on this, in this specification, based on the replay attack protection solution shown above, a technical solution is proposed that can improve the transaction concurrency capability of a single account on the client.

[0097] In implementation, a Nonce list set may be maintained in the blockchain, in which Nonce lists corresponding to several user accounts may be included; and in the above-mentioned Nonce list, several Nonce records may be included; each Nonce record consists of a group identifier and a Nonce value.

[0098] When a user initiates multiple transactions that need to be executed concurrently through his personal user account on the client, the client can obtain available Nonce records with the same group identifier for the multiple transactions from the above Nonce list, add the obtained available Nonce records to the above multiple transactions, and then publish the multiple transactions to the blockchain.

[0099] After receiving the transaction sent by the client, the node device in the blockchain can match the available Nonce record carried in the transaction with the Nonce record in the Nonce list corresponding to the user account maintained in the blockchain to perform replay attack detection on the transaction; if the available Nonce record matches any target Nonce record in the Nonce list, the replay attack detection for the transaction passes, and the node device can accept the transaction;

[0100] Furthermore, the node device can reconfirm whether there are multiple transactions with the same grouping identifier in the Nonce record carried in all the accepted transactions; if so, it indicates that the multiple transactions need to be executed concurrently, and the node device can concurrently execute the multiple transactions with the same grouping identifier in the accepted transactions. In the above embodiment, by adding the same grouping identifier to multiple transactions to trigger the node devices in the blockchain to concurrently execute multiple transactions with the same grouping identifier, combined with the replay attack detection for transactions, the transaction concurrency capability of a single account on the client can be further improved on the basis of avoiding replay attacks on transactions.

[0101] The present specification is described below through specific embodiments and in combination with specific application scenarios.

[0102] Please refer to Figure 2 , Figure 2 A transaction processing method based on blockchain is provided in an embodiment of this specification; the method performs the following steps:

[0103] Step 202, the client obtains available Nonce records with the same group identifier for multiple transactions initiated by the user through the user account and requiring concurrent execution from the Nonce list corresponding to the user account maintained in the blockchain; wherein the Nonce list includes multiple Nonce records; and the Nonce record includes a group identifier and a Nonce value;

[0104] Step 204, the client adds the obtained available Nonce records to the multiple transactions respectively, and publishes the multiple transactions to the blockchain;

[0105] In step 206, the node device in the blockchain matches the available Nonce record in the received transaction with the Nonce record in the Nonce list corresponding to the user account maintained in the blockchain; if the available Nonce record matches any target Nonce record in the Nonce list, the transaction is accepted; and multiple transactions with the same grouping identifier in the accepted transactions are concurrently executed.

[0106] The blockchain described in this specification may specifically include private chains, public chains, and alliance chains, etc., which are not particularly limited in this specification.

[0107] For example, in one scenario, the blockchain can be a consortium chain consisting of a third-party payment platform server, a domestic bank server, a foreign bank server, and several user node devices as member devices. The operator of the consortium chain can rely on the consortium chain to deploy online services such as cross-border transfers and asset transfers based on the consortium chain.

[0108] It should be noted that the transaction described in this specification refers to a piece of data created by a user through a blockchain client and that needs to be ultimately published to the distributed database of the blockchain.

[0109] Transactions in the blockchain are usually divided into narrow transactions and broad transactions. A transaction in the narrow sense refers to a value transfer published by a user to the blockchain. A transaction in the broad sense refers to a business data with business intent published by a user to the blockchain; for example, an operator can build a consortium chain based on actual business needs, and rely on the consortium chain to deploy some other types of online services that are not related to value transfer (for example, anti-counterfeiting verification business, rental business, vehicle dispatch business, insurance claims business, credit services, medical services, etc.), and in this type of consortium chain, a transaction can be a business message or business request with business intent published by a user in the consortium chain.

[0110] In this specification, the above-mentioned client can specifically be a multi-threaded client; that is, the client can enable multiple threads at the same time, and each thread can run independently, so that the user can initiate multiple transactions at the same time through a personal user account by calling multiple threads of the client.

[0111] When the client receives multiple transactions initiated by the user through the user account, it can determine whether there are multiple transactions that need to be executed concurrently among the transactions initiated by the user through the user account;

[0112] In this specification, multiple transactions that need to be executed concurrently may include any type of transactions that do not have a strict transaction execution order and can be processed and executed concurrently;

[0113] For example, if the execution of a transaction requires the execution result of another transaction as input, then the two transactions will not be processed and executed concurrently; on the contrary, if there is no data dependency relationship between the two transactions as described above, then they can be processed and executed concurrently.

[0114] In implementation, multiple transactions that need to be executed concurrently can be manually specified by the user when initiating transactions through the user account;

[0115] For example, in one embodiment shown, after initiating a plurality of transactions, the user can manually specify, based on demand, multiple transactions that need to be executed concurrently through a user interface provided by the client.

[0116] In actual applications, multiple transactions that need to be executed concurrently can also be dynamically confirmed by the client based on preset concurrent processing rules.

[0117] The specific content of the above concurrent processing rules is not particularly limited in this specification. In practical applications, those skilled in the art can flexibly define them based on actual concurrent processing requirements.

[0118] For example, in one embodiment shown, the above-mentioned concurrent execution rule may be a rule of "concurrently executing transactions of the same transaction type";

[0119] In this case, after receiving numerous transactions initiated by the user, the client can further check the specific transaction types of these transactions; then, multiple transactions with the same transaction type are determined as transactions that need to be executed concurrently; for example, if the transaction types supported by the blockchain include transaction types for creating accounts and transaction types for transferring money, the client can determine the transaction types for creating accounts and transaction types for transferring money among the numerous transactions initiated by the user, and then determine the multiple transactions corresponding to these two types of transactions as transactions that need to be executed concurrently.

[0120] Of course, in actual applications, the above-mentioned concurrent processing rules, in addition to the rule of "concurrently executing transactions of the same transaction type", may also be other forms of concurrent processing rules, which will not be listed one by one in this specification.

[0121] In this specification, a Nonce list set can be maintained in the blockchain, and the Nonce list set can include Nonce lists corresponding to several user accounts. In the above Nonce list, multiple Nonce records can be included. Each Nonce record can include auxiliary parameters and Nonce values.

[0122] That is, in this specification, the above-mentioned Nonce record can specifically be a composite structure consisting of multiple fields including a Nonce value.

[0123] In implementation, the operator of the above blockchain may pre-assign an available Nonce value to each user account, and on the basis of the assigned available Nonce value, set a corresponding auxiliary field for each Nonce value, and then construct multiple Nonce records based on each available Nonce value and the corresponding auxiliary field;

[0124] Then, a Nonce list can be constructed for the user account based on the generated multiple Nonce records; finally, the above-mentioned Nonce list set can be created based on the Nonce lists constructed for each user account, and the above-mentioned Nonce list set can be published to the above-mentioned blockchain, and the node devices in the above-mentioned blockchain will perform consensus processing, and after the consensus is passed, the above-mentioned Nonce list set will be stored in the distributed data of the above-mentioned blockchain for storage and maintenance.

[0125] It should be noted that the specific parameter content of the above-mentioned auxiliary parameters is not particularly limited in this specification; in actual applications, the above-mentioned auxiliary parameters may specifically include any form of parameters expanded by the operator of the above-mentioned blockchain based on the Nonce value available to the user account based on actual needs; or a combination of parameters.

[0126] That is, in practical applications, the number and categories of parameters included in the above auxiliary parameters may not be fixed; any parameter may be extended based on the Nonce value as an auxiliary parameter; or multiple parameters may be extended based on the Nonce value and combined as auxiliary parameters.

[0127] In this specification, the auxiliary parameters in the Nonce record in the above-mentioned Nonce list may specifically include a group identifier; wherein the group identifier is specifically used to indicate the group to which the transaction belongs, and transactions belonging to the same group are transactions that need to be executed concurrently; wherein, for the Nonce list corresponding to each user account in the above-mentioned Nonce list set, multiple Nonce records with the same group identifier may be included, so that when a user initiates multiple transactions that need to be executed concurrently through a personal user account, the client can obtain Nonce records with the same group identifier for the multiple transactions from the above-mentioned Nonce list.

[0128] In an embodiment shown, the auxiliary parameters in the Nonce record in the Nonce list may include, in addition to the group identifier, an index identifier (such as an index number) of the Nonce record. The index identifier is specifically used to indicate the order and position of the Nonce record in the Nonce list.

[0129] For example, see Figure 3 , taking the auxiliary parameters in the Nonce record in the above Nonce list, including the above group identifier and the index identifier of the above Nonce record as an example, the above Nonce record can be a composite structure consisting of fields such as Group ID (group identifier), Index (index identifier), and Value (Nonce value). In this case, the Nonce list set maintained in the blockchain can be expressed as follows Figure 3 The form shown.

[0130] The specific byte lengths of the Nonce record, the Nonce value in the Nonce record, and the auxiliary parameters are not particularly limited in this specification; in practical applications, they can be flexibly set based on the actual needs of the operator of the blockchain (for example, the operator can control the specific value range of the Nonce value and the auxiliary parameters by the occupied byte length);

[0131] For example, in one implementation, the Nonce record may be a composite structure consisting of 16 bytes, wherein 4 bytes represent Group ID (group identifier), 4 bytes represent Index (index identifier), and 8 bytes represent Value (Nonce value).

[0132] By expanding multiple parameters based on the Nonce value and combining them as auxiliary parameters, the Nonce records in the Nonce table can cover a variety of value fields, thereby reducing the probability of conflicts between multiple Nonce records in the Nonce table due to the same value;

[0133] For example, the probability of two Nonce records consisting of a Group ID and a Value with a total length of 12 bytes being exactly the same and colliding is much lower than the probability of two Nonce records consisting of a Group ID, an Index, and a Value with a total length of 16 bytes being exactly the same and colliding.

[0134] See also Figure 4 , when the user calls multiple threads enabled by the client on the client and initiates multiple transactions that need to be executed concurrently through his personal user account, the client can obtain the available Nonce records with the same group identifier for the multiple transactions from the above Nonce list corresponding to the user account maintained on the blockchain (that is, add the same group identifier to multiple transactions).

[0135] Since the Nonce list includes multiple Nonce records, multiple threads started by the client can obtain available Nonce records from the Nonce list for the initiated transactions, and then the user can use the personal user account to initiate multiple transactions through the client at the same time; therefore, in this specification, the number of Nonce records in the Nonce list can actually be used to indicate the transaction concurrency capability of the user's personal user account. For example, if the Nonce list includes 4 Nonce records, the user can initiate 4 transactions at the same time through the user account.

[0136] Based on this, in actual applications, the operator of the blockchain can flexibly specify the number of Nonce records contained in the above Nonce list based on the performance of the client itself; or, the client can actively report its own performance to the blockchain system, and the operator of the blockchain can flexibly specify the number of Nonce records contained in the above Nonce list;

[0137] For example, assuming that the performance of the client determines that the client can start 4 threads at the same time to initiate transactions, then when creating the above Nonce list for the user account that logs in to the client, 4 available Nonce records can be added to the Nonce list.

[0138] In one embodiment shown, the client can "download" the above-mentioned Nonce list maintained on the blockchain to the local for maintenance in advance during the initialization phase;

[0139] For example, during implementation, when the client starts running, or when the connection with the node device in the blockchain is disconnected and needs to be reconnected, an initialization operation is required. In this case, when the client receives an initialization instruction for the client triggered by the user (such as a startup instruction, a reconnection instruction, etc.), it can respond to the initialization instruction, establish a connection with the node device in the blockchain, and access the distributed database of the blockchain based on the connection, obtain the above-mentioned Nonce list maintained in the blockchain, and then the above-mentioned Nonce list obtained can be stored and maintained locally.

[0140] In this case, when the client needs to obtain available Nonce records with the same grouping identifier for the multiple transactions respectively, the available Nonce records can be directly obtained from the above Nonce list maintained locally.

[0141] In this way, data interaction with node devices on the blockchain can be avoided, data can be read from the above Nonce list maintained in the blockchain, and available Nonce records can be obtained for the target transaction, which can improve the processing performance of the client.

[0142] In actual applications, among the transactions initiated by the user through the user account, there may be multiple groups of transactions that need to be executed concurrently, and the multiple groups of transactions may maintain a certain execution order; in this case, if among the transactions initiated by the user through the user account, there are multiple groups of transactions that need to be executed concurrently, the client can further confirm the execution order of the multiple groups of transactions;

[0143] The execution order of the multiple groups of transactions may be manually defined by the user or dynamically confirmed by the client based on the actual business process, and is not specifically limited in this specification.

[0144] Furthermore, after determining the execution order of the multiple groups of transactions, the client needs to add the same grouping identifier to the multiple transactions included in the multiple groups of transactions and also needs to ensure that the grouping identifiers added to the multiple transactions included in the multiple groups of transactions can indicate the execution order of the multiple groups of transactions;

[0145] In this case, the above-mentioned Nonce list needs to include multiple groups of Nonce records with the same group identifier, and the group identifiers of different transaction groups also have different values; that is, the group identifiers of transactions in the same transaction group remain the same, while the transaction group identifiers in different transaction groups must have certain differences in values; thereby, it is ensured that the available Nonce records with the same group identifier and the group identifier indicating the execution order of the multiple groups of transactions can be obtained from the above-mentioned Nonce list for the transactions in the above-mentioned multiple groups of transactions. Among them, the use of group identifiers to indicate the execution order of multiple groups of transactions can be specifically achieved by adding group identifiers that are monotonically increasing in value to the multiple groups of transactions;

[0146] For example, suppose that in the transaction initiated by the user through the user account, there are two groups of transactions {A1, B1, C1} and {A2, B2, C2} that need to be executed concurrently; in this case, the client can obtain an available Nonce record containing the same grouping identifier 1 for transactions A1, B1, C1 from the above Nonce list, and obtain an available Nonce record containing the same grouping identifier 2 for transactions A2, B2, C2, and use the increasing value of the grouping identifier to indicate that the transaction group {A1, B1, C1} needs to be executed before the transaction group {A2, B2, C2}. That is, the execution order of the transaction groups is consistent with the order of the values ​​of the added transaction identifiers from small to large.

[0147] In an illustrated implementation manner, for the Nonce list maintained locally by the client, the client may add a mark indicating “available” by default to each Nonce record in the Nonce list.

[0148] For example, see Figure 5 , still using the above Nonce record as Figure 4 Taking the 16-byte composite structure shown in as an example, a 1-byte Available field can be extended for the Nonce record in the Nonce list; wherein, when the Available field value is T, it indicates that the Nonce record is "available"; when the Available field value is F, it indicates that the Nonce record is "unavailable".

[0149] On the one hand, when a thread enabled on a client obtains available Nonce records for multiple transactions initiated by a user from the Nonce list maintained locally on the client, multiple Nonce records with the same grouping identifier can be randomly selected from all Nonce records marked as "available" in the Nonce list as available Nonce records.

[0150] On the other hand, when the thread enabled on the client obtains available Nonce records for multiple transactions initiated by the user from the above-mentioned Nonce list maintained locally by the client, the mark carried by the available Nonce record can be modified and updated, and a mark indicating "unavailable" can be re-added to the available Nonce record to mark the available Nonce record as unavailable.

[0151] In this specification, after the client obtains available Nonce records for multiple transactions initiated by the user that need to be executed concurrently, the obtained available Nonce records can be added to the above multiple transactions;

[0152] For example, see Figure 4 After the client obtains the available Nonce record for the transaction, it can package the transaction body and the above available Nonce record, and then prompt the user to sign the packaged [transaction body, Nonce record] as a whole based on the private key held, so as to ensure that the Nonce record in the transaction cannot be tampered with.

[0153] Furthermore, after the client adds the obtained available Nonce records to the above multiple transactions, the client can publish the above multiple transactions to the blockchain;

[0154] For example, the above-mentioned multiple transactions are published to the node device connected to the client, or the multiple transactions are broadcasted in the blockchain; wherein, the specific manner in which the client publishes the above-mentioned multiple transactions to the blockchain usually depends on the consensus mechanism adopted by the blockchain and is not specifically limited in this specification.

[0155] When a node device in the blockchain receives a transaction issued by a client, it can first initiate consensus processing for the received transaction using the consensus algorithm adopted by the blockchain;

[0156] Among them, the consensus algorithm adopted by the blockchain and the consensus processing process of the above-mentioned target transactions based on the consensus algorithm will not be described in detail in this specification. When technical personnel in this field implement the technical solutions recorded in this specification, they can refer to the records in the relevant technology.

[0157] When the received transaction consensus is passed, the node devices in the above blockchain can further initiate a legitimacy check on the received transaction.

[0158] In this specification, the legitimacy check for a transaction may at least include a legitimacy check for a signature carried by the transaction and a replay attack check for the transaction.

[0159] During implementation, the node device in the above-mentioned blockchain can first verify the signature of the received transaction based on the public key corresponding to the private key held by the above-mentioned user; if the signature of the transaction fails, the transaction can be deemed to be an illegal transaction, and the above-mentioned node device can directly return a prompt message of transaction execution failure to the user through the client.

[0160] If the signature verification of the transaction passes, the above-mentioned node device can further perform replay attack detection on the transaction based on the available Nonce record carried in the transaction and the Nonce list corresponding to the user's personal user account maintained in the blockchain.

[0161] On the one hand, please continue to see Figure 4 , the above-mentioned node device can match the Nonce record carried in the transaction with the Nonce records in the Nonce list corresponding to the user account maintained on the blockchain one by one; if the Nonce record carried in the transaction matches any target Nonce record in the above-mentioned Nonce list, it can be determined that the transaction passes the replay attack detection; in this case, the node device can accept the transaction.

[0162] On the other hand, when the transaction is accepted, the node device may monotonically increase the Nonce value in the target Nonce record based on a preset range; wherein the preset range may be customized based on actual needs;

[0163] For example, the preset amplitude may still be 1, and the node device may increase the Nonce value in the target Nonce record matched in the Nonce list by 1 after the transaction is accepted.

[0164] In this way, if a transaction is republished in the blockchain after being accepted, since the Nonce value in the target Nonce record in the Nonce list that matches the available Nonce record carried by the transaction has been updated, the republished transaction will not be able to match the corresponding Nonce record in the Nonce list during the replay attack detection phase; therefore, the republished transaction will not be accepted again, thereby effectively avoiding replay attacks by republishing the transaction in the blockchain.

[0165] In one embodiment shown, when the transaction is accepted, a notification message of the transaction being accepted may be returned to the client; and after the client publishes the transaction initiated by the user through the personal user account to the blockchain, it may determine whether a notification message of the transaction being accepted returned by the node device is received.

[0166] If you confirm that you have received a notification message that the transaction has been accepted:

[0167] On the one hand, the Nonce value in the available Nonce record obtained for the initiated transaction from the Nonce list maintained locally by the client can be monotonically increased based on a preset amplitude; for example, the Nonce value in the available Nonce record is also increased by 1 to keep the content synchronized with the Nonce list maintained in the blockchain.

[0168] On the other hand, since the available Nonce record has been marked as "unavailable" before, after the Nonce value in the available Nonce record is monotonically increased based on a preset amplitude, the value of the Available field of the available Nonce record can be set to "T".

[0169] In this description, when all transactions initiated by the user sent by the client are accepted, the node device in the blockchain can further determine whether there are multiple transactions with the same grouping identifier among the accepted transactions sent by the client;

[0170] If there are multiple transactions with the same grouping identifier among the accepted transactions, the node devices in the blockchain can execute the multiple transactions concurrently, and after the execution of the multiple transactions is completed, the multiple transactions and the execution results of the multiple transactions will be stored in the distributed database of the blockchain.

[0171] Accordingly, if there are multiple groups of transactions with the same grouping identifier among the transactions sent by the client; and the grouping identifier in the available Nonce record added by the client for the multiple groups of transactions indicates the execution order of the multiple groups of transactions; in this case, the node device in the blockchain, after receiving the transaction with the added grouping identifier sent by the client and determining that there are multiple transactions with the same grouping identifier among the transactions sent by the client, can also execute the multiple groups of transactions sequentially according to the transaction order indicated by the transaction identifiers of the multiple transactions.

[0172] For example, still in the transaction initiated by the user through the user account, there are two groups of transactions {A1, B1, C1} and {A2, B2, C2} that need to be executed concurrently; and the client adds an available Nonce record containing the same grouping identifier 1 for transactions A1, B1, C1, and adds an available Nonce record containing the same grouping identifier 2 for transactions A2, B2, C2. In this case, after the above transactions A1, B1, C1 and A2, B2, C2 are accepted, the node devices in the blockchain will first concurrently execute transactions A1, B1, C1 in the transaction group with grouping identifier 1, and then concurrently execute transactions A2, B2, C2 in the transaction group with grouping identifier 2.

[0173] In the above scheme, by adding the same grouping identifier to multiple transactions to trigger the node devices in the blockchain to concurrently execute multiple transactions with the same grouping identifier, combined with the replay attack detection for transactions, the transaction concurrency capability of a single account on the client can be further improved on the basis of avoiding replay attacks on transactions.

[0174] Corresponding to the above method embodiments, this specification also provides an embodiment of a transaction processing device based on blockchain. The embodiment of the transaction processing device based on blockchain in this specification can be applied to electronic devices. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of the electronic device in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory and running them. From the hardware level, if Figure 6 The figure is a hardware structure diagram of the electronic device where the blockchain-based transaction processing device of this specification is located, except Figure 6 In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device in which the device in the embodiment is located may also include other hardware according to the actual function of the electronic device, which will not be described in detail.

[0175] Figure 7 It is a block diagram of a transaction processing device based on blockchain shown in an exemplary embodiment of this specification.

[0176] Please refer to Figure 7 The blockchain-based transaction processing device 70 can be applied in the aforementioned Figure 6 The electronic device shown includes: an acquisition module 701 , an adding module 702 and a publishing module 703 .

[0177] The acquisition module 701 acquires available Nonce records with the same group identifier for multiple transactions initiated by the user through the user account and requiring concurrent execution from the Nonce list corresponding to the user account maintained in the blockchain; wherein the Nonce list includes multiple Nonce records; and the Nonce record includes a group identifier and a Nonce value;

[0178] An adding module 702 adds the obtained available Nonce records to the multiple transactions respectively;

[0179] The publishing module 703 publishes the multiple transactions to the blockchain, so that the node device in the blockchain matches the available Nonce record in the transaction published by the client with the Nonce record in the Nonce list, and accepts the transaction when the available Nonce record matches any target Nonce record in the Nonce list, and concurrently executes multiple transactions with the same grouping identifier in the accepted transactions.

[0180] In this embodiment, the multiple transactions that need to be executed concurrently include multiple transactions of the same transaction type.

[0181] In this embodiment, the acquisition module 701 further:

[0182] If the transaction initiated by the user through the user account includes multiple groups of transactions that need to be executed concurrently, determine the execution order of the multiple groups of transactions;

[0183] Obtain available Nonce records from the Nonce list for the multiple groups of transactions, each of which has the same group identifier and indicates an execution order of the multiple groups of transactions.

[0184] In this embodiment, the acquisition module 701 further:

[0185] Before respectively obtaining available Nonce records with the same grouping identifier for multiple transactions initiated by the user through the user account and requiring concurrent execution from the Nonce list, in response to an initialization instruction for the client, obtaining the Nonce list maintained in the blockchain, and maintaining the obtained Nonce list locally on the client;

[0186] From the Nonce list maintained locally by the client, available Nonce records with the same grouping identifier are obtained for multiple transactions initiated by the user through the user account that need to be executed concurrently.

[0187] In this embodiment, the Nonce records in the Nonce list maintained locally by the client are marked as available by default;

[0188] The acquisition module 701:

[0189] After respectively obtaining available Nonce records with the same grouping identifier for multiple transactions initiated by the user through the user account and requiring concurrent execution from the Nonce list locally maintained by the client, the available Nonce records are marked as unavailable in the Nonce list.

[0190] In this embodiment, the acquisition module 701 further:

[0191] Determining whether a notification message returned by the node device indicating that the transaction is accepted is received;

[0192] If yes, the Nonce value in the available Nonce record is monotonically increased based on a preset amplitude, and after the Nonce value is monotonically increased, the available Nonce record is re-marked as available in the Nonce list.

[0193] In this embodiment, the client is a multi-threaded client; the number of Nonce records in the Nonce list indicates the transaction concurrency capability of the user account.

[0194] In this embodiment, the Nonce record further includes: an index identifier of the Nonce record.

[0195] Figure 8 It is a block diagram of another blockchain-based transaction processing device shown in an exemplary embodiment of this specification.

[0196] Please refer to Figure 8 The blockchain-based transaction processing device 80 can also be used in the aforementioned Figure 6 The electronic device shown includes: a receiving module 801 , a second determining module 802 and an executing module 803 .

[0197] A receiving module 801 receives a transaction sent by a client and initiated by a user through a user account; wherein the transaction is added with an available Nonce record obtained from a Nonce list corresponding to the user account maintained in the blockchain; wherein the Nonce list includes multiple Nonce records; and the Nonce record includes a group identifier and a Nonce value;

[0198] A matching module 802 matches the available Nonce record in the received transaction with the Nonce record in the Nonce list corresponding to the user account maintained in the blockchain;

[0199] The execution module 803 accepts the transaction if the available Nonce record matches any target Nonce record in the Nonce list; and concurrently executes multiple transactions with the same grouping identifier among the accepted transactions.

[0200] In this embodiment, the transactions sent by the client include multiple groups of transactions with the same group identifiers of the multiple transactions included therein; the group identifiers in the available Nonce records added by the client for the multiple groups of transactions indicate the execution order of the multiple groups of transactions;

[0201] The execution module 803 further:

[0202] If there are multiple groups of transactions with the same grouping identifiers of the multiple transactions included in the transactions sent by the client, the multiple groups of transactions are sequentially executed according to the execution order indicated by the grouping identifiers of the multiple groups of transactions.

[0203] In this embodiment, the execution module 803 further:

[0204] If the available Nonce record matches any target Nonce record in the Nonce list, monotonically increasing the Nonce value of the target Nonce record based on a preset amplitude; and

[0205] A notification message that the transaction is accepted is returned to the client.

[0206] In this embodiment, the Nonce record further includes: an index identifier of the Nonce record.

[0207] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.

[0208] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0209] The systems, devices, modules or modules described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0210] Corresponding to the above method embodiment, this specification also provides an embodiment of an electronic device. The electronic device includes: a processor and a memory for storing machine executable instructions; wherein the processor and the memory are usually connected to each other through an internal bus. In other possible implementations, the device may also include an external interface to enable communication with other devices or components.

[0211] In this embodiment, by reading and executing the machine executable instructions corresponding to the control logic of blockchain-based transaction processing stored in the memory, the processor is prompted to:

[0212] From the Nonce list corresponding to the user account maintained in the blockchain, for multiple transactions initiated by the user through the user account that need to be executed concurrently, obtain available Nonce records with the same group identifier respectively; wherein the Nonce list includes multiple Nonce records; and the Nonce record includes a group identifier and a Nonce value;

[0213] Add the obtained available Nonce records to the multiple transactions respectively;

[0214] The multiple transactions are published to the blockchain, so that the node device in the blockchain matches the available Nonce record in the transaction published by the client with the Nonce record in the Nonce list, and accepts the transaction when the available Nonce record matches any target Nonce record in the Nonce list, and concurrently executes multiple transactions with the same grouping identifier in the accepted transactions.

[0215] In this embodiment, by reading and executing the machine executable instructions corresponding to the control logic of blockchain-based transaction processing stored in the memory, the processor is prompted to:

[0216] If the transaction initiated by the user through the user account includes multiple groups of transactions that need to be executed concurrently, determine the execution order of the multiple groups of transactions;

[0217] Obtain available Nonce records from the Nonce list for the multiple groups of transactions, each of which has the same group identifier and indicates an execution order of the multiple groups of transactions.

[0218] In this embodiment, by reading and executing the machine executable instructions corresponding to the control logic of blockchain-based transaction processing stored in the memory, the processor is prompted to:

[0219] Before respectively obtaining available Nonce records with the same grouping identifier for multiple transactions initiated by the user through the user account and requiring concurrent execution from the Nonce list, in response to an initialization instruction for the client, obtaining the Nonce list maintained in the blockchain, and maintaining the obtained Nonce list locally on the client;

[0220] From the Nonce list maintained locally by the client, obtain available Nonce records with the same grouping identifier for multiple transactions initiated by the user through the user account that need to be executed concurrently

[0221] In this embodiment, the Nonce records in the Nonce list maintained locally by the client are marked as available by default;

[0222] By reading and executing machine-executable instructions stored in the memory corresponding to control logic for blockchain-based transaction processing, the processor is caused to:

[0223] After respectively obtaining available Nonce records with the same grouping identifier for multiple transactions initiated by the user through the user account and requiring concurrent execution from the Nonce list locally maintained by the client, the available Nonce records are marked as unavailable in the Nonce list.

[0224] In this embodiment, by reading and executing the machine executable instructions corresponding to the control logic of blockchain-based transaction processing stored in the memory, the processor is prompted to:

[0225] Determining whether a notification message returned by the node device indicating that the transaction is accepted is received;

[0226] If yes, the Nonce value in the available Nonce record is monotonically increased based on a preset amplitude, and after the Nonce value is monotonically increased, the available Nonce record is re-marked as available in the Nonce list.

[0227] Corresponding to the above method embodiment, this specification also provides another embodiment of an electronic device. The electronic device includes: a processor and a memory for storing machine executable instructions; wherein the processor and the memory are usually connected to each other through an internal bus. In other possible implementations, the device may also include an external interface to enable communication with other devices or components.

[0228] In this embodiment, by reading and executing the machine executable instructions corresponding to the control logic of blockchain-based transaction processing stored in the memory, the processor is prompted to:

[0229] Receiving a transaction initiated by a user through a user account sent by a client; wherein the transaction is added with an available Nonce record obtained from a Nonce list corresponding to the user account maintained in the blockchain; wherein the Nonce list includes multiple Nonce records; and the Nonce record includes a group identifier and a Nonce value;

[0230] Matching the available Nonce record in the received transaction with the Nonce record in the Nonce list corresponding to the user account maintained in the blockchain;

[0231] If the available Nonce record matches any target Nonce record in the Nonce list, the transaction is accepted; and multiple transactions with the same grouping identifier in the accepted transactions are concurrently executed.

[0232] In this embodiment, the transactions sent by the client include multiple groups of transactions with the same group identifiers of the multiple transactions included therein; the group identifiers in the available Nonce records added by the client for the multiple groups of transactions indicate the execution order of the multiple groups of transactions;

[0233] By reading and executing machine-executable instructions stored in the memory corresponding to control logic for blockchain-based transaction processing, the processor is caused to:

[0234] If there are multiple groups of transactions with the same grouping identifiers of the multiple transactions included in the transactions sent by the client, the multiple groups of transactions are sequentially executed according to the execution order indicated by the grouping identifiers of the multiple groups of transactions.

[0235] In this embodiment, by reading and executing the machine executable instructions corresponding to the control logic of blockchain-based transaction processing stored in the memory, the processor is prompted to:

[0236] If the available Nonce record matches any target Nonce record in the Nonce list, monotonically increasing the Nonce value of the target Nonce record based on a preset amplitude; and

[0237] A notification message that the transaction is accepted is returned to the client.

[0238] Those skilled in the art will readily appreciate other embodiments of the specification after considering the specification and practicing the invention disclosed herein. The specification is intended to cover any variations, uses, or adaptations of the specification that follow the general principles of the specification and include common knowledge or customary techniques in the art that are not disclosed in the specification. The specification and examples are to be considered exemplary only, and the true scope and spirit of the specification are indicated by the following claims.

[0239] It should be understood that the present description is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.

[0240] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

Claims

1. A transaction processing method based on blockchain, applied to a client, comprising: In response to multiple transactions that need to be executed concurrently initiated by a user through a user account, obtain available Nonce records with the same group identifier for the multiple transactions from a Nonce list corresponding to the user account maintained by the blockchain; wherein the Nonce record includes a group identifier and a Nonce value, and the Nonce list includes multiple Nonce records; Add the obtained available Nonce records to the multiple transactions respectively; The multiple transactions are published to the blockchain, so that the node device in the blockchain matches the available Nonce record in the transaction published by the client with the Nonce record in the Nonce list, and accepts the transaction when the available Nonce record matches any target Nonce record in the Nonce list, and concurrently executes multiple transactions with the same grouping identifier in the accepted transactions.

2. According to the method of claim 1, the blockchain maintains a Nonce list set; the Nonce list set includes Nonce lists corresponding to several user accounts.

3. According to the method of claim 1 or 2, the multiple transactions that need to be executed concurrently include multiple transactions of the same transaction type.

4. The method according to claim 1, further comprising: If the multiple transactions include multiple groups of transactions that need to be executed concurrently, determining the execution order of the multiple groups of transactions; Obtain available Nonce records from the Nonce list for the multiple groups of transactions, each of which has the same group identifier and indicates an execution order of the multiple groups of transactions.

5. The method according to claim 1, before obtaining available Nonce records with the same grouping identifier for the multiple transactions from the Nonce list corresponding to the user account maintained in the blockchain, further comprises: In response to an initialization instruction for the client, obtaining the Nonce list corresponding to the user account maintained in the blockchain, and maintaining the obtained Nonce list locally on the client; Obtaining available Nonce records with the same grouping identifier from the Nonce list for multiple transactions initiated by the user through the user account that need to be executed concurrently, respectively, including: From the Nonce list maintained locally by the client, available Nonce records with the same grouping identifier are obtained for multiple transactions initiated by the user through the user account that need to be executed concurrently.

6. According to the method of claim 5, the Nonce record in the Nonce list locally maintained by the client is marked as available by default; The method further comprises: After respectively obtaining available Nonce records with the same grouping identifier for multiple transactions initiated by the user through the user account and requiring concurrent execution from the Nonce list locally maintained by the client, the available Nonce records are marked as unavailable in the Nonce list.

7. The method according to claim 6, further comprising: Determining whether a notification message returned by a node device of the blockchain indicating that any of the multiple transactions is accepted is received; If yes, the Nonce value in the available Nonce record in the Nonce list locally maintained by the client is monotonically increased based on a preset amplitude, and after the Nonce value is monotonically increased, the available Nonce record is re-marked as available in the Nonce list.

8. The method according to claim 1, wherein the client is a multi-threaded client; and the number of Nonce records in the Nonce list indicates the transaction concurrency capability of the user account.

9. The method according to claim 1 or 2, wherein the Nonce record further comprises: The index identifier of the Nonce record.

10. A transaction processing method based on blockchain, applied to a node device in blockchain, comprising: Receiving a transaction initiated by a user through a user account sent by a client; wherein the transaction is added with an available Nonce record obtained from a Nonce list corresponding to the user account maintained in the blockchain; wherein the Nonce record includes a group identifier and a Nonce value, and the Nonce list includes multiple Nonce records; Matching the available Nonce record in the received transaction with the Nonce record in the Nonce list corresponding to the user account maintained in the blockchain; If the available Nonce record matches any target Nonce record in the Nonce list, the transaction is accepted; and multiple transactions with the same grouping identifier in the accepted transactions are concurrently executed.

11. According to the method of claim 10, the blockchain maintains a Nonce list set; the Nonce list set includes Nonce lists corresponding to several user accounts.

12. The method according to claim 10, wherein the transactions sent by the client include multiple groups of transactions having the same group identifiers of the multiple transactions included therein; the group identifiers in the available Nonce records added by the client for the multiple groups of transactions indicate the execution order of the multiple groups of transactions; The method further comprises: If there are multiple groups of transactions with the same grouping identifiers of the multiple transactions included in the transactions sent by the client, the multiple groups of transactions are sequentially executed according to the execution order indicated by the grouping identifiers of the multiple groups of transactions.

13. The method according to claim 10, further comprising: If the available Nonce record matches any target Nonce record in the Nonce list, monotonically increasing the Nonce value of the target Nonce record based on a preset amplitude; and A notification message that the transaction is accepted is returned to the client.

14. The method according to claim 10, wherein the Nonce record further comprises: The index identifier of the Nonce record.

15. A transaction processing device based on blockchain, applied to a client, comprising: an acquisition module, in response to multiple transactions initiated by a user through a user account that need to be executed concurrently, acquiring available Nonce records with the same group identifier for the multiple transactions from a Nonce list corresponding to the user account maintained by the blockchain; wherein the Nonce record includes a group identifier and a Nonce value, and the Nonce list includes multiple Nonce records; An adding module is used to add the obtained available Nonce records to the multiple transactions respectively; The publishing module publishes the multiple transactions to the blockchain, so that the node device in the blockchain matches the available Nonce record in the transaction published by the client with the Nonce record in the Nonce list, and accepts the transaction when the available Nonce record matches any target Nonce record in the Nonce list, and concurrently executes multiple transactions with the same grouping identifier in the accepted transactions.

16. The apparatus according to claim 15, wherein the blockchain maintains a Nonce list set; the Nonce list set includes Nonce lists corresponding to a number of user accounts.

17. The device according to claim 15 or 16, wherein the multiple transactions that need to be executed concurrently include multiple transactions of the same transaction type.

18. The device according to claim 15, wherein the acquisition module further: If the multiple transactions include multiple groups of transactions that need to be executed concurrently, determining the execution order of the multiple groups of transactions; Obtain available Nonce records from the Nonce list for the multiple groups of transactions, each of which has the same group identifier and indicates an execution order of the multiple groups of transactions.

19. The device according to claim 15, wherein the acquisition module further: Before respectively obtaining available Nonce records with the same grouping identifier for the multiple transactions from the Nonce list corresponding to the user account maintained in the blockchain, in response to an initialization instruction for the client, obtaining the Nonce list corresponding to the user account maintained in the blockchain, and maintaining the obtained Nonce list locally on the client; Obtaining available Nonce records with the same grouping identifier from the Nonce list for multiple transactions initiated by the user through the user account that need to be executed concurrently, respectively, including: From the Nonce list maintained locally by the client, available Nonce records with the same grouping identifier are obtained for multiple transactions initiated by the user through the user account that need to be executed concurrently.

20. The apparatus according to claim 19, wherein the Nonce record in the Nonce list locally maintained by the client is marked as available by default; The acquisition module further: after respectively acquiring available Nonce records with the same grouping identifier for multiple transactions initiated by the user through the user account and requiring concurrent execution from the Nonce list locally maintained by the client, the available Nonce records are marked as unavailable in the Nonce list.

21. The device according to claim 20, wherein the acquisition module further: Determining whether a notification message returned by a node device of the blockchain indicating that any of the multiple transactions is accepted is received; If yes, the Nonce value in the available Nonce record in the Nonce list locally maintained by the client is monotonically increased based on a preset amplitude, and after the Nonce value is monotonically increased, the available Nonce record is re-marked as available in the Nonce list.

22. The device according to claim 15, wherein the client is a multi-threaded client; and the number of Nonce records in the Nonce list indicates the transaction concurrency capability of the user account.

23. The apparatus according to claim 15 or 16, wherein the Nonce record further comprises: The index identifier of the Nonce record.

24. A transaction processing device based on blockchain, applied to a node device in blockchain, comprising: A receiving module, receiving a transaction initiated by a user through a user account sent by a client; wherein the transaction is added with an available Nonce record obtained from a Nonce list corresponding to the user account maintained in the blockchain; wherein the Nonce record includes a group identifier and a Nonce value, and the Nonce list includes multiple Nonce records; A matching module, matching the available Nonce record in the received transaction with the Nonce record in the Nonce list corresponding to the user account maintained in the blockchain; The execution module accepts the transaction if the available Nonce record matches any target Nonce record in the Nonce list; and concurrently executes multiple transactions with the same grouping identifier among the accepted transactions.

25. The apparatus according to claim 24, wherein the blockchain maintains a Nonce list set; the Nonce list set includes Nonce lists corresponding to a number of user accounts.

26. The device according to claim 24, wherein the transactions sent by the client include multiple groups of transactions having the same group identifiers of the multiple transactions included therein; the group identifiers in the available Nonce records added by the client for the multiple groups of transactions indicate the execution order of the multiple groups of transactions; The execution module further: if there are multiple groups of transactions with the same grouping identifiers of the multiple transactions included in the transactions sent by the client, the multiple groups of transactions are sequentially executed according to the execution order indicated by the grouping identifiers of the multiple groups of transactions.

27. The apparatus according to claim 24, wherein the execution module further: If the available Nonce record matches any target Nonce record in the Nonce list, monotonically increasing the Nonce value of the target Nonce record based on a preset amplitude; and A notification message that the transaction is accepted is returned to the client.

28. The apparatus according to claim 24, wherein the Nonce record further comprises: The index identifier of the Nonce record.

29. A blockchain-based transaction processing electronic device, comprising: processor; memory for storing machine-executable instructions; Wherein, by reading and executing the machine executable instructions corresponding to the control logic of blockchain-based transaction processing stored in the memory, the processor is prompted to: In response to multiple transactions initiated by a user through a user account that need to be executed concurrently, obtain available Nonce records with the same grouping identifier for the multiple transactions from a Nonce list corresponding to the user account maintained in the blockchain; wherein the Nonce list includes multiple Nonce records; and the Nonce record includes a grouping identifier and a Nonce value; Add the obtained available Nonce records to the multiple transactions respectively; The multiple transactions are published to the blockchain, so that the node device in the blockchain matches the available Nonce record in the transaction published by the client with the Nonce record in the Nonce list, and accepts the transaction when the available Nonce record matches any target Nonce record in the Nonce list, and concurrently executes multiple transactions with the same grouping identifier in the accepted transactions.

30. A blockchain-based transaction processing electronic device, comprising: processor; memory for storing machine-executable instructions; Wherein, by reading and executing the machine executable instructions corresponding to the control logic of blockchain-based transaction processing stored in the memory, the processor is prompted to: Receiving a transaction initiated by a user through a user account sent by a client; wherein the transaction is added with an available Nonce record obtained from a Nonce list corresponding to the user account maintained in the blockchain; wherein the Nonce list includes multiple Nonce records; and the Nonce record includes a group identifier and a Nonce value; Matching the available Nonce record in the received transaction with the Nonce record in the Nonce list corresponding to the user account maintained in the blockchain; If the available Nonce record matches any target Nonce record in the Nonce list, the transaction is accepted; and multiple transactions with the same grouping identifier in the accepted transactions are concurrently executed.