CN109410063B - Transaction processing method and device based on block chain and storage medium - Google Patents

Transaction processing method and device based on block chain and storage medium Download PDF

Info

Publication number
CN109410063B
CN109410063B CN201811337373.2A CN201811337373A CN109410063B CN 109410063 B CN109410063 B CN 109410063B CN 201811337373 A CN201811337373 A CN 201811337373A CN 109410063 B CN109410063 B CN 109410063B
Authority
CN
China
Prior art keywords
account
transaction
block
atomic
index table
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
CN201811337373.2A
Other languages
Chinese (zh)
Other versions
CN109410063A (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.)
Shanghai Zhongan Information Technology Service Co ltd
Original Assignee
Zhongan Information Technology Service 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 Zhongan Information Technology Service Co Ltd filed Critical Zhongan Information Technology Service Co Ltd
Priority to CN201811337373.2A priority Critical patent/CN109410063B/en
Publication of CN109410063A publication Critical patent/CN109410063A/en
Application granted granted Critical
Publication of CN109410063B publication Critical patent/CN109410063B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

The invention relates to a transaction processing method, a transaction processing device and a transaction processing storage medium based on a block chain. Wherein, the method comprises the following steps: receiving a request to process a transaction during a current out-of-block window; parsing the request to determine one or more atomic transactions and one or more accounts associated with the transaction, wherein each atomic transaction is related to at least one of the one or more accounts; determining whether there are one or more not-yet-loaded atomic transactions in the one or more atomic transactions based at least in part on an account-to-tile index table included in a tile of the to-be-chunked; in the absence of the one or more not yet loaded atomic transactions, searching the one or more atomic transactions stored in the block to block based at least in part on the account-to-block index table to perform the one or more atomic transactions.

Description

Transaction processing method and device based on block chain and storage medium
Technical Field
The present invention relates to the field of blockchain, and in particular, to a method, an apparatus, and a storage medium for processing transactions based on blockchain.
Background
The Blockchain (Blockchain) technology is an emerging technology appearing in the field of financial technology (FinTech) in recent years, has unique properties of decentralization, information non-falsification, multi-node collective maintainability, inventiveness, privacy protection and the like, and can record and provide credible transaction information data in an untrusted internet. As the name implies, a chain of blocks is a chain structure composed of blocks signed by unique hashes. The block comprises a block head and a block body, wherein the block head is composed of the information abstract of the block, and the block body is composed of real entity transaction contents.
An intelligent contract is a computer protocol intended to propagate, verify, or execute contracts in an informational manner that can be represented as a computer program that runs exactly on a blockchain. Users carry out transactions, share data, establish trust by using intelligent contracts, and ensure that the data is transparently traceable and tamperproof in the whole process of storage, reading and execution by the characteristics of the blockchain technology.
Typically, upon receiving a request from a client device to process a transaction (e.g., a transfer, etc.), a block link point finds one or more atomic transactions (actions) associated with the transaction from its storage and then loads and stores the one or more atomic transactions into a block of pending blocks in the memory of the block link node for execution. An atomic transaction is in fact a call to a function in an intelligent contract that can represent a contract term and implement specific rules in the term. Thus, a transaction is a combination of one or more atomic transactions, which may be included in a transaction, such that a client device may invoke a plurality of functions to perform a set of operations by signing a name in a transaction.
A tile (cycle), also referred to as a small chain within a tile, divides the message within the tile into multiple parts for processing (e.g., in parallel), thereby improving the efficiency of message interaction, and does not actually need to wait for the complete tile to be packed, but is asynchronously broadcast immediately after the tile is generated. This enables intra-block communication to be achieved, which in turn makes communication between accounts more efficient. In one partition, a producer can utilize multi-core and multi-thread to process 'irrelevant' transaction transactions concurrently, so that the transaction processing speed is improved.
However, in the conventional usage method, after the client device initiates a processing request of a transaction to the block link point, the block link point must load and store all atomic transactions associated with the transaction into a corresponding slice of the block to be released, search each atomic transaction from the corresponding slice of the block and execute the atomic transactions to complete the processing of the transaction. However, this method has low performance (e.g., low concurrency) and lacks popularization and popularity in the face of complex application scenarios (e.g., there are cases where a large number of transactions need to be processed, such as tens of thousands or hundreds of thousands of transactions per second).
Disclosure of Invention
In view of the above technical problems and other potential technical problems, embodiments of the present invention provide a method and an apparatus for processing transactions based on a blockchain, so that the execution efficiency of atomic transactions executed on nodes of the blockchain can be improved, and the concurrent processing capability of the atomic transactions within the blockchain can be flexibly achieved.
The invention provides a transaction processing method based on a block chain, which comprises the following steps: receiving a request to process a transaction during a current out-of-block window; parsing the request to determine one or more atomic transactions and one or more accounts associated with the transaction, wherein each atomic transaction is related to at least one of the one or more accounts; determining whether there are one or more atomic transactions that have not yet been loaded among the one or more atomic transactions based at least in part on an account-to-parcel index table included in a block of a to-be-unbuckled block, wherein an atomic transaction that has not yet been loaded refers to an atomic transaction that has not yet been loaded and stored into a parcel of the block of the to-be-unbuckled block that is associated with the associated account, and wherein the account-to-parcel index table is used to map each account associated with a processed transaction to one or more parcels of the block of the to-be-unbuckled block that are associated with the account; in the absence of the one or more not yet loaded atomic transactions, searching the one or more atomic transactions stored in the block to block based at least in part on the account-to-block index table to perform the one or more atomic transactions.
In one implementation, where there are the one or more atomic transactions that have not been loaded: loading and storing the one or more not-yet-loaded atomic transactions into one or more additional extents in the to-be-chunked block, wherein each additional extent is associated with one of the one or more accounts; updating the account-to-parcel index table based on the one or more newly added parcels and the one or more accounts; and searching the one or more atomic transactions stored in the block to be loaned based at least in part on the updated account-to-chunk index table to perform the one or more atomic transactions.
In one implementation, the account-to-parcel index table maps each account to one or more parcels associated with the account using the identification of the account and the identification of the one or more parcels associated with the account for the to-be-chunked block associated with the transaction.
In one implementation, the identity of each account associated with a processed transaction and the identity of one or more extents of the to-be-chucked block associated with that account are stored in the account-extent index table in the form of key-value pair entries, wherein the identity of each account associated with a processed transaction is stored as a key and the identity of one or more extents of the to-be-chucked block associated with that account are stored as values.
In one implementation, the block of the to-go block is initially empty.
In one implementation, the account-parcel index table is created in the to-be-unblock upon receiving a first request to process a transaction during the current out-of-block window, and wherein the account-parcel index table is initially empty.
In one implementation, updating the account-parcel index table based on the one or more additional parcels and the one or more accounts includes updating the account-parcel index table by adding an entry in the account-parcel index table that maps a relevant account of the one or more accounts to the one or more additional parcels.
In one implementation, the method further includes verifying the validity of the transaction.
In one implementation, the method further comprises: and when the block output condition is met, packaging the blocks to be output, and broadcasting the packaged blocks to all block chain nodes of the block chain so as to ensure that all block chain link points are identified together.
A second aspect of the present invention provides a blockchain-based transaction processing apparatus, including: a memory to store instructions; and a processor coupled to the memory and the instructions, when executed by the processor, cause the processor to perform the method according to the first aspect of the invention.
A third aspect of the invention provides a computer-readable storage medium comprising instructions that, when executed, cause a computer to perform the method according to the first aspect of the invention.
According to the method and the device, the block to be blocked comprises the account-parcel index table, and when a transaction occurs, the transaction is processed at least partially on the basis of the account-parcel index table, so that the concurrency of message interaction inside the block in a block chain is improved, the overall efficiency of the block chain is improved, and the popularization of block chain application is improved.
Drawings
Embodiments of the present invention are shown and described with reference to the drawings. These drawings are only for the purpose of illustrating the general principles and are indicative of the aspects necessary for an understanding of the general principles and are not intended to limit the scope of the invention as claimed. In the drawings, like reference numerals designate similar features.
FIG. 1 illustrates a schematic diagram of the architecture of a blockchain based transaction processing system 100 that may be used to implement an example embodiment of the present invention.
Fig. 2 illustrates a flow diagram of a blockchain based transaction processing method 200 according to an example embodiment of the invention.
Fig. 3 illustrates a specific example of the transaction processing method according to fig. 2.
Fig. 4 illustrates a schematic diagram of an apparatus 400 according to an embodiment of the invention.
Detailed Description
Various exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While the flow charts and diagrams in the drawings show some embodiments of the invention, it is to be understood that the present invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure.
FIG. 1 illustrates a schematic diagram of the architecture of a system 100 for improving the performance of a blockchain system that may be used to implement an example embodiment of the present invention. System 100 includes client device(s) 110 and blockchain network (hereinafter simply blockchain) 120.
In an embodiment of the invention, a client device 110 (e.g., a mobile device or a fixed device) may be connected to each node of blockchain 120 via a network (e.g., a wired network or a wireless network).
Blockchain 120 includes a plurality of blockchain node devices (also referred to herein as nodes), such as nodes 121, 122, and 123, connected by a network. Although the blockchain 120 shown in fig. 1 includes only three nodes and one client device, it should be appreciated that in actual applications, the blockchain system 120 may include more or fewer nodes and more client devices. In embodiments of the present invention, each of these nodes may be a computing device, which may be a server or a user device (e.g., a mobile device or a fixed device). The data can be synchronized among the block chain node devices through the network, so that potential safety hazards and safety risks brought by centralized nodes can be avoided. The network may be any wired and/or wireless network. Optionally, the network may include, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a virtual private network, a wireless communication network, and so forth.
Fig. 2 illustrates a flow diagram of a blockchain based transaction processing method 200 according to an example embodiment of the invention. The method 200 may be performed at any node in a blockchain system (e.g., blockchain system 100).
In step 201, during the current out-of-block window, a block chain node receives a request from a client device to process a transaction. In the embodiment of the present invention, the current block output window refers to a duration from a time point when a last block finishes block output to a time point when a block of a current to-be-output block finishes block output. It will be appreciated that in actual use, a block chain node may receive a number of requests from one or more different client devices to process different transaction transactions during an out-of-block window period. In one example, the request to process a transaction may be the first request to process a transaction received by the blockchain node during the current out-of-block window period. In another example, the request to process the transaction may also be a request to process a subsequent transaction received by the blockchain node during the current out-of-block window (e.g., a second, third … … or nth request to process a transaction, where N is a positive integer, depending on the conditions of the block out). It will be appreciated that in embodiments of the present disclosure, a blockchain node may receive multiple requests to process different transaction transactions simultaneously, at which point the blockchain node may process the requests in parallel.
In step 202, the request is parsed to determine one or more atomic transactions and one or more accounts associated with the transaction, wherein each atomic transaction is associated with at least one of the one or more accounts. As previously mentioned, an atomic transaction is actually a call to a function in an intelligent contract that may represent a contract term and implement specific rules in the term. In one implementation, a chunk link point may, for example, obtain (e.g., identify) an identification (e.g., name) of the one or more atomic transactions and an identification (e.g., name) of the one or more accounts by parsing the request.
For clarity, the above is further illustrated below by the following examples. For example, and by way of example only, where the request is a transaction that handles a transfer from account a to account B and requires account C to confirm the fact of the transfer, determining one or more atomic transactions associated with the transaction by parsing the request includes: a first atomic transaction in which the transfer is transferred from account a to account B, and a second atomic transaction in which the transfer is confirmed by account C, and the accounts associated with the transaction transactions include account a, account B, and account C, wherein the first atomic transaction is associated with account a and account B, and the second atomic transaction is associated with account C.
In step 203, the block link point determines whether there are one or more atomic transactions not yet loaded among the one or more atomic transactions based at least in part on an account-to-partition index table included in the block to be loaned, which in the present invention refers to atomic transactions in partitions associated with the relevant accounts that have not yet been loaded and stored to the block to be loaned (in the memory of the block link node), and wherein the account-to-partition index table is used to map each account associated with a processed transaction (i.e., a transaction processed during the current block window) to one or more partitions associated with the account of the block to be loaned. In one implementation, the account-parcel index table is created in the block of the to-be-out block upon receiving a first request to process a transaction during a current out-of-block window, and the account-parcel index table is initially empty. Further, in one implementation, the account-to-parcel index table maps each account associated with a processed transaction to one or more parcels of the to-be-chunked block using the identification of the account and the identification of the one or more parcels associated with the account. An identification of each account associated with a processed transaction and an identification of one or more extents of the to-be-chucked block associated with that account are stored in the account-extent index table in the form of key-value pair entries, wherein the identification of each account associated with a processed transaction is stored as a key and the identification of the one or more extents of the to-be-chucked block associated with that account is stored as a value.
In one example, for the case where the request is the first request received by the blockchain node during the current out-of-block window, since the account-parcel index table has just been created and is empty at this time (i.e., no atomic transactions have been stored in the block to be out-of-block), it may be determined that the atomic transactions associated with the first request all belong to atomic transactions that have not yet been loaded.
In another example, for the case where the request is a subsequent request (not the first request) received by the blockchain node during the current chunking window, for example if the subsequent request involves a first atomic transaction, a fifth atomic transaction, and a sixth atomic transaction, wherein the first atomic transaction is associated with a first account, the fifth atomic transaction is associated with a third account, the sixth atomic transaction is associated with a second account, and the block has stored therein the first atomic transaction, the second atomic transaction, the third atomic transaction, the fourth atomic transaction, and the fifth atomic transaction, wherein the first atomic transaction to the third atomic transaction are stored in a first tile associated with the first account, the fourth and fifth atomic transactions are stored in a second tile associated with the second account, and therefore since there is no entry in the account-tile index table associated with the third account, it may be determined that the fifth atomic transaction belongs to an atomic transaction that has not yet been loaded. In addition, it is worth mentioning that, for the fifth atomic transaction, although the fifth atomic transaction is already stored in the second tile area of the to-be-tiled tile, since the fifth atomic transaction in the subsequent request is associated with the third account, not the second account, the fifth atomic transaction involved in the subsequent request should belong to an atomic transaction that is not yet loaded. In addition, since it is known from the account-parcel index table that the parcel associated with the second account is the second parcel and the sixth atomic transaction is not stored in the second parcel, it can be determined that the sixth atomic transaction involved in the subsequent request should also belong to an atomic transaction that has not yet been loaded.
In step 204, in the absence of one or more atomic transactions that have not yet been loaded, the block link point searches (e.g., according to a traversal algorithm (e.g., a binary tree algorithm)) the one or more atomic transactions stored in the block of the outblock based at least in part on the account-to-parcel index table to perform the one or more atomic transactions. In one example, the corresponding atomic transactions stored in the block are searched for execution (e.g., executed in parallel) based on the account-parcel index table and the identification of the one or more accounts to which the request relates and the identification of the one or more atomic transactions. The results of the execution of each atomic transaction may be stored in one or more tiles.
In step 205, where there are one or more atomic transactions that have not been loaded (e.g., from storage associated with the block link point), the one or more atomic transactions that have not been loaded are loaded and stored into one or more additional extents of the block to be loaned (e.g., into one or more additional extents immediately following the last current extent of the block to be loaned), where each additional extent is associated with one of the one or more accounts associated with the current transaction.
In step 206, the account-parcel index table is updated based on the one or more newly added parcels and the one or more accounts. In one example, the account-parcel index table is updated by adding an entry in the account-parcel index table that maps the relevant account of the one or more accounts to the one or more additional parcels.
In step 207, the one or more atomic transactions stored in the block of the to-be-striped block are searched for execution (e.g., executed in parallel) based at least in part on the updated account-to-tile index table. In one example, the corresponding atomic transactions stored in the chunk are searched for and executed based on the updated account-parcel index table and the identification of the one or more accounts to which the request relates and the identification of the one or more atomic transactions. The results of the execution of each atomic transaction may be stored in one or more tiles.
In step 208, the tiles storing the execution results of the corresponding atomic transactions are broadcast to other chain nodes of the blockchain for verifying the validity of the execution results of the atomic transactions together with the other blockchain nodes.
The blockchain node may receive a number of requests from client devices to process transaction transactions, either in parallel or in sequence, during the out-of-block window, for each of which may be implemented as described in connection with fig. 2. In addition, when the out-of-block condition is satisfied (i.e., when the condition for finally forming the block is satisfied, e.g., when the out-of-block window expires to close, or when the size limit of the block is satisfied), the blocks to be out-of-block are packed and the packed blocks are broadcast onto all block chain nodes of the block chain for consensus confirmation by all block chain nodes.
In order to make the method of the invention more clearly understandable, the above method is further described below by way of an example as shown in fig. 3.
For example, assume that during the current chunking window, the blockchain node receives a request from a client device to process a first transaction, the transaction transactions associated with atomic transaction 1, atomic transaction 2, atomic transaction 3, atomic transaction 4, and atomic transaction 5, and wherein atomic transactions 1 through 3 are related to account 1, and atomic transactions 4 and 5 are related to account 2. Also in this example, the execution logic of the transaction is to execute atomic transactions 1 through 5 in order.
Since the account-parcel index table has just been created and is empty at this time, the blockchain node may determine that all of the five atomic transactions involved in the first transaction are not already loaded atomic transactions. Subsequently, the block nodes load and store atomic transactions 1 through 5 into the block to be blocked, for example, into zone 1 and zone 2 of the block to be blocked, where zone 1 is associated with account 1 and zone 2 is associated with account 2. In one implementation, the block link point also updates the account-to-chunk index table, which is otherwise empty, to include the following entries:
key with a key body Value of
Account 1 Tablet region 1
Account 2 Slice area 2
TABLE 1 example of Account-to-parcel index Table
Next, the block link points search for atomic transactions 1 through 5 to execute (e.g., in logical order of execution or concurrently depending on the application) based at least in part on the account-partition index table to complete the first transaction.
Continuing with the example, assume that during the current chunking window, the blockchain node in turn receives a request from the client device to process a second transaction, the second transaction associated with atomic transaction 1, atomic transaction 5, and atomic transaction 6, wherein atomic transaction 1 is associated with account 1, atomic transaction 5 is associated with account 2, and atomic transaction 6 is also associated with account 1. Assume in this example that the execution logic of the transaction is to call atomic transaction 1 during execution of atomic transaction 5 and then execute atomic transaction 6. As previously described, in this example, since the account-to-parcel index table includes an entry mapping account 1 to parcel 1 and an entry mapping account 2 to parcel 2, but no atomic transaction 6 is included in parcel 1 associated with account 1, the block link point may determine that the atomic transaction 6 involved in the second transaction belongs to an atomic transaction that has not yet been loaded. Thus, the atomic transaction 6 is loaded and stored into section 3 in the block currently pending, where section 3 is associated with account 1. Then, the account-parcel index table shown in table 1 is updated to include the following entries:
Figure BDA0001861586580000091
table 2 another example of an account-parcel index table
Subsequently, the blockchain node may search, based at least in part on the updated account-to-parcel index table, for atomic transaction 5 stored in parcel 2, atomic transaction 1 stored in parcel 1, and atomic transaction 6 stored in parcel 3 to execute the atomic transactions (e.g., in the logical order of their execution, depending on the particular application, or concurrently) to complete the second transaction.
Subsequent transaction requests received during the current out-of-block window may be processed as shown in fig. 2 and thus are not described in detail in this example.
Additionally, it should be appreciated that although in this example, the transaction requests are illustrated as being received sequentially, in actual practice, one or more transaction requests may be received in parallel. Also, atomic transactions associated with different transaction transactions may be performed in parallel. According to the description, the block to be blocked comprises the account-parcel index table, and the transaction is processed at least partially on the basis of the account-parcel index table when the transaction occurs, so that the concurrency of message interaction inside the block in the block chain is improved, the overall efficiency of the block chain is improved, and the popularization and popularity of the block chain application are improved.
Although the operations above are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In some cases, multitasking or parallel processing may be beneficial. Likewise, while the above discussion contains certain specific implementation details, this should not be construed as limiting the scope of any invention or claims, but rather as describing particular embodiments that may be directed to particular inventions. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Fig. 4 illustrates a schematic diagram of an apparatus 400 according to an embodiment of the invention. The apparatus 400 may include: a memory 401 and a processor 402 coupled to the memory 401. The memory 401 is for storing instructions, and the processor 402 is configured to implement one or more of any of the steps of the method described with respect to fig. 2 based on the instructions stored by the memory 401.
As shown in fig. 4, the apparatus 400 may further include a communication interface 403 for information interaction with other devices. The apparatus 400 may further comprise a bus 404, the memory 401, the processor 402 and the communication interface 403 communicating with each other via the bus 404.
The memory 401 may include volatile memory and may also include non-volatile memory. Processor 402 may be a Central Processing Unit (CPU), microcontroller, Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Field Programmable Gate Array (FPGA) or other programmable logic device, or one or more integrated circuits configured to implement an embodiment of the invention.
Alternatively, the blockchain-based transaction processing methods described above can be embodied by a computer program product, i.e., a tangible computer-readable storage medium. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied therein for carrying out aspects of the present invention. The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
It should be noted that the above-mentioned embodiments are only specific examples of the present invention, and obviously, the present invention is not limited to the above-mentioned embodiments, and many similar variations exist. All modifications which would occur to one skilled in the art and which are, therefore, directly derived or suggested from the teachings herein, are intended to be within the scope of the present invention.
Thus, while the present invention has been described with reference to specific examples, which are intended to be illustrative only and not to be limiting of the invention, it will be apparent to those of ordinary skill in the art that changes, additions or deletions may be made to the inventive embodiments without departing from the spirit and scope of the invention.

Claims (11)

1. A blockchain based transaction processing method, comprising:
receiving a request to process a transaction during a current out-of-block window;
parsing the request to determine one or more atomic transactions and one or more accounts associated with the transaction, wherein each atomic transaction is associated with at least one of the one or more accounts, the atomic transaction being a call to a function of a plurality of functions in an intelligent contract;
determining whether there are one or more atomic transactions that have not yet been loaded among the one or more atomic transactions based at least in part on an account-to-parcel index table included in a block to be loaned, wherein an atomic transaction that has not yet been loaded refers to an atomic transaction that has not yet been loaded and stored into a parcel of the block to be loaned that is associated with the associated account, and wherein the account-to-parcel index table is used to map each account associated with a processed transaction to one or more parcels of the block to be loaned that are associated with the account;
in the absence of the one or more not yet loaded atomic transactions, searching the one or more atomic transactions stored in the block to block based at least in part on the account-to-block index table to perform the one or more atomic transactions.
2. The transaction processing method of claim 1, wherein in the presence of the one or more not yet loaded atomic transactions:
loading and storing the one or more not-yet-loaded atomic transactions into one or more additional extents in the to-be-chunked block, wherein each additional extent is associated with one of the one or more accounts;
updating the account-to-parcel index table based on the one or more newly added parcels and the one or more accounts; and
searching the one or more atomic transactions stored in the block to be loaned based at least in part on the updated account-to-chunk index table to perform the one or more atomic transactions.
3. The transaction-processing method of claim 1, wherein the account-parcel index table maps each account associated with a processed transaction to one or more parcels associated with the account using an identification of the account and an identification of the one or more parcels associated with the account for the to-be-chunked block.
4. The transaction-processing method of claim 3, wherein the identity of each account associated with a processed transaction and the identity of the one or more extents of the to-be-blocked block associated with that account are stored in the account-extent index table in the form of key-value pair entries, wherein the identity of each account associated with a processed transaction is stored as a key and the identity of the one or more extents of the to-be-blocked block associated with that account are stored as values.
5. The transaction processing method of claim 1, wherein the block of pending blocks is initially empty.
6. The transaction processing method of claim 1, wherein the account-parcel index table is created in the to-be-unbocked block upon receiving a first request to process a transaction during the current unbocked window, and wherein the account-parcel index table is initially empty.
7. The transaction processing method of claim 2, wherein updating the account-parcel index table based on the one or more additional parcels and the one or more accounts comprises updating the account-parcel index table by adding an entry in the account-parcel index table for mapping a relevant account of the one or more accounts to the one or more additional parcels.
8. The transaction processing method according to claim 1 or 2, further comprising: verifying a validity of the results of the execution of the one or more atomic transactions.
9. The transaction processing method of claim 8, further comprising:
and when the block output condition is met, packaging the blocks to be output, and broadcasting the packaged blocks to all block chain nodes of the block chain so as to ensure that all block chain link points are identified together.
10. A blockchain-based transaction processing apparatus, comprising:
a memory to store instructions; and
a processor coupled to the memory and the instructions, when executed by the processor, cause the processor to perform the method of any of claims 1-9.
11. A computer-readable storage medium comprising instructions that, when executed, cause a computer to perform the method of any of claims 1-9.
CN201811337373.2A 2018-11-12 2018-11-12 Transaction processing method and device based on block chain and storage medium Active CN109410063B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811337373.2A CN109410063B (en) 2018-11-12 2018-11-12 Transaction processing method and device based on block chain and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811337373.2A CN109410063B (en) 2018-11-12 2018-11-12 Transaction processing method and device based on block chain and storage medium

Publications (2)

Publication Number Publication Date
CN109410063A CN109410063A (en) 2019-03-01
CN109410063B true CN109410063B (en) 2021-09-10

Family

ID=65472774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811337373.2A Active CN109410063B (en) 2018-11-12 2018-11-12 Transaction processing method and device based on block chain and storage medium

Country Status (1)

Country Link
CN (1) CN109410063B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020181412A1 (en) * 2019-03-08 2020-09-17 云图有限公司 Blockchain consensus processing method, apparatus, and system
CN110648234B (en) * 2019-09-12 2022-08-19 广州蚁比特区块链科技有限公司 Block generation method and device
CN112637267B (en) * 2020-11-27 2023-06-02 成都质数斯达克科技有限公司 Service processing method, device, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106406896A (en) * 2016-09-27 2017-02-15 北京天德科技有限公司 Block chain block-building method based on parallel PipeLine technology
CN106506638A (en) * 2016-11-04 2017-03-15 江苏通付盾科技有限公司 Block storage method and device in block chain
CN107423124A (en) * 2017-07-27 2017-12-01 中链科技有限公司 A kind of method for being used to carry out transaction data parallel processing
CN107688999A (en) * 2017-08-11 2018-02-13 杭州秘猿科技有限公司 A kind of parallel transaction based on block chain performs method
CN108564470A (en) * 2018-04-17 2018-09-21 北京天德科技有限公司 The transaction distribution method of block is built in a kind of block chain parallel

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10649429B2 (en) * 2015-10-13 2020-05-12 LO3 Energy Inc. Use of blockchain based distributed consensus control

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106406896A (en) * 2016-09-27 2017-02-15 北京天德科技有限公司 Block chain block-building method based on parallel PipeLine technology
CN106506638A (en) * 2016-11-04 2017-03-15 江苏通付盾科技有限公司 Block storage method and device in block chain
CN107423124A (en) * 2017-07-27 2017-12-01 中链科技有限公司 A kind of method for being used to carry out transaction data parallel processing
CN107688999A (en) * 2017-08-11 2018-02-13 杭州秘猿科技有限公司 A kind of parallel transaction based on block chain performs method
CN108564470A (en) * 2018-04-17 2018-09-21 北京天德科技有限公司 The transaction distribution method of block is built in a kind of block chain parallel

Also Published As

Publication number Publication date
CN109410063A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
US11372919B2 (en) Distributed graph databases that facilitate streaming data insertion and queries by efficient throughput edge addition
US11321393B2 (en) Distributed graph databases that facilitate streaming data insertion and queries by reducing number of messages required to add a new edge by employing asynchronous communication
JP6875557B2 (en) Methods and devices for writing service data to the blockchain system
US11314775B2 (en) Distributed graph databases that facilitate streaming data insertion and low latency graph queries
EP3120261B1 (en) Dependency-aware transaction batching for data replication
CN109410063B (en) Transaction processing method and device based on block chain and storage medium
US9400767B2 (en) Subgraph-based distributed graph processing
CN110019080B (en) Data access method and device
CN108140049B (en) Parallel batch processing of tree-based data structures
CN110895534A (en) Data splicing method, device, medium and electronic equipment
CN105445792A (en) Pre-stack multiple reverse time migration earthquake data processing method and system
CN108139927B (en) Action-based routing of transactions in an online transaction processing system
CN114116065A (en) Method and device for acquiring topological graph data object and electronic equipment
CN113204678A (en) Loop detection method, device, system, equipment and medium of directed graph
US20150106381A1 (en) Loading data with complex relationships
CN112559547B (en) Method and device for determining consistency among multiple storage object copies
CN110705935B (en) Logistics document processing method and device
CN112765169A (en) Data processing method, device, equipment and storage medium
CN113541987A (en) Method and device for updating configuration data
CN112052341A (en) Knowledge graph pruning method and device
CN113127416A (en) Data query method and device
CN111984686A (en) Data processing method and device
CN115563183B (en) Query method, query device and program product
US20210286680A1 (en) Method, electronic device and computer program product for storage management
CN113760860A (en) Data reading method and device

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
TR01 Transfer of patent right

Effective date of registration: 20240320

Address after: Room 1179, W Zone, 11th Floor, Building 1, No. 158 Shuanglian Road, Qingpu District, Shanghai, 201702

Patentee after: Shanghai Zhongan Information Technology Service Co.,Ltd.

Country or region after: China

Address before: 518052 Room 201, building A, 1 front Bay Road, Shenzhen Qianhai cooperation zone, Shenzhen, Guangdong

Patentee before: ZHONGAN INFORMATION TECHNOLOGY SERVICE Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right