Data processing method and device, equipment and storage medium

By building a target data structure group, recording the read and write information of transactions in the blockchain network, accurately identifying and handling conflicts between transactions, the problem of transaction conflicts in parallel scheduling execution is solved, and the accuracy and consistency of transaction execution is improved.

CN120029523APending Publication Date: 2025-05-23TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311572369.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-22
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

In blockchain networks, parallel scheduling execution mechanisms may lead to conflicts between transactions, resulting in incorrect transaction execution results, which are difficult for prior art to accurately identify and handle.

Method used

By obtaining the execution information and read and write information of multiple transactions in the blockchain network, a target data structure group is constructed, and the reference status of each data key and the reference status of each transaction are recorded, thereby identifying the types of conflicts between transactions.

Benefits of technology

It realizes accurate identification of the types of conflicts between transactions in the blockchain network, ensures the accuracy and consistency of transaction execution, and improves the reliability of the blockchain network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029523A_ABST
    Figure CN120029523A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method, device and equipment based on a block chain technology, and a storage medium. The method comprises the following steps: obtaining execution information of N transactions in a block chain network and read-write information of each transaction; the read-write information of any transaction comprises a data key referenced by each data processing operation indicated by the corresponding transaction; constructing a target data structure group recording the reference condition of each data key and the key reference condition of each transaction by adopting the execution information and the corresponding read-write information of the N transactions; the quotation condition of any data key indicates the transaction quoting the corresponding data key; the key reference condition of the nth transaction indicates the number of transactions which reference the same data key as the nth transaction in transactions executed before the nth transaction; and based on the target data structure group, identifying the conflict type between the transactions with the transaction conflicts in the N transactions, so that the conflict type between the transactions can be accurately identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a data processing method, device, equipment and storage medium. Background Art

[0002] At present, there are two main transaction scheduling and execution mechanisms in blockchain networks, one is the serial scheduling and execution mechanism, and the other is the parallel scheduling and execution mechanism. Compared with serial scheduling and execution, parallel scheduling and execution can improve execution efficiency, but there may be transaction conflicts between transactions during parallel scheduling and execution. Transactions with transaction conflicts may obtain incorrect transaction execution results when they are executed in parallel. If multiple transactions need to read or write data from the same data key (a structure used to store data) during execution, there will be transaction conflicts between the multiple transactions. Based on this, how to detect transaction conflicts is a current research hotspot. Summary of the invention

[0003] The embodiments of the present application provide a data processing method, apparatus, device and storage medium, which can accurately identify the conflict types between transactions.

[0004] On the one hand, an embodiment of the present application provides a data processing method, the method comprising:

[0005] Obtain execution information of N transactions in the blockchain network; any transaction is used to indicate at least one of the following data processing operations: data reading operation and data writing operation, and the execution information of any transaction is used to indicate the order in which the corresponding transactions are executed, and N is a positive integer;

[0006] Determine the read and write information for each transaction; the read and write information for any transaction includes: the data key referenced by each data processing operation indicated by the corresponding transaction, and the data key is a structure used to store data;

[0007] The execution information and corresponding read-write information of the N transactions are used to construct a target data structure group; wherein the target data structure group records the reference status of each data key and the key reference status of each transaction; the reference status of any data key indicates: the transaction that references the corresponding data key; the key reference status of the nth transaction indicates: among the transactions executed before the nth transaction, the number of transactions that reference the same data key as the nth transaction, n∈[1,N];

[0008] Based on the target data structure group, conflict types between transactions having transaction conflicts among the N transactions are identified.

[0009] On the one hand, an embodiment of the present application provides a data processing device, the device comprising:

[0010] An acquisition unit, used to acquire execution information of N transactions in the blockchain network; any transaction is used to indicate at least one of the following data processing operations: a data reading operation and a data writing operation, and the execution information of any transaction is used to indicate the order in which the corresponding transactions are executed, and N is a positive integer;

[0011] A processing unit for determining read and write information for each transaction; the read and write information for any transaction includes: a data key referenced by each data processing operation indicated by the corresponding transaction, the data key being a structure for storing data;

[0012] The processing unit is further used to construct a target data structure group using the execution information and corresponding read-write information of the N transactions; wherein the target data structure group records the reference status of each data key and the key reference status of each transaction; the reference status of any data key indicates: the transaction that references the corresponding data key; the key reference status of the nth transaction indicates: the number of transactions that reference the same data key as the nth transaction among the transactions executed before the nth transaction, n∈[1,N];

[0013] The processing unit is further configured to identify, based on the target data structure group, conflict types between transactions having transaction conflicts among the N transactions.

[0014] In one aspect, an embodiment of the present application provides a computer device, the computer device comprising an input interface and an output interface, and the computer device further comprising:

[0015] processor and computer storage media;

[0016] The computer storage medium is used to store a computer program;

[0017] The processor is used to run the computer program to implement the above data processing method.

[0018] On the one hand, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the above-mentioned data processing method.

[0019] On the one hand, an embodiment of the present application provides a computer program product, which includes a computer program stored in a computer storage medium; a processor of a computer device reads the computer program from the computer storage medium, and the processor executes the computer program, so that the computer device executes the above-mentioned data processing method.

[0020] In an embodiment of the present application, the execution information of N transactions in the blockchain network and the read-write information of each transaction can be used to construct a target data structure group, and based on the target data structure group, the conflict type between each transaction in which there is a transaction conflict in the N transactions can be identified; wherein the execution information of any transaction can be used to indicate the order in which the corresponding transactions are executed, and the read-write information of any transaction can include the data keys referenced by each data processing operation indicated by the corresponding transaction. The target data structure group constructed based on the execution information and the read-write information of the N transactions records the reference of each data key and the key reference of each transaction, and the reference of any data key Situation indication: transactions that reference corresponding data keys, key reference situation indication of the nth transaction: the number of transactions that reference the same data key as the nth transaction in transactions executed before the nth transaction; through the construction of the target data structure group, the reference situation of each data key and the key reference situation of each transaction can be recorded, and the conflict type between each transaction with transaction conflicts in N transactions can be accurately identified by table lookup according to the reference situation of each data key and the key reference situation of each transaction recorded in the target data structure group, that is, transactions with various conflict types in N transactions can be accurately identified. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0022] Figure 1 It is a structural diagram of a data processing system provided in an embodiment of the present application;

[0023] Figure 2 It is a flowchart of a data processing method provided in an embodiment of the present application;

[0024] Figure 3 It is a flowchart of another data processing method provided in an embodiment of the present application;

[0025] Figure 4a It is a schematic diagram of a data processing operation of a transaction indication provided in an embodiment of the present application;

[0026] Figure 4b It is a schematic diagram of the world state of a blockchain provided by an embodiment of the present application;

[0027] Figure 4c is a schematic diagram of an initial data structure group provided in an embodiment of the present application;

[0028] Figure 4d is a schematic diagram of filling a data structure group to be filled provided by an embodiment of the present application;

[0029] Figure 4e is another schematic diagram of filling a data structure group to be filled provided by an embodiment of the present application;

[0030] Figure 4f is a schematic diagram of a target data structure group provided in an embodiment of the present application;

[0031] Figure 4g is a schematic diagram of a transaction conflict between transactions provided in an embodiment of the present application;

[0032] Figure 5 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;

[0033] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0035] The embodiment of the present application proposes a data processing scheme based on blockchain technology, wherein blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission (i.e., Peer to Peer transmission, i.e., a transmission method based on a peer-to-peer transmission protocol), consensus mechanism, encryption algorithm, etc.; it is essentially a decentralized database, a string of data blocks (i.e., blocks) generated by cryptographic methods; each data block (block) contains a batch of network transaction information (i.e., data), which is used to verify the validity of its information (i.e., anti-counterfeiting) and generate the next block. The blockchain includes a series of blocks (Blocks) that are connected to each other in the order of their generation, and the blocks record the block data packaged and submitted by the blockchain nodes in the blockchain system; the blockchain may include the blockchain underlying platform, the platform product service layer, and the application service layer.

[0036] The underlying blockchain platform can include processing modules such as object management, basic services, smart contracts, and operational supervision. Among them, the object management module is responsible for the identity information management of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintaining the correspondence between the object's real identity and blockchain address (authority management), etc., and, under authorization, supervises and audits the transactions of certain real identities and provides risk control rule configuration (risk control audit); the basic service module is deployed on all blockchain node devices (also known as blockchain nodes) used to maintain the blockchain to verify the validity of business requests and record valid requests to storage after consensus is reached. For a new business request, the basic service module first performs interface adaptation analysis and authentication processing (interface adaptation), and then uses the consensus algorithm to convert the business request into a valid business request. The business information is encrypted (consensus management), and after encryption, it is completely and consistently transmitted to the shared ledger (network communication), and recorded and stored; the smart contract module is responsible for the registration and issuance of contracts, contract triggering and contract execution. Developers can define the contract logic in a certain programming language and publish it to the blockchain (contract registration). According to the logic of the contract terms, the key or other events are called to trigger the execution to complete the contract logic. At the same time, it also provides the function of contract upgrade and cancellation; the operation and supervision module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation and real-time status visualization output of the product during the product release process, such as alarm, monitoring network conditions, monitoring the health status of blockchain nodes, etc. The platform product service layer provides the basic capabilities and implementation framework of typical applications. Developers can superimpose the characteristics of the business based on these basic capabilities to complete the blockchain implementation of business logic. The application service layer provides application services based on blockchain solutions for business participants to use. It is worth noting that the transactions involved in the embodiments of the present application can be understood as computer terminology transactions (Transaction). Transactions include data that need to be submitted to the blockchain network and one or more operations that need to be performed. In view of the conventional use of the term "transaction" in blockchain technology, the embodiments of the present application follow this convention. Similarly, the shared ledgers involved in the embodiments of the present application are also computer terminology transactions in the field of blockchain technology.

[0037] The data processing solution proposed in the embodiment of the present application can be applied to the data processing system, see Figure 1 , which is a structural diagram of a data processing system provided in an embodiment of the present application, the data processing system may include a terminal device cluster and a blockchain network; the terminal device cluster in the data processing system may be as shown by mark 10, and the blockchain network in the data processing system may be as shown by mark 11.

[0038] in, Figure 1The terminal device cluster 10 shown may include one or more terminal devices, and the terminal devices in the terminal device cluster 10 may be as indicated by 101. The embodiment of the present application does not limit the number of terminal devices in the terminal device cluster 10. Figure 1 The blockchain network 11 shown is a network based on blockchain and peer-to-peer network. The blockchain network 11 may include multiple blockchain nodes. The blockchain nodes in the blockchain network 11 may be as shown by the mark 111. The embodiment of the present application does not limit the number of blockchain nodes in the blockchain network 11; the blockchain nodes in the blockchain network 11 may be used to jointly maintain the blockchain, and the various blockchain nodes in the blockchain network 11 are connected based on a peer-to-peer mode. It should be understood that any blockchain node in the blockchain network 11 may be a terminal device or a server; the terminal device mentioned in the embodiment of the present application may be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., without limitation; the server mentioned in the embodiment of the present application may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, etc., without limitation.

[0039] like Figure 1 As shown, the terminal device 101 in the terminal device cluster 10 supports communication connection with the blockchain node 111 in the blockchain network 11 to realize data interaction with the blockchain node 111 in the blockchain network 11. For example, the terminal device 101 can be used as a business terminal, and the business object can send a data query request to the blockchain network 11 through the business terminal. The blockchain node in the blockchain network 11 can determine the request result based on the data query request, and then return the request result to the corresponding business terminal; the business object can send a transaction to the blockchain network 11 through the business terminal, and the blockchain node in the blockchain network 11 can execute the corresponding transaction. It is worth noting that Figure 1 In the data processing system shown, devices with communication needs can communicate with each other via wired or wireless means, which is not limited in the embodiments of the present application.

[0040] Among them, each blockchain node in the blockchain network 11 supports consensus communication based on point-to-point transmission and consensus mechanism; the so-called consensus mechanism refers to a mechanism that completes the verification and confirmation of data in a shorter time through voting of blockchain nodes; based on this, the blockchain nodes in the blockchain network 11 can also be called consensus nodes, and the consensus nodes are the key to maintaining the data consistency of the entire blockchain network. The consensus nodes (blockchain nodes) in the blockchain network 11 can deploy consensus algorithms to implement the consensus mechanism. Exemplary consensus algorithms may include but are not limited to the following: Raft consensus algorithm of fault-tolerant type, PBFT consensus algorithm of Byzantine fault-tolerant type, Tendermint consensus algorithm, HotStuff consensus algorithm, etc. Different consensus algorithms have different applicable scenarios. The blockchain node used for block packaging in the blockchain network 11 can be called the master node, and other blockchain nodes can be called slave nodes; the master node can package transactions to construct blocks in a round of consensus, and broadcast the blocks to other slave nodes, so the master node plays a key role in a round of consensus. If the master node does evil, packages invalid transactions, or there is an error in the block structure, this round of consensus will not reach a consensus on any block; the slave node can verify the validity of the block after receiving the block proposed by the master node. When the block is invalid, it will not vote for the block or vote against it. When the block is valid, it will vote for the block. After the blockchain nodes in the blockchain network 11 determine that the block has reached a consensus based on the voting results, they can store the corresponding block in the blockchain maintained by the blockchain network 11. In brief, in the process of packing blocks, the master node can obtain one or more transactions to be packaged into blocks, and execute each transaction to obtain the transaction execution result of each transaction, and construct a block based on each transaction and the transaction execution result of each transaction; in the process of verifying the validity of the block after receiving the block proposed by the master node, the slave node can execute each transaction in the block to obtain the transaction execution result of each transaction. If the transaction execution results of each transaction obtained are consistent with the transaction execution results of each transaction in the block proposed by the master node, the block can be verified to be valid, otherwise the verified block can be considered invalid; when executing each transaction corresponding to the block, a parallel scheduling execution mechanism is supported, but there may be transaction conflicts between transactions during parallel scheduling execution. Transactions with transaction conflicts may obtain erroneous transaction execution results when they are executed in parallel scheduling, resulting in failure of block consensus. Based on this, in the scenario of adopting a parallel scheduling execution mechanism, it is necessary to perform conflict detection on transactions. The data processing solution provided in the embodiment of the present application can realize accurate detection of transaction conflicts.

[0041] The following is a brief description of the data processing scheme proposed in the embodiment of the present application. The data processing scheme can be applied to Figure 1In the data processing system shown, it can be executed by the blockchain node 111 in the blockchain network 11. The data processing scheme proposes that: the blockchain node 111 can obtain the execution information of N transactions in the blockchain network and determine the read-write information of each transaction, and use the execution information and corresponding read-write information of the N transactions to construct a target data structure group. Based on the target data structure group, the conflict type between each transaction in which there is a transaction conflict in the N transactions is identified, and N is a positive integer.

[0042] Among them, the N transactions in the blockchain network should be transactions corresponding to the same block, and the execution information of any transaction is used to indicate the order in which the corresponding transactions are executed. The order in which any transaction is executed refers to the order in which the corresponding transactions are executed by the master node, that is, the order in which the corresponding transactions are executed by the master node in the process of being packaged into blocks by the master node. Among them, any transaction can be used to indicate at least one of the following data processing operations: data reading operation and data writing operation, and the read and write information of any transaction may include: the data key referenced by each data processing operation indicated by the corresponding transaction; the data key is a structure for storing data, for example, it can be a structure for storing data based on a key-value pair; in other words, when any transaction is executed by the blockchain node 111, the blockchain node 111 will execute the data processing operation indicated by the corresponding transaction, and the data key operated by the blockchain node 111 in the process of executing the data processing operation is the data key referenced by the corresponding data processing operation; for example, if a transaction needs to read data from the data key k1 and needs to write data to the data key k2, then the transaction can be used to indicate the data reading operation and the data writing operation, and the data key referenced by the data reading operation is k1, and the data key referenced by the data writing operation is k2. Among them, the target data structure group records the reference status of each data key and the key reference status of each transaction; the reference status of any data key indicates: the transaction that references the corresponding data key; the key reference status of the nth transaction indicates: among the transactions executed before the nth transaction, the number of transactions that reference the same data key as the nth transaction, and the nth transaction refers to the nth executed transaction among N transactions, n∈[1,N]. The blockchain node 111 can identify the conflict type between each transaction with transaction conflicts in N transactions by table lookup according to the reference of each data key and the key reference of each transaction recorded in the target data structure group; wherein the identifiable conflict types may include read-write conflict type, write-read conflict type, write-write conflict type and read-read conflict type. In other words, the blockchain node can identify transactions with read-write conflict, write-read conflict, write-write conflict and read-read conflict in N transactions by table lookup; by constructing the target data structure group, the reference of each data key and the key reference of each transaction can be recorded, and the conflict type between each transaction with transaction conflicts in N transactions can be accurately identified by table lookup according to the reference of each data key and the key reference of each transaction recorded in the target data structure group, that is, transactions with various conflict types in N transactions can be accurately identified.

[0043] It should be pointed out in particular that the collection and processing of relevant data (such as transactions) in this application should be strictly in accordance with the requirements of laws and regulations when applied in examples, and the informed consent or separate consent of the personal information subject should be obtained, and subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.

[0044] Based on the above description, the present application embodiment provides a data processing method, see Figure 2 , which is a flow chart of a data processing method provided in an embodiment of the present application; the data processing method can be executed by a blockchain node in a blockchain network, for example, Figure 1 The data processing method is executed by the blockchain node 111 in the blockchain network 11 of the data processing system shown, and may include the following steps S201-S204:

[0045] S201, obtain execution information of N transactions in the blockchain network, where N is a positive integer.

[0046] Among them, the N transactions in the blockchain network should be transactions corresponding to the same block. The execution information of any transaction is used to indicate the order in which the corresponding transactions are executed. The order in which any transaction is executed refers to the order in which the corresponding transactions are executed by the master node (i.e., the blockchain node used for block packaging), that is, the order in which the corresponding transactions are executed by the master node during the process of the corresponding transactions being packaged into blocks by the master node. Optionally, the execution information of any transaction may include information such as the transaction number of the corresponding transaction, the transaction index of the corresponding transaction, etc. The order in which the corresponding transactions are executed is specifically indicated by the transaction number of the corresponding transaction or the transaction index of the corresponding transaction. For the sake of explanation, the transaction number is used as an example in the subsequent embodiments of this application. The numbering method of the transaction number can be set according to specific needs, for example, a digital numbering method, an alphabetical numbering method, etc. can be used. The embodiment of the present application takes the digital numbering method as an example for explanation; for example, if N=4, the N transactions are represented as: tx0, tx1, tx2, tx3, and the numbers: 0, 1, 2, 3 are used to represent the order in which the transactions are executed from front to back; Example 1, if the execution information of the N transactions is: 0, 1, 2, 3, then the N transactions are arranged in the order of execution (i.e., the 1st to 4th executed transactions): tx0, tx1, tx2 , tx3; Example 2, if the execution information of the N transactions is: 3, 1, 2, 0, then the N transactions are arranged in the order of execution (i.e. the 1st to 4th executed transactions): tx3, tx1, tx2, tx0; Based on the above description, it can be seen that transactions correspond to execution information one by one, so the execution information can be used to identify transactions in the corresponding execution order, for example, the first executed transaction is identified with execution information 0. In the above example 1, the first executed transaction identified with execution information 0 is tx0, and in the above example 2, the first executed transaction identified with execution information 0 is tx3.

[0047] Among them, any transaction can be used to indicate at least one of the following data processing operations: data reading operation and data writing operation. When any transaction is executed by a blockchain node, the blockchain node will execute the data processing operation indicated by the corresponding transaction. The data key operated by the blockchain node in the process of executing the data processing operation is the data key referenced by the corresponding data processing operation; for example, if a transaction indicates that data needs to be read from data key k1 and data needs to be written to data key k2, then the transaction can be used to indicate data reading operation and data writing operation, the data key referenced by the data reading operation is k1, and the data key referenced by the data writing operation is k2; it can be known that any transaction can only indicate a data reading operation, or only indicate a data writing operation, or indicate both a data reading operation and a data writing operation. Any transaction can indicate one or more data processing operations, which is related to the processing logic implemented by the corresponding transaction. Of course, any transaction can also indicate other logical processing operations, such as mathematical operations, logical operations, etc.

[0048] S202, determining the read and write information of each transaction.

[0049] Among them, the read and write information of any transaction may include: the data key referenced by each data processing operation indicated by the corresponding exchange, and the data key is a structure for storing data; the read and write information of any transaction may be determined according to the data processing operation indicated by the corresponding exchange. For example, if a transaction instruction needs to read data from data key k1 and needs to write data to data key k2, then the transaction can be used to indicate data reading operations and data writing operations. The read and write information of the transaction may include: the data key k1 referenced by the data reading operation indicated by the exchange, and the data key k2 referenced by the data writing operation indicated by the exchange.

[0050] S203, constructing a target data structure group using the execution information and corresponding read-write information of N transactions.

[0051] The target data structure group records the reference of each data key and the key reference of each transaction; the reference of any data key indicates: the transaction that references the corresponding data key; the key reference of the nth transaction indicates: the number of transactions that reference the same data key as the nth transaction among the transactions executed before the nth transaction, and the nth transaction refers to the nth executed transaction among N transactions, n∈[1,N]. More specifically, the reference of any data key may include: the situation that the corresponding data key is referenced by a data read operation, and the situation that the corresponding data key is referenced by a data write operation, wherein the situation that any data key is referenced by a data read operation can indicate: the transaction that references the corresponding data key through the data read operation, that is, which transactions read data from the corresponding data key, and the situation that any data key is referenced by a data write operation can indicate: the transaction that references the corresponding data key through the data write operation, that is, which transactions write data from the corresponding data key. The key reference situation of the nth transaction may include: the key reference situation of the nth transaction related to the data read operation, and the key reference situation of the nth transaction related to the data write operation, wherein the key reference situation of the nth transaction related to the data read operation may indicate: in the transactions executed before the nth transaction, the number of transactions that referenced the same data key as the nth transaction through the data read operation, that is, for any data key referenced by the nth transaction, in the transactions executed before the nth transaction, how many transactions referenced the data key through the data read operation (that is, how many transactions read the data of the data key), and the key reference situation of the nth transaction related to the data write operation may indicate: in the transactions executed before the nth transaction, the number of transactions that referenced the same data key as the nth transaction through the data write operation, that is, for any data key referenced by the nth transaction, in the transactions executed before the nth transaction, how many transactions referenced the data key through the data write operation (that is, how many transactions wrote data to the data key).

[0052] S204: Based on the target data structure group, identify the conflict types between the transactions having transaction conflicts among the N transactions.

[0053] Among them, the blockchain node can identify the conflict types between each transaction in which there is a transaction conflict in N transactions by looking up the table, according to the reference status of each data key recorded in the target data structure group and the key reference status of each transaction; among them, the identifiable conflict types may include read-write conflict type, write-read conflict type, write-write conflict type and read-read conflict type. In other words, the blockchain node can identify transactions in which there is a read-write conflict, a write-read conflict, a write-write conflict and a read-read conflict in N transactions by looking up the table.

[0054] In an embodiment of the present application, the execution information of N transactions in the blockchain network and the read-write information of each transaction can be used to construct a target data structure group, and based on the target data structure group, the conflict type between each transaction in which there is a transaction conflict in the N transactions can be identified; wherein the execution information of any transaction can be used to indicate the order in which the corresponding transactions are executed, and the read-write information of any transaction can include the data keys referenced by each data processing operation indicated by the corresponding transaction. The target data structure group constructed based on the execution information and the read-write information of the N transactions records the reference of each data key and the key reference of each transaction, and the reference of any data key Situation indication: transactions that reference corresponding data keys, key reference situation indication of the nth transaction: the number of transactions that reference the same data key as the nth transaction in transactions executed before the nth transaction; through the construction of the target data structure group, the reference situation of each data key and the key reference situation of each transaction can be recorded, and the conflict type between each transaction with transaction conflicts in N transactions can be accurately identified by table lookup according to the reference situation of each data key and the key reference situation of each transaction recorded in the target data structure group, that is, transactions with various conflict types in N transactions can be accurately identified.

[0055] Based on the above description, the present application embodiment provides another data processing method, see Figure 3 , which is a flow chart of another data processing method provided in an embodiment of the present application; the data processing method can be executed by a blockchain node in a blockchain network, for example, Figure 1 The data processing method is executed by the blockchain node 111 in the blockchain network 11 of the data processing system shown, and may include the following steps S301-S306:

[0056] S301, obtain execution information of N transactions in the blockchain network, where N is a positive integer.

[0057] Among them, any transaction is used to indicate at least one of the following data processing operations: data reading operation and data writing operation, and the execution information of any transaction is used to indicate the order in which the corresponding transactions are executed; the relevant process of step S301 is similar to the relevant process of the above-mentioned step S201, and will not be repeated here.

[0058] S302, determining the read and write information of each transaction, where the read and write information of any transaction includes: data keys referenced by each data processing operation indicated by the corresponding transaction.

[0059] The data key is a structure for storing data; the relevant process of step S302 is similar to the relevant process of the above-mentioned step S202, and will not be repeated here.

[0060] S303, summarizing the data keys in the read and write information of N transactions to obtain M data keys, where M is a positive integer.

[0061] The relevant processes of step S303 to step S305 correspond to the relevant processes of step S203. For example (Example 3), if N=4, the N transactions are arranged in the order of execution (i.e., the 1st to 4th executed transactions): tx0, tx1, tx2, tx3, and the execution information of the N transactions is: 0, 1, 2, 3; the data processing operations indicated by the N transactions can be Figure 4a As shown, the first executed transaction tx0 indicates that data needs to be read from data key k1 and written to data key k2; the second executed transaction tx1 indicates that data needs to be read from data key k2 and written to data key k3; the third executed transaction tx2 indicates that data needs to be read from data key k1 and written to data key k3; the fourth executed transaction tx3 indicates that data needs to be read from data key k1 and written to data key k2; wherein, Figure 4a The data stored in the data key k1 is represented by v1, the data stored in the data key k2 is represented by v2, and the data stored in the data key k3 is represented by v3; based on this, it can be known that the read-write information of the first executed transaction tx0 may include: the data key k1 referenced by the data read operation indicated by the exchange, and the data key k2 referenced by the data write operation indicated by the exchange; the read-write information of the second executed transaction tx1 may include: the data key k2 referenced by the data read operation indicated by the exchange, and the data key k3 referenced by the data write operation indicated by the exchange; the read-write information of the third executed transaction tx2 may include: the data key k1 referenced by the data read operation indicated by the exchange, and the data key k3 referenced by the data write operation indicated by the exchange; the read-write information of the fourth executed transaction tx3 may include: the data key k1 referenced by the data read operation indicated by the exchange, and the data key k2 referenced by the data write operation indicated by the exchange; then the M data keys obtained by summarizing the data keys in the read-write information of the N transactions include: k1, k2, and k3.

[0062] In an exemplary business scenario, Figure 4aThe N transactions shown can be transactions sent by business objects to the blockchain network for requesting to borrow digital resources; in this business scenario, the object requesting to borrow digital resources can be called a resource borrowing object, the object providing digital resource lending services can be called a resource lending object, and the object providing security for the transaction requested by the resource borrowing object can be called a security object. Generally speaking, any transaction sent by a resource borrowing object to the blockchain network through a terminal device can indicate: the resource borrowing object of the transaction, the security object of the transaction, and the target resource amount of the digital resource requested to borrow. The blockchain node can transfer the target resource amount of digital resources from the account of the resource lending object to the account of the resource borrowing object of the transaction when it is determined that the resource amount of digital resources stored in the account of the security object of the transaction is greater than or equal to the target resource amount. Among them, the query of the resource amount of digital resources stored in a certain account can be queried in real time through the world state of the blockchain. The world state of the blockchain can record the real-time resource amount of the account in the blockchain, and when any account has a resource transfer, the resource amount of the corresponding account recorded in the world state is updated in real time. The world state can store the resource amount of the account based on key-value pairs.

[0063] If the current world state is Figure 4b As shown, k1 represents the data key corresponding to the account of object 1, recording the resource volume v1 of the account of object 1, k2 represents the data key corresponding to the account of object 2, recording the resource volume v2 of the account of object 2, k3 represents the data key corresponding to the account of object 3, recording the resource volume v3 of the account of object 3, then Figure 4a In the transactions shown, the first executed transaction tx0 indicates that object 2 corresponding to k2 (the resource borrowing object of the transaction) takes object 1 corresponding to k1 as the guarantee object of the transaction and requests the resource lending object to borrow digital resources. The second executed transaction tx1 indicates that object 3 corresponding to k3 (the resource borrowing object of the transaction) takes object 2 corresponding to k2 as the guarantee object of the transaction and requests the resource lending object to borrow digital resources. The third executed transaction tx2 indicates that object 3 corresponding to k3 (the resource borrowing object of the transaction) takes object 1 corresponding to k1 as the guarantee object of the transaction and requests the resource lending object to borrow digital resources. The third executed transaction tx3 indicates that object 2 corresponding to k2 (the resource borrowing object of the transaction) takes object 1 corresponding to k1 as the guarantee object of the transaction and requests the resource lending object to borrow digital resources.

[0064] S304, constructing an initial data structure group using the execution information of N transactions and M data keys.

[0065] Among them, the initial data structure group is used to record: the reference status of each data key and the key reference status of each transaction; the reference status of any data key indicates: the transaction that references the corresponding data key; the key reference status of the nth transaction indicates: among the transactions executed before the nth transaction, the number of transactions that reference the same data key as the nth transaction, and the nth transaction refers to the nth executed transaction among N transactions, n∈[1,N].

[0066] In a feasible implementation, the initial data structure group may include the following data structures: a read set set, a write set set, a read set conflict table and a write set conflict table; wherein the read set set and the write set set are used to record the reference status of each data key, specifically, the read set set is used to record the situation in which each data key is referenced by the data reading operation, and the write set set is used to record the situation in which each data key is referenced by the data writing operation; wherein the read set conflict table and the write set conflict table are used to record the key reference status of each transaction, specifically, the read set conflict table is used to record the key reference status of each transaction related to the data reading operation, and the write set conflict table is used to record the key reference status of each transaction related to the data writing operation.

[0067] Specifically, the read set includes: M data keys and the first transaction field corresponding to each data key; the first transaction field corresponding to the mth data key is used to fill: in N transactions, the execution information of the transaction that references the mth data key through the data read operation; the write set includes: M data keys and the second transaction field corresponding to each data key; the second transaction field corresponding to the mth data key is used to fill: in N transactions, the execution information of the transaction that references the mth data key through the data write operation; the read set conflict table includes: N rows and M columns of the first quantity field, the header of the nth row is the execution information of the nth transaction The row information includes the mth data key in the column header of the mth column; the first quantity field located at the nth row and the mth column is used to fill in: the number of transactions that referenced the mth data key through data read operations in transactions executed before the nth transaction; the write set conflict table includes: N rows and M columns of second quantity fields, the row header of the nth row is the execution information of the nth transaction, and the column header of the mth column is the mth data key; the second quantity field located at the nth row and the mth column is used to fill in: the number of transactions that referenced the mth data key through data write operations in transactions executed before the nth transaction; wherein, m∈[1,M]. Among them, the row header of the nth row represents the identifier of the nth row, which is the execution information of the nth transaction, the column header of the mth column represents the identifier of the mth column, which is the mth data key, the first quantity field located in the nth row and the mth column is: the first quantity field corresponding to the nth transaction and the mth data key, the second quantity field located in the nth row and the mth column is: the second quantity field corresponding to the nth transaction and the mth data key, and the read set conflict table and the write set conflict table are two-dimensional arrays.

[0068] by Figure 4a Take the N transactions shown as an example, N=4, and the N transactions are arranged in the order of execution (i.e., the 1st to 4th executed transactions): tx0, tx1, tx2, tx3, and the execution information of the N transactions is: 0, 1, 2, 3. If the M (M=3) data keys are summarized, the 1st to Mth data keys are: k1, k2, k3 respectively; see Figure 4c , which is a schematic diagram of an initial data structure group provided in an embodiment of the present application, wherein the read set set in the initial data structure group can be indicated by a mark 401, the M data keys can be indicated by a mark 402, and if m=1, the first transaction field corresponding to the first data key can be indicated by a mark 403; the write set set in the initial data structure group can be indicated by a mark 404, the M data keys can be indicated by a mark 405, and if m=1, the second transaction field corresponding to the first data key can be indicated by a mark 406.

[0069] The read set conflict table in the initial data structure group may be as indicated by mark 411, the row header of the read set conflict table is the execution information of N transactions, as indicated by mark 412, the column header of the read set conflict table is M data keys, as indicated by mark 413, and taking n=1, m=1 as an example, the first quantity field located in the 1st row and the 1st column may be as indicated by mark 414, that is, the first quantity field corresponding to the 1st transaction and the 1st data key; the write set conflict table in the initial data structure group may be as indicated by mark 415, the row header of the write set conflict table is the execution information of N transactions, as indicated by mark 416, the column header of the write set conflict table is M data keys, as indicated by mark 417, and taking n=1, m=1 as an example, the second quantity field located in the 1st row and the 1st column may be as indicated by mark 418, that is, the second quantity field corresponding to the 1st transaction and the 1st data key.

[0070] What we know is that Figure 4c It is only an exemplary initial data structure group. The embodiment of the present application does not limit the data structure included in the initial data structure group, as long as it can be used to record the reference status of each data key and the key reference status of each transaction; for example, one data structure can be used to record the reference status of each data key and the key reference status of each transaction, or one data structure can be used to record the reference status of each data key, and another data structure can be used to record the key reference status of each transaction, and so on.

[0071] S305 , in accordance with the order in which the N transactions are executed, the initial data structure group is filled with the read and write information of each transaction in turn to obtain the target data structure group.

[0072] Among them, the target data structure group records the reference status of each data key and the key reference status of each transaction; the reference status of any data key indicates: the transaction that references the corresponding data key; the key reference status of the nth transaction indicates: the number of transactions that reference the same data key as the nth transaction among the transactions executed before the nth transaction.

[0073] In a feasible implementation, the nth transaction refers to the nth executed transaction among N transactions; the blockchain node uses the read-write information of each transaction in turn according to the order in which the N transactions are executed to fill the initial data structure group, and when obtaining the target data structure group, the following steps can be performed: according to the order in which the N transactions are executed, the read-write information of the N transactions is traversed in turn to determine the read-write information of the currently traversed nth transaction; the nth data structure group to be filled is obtained, and the read-write information of the nth transaction is used to fill the fields associated with the nth transaction in the nth data structure group to be filled, so as to obtain the filled nth data structure group; wherein, if n=1, the nth data structure group to be filled is the initial data structure group; if n>1, the nth data structure group to be filled is the filled n-1th data structure group; the filled Nth data structure group obtained after traversing the read-write information of N transactions is used as the target data structure group.

[0074] That is, when n=1, the blockchain node can use the initial data structure group as the first data structure group to be filled, and use the read-write information of the first transaction to fill the fields associated with the first transaction in the first data structure group to be filled, so as to obtain the filled first data structure group; when n=2, the blockchain node can use the filled first data structure group as the second data structure group to be filled, and use the read-write information of the second transaction to fill the fields associated with the second transaction in the second data structure group to be filled. When n=3, the blockchain node can use the filled second data structure group as the third data structure group to be filled, and use the read-write information of the third transaction to fill the fields associated with the third transaction in the third data structure group to be filled, so as to obtain the filled third data structure group; and so on, until the traversal of the read-write information of N transactions is completed, the blockchain node can use the filled Nth data structure group obtained after traversing the read-write information of N transactions as the target data structure group.

[0075] In a feasible implementation, the blockchain node uses the read-write information of the nth transaction to fill the fields associated with the nth transaction in the nth data structure group to be filled. When the filled nth data structure group is obtained, the following steps can be performed: traverse each data key in the read-write information of the nth transaction, determine the target data key currently traversed, and determine the target data processing operation corresponding to the target data key when it is referenced; determine the data structure to be filled associated with the target data processing operation from each data structure of the nth data structure group to be filled; based on the target data key, determine the target data key to be filled; ... The data key, and the read set set and write set set in the nth data structure group to be filled, fill the fields associated with the nth transaction in the data structure to be filled, until the filled nth data structure group is obtained after the traversal is completed; wherein, if the target data processing operation is a data read operation, the data structure to be filled associated with the data read operation includes: a read set set, a read set conflict table, and a write set conflict table; if the target data processing operation is a data write operation, the data structure to be filled associated with the data write operation includes: a write set set, a read set conflict table, and a write set conflict table. It is worth noting that in the process of traversing each data key in the read and write information of the nth transaction, since each traversal of a data key will be filled, the data in the nth data structure group to be filled will change with the filling process of each traversal.

[0076] by Figure 4aTaking the N transactions shown as an example, if n=1, the first transaction tx0 (i.e., the first executed transaction tx0) indicates that data needs to be read from data key k1 and data needs to be written to data key k2; the read-write information of the first transaction tx0 may include: the data key k1 referenced by the data read operation indicated by the transaction, and the data key k2 referenced by the data write operation indicated by the transaction. Based on this, the blockchain node uses the read-write information of the first transaction to fill the fields associated with the first transaction in the first data structure group to be filled. In the process of obtaining the filled first data structure group, the blockchain node can traverse each data key in the read-write information of the first transaction to determine the target data key currently traversed. If the target data key of the first traversal is k1, the target data processing operation is a data read operation, and the data structures to be filled include: a read set set, a read set conflict table, and a write set conflict table. Based on this, the blockchain node can fill the read set set, the read set conflict table, and the write set conflict table in the first data structure group to be filled based on the target data key k1 and the read set set and the write set set in the first data structure group to be filled. If the target data key of the second traversal is k2, the target data processing operation is a data write operation, and the data structures to be filled include: a write set set, a read set conflict table, and a write set conflict table. Based on this, the blockchain node can fill the write set set, the read set conflict table, and the write set conflict table in the first data structure group to be filled based on the target data key k2 and the read set set and the write set set in the first data structure group to be filled; after the two traversals are completed, the first data structure group after filling is obtained.

[0077] In a feasible implementation, when a blockchain node fills the fields associated with the nth transaction in the data structure to be filled based on the target data key and the read set set and write set set in the nth data structure group to be filled, the blockchain node can use the read set set in the nth data structure group to be filled as the read set set to be found when filling the fields associated with the nth transaction in the read set conflict table in the data structure to be filled; determine the number of transactions that are earlier than the order indicated by the execution information of the nth transaction in the order indicated by the execution information according to the first transaction field corresponding to the target data key in the read set set to be found; and fill the determined number in the read set conflict table in the data structure to be filled, in the first number field determined by the nth transaction and the target data key.

[0078] In a feasible implementation, when a blockchain node fills a field associated with the nth transaction in a write-set conflict table in a data structure to be filled, the write-set set in the nth data structure group to be filled can be used as the write-set set to be found; according to the second transaction field corresponding to the target data key in the write-set set to be found, the number of transactions that are earlier than the order indicated by the execution information of the nth transaction in the order indicated by the execution information is determined; and the determined number is filled in the write-set conflict table in the data structure to be filled, in the second number field determined by the nth transaction and the target data key.

[0079] In a feasible implementation, when a blockchain node fills a field associated with the nth transaction in a read set or a write set in a data structure to be filled, the following steps may be performed: if the target data processing operation is a data read operation, the execution information of the nth transaction is filled in the first transaction field corresponding to the target data key in the read set in the data structure to be filled; if the target data processing operation is a data write operation, the execution information of the nth transaction is filled in the second transaction field corresponding to the target data key in the write set in the data structure to be filled.

[0080] It can be known that, in the process of filling the fields associated with the nth transaction in the data structure to be filled based on the target data key and the read set set and the write set set in the nth data structure group to be filled, the filling order of each data structure in the data structure to be filled can be set according to specific needs, and the embodiments of the present application are not limited; for example, when the target data processing operation corresponding to the target data key is a data read operation, and the data structure to be filled includes a read set set, a read set conflict table, and a write set conflict table, the read set conflict table can be filled first, then the write set conflict table, and finally the read set set; when the target data processing operation corresponding to the target data key is a data write operation, the data structure to be filled includes a write set set, a read set conflict table, and a write set conflict table When filling the read-set conflict table and the write-set conflict table, the write-set conflict table may be filled first, then the read-set conflict table, and finally the write-set set. For ease of explanation, the embodiments of the present application will be described in this filling order later. Another exemplary filling order may be: when the target data processing operation corresponding to the target data key is a data read operation, and the data structure to be filled includes a read-set set, a read-set conflict table, and a write-set conflict table, the write-set conflict table may be filled first, then the read-set conflict table, and finally the read-set set; when the target data processing operation corresponding to the target data key is a data write operation, and the data structure to be filled includes a write-set set, a read-set conflict table, and a write-set conflict table, the read-set conflict table may be filled first, then the write-set conflict table, and finally the write-set set.

[0081] by Figure 4aTake the N transactions shown as an example, N=4, the N transactions are arranged in the order of execution (i.e. the 1st to 4th executed transactions): tx0, tx1, tx2, tx3, the execution information of the N transactions is: 0, 1, 2, 3, and the M (M=3) data keys obtained by aggregation, the 1st to Mth data keys are: k1, k2, k3 respectively. Figure 4d , is a schematic diagram of filling a data structure group to be filled provided by an embodiment of the present application, specifically taking the filling of the first data structure group to be filled as an example, that is, n=1. Among them, the data structure group indicated by the mark 42 is the initial data structure group; the blockchain node can use the initial data structure group indicated by the mark 42 as the first data structure group to be filled, use the read and write information of the first transaction, and fill the first data structure group to be filled to obtain the filled first data structure group. During this process, the blockchain node can traverse each data key in the read and write information of the first transaction to determine the target data key of the current traversal; if the target data key of the first traversal is k1, the target data processing operation is a data read operation, and the blockchain node can fill in the read set conflict table, the write set conflict table, and the read set set in sequence, such as the first data structure group to be filled as shown in mark 42, which is updated to the first data structure group to be filled as shown in mark 43 after filling processing based on the target data key k1 of the first traversal; if the target data key of the second traversal is k2, the target data processing operation is a data write operation, and the blockchain node can fill in the write set conflict table, the read set conflict table, and the write set set in sequence, such as the first data structure group to be filled as shown in mark 43, which is updated to the filled first data structure group as shown in mark 44 after filling processing based on the target data key k2 of the second traversal.

[0082] For the filling process of the target data key k1 of the first traversal, ①, the process of the blockchain node filling the read set conflict table: the blockchain node can use the read set set in the first data structure group to be filled as the read set set to be found, and the read set set to be found at this time can be as shown by the mark 421; according to the first transaction field corresponding to the target data key k1 in the read set set to be found, determine the number of transactions that are earlier than the order indicated by the execution information of the first transaction in the order indicated by the execution information, and at this time, the first transaction field corresponding to the target data key k1 is empty, and the determined number is 0; fill the determined number in the read set conflict table in the first data structure group to be filled, in the first number field determined by the first transaction and the target data key k1, and the filled read set conflict table can be as shown by the mark 431. ②. The process of blockchain nodes filling the write-set conflict table: the blockchain node can use the write-set set in the first data structure group to be filled as the write-set set to be found. At this time, the write-set set to be found can be as shown by the mark 422; according to the second transaction field corresponding to the target data key k1 in the write-set set to be found, determine the number of transactions that are earlier than the order indicated by the execution information of the first transaction in the order indicated by the execution information. At this time, the second transaction field corresponding to the target data key k1 is empty, and the determined number is 0; fill the determined number into the write-set conflict table in the first data structure group to be filled, in the second number field determined by the first transaction and the target data key k1. The filled write-set conflict table can be as shown by the mark 432. ③. The process of blockchain node filling the read set: the blockchain node can fill the execution information 0 of the first transaction in the first transaction field corresponding to the target data key k1 in the read set in the first data structure group to be filled. The filled read set can be as shown by the mark 433; because the filling process for the target data key k1 of the first traversal did not fill the write set, based on this, the write set after the filling process for the target data key k1 of the first traversal is completed can be as shown by the mark 434.

[0083] For the filling process of the target data key k2 of the second traversal, ④, the process of the blockchain node filling the write set conflict table: the blockchain node can use the write set set in the first data structure group to be filled as the write set set to be found, and the write set set to be found at this time can be as shown by the mark 434; according to the second transaction field corresponding to the target data key k2 in the write set set to be found, determine the number of transactions that are earlier than the order indicated by the execution information of the first transaction in the order indicated by the execution information, and at this time, the second transaction field corresponding to the target data key k2 is empty, and the determined number is 0; fill the determined number in the write set conflict table in the first data structure group to be filled, in the second number field determined by the first transaction and the target data key k2, and the filled write set conflict table can be as shown by the mark 441. ⑤. The process of blockchain node filling the read set conflict table: the blockchain node can use the read set set in the first data structure group to be filled as the read set set to be searched. At this time, the read set set to be searched can be as shown by the mark 433; according to the first transaction field corresponding to the target data key k2 in the read set set to be searched, determine the number of transactions that are earlier than the order indicated by the execution information of the first transaction in the order indicated by the execution information. At this time, the first transaction field corresponding to the target data key k2 is empty, and the determined number is 0; fill the determined number in the read set conflict table in the first data structure group to be filled, in the first number field determined by the first transaction and the target data key k2. The filled read set conflict table can be as shown by the mark 442. ⑥. The process of blockchain nodes filling the write set set: the blockchain node can fill the execution information 0 of the first transaction in the second transaction field corresponding to the target data key k2 in the write set set in the first data structure group to be filled. The filled write set set can be as shown by the mark 443; because the filling process for the target data key k2 of the second traversal does not fill the read set set, based on this, the read set set after the filling process for the target data key k2 of the second traversal is completed can be as shown by the mark 444.

[0084] See also Figure 4e, is another schematic diagram of filling a data structure group to be filled provided by an embodiment of the present application, specifically taking the filling of the second data structure group to be filled as an example, that is, n=2. Among them, the data structure group indicated by the mark 45 is the first data structure group after filling; the blockchain node can use the first data structure group after filling as indicated by the mark 45 as the second data structure group to be filled, use the read and write information of the second transaction, and fill the second data structure group to be filled to obtain the second data structure group after filling. During this process, the blockchain node can traverse each data key in the read and write information of the second transaction to determine the target data key of the current traversal; if the target data key of the first traversal is k2, the target data processing operation is a data read operation, and the blockchain node can fill in the read set conflict table, the write set conflict table, and the read set set in sequence, such as the second data structure group to be filled as shown in mark 45, which is updated to the second data structure group to be filled as shown in mark 46 after filling and processing based on the target data key k2 of the first traversal; if the target data key of the second traversal is k3, the target data processing operation is a data write operation, and the blockchain node can fill in the write set conflict table, the read set conflict table, and the write set set in sequence, such as the second data structure group to be filled as shown in mark 46, which is updated to the filled second data structure group as shown in mark 47 after filling and processing based on the target data key k3 of the second traversal.

[0085] For the filling process of the target data key k2 of the first traversal, ①, the process of the blockchain node filling the read set conflict table: the read set set to be found can be as shown in the mark 451. In the read set set to be found as shown in the mark 451, the first transaction field corresponding to the target data key k2 is empty, then the number of transactions in the order indicated by the determined execution information that is earlier than the order indicated by the execution information 1 of the second transaction is 0, and the determined number is filled in the first number field determined by the second transaction and the target data key k2 in the read set conflict table. The filled read set conflict table can be as shown in the mark 461. ②, the process of blockchain node filling the write set conflict table: the write set set to be searched can be shown as marked 452; in the write set set to be searched as marked 452, the second transaction field corresponding to the target data key k2 includes execution information 0 (indicating the first transaction), then the number of transactions indicated by the determined execution information, which is earlier than the order indicated by the execution information 1 of the second transaction, is 1, and the determined number is filled in the write set conflict table, and the second number field determined by the second transaction and the target data key k2, the filled write set conflict table can be shown as marked 462. ③, the process of blockchain node filling the read set set: the blockchain node can fill the execution information 1 of the second transaction in the read set set, the first transaction field corresponding to the target data key k2, and the filled read set set can be shown as marked 463; since the filling process for the target data key k2 of the first traversal did not fill the write set set, based on this, the write set set after the filling process for the target data key k2 of the first traversal is completed can be shown as marked 464. The filling process of the target data key k3 for the second traversal is the same as above. Figure 4d The filling process for the target data key k2 of the second traversal is similar and will not be described in detail here. In the filling process for the target data key k3 of the second traversal, the write set conflict table obtained after the process of the blockchain node filling the write set conflict table in step ④ can be as shown in the mark 471, the read set conflict table obtained after the process of the blockchain node filling the read set conflict table in step ⑤ can be as shown in the mark 472, and the write set set obtained after the process of the blockchain node filling the write set set in step ⑥ can be as shown in the mark 473. Since the reading set set is not filled in the filling process for the target data key k3 of the second traversal, based on this, the read set set after the filling process for the target data key k3 of the second traversal is completed can be as shown in the mark 474.

[0086] The process of filling the third data structure group to be filled by the blockchain node and the process of filling the fourth data structure group to be filled by the blockchain node are the same as above. Figure 4d The blockchain node shown in the figure fills the first data structure group to be filled, and the above Figure 4eThe blockchain node shown in the figure has a similar filling process for the second data structure group to be filled, which will not be repeated here; the blockchain node can use the filled Nth data structure group obtained after traversing the read and write information of N (N=4) transactions as the target data structure group, and the target data structure group can be as follows Figure 4f Shown.

[0087] From the read set set in the target data structure group, it can be known that each data key is referenced by the data read operation. The cases where the first to third data keys are referenced by the data read operation include: the first data key k1 is referenced by the first transaction identified by 0, the third transaction identified by 2, and the fourth transaction identified by 3 through the data read operation, the second data key k2 is referenced by the second transaction identified by 1 through the data read operation, and the third data key k3 is not referenced by any transaction through the data read operation. From the write set set in the target data structure group, it can be known that each data key is referenced by the data write operation. The cases where the first to third data keys are referenced by the data write operation include: the first data key k1 is not referenced by any transaction through the data write operation, the second data key k2 is referenced by the first transaction identified by 0 and the fourth transaction identified by 3 through the data write operation, and the third data key k3 is referenced by the second transaction identified by 1 and the third transaction identified by 2 through the data write operation.

[0088] It can be seen from the read set conflict table in the target data structure group that the key reference situation of the nth transaction related to the data reading operation, if n=4, then it can be seen that: the fourth transaction identified by 3 references the first data key k1 and the second data key k2. For the first data key k1, in the transactions executed before the fourth transaction, the number of transactions that referenced the same data key k1 through the data reading operation is 2, that is, in the transactions executed before the fourth transaction, 2 transactions referenced the same data key k1 through the data reading operation. For the second data key k2, in the transactions executed before the fourth transaction, the number of transactions that referenced the same data key k2 through the data reading operation is 1, that is, in the transactions executed before the fourth transaction, 1 transaction referenced the same data key k2 through the data reading operation. Of course, the key reference situation of other transactions related to the data reading operation can also be recorded through the read set conflict table in the target data structure.

[0089] It can be seen from the write set conflict table in the target data structure group that the key reference situation of the nth transaction related to the data write operation, if n=4, then it can be seen that: the fourth transaction identified by 3 references the first data key k1 and the second data key k2. For the first data key k1, in the transactions executed before the fourth transaction, the number of transactions that referenced the same data key k1 through the data write operation was 0, that is, in the transactions executed before the fourth transaction, no transaction referenced the same data key k1 through the data write operation. For the second data key k2, in the transactions executed before the fourth transaction, the number of transactions that referenced the same data key k2 through the data write operation was 1, that is, in the transactions executed before the fourth transaction, one transaction referenced the same data key k2 through the data write operation. Of course, the key reference situation of other transactions related to the data write operation can also be recorded through the read set conflict table in the target data structure. For ease of explanation, the read set set, write set set, read set conflict table and write set conflict table included in the target data structure group may be referred to as the target read set set, target write set set, target read set conflict table and target write set conflict table, respectively.

[0090] S306: Based on the target data structure group, identify the conflict type between each transaction having transaction conflict in the N transactions.

[0091] Among them, the target data structure group includes: the target read set set, target write set set, target read set conflict table and target write set conflict table obtained by filling the read set set, write set set, read set conflict table and write set conflict table in the initial data structure group. In a feasible implementation, the conflict type may include a read-write conflict type; based on this, when the blockchain node identifies the conflict type between each transaction in N transactions that have transaction conflicts based on the target data structure group, it can perform the following steps: for the nth transaction, according to the first transaction field in the target read set set that records the execution information of the nth transaction, determine the first data key corresponding to the nth transaction; the first data key is referenced by the nth transaction through the data reading operation; search for the execution information recorded in the second transaction field corresponding to the first data key in the target write set set; if the execution information is found, then from the target write set conflict table, The quantity of the transaction is searched in the second quantity field determined by the nth transaction and the first data key; if the quantity found is a valid value, then from the found execution information, the execution information whose order is earlier than the order indicated by the execution information of the nth transaction is determined; it is determined that there is a transaction conflict between the nth transaction and the transaction indicated by the determined execution information, and the corresponding conflict type is a read-write conflict type; if the execution information is not found, or if the quantity found is not a valid value, or if the quantity is not found, it is determined that the nth transaction does not have a transaction conflict of the read-write conflict type with the transaction executed before the nth transaction; wherein a valid value refers to a value greater than 0.

[0092] by Figure 4f Taking the target data structure group shown as an example, the following exemplary process for determining the read-write conflict type is described; for example, n=2, for the second transaction (transaction tx1 identified by execution information 1 in the target data structure group), the blockchain node can determine the first data key corresponding to the second transaction based on the first transaction field in the target read set that records the execution information 1 of the second transaction, and the first data key is k2. That is to say, based on this, it can be determined that the first data key referenced by the second transaction through the data read operation is k2; the blockchain node can search for the execution information recorded in the second transaction field corresponding to the first data key k2 in the target write set, and the execution information found is: 0, 3; since the execution information is found, the target write set is used to determine the first data key k2. In the set conflict table, the number of transactions is searched in the second quantity field determined by the second transaction and the first data key k2, and the number found is 1; since the number found is a valid value, the execution information whose order is earlier than the order indicated by the execution information 1 of the second transaction is determined from the found execution information 0 and 3, and the determined execution information is 0; based on this, it can be determined that there is a transaction conflict between the second transaction and the transaction indicated by the determined execution information 0, and the corresponding conflict type is a read-write conflict type, that is, it can be determined that there is a transaction conflict between the second transaction and the first transaction identified by 0, and the corresponding conflict type is a read-write conflict type; among them, the second transaction has a transaction conflict of the read-write conflict type with the first transaction (i.e., a read-write conflict), which can be found in Figure 4g As shown by 481.

[0093] For another example, n=3, for the third transaction (transaction tx2 identified by execution information 2 in the target data structure group), the blockchain node can determine the first data key corresponding to the third transaction based on the first transaction field in the target read set that records the execution information 2 of the third transaction, and the first data key is k1. That is to say, based on this, it can be determined that the first data key referenced by the third transaction through the data reading operation is k1; the blockchain node can search for the execution information recorded in the second transaction field corresponding to the first data key k1 in the target write set; since the execution information is not found, it is determined that the third transaction does not have a transaction conflict of the read-write conflict type with the transaction executed before the third transaction, that is, it is determined that the third transaction does not have a transaction conflict of the read-write conflict type with both the first transaction and the second transaction.

[0094] In a feasible implementation, the conflict type may include a write-write conflict type; based on this, when the blockchain node identifies the conflict type between each transaction having a transaction conflict in N transactions based on the target data structure group, the following steps may be performed: for the nth transaction, according to the second transaction field in the target write set set recording the execution information of the nth transaction, determine the second data key corresponding to the nth transaction; the second data key is referenced by the nth transaction through the data write operation; search for the execution information recorded in the second transaction field corresponding to the second data key in the target write set set; if the execution information is found, then from the target write set conflict table, The quantity of the transaction is searched in the second quantity field determined by the nth transaction and the second data key; if the quantity found is a valid value, then from the found execution information, execution information whose order is earlier than the order indicated by the execution information of the nth transaction is determined; it is determined that there is a transaction conflict between the nth transaction and the transaction indicated by the determined execution information, and the corresponding conflict type is a write-write conflict type; if the execution information is not found, or if the quantity found is not a valid value, or if the quantity is not found, it is determined that the nth transaction does not have a transaction conflict of the write-write conflict type with the transaction executed before the nth transaction; wherein a valid value refers to a value greater than 0.

[0095] by Figure 4f Taking the target data structure group shown as an example, the following exemplarily describes the process of determining the write-write conflict type; for example, n=2, for the second transaction (transaction tx1 identified by execution information 1 in the target data structure group), the blockchain node can determine the second data key corresponding to the second transaction according to the second transaction field in the target write set set that records the execution information 1 of the second transaction, and the second data key is k3, that is, based on this, it can be determined that the second data key referenced by the second transaction through the data write operation is k3; the blockchain node can search for the execution information in the second transaction field corresponding to the second data key k3 recorded in the target write set set, and the execution information found is: 1, 2; since the execution information is found, the number of transactions is searched in the second quantity field determined by the second transaction and the second data key k3 from the target write set conflict table, and the number found is 0; since the found number is not a valid value, it is determined that the second transaction does not have a transaction conflict of the write-write conflict type with the transaction executed before the second transaction, that is, it is determined that the second transaction does not have a transaction conflict of the write-write conflict type with the first transaction.

[0096] For another example, when n = 3, for the 3rd transaction (transaction tx2 identified by execution information 2 in the target data structure group), the blockchain node can determine the second data key corresponding to the 3rd transaction based on the second transaction field in the target write set that records the execution information 2 of the 3rd transaction. This second data key is k3. That is to say, based on this, it can be determined that the second data key referenced by the 3rd transaction through the data write operation is k3. The blockchain node can search for the execution information in the second transaction field corresponding to the second data key k3 recorded in the target write set. The execution information found is: 1, 2. Since the execution information is found, the blockchain node can search for the quantity of the transaction in the second quantity field determined by the 3rd transaction and the second data key k3 in the target write conflict table. The quantity found is 1. Since the quantity found is a valid value, the blockchain node can determine, from the found execution information 1 and 2, the execution information whose order is earlier than the order indicated by the execution information 2 of the 3rd transaction. The determined execution information is 1. Based on this, it can be determined that there is a transaction conflict between the 3rd transaction and the transaction indicated by the determined execution information 1, and the corresponding conflict type is a write-write conflict type. That is to say, it can be determined that there is a transaction conflict between the 3rd transaction and the 2nd transaction identified by 1, and the corresponding conflict type is a write-write conflict type. Among them, the 3rd transaction and the 2nd transaction have a write-write conflict type of transaction conflict (i.e., a write-write conflict), which can be shown in Figure 4g as shown by 482 in

[0097] In a feasible implementation manner, the conflict type may include a write-read conflict type. Based on this, when the blockchain node identifies the conflict types between the transactions with transaction conflicts among the N transactions based on the target data structure group, the following steps may be performed: For the nth transaction, determine the second data key corresponding to the nth transaction according to the second transaction field in the target write set that records the execution information of the nth transaction. The second data key is the one referenced by the nth transaction through the data write operation. Search for the execution information in the first transaction field corresponding to the second data key in the target read set. If the execution information is found, search for the quantity of the transaction in the first quantity field determined by the nth transaction and the second data key in the target read conflict table. If the quantity found is a valid value, determine, from the found execution information, the execution information whose order is earlier than the order indicated by the execution information of the nth transaction. Determine that there is a transaction conflict between the nth transaction and the transaction indicated by the determined execution information, and the corresponding conflict type is a write-read conflict type. If the execution information is not found, or if the quantity found is not a valid value, or if the quantity is not found, determine that the nth transaction has no write-read conflict type of transaction conflict with the transactions executed before the nth transaction. Among them, the valid value refers to a value greater than 0.

[0098] Take Figure 4fTaking the target data structure group shown as an example, the following exemplarily describes the process of determining the write-read conflict type; for example, n=3, for the third transaction (transaction tx2 identified by execution information 2 in the target data structure group), the blockchain node can determine the second data key corresponding to the third transaction according to the second transaction field in the target write set that records the execution information 2 of the third transaction, and the second data key is k3. That is to say, based on this, it can be determined that the second data key referenced by the third transaction through the data write operation is k3; the blockchain node can search for the execution information recorded in the first transaction field corresponding to the second data key k3 in the target read set; since the execution information is not found, it is determined that the third transaction does not have a transaction conflict of the write-read conflict type with the transaction executed before the third transaction, that is, it is determined that the third transaction does not have a transaction conflict of the write-read conflict type with both the first transaction and the second transaction.

[0099] For another example, n=4, for the fourth transaction (transaction tx3 identified by execution information 3 in the target data structure group), the blockchain node can determine the second data key corresponding to the fourth transaction based on the second transaction field in the target write set that records the execution information 3 of the fourth transaction, and the second data key is k2. In other words, based on this, it can be determined that the second data key referenced by the fourth transaction through the data write operation is k2; the blockchain node can search for the execution information in the first transaction field corresponding to the second data key k2 recorded in the target read set, and the execution information found is: 1; since the execution information is found, the fourth transaction and the second data key k2 are found in the target read set conflict table. The number of transactions is searched in the first number field determined by k2, and the number found is 1; since the number found is a valid value, the execution information whose order is earlier than the order indicated by the execution information 3 of the fourth transaction is determined from the found execution information 1, and the determined execution information is 1; based on this, it can be determined that there is a transaction conflict between the fourth transaction and the transaction indicated by the determined execution information 1, and the corresponding conflict type is a write-read conflict type, that is, it can be determined that there is a transaction conflict between the fourth transaction and the second transaction identified by 1, and the corresponding conflict type is a write-read conflict type; wherein, there is a transaction conflict of the write-read conflict type between the fourth transaction and the second transaction (i.e., a write-read conflict), which can be found in Figure 4g Indicated by 483.

[0100] In a feasible implementation, the conflict type may include a read-read conflict type; based on this, when the blockchain node identifies the conflict type between each transaction having a transaction conflict in N transactions based on the target data structure group, the following steps may be performed: for the nth transaction, according to the first transaction field in the target read set set recording the execution information of the nth transaction, determine the first data key corresponding to the nth transaction; the first data key is referenced by the nth transaction through a data read operation; search for the execution information recorded in the first transaction field corresponding to the first data key in the target read set set; if the execution information is found, then from the target read set conflict table, The quantity of the transaction is searched in a first quantity field determined by the nth transaction and the first data key; if the quantity found is a valid value, then from the found execution information, execution information whose order is earlier than the order indicated by the execution information of the nth transaction is determined; it is determined that there is a transaction conflict between the nth transaction and the transaction indicated by the determined execution information, and the corresponding conflict type is a read-read conflict type; if the execution information is not found, or if the quantity found is not a valid value, or if the quantity is not found, it is determined that the nth transaction does not have a transaction conflict of the read-read conflict type with the transaction executed before the nth transaction; wherein a valid value refers to a value greater than 0.

[0101] by Figure 4f Taking the target data structure group shown in FIG. 1 as an example, the following exemplary process for determining the read-read conflict type is described; for example, n=3, for the third transaction (transaction tx2 identified by execution information 2 in the target data structure group), the blockchain node can determine the first data key corresponding to the third transaction according to the first transaction field in the target read set that records the execution information 2 of the third transaction, and the first data key is k1. That is to say, based on this, it can be determined that the first data key referenced by the third transaction through the data reading operation is k1; the blockchain node can search for the execution information recorded in the first transaction field corresponding to the first data key k1 in the target read set, and the execution information found is: 0, 2, 3; because the execution information is found, the execution information is read from the target read set. In the set conflict table, the number of transactions is searched in the first quantity field determined by the third transaction and the first data key k1, and the number found is 1; because the number found is a valid value, the execution information whose order is earlier than the order indicated by the execution information 2 of the third transaction is determined from the found execution information 0, 2, and 3, and the determined execution information is 0; based on this, it can be determined that there is a transaction conflict between the third transaction and the transaction indicated by the determined execution information 0, and the corresponding conflict type is a read-read conflict type, that is, it can be determined that there is a transaction conflict between the third transaction and the first transaction identified by 0, and the corresponding conflict type is a read-read conflict type; among them, there is a transaction conflict of the read-read conflict type between the third transaction and the first transaction (i.e., a read-read conflict), which can be found in Figure 4g As shown by 484.

[0102] In a feasible implementation, the blockchain node can also determine the dependency between the N transactions based on various conflict types determined from the N transactions. In this process, the blockchain node can take any two transactions in the N transactions that have a transaction conflict of the target conflict type as a conflict transaction pair; the target conflict type can include: read-write conflict type, write-write conflict type and write-read conflict type; respectively, build a dependency relationship between the two transactions included in each conflict transaction pair; wherein, for the two transactions in the N transactions that have a dependency relationship, the transaction with the later order indicated by the execution information needs to be executed after the other transaction is executed when scheduling execution, and the transactions in the N transactions that do not have a dependency relationship are allowed to be executed in parallel when scheduling execution. Among them, the target conflict type does not include: read-read conflict type, because when different transactions perform data reading operations on the same data key, the data in the corresponding data key will not be modified, which allows the data reading operations on the same data key to be executed in parallel, so there is no need to build a dependency relationship between transactions with a transaction conflict of the read-read conflict type, and the target conflict type does not need to include the read-read conflict type.

[0103] by Figure 4gFor example, since the second transaction has a transaction conflict of the read-write conflict type with the first transaction, a dependency relationship needs to be established between the second transaction and the first transaction, so that the transaction with a later order indicated by the execution information (i.e., the second transaction) needs to be executed after the other transaction (i.e., the first transaction) is executed when scheduling execution; since the third transaction has a transaction conflict of the write-write conflict type with the second transaction, a dependency relationship needs to be established between the third transaction and the second transaction, so that the transaction with a later order indicated by the execution information (i.e., the third transaction) When scheduling execution, it needs to be executed after another transaction (i.e., the second transaction) is executed; since there is a transaction conflict of the write-read conflict type between the fourth transaction and the second transaction, it is necessary to build a dependency relationship between the fourth transaction and the second transaction, so that the transaction (i.e., the fourth transaction) indicated by the execution information is scheduled to be executed after another transaction (i.e., the second transaction) is executed; since there is no transaction conflict of the target conflict type between the fourth transaction and the third transaction, the fourth transaction and the third transaction are allowed to be executed in parallel when scheduling execution. Based on this, it can be known that the data processing method proposed based on the embodiment of the present application can determine the various conflict types between the N transactions corresponding to a block, and then determine the dependency relationship between the N transactions corresponding to a block. The dependency relationship between the N transactions can be used to indicate the execution order of the N transactions when they are scheduled for execution, that is, there are two transactions with a dependency relationship in the N transactions, and the transaction with a later order indicated by the execution information needs to be executed after another transaction is executed when the execution is scheduled, and the transactions without a dependency relationship in the N transactions are allowed to be executed in parallel when the execution is scheduled.

[0104] In the block consensus scenario, the blockchain node used for block packaging in the blockchain network (i.e., the master node) can package transactions to construct blocks in a round of consensus, and broadcast the blocks to other blockchain nodes (i.e., slave nodes); after receiving the blocks proposed by the master node, the slave nodes can verify the validity of the blocks. When the verified block is invalid, they will not vote for the block or will vote against it. When the verified block is valid, they will vote for the block. After the blockchain nodes in the blockchain network determine that a consensus has been reached on the blocks based on the voting results, they can store the corresponding blocks in the blockchain maintained by the blockchain network. In brief, in the process of packing blocks, the master node can obtain N transactions (N is a positive integer) to be packed into blocks, and execute each transaction to obtain the transaction execution results of each transaction, and construct a block based on each transaction and the transaction execution results of each transaction; after receiving the block proposed by the master node, the slave node can execute N transactions in the block and obtain the transaction execution results of each transaction. If the transaction execution results of each transaction obtained are consistent with the transaction execution results of each transaction in the block proposed by the master node, the block can be verified to be valid, otherwise the verified block can be considered invalid. In this scenario, the order in which the slave node schedules and executes the N transactions in the block is required to be the same as the order in which the master node executes the N transactions, in order to avoid the occurrence of consensus failures caused by the different order in which the slave node schedules and executes the N transactions in the block and the master node executes the N transactions.

[0105] Since the master node executes the N transactions during the process of block packaging, the order in which the N transactions are executed will be generated, and the order in which the N transactions are executed corresponds to the order indicated by the execution information in the embodiment of the present application; in a feasible implementation manner, after receiving the block, the slave node can serially schedule the execution in the order in which the N transactions are executed (by the master node), which can ensure that the order in which the slave node schedules the N transactions in the block is the same as the order in which the master node executes the N transactions; in another feasible implementation manner, if a parallel scheduling execution mechanism is required, it is necessary to determine the conflict type between the N transactions, so as to determine the order in which the N transactions are executed in parallel according to the order in which the N transactions are executed (by the master node) and the determined conflict type. The order in which the N transactions are executed in parallel can be determined based on the dependency relationship between the N transactions, for example, Figure 4g Taking the conflict type determined in as an example, in the order of the parallel scheduling execution of the N transactions determined according to the dependency relationship, the fourth transaction must be executed after the second transaction is completed, while the fourth transaction and the third transaction can be executed in parallel.

[0106] In a feasible implementation, the master node can determine the conflict type between the N transactions corresponding to the block, and then determine the order of the parallel scheduling execution of the N transactions corresponding to the block, and send the sequence indication information of the determined order of the parallel scheduling execution of the N transactions corresponding to the block to the slave node in conjunction with the block, so that the slave node can perform parallel scheduling execution of the N transactions according to the order of the parallel scheduling execution of the N transactions corresponding to the block indicated by the corresponding sequence indication information; in an optional implementation, the sequence indication information can be represented by a directed acyclic graph DAG, and the DAG can be constructed according to the conflict type between the N transactions, for example, it can be specifically constructed according to the dependency relationship determined by the conflict type between the N transactions. In another feasible implementation, the master node can send the execution information of the N transactions corresponding to the block to the slave node in conjunction with the block, so that the slave node can determine the conflict type between the N transactions according to the order in which the corresponding transactions are executed by the (master node) as indicated by the execution information of the N transactions, and then determine the order of the parallel scheduling execution of the N transactions, so as to perform parallel scheduling execution of the N transactions according to the determined order of the parallel scheduling execution of the N transactions. Based on this, it can be seen that since the data processing solution proposed in the embodiment of the present application can accurately identify the conflict types between transactions, the precise conflict classification representation enables more fine-grained scheduling optimization based on different conflict types in the subsequent transaction scheduling execution process, and lays a good foundation for determining the order of parallel transaction scheduling execution, for example, laying a good foundation for DAG construction.

[0107] In an optional implementation, a consensus engine module and a scheduling execution module may be deployed in a blockchain node, wherein the consensus engine module may include a consensus algorithm module and a peer-to-peer network module, the consensus algorithm module may include one or more consensus algorithms, the peer-to-peer network module may be used to implement point-to-point transmission between blockchain nodes, and the scheduling execution module is the core module for scheduling and executing transactions in the blockchain node, and may be used to implement processes related to scheduling and executing transactions. The scheduling execution module of the master node will execute transactions and construct blocks, and send the constructed blocks to the consensus engine module. The consensus engine module will construct proposals based on the blocks and broadcast the proposals to other slave nodes. After receiving the proposals, the slave nodes can verify the validity of the blocks corresponding to the proposals through their scheduling execution modules. When the verification block is invalid, they will not vote on the block or will vote against it. When the verification block is valid, they will vote on the block. After receiving the block proposed by the master node, the slave nodes can execute each transaction in the block (i.e., schedule the execution of transactions) and obtain the transaction execution results of each transaction. If the transaction execution results of each transaction are consistent with the transaction execution results of each transaction in the block proposed by the master node, the block can be verified to be valid. Otherwise, the verification block can be considered invalid.

[0108] In an embodiment of the present application, the execution information of N transactions in the blockchain network and the read-write information of each transaction can be used to construct a target data structure group, and based on the target data structure group, the conflict type between each transaction in which there is a transaction conflict in the N transactions can be identified; wherein, the execution information of any transaction can be used to indicate the order in which the corresponding transactions are executed, and the read-write information of any transaction can include the data keys referenced by each data processing operation indicated by the corresponding transaction. The target data structure group constructed based on the execution information and read-write information of the N transactions records the reference status of each data key and the key reference status of each transaction. The reference status of any data key indicates: the transaction that references the corresponding data key, the key reference status of the nth transaction Usage indication: among the transactions executed before the nth transaction, the number of transactions that reference the same data key as the nth transaction; through the construction of the target data structure group, the reference of each data key and the key reference of each transaction can be recorded, and the conflict type between each transaction with transaction conflict in N transactions can be accurately identified according to the reference of each data key and the key reference of each transaction recorded in the target data structure group by table lookup, that is, transactions with various conflict types in N transactions can be accurately identified; and the precise conflict classification representation will greatly facilitate users to locate and troubleshoot problems, and various detailed conflict scenarios can be explicitly analyzed.

[0109] Based on the description of the above data processing method embodiment, the present application embodiment also discloses a data processing device; the data processing device can be a computer program running in a computer device, the computer device can be a blockchain node, and the data processing device can execute Figure 2 or Figure 3 The steps in the method flow are shown. Figure 5 , the data processing device can run the following units:

[0110] The acquisition unit 501 is used to acquire execution information of N transactions in the blockchain network; any transaction is used to indicate at least one of the following data processing operations: a data reading operation and a data writing operation, and the execution information of any transaction is used to indicate the order in which the corresponding transaction is executed, and N is a positive integer;

[0111] Processing unit 502, used to determine the read and write information of each transaction; the read and write information of any transaction includes: a data key referenced by each data processing operation indicated by the corresponding transaction, and the data key is a structure for storing data;

[0112] The processing unit 502 is further used to construct a target data structure group using the execution information and corresponding read-write information of the N transactions; wherein the target data structure group records the reference status of each data key and the key reference status of each transaction; the reference status of any data key indicates: the transaction that references the corresponding data key; the key reference status of the nth transaction indicates: the number of transactions that reference the same data key as the nth transaction among the transactions executed before the nth transaction, n∈[1,N];

[0113] The processing unit 502 is further configured to identify, based on the target data structure group, conflict types between transactions having transaction conflicts in the N transactions.

[0114] In one implementation, when the processing unit 502 is used to construct the target data structure group using the execution information and corresponding read / write information of the N transactions, it can be specifically used to:

[0115] Aggregate the data keys in the read and write information of the N transactions to obtain M data keys, where M is a positive integer;

[0116] Using the execution information of the N transactions and the M data keys, an initial data structure group is constructed; the initial data structure group is used to record: the reference status of each data key and the key reference status of each transaction;

[0117] According to the order in which the N transactions are executed, the initial data structure group is filled with the read and write information of each transaction in turn to obtain the target data structure group.

[0118] In another implementation, the initial data structure group includes the following data structures: a read set set, a write set set, a read set conflict table, and a write set conflict table; wherein:

[0119] The read set includes: M data keys and a first transaction field corresponding to each data key; the first transaction field corresponding to the mth data key is used to fill: among the N transactions, the execution information of the transaction that references the mth data key through the data read operation;

[0120] The write set includes: M data keys and a second transaction field corresponding to each data key; the second transaction field corresponding to the mth data key is used to fill: the execution information of the transaction that references the mth data key through the data write operation among the N transactions;

[0121] The read set conflict table includes: N rows and M columns of the first quantity field, the row header of the nth row is the execution information of the nth transaction, and the column header of the mth column is the mth data key; the first quantity field located in the nth row and the mth column is used to fill: the number of transactions that reference the mth data key through data read operations in transactions executed before the nth transaction;

[0122] The write set conflict table includes: N rows and M columns of the second quantity field, the row header of the nth row is the execution information of the nth transaction, and the column header of the mth column is the mth data key; the second quantity field located in the nth row and the mth column is used to fill: the number of transactions that referenced the mth data key through data write operations in transactions executed before the nth transaction;

[0123] Among them, m∈[1,M].

[0124] In another implementation manner, the nth transaction refers to the nth executed transaction among the N transactions; when the processing unit 502 is used to fill the initial data structure group with the read and write information of each transaction in the order in which the N transactions are executed to obtain the target data structure group, it can be specifically used to:

[0125] According to the order in which the N transactions are executed, the read-write information of the N transactions is traversed in sequence to determine the read-write information of the nth transaction currently traversed;

[0126] Obtain the nth data structure group to be filled, and use the read and write information of the nth transaction to fill the fields associated with the nth transaction in the nth data structure group to be filled, so as to obtain the filled nth data structure group;

[0127] Wherein, if n=1, the nth data structure group to be filled is the initial data structure group; if n>1, the nth data structure group to be filled is the n-1th data structure group after filling;

[0128] The Nth data structure group after filling obtained after traversing the read and write information of the N transactions is used as the target data structure group.

[0129] In another implementation, when the processing unit 502 is used to use the read and write information of the nth transaction to fill the fields associated with the nth transaction in the nth data structure group to be filled, and obtain the filled nth data structure group, it can be specifically used to:

[0130] Traversing each data key in the read-write information of the nth transaction, determining the target data key currently traversed, and determining the target data processing operation corresponding to the target data key when it is referenced;

[0131] Determining, from the data structures of the nth data structure group to be filled, a data structure to be filled associated with the target data processing operation;

[0132] Based on the target data key and the read set set and the write set set in the nth data structure group to be filled, fill the fields associated with the nth transaction in the data structure to be filled, until the filled nth data structure group is obtained after the traversal is completed;

[0133] Among them, if the target data processing operation is a data read operation, the data structure to be filled associated with the data read operation includes: a read set set, a read set conflict table and a write set conflict table; if the target data processing operation is a data write operation, the data structure to be filled associated with the data write operation includes: a write set set, a read set conflict table and a write set conflict table.

[0134] In another implementation, when the processing unit 502 is used to fill the field associated with the nth transaction in the read set conflict table in the to-be-filled data structure, it can be specifically used to:

[0135] The read set set in the nth data structure group to be filled is used as the read set set to be searched;

[0136] Determine, according to the first transaction field corresponding to the target data key in the to-be-searched read set, the number of transactions whose order indicated by the execution information is earlier than the order indicated by the execution information of the nth transaction;

[0137] The determined quantity is filled in the read set conflict table in the to-be-filled data structure, in the first quantity field determined by the nth transaction and the target data key.

[0138] In another implementation, when the processing unit 502 is used to fill the field associated with the nth transaction in the write-set conflict table in the data structure to be filled, it can be specifically used to:

[0139] The write set set in the nth data structure group to be filled is used as the write set set to be searched;

[0140] Determine, according to the second transaction field corresponding to the target data key in the write set to be searched, the number of transactions whose order indicated by the execution information is earlier than the order indicated by the execution information of the nth transaction;

[0141] The determined quantity is filled in the write-set conflict table in the to-be-filled data structure, in the second quantity field determined by the nth transaction and the target data key.

[0142] In another implementation, when the processing unit 502 is used to fill the field associated with the nth transaction in the read set set or the write set set in the data structure to be filled, it can be specifically used to:

[0143] If the target data processing operation is a data reading operation, the execution information of the nth transaction is filled in the first transaction field corresponding to the target data key in the read set set in the data structure to be filled;

[0144] If the target data processing operation is a data writing operation, the execution information of the nth transaction is filled in the second transaction field corresponding to the target data key in the write set set in the data structure to be filled.

[0145] In another embodiment, the target data structure group includes: a target read set set, a target write set set, a target read set conflict table, and a target write set conflict table obtained by filling the read set set, the write set set, the read set conflict table, and the write set conflict table in the initial data structure group; the conflict type includes a read-write conflict type;

[0146] When the processing unit 502 is used to identify the conflict type between each transaction having a transaction conflict in the N transactions based on the target data structure group, it can be specifically used to:

[0147] For the nth transaction, according to the first transaction field in the target read set that records the execution information of the nth transaction, determine the first data key corresponding to the nth transaction; the first data key is referenced by the nth transaction through the data read operation;

[0148] Searching for execution information recorded in the target write set and in the second transaction field corresponding to the first data key;

[0149] If the execution information is found, searching the target write-set conflict table for the quantity of the transaction in a second quantity field determined by the nth transaction and the first data key;

[0150] If the found quantity is a valid value, then from the found execution information, the execution information whose order is earlier than the order indicated by the execution information of the nth transaction is determined;

[0151] It is determined that there is a transaction conflict between the nth transaction and the transaction indicated by the determined execution information, and the corresponding conflict type is a read-write conflict type.

[0152] In another embodiment, the target data structure group includes: a target read set set, a target write set set, a target read set conflict table, and a target write set conflict table obtained by filling the read set set, the write set set, the read set conflict table, and the write set conflict table in the initial data structure group; the conflict type includes a write-write conflict type;

[0153] When the processing unit 502 is used to identify the conflict type between each transaction having a transaction conflict in the N transactions based on the target data structure group, it can be specifically used to:

[0154] For the nth transaction, according to the second transaction field in the target write set that records the execution information of the nth transaction, determine the second data key corresponding to the nth transaction; the second data key is referenced by the nth transaction through the data write operation;

[0155] Searching for execution information recorded in the target write set and in the second transaction field corresponding to the second data key;

[0156] If the execution information is found, searching the target write-set conflict table for the quantity of the transaction in a second quantity field determined by the nth transaction and the second data key;

[0157] If the found quantity is a valid value, then from the found execution information, the execution information whose order is earlier than the order indicated by the execution information of the nth transaction is determined;

[0158] It is determined that there is a transaction conflict between the nth transaction and the transaction indicated by the determined execution information, and the corresponding conflict type is a write-write conflict type.

[0159] In another embodiment, the target data structure group includes: a target read set set, a target write set set, a target read set conflict table, and a target write set conflict table obtained by filling the read set set, the write set set, the read set conflict table, and the write set conflict table in the initial data structure group; the conflict type includes a write-read conflict type;

[0160] When the processing unit 502 is used to identify the conflict type between each transaction having a transaction conflict in the N transactions based on the target data structure group, it can be specifically used to:

[0161] For the nth transaction, according to the second transaction field in the target write set that records the execution information of the nth transaction, determine the second data key corresponding to the nth transaction; the second data key is referenced by the nth transaction through the data write operation;

[0162] Searching for execution information recorded in the first transaction field corresponding to the second data key in the target read set;

[0163] If the execution information is found, searching the target read set conflict table for the quantity of the transaction in the first quantity field determined by the nth transaction and the second data key;

[0164] If the found quantity is a valid value, then from the found execution information, the execution information whose order is earlier than the order indicated by the execution information of the nth transaction is determined;

[0165] It is determined that there is a transaction conflict between the nth transaction and the transaction indicated by the determined execution information, and the corresponding conflict type is a write-read conflict type.

[0166] In another implementation, the processing unit 502 is further configured to:

[0167] Any two transactions in the N transactions that have a transaction conflict of a target conflict type are regarded as a conflicting transaction pair; the target conflict type includes: a read-write conflict type, a write-write conflict type, and a write-read conflict type;

[0168] Construct dependency relationships between the two transactions included in each conflicting transaction pair;

[0169] Among them, if there are two transactions with a dependency relationship among the N transactions, the transaction with a later order indicated by the execution information must be executed after the other transaction is completed when it is scheduled for execution, and the transactions without a dependency relationship among the N transactions are allowed to be executed in parallel when they are scheduled for execution.

[0170] According to another embodiment of the present application, Figure 5 The various units in the data processing device shown can be respectively or all combined into one or several other units to constitute, or some of the units (some) can also be split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of a unit can also be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of the present application, the data processing device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0171] According to another embodiment of the present application, the program can be executed by running on a general computing device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. Figure 2 or Figure 3 The computer program of each step involved in the corresponding method shown in is constructed as follows Figure 5 The data processing device shown in the embodiment of the present application is used to implement the data processing method of the embodiment of the present application. The computer program can be recorded on a computer-readable storage medium, for example, and loaded into the above-mentioned computing device through the computer-readable storage medium and run therein.

[0172] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0173] In an embodiment of the present application, the execution information of N transactions in the blockchain network and the read-write information of each transaction can be used to construct a target data structure group, and based on the target data structure group, the conflict type between each transaction in which there is a transaction conflict in the N transactions can be identified; wherein the execution information of any transaction can be used to indicate the order in which the corresponding transactions are executed, and the read-write information of any transaction can include the data keys referenced by each data processing operation indicated by the corresponding transaction. The target data structure group constructed based on the execution information and the read-write information of the N transactions records the reference of each data key and the key reference of each transaction, and the reference of any data key Situation indication: transactions that reference corresponding data keys, key reference situation indication of the nth transaction: the number of transactions that reference the same data key as the nth transaction in transactions executed before the nth transaction; through the construction of the target data structure group, the reference situation of each data key and the key reference situation of each transaction can be recorded, and the conflict type between each transaction with transaction conflicts in N transactions can be accurately identified by table lookup according to the reference situation of each data key and the key reference situation of each transaction recorded in the target data structure group, that is, transactions with various conflict types in N transactions can be accurately identified.

[0174] Based on the description of the above method embodiment and device embodiment, the present application embodiment also provides a computer device, which can be a blockchain node. Figure 6 , the computer device at least includes a processor 601, an input interface 602, an output interface 603 and a computer storage medium 604. The processor 601, the input interface 602, the output interface 603 and the computer storage medium 604 in the computer device can be connected via a bus or other means. The computer storage medium 604 can be stored in the memory of the computer device, the computer storage medium 604 is used to store computer programs, and the processor 601 is used to execute the computer programs stored in the computer storage medium 604. The processor 601 (or CPU (Central Processing Unit)) is the computing core and control core of the computer device, which is suitable for running computer programs to implement corresponding method processes or corresponding functions.

[0175] In one embodiment, the processor 601 described in the embodiment of the present application can be used for detecting the relevant process of the conflict type between transactions, specifically including: obtaining the execution information of N transactions in the blockchain network; any transaction is used to indicate at least one of the following data processing operations: data reading operation and data writing operation, and the execution information of any transaction is used to indicate the order in which the corresponding transactions are executed, and N is a positive integer; determining the read and write information of each transaction; the read and write information of any transaction includes: the data key referenced by each data processing operation indicated by the corresponding transaction, and the data key is a structure for storing data; using the execution information of the N transactions and the corresponding read and write information, constructing a target data structure group; wherein the target data structure group records the reference status of each data key and the key reference status of each transaction; the reference status of any data key indicates: the transaction that references the corresponding data key; the key reference status of the nth transaction indicates: among the transactions executed before the nth transaction, the number of transactions that reference the same data key as the nth transaction, n∈[1,N]; based on the target data structure group, identifying the conflict type between each transaction in the N transactions that has a transaction conflict, and so on.

[0176] The embodiment of the present application also provides a computer storage medium (Memory), which is a memory device in a computer device for storing computer programs and data. It is understandable that the computer storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer storage medium provides a storage space that stores the operating system of the computer device. In addition, a computer program is also stored in the storage space, which is suitable for being loaded and executed by the processor 601 to implement the corresponding method flow provided in the embodiment of the present application. It should be noted that the computer storage medium here can be a high-speed RAM memory, or a non-volatile memory, such as at least one disk storage; optionally, it can also be at least one computer storage medium located away from the aforementioned processor.

[0177] In one embodiment, the computer program stored in the computer storage medium can be loaded and executed by the processor to implement the above-mentioned Figure 2 or Figure 3 Corresponding steps in the method embodiment shown; in a specific implementation, the computer program in the computer storage medium can be loaded by the processor and execute the following steps:

[0178] Obtain execution information of N transactions in the blockchain network; any transaction is used to indicate at least one of the following data processing operations: data reading operation and data writing operation, and the execution information of any transaction is used to indicate the order in which the corresponding transactions are executed, and N is a positive integer;

[0179] Determine the read and write information for each transaction; the read and write information for any transaction includes: the data key referenced by each data processing operation indicated by the corresponding transaction, and the data key is a structure used to store data;

[0180] The execution information and corresponding read-write information of the N transactions are used to construct a target data structure group; wherein the target data structure group records the reference status of each data key and the key reference status of each transaction; the reference status of any data key indicates: the transaction that references the corresponding data key; the key reference status of the nth transaction indicates: among the transactions executed before the nth transaction, the number of transactions that reference the same data key as the nth transaction, n∈[1,N];

[0181] Based on the target data structure group, conflict types between transactions having transaction conflicts among the N transactions are identified.

[0182] In one implementation, when the processor 601 is used to construct the target data structure group using the execution information and corresponding read / write information of the N transactions, it can be specifically used to:

[0183] Aggregate the data keys in the read and write information of the N transactions to obtain M data keys, where M is a positive integer;

[0184] Using the execution information of the N transactions and the M data keys, an initial data structure group is constructed; the initial data structure group is used to record: the reference status of each data key and the key reference status of each transaction;

[0185] According to the order in which the N transactions are executed, the initial data structure group is filled with the read and write information of each transaction in turn to obtain the target data structure group.

[0186] In another implementation, the initial data structure group includes the following data structures: a read set set, a write set set, a read set conflict table, and a write set conflict table; wherein:

[0187] The read set includes: M data keys and a first transaction field corresponding to each data key; the first transaction field corresponding to the mth data key is used to fill: among the N transactions, the execution information of the transaction that references the mth data key through the data read operation;

[0188] The write set includes: M data keys and a second transaction field corresponding to each data key; the second transaction field corresponding to the mth data key is used to fill: the execution information of the transaction that references the mth data key through the data write operation among the N transactions;

[0189] The read set conflict table includes: N rows and M columns of the first quantity field, the row header of the nth row is the execution information of the nth transaction, and the column header of the mth column is the mth data key; the first quantity field located in the nth row and the mth column is used to fill: the number of transactions that reference the mth data key through data read operations in transactions executed before the nth transaction;

[0190] The write set conflict table includes: N rows and M columns of the second quantity field, the row header of the nth row is the execution information of the nth transaction, and the column header of the mth column is the mth data key; the second quantity field located in the nth row and the mth column is used to fill: the number of transactions that referenced the mth data key through data write operations in transactions executed before the nth transaction;

[0191] Among them, m∈[1,M].

[0192] In another implementation manner, the nth transaction refers to the nth executed transaction among the N transactions; when the processor 601 is used to fill the initial data structure group with the read and write information of each transaction in the order in which the N transactions are executed to obtain the target data structure group, it can be specifically used to:

[0193] According to the order in which the N transactions are executed, the read-write information of the N transactions is traversed in sequence to determine the read-write information of the nth transaction currently traversed;

[0194] Obtain the nth data structure group to be filled, and use the read and write information of the nth transaction to fill the fields associated with the nth transaction in the nth data structure group to be filled, so as to obtain the filled nth data structure group;

[0195] Wherein, if n=1, the nth data structure group to be filled is the initial data structure group; if n>1, the nth data structure group to be filled is the n-1th data structure group after filling;

[0196] The Nth data structure group after filling obtained after traversing the read and write information of the N transactions is used as the target data structure group.

[0197] In another implementation manner, when the processor 601 is used to use the read and write information of the nth transaction to fill the fields associated with the nth transaction in the nth data structure group to be filled to obtain the filled nth data structure group, it can be specifically used to:

[0198] Traversing each data key in the read-write information of the nth transaction, determining the target data key currently traversed, and determining the target data processing operation corresponding to the target data key when it is referenced;

[0199] Determining, from the data structures of the nth data structure group to be filled, a data structure to be filled associated with the target data processing operation;

[0200] Based on the target data key and the read set set and the write set set in the nth data structure group to be filled, fill the fields associated with the nth transaction in the data structure to be filled, until the filled nth data structure group is obtained after the traversal is completed;

[0201] Among them, if the target data processing operation is a data read operation, the data structure to be filled associated with the data read operation includes: a read set set, a read set conflict table and a write set conflict table; if the target data processing operation is a data write operation, the data structure to be filled associated with the data write operation includes: a write set set, a read set conflict table and a write set conflict table.

[0202] In another implementation manner, when the processor 601 is used to fill the field associated with the nth transaction in the read set conflict table in the to-be-filled data structure, it can be specifically used to:

[0203] The read set set in the nth data structure group to be filled is used as the read set set to be searched;

[0204] Determine, according to the first transaction field corresponding to the target data key in the to-be-searched read set, the number of transactions whose order indicated by the execution information is earlier than the order indicated by the execution information of the nth transaction;

[0205] The determined quantity is filled in the read set conflict table in the to-be-filled data structure, in the first quantity field determined by the nth transaction and the target data key.

[0206] In another implementation, when the processor 601 is used to fill the field associated with the nth transaction in the write-set conflict table in the data structure to be filled, it can be specifically used to:

[0207] The write set set in the nth data structure group to be filled is used as the write set set to be searched;

[0208] Determine, according to the second transaction field corresponding to the target data key in the write set to be searched, the number of transactions whose order indicated by the execution information is earlier than the order indicated by the execution information of the nth transaction;

[0209] The determined quantity is filled in the write-set conflict table in the to-be-filled data structure, in the second quantity field determined by the nth transaction and the target data key.

[0210] In another implementation, when the processor 601 is used to fill the field associated with the nth transaction in the read set set or the write set set in the data structure to be filled, it can be specifically used to:

[0211] If the target data processing operation is a data reading operation, the execution information of the nth transaction is filled in the first transaction field corresponding to the target data key in the read set set in the data structure to be filled;

[0212] If the target data processing operation is a data writing operation, the execution information of the nth transaction is filled in the second transaction field corresponding to the target data key in the write set set in the data structure to be filled.

[0213] In another embodiment, the target data structure group includes: a target read set set, a target write set set, a target read set conflict table, and a target write set conflict table obtained by filling the read set set, the write set set, the read set conflict table, and the write set conflict table in the initial data structure group; the conflict type includes a read-write conflict type;

[0214] When the processor 601 is used to identify the conflict type between each transaction having a transaction conflict in the N transactions based on the target data structure group, it can be specifically used to:

[0215] For the nth transaction, according to the first transaction field in the target read set that records the execution information of the nth transaction, determine the first data key corresponding to the nth transaction; the first data key is referenced by the nth transaction through the data read operation;

[0216] Searching for execution information recorded in the target write set and in the second transaction field corresponding to the first data key;

[0217] If the execution information is found, searching the target write-set conflict table for the quantity of the transaction in a second quantity field determined by the nth transaction and the first data key;

[0218] If the found quantity is a valid value, then from the found execution information, the execution information whose order is earlier than the order indicated by the execution information of the nth transaction is determined;

[0219] It is determined that there is a transaction conflict between the nth transaction and the transaction indicated by the determined execution information, and the corresponding conflict type is a read-write conflict type.

[0220] In another embodiment, the target data structure group includes: a target read set set, a target write set set, a target read set conflict table, and a target write set conflict table obtained by filling the read set set, the write set set, the read set conflict table, and the write set conflict table in the initial data structure group; the conflict type includes a write-write conflict type;

[0221] When the processor 601 is used to identify the conflict type between each transaction having a transaction conflict in the N transactions based on the target data structure group, it can be specifically used to:

[0222] For the nth transaction, according to the second transaction field in the target write set that records the execution information of the nth transaction, determine the second data key corresponding to the nth transaction; the second data key is referenced by the nth transaction through the data write operation;

[0223] Searching for execution information recorded in the target write set and in the second transaction field corresponding to the second data key;

[0224] If the execution information is found, searching the target write-set conflict table for the quantity of the transaction in a second quantity field determined by the nth transaction and the second data key;

[0225] If the found quantity is a valid value, then from the found execution information, the execution information whose order is earlier than the order indicated by the execution information of the nth transaction is determined;

[0226] It is determined that there is a transaction conflict between the nth transaction and the transaction indicated by the determined execution information, and the corresponding conflict type is a write-write conflict type.

[0227] In another embodiment, the target data structure group includes: a target read set set, a target write set set, a target read set conflict table, and a target write set conflict table obtained by filling the read set set, the write set set, the read set conflict table, and the write set conflict table in the initial data structure group; the conflict type includes a write-read conflict type;

[0228] When the processor 601 is used to identify the conflict type between each transaction having a transaction conflict in the N transactions based on the target data structure group, it can be specifically used to:

[0229] For the nth transaction, according to the second transaction field in the target write set that records the execution information of the nth transaction, determine the second data key corresponding to the nth transaction; the second data key is referenced by the nth transaction through the data write operation;

[0230] Searching for execution information recorded in the first transaction field corresponding to the second data key in the target read set;

[0231] If the execution information is found, searching the target read set conflict table for the quantity of the transaction in the first quantity field determined by the nth transaction and the second data key;

[0232] If the found quantity is a valid value, then from the found execution information, the execution information whose order is earlier than the order indicated by the execution information of the nth transaction is determined;

[0233] It is determined that there is a transaction conflict between the nth transaction and the transaction indicated by the determined execution information, and the corresponding conflict type is a write-read conflict type.

[0234] In another implementation, the processor 601 is further configured to:

[0235] Any two transactions in the N transactions that have a transaction conflict of a target conflict type are regarded as a conflicting transaction pair; the target conflict type includes: a read-write conflict type, a write-write conflict type, and a write-read conflict type;

[0236] Construct dependency relationships between the two transactions included in each conflicting transaction pair;

[0237] Among them, if there are two transactions with a dependency relationship among the N transactions, the transaction with a later order indicated by the execution information must be executed after the other transaction is completed when it is scheduled for execution, and the transactions without a dependency relationship among the N transactions are allowed to be executed in parallel when they are scheduled for execution.

[0238] In an embodiment of the present application, the execution information of N transactions in the blockchain network and the read-write information of each transaction can be used to construct a target data structure group, and based on the target data structure group, the conflict type between each transaction in which there is a transaction conflict in the N transactions can be identified; wherein the execution information of any transaction can be used to indicate the order in which the corresponding transactions are executed, and the read-write information of any transaction can include the data keys referenced by each data processing operation indicated by the corresponding transaction. The target data structure group constructed based on the execution information and the read-write information of the N transactions records the reference of each data key and the key reference of each transaction, and the reference of any data key Situation indication: transactions that reference corresponding data keys, key reference situation indication of the nth transaction: the number of transactions that reference the same data key as the nth transaction in transactions executed before the nth transaction; through the construction of the target data structure group, the reference situation of each data key and the key reference situation of each transaction can be recorded, and the conflict type between each transaction with transaction conflicts in N transactions can be accurately identified by table lookup according to the reference situation of each data key and the key reference situation of each transaction recorded in the target data structure group, that is, transactions with various conflict types in N transactions can be accurately identified.

[0239] The present application provides a computer program product, which includes a computer program stored in a computer storage medium; a processor of a computer device reads the computer program from the computer storage medium, and the processor executes the computer program, so that the computer device performs the above Figure 2 or Figure 3 It should be understood that the above disclosure is only the preferred embodiment of the present application, and certainly cannot be used to limit the scope of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope of the present application.

Claims

1. A data processing method, It is characterized in that include: Obtain execution information of N transactions in the blockchain network; any transaction is used to indicate at least one of the following data processing operations: data reading operation and data writing operation, and the execution information of any transaction is used to indicate the order in which the corresponding transactions are executed, and N is a positive integer; Determine the read and write information for each transaction; The read and write information of any transaction includes: the data key referenced by each data processing operation indicated by the corresponding transaction, and the data key is a structure used to store data; The execution information and corresponding read-write information of the N transactions are used to construct a target data structure group; wherein the target data structure group records the reference status of each data key and the key reference status of each transaction; the reference status of any data key indicates: the transaction that references the corresponding data key; the key reference status of the nth transaction indicates: among the transactions executed before the nth transaction, the number of transactions that reference the same data key as the nth transaction, n∈[1,N]; Based on the target data structure group, conflict types between transactions having transaction conflicts among the N transactions are identified.

2. The method according to claim 1, It is characterized in that The method of using the execution information and corresponding read / write information of the N transactions to construct a target data structure group includes: Aggregate the data keys in the read and write information of the N transactions to obtain M data keys, where M is a positive integer; Using the execution information of the N transactions and the M data keys, an initial data structure group is constructed; the initial data structure group is used to record: the reference status of each data key and the key reference status of each transaction; According to the order in which the N transactions are executed, the initial data structure group is filled with the read and write information of each transaction in turn to obtain the target data structure group.

3. The method according to claim 2, It is characterized in that The initial data structure group includes the following data structures: a read set set, a write set set, a read set conflict table, and a write set conflict table; wherein: The read set includes: M data keys and a first transaction field corresponding to each data key; the first transaction field corresponding to the mth data key is used to fill: among the N transactions, the execution information of the transaction that references the mth data key through the data read operation; The write set includes: M data keys and a second transaction field corresponding to each data key; the second transaction field corresponding to the mth data key is used to fill: the execution information of the transaction that references the mth data key through the data write operation among the N transactions; The read set conflict table includes: N rows and M columns of the first quantity field, the row header of the nth row is the execution information of the nth transaction, and the column header of the mth column is the mth data key; the first quantity field located in the nth row and the mth column is used to fill: the number of transactions that reference the mth data key through data read operations in transactions executed before the nth transaction; The write set conflict table includes: N rows and M columns of the second quantity field, the row header of the nth row is the execution information of the nth transaction, and the column header of the mth column is the mth data key; the second quantity field located in the nth row and the mth column is used to fill: the number of transactions that referenced the mth data key through data write operations in transactions executed before the nth transaction; Among them, m∈[1,M].

4. The method according to claim 3, It is characterized in that The nth transaction refers to the nth executed transaction among the N transactions; and the initial data structure group is filled with the read and write information of each transaction in the order in which the N transactions are executed, to obtain the target data structure group, including: According to the order in which the N transactions are executed, the read-write information of the N transactions is traversed in sequence to determine the read-write information of the nth transaction currently traversed; Obtain the nth data structure group to be filled, and use the read and write information of the nth transaction to fill the fields associated with the nth transaction in the nth data structure group to be filled, so as to obtain the filled nth data structure group; Wherein, if n=1, the nth data structure group to be filled is the initial data structure group; if n>1, the nth data structure group to be filled is the n-1th data structure group after filling; The Nth data structure group after filling obtained after traversing the read and write information of the N transactions is used as the target data structure group.

5. The method according to claim 4, It is characterized in that The read / write information of the nth transaction is used to fill the fields associated with the nth transaction in the nth data structure group to be filled, so as to obtain the filled nth data structure group, including: Traversing each data key in the read-write information of the nth transaction, determining the target data key currently traversed, and determining the target data processing operation corresponding to the target data key when it is referenced; Determining, from the data structures of the nth data structure group to be filled, a data structure to be filled associated with the target data processing operation; Based on the target data key and the read set set and the write set set in the nth data structure group to be filled, fill the fields associated with the nth transaction in the data structure to be filled, until the filled nth data structure group is obtained after the traversal is completed; Among them, if the target data processing operation is a data read operation, the data structure to be filled associated with the data read operation includes: a read set set, a read set conflict table and a write set conflict table; if the target data processing operation is a data write operation, the data structure to be filled associated with the data write operation includes: a write set set, a read set conflict table and a write set conflict table.

6. The method according to claim 5, It is characterized in that Filling the fields associated with the nth transaction in the read set conflict table in the to-be-filled data structure includes: The read set set in the nth data structure group to be filled is used as the read set set to be searched; Determine, according to the first transaction field corresponding to the target data key in the to-be-searched read set, the number of transactions whose order indicated by the execution information is earlier than the order indicated by the execution information of the nth transaction; The determined quantity is filled in the read set conflict table in the to-be-filled data structure, in the first quantity field determined by the nth transaction and the target data key.

7. The method according to claim 5, It is characterized in that Filling the fields associated with the nth transaction in the write-set conflict table in the to-be-filled data structure includes: The write set set in the nth data structure group to be filled is used as the write set set to be searched; Determine, according to the second transaction field corresponding to the target data key in the write set to be searched, the number of transactions whose order indicated by the execution information is earlier than the order indicated by the execution information of the nth transaction; The determined quantity is filled in the write-set conflict table in the to-be-filled data structure, in the second quantity field determined by the nth transaction and the target data key.

8. The method according to claim 5, It is characterized in that Filling a field associated with the nth transaction in a read set or a write set in the data structure to be filled includes: If the target data processing operation is a data reading operation, the execution information of the nth transaction is filled in the first transaction field corresponding to the target data key in the read set set in the data structure to be filled; If the target data processing operation is a data writing operation, the execution information of the nth transaction is filled in the second transaction field corresponding to the target data key in the write set set in the data structure to be filled.

9. The method according to claim 3, It is characterized in that The target data structure group includes: a target read set set, a target write set set, a target read set conflict table and a target write set conflict table obtained by filling the read set set, the write set set, the read set conflict table and the write set conflict table in the initial data structure group; the conflict type includes a read-write conflict type; The step of identifying, based on the target data structure group, conflict types between transactions having transaction conflicts in the N transactions comprises: For the nth transaction, according to the first transaction field in the target read set that records the execution information of the nth transaction, determine the first data key corresponding to the nth transaction; the first data key is referenced by the nth transaction through the data read operation; Searching for execution information recorded in the target write set and in the second transaction field corresponding to the first data key; If the execution information is found, searching the target write-set conflict table for the quantity of the transaction in a second quantity field determined by the nth transaction and the first data key; If the found quantity is a valid value, then from the found execution information, the execution information whose order is earlier than the order indicated by the execution information of the nth transaction is determined; It is determined that there is a transaction conflict between the nth transaction and the transaction indicated by the determined execution information, and the corresponding conflict type is a read-write conflict type.

10. The method according to claim 3, It is characterized in that The target data structure group includes: a target read set set, a target write set set, a target read set conflict table and a target write set conflict table obtained by filling the read set set, the write set set, the read set conflict table and the write set conflict table in the initial data structure group; the conflict type includes a write-write conflict type; The step of identifying, based on the target data structure group, conflict types between transactions having transaction conflicts in the N transactions comprises: For the nth transaction, according to the second transaction field in the target write set that records the execution information of the nth transaction, determine the second data key corresponding to the nth transaction; the second data key is referenced by the nth transaction through the data write operation; Searching for execution information recorded in the target write set and in the second transaction field corresponding to the second data key; If the execution information is found, searching the target write-set conflict table for the quantity of the transaction in a second quantity field determined by the nth transaction and the second data key; If the found quantity is a valid value, then from the found execution information, the execution information whose order is earlier than the order indicated by the execution information of the nth transaction is determined; It is determined that there is a transaction conflict between the nth transaction and the transaction indicated by the determined execution information, and the corresponding conflict type is a write-write conflict type.

11. The method according to claim 3, It is characterized in that The target data structure group includes: a target read set set, a target write set set, a target read set conflict table and a target write set conflict table obtained by filling the read set set, the write set set, the read set conflict table and the write set conflict table in the initial data structure group; the conflict type includes a write-read conflict type; The step of identifying, based on the target data structure group, conflict types between transactions having transaction conflicts in the N transactions comprises: For the nth transaction, according to the second transaction field in the target write set that records the execution information of the nth transaction, determine the second data key corresponding to the nth transaction; the second data key is referenced by the nth transaction through the data write operation; Searching for execution information recorded in the first transaction field corresponding to the second data key in the target read set; If the execution information is found, searching the target read set conflict table for the quantity of the transaction in the first quantity field determined by the nth transaction and the second data key; If the found quantity is a valid value, then from the found execution information, the execution information whose order is earlier than the order indicated by the execution information of the nth transaction is determined; It is determined that there is a transaction conflict between the nth transaction and the transaction indicated by the determined execution information, and the corresponding conflict type is a write-read conflict type.

12. The method of claim 1, It is characterized in that The method further comprises: Any two transactions in the N transactions that have a transaction conflict of a target conflict type are taken as a conflict transaction pair; the target conflict type includes: a read-write conflict type, a write-write conflict type, and a write-read conflict type; Construct dependency relationships between the two transactions included in each conflicting transaction pair; Among them, if there are two transactions with a dependency relationship among the N transactions, the transaction with a later order indicated by the execution information must be executed after the other transaction is completed when it is scheduled for execution, and the transactions without a dependency relationship among the N transactions are allowed to be executed in parallel when they are scheduled for execution.

13. A data processing device, It is characterized in that include: An acquisition unit, used to acquire execution information of N transactions in the blockchain network; Any transaction is used to indicate at least one of the following data processing operations: data reading operation and data writing operation. The execution information of any transaction is used to indicate the order in which the corresponding transactions are executed. N is a positive integer. A processing unit for determining the read and write information for each transaction; The read and write information of any transaction includes: the data key referenced by each data processing operation indicated by the corresponding transaction, and the data key is a structure used to store data; The processing unit is further used to construct a target data structure group using the execution information and corresponding read-write information of the N transactions; wherein the target data structure group records the reference status of each data key and the key reference status of each transaction; the reference status of any data key indicates: the transaction that references the corresponding data key; the key reference status of the nth transaction indicates: the number of transactions that reference the same data key as the nth transaction among the transactions executed before the nth transaction, n∈[1,N]; The processing unit is further configured to identify, based on the target data structure group, conflict types between transactions having transaction conflicts among the N transactions.

14. A computer device comprising an input interface and an output interface, It is characterized in that Also includes: processor and computer storage media; The computer storage medium is used to store a computer program; The processor is used to run the computer program to implement the data processing method according to any one of claims 1 to 12.

15. A computer storage medium, It is characterized in that The computer storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the data processing method according to any one of claims 1 to 12.