CN110070445B - Transaction processing method and device based on blockchain system - Google Patents

Transaction processing method and device based on blockchain system Download PDF

Info

Publication number
CN110070445B
CN110070445B CN201910350093.3A CN201910350093A CN110070445B CN 110070445 B CN110070445 B CN 110070445B CN 201910350093 A CN201910350093 A CN 201910350093A CN 110070445 B CN110070445 B CN 110070445B
Authority
CN
China
Prior art keywords
transaction
conflict
historical
node
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910350093.3A
Other languages
Chinese (zh)
Other versions
CN110070445A (en
Inventor
张开翔
范瑞彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN201910350093.3A priority Critical patent/CN110070445B/en
Publication of CN110070445A publication Critical patent/CN110070445A/en
Priority to PCT/CN2020/080520 priority patent/WO2020220860A1/en
Application granted granted Critical
Publication of CN110070445B publication Critical patent/CN110070445B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Development Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the invention discloses a transaction processing method and device based on a blockchain system, wherein the method comprises the following steps: a first node in the blockchain system receives a transaction request sent by a client device, determines a conflict result of a first transaction according to an identification of the first transaction included in the transaction request, and further processes the first transaction according to the conflict result of the first transaction and a conflict processing instruction included in the transaction request. In the embodiment of the invention, the conflict detection is carried out on the first transaction based on the identification of the transaction, so that the comparison of complete transaction data is not required, and the transaction processing efficiency in a blockchain system can be improved; moreover, the transaction identification and the conflict processing instruction can be set by the client device, so that different conflict processing instructions can be set based on different service scenes and requirements of the client device, that is, the transaction processing method in the embodiment of the invention is more in line with the actual situation.

Description

Transaction processing method and device based on blockchain system
Technical Field
The present invention relates to the technical field of financial science (Fintech), and in particular, to a transaction processing method and apparatus based on a blockchain system.
Background
With the development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually changed to financial technology (Fintech), and the blockchain technology is not exceptional, but because of the requirements of safety and real-time performance of the financial industry, the technology is also required to be higher. The blockchain system may be generally provided with a plurality of nodes, the nodes may communicate with each other, and generally, the client device may send a transaction request to one node in the blockchain system, and after receiving the transaction request, the node may process a transaction, and may generate blockinformation corresponding to the transaction through consensus with other nodes. In practice, because of the variety of business types, the blockchain system processes a very large number of transactions over a period of time, and therefore, how to reasonably process each transaction is very important for the development of the blockchain system.
In the prior art, after receiving a transaction request sent by a client, a node can generally analyze the transaction request to obtain transaction data, such as a transaction initiator, a transaction receiver, a transaction affiliated service type and the like; further, the node may compare the transaction data with transaction data of historical transactions processed by the blockchain system, and if it is determined that the transaction conflicts with the historical transaction, the transaction may be processed according to a conflict processing instruction preset in the blockchain system. However, in this manner, the transaction data includes a large amount of data, which may require a long time to complete the comparison process of the transaction data with the transaction data of the historical transaction, and in general, the transaction in the blockchain system may be frequently triggered, so that the transaction in the blockchain system may not be processed in time in the manner described above, resulting in poor efficiency of transaction processing in the blockchain system.
In view of the foregoing, there is a need for a transaction processing method based on a blockchain system, which is used for improving the transaction processing efficiency in the blockchain system.
Disclosure of Invention
The embodiment of the invention provides a transaction processing method and device based on a blockchain system, which are used for improving the transaction processing efficiency in the blockchain system.
In a first aspect, an embodiment of the present invention provides a transaction processing method based on a blockchain system, where the method includes:
a first node in a blockchain system receives a transaction request sent by a client device, wherein the transaction request comprises an identification of a first transaction and a conflict processing instruction, and the conflict processing instruction comprises a processing mode of the first transaction when the first transaction conflicts with a historical transaction, and/or a processing mode of the first transaction when the first transaction does not conflict with the historical transaction; further, the first node determines a conflict result of the first transaction according to the identification of the first transaction, and processes the first transaction according to the conflict result of the first transaction and the conflict processing instruction, wherein the conflict result of the first transaction is used for indicating whether the first transaction conflicts with the historical transaction or not.
In the technical scheme, the conflict detection can be carried out on the first transaction in a mode of comparing the identifiers of the transactions without comparing transaction data by setting the identifiers of the transactions, so that the process of carrying out conflict detection on the transactions is faster, and the transaction processing efficiency in the blockchain system is improved; moreover, since the conflict processing instructions are set by the client device, different conflict processing instructions can be set based on different service scenes and requirements of the client device, that is, the transaction processing method in the technical scheme better accords with the actual situation.
Optionally, the first node determines a collision result of the first transaction according to the identification of the first transaction, including: the first node firstly determines a key value of the first transaction according to the identification of the first transaction; further, the first node acquires the identification of the target historical transaction from a first preset database, and stores the identification of the target historical transaction into a preset memory space; the first preset database comprises identifiers of the plurality of historical transactions and key values of the plurality of historical transactions, and the target historical transaction is a historical transaction in which the key value in the first preset database is matched with the key value of the first transaction; and if the first node determines that the target historical transaction matched with the identification of the first transaction exists in the preset memory space, the first node determines that the first transaction conflicts with the historical transaction.
In the embodiment of the invention, because the response speed of the first preset database is generally slower, the technical scheme compares the identification of the first transaction with the identification of the target historical transaction stored in the first memory space in advance, but does not directly compare the identification of the first transaction with the identification of the historical transaction stored in the first preset database, so that the response speed of the conflict detection process can be improved. On the one hand, the target historical transaction in the first preset database is screened based on the key value, so that the memory occupied in the screening process can be reduced, and the screening efficiency is improved; on the other hand, if the target historical transaction matched with the identification of the first transaction exists in the preset memory space, the conflict between the first transaction and the historical transaction can be directly determined, so that the subsequent conflict detection process can be avoided, and the conflict detection efficiency is improved.
Optionally, the method further comprises: if the first node determines that the target historical transaction matched with the identification of the first transaction does not exist in the preset memory space, the identification of the first transaction is input into a first preset filtering model, wherein the first preset filtering model is trained by using transaction information of the plurality of historical transactions, and the transaction information of each historical transaction comprises the identification, the key value, the transaction data, the conflict processing instruction and the conflict times of each historical transaction; further, if the result output by the first preset filtering model is that the first transaction does not have a conflict with the historical transaction, the first node determines that the first transaction does not have a conflict with the historical transaction.
In the technical scheme, after the first transaction is subjected to the first conflict detection based on the target historical transaction in the memory, the first transaction can be subjected to the second conflict detection by using the first preset filtering model, so that the accuracy of the conflict detection can be improved; moreover, the second collision detection process can be executed in a preset memory space, so that the collision detection of the historical transaction in the first preset database can be avoided, and the detection efficiency is improved. That is, in the above technical solution, by using two detection processes in the preset memory space, a larger portion of conflicting transactions can be detected, so that the detection efficiency is improved and the detection accuracy is improved.
Optionally, the method further comprises: if the result output by the first preset filtering model is that the first transaction conflicts with the historical transaction, the first node compares the identification of the first transaction with the identification of one or more historical transactions in the first preset database, and if the first preset database is determined to have the historical transaction matched with the identification of the first transaction, the first transaction conflicts with the historical transaction; and if the fact that the historical transaction matched with the identification of the first transaction does not exist in the first preset database is determined, the fact that the first transaction and the historical transaction are not in conflict is determined.
In the above technical solution, if no conflict result of the first transaction is detected based on two conflict detection processes in the preset memory space, the conflict detection can be performed on the first transaction based on the historical transaction in the first preset database, so that the conflict result of the first transaction can be obtained, and the detected conflict result of the first transaction is more accurate.
Optionally, the conflict handling instructions include any one or more of: refusing to execute the first transaction when the first transaction conflicts with the historical transaction, executing the first transaction when the first transaction conflicts with the historical transaction, redirecting the first transaction to a fault tolerant contract when the first transaction conflicts with the historical transaction, and executing the first transaction when the first transaction does not conflict with the historical transaction; the first node processes the first transaction according to the conflict result of the first transaction and the conflict processing instruction, and the first node comprises the following steps: executing the first transaction by the first node if the first transaction does not conflict with the historical transaction and the conflict processing instruction is that the first transaction does not conflict with the historical transaction, or executing the first transaction if the first transaction conflicts with the historical transaction and the conflict processing instruction is that the first transaction conflicts with the historical transaction; if the first transaction conflicts with the historical transaction, and the conflict processing instruction redirects the first transaction to a fault-tolerant contract when the first transaction conflicts with the historical transaction, the first node acquires an address of the fault-tolerant contract included in the conflict processing instruction, and sends the address of the fault-tolerant contract to the client device; if the first transaction conflicts with the historical transaction, and the conflict processing instruction is that execution of the first transaction is refused when the first transaction conflicts with the historical transaction, the first node sends a conflict indication value to the client device, wherein the conflict indication value is used for indicating that the first transaction conflicts with the historical transaction.
In the above technical solution, the conflict processing instruction is set by the client device, so that the conflict processing instruction according with the actual situation can be set based on the requirement of the client device or the service scene, and accordingly, the first transaction is processed based on the conflict processing instruction, so that the processing result of the first transaction meets the requirement of the client device, and the actual situation can be more met.
Optionally, the first node performs the first transaction, including: the first node generates block information corresponding to the first transaction if the number of nodes which reach consensus for the first transaction in the blockchain system is determined to be greater than or equal to a preset threshold; the first node updates the first preset database and/or the preset memory space according to the transaction information of the first transaction.
According to the technical scheme, the first preset database and the preset memory space are updated by using the block information of the first transaction, so that the updated first preset database and the updated preset memory space can be used for carrying out conflict detection on the next transaction, the transaction processing process can meet the real-time requirement, and the accuracy of transaction processing is improved.
Optionally, after the first node generates the block information corresponding to the first transaction, the method further includes: the first node sends block information corresponding to the first transaction to the client device, wherein the block information is used for correcting the first transaction by the client device.
In the technical scheme, because the conflict processing instruction is set for the client device, some conflicting transactions can still be processed, and the client device is used for correcting the transactions after the transactions are processed, so that larger errors in the transaction processing process can be avoided, and the service processing capacity and the service processing accuracy of the blockchain system are improved.
Optionally, the first preset database further stores first check values corresponding to the plurality of historical transaction data, where the first check values are obtained by checking the plurality of historical transaction data by using a preset check algorithm through the first node; the first node generates block information corresponding to the first transaction, including: the first node generates initial block information corresponding to the first transaction, and the first node uses the preset verification algorithm to verify the first verification value and the transaction information corresponding to the first transaction to obtain a second verification value; further, the first node adds the second check value to the initial block information to obtain block information corresponding to the first transaction.
In the technical scheme, the first check value can be used for identifying the historical transaction processed by the blockchain system, and the second check value is obtained by updating the first check value by using the first transaction after the first transaction is processed, so that on one hand, a plurality of nodes in the blockchain system can realize consensus based on the same second check value, and the accuracy of transaction processing in the blockchain system is improved; on the other hand, the blockchain system can update the historical transaction processed by the blockchain system in real time in the process of processing the transaction, so that the accuracy of the subsequent transaction processing is improved.
Optionally, the updating, by the first node, the first preset database and/or the preset memory space according to the transaction information of the first transaction includes: the first node updates the first preset filtering model by using the identifier of the first transaction to obtain a second preset filtering model, and updates a preset memory space and/or the first preset filtering model in the first preset database into the second preset filtering model; further, the first node adds the transaction information corresponding to the first transaction and the second check value to the first preset database, and updates the first check value in the preset memory space by using the second check value.
According to the technical scheme, the block information of the first transaction is used for sequentially updating the first preset filtering model, the historical transaction information and the verification value of the historical transaction in the first preset database and the preset memory space, so that the next transaction can be subjected to conflict detection by adopting the two-time conflict detection method based on the preset memory space and the sequential conflict detection method based on the first preset database, each transaction can be subjected to conflict detection by adopting the method, and the transaction processing efficiency is improved.
In a second aspect, an embodiment of the present invention provides a transaction processing method based on a blockchain system, the method including:
the method comprises the steps that a client device sends a transaction request to a first node in a blockchain system, wherein the transaction request comprises an identification of a first transaction and conflict processing instructions; further, the client device receives the address of the fault-tolerant contract sent by the first node, and calls a fault-tolerant processing module to correct the first transaction according to the address of the fault-tolerant contract.
Optionally, the method further comprises: the client device receives block information corresponding to the first transaction sent by the first node; further, the client device acquires the identifier of the first transaction stored in the block information, and if it is determined that a historical transaction with the identifier matched with the identifier of the first transaction exists in a second preset database of the client device, the fault-tolerant processing module is used for correcting the first transaction according to a preset processing rule; the second preset database stores a plurality of historical transactions processed by the client device.
Optionally, the preset processing rules include any one or more of outputting log records, outputting transaction records of a second preset database, invalidating transactions, revoking transactions, freezing subsequent transactions.
In a third aspect, an embodiment of the present invention provides a transaction processing device based on a blockchain system, the device including:
the receiving module is used for receiving a transaction request sent by the client device, wherein the transaction request comprises an identification of a first transaction and a conflict processing instruction; the conflict processing instruction comprises a processing mode of the first transaction when the first transaction conflicts with the historical transaction, and/or a processing mode of the first transaction when the first transaction does not conflict with the historical transaction;
the conflict detection module is used for determining a conflict result of the first transaction according to the identification of the first transaction, wherein the conflict result of the first transaction is used for indicating whether the first transaction conflicts with the historical transaction or not;
and the processing module is used for processing the first transaction according to the conflict result of the first transaction and the conflict processing instruction.
Optionally, the conflict detection module is configured to: determining a key value of the first transaction according to the identification of the first transaction; further, acquiring an identifier of a target historical transaction from a first preset database, and storing the identifier of the target historical transaction into the preset memory space; the first preset database comprises identifiers of the plurality of historical transactions and key values of the plurality of historical transactions, and the target historical transaction is a historical transaction in which the key value in the first preset database is matched with the key value of the first transaction; and if the target historical transaction matched with the identification of the first transaction exists in the preset memory space, determining that the first transaction conflicts with the historical transaction.
Optionally, the conflict detection module is further configured to: if the fact that the target historical transaction matched with the identification of the first transaction does not exist in the preset memory space is determined, the identification of the first transaction is input into a first preset filtering model, wherein the first preset filtering model is obtained through training by using transaction information of the plurality of historical transactions, and the transaction information of each historical transaction comprises the identification, key value, transaction data, conflict processing instructions and conflict times of each historical transaction; further, if the result output by the first preset filtering model is that the first transaction does not conflict with the historical transaction, determining that the first transaction does not conflict with the historical transaction.
Optionally, the conflict detection module is further configured to: if the result output by the first preset filtering model is that the first transaction has conflict with the historical transaction, comparing the identification of the first transaction with the identification of one or more historical transactions in the first preset database, and if the first preset database is determined to have the historical transaction matched with the identification of the first transaction, determining that the first transaction has conflict with the historical transaction; and if the fact that the historical transaction matched with the identification of the first transaction does not exist in the first preset database is determined, the fact that the first transaction and the historical transaction are not in conflict is determined.
Optionally, the conflict handling instructions include any one or more of: refusing to execute the first transaction when the first transaction conflicts with the historical transaction, executing the first transaction when the first transaction conflicts with the historical transaction, redirecting the first transaction to a fault tolerant contract when the first transaction conflicts with the historical transaction, and executing the first transaction when the first transaction does not conflict with the historical transaction; the processing module is used for: executing the first transaction if the first transaction does not conflict with the historical transaction and the conflict processing instruction is that the first transaction does not conflict with the historical transaction, or executing the first transaction if the first transaction conflicts with the historical transaction and the conflict processing instruction is that the first transaction conflicts with the historical transaction; if the first transaction conflicts with the historical transaction, and the conflict processing instruction redirects the first transaction to a fault-tolerant contract when the conflict processing instruction conflicts with the historical transaction, the address of the fault-tolerant contract included in the conflict processing instruction is obtained, and the address of the fault-tolerant contract is sent to the client device; and if the first transaction conflicts with the historical transaction, and the conflict processing instruction refuses to execute the first transaction when the first transaction conflicts with the historical transaction, sending a conflict indication value to the client device, wherein the conflict indication value is used for indicating that the first transaction conflicts with the historical transaction.
Optionally, the processing module is configured to: if the number of the nodes which reach consensus for the first transaction in the blockchain system is determined to be greater than or equal to a preset threshold value, generating blockinformation corresponding to the first transaction; further, the first preset database and/or the preset memory space are updated according to the transaction information of the first transaction.
Optionally, after generating the block information corresponding to the first transaction, the processing module is further configured to: and sending block information corresponding to the first transaction to the client equipment, wherein the block information is used for correcting the first transaction by the client equipment.
Optionally, the first preset database further stores first check values corresponding to the plurality of historical transaction data, where the first check values are obtained by checking the plurality of historical transaction data by using a preset check algorithm through the first node; the processing module is specifically configured to: generating initial block information corresponding to the first transaction; further, the preset verification algorithm is used for verifying the first verification value and the transaction information corresponding to the first transaction to obtain a second verification value, and the second verification value is added to the initial block information to obtain block information corresponding to the first transaction.
Optionally, the processing module is configured to: updating the first preset filtering model by using the identification of the first transaction to obtain a second preset filtering model, and updating a preset memory space and/or the first preset filtering model in the first preset database into the second preset filtering model; further, transaction information corresponding to the first transaction and the second check value are added into the first preset database, and the second check value is used for updating the first check value in the preset memory space.
In a fourth aspect, an embodiment of the present invention provides a transaction processing device based on a blockchain system, the device including:
the system comprises a transceiver module, a first node and a second node, wherein the transceiver module is used for sending a transaction request to the first node in the blockchain system, and the transaction request comprises an identification of a first transaction and a conflict processing instruction; and receiving an address of a fault tolerant contract sent by the first node;
and the processing module is used for calling the fault-tolerant processing module to correct the first transaction according to the address of the fault-tolerant contract.
Optionally, the receiving module is further configured to: receiving block information corresponding to the first transaction sent by the first node; the processing module is further configured to: acquiring the identification of the first transaction stored in the block information, and if it is determined that a historical transaction with the identification matched with the identification of the first transaction exists in a second preset database of the client device, correcting the first transaction by using the fault-tolerant processing module according to a preset processing rule; the second preset database stores a plurality of historical transactions processed by the client device.
Optionally, the preset processing rules include any one or more of outputting log records, outputting transaction records of a second preset database, invalidating transactions, revoking transactions, freezing subsequent transactions.
In a fifth aspect, embodiments of the present invention also provide a computer readable storage medium comprising instructions which, when run on a processor of a computer, cause the processor of the computer to perform a method as described in any of the first and/or second aspects above.
In a sixth aspect, embodiments of the present invention also provide a computer program product which, when run on a processor of a computer, causes the processor of the computer to perform the method of any one of the first and/or second aspects above.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it will be apparent that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system architecture of a blockchain system according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart corresponding to a transaction processing method based on a blockchain system according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a client device and a first node according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a transaction processing device based on a blockchain system according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a transaction processing device based on a blockchain system according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a back-end device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the field of financial science and technology (Fintech), a large number of transactions are generally involved, and the transactions between different nodes can be smoothly executed by adopting a blockchain technology to realize the transaction processing. Therefore, the improvement of the efficiency of transaction processing in the block chain system is particularly important for the development of the financial industry.
Fig. 1 is a schematic diagram of a system architecture to which the transaction processing method according to the embodiment of the present invention is applied, as shown in fig. 1, where one or more nodes (such as node 101, node 102, node 103, and node 104 illustrated in fig. 1) and a client device 200 in a blockchain system may be included in the system architecture. Wherein one or more nodes in the blockchain system may collectively maintain the blockchain system. Client device 200 may communicate with one or more nodes in a blockchain system through an access network.
In an embodiment of the present invention, the blockchain system may be a Peer-To-Peer (P2P) network composed of a plurality of nodes. P2P is an application layer protocol that runs on top of the transmission control protocol (Transmission Control Protocol, TCP) protocol, nodes in a blockchain system can peer to each other, there is no central node in the system, and thus each node can randomly connect to other nodes.
Taking the transaction process between the client device 200 and the node 102 as an example, in a specific implementation, the client device 200 may send a transaction request to the node 102, and after the node 102 receives the transaction request, the node may obtain the transaction data by parsing the transaction request, and may send the transaction data to other nodes in the blockchain system (i.e. the node 101, the node 103, and the node 104). Further, the nodes 101 to 104 may perform consensus based on the transaction data, and if the consensus passes, block information corresponding to the transaction may be generated; if the consensus does not pass, node 102 (or other nodes as well) may send a transaction response message to client device 200 indicating that the transaction failed.
In the embodiment of the invention, the nodes in the blockchain system can have various functions, such as a routing function, a transaction function, a blockchain function, a consensus function and the like. Specifically, the nodes in the blockchain system can transmit the transaction data and other information transmitted by other nodes to more nodes so as to realize the communication between the nodes; alternatively, nodes in the blockchain system may be used to support transactions by users; alternatively, nodes in the blockchain system may be used to record all transactions historically; alternatively, nodes in the blockchain system may generate new blocks in the blockchain by validating and recording transactions. In practice, the routing function is a function that each node in the blockchain system must have, and other functions can be set by those skilled in the art according to actual needs.
It should be noted that a node in the blockchain system may be on a physical machine (server), and a node may specifically refer to a process or a series of processes running in the server. For example, node 101 in the blockchain 1 network may be a process running on a server, or may be a server where a node is located, which is not limited in particular.
Based on the system architecture illustrated in fig. 1, fig. 2 is a flow chart corresponding to a transaction processing method based on a blockchain system according to an embodiment of the present invention, where the method includes:
in step 201, the client device sets an identification of the first transaction and conflict handling instructions.
In the embodiment of the invention, if the client device determines that the first transaction needs to be executed, the identifier of the first transaction can be set. In one possible implementation, the client device may set the identifier of the first transaction according to a service scenario to which the first transaction belongs, where the service scenario to which the first transaction belongs may include a service to which the first transaction belongs and a flow (i.e., a service flow) of the first transaction in the service. For example, in one example, the execution flow of the order service may include a create order flow, a store order flow, a query order flow, and so on, and if the service flow to which the first transaction belongs is the create order flow, the order number created by the first transaction may be used as the identifier of the first transaction. The length of the order number may be set by those skilled in the art according to experience, and may be, for example, variable length data of 256 bytes or less, or may be fixed length data, which is not particularly limited. In another example, the execution flow of the interactive data service may include a data flow transmitted by both parties, a data flow transmitted by one party to other users, and if the service flow to which the first transaction belongs is a data flow transmitted by both parties, the identifier of the first transaction may include an identifier of the data sender, an identifier of the data receiver, and a check value of the data. For example, if the first transaction is user A 1 To user A 2 The transaction for transferring data, the identification of the first transaction may include user A 1 Address of user a 2 A Hash value of the address and data of (c). Wherein user A 1 And/or user a 2 The address of (a) may be an account name, or may be a mail address, or may be a user name, which is not particularly limited.
Further, the client device may further set a conflict processing instruction corresponding to the first transaction, where the conflict processing instruction may include a processing manner of the first transaction when the first transaction conflicts with the historical transaction, and/or a processing manner of the first transaction when the first transaction does not conflict with the historical transaction. In one example, the manner in which the first transaction is processed when there is a conflict with the historical transaction may include any of executing the first transaction, redirecting the first transaction to a fault tolerant contract, refusing to execute the first transaction; the processing of the first transaction when there is no conflict with the historical transaction may include executing the first transaction.
In one possible implementation, the conflict handling instructions sent by the client device may include handling the indication value and the additional data. Table 1 is a schematic table of several possible conflict handling instructions provided by embodiments of the present invention.
Table 1: schematic of several conflict handling instructions
Conflict handling instructions Meaning of
1 Refusing to execute
2 Execution of
3:http://address/0x289 Redirecting to fault tolerant contracts
4 Refusing execution and issuing an alarm
5 Execution and printing logs
0 Execution of
As shown in table 1, in the embodiment of the present invention, 5 conflict processing instructions when the first transaction conflicts with the historical transaction are defined as "1", "2", "3: http:// address/0x289"," 4"," 5", also defines 1 conflict handling instruction, i.e." 0", when there is no conflict between the first transaction and the historical transaction. Wherein, the additional data of the conflict processing instructions "0", "1", "2", "4", "5" may be null, and the conflict processing instruction "3: the processing indicator value of http:// address/0x289 "may be 3 and the additional data may be http:// address/0x289. Specifically, if the first transaction conflicts with the historical transaction, and the conflict processing instruction is "1", the first node may refuse to execute the first transaction; if the first transaction does not conflict with the historical transaction and the conflict processing instruction is 0, or the first transaction conflicts with the historical transaction and the conflict processing instruction is 2, the first node can execute the first transaction; if the first transaction conflicts with the historical transaction and the conflict processing instruction is '3', the first node can execute the first transaction and send the first transaction to a fault-tolerant processing device with a contract address of http:// address/0x289 for correction; if the first transaction conflicts with the historical transaction and the conflict processing instruction is '4', the first node can refuse to execute the first transaction and can send out alarm information; if the first transaction conflicts with the historical transaction and the conflict processing instruction is '5', the first node can execute the first transaction and print a log record of the conflict of the first transaction so as to facilitate subsequent debugging.
It should be noted that, the conflict in the embodiment of the present invention is specifically a conflict of multiple transactions generated in the same business process, and if the identifiers of multiple transactions generated in the same business process are the same, the multiple transactions may be in conflict; if the identifiers of the plurality of transactions generated in the same process of different services are the same, or the identifiers of the plurality of transactions generated in different processes of the same service are the same, the plurality of transactions are not conflicting. For example, transaction B 1 For service a 1 Transaction B 2 For service a 1 Transaction B 3 For service a 1 Transaction B of the transaction generated in the first flow of (2) 4 For service a 2 Then due to transaction B 1 With transaction B 3 Belonging to different flows of the same service, thus even transaction B 1 With transaction B 3 Is identical to transaction B 1 With transaction B 3 Nor does it conflict; accordingly, due to transaction B 1 With transaction B 4 Belonging to the same flow of different services, thus even transaction B 1 With transaction B 4 Is identical to transaction B 1 With transaction B 4 Nor does it conflict; and is directed to transaction B 1 And B is connected with 2 Due to transaction B 1 With transaction B 2 Belonging to the same flow of the same business, if transaction B 1 With transaction B 2 Is the same, transaction B 1 With transaction B 2 And (5) conflict.
Taking the first transaction as an example of the transaction for creating the order number, since the order number created by different transactions in the order creation flow of the same service needs to be ensured to be different, the order number can uniquely identify one transaction; if the order numbers of different transactions are the same, it is indicated that the different transactions are conflicting. To generate non-conflicting order numbers, the order numbers between adjacent transactions may be set to be incremental, or a sequence of random numbers or hash values of the transactions may be added to the different order numbers.
In the embodiment of the invention, the business scene is taken as the dimension, so that the client device adopts the same identification setting mode for the transaction of the same business scene, and the identification of the transaction can represent the uniqueness of the transaction in a plurality of transactions included in the same business scene; that is, the embodiment of the invention sets the transaction identifier through the client device, and can perform conflict detection on the transaction in a mode of comparing the transaction identifier without comparing specific transaction data, so that the process of performing conflict detection on the transaction is faster, and the transaction processing efficiency in the blockchain system is improved; and the conflict processing instruction can be set by the client device based on the actual service scene, so that the transaction processing process can be more in line with the actual requirement.
Step 202, a client device sends a request for a transaction to a first node in a blockchain system.
Here, the client device may send the request for the transaction to the first node in various manners, for example, may send the request for the transaction to the first node in a wired manner, or may send the request for the transaction to the first node in a wireless manner, which is not limited in particular.
In one example, the identification of the first transaction and the conflict handling instructions may be included in the transaction request. In another example, the transaction request may include an identification of the first transaction, a conflict processing instruction, and transaction data for the first transaction, which may include a key value, an account number, a contract address, etc. for the first transaction.
In step 203, the first node receives a transaction request sent by the client device, and determines a collision result of the first transaction according to the identifier of the first transaction.
In particular implementations, the first node may parse the transaction request to obtain an identification of the first transaction and the conflict handling instructions (or the identification of the first transaction, the transaction data, and the conflict handling instructions). Further, the first node may determine, according to the identification of the first transaction, whether there is a conflict between the first transaction and the historical transaction; wherein the historical transaction may include all transactions processed by the first node prior to receiving the transaction request for the first transaction. It should be noted that, before resolving the transaction request, the first node may also send the transaction request to other nodes in the blockchain system, so that the other nodes execute the first transaction, and thus, after executing the first transaction, the plurality of nodes in the blockchain system may perform the blockjoint consensus process. The process of executing the first transaction by the other node may be implemented with reference to the process of executing the first transaction by the first node, which will not be described herein.
In the embodiment of the present invention, the historical transaction may be stored in a first preset database of the first node, and based on the conflict processing instruction illustrated in table 1, table 2 is a schematic table of the historical transaction stored in the first preset database.
Table 2: schematic of historical transactions stored in a first preset database
Transaction identification Contract address Key value Transaction account number Conflict handling instructions Number of collisions
a 1 x 1 http://address/0x755 10.33 Y 1 1 2
a 2 x 2 http://address/0x733 14.24 Y 1 0 0
a 3 x 3 http://address/0x555 2.56 Y 1 3 1
a 4 x 4 http://address/0x755 10.33 Y 1 4 3
a 5 x 5 http://address/0x765 32.54 Y 1 2 7
a 6 x 6 http://address/0x755 10.33 Y 1 0 0
a 7 x 7 http://address/0x736 9.56 Y 1 1 2
As shown in table 2, the first preset database may store an identifier, a contract address, a key value, a transaction account number, a conflict processing instruction, and a number of conflicts for each historical transaction. For example, the transaction is identified as a 1 x 1 Is referred to as historical transaction a for convenience of description 1 x 1 ) The contract address of (a) can be http:// address/0x755, the key value can be 10.33, and the transaction account number can be Y 1 The conflict handling instructions may be 1 (i.e., there is a conflict with the historical transaction prior to the historical transaction and the historical transaction has been refused to be handled), and the number of conflicts is 2 (i.e., there have been two conflicts).
Specifically, the contract address of the transaction can be the address of the contract for realizing business logic on the blockchain, can be a section of data with fixed length, and can be the identification of the business to which the transaction belongs; as shown in Table 2, historical transaction a 1 x 1 Historical transaction a 4 x 4 With historical transaction a 6 x 6 The contract addresses of (a) are the same, then the historical transaction a can be described 1 x 1 Historical transaction a 4 x 4 With historical transaction a 6 x 6 The services to which they belong are identical. Accordingly, the key value of the transaction can be obtained by carrying out joint key value calculation on the contract address of the transaction and the identification of the transaction, and the key value can be binary data with the length less than 255 bytes; based on the key value obtained by the contract address and the identification of the transaction, the conflict detection process can take the business flow as the dimension. As shown in Table 2, historical transaction a 1 x 1 Historical transaction a 4 x 4 With historical transaction a 6 x 6 The key values of (a) are the same, and can be used for describing historical transaction a 1 x 1 Historical transaction a 4 x 4 With historical transaction a 6 x 6 Transactions in the same flow for the same business, for example, transactions in flows for creating orders may all be transactions in the same flow for the same business. In historical transaction a 1 x 1 For example, historical transaction a 1 x 1 The transaction account number may be determined by historical transaction a 1 x 1 The first node may be based on historical transaction a 1 x 1 Historical transaction a is obtained by transaction account number 1 x 1 Such as transaction initiator, transaction receiver, transaction processing receipt, block to which the transaction belongs, block information corresponding to the transaction, etc. Historical transaction a 1 x 1 The conflict handling instructions may refer to sending historical transaction a 1 x 1, 1 Conflict handling instructions configured by the client device, and the number of conflicts may refer to historical transaction a prior to receiving a transaction request for a first transaction 1 x 1 Number of conflicts with historical transactions in the first predetermined database, each time a historical transaction a is determined 1 x 1 Conflict once, then the historical transaction a can be processed 1 x 1 1 is added to the number of collisions.
In one possible implementation, the first node may compare the identifier of the first transaction with the identifiers of one or more historical transactions in the first preset database, and if it is determined that there is a historical transaction in the first preset database that matches the identifier of the first transaction, it may be determined that there is a conflict between the first transaction and the historical transaction; if it is determined that there is no historical transaction in the first preset database that matches the identification of the first transaction, it may be determined that there is no conflict between the first transaction and the historical transaction. Taking the first preset database as shown in Table 2 as an example, if the identification of the first transaction is a 1 x 1 It may be determined that the first transaction has a conflict with the historical transaction, if the first transaction is identified as a 8 x 8 It may be determined that there is no conflict between the first transaction and the historical transaction.
In the implementation mode, the identification of the first transaction is directly compared with the identification of the historical transaction in the first preset database, and whether the first transaction and the historical transaction have conflict or not can be determined through a round of conflict detection process, so that the conflict detection process can be simplified, and the implementation is convenient.
In another possible implementation manner, the first node may sequentially perform one-round collision detection or multiple-round collision detection of the first-round collision detection to the third-round collision detection on the first transaction, where the processes of the first-round collision detection and the second-round collision detection may be both performed in a preset memory space, and the process of the third-round collision detection may be performed in a first preset database. The implementation procedure of the first round of collision detection to the third round of collision detection is specifically described below.
First round collision detection
In specific implementation, the first node may acquire a contract address of the first transaction from transaction data of the first transaction, and further may perform joint key value calculation on an identifier of the first transaction and the contract address of the first transaction to obtain a key value of the first transaction, and may acquire a target historical transaction matched with the key value of the first transaction from a first preset database; for example, referring to the first predetermined database illustrated in Table 2, if the key value of the first transaction is 10.33, the target historical transaction may include a historical transaction a 1 x 1 Historical transaction a 4 x 4 With historical transaction a 6 x 6 . Further, the first node may store the identifier of the target historical transaction in a preset memory space, or may store all information (i.e. transaction identifier, contract address, key value, transaction account number, conflict processing instruction and number of conflicts) of the target historical transaction stored in the first preset database in a preset memory space, which is not limited in particular. When the first round of conflict detection is executed, the first node can compare the identification of the first transaction with the identification of the target historical transaction stored in the preset memory space, and if the target historical transaction matched with the identification of the first transaction exists in the preset memory space, the first node can determine that the first transaction conflicts with the historical transaction; if it is determined that there is no target historical transaction in the preset memory space that matches the identification of the first transaction, a second round of collision detection may be performed.
In the first round of collision detection, since the key value of the target historical transaction is matched with the key value of the first transaction, the target historical transaction and the first transaction can be transactions in the same flow of the same service. On the one hand, the first round of conflict detection is carried out on the first transaction based on the target historical transaction which is the same as the business process of the first transaction, so that the number of times of comparing transactions in the conflict detection process can be reduced, and the conflict detection efficiency is improved. On the other hand, by storing the target historical transaction in the preset memory space in advance, the process of comparing the transactions can be performed in the preset memory space without being performed in the first preset database, so that the response speed of the conflict detection process can be improved.
In the embodiment of the invention, the first round of conflict detection can be suitable for a scene with high conflict possibility, if the detection result of the first round of conflict detection is a conflict, the conflict between the first transaction and the historical transaction can be determined, and the transaction with high conflict possibility can be detected by executing the first round of conflict detection, so that the number of times of inquiring the historical transaction in a first preset database can be reduced, the calculation speed of the conflict detection is improved, and the system overhead is saved.
Second round collision detection
In the embodiment of the present invention, a first preset filtering model may be further provided in the first preset database, and if the first node receives a transaction request of a first transaction sent by the client device, the first preset filtering model stored in the first preset database may be obtained and stored in the preset memory space. Accordingly, if the detection result of the first round of collision detection is that the first transaction does not collide with the historical transaction (i.e. there is no target historical transaction matched with the identification of the first transaction in the preset memory space), the first node may input the identification of the first transaction into the first preset filtering model stored in the preset memory space.
Further, the first preset filtering model may perform a second round of collision detection on the first transaction, and may output a collision result of the first transaction; the conflict result of the first transaction may be any one of a first result for indicating that the first transaction does not conflict with the historical transaction and a second result for indicating that the first transaction may conflict with the historical transaction. Thus, after the first node inputs the first transaction into the first preset filtering model, if the output result is the first result, it can be determined that the first transaction does not have conflict with the historical transaction; if the output result is a second result, a third round of collision detection may be performed.
In a specific implementation, the model structure of the first preset filtering model may be set by a person skilled in the art according to experience, and is not limited in particular. As an example, the first preset filter model may be a bit-based model, such as a bloom filter; according to experiments, if the memory of the bloom filter is smaller, the probability of misjudging the output result as the second result is increased, and if the memory of the bloom filter is larger, the waste of system space is caused. Therefore, according to the embodiment of the invention, through experimental determination, when the memory of the bloom filter is set to be 200M and the bloom filter is trained based on the transaction information (including the identification of the historical transaction, the key value, the transaction data, the conflict processing instruction, the conflict times and the like) of the historical transaction in the last 3 years, the misjudgment rate of the output result of the bloom filter can be smaller than 1%. By setting the memory size of the bloom filter and training the historical transaction of the bloom filter, the system space can be saved, and the accuracy of the output result can be improved.
It should be noted that the foregoing is merely an exemplary simple illustration, and those skilled in the art may set the memory of the bloom filter and/or train the history transaction of the bloom filter according to actual needs, and the foregoing setting is not limited to this solution. In a specific implementation, the memory of the bloom filter may be greater than 200M, or may be less than 200M, for example, 400M or 100M; accordingly, the historical transaction of training the bloom filter may be the historical transaction in the last 2 years, or may be the historical transaction in the last 5 years, which is not limited in particular.
In the embodiment of the invention, the second round of conflict detection can be suitable for scenes with smaller conflict possibility, if the detection result of the second round of conflict detection is non-conflict, the first transaction and the historical transaction can be determined to have no conflict, and the transaction with smaller conflict possibility can be detected by executing the second round of conflict detection. In the embodiment of the invention, before the conflict detection is executed in the first preset database, the conflict results of most transactions can be obtained in advance through the first round of conflict detection and the second round of conflict detection based on the preset memory space, so that the number of times of inquiring historical transactions in the first preset database can be reduced, the calculation speed and efficiency of the conflict detection are improved, and the system overhead is saved.
Third-round collision detection
If the output result of the second round of conflict detection is that the first transaction conflicts with the historical transaction (i.e. the output result of the first preset filtering model is that the first transaction conflicts with the historical transaction), the first node may execute the third round of conflict detection. Specifically, the first node may compare the identifier of the first transaction with the identifier of the historical transaction in the first preset database, and if it is determined that there is a historical transaction in the first preset database that matches the identifier of the first transaction, it may be determined that there is a conflict between the first transaction and the historical transaction; if it is determined that there is no historical transaction in the first preset database that matches the identification of the first transaction, it may be determined that there is no conflict between the first transaction and the historical transaction.
In the embodiment of the invention, most conflict transactions can be detected by adopting the first-round conflict detection and the second-round conflict detection, and the first-round conflict detection and the second-round conflict detection are executed in the preset memory space, so that the response speed is higher, and the conflict detection efficiency is improved. And the third round of conflict detection can be suitable for any scene, and if the conflict result of the first transaction is not obtained based on the first round of conflict detection and the second round of conflict detection, the first transaction can be compared with the historical transaction in the first preset database based on the third round of conflict detection, so that the conflict result of the first transaction can be obtained. In the embodiment of the invention, the first round of conflict detection to the third round of conflict detection are adopted, so that the historical transaction can be prevented from being inquired directly in the first preset database, and more accurate conflict results can be obtained while the system overhead is reduced and the conflict detection efficiency is improved.
In step 204, the first node processes the first transaction according to the conflict result and the conflict processing instruction of the first transaction, to obtain a processing result of the first transaction.
According to the conflict handling instructions illustrated in table 1, table 3 is a schematic table of several handling manners performed by the first node on the first transaction according to the conflict result of the first transaction and the conflict handling instructions.
Table 3: schematic of several ways in which the first node processes the first transaction
As shown in tables 1 and 3, if the collision result and the collision processing instruction of the first transaction satisfy any one of the first condition to the fourth condition shown below, the first node may execute the first transaction:
a first condition, the conflict result is that the first transaction and the historical transaction do not conflict, and the conflict processing instruction is that the first transaction (namely '0') is executed when the first transaction and the historical transaction do not conflict;
a second condition, wherein the conflict result is that the first transaction and the historical transaction are in conflict, and the conflict processing instruction is that the first transaction is executed when the first transaction and the historical transaction are in conflict (namely '2');
a third condition, the conflict result being that there is a conflict between the first transaction and the historical transaction, and the conflict handling instructions being that the first transaction is redirected to a fault tolerant contract (i.e. "3") when there is a conflict between the first transaction and the historical transaction;
a fourth condition, the conflict result is that there is a conflict between the first transaction and the historical transaction, and the conflict handling instructions are that the first transaction is executed and the log is printed (i.e. "5") when there is a conflict between the first transaction and the historical transaction.
It should be noted that, if the conflict result and the conflict processing instruction of the first transaction meet the third condition, the first node may generate a first log after processing the first transaction, and may add the timestamp information, the transaction data and the conflict indication value for processing the first transaction to the first log, so as to further store the first log, so that the operation and maintenance personnel can execute the debug work conveniently.
Accordingly, if the conflict result and the conflict handling instruction of the first transaction satisfy the fifth condition or the sixth condition as shown below, the first node may refuse to execute the first transaction:
a fifth condition that the first transaction conflicts with the historical transaction, and the conflict processing instruction refuses to execute the first transaction (i.e. "1") when the first transaction conflicts with the historical transaction;
a sixth condition, the first transaction conflicts with the historical transaction, and the conflict handling instructions are that execution of the first transaction is refused and an alert (i.e., "3") is given when the first transaction conflicts with the historical transaction.
It should be noted that, if the conflict result and the conflict processing instruction of the first transaction meet the sixth condition, the first node may generate the alarm information while rejecting to process the first transaction, and may send the alarm information to the client device, so as to facilitate the operation and maintenance personnel to perform the debugging work.
The specific implementation of the first node in handling the first transaction is described below separately from the two scenarios.
Case one
In case one, the first node may execute the first transaction, i.e. the collision result and the collision handling instruction of the first transaction fulfil the first condition mentioned above, or fulfil the second condition, or fulfil the third condition, or fulfil the fourth condition.
In one example, the first node may first update the target historical transaction included in the preset memory space if it determines to perform the first transaction. In one example, if there is no historical transaction in the preset memory space, the first node may add the first transaction to the preset memory space, so that the target historical transaction included in the preset memory space may include the first transaction, and if the first node receives a second transaction, which is identical to the first transaction in the process of executing the first transaction, the first node may determine that the second transaction collides with the first transaction through the first round of collision detection, so that the second transaction repeated with the first transaction may not need to be executed. In another example, if the target historical transaction with the same identifier as the first transaction exists in the preset memory space, the first node may update the information of the target historical transaction stored in the preset database, for example, may update the number of collisions, the collision processing instruction, etc. of the target historical transaction, so that the preset filtering model determined based on the historical transaction in the preset memory space may be more accurate. In the embodiment of the invention, the transaction processing process of the first node can be more efficient by updating the preset memory space when the first transaction is determined to be executed.
Further, the first node may communicate with other nodes in the blockchain system to perform a consensus process of the first transaction, if it is determined that the number of nodes in the blockchain system that agree on the first transaction is greater than or equal to a preset threshold, then block information corresponding to the first transaction may be generated, and the first preset database and/or the preset memory space may be updated using the block information corresponding to the first transaction, for example, the first preset database may be updated according to the block information of the first transaction, or the preset memory space may also be updated according to the block information of the first transaction, or the first preset database and the preset memory space may also be updated according to the block information of the first transaction, which is not particularly limited. Accordingly, if it is determined that the number of nodes in the blockchain system that agree on the first transaction is less than the preset threshold, a message may be sent to the client device that the execution of the first transaction failed. The preset threshold may be set by those skilled in the art according to experience, for example, may be 3/4 of the number of nodes included in the blockchain system, and is not limited in particular.
In an embodiment of the present invention, there may be multiple manners of generating the block information corresponding to the first transaction, and in one possible implementation manner, the first preset database may store a first check value, where the first check value may be obtained by checking, by the first node, a plurality of historical transactions using a preset check algorithm, for example, may be hash values of the plurality of historical transactions. In a specific implementation, before determining to execute the first transaction, the first node may acquire a first check value from a first preset database, and may store the first check value in a preset memory space; further, in the process of executing the first transaction, the first node may generate initial block information corresponding to the first transaction in advance, and may use a preset verification algorithm to verify the first verification value and the first transaction to obtain a second verification value; further, the first node may add the second check value to the initial block information, and may perform consensus with other nodes in the blockchain system, and if the consensus passes, the first node may obtain the block information corresponding to the first transaction, and may update the first check value stored in the preset memory space using the second check value.
In one example, a round-robin algorithm may be used to determine the second check value, the procedure of which may be as follows:
according to the first row program, the first node determines to execute transaction data [0], historical transaction data [1] and historical transaction data [2]; according to the second row program, the first node can acquire a check value hash_new stored in a preset memory space; according to the third-fourth program, the first node can obtain HASH value of transaction Data [0] to obtain check value HASH (Data [1 ]) of transaction Data [0], and further can obtain HASH value of first check value hash_new and check value HASH (Data [1 ]) of transaction Data [0] to obtain check value of historical transaction including transaction Data [0 ]; accordingly, the first node can obtain the check value of the historical transaction including the transaction data [0] and the transaction data [1] according to the check value of the historical transaction including the transaction data [0] and the transaction data [1], and further can obtain the check value of the historical transaction including the transaction data [0], the transaction data [1] and the transaction data [2] according to the check value of the historical transaction including the transaction data [0] and the transaction data [1] and the transaction data [2]; according to the fifth line program, the check value of the history transaction stored in the preset memory space can be updated using the check values of the history transaction including transaction data [0], transaction data [1] and transaction data [2 ].
It should be noted that the foregoing is merely an exemplary simple description, and the manner of determining the second check value by using the cyclic hash algorithm is merely for convenience of description, and is not limited to the scheme. In a specific implementation, the manner of determining the second check value may be set by a person skilled in the art according to experience, for example, the second check value may be determined by using a merkle root algorithm, or the second check value may be determined by using an acyclic hash algorithm, which is not limited in particular.
In the embodiment of the invention, the first check value can be used for identifying the historical transaction processed by the blockchain system, and the second check value is obtained by updating the first check value by using the first transaction after the first transaction is executed, so that a plurality of nodes in the blockchain system can realize consensus based on the same second check value on one hand, and the accuracy of transaction processing in the blockchain system is improved; on the other hand, the blockchain system can update the historical transaction processed by the blockchain system in real time in the process of processing the transaction, so that the accuracy of the subsequent transaction processing is improved.
If the first node successfully executes the first transaction, the block information corresponding to the first transaction may be stored in the blockchain system, and thus, the processing result of the first transaction may include the block information corresponding to the first transaction. Further, the first node may update the first preset database and/or the preset memory space using the block information according to the first transaction. In one possible implementation manner, the first node may train the first preset filtering model using the identifier of the first transaction to obtain a second preset filtering model, and may update the first preset filtering model stored in the first preset database to the second preset filtering model; the first node may add the transaction information corresponding to the first transaction to a first preset database, and may update the first check value stored in the first preset database using the determined second check value; further, the first node may update the first preset filter model and the first check value stored in the preset memory space using the second preset filter model and the second check value, respectively.
Accordingly, if the first node does not successfully execute the first transaction (e.g., the node consensus fails), the processing result of the first transaction may include first indication information, where the first indication information is used to indicate that the processing of the first transaction fails. In one example, since the first node adds the first transaction to the preset memory space when determining to execute the first transaction, if the first transaction is not executed successfully, the first node may delete the first transaction stored in the preset memory space, so as to avoid that the subsequently acquired transaction with the same identifier as the first transaction cannot pass the first round of collision detection, and ensure accuracy of subsequent transaction processing.
In the embodiment of the invention, the block information of the first transaction is used for sequentially updating the first preset filtering model, the historical transaction information and the verification value of the historical transaction in the first preset database and the preset memory space, so that the conflict detection can be carried out on the next transaction based on the updated preset memory space and the first preset database, and the accuracy of the conflict detection can be improved.
It should be noted that, if the conflict result and the conflict processing instruction of the first transaction meet the fourth condition, the first node may further obtain an address of the fault-tolerant contract included in the transaction request after executing the first transaction, and may call the fault-tolerant processing module to correct the first transaction according to the address of the fault-tolerant contract. In this way, the processing result of the first transaction may further include an address of the fault tolerant contract, where the address of the fault tolerant contract is used to invoke the fault tolerant processing module in the client device to modify the first transaction.
Case two
In case two, the first node may refuse to execute the first transaction, i.e. the conflict result and the conflict handling instructions of the first transaction may satisfy the fifth condition or the sixth condition described above.
In a specific implementation, if the first node refuses to execute the first transaction, the first node may generate a conflict indication code, where the conflict indication code is used to indicate that the first transaction has a conflict with the historical transaction, and the first node does not execute the first transaction. Accordingly, the collision indication code may be included in the processing result of the first transaction.
The first node sends the first information or the second information to the client device, step 205.
In a specific implementation, the processing result of the first transaction may include any one or more of block information, first indication information, conflict indication code, and an address of the fault tolerant contract of the first transaction. If the processing result of the first transaction includes block information of the first transaction and/or an address of the fault tolerant contract, which indicates that the first transaction has been successfully executed by the first node, the first node may send the first information to the client device; if the processing result of the first transaction includes the first indication information or the conflict indication code, which indicates that the first transaction is not successfully executed by the first node, the first node may send the second information to the client device.
In the embodiment of the invention, the conflict processing instruction set by the client device has three cases of executing the first transaction when the first node conflicts with the historical transaction, redirecting to the fault-tolerant module when the first node conflicts with the historical transaction, executing the first transaction when the first node conflicts with the historical transaction and printing the log, namely that the first transaction can be successfully executed by the first node when the first transaction conflicts with the historical transaction. Thus, to avoid a major business error in the first transaction, the first node may send the first information to the client device after successfully executing the first transaction. In one example, the first information may include block information of the first transaction and/or an address of the fault tolerant contract, so that the client device may modify the first transaction according to the first information after receiving the first information.
Accordingly, if the processing result of the first transaction includes the first indication information, it is indicated that the first transaction has passed the conflict detection, but is not successfully executed by the first node; if the processing result of the first transaction includes a conflict indication value, it is indicated that the first transaction fails the conflict processing instruction and is not successfully executed by the first node. Since the first transaction is not successfully performed, there is no major business error, and thus the first node may send second information to the client device, which may be used to indicate that the first transaction was not successfully performed.
In step 206, the client device receives the first information or the second information sent by the first node, and invokes the fault-tolerant processing module to modify the first transaction.
In a specific implementation, a second preset database may be set in the client device, and all the historical transactions processed by the client device may be stored in the second preset database. In one possible implementation manner, if the client device receives the first information sent by the first node, it indicates that the first transaction has been successfully executed by the first node, so that the client device may perform collision detection on the first transaction based on the second preset database, and determine whether there is a collision between the first transaction and the historical transaction processed by the client device. In one example, the client device may directly compare the identification of the first transaction with the identification of the historical transaction stored in the second preset database to determine whether there is a conflict between the first transaction and the historical transaction processed by the client device; in another example, the client device may perform first to third rounds of conflict detection on the first transaction in sequence to determine whether there is a conflict between the first transaction and the historical transaction processed by the client device. Here, the above two examples may be implemented with reference to the process of determining whether the first transaction conflicts with the historical transaction processed by the first node in step 203, which is not described in detail.
Further, if no historical transaction with the identification matched with the identification of the first transaction exists in the second preset database, the fact that the transaction with the same identification as the first transaction is not processed before the client device is explained; as such, the client device may add the first transaction to the second preset database. Accordingly, if the historical transaction with the identification matched with the identification of the first transaction exists in the second preset database, the fact that the client device has previously processed the transaction with the same identification as the first transaction is indicated; in this way, the client device may modify the first transaction according to the preset processing rules using the fault tolerant processing module. The preset processing rules may include any one or more of outputting log records, outputting transaction records of the second preset database, invalidating transactions, revoking transactions, freezing subsequent transactions.
In a specific implementation, the fault-tolerant processing module may determine in advance a business process to which the first transaction belongs, and if it is determined that the first transaction is a transaction in a non-critical business process, the fault-tolerant processing module may modify the first transaction in a plurality of ways. In one example, the fault tolerance processing module may obtain log information and/or database information of the first transaction, and may send the log information and/or database information of the first transaction to the operation and maintenance personnel for maintenance; in another example, the fault-tolerant processing module may perform subsequent processing on the first transaction according to the address of the fault-tolerant contract and a preset processing rule set in the fault-tolerant contract. Because the transaction in the non-critical business process has less influence on the business, the transaction in the non-critical business process is corrected by adopting the mode, and the processing efficiency of the system can be improved.
Accordingly, if the first transaction is determined to be a transaction in the key business process, the fault-tolerant processing module may correct the first transaction according to the business process to which the first transaction belongs. For example, if the first transaction is creation of a new order X, the fault tolerance processing module may set the status of order X to an invalid status; if the first transaction is under account Q 1 Adding benefit L 1 The fault tolerant processing module may be from account Q 1 Subtracting the benefit L from 1 The method comprises the steps of carrying out a first treatment on the surface of the If the first transaction is account Q 1 To account Q 2 Transfer funds L 2 The fault tolerance processing module may then compare the account Q 2 Funds in the upper section L return account Q 1 The method comprises the steps of carrying out a first treatment on the surface of the If the first transaction is a duplicate slave account Q 3 Asset N is drawn abnormally, the fault tolerant processing module may draw account Q 3 Freezing.
It should be noted that the foregoing is merely an exemplary simple description, and the manner in which the first transaction is modified is merely for convenience of description, and is not limited to the scheme. In a specific implementation, the manner of modifying the first transaction may be set by those skilled in the art according to experience, or may be set according to actual service needs, which is not limited in particular.
In the embodiment of the invention, because the conflict processing instruction is set for the client device, some conflicting transactions can be still processed, and the client device can correct the transactions by sending the block information to the client device after the transactions are processed, so that larger errors in the transaction processing process can be avoided, and the service processing capacity and the service processing accuracy of the block chain system are improved.
In another possible implementation manner, if the client device receives the second information sent by the first node, the fault tolerance processing module may be called to obtain related information of the first transaction, such as a timestamp, transaction data, a conflict result, a conflict processing instruction, and the like of the first transaction; further, the fault-tolerant processing module may store information related to the first transaction in the log information or the database information, so that the operation and maintenance personnel can debug according to the log information or the database information.
In the above embodiment of the present invention, a first node in a blockchain system receives a transaction request sent by a client device, where the transaction request includes an identifier of a first transaction and a conflict processing instruction, and the conflict processing instruction includes a processing manner of the first transaction when the first transaction conflicts with a historical transaction, and/or a processing manner of the first transaction when the first transaction does not conflict with the historical transaction; further, the first node determines a conflict result of the first transaction according to the identification of the first transaction, and processes the first transaction according to the conflict result of the first transaction and a conflict processing instruction; the conflict result of the first transaction is used for indicating whether the first transaction conflicts with the historical transaction. In the embodiment of the invention, the conflict detection can be carried out on the first transaction in a mode of comparing the identifiers of the transactions without comparing transaction data by setting the identifiers of the transactions, so that the process of carrying out conflict detection on the transactions is faster, and the transaction processing efficiency in a blockchain system is improved; moreover, since the conflict processing instructions are set by the client device, different conflict processing instructions can be set based on different service scenes and requirements of the client device, that is, the transaction processing method in the technical scheme better accords with the actual situation.
Based on the system architecture illustrated in fig. 1 and the transaction processing method illustrated in fig. 2, fig. 3 is a schematic structural diagram of a client device and a first node according to an embodiment of the present invention. As shown in fig. 3, the first node may be provided with a collision detection unit, a transaction execution unit, and an update unit, and the collision detection unit, the transaction execution unit, and the update unit may be sequentially connected. The first node can be further provided with a preset memory space, a first preset filtering model and a first preset database; accordingly, a second preset database may be provided in the client device.
The process of processing the first transaction based on the client device and the first node illustrated in fig. 3 may be as follows steps 1 to 6:
step 1, a client device sends a transaction request to a conflict detection unit arranged in a first node, wherein the transaction request comprises an identification of a first transaction and a conflict processing instruction of the first transaction.
And 2, after receiving the transaction request sent by the client device, the conflict detection unit acquires the identification of the first transaction, and performs conflict detection on the first transaction based on any one or more of a preset memory space, a first preset filtering model and a first preset database. For instance, in one example, the conflict detection unit may perform conflict detection on the first transaction based on the preset memory space only, or perform conflict detection on the first transaction based on the first preset filter model only, or perform conflict detection on the first transaction based on the first preset database only; in another example, the conflict detection unit may perform conflict detection on the first transaction based on the preset memory space and the first preset filtering model, or perform conflict detection on the first transaction based on the preset memory space and the first preset database, or perform conflict detection on the first transaction based on the first preset filtering model and the first preset database; in yet another example, the conflict detection unit may perform conflict detection for the first transaction based on the preset memory space, the first preset filter model, and the first preset database.
In one possible implementation, the conflict detection unit may perform a first round of conflict detection for the first transaction based on the preset memory space. If the first round of conflict detection determines that the historical transaction matched with the identification of the first transaction exists in the preset memory space, the conflict detection unit can determine that the first transaction conflicts with the historical transaction; if the first round of conflict detection determines that there is no historical transaction in the preset memory space that matches the identification of the first transaction, the conflict detection unit may perform a second round of conflict detection on the first transaction based on the first preset filtering model. If the second round of conflict detection determines that the first transaction does not conflict with the historical transaction, the conflict detection unit can determine that the first transaction does not conflict with the historical transaction; if the second round of conflict detection determines that the first transaction has a conflict with the historical transaction, the conflict detection unit may perform a third round of conflict detection on the first transaction based on the first preset database. If the third-round conflict detection determines that the historical transaction matched with the identification of the first transaction exists in the first preset database, the conflict detection unit can determine that the first transaction conflicts with the historical transaction; if the first round of conflict detection determines that there is no historical transaction in the first preset database that matches the identification of the first transaction, the conflict detection unit may determine that there is no conflict between the first transaction and the historical transaction.
If it is determined that the first transaction has a conflict with the historical transaction, and the conflict processing instruction is "when the first transaction has a conflict with the historical transaction, the first node and the client device refuse to execute the first transaction", the following steps 3.1 and 4.1 may be executed:
in step 3.1, the collision detection unit (or the first node) sends a collision indication code to the client device.
And 4.1, the client device receives the conflict indication code sent by the conflict detection unit and calls the fault tolerance processing module to perform conflict processing on the first transaction. In one example, the fault tolerance processing module may obtain a timestamp of the first transaction, the transaction data, and the conflict indication code, and may record the timestamp of the first transaction, the transaction data, and the conflict indication code into the log information or database.
Accordingly, if it is determined that the first transaction does not conflict with the historical transaction, and the conflict processing instruction is "execute the first transaction when the first transaction does not conflict with the historical transaction", or the first transaction conflicts with the historical transaction, and the conflict processing instruction is "execute the first transaction when the first transaction conflicts with the historical transaction", or the first transaction conflicts with the historical transaction, and the conflict processing instruction is "redirect to the fault-tolerant processing module when the first transaction conflicts with the historical transaction", the first node and the client device may execute the following steps 3.2, 4.2 to 6, and 4.1:
Step 3.2, the conflict detection unit sends the first transaction to the transaction execution unit so that the transaction execution unit executes the first transaction.
In implementations, the transaction execution unit may execute the first transaction using a smart contract and may be consensus with other nodes in the blockchain system over a network. If the number of the nodes achieving consensus is greater than or equal to a preset threshold value, the transaction execution unit can generate block information corresponding to the first transaction, and can store the block information corresponding to the first transaction into a block chain of a bottom layer; if the number of agreed nodes is less than the preset threshold, the transaction execution unit (or the first node) may send information of the failure of the first transaction execution to the client device, so that the client device invokes the fault-tolerant processing module to process the first transaction (this process is not shown in fig. 3).
And 4.2, after the transaction execution unit determines that the first transaction is successfully executed, sending an update request to the update unit, wherein the update request comprises block information corresponding to the first transaction.
And step 5, after receiving the update request sent by the transaction execution unit, the update unit uses the block information corresponding to the first transaction to update the preset memory space, the first preset filter model and the first preset database. Specifically, the updating unit may add the first transaction to the preset memory space and the first preset database, and may update the first preset filter model based on the historical transaction and the first transaction included in the first preset database.
And step 6, if the first node determines that the updating of the preset memory space, the first preset filtering model and the first preset database is completed, a transaction response message is sent to the client device, wherein the transaction response message comprises block information corresponding to the first node.
As shown in fig. 3, a second preset database may be set in the client device, and if the client device receives the block information corresponding to the first node, the identifier of the first node may be obtained from the block information corresponding to the first node, so that the identifier of the first node may be matched with a plurality of historical transactions stored in the second preset database. If it is determined that the second preset database does not have the historical transaction with the same identification as the first transaction, the client device can add the first transaction to the second preset database; if it is determined that the second preset database has the historical transaction with the same identifier as the first transaction, the client device may call the fault tolerance processing module to modify the first transaction, and the specific implementation process may be implemented with reference to step 206, which is not described herein.
In the embodiment of the invention, the conflict detection unit is arranged in the first node, so that the conflict detection process of the first transaction and the transaction execution process of the first transaction are respectively executed in two flows, thereby realizing the conflict detection, the decoupling of contract calculation and block consensus and improving the transaction processing efficiency.
With respect to the method flow illustrated in fig. 2, the embodiment of the present invention further provides a transaction processing device based on a blockchain system, and the specific content of the device may be implemented by referring to the method.
Fig. 4 is a schematic structural diagram of a transaction processing device based on a blockchain system according to an embodiment of the present invention, including:
a transceiver module 401, configured to receive a transaction request sent by a client device, where the transaction request includes an identifier of a first transaction and a conflict processing instruction; the conflict processing instruction comprises a processing mode of the first transaction when the first transaction conflicts with the historical transaction, and/or a processing mode of the first transaction when the first transaction does not conflict with the historical transaction;
a conflict detection module 402, configured to determine a conflict result of the first transaction according to the identifier of the first transaction, where the conflict result of the first transaction is used to indicate whether there is a conflict between the first transaction and a historical transaction;
and the processing module 403 is configured to process the first transaction according to the conflict result of the first transaction and the conflict processing instruction.
Optionally, the transaction request further includes a contract address of the first transaction; the conflict detection module 402 is configured to:
Determining a key value of the first transaction according to the identification of the first transaction and the contract address of the first transaction;
acquiring an identifier of a target historical transaction from a first preset database, and storing the identifier of the target historical transaction into a preset memory space; the first preset database comprises a plurality of historical transaction identifiers and key values of the historical transactions, and the target historical transaction is a historical transaction with the key value in the first preset database matched with the key value of the first transaction;
and if the target historical transaction matched with the identification of the first transaction exists in the preset memory space, determining that the first transaction and the historical transaction are in conflict.
Optionally, the conflict detection module 402 is further configured to:
if the fact that the target historical transaction matched with the identification of the first transaction does not exist in the preset memory space is determined, the identification of the first transaction is input into a first preset filtering model; the first preset filtering model is trained by using transaction information of the plurality of historical transactions, and the transaction information of each historical transaction comprises an identifier, a key value, transaction data, a conflict processing instruction and conflict times of each historical transaction;
And if the output result of the first preset filtering model is that the first transaction does not conflict with the historical transaction, determining that the first transaction does not conflict with the historical transaction.
Optionally, the conflict detection module 402 is further configured to:
if the output result of the first preset filtering model is that the first transaction conflicts with the historical transaction, comparing the identification of the first transaction with the identifications of a plurality of historical transactions in the first preset database, and if the first preset database is determined to have the historical transaction matched with the identification of the first transaction, determining that the first transaction conflicts with the historical transaction; and if the fact that the historical transaction matched with the identification of the first transaction does not exist in the first preset database is determined, the fact that the first transaction and the historical transaction are not in conflict is determined.
Optionally, the conflict handling instructions when there is no conflict between the first transaction and the historical transaction include executing the first transaction; the conflict processing instruction when the first transaction conflicts with the historical transaction comprises any one of the following steps: refusing to execute the first transaction, executing the first transaction, redirecting the first transaction to a fault tolerant contract;
The processing module 403 is configured to:
executing the first transaction if the first transaction does not conflict with the historical transaction and the conflict processing instruction is that the first transaction does not conflict with the historical transaction, or executing the first transaction if the first transaction conflicts with the historical transaction and the conflict processing instruction is that the first transaction conflicts with the historical transaction; if the first transaction conflicts with the historical transaction, and the conflict processing instruction redirects the first transaction to a fault-tolerant contract when the conflict processing instruction conflicts between the first transaction and the historical transaction, executing the first transaction, acquiring an address of the fault-tolerant contract included in the conflict processing instruction, and sending the address of the fault-tolerant contract to the client device; and if the first transaction conflicts with the historical transaction, and the conflict processing instruction refuses to execute the first transaction when the first transaction conflicts with the historical transaction, sending a conflict indication value to the client device, wherein the conflict indication value is used for indicating that the first transaction conflicts with the historical transaction.
Optionally, the processing module 403 is configured to:
if the number of the nodes which reach consensus for the first transaction in the blockchain system is determined to be greater than or equal to a preset threshold value, generating blockinformation corresponding to the first transaction;
and updating the first preset database and/or the preset memory space according to the block information of the first transaction.
Optionally, after generating the block information corresponding to the first transaction, the processing module 403 is further configured to:
and sending the block information corresponding to the first transaction to the client device, wherein the block information corresponding to the first transaction is used for correcting the first transaction by the client device.
Optionally, a first check value is stored in the first preset database, and the first check value is obtained by checking the plurality of historical transactions stored in the first preset database by using a preset check algorithm by the first node;
the processing module 403 is specifically configured to:
generating initial block information corresponding to the first transaction;
checking the first check value and the first transaction by using the preset checking algorithm to obtain a second check value;
and adding the second check value to the initial block information to obtain block information corresponding to the first transaction.
Optionally, the processing module 403 is configured to:
training the first preset filtering model by using the identification of the first transaction to obtain a second preset filtering model, and updating the preset memory space and/or the first preset filtering model in the first preset database into the second preset filtering model;
and adding the first transaction into the first preset database, and updating the preset memory space and/or the first check value in the first preset database by using the second check value.
Fig. 5 is a schematic structural diagram of a transaction processing device based on a blockchain system according to an embodiment of the present invention, including:
a configuration module 501, configured to configure the identification of the first transaction and the conflict handling instructions;
a transceiver module 502 configured to send a transaction request to a first node in a blockchain system, the transaction request including an identification of the first transaction and the conflict handling instruction; and receiving an address of a fault tolerant contract sent by the first node;
and the correction module 503 is configured to invoke a fault-tolerant processing module according to the address of the fault-tolerant contract to correct the first transaction.
Optionally, the transceiver module 502 is further configured to: receiving block information corresponding to the first transaction sent by the first node;
The correction module 503 is further configured to: analyzing block information corresponding to the first transaction to obtain an identification of the first transaction; if it is determined that a historical transaction with the identification matched with the identification of the first transaction exists in a second preset database of the client device, correcting the first transaction by using the fault-tolerant processing module according to a preset processing rule; the second preset database stores a plurality of historical transactions processed by the client device.
Optionally, the preset processing rules include any one or more of outputting log records, outputting transaction records of a second preset database, invalidating transactions, revoking transactions, freezing subsequent transactions.
From the above, it can be seen that: in the above embodiment of the present invention, a first node in a blockchain system receives a transaction request sent by a client device, where the transaction request includes an identifier of a first transaction and a conflict processing instruction, and the conflict processing instruction includes a processing manner of the first transaction when the first transaction conflicts with a historical transaction, and/or a processing manner of the first transaction when the first transaction does not conflict with the historical transaction; further, the first node determines a conflict result of the first transaction according to the identification of the first transaction, and processes the first transaction according to the conflict result of the first transaction and a conflict processing instruction; the conflict result of the first transaction is used for indicating whether the first transaction conflicts with the historical transaction. In the embodiment of the invention, the conflict detection can be carried out on the first transaction in a mode of comparing the identifiers of the transactions without comparing transaction data by setting the identifiers of the transactions, so that the process of carrying out conflict detection on the transactions is faster, and the transaction processing efficiency in a blockchain system is improved; moreover, since the conflict processing instructions are set by the client device, different conflict processing instructions can be set based on different service scenes and requirements of the client device, that is, the transaction processing method in the technical scheme better accords with the actual situation.
Based on the same technical concept, the embodiment of the present invention provides a terminal device, as shown in fig. 6, including at least one processor 1101 and a memory 1102 connected to the at least one processor, where a specific connection medium between the processor 1101 and the memory 1102 is not limited in the embodiment of the present invention, and in fig. 6, the processor 1101 and the memory 1102 are connected by a bus, for example. The buses may be divided into address buses, data buses, control buses, etc.
In an embodiment of the present invention, the memory 1102 stores instructions executable by the at least one processor 1101, and the at least one processor 1101 can perform the steps included in the transaction processing method based on the blockchain system by executing the instructions stored in the memory 1102.
The processor 1101 is a control center of the terminal device, and may implement data processing by executing or executing instructions stored in the memory 1102 and invoking data stored in the memory 1102 by connecting various interfaces and lines to various parts of the terminal device. Optionally, the processor 1101 may include one or more processing units, and the processor 1101 may integrate an application processor and a modem processor, where the application processor primarily processes an operating system, a user interface, an application program, and the like, and the modem processor primarily processes instructions issued by an operator. It will be appreciated that the modem processor described above may not be integrated into the processor 1101. In some embodiments, the processor 1101 and the memory 1102 may be implemented on the same chip, and in some embodiments they may be implemented separately on separate chips.
The processor 1101 may be a general purpose processor such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, that can implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with an embodiment of a blockchain system based transaction processing method may be embodied directly in hardware processor execution or in a combination of hardware and software modules in a processor.
Memory 1102 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 1102 may include at least one type of storage medium, and may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory), magnetic Memory, magnetic disk, optical disk, and the like. Memory 1102 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1102 in embodiments of the present invention may also be circuitry or any other device capable of performing memory functions for storing program instructions and/or data.
Based on the same technical concept, the embodiment of the present invention provides a back-end device, as shown in fig. 7, including at least one processor 1201 and a memory 1202 connected to the at least one processor, where a specific connection medium between the processor 1201 and the memory 1202 is not limited in the embodiment of the present invention, and in fig. 7, the processor 1201 and the memory 1202 are connected by a bus, for example. The buses may be divided into address buses, data buses, control buses, etc.
In an embodiment of the present invention, the memory 1202 stores instructions executable by the at least one processor 1201, and the at least one processor 1201 can perform the steps included in the transaction processing method based on the blockchain system described above by executing the instructions stored in the memory 1202.
Wherein the processor 1201 is a control center of the back-end device, various interfaces and lines may be utilized to connect various parts of the back-end device, and data processing may be accomplished by executing or executing instructions stored in the memory 1202 and invoking data stored in the memory 1202. Optionally, the processor 1201 may include one or more processing units, and the processor 1201 may integrate an application processor and a modem processor, wherein the application processor primarily processes an operating system, an application program, and the like, and the modem processor primarily parses the received instructions and parses the received results. It will be appreciated that the modem processor described above may not be integrated into the processor 1201. In some embodiments, processor 1201 and memory 1202 may be implemented on the same chip, or they may be implemented separately on separate chips in some embodiments.
The processor 1201 may be a general purpose processor such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, and may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with an embodiment of a blockchain system based transaction processing method may be embodied directly in hardware processor execution or in a combination of hardware and software modules in a processor.
Memory 1202 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 1202 may include at least one type of storage medium, which may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory), magnetic Memory, magnetic disk, optical disk, and the like. Memory 1202 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 1202 in embodiments of the present invention may also be circuitry or any other device capable of performing storage functions for storing program instructions and/or data.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (23)

1. A method of transaction processing based on a blockchain system, the method comprising:
A first node in a blockchain system receives a transaction request sent by a client device, wherein the transaction request comprises an identification of a first transaction and a conflict processing instruction; the conflict processing instruction comprises a processing mode of the first transaction when the first transaction conflicts with the historical transaction, and/or a processing mode of the first transaction when the first transaction does not conflict with the historical transaction; wherein the conflict processing instructions when the first transaction does not conflict with the historical transaction include executing the first transaction; the conflict processing instruction when the first transaction conflicts with the historical transaction comprises any one of the following steps: refusing to execute the first transaction, executing the first transaction, redirecting the first transaction to a fault tolerant contract;
the first node determines a conflict result of the first transaction according to the identification of the first transaction, wherein the conflict result of the first transaction is used for indicating whether the first transaction conflicts with a historical transaction or not;
executing the first transaction by the first node if the first transaction does not conflict with the historical transaction and the conflict processing instruction is that the first transaction does not conflict with the historical transaction, or executing the first transaction if the first transaction conflicts with the historical transaction and the conflict processing instruction is that the first transaction conflicts with the historical transaction; if the first transaction conflicts with the historical transaction, and the conflict processing instruction is that the first transaction is redirected to a fault-tolerant contract when the first transaction conflicts with the historical transaction, the first node executes the first transaction, acquires the address of the fault-tolerant contract included in the conflict processing instruction, and sends the address of the fault-tolerant contract to the client device; if the first transaction conflicts with the historical transaction, and the conflict processing instruction is that execution of the first transaction is refused when the first transaction conflicts with the historical transaction, the first node sends a conflict indication value to the client device, wherein the conflict indication value is used for indicating that the first transaction conflicts with the historical transaction.
2. The method of claim 1, wherein the transaction request further comprises a contract address for the first transaction; the first node determines a conflict result of the first transaction according to the identification of the first transaction, and the conflict result comprises:
the first node determines a key value of the first transaction according to the identification of the first transaction and the contract address of the first transaction;
the first node acquires the identification of the target historical transaction from a first preset database, and stores the identification of the target historical transaction into a preset memory space; the first preset database comprises a plurality of historical transaction identifiers and key values of the historical transactions, and the target historical transaction is a historical transaction with the key value in the first preset database matched with the key value of the first transaction;
and if the first node determines that the target historical transaction matched with the identification of the first transaction exists in the preset memory space, the first node determines that the first transaction conflicts with the historical transaction.
3. The method according to claim 2, wherein the method further comprises:
if the first node determines that the target historical transaction matched with the identification of the first transaction does not exist in the preset memory space, the identification of the first transaction is input into a first preset filtering model; the first preset filtering model is trained by using transaction information of the plurality of historical transactions, and the transaction information of each historical transaction comprises an identifier, a key value, transaction data, a conflict processing instruction and conflict times of each historical transaction;
And if the output result of the first preset filtering model is that the first transaction does not have conflict with the historical transaction, the first node determines that the first transaction does not have conflict with the historical transaction.
4. A method according to claim 3, characterized in that the method further comprises:
if the output result of the first preset filtering model is that the first transaction has conflict with the historical transaction, the first node compares the identification of the first transaction with the identifications of a plurality of historical transactions in the first preset database, and if the first preset database is determined to have the historical transaction matched with the identification of the first transaction, the first transaction is determined to have conflict with the historical transaction; and if the fact that the historical transaction matched with the identification of the first transaction does not exist in the first preset database is determined, the fact that the first transaction and the historical transaction are not in conflict is determined.
5. The method of claim 2, wherein the first node performs the first transaction comprising:
the first node generates block information corresponding to the first transaction if the number of nodes which reach consensus for the first transaction in the blockchain system is determined to be greater than or equal to a preset threshold;
The first node updates the first preset database and/or the preset memory space according to the block information of the first transaction.
6. The method of claim 5, wherein after the first node generates the tile information corresponding to the first transaction, further comprising:
the first node sends block information corresponding to the first transaction to the client device, and the block information corresponding to the first transaction is used for correcting the first transaction by the client device.
7. The method according to claim 5 or 6, wherein a first check value is stored in the first preset database, and the first check value is obtained by checking the plurality of historical transactions stored in the first preset database by using a preset check algorithm by the first node;
the first node generates block information corresponding to the first transaction, including:
the first node generates initial block information corresponding to the first transaction;
the first node uses the preset verification algorithm to verify the first verification value and the first transaction to obtain a second verification value;
and the first node adds the second check value to the initial block information to obtain block information corresponding to the first transaction.
8. The method according to claim 7, wherein the first node updates the first preset database and/or the preset memory space according to the transaction information of the first transaction, comprising:
training a first preset filtering model by the first node by using the identification of the first transaction to obtain a second preset filtering model, and updating a preset memory space and/or the first preset filtering model in the first preset database into the second preset filtering model;
the first node adds the first transaction to the first preset database and updates the preset memory space and/or the first check value in the first preset database by using the second check value.
9. A method of transaction processing based on a blockchain system, the method comprising:
the client device configures an identification of the first transaction and conflict processing instructions; the conflict processing instruction comprises a processing mode of the first transaction when the first transaction conflicts with the historical transaction, and/or a processing mode of the first transaction when the first transaction does not conflict with the historical transaction; wherein the conflict processing instructions when the first transaction does not conflict with the historical transaction include executing the first transaction; the conflict processing instruction when the first transaction conflicts with the historical transaction comprises any one of the following steps: refusing to execute the first transaction, executing the first transaction, redirecting the first transaction to a fault tolerant contract;
The client device sends a transaction request to a first node in a blockchain system, wherein the transaction request comprises an identification of the first transaction and the conflict processing instruction; the first node is used for determining a conflict result of the first transaction according to the identification of the first transaction, and the conflict result of the first transaction is used for indicating whether the first transaction conflicts with the historical transaction or not; the first node is configured to execute the first transaction if the first transaction does not conflict with the historical transaction and the conflict processing instruction is that the first transaction does not conflict with the historical transaction, or if the first transaction conflicts with the historical transaction and the conflict processing instruction is that the first transaction is executed when the first transaction conflicts with the historical transaction, the first node is configured to execute the first transaction; if the first transaction conflicts with the historical transaction, and the conflict processing instruction is that the first transaction is redirected to a fault-tolerant contract when the first transaction conflicts with the historical transaction, the first node is used for executing the first transaction, acquiring an address of the fault-tolerant contract included in the conflict processing instruction, and sending the address of the fault-tolerant contract to the client device; if the first transaction conflicts with the historical transaction, and the conflict processing instruction is that the first transaction refuses to execute when the first transaction conflicts with the historical transaction, the first node is used for sending a conflict indication value to the client device, and the conflict indication value is used for indicating that the first transaction conflicts with the historical transaction;
And the client device receives the address of the fault-tolerant contract sent by the first node, and calls a fault-tolerant processing module to correct the first transaction according to the address of the fault-tolerant contract.
10. The method according to claim 9, wherein the method further comprises:
the client device receives block information corresponding to the first transaction sent by the first node;
the client device analyzes the block information corresponding to the first transaction and obtains the identification of the first transaction;
if the client device determines that a history transaction with the identification matched with the identification of the first transaction exists in a second preset database of the client device, the fault-tolerant processing module is used for correcting the first transaction according to a preset processing rule; the second preset database stores a plurality of historical transactions processed by the client device.
11. The method of claim 10, wherein the preset processing rules include any one or more of outputting log records, outputting transaction records of a second preset database, invalidating transactions, revoking transactions, freezing subsequent transactions.
12. A blockchain system-based transaction processing device, the device comprising:
the receiving and transmitting module is used for receiving a transaction request sent by the client device, wherein the transaction request comprises an identification of a first transaction and a conflict processing instruction; the conflict processing instruction comprises a processing mode of the first transaction when the first transaction conflicts with the historical transaction, and/or a processing mode of the first transaction when the first transaction does not conflict with the historical transaction; wherein the conflict processing instructions when the first transaction does not conflict with the historical transaction include executing the first transaction; the conflict processing instruction when the first transaction conflicts with the historical transaction comprises any one of the following steps: refusing to execute the first transaction, executing the first transaction, redirecting the first transaction to a fault tolerant contract;
the conflict detection module is used for determining a conflict result of the first transaction according to the identification of the first transaction, wherein the conflict result of the first transaction is used for indicating whether the first transaction conflicts with the historical transaction or not;
the processing module is configured to execute the first transaction if the first transaction does not conflict with the historical transaction and the conflict processing instruction is that the first transaction does not conflict with the historical transaction, or execute the first transaction if the first transaction conflicts with the historical transaction and the conflict processing instruction is that the first transaction is executed when the first transaction conflicts with the historical transaction, and then the first node executes the first transaction; if the first transaction conflicts with the historical transaction, and the conflict processing instruction is that the first transaction is redirected to a fault-tolerant contract when the first transaction conflicts with the historical transaction, a first node executes the first transaction, acquires an address of the fault-tolerant contract included in the conflict processing instruction, and sends the address of the fault-tolerant contract to the client device; if the first transaction conflicts with the historical transaction, and the conflict processing instruction is that execution of the first transaction is refused when the first transaction conflicts with the historical transaction, the first node sends a conflict indication value to the client device, wherein the conflict indication value is used for indicating that the first transaction conflicts with the historical transaction.
13. The apparatus of claim 12, wherein the transaction request further comprises a contract address for the first transaction; the conflict detection module is used for:
determining a key value of the first transaction according to the identification of the first transaction and the contract address of the first transaction;
acquiring an identifier of a target historical transaction from a first preset database, and storing the identifier of the target historical transaction into a preset memory space; the first preset database comprises a plurality of historical transaction identifiers and key values of the historical transactions, and the target historical transaction is a historical transaction with the key value in the first preset database matched with the key value of the first transaction;
and if the target historical transaction matched with the identification of the first transaction exists in the preset memory space, determining that the first transaction and the historical transaction are in conflict.
14. The apparatus of claim 12, wherein the collision detection module is further configured to:
if the fact that the target historical transaction matched with the identification of the first transaction does not exist in the preset memory space is determined, the identification of the first transaction is input into a first preset filtering model; the first preset filtering model is trained by using transaction information of the plurality of historical transactions, and the transaction information of each historical transaction comprises an identifier, a key value, transaction data, a conflict processing instruction and conflict times of each historical transaction;
And if the output result of the first preset filtering model is that the first transaction does not conflict with the historical transaction, determining that the first transaction does not conflict with the historical transaction.
15. The apparatus of claim 14, wherein the collision detection module is further configured to:
if the output result of the first preset filtering model is that the first transaction conflicts with the historical transaction, comparing the identification of the first transaction with the identifications of a plurality of historical transactions in a first preset database, and if the first preset database is determined to have the historical transaction matched with the identification of the first transaction, determining that the first transaction conflicts with the historical transaction; and if the fact that the historical transaction matched with the identification of the first transaction does not exist in the first preset database is determined, the fact that the first transaction and the historical transaction are not in conflict is determined.
16. The apparatus of claim 13, wherein the processing module is configured to:
if the number of the nodes which reach consensus for the first transaction in the blockchain system is determined to be greater than or equal to a preset threshold value, generating blockinformation corresponding to the first transaction;
And updating the first preset database and/or the preset memory space according to the block information of the first transaction.
17. The apparatus of claim 16, wherein the processing module, after generating the tile information corresponding to the first transaction, is further configured to:
and sending the block information corresponding to the first transaction to the client device, wherein the block information corresponding to the first transaction is used for correcting the first transaction by the client device.
18. The apparatus according to claim 16 or 17, wherein a first check value is stored in the first preset database, and the first check value is obtained by checking the plurality of historical transactions stored in the first preset database by using a preset check algorithm by a first node;
the processing module is specifically configured to:
generating initial block information corresponding to the first transaction;
checking the first check value and the first transaction by using the preset checking algorithm to obtain a second check value;
and adding the second check value to the initial block information to obtain block information corresponding to the first transaction.
19. The apparatus of claim 18, wherein the processing module is configured to:
Training a first preset filtering model by using the identification of the first transaction to obtain a second preset filtering model, and updating a preset memory space and/or the first preset filtering model in the first preset database into the second preset filtering model;
and adding the first transaction into the first preset database, and updating the preset memory space and/or the first check value in the first preset database by using the second check value.
20. A blockchain system-based transaction processing device, the device comprising:
the configuration module is used for configuring the identification of the first transaction and the conflict processing instruction; the conflict processing instruction comprises a processing mode of the first transaction when the first transaction conflicts with the historical transaction, and/or a processing mode of the first transaction when the first transaction does not conflict with the historical transaction; wherein the conflict processing instructions when the first transaction does not conflict with the historical transaction include executing the first transaction; the conflict processing instruction when the first transaction conflicts with the historical transaction comprises any one of the following steps: refusing to execute the first transaction, executing the first transaction, redirecting the first transaction to a fault tolerant contract;
A transceiver module configured to send a transaction request to a first node in a blockchain system, the transaction request including an identification of the first transaction and the conflict handling instruction; and receiving an address of the fault tolerant contract sent by the first node; the first node is used for determining a conflict result of the first transaction according to the identification of the first transaction, and the conflict result of the first transaction is used for indicating whether the first transaction conflicts with the historical transaction or not; the first node is configured to execute the first transaction if the first transaction does not conflict with the historical transaction and the conflict processing instruction is that the first transaction does not conflict with the historical transaction, or if the first transaction conflicts with the historical transaction and the conflict processing instruction is that the first transaction is executed when the first transaction conflicts with the historical transaction, the first node is configured to execute the first transaction; if the first transaction conflicts with the historical transaction, and the conflict processing instruction is that the first transaction is redirected to a fault-tolerant contract when the first transaction conflicts with the historical transaction, the first node is used for executing the first transaction, acquiring an address of the fault-tolerant contract included in the conflict processing instruction, and sending the address of the fault-tolerant contract to the client device; if the first transaction conflicts with the historical transaction, and the conflict processing instruction is that the first transaction refuses to execute when the first transaction conflicts with the historical transaction, the first node is used for sending a conflict indication value to the client device, and the conflict indication value is used for indicating that the first transaction conflicts with the historical transaction;
And the correction module is used for calling the fault-tolerant processing module to correct the first transaction according to the address of the fault-tolerant contract.
21. The apparatus of claim 20, wherein the device comprises a plurality of sensors,
the transceiver module is further configured to: receiving block information corresponding to the first transaction sent by the first node;
the correction module is further configured to: analyzing block information corresponding to the first transaction to obtain an identification of the first transaction; if it is determined that a historical transaction with the identification matched with the identification of the first transaction exists in a second preset database of the client device, correcting the first transaction by using the fault-tolerant processing module according to a preset processing rule; the second preset database stores a plurality of historical transactions processed by the client device.
22. The apparatus of claim 21, wherein the preset processing rules include any one or more of outputting log records, outputting transaction records of a second preset database, invalidating transactions, revoking transactions, freezing subsequent transactions.
23. A computer readable storage medium comprising instructions which, when run on a processor of a computer, cause the processor of the computer to perform the method of any of claims 1 to 11.
CN201910350093.3A 2019-04-28 2019-04-28 Transaction processing method and device based on blockchain system Active CN110070445B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910350093.3A CN110070445B (en) 2019-04-28 2019-04-28 Transaction processing method and device based on blockchain system
PCT/CN2020/080520 WO2020220860A1 (en) 2019-04-28 2020-03-20 Blockchain system-based transaction processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910350093.3A CN110070445B (en) 2019-04-28 2019-04-28 Transaction processing method and device based on blockchain system

Publications (2)

Publication Number Publication Date
CN110070445A CN110070445A (en) 2019-07-30
CN110070445B true CN110070445B (en) 2024-03-01

Family

ID=67369298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910350093.3A Active CN110070445B (en) 2019-04-28 2019-04-28 Transaction processing method and device based on blockchain system

Country Status (2)

Country Link
CN (1) CN110070445B (en)
WO (1) WO2020220860A1 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110070445B (en) * 2019-04-28 2024-03-01 深圳前海微众银行股份有限公司 Transaction processing method and device based on blockchain system
CN110602051B (en) * 2019-08-15 2022-03-29 深圳壹账通智能科技有限公司 Information processing method based on consensus protocol and related device
CN110489234A (en) * 2019-08-16 2019-11-22 中国银行股份有限公司 Message processing method, device, equipment and the readable storage medium storing program for executing of block link layer
CN112258184B (en) * 2020-10-28 2023-08-01 成都质数斯达克科技有限公司 Method, apparatus, electronic device and readable storage medium for freezing blockchain network
CN112487096B (en) * 2020-12-08 2024-08-13 深圳前海微众银行股份有限公司 Method and device for executing block transaction
CN112734373A (en) * 2020-12-31 2021-04-30 中国工商银行股份有限公司 Information processing method, information processing apparatus, electronic device, and medium
CN113051622B (en) * 2021-03-11 2023-05-12 杭州趣链科技有限公司 Index construction method, device, equipment and storage medium
CN113961350B (en) * 2021-10-28 2024-08-13 建信金融科技有限责任公司 Method and device for determining accounting nodes in blockchain
CN114338455B (en) * 2022-03-16 2022-06-17 北京微芯感知科技有限公司 Multi-mechanism distributed collision detection system and method
CN114900311B (en) * 2022-04-06 2024-06-04 平安国际智慧城市科技股份有限公司 Monitoring data management method, device, equipment and storage medium
CN115309515B (en) * 2022-10-10 2023-01-31 北京理工大学 Cross-chain transaction processing method, device and equipment based on block chain
CN115796874B (en) * 2023-01-09 2023-05-09 杭州安节科技有限公司 Concurrent execution method for blockchain transaction at operation level

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704269A (en) * 2017-10-16 2018-02-16 中国银行股份有限公司 A kind of method and system based on block chain generation block
WO2018090331A1 (en) * 2016-11-18 2018-05-24 深圳前海达闼云端智能科技有限公司 Blockchain network, article transaction method and apparatus, and node device
CN108694657A (en) * 2018-07-13 2018-10-23 平安科技(深圳)有限公司 Client's identification device, method and computer readable storage medium
CN108711085A (en) * 2018-05-09 2018-10-26 平安普惠企业管理有限公司 A kind of response method and its equipment of transaction request
CN108846753A (en) * 2018-06-06 2018-11-20 北京京东尚科信息技术有限公司 Method and apparatus for handling data
CN109508337A (en) * 2018-11-12 2019-03-22 杭州秘猿科技有限公司 A kind of transaction is parallel to execute method, apparatus, electronic equipment and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4250344B2 (en) * 2001-01-29 2009-04-08 インターナショナル・ビジネス・マシーンズ・コーポレーション Workflow system, workflow server, and storage medium
CN112232817A (en) * 2018-10-25 2021-01-15 创新先进技术有限公司 Transaction processing method and device based on block chain and electronic equipment
CN110070445B (en) * 2019-04-28 2024-03-01 深圳前海微众银行股份有限公司 Transaction processing method and device based on blockchain system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018090331A1 (en) * 2016-11-18 2018-05-24 深圳前海达闼云端智能科技有限公司 Blockchain network, article transaction method and apparatus, and node device
CN107704269A (en) * 2017-10-16 2018-02-16 中国银行股份有限公司 A kind of method and system based on block chain generation block
CN108711085A (en) * 2018-05-09 2018-10-26 平安普惠企业管理有限公司 A kind of response method and its equipment of transaction request
CN108846753A (en) * 2018-06-06 2018-11-20 北京京东尚科信息技术有限公司 Method and apparatus for handling data
CN108694657A (en) * 2018-07-13 2018-10-23 平安科技(深圳)有限公司 Client's identification device, method and computer readable storage medium
CN109508337A (en) * 2018-11-12 2019-03-22 杭州秘猿科技有限公司 A kind of transaction is parallel to execute method, apparatus, electronic equipment and system

Also Published As

Publication number Publication date
WO2020220860A1 (en) 2020-11-05
CN110070445A (en) 2019-07-30

Similar Documents

Publication Publication Date Title
CN110070445B (en) Transaction processing method and device based on blockchain system
CN112446785B (en) Cross-chain transaction method, system, device, equipment and storage medium
CN109345388B (en) Block chain intelligent contract verification method and device and storage medium
CN109242500B (en) Block chain transaction validity verification method and device and storage medium
CN107332876B (en) Method and device for synchronizing block chain state
CN112615871B (en) Method and device for transmitting authenticatable message across chains
US20190386834A1 (en) Blockchain management apparatus, blockchain management method, and program
CN106682984A (en) Block chain-based transaction business processing method and system
CN111949672B (en) Block chain storage method for supporting incremental update of Internet-of-things data
CN111698094B (en) Common identification method based on block chain system and block chain system
CN108200208B (en) Logistics block chain consensus algorithm based on cloud computing
CN110011930B (en) Load balancing method and device for multi-union chain in block chain
CN108062243B (en) Execution plan generation method, task execution method and device
CN112087502B (en) Method, device and equipment for processing request and storage medium
CN111523890A (en) Data processing method and device based on block chain, storage medium and equipment
CN110119292A (en) System operational parameters querying method, matching process, device and node device
CN110166249B (en) Information transmission method, device, verification end and computer readable storage medium
CN111899019A (en) Method and system for cross validation and sharing of blacklist and multiple parties
CN112671908B (en) Network management method and device, electronic equipment and readable storage medium
CN110570311B (en) Block chain consensus method, device and equipment
CN111404768A (en) DPI recognition realization method and equipment
CN107577700A (en) The processing method and processing device of database disaster tolerance
JP6992309B2 (en) Transmitter, receiver, and communication method
CN113240499B (en) Order processing method and device based on system switching
CN114820179A (en) Block chain signature checking method and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant