CN109636384A - A kind of parallelization executes the method, apparatus and system of block chain transaction - Google Patents

A kind of parallelization executes the method, apparatus and system of block chain transaction Download PDF

Info

Publication number
CN109636384A
CN109636384A CN201811261883.6A CN201811261883A CN109636384A CN 109636384 A CN109636384 A CN 109636384A CN 201811261883 A CN201811261883 A CN 201811261883A CN 109636384 A CN109636384 A CN 109636384A
Authority
CN
China
Prior art keywords
transaction
queue
block
written
processing unit
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.)
Pending
Application number
CN201811261883.6A
Other languages
Chinese (zh)
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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201811261883.6A priority Critical patent/CN109636384A/en
Priority to TW108109776A priority patent/TWI743458B/en
Publication of CN109636384A publication Critical patent/CN109636384A/en
Priority to PCT/CN2019/101666 priority patent/WO2020082871A1/en
Pending legal-status Critical Current

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/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Abstract

Disclose the method, apparatus and system of a kind of parallelization execution block chain transaction.In this specification embodiment, if each transaction in block to be written is neither the transaction being updated to the information stored in more than one storage address, so, each node in block chain network can be written into each action organisation in block at least two transaction queues, then, the transaction executed in each transaction queue is started simultaneously at.

Description

A kind of parallelization executes the method, apparatus and system of block chain transaction
Technical field
This specification embodiment is related to information technology field more particularly to a kind of parallelization executes the side of block chain transaction Method, apparatus and system.
Background technique
For common block chain application scenarios, when needing to carry out the common recognition between each node, each node can be based on Common recognition algorithm elects the node for having permission and several pending transaction being packaged into block, i.e. accounting nodes.After common recognition, Accounting nodes fish for several pending transaction from caching and are packaged into block, and the block is broadcast to other nodes.With Afterwards, for each node, the node on the one hand can according to the sequencing being initiated of respectively trading in the block, by after arriving first according to It is secondary to execute each transaction, on the other hand block chain can be written in the block.
It is executed in general, node is known as the transaction serialized by the mode for executing each transaction in block after arriving first one by one Mode.The transaction executive mode why use this serialization, is one because under common block chain application scenarios The execution of transaction is sometimes updated the information stored in more than one storage address, if not using the transaction of serialization The case where executive mode, the then transaction being easy to appear executes failure.
But under the block chain application scenarios having, there is no can to the information stored in more than one storage address into The transaction that row updates.Under these block chain application scenarios, using the transaction executive mode of above-mentioned serialization, transaction will lead to Execution efficiency is lower.
Summary of the invention
In order to solve the problems, such as that existing block chain transaction executive mode efficiency is lower, this specification embodiment provides one kind Parallelization executes the method, apparatus and system of block chain transaction, and technical solution is as follows:
According to the 1st of this specification embodiment the aspect, a kind of method that parallelization executes the transaction of block chain is provided, comprising:
For each node in block chain network, which obtains block to be written;For in the block to be written Each transaction, the implementing result of the transaction be found a storage address and be stored in information, or update a storage address on The information of storage;
Each transaction is read from the block to be written, and by each action organisation at N number of transaction queue;N is greater than 1;
It is directed to each transaction queue simultaneously, by successively executing each transaction in the transaction queue after arriving first;
Block chain is written into the block to be written.
According to the 2nd of this specification embodiment the aspect, a kind of device of parallelization execution block chain transaction, the dress are provided Any node being set in block chain network, described device include:
Module is obtained, block to be written is obtained;For each transaction in the block to be written, the execution knot of the transaction Fruit is to found a storage address and be stored in information, or update the information stored in a storage address;
Molded tissue block reads each transaction from the block to be written, and by each action organisation at N number of transaction queue;N is big In 1;
Execution module, while it being directed to each transaction queue, by successively executing each transaction in the transaction queue after arriving first;
Block chain is written in the block to be written by writing module.
According to the 3rd of this specification embodiment aspect, a kind of system that parallelization executes the transaction of block chain is provided, including by The block chain network of multiple node compositions;
Any node in the block chain network, obtains block to be written;Each friendship is read from the block to be written Easily, and by each action organisation at N number of transaction queue;N is greater than 1;It is directed to each transaction queue simultaneously, it should by successively being executed after arriving first Each transaction in transaction queue;Block chain is written into the block to be written;
Wherein, for each transaction in the block to be written, the implementing result of the transaction is to found a storage ground Location is simultaneously stored in information, or updates the information stored in a storage address.
Technical solution provided by this specification embodiment, if each transaction in block to be written is neither to more than The transaction that the information stored in one storage address is updated, then, each node in block chain network can will be to be written Enter each action organisation in block at least two transaction queues, then, starts simultaneously at the transaction executed in each transaction queue. In this way, each node can execute greater number of transaction within the unit time, transaction execution efficiency is improved.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not This specification embodiment can be limited.
In addition, any embodiment in this specification embodiment does not need to reach above-mentioned whole effects.
Detailed description of the invention
In order to illustrate more clearly of this specification embodiment or technical solution in the prior art, below will to embodiment or Attached drawing needed to be used in the description of the prior art is briefly described, it should be apparent that, the accompanying drawings in the following description is only The some embodiments recorded in this specification embodiment for those of ordinary skill in the art can also be attached according to these Figure obtains other attached drawings.
Fig. 1 is the flow diagram for the method that a kind of parallelization that this specification embodiment provides executes the transaction of block chain;
Fig. 2 is the transaction executive mode schematic diagram serialized in the prior art;
Fig. 3 is the transaction executive mode schematic diagram for the parallelization that this specification embodiment provides;
Fig. 4 is the structural schematic diagram for the device that a kind of parallelization that this specification embodiment provides executes the transaction of block chain;
Fig. 5 is the structural schematic diagram for the system that a kind of parallelization that this specification embodiment provides executes the transaction of block chain;
Fig. 6 is the structural schematic diagram for configuring a kind of computer equipment of this specification embodiment method.
Specific embodiment
It should be noted that transaction (transaction) described in this specification, refers to that user passes through block chain Client creation, and need finally to be distributed to data in the distributed data base of block chain.
That is, the transaction in block chain, there are points of the transaction of narrow sense and the transaction of broad sense.The transaction of narrow sense is Refer to the value Transfer that user issues to block chain;For example, transaction can be use in traditional bit coin block chain network Initiate in block chain one of family transfers accounts.And the transaction of broad sense refers to that one that user issues to block chain there is business to be intended to Business datum;For example, operator can build alliance's chain based on actual business demand, alliance's chain deployment one is relied on A bit it is unrelated with value Transfer it is other types of line service (for example, business of renting a house, vehicle scheduling business, settlement of insurance claim business, Credit services, medical services etc.), and in this kind of alliance's chain, transaction, which can be one that user issues in alliance's chain, to be had The service message or service request that business is intended to.
In the following, by taking this block chain agreement in ether mill as an example, to the prior art using the transaction executive mode serialized Reason is described in detail.It is emphasized that in other block chain agreements in addition to ether mill, using the friendship of serialization The reason of easy executive mode is also similar.
In ether mill, there are points of external account and contract account.External account is for storing the ether that user possesses Coin remaining sum, external account are substantially the storage address for being stored with balance information.Contract account is for storing the intelligence that user founds Energy contract, contract account is substantially to be stored with the storage address of intelligent contract code.
In ether mill, general there are two types of the transaction of type, i.e. external account (can be external account to other accounts Can be contract account) money transfer transactions and external account creation contract account contract creation transaction.
The execution of money transfer transactions can generally be updated the information stored in more than one storage address.Specifically, The execution of one money transfer transactions, it will usually change the remaining sum (i.e. the balance information stored on two account addresses) of two accounts, Transfer amounts are deducted from the remaining sum of transfer account, increase transfer amounts into the remaining sum of receipt on account account.One money transfer transactions Executable premise is the remaining sum of transfer account not less than transfer amounts.
Transfer account in practical application, in a certain money transfer transactions (being denoted as money transfer transactions A), it may be possible to before another Receipt on account user in one money transfer transactions (being denoted as money transfer transactions B).If the sequence not being initiated according to transaction after arriving first by holding Row transaction, it would be possible that there is following situation, i.e. money transfer transactions B is not carried out, and the transfer account in money transfer transactions A is caused not fill The remaining sum of foot is transferred accounts.Exactly because in this way, all block chain application scenarios for being related to money transfer transactions, all have to using string The transaction executive mode of rowization, to guarantee that transaction can be executed smoothly.
And the execution of contract creation transaction is actually to create a contract account, that is, founds a storage address, and will Intelligent contract code is stored in the storage address founded.Obviously, the execution of contract creation transaction only will affect a storage address.
In addition, block chain application scenarios be it is diversified, under the block chain application scenarios having, ether mill can be based on It is extended, develops the transaction of new type, the execution of this transaction may also only will affect a storage address.For example, sharp With block chain carry out in store card.One is deposited the execution of card transaction, is substantially to found a storage address, will be deposited the interior of card It stores into the storage address founded.
Based on the above, the invention proposes a kind of methods that parallelization executes the transaction of block chain, specifically for certain class one zone Block chain application scenarios, under this kind of block chain scene, the implementing result of every transaction only will affect a storage address.
In order to make those skilled in the art more fully understand the technical solution in this specification embodiment, below in conjunction with this Attached drawing in specification embodiment is described in detail the technical solution in this specification embodiment, it is clear that described Embodiment is only a part of the embodiment of this specification, instead of all the embodiments.The embodiment of base in this manual, Those of ordinary skill in the art's every other embodiment obtained, all should belong to the range of protection.
Below in conjunction with attached drawing, the technical solution that each embodiment of this specification provides is described in detail.
Fig. 1 is the flow diagram for the method that a kind of parallelization that this specification embodiment provides executes the transaction of block chain, The following steps are included:
S100: for each node in block chain network, which obtains block to be written.
In this specification embodiment, after actually each node common recognition of the block to be written, it is packaged by accounting nodes At block.The block to be written can be broadcast to other nodes by accounting nodes.It is well known that in block chain agreement, often On the one hand a node needs to be implemented each transaction in block to be written, on the other hand need to be written into block and be written to block Publicity is carried out in chain.The block to be written once be written block chain in, be equivalent to be written into each of block trade into Publicity is gone.Whether publicity can correct for verifying corresponding transaction implementing result in the transaction on block chain, to have prevented Node is done evil.
In the step s 100, for each node, if the node is accounting nodes, which obtains described to be written The mode for entering block specifically can be fished for from the caching of itself it is several transaction be packaged into the block to be written;If the section Point is not accounting nodes, then the mode that the node obtains the block to be written, which specifically can be, receives accounting nodes broadcast The block to be written.
It is emphasized that the implementing result of the transaction is to found one for each transaction in the block to be written A storage address is simultaneously stored in information, or update stored in a storage address information (to storage address deposit information or Modify the information stored in a storage address).That is, the implementing result of each transaction in the block to be written, A storage address can only be had an impact.
For example, creation contract account contract create transaction, be exactly implementing result be found a storage address and be stored in The transaction of information.
For another example, under some block chain application scenarios, the record of the shopping to each user is needed to carry out depositing card.So, Need to found the corresponding record storage address of each user in the database.When target user does shopping, one will be generated Item shopping records, and any node in block chain network can deposit to demonstrate,prove and trade and broadcast based on shopping record building record.Then, For each node, the node can (i.e. the record deposits card transaction and is packed into module to be written and is broadcast on suitable opportunity When each node) execute the record deposit card transaction, i.e., the shopping story is recorded into the corresponding record storage address of target user.It is aobvious So, target user carries out a plurality of shopping record caused by repeatedly shopping with being stored into the corresponding record storage of target user Location.Therefore, above-mentioned record deposits card transaction, be exactly implementing result be the information trading that stores in one storage address of update.
S102: each transaction is read from the block to be written, and by each action organisation at N number of transaction queue.
In the prior art, each node generallys use the transaction executive mode of serialization to execute the block to be written In each transaction.As shown in Fig. 2, the transaction executive mode of so-called serialization, refer to each node according to certain sequence on the offensive, Each transaction in the block to be written is executed one by one.
And in this specification embodiment, each transaction in the block to be written can be split as N group, wherein N is big In 1 natural number.Then, for each group, the transaction in this group is arranged in a transaction queue.This specification is to each Putting in order for trading in transaction queue is not specifically limited.
S104: while it being directed to each transaction queue, by successively executing each transaction in the transaction queue after arriving first.
In step S104, actually start simultaneously at parallelization carries out transaction execution for each transaction queue.And Specific to each transaction queue, actually serialization executes each transaction in the transaction queue.As shown in Figure 3.
So-called " simultaneously " refers to that node started to execute the transaction in each transaction queue in the same time.It is equivalent to node N number of transaction executive process is founded in the same time, each transaction process is responsible for executing the transaction in a transaction queue.
Two kinds of transaction executive modes of comparison diagram 2 and Fig. 3, it is clear that use transaction executive mode shown in Fig. 3, Ke Yi More transaction are executed in unit time.
S106: block chain is written into the block to be written.
In this specification embodiment, for each node, step S106 can be executed after executing step S104; Step S106 can not also be just executed after executing step S104.
The method for executing the transaction of block chain by parallelization shown in FIG. 1, if each transaction in block to be written is all It is not the transaction being updated to the information stored in more than one storage address, then, each node in block chain network Each action organisation in block can be written into at least two transaction queues, then, start simultaneously at and execute each transaction team Transaction in column.In this way, each node can execute greater number of transaction within the unit time, improves transaction and execute effect Rate.
In addition, in this specification embodiment, the corresponding number of transaction of each transaction queue is (in i.e. each transaction queue The quantity of transaction) it can be relatively.In this way, when carrying out transaction execution for each transaction queue while parallelization, each The quantity of transaction performed by executive process is not in that the process having is left unused relatively, the feelings of some process overloads Condition.This also means that node can execute transaction as much as possible within the unit time.
Specifically, the variance being calculated based on the corresponding number of transaction of each transaction queue can be set no more than specified Threshold value.The variance being calculated based on the corresponding number of transaction of each transaction queue is smaller, the corresponding number of deals of each transaction queue Amount is just closer.
In addition, can specifically use ether mill protocol construction block chain network in this specification embodiment.In ether mill In, virtual machine program is installed on each node, for providing running environment for the realization of ether mill agreement.
In general, a virtual machine program is for executing a block chain process.And in this specification embodiment, due to needing It to be directed to more than one transaction queue simultaneously, the execution more than one block chain process of parallelization, therefore, it is necessary in each node Upper deployment more than one virtual machine program in advance.
Specifically, it is written into the action organisation in block if necessary into N number of transaction queue, then, it is necessary in advance N number of virtual machine program is disposed on each node.
In this way, can establish between the N number of virtual machine program and N number of transaction queue disposed in advance in step S104 One-to-one relationship;Be directed to each transaction queue simultaneously, by the corresponding virtual machine program of the transaction queue, by after arriving first successively Execute each transaction in the transaction queue.
In addition, in this specification embodiment, in general, the existing first kind transaction of transaction in block to be written, also there is the The transaction of two classes.Wherein, first kind transaction refers to that implementing result is to update the transaction of the information stored in a storage address;The The transaction of two classes refers to that implementing result is the transaction founded a storage address and be stored in information.
Obviously, there may be the trade fairs of the more than one first kind to storing in the same storage address in block to be written Information is updated.And node generally requires first to access currently performed first kind friendship when executing the transaction of each first kind Easily targeted storage address.In this case, node is when executing the transaction in block to be written, if can be to same storage The corresponding all first kind transaction in address, which concentrate, to be executed in batches, then only needing to carry out for the same storage address primary Access, this can be obviously improved the speed that node executes transaction.
Specifically, in step s 102, implementing result can be selected from each transaction to update in a storage address The transaction of the information of storage is traded as the first kind, and, by other transaction conducts in each transaction in addition to first kind transaction The transaction of second class;By in the transaction of each first kind, the identical first kind action organisation of corresponding storage address is at a sub- team of transaction Column;With each transaction subqueue for a processing unit, also, a processing unit is considered as with the transaction of each second class;It will be each Unit organization is handled into N number of transaction queue.
In this way, whole first kind transaction corresponding to any storage address can all be integrated one in the block to be written A transaction subqueue, the transaction subqueue can be integrally put into some transaction queue.Node for the transaction queue into When row transaction executes, once accessing the storage address, the corresponding whole first kind transaction of the storage address will be continuously performed.
Further, each processing unit organization can be such that at N number of transaction queue
It is descending that each processing unit is ranked up according to the corresponding number of transaction of each processing unit;Also, it is initial Changing the corresponding number of transaction of each transaction queue is 0;According to ranking results, first processing unit is selected;By what is currently selected Processing unit is added to the tail of the queue of minimum transaction queue, and updates the corresponding number of transaction of the minimum transaction queue;Minimum is handed over Easy queue is the current corresponding the smallest transaction queue of number of transaction;Continue to select next processing unit, until all processing Unit is added to transaction queue.
In this way, the corresponding number of transaction of each transaction queue can be made about the same.In this way, being based on When the transaction that each transaction queue carries out parallelization executes, the workload on each executive process is also about the same, does not have some The idle situation of executive process occurs, and can execute most transaction within the unit time in this way, be obviously improved the transaction of node Execution efficiency.
Based on method shown in FIG. 1, this specification embodiment is also corresponding to provide a kind of parallelization execution block chain transaction Device, described device be block chain network in any node, as shown in figure 4, described device includes:
Module 401 is obtained, block to be written is obtained;For each transaction in the block to be written, which is held Row result is to found a storage address and be stored in information, or update the information stored in a storage address;
Molded tissue block 402 reads each transaction from the block to be written, and by each action organisation at N number of transaction queue; N is greater than 1;
Execution module 403, while it being directed to each transaction queue, by successively executing each friendship in the transaction queue after arriving first Easily;
Block chain is written in the block to be written by writing module 404.
It is not more than specified threshold based on the variance that the corresponding number of transaction of each transaction queue is calculated.
N number of virtual machine program is deployed in described device in advance;
The execution module 403 establishes a pair between the N number of virtual machine program and N number of transaction queue disposed in advance It should be related to;It is directed to each transaction queue simultaneously, it, should by successively being executed after arriving first by the corresponding virtual machine program of the transaction queue Each transaction in transaction queue.
The molded tissue block 402 is to update the letter stored in a storage address from implementing result is selected in each transaction The transaction of breath is traded as the first kind, and, other transaction in each transaction in addition to first kind transaction are handed over as the second class Easily;By in the transaction of each first kind, the identical first kind action organisation of corresponding storage address is at a transaction subqueue;With each Transaction subqueue is a processing unit, also, is considered as a processing unit with the transaction of each second class;By each processing unit group It is made into N number of transaction queue.
The molded tissue block 402, according to the corresponding number of transaction of each processing unit, it is descending to each processing unit into Row sequence;Also, initializing the corresponding number of transaction of each transaction queue is 0;According to ranking results, select first processing single Position;The processing unit currently selected is added to the tail of the queue of minimum transaction queue, and it is corresponding to update the minimum transaction queue Number of transaction, the minimum transaction queue are the current corresponding the smallest transaction queues of number of transaction;Continue to select next place Unit is managed, until all processing units are added to transaction queue.
Based on method shown in FIG. 1, this specification embodiment is also corresponding to provide a kind of parallelization execution block chain transaction System, as shown in figure 5, including the block chain network being made of multiple nodes;
Any node in the block chain network, obtains block to be written;Each friendship is read from the block to be written Easily, and by each action organisation at N number of transaction queue;N is greater than 1;It is directed to each transaction queue simultaneously, it should by successively being executed after arriving first Each transaction in transaction queue;Block chain is written into the block to be written;
Wherein, for each transaction in the block to be written, the implementing result of the transaction is to found a storage ground Location is simultaneously stored in information, or updates the information stored in a storage address.
This specification embodiment also provides a kind of computer equipment, includes at least memory, processor and is stored in On reservoir and the computer program that can run on a processor, wherein processor realizes method shown in Fig. 1 when executing described program Function.
Fig. 6 shows one kind provided by this specification embodiment and more specifically calculates device hardware structural schematic diagram, The equipment may include: processor 1010, memory 1020, input/output interface 1030, communication interface 1040 and bus 1050.Wherein processor 1010, memory 1020, input/output interface 1030 and communication interface 1040 are real by bus 1050 The now communication connection inside equipment each other.
Processor 1010 can use general CPU (Central Processing Unit, central processing unit), micro- place Reason device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one Or the modes such as multiple integrated circuits are realized, for executing relative program, to realize technical side provided by this specification embodiment Case.
Memory 1020 can use ROM (Read Only Memory, read-only memory), RAM (Random Access Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 1020 can store Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware When, relevant program code is stored in memory 1020, and execution is called by processor 1010.
Input/output interface 1030 is for connecting input/output module, to realize information input and output.Input and output/ Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display, Loudspeaker, vibrator, indicator light etc..
Communication interface 1040 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly (such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 1050 include an access, equipment various components (such as processor 1010, memory 1020, input/it is defeated Outgoing interface 1030 and communication interface 1040) between transmit information.
It should be noted that although above equipment illustrates only processor 1010, memory 1020, input/output interface 1030, communication interface 1040 and bus 1050, but in the specific implementation process, which can also include realizing normal fortune Other assemblies necessary to row.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising real in above equipment Component necessary to existing this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey The function of method shown in Fig. 1 is realized when sequence is executed by processor.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitorymedia), such as the data-signal and carrier wave of modulation.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words, The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment Method described in certain parts of a embodiment or embodiment.
System, method, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment The combination of any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device and For apparatus embodiments, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to method The part of embodiment illustrates.Embodiment of the method described above is only schematical, wherein described be used as separation unit The module that part illustrates may or may not be physically separated, can be when implementing this specification example scheme The function of each module is realized in the same or multiple software and or hardware.It can also select according to the actual needs therein Some or all of the modules achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not making the creative labor In the case where, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.

Claims (12)

1. a kind of method that parallelization executes the transaction of block chain, comprising:
For each node in block chain network, which obtains block to be written;For every in the block to be written The implementing result of a transaction, the transaction is to found a storage address and be stored in information, or update and store in a storage address Information;
Each transaction is read from the block to be written, and by each action organisation at N number of transaction queue;N is greater than 1;
It is directed to each transaction queue simultaneously, by successively executing each transaction in the transaction queue after arriving first;
Block chain is written into the block to be written.
2. the method as described in claim 1, the variance being calculated based on the corresponding number of transaction of each transaction queue is little In specified threshold.
3. it is method according to claim 1 or 2, for each node in block chain network, it is deployed with N in advance on the node A virtual machine program;
It is directed to each transaction queue simultaneously, by successively executing each transaction in the transaction queue after arriving first, specifically includes:
Establish the one-to-one relationship between the N number of virtual machine program and N number of transaction queue disposed in advance;
It is directed to each transaction queue simultaneously, by the corresponding virtual machine program of the transaction queue, by successively executing the friendship after arriving first Each transaction in easy queue.
4. the method as described in claim 1 is specifically included by each action organisation at N number of transaction queue:
It is to update the transaction of the information stored in a storage address from implementing result is selected in each transaction, is handed over as the first kind Easily, and, other transaction in each transaction in addition to first kind transaction are traded as the second class;
By in the transaction of each first kind, the identical first kind action organisation of corresponding storage address is at a transaction subqueue;
With each transaction subqueue for a processing unit, also, a processing unit is considered as with the transaction of each second class;
By each processing unit organization at N number of transaction queue.
5. method as claimed in claim 4 is specifically included by each processing unit organization at N number of transaction queue:
It is descending that each processing unit is ranked up according to the corresponding number of transaction of each processing unit;Also, initialization is every The corresponding number of transaction of a transaction queue is 0;
According to ranking results, first processing unit is selected;
The processing unit currently selected is added to the tail of the queue of minimum transaction queue, and it is corresponding to update the minimum transaction queue Number of transaction;Minimum transaction queue is the current corresponding the smallest transaction queue of number of transaction;
Continue to select next processing unit, until all processing units are added to transaction queue.
6. a kind of parallelization executes the device of block chain transaction, described device is any node in block chain network, the dress It sets and includes:
Module is obtained, block to be written is obtained;For each transaction in the block to be written, the implementing result of the transaction To found a storage address and being stored in information, or update the information stored in a storage address;
Molded tissue block reads each transaction from the block to be written, and by each action organisation at N number of transaction queue;N is greater than 1;
Execution module, while it being directed to each transaction queue, by successively executing each transaction in the transaction queue after arriving first;
Block chain is written in the block to be written by writing module.
7. device as claimed in claim 6, the variance being calculated based on the corresponding number of transaction of each transaction queue is little In specified threshold.
8. device as claimed in claims 6 or 7, it is deployed with N number of virtual machine program in advance in described device;
The execution module establishes the one-to-one relationship between the N number of virtual machine program and N number of transaction queue disposed in advance; It is directed to each transaction queue simultaneously, by the corresponding virtual machine program of the transaction queue, by successively executing the transaction team after arriving first Each transaction in column.
9. device as claimed in claim 6, the molded tissue block are selected implementing result from each transaction and are deposited to update one The transaction of the information stored on storage address, trades as the first kind, and, by other in each transaction in addition to first kind transaction Transaction is traded as the second class;By in the transaction of each first kind, the identical first kind action organisation of corresponding storage address is at one Transaction subqueue;With each transaction subqueue for a processing unit, also, a processing list is considered as with the transaction of each second class Position;By each processing unit organization at N number of transaction queue.
10. device as claimed in claim 9, the molded tissue block, according to the corresponding number of transaction of each processing unit, by big Each processing unit is ranked up to small;Also, initializing the corresponding number of transaction of each transaction queue is 0;It is tied according to sequence Fruit selects first processing unit;The processing unit currently selected is added to the tail of the queue of minimum transaction queue, and described in update The corresponding number of transaction of minimum transaction queue, the minimum transaction queue are the current corresponding the smallest transaction teams of number of transaction Column;Continue to select next processing unit, until all processing units are added to transaction queue.
11. the system that a kind of parallelization executes the transaction of block chain, including the block chain network being made of multiple nodes;
Any node in the block chain network, obtains block to be written;Each transaction is read from the block to be written, and By each action organisation at N number of transaction queue;N is greater than 1;It is directed to each transaction queue simultaneously, by successively executing the transaction after arriving first Each transaction in queue;Block chain is written into the block to be written;
Wherein, for each transaction in the block to be written, the implementing result of the transaction is to found a storage address simultaneously It is stored in information, or updates the information stored in a storage address.
12. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, wherein the processor realizes method as claimed in any one of claims 1 to 5 when executing described program.
CN201811261883.6A 2018-10-26 2018-10-26 A kind of parallelization executes the method, apparatus and system of block chain transaction Pending CN109636384A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201811261883.6A CN109636384A (en) 2018-10-26 2018-10-26 A kind of parallelization executes the method, apparatus and system of block chain transaction
TW108109776A TWI743458B (en) 2018-10-26 2019-03-21 Method, device and system for parallel execution of blockchain transactions
PCT/CN2019/101666 WO2020082871A1 (en) 2018-10-26 2019-08-21 Method, device and system for executing blockchain transactions in parallel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811261883.6A CN109636384A (en) 2018-10-26 2018-10-26 A kind of parallelization executes the method, apparatus and system of block chain transaction

Publications (1)

Publication Number Publication Date
CN109636384A true CN109636384A (en) 2019-04-16

Family

ID=66066815

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811261883.6A Pending CN109636384A (en) 2018-10-26 2018-10-26 A kind of parallelization executes the method, apparatus and system of block chain transaction

Country Status (3)

Country Link
CN (1) CN109636384A (en)
TW (1) TWI743458B (en)
WO (1) WO2020082871A1 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110163609A (en) * 2019-05-28 2019-08-23 深圳前海微众银行股份有限公司 Data processing method and device in a kind of block chain
CN110675255A (en) * 2019-08-30 2020-01-10 阿里巴巴集团控股有限公司 Method and apparatus for concurrently executing transactions in a blockchain
CN110689344A (en) * 2019-08-30 2020-01-14 阿里巴巴集团控股有限公司 Method and apparatus for concurrently executing transactions in a blockchain
CN111047306A (en) * 2019-12-17 2020-04-21 北京菲林方德科技有限公司 Parallel transaction processing method and device for transaction input set
WO2020082871A1 (en) * 2018-10-26 2020-04-30 阿里巴巴集团控股有限公司 Method, device and system for executing blockchain transactions in parallel
CN111199483A (en) * 2019-12-31 2020-05-26 陕西医链区块链集团有限公司 Block chain transaction execution method and device, electronic equipment and storage medium
CN111292192A (en) * 2020-02-18 2020-06-16 杭州复杂美科技有限公司 Transaction parallel execution method, device and storage medium
CN111405037A (en) * 2020-03-13 2020-07-10 杭州复杂美科技有限公司 Block synchronization method, device and storage medium
CN111447269A (en) * 2020-03-25 2020-07-24 中国银行股份有限公司 Deserializing method and deserializing device for high-concurrency scenes in block chain transaction
CN111932257A (en) * 2020-08-18 2020-11-13 工银科技有限公司 Block chain parallelization processing method and device
CN113110934A (en) * 2021-04-09 2021-07-13 杭州复杂美科技有限公司 Parallel chain block generation method, computer device, and storage medium
CN113570460A (en) * 2019-08-30 2021-10-29 创新先进技术有限公司 Method and apparatus for concurrently executing transactions in a blockchain

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726875A (en) * 2020-07-08 2021-11-30 支付宝(杭州)信息技术有限公司 Transaction processing method and device based on block chain all-in-one machine
CN112990895A (en) * 2021-03-11 2021-06-18 杭州复杂美科技有限公司 Method, equipment and storage medium for accelerating parallel execution of block chain transaction
CN112950185B (en) * 2021-03-11 2023-10-20 杭州复杂美科技有限公司 Transaction fee payment method, device and storage medium based on parallel execution
CN113077344B (en) * 2021-04-15 2023-06-30 恒生电子股份有限公司 Block chain-based transaction method, device, electronic equipment and storage medium
CN113064953B (en) * 2021-04-21 2023-08-22 湖南天河国云科技有限公司 Block chain address clustering method and device based on neighbor information aggregation
CN113656509A (en) * 2021-08-26 2021-11-16 支付宝(杭州)信息技术有限公司 Method and device for executing transaction in blockchain system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107688999A (en) * 2017-08-11 2018-02-13 杭州秘猿科技有限公司 A kind of parallel transaction based on block chain performs method
CN108269072A (en) * 2016-12-30 2018-07-10 深圳瀚德创客金融投资有限公司 For the transaction processing method and network node of block chain
CN108537543A (en) * 2018-03-30 2018-09-14 百度在线网络技术(北京)有限公司 Method for parallel processing, device, equipment and the storage medium of block chain data

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100017318A1 (en) * 2006-07-28 2010-01-21 Futurelogic, Inc. Methods and apparatus for a downloadable financial transaction printer
CN103677771B (en) * 2012-09-06 2017-01-18 阿里巴巴集团控股有限公司 Processing method and device for concurrent transactions
TWI647636B (en) * 2016-09-02 2019-01-11 現代財富控股有限公司 Load balancing system for blockchain and method thereof
CN106530083B (en) * 2016-10-27 2018-06-29 深圳壹账通智能科技有限公司 Multichain management method and system based on block chain
CN106611061B (en) * 2016-12-29 2018-02-23 北京众享比特科技有限公司 Database write-in method and system based on block chain network
CN106843774B (en) * 2017-02-24 2017-12-26 合肥工业大学 A kind of mass-rent construction method of the intelligent contract based on block chain
CN108512775A (en) * 2018-04-16 2018-09-07 杭州秘猿科技有限公司 A kind of method and device of sequence transaction queue
CN108564470B (en) * 2018-04-17 2021-09-28 北京天德科技有限公司 Transaction distribution method for parallel building blocks in block chain
CN109636384A (en) * 2018-10-26 2019-04-16 阿里巴巴集团控股有限公司 A kind of parallelization executes the method, apparatus and system of block chain transaction

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108269072A (en) * 2016-12-30 2018-07-10 深圳瀚德创客金融投资有限公司 For the transaction processing method and network node of block chain
CN107688999A (en) * 2017-08-11 2018-02-13 杭州秘猿科技有限公司 A kind of parallel transaction based on block chain performs method
CN108537543A (en) * 2018-03-30 2018-09-14 百度在线网络技术(北京)有限公司 Method for parallel processing, device, equipment and the storage medium of block chain data

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020082871A1 (en) * 2018-10-26 2020-04-30 阿里巴巴集团控股有限公司 Method, device and system for executing blockchain transactions in parallel
CN110163609B (en) * 2019-05-28 2024-02-27 深圳前海微众银行股份有限公司 Method and device for processing data in block chain
CN110163609A (en) * 2019-05-28 2019-08-23 深圳前海微众银行股份有限公司 Data processing method and device in a kind of block chain
WO2020238429A1 (en) * 2019-05-28 2020-12-03 深圳前海微众银行股份有限公司 Method and device for processing data in blockchain
CN110689344B (en) * 2019-08-30 2021-04-09 创新先进技术有限公司 Method and apparatus for concurrently executing transactions in a blockchain
CN113139873A (en) * 2019-08-30 2021-07-20 创新先进技术有限公司 Method and apparatus for concurrently executing transactions in a blockchain
CN110675255A (en) * 2019-08-30 2020-01-10 阿里巴巴集团控股有限公司 Method and apparatus for concurrently executing transactions in a blockchain
CN113570460A (en) * 2019-08-30 2021-10-29 创新先进技术有限公司 Method and apparatus for concurrently executing transactions in a blockchain
CN110689344A (en) * 2019-08-30 2020-01-14 阿里巴巴集团控股有限公司 Method and apparatus for concurrently executing transactions in a blockchain
CN110675255B (en) * 2019-08-30 2021-04-02 创新先进技术有限公司 Method and apparatus for concurrently executing transactions in a blockchain
CN111047306A (en) * 2019-12-17 2020-04-21 北京菲林方德科技有限公司 Parallel transaction processing method and device for transaction input set
CN111199483A (en) * 2019-12-31 2020-05-26 陕西医链区块链集团有限公司 Block chain transaction execution method and device, electronic equipment and storage medium
CN111292192A (en) * 2020-02-18 2020-06-16 杭州复杂美科技有限公司 Transaction parallel execution method, device and storage medium
CN111405037A (en) * 2020-03-13 2020-07-10 杭州复杂美科技有限公司 Block synchronization method, device and storage medium
CN111447269A (en) * 2020-03-25 2020-07-24 中国银行股份有限公司 Deserializing method and deserializing device for high-concurrency scenes in block chain transaction
CN111932257A (en) * 2020-08-18 2020-11-13 工银科技有限公司 Block chain parallelization processing method and device
CN111932257B (en) * 2020-08-18 2023-10-24 中国工商银行股份有限公司 Block chain parallelization processing method and device
CN113110934A (en) * 2021-04-09 2021-07-13 杭州复杂美科技有限公司 Parallel chain block generation method, computer device, and storage medium

Also Published As

Publication number Publication date
TW202016815A (en) 2020-05-01
WO2020082871A1 (en) 2020-04-30
TWI743458B (en) 2021-10-21

Similar Documents

Publication Publication Date Title
CN109636384A (en) A kind of parallelization executes the method, apparatus and system of block chain transaction
US9129052B2 (en) Metering resource usage in a cloud computing environment
CN106209402B (en) A kind of telescopic method and equipment of virtual network function
CN100428168C (en) Method, system and program product for capturing central processing unit (CPU) utilization for a virtual machine
US11128437B1 (en) Distributed ledger for peer-to-peer cloud resource sharing
CN109242453A (en) A kind of method of commerce and system for depositing card based on centralization clearing and block chain
CN109242483A (en) A kind of dual trading method and system based on centralization and decentralization
CN109272385A (en) It is a kind of based on block chain copyright issue agency deposit card method and system
CN108667867A (en) Date storage method and device
CN110032599A (en) The reading of data structure and update method, device, electronic equipment
AU2017101623A4 (en) Methods and Systems for providing a platform for Code-Free Blockchain Application and Smart Contract Development
CN108765159A (en) A kind of cochain based on block chain and condition processing method, device and interacted system
CN109636597A (en) A kind of property execution method and system based on block chain
CN110069346A (en) Resource share method, device, electronic equipment between multi-process
CN109345392A (en) Program topic publication, the publication of answer code, answer code check method and system
CN110020846A (en) A kind of transferred account service processing method and system
CN105956422B (en) For controlling the method and system of the software program on mobile computing device used
CN109284990A (en) A kind of amount balance system and method
CN108259195A (en) The determining method and system of the coverage of anomalous event
CN109615379A (en) One kind refusing to pay processing system generation method and device
CN114331435A (en) Task crowdsourcing method and device based on block chain
CN110347645A (en) A kind of electronic document deposits card method and device
CN109345252A (en) A kind of online trading control method, device and computer equipment
CN109271438A (en) A kind of data bank access method and its system
CN108880896A (en) A kind of program gray scale dissemination method and device based on mainframe

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

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190416