CN109559226A - Block chain transaction execution method, system and electronic equipment and storage medium - Google Patents

Block chain transaction execution method, system and electronic equipment and storage medium Download PDF

Info

Publication number
CN109559226A
CN109559226A CN201811437041.1A CN201811437041A CN109559226A CN 109559226 A CN109559226 A CN 109559226A CN 201811437041 A CN201811437041 A CN 201811437041A CN 109559226 A CN109559226 A CN 109559226A
Authority
CN
China
Prior art keywords
transaction
group
trading group
address
trading
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.)
Granted
Application number
CN201811437041.1A
Other languages
Chinese (zh)
Other versions
CN109559226B (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.)
Hangzhou Shield Network Technology Co Ltd
Original Assignee
Hangzhou Shield Network Technology 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 Hangzhou Shield Network Technology Co Ltd filed Critical Hangzhou Shield Network Technology Co Ltd
Priority to CN201811437041.1A priority Critical patent/CN109559226B/en
Publication of CN109559226A publication Critical patent/CN109559226A/en
Application granted granted Critical
Publication of CN109559226B publication Critical patent/CN109559226B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • 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
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses

Abstract

This application discloses a kind of block chain transaction execution methods, system and a kind of electronic equipment and medium, it include: that preliminary collision detection is carried out to the transaction address of target transactions all in current block and is grouped, obtain the trading group not conflicted mutually, and executive process is issued to as unit of group, to obtain the implementing result obtained after executive process executes transaction, depth conflict detection is carried out according to practical read/write address of the implementing result to each transaction and is grouped, judge whether the transaction in group result in each grouping is same group in current practical execution grouping, if not, the grouping different from current practical execution grouping is then issued to executive process to re-execute, circulation is until there is no until conflict between trading group.That is, the transaction not conflicted mutually is carried out parallel execution processing by the present invention, the parallel processing of transaction is realized on the basis of guaranteeing that transaction implementing result is correct, the performance of block chain is improved, can better meet practical commercialization demand.

Description

Block chain transaction execution method, system and electronic equipment and storage medium
Technical field
The present invention relates to block chain technical field, in particular to a kind of block chain transaction execution method, system and a kind of electricity Sub- equipment and storage medium.
Background technique
Block chain all has corresponding application value in many business scenarios, such as deposits card.But area is restricted in the prior art The extensive commercial one of problem of block chain is exactly that performance is poor, for example ether mill probably handles 30 in one second, and bit coin is big General 8, this performance is difficult to meet performance requirement in practical application scene.And in block chain, transaction is all to have sequence And it must execute in sequence, lead to degraded performance.In consideration of it, how to solve the above problems is that those skilled in the art need It to be paid close attention to.
Summary of the invention
In view of this, the purpose of the present invention is to provide a kind of block chain transaction execution method, system and a kind of electronics to set Standby and storage medium.Its concrete scheme is as follows:
In a first aspect, the invention discloses a kind of block chain transaction execution methods, comprising:
All target transactions in current block are obtained, preliminary collision detection is carried out to the address of all target transactions; Wherein, the address includes sender address and recipient address;
All target transactions are divided according to the result of the preliminary collision detection, the first kind not conflicted mutually is obtained and hands over Easy group, and using the first kind trading group as pending trading group;
The pending trading group is issued to executive process, and obtains the executive process to the pending trading group Handle obtained implementing result;
Depth punching is carried out using practical read/write address of the implementing result to All Activity in the pending trading group Prominent detection, and All Activity in the pending trading group is divided according to the result that the depth conflict detects, it obtains The the second class trading group not conflicted mutually;
Judge whether the transaction in each grouping of the second class trading group is same group in the first kind trading group; If it is same group, the implementing result is written in the current block, transaction, which executes, to be terminated;If it is different groups, Using trading group different from the first kind trading group in the second class trading group as the pending trading group, and return The step of pending trading group is issued to executive process.
It is optionally, described that all target transactions are divided according to the result of the preliminary collision detection, comprising:
According to the preliminary collision detection as a result, the identical target transaction in address in transaction is merged into same point Group.
Optionally, described that all target transactions are divided according to the result of the preliminary collision detection, it obtains not rushing mutually After prominent first kind trading group, further includes:
It adds and identifies for trading group each in the first kind trading group.
Optionally, described to be carried out using practical read/write address of the implementing result to All Activity in trading group after execution Depth conflict detection, comprising:
Judge after the execution in trading group in the practical read/write address of All Activity with the presence or absence of common address;
If it is not, then being judged to not conflicting;
If it is, judging the type of the common address;
If the common address is the read address of two transaction, it is judged to not conflicting;
If the common address be two transaction write addresses or the common address be one transaction read address, separately The write address of one transaction, then be judged to conflicting.
Second aspect, the invention discloses a kind of block chain transaction execution systems, comprising:
Preliminary detection module, for obtaining all target transactions in current block, to the address of all target transactions Carry out preliminary collision detection;Wherein, the address includes sender address and recipient address;
First grouping module divides all target transactions according to the result of the preliminary collision detection, obtains mutually not The first kind trading group of conflict, and using the first kind trading group as pending trading group;
Transaction execution module for the pending trading group to be issued to executive process, and obtains the executive process The implementing result that the pending trading group is handled;
Second packet module, for the practical reading using the implementing result to All Activity in the pending trading group Write address carries out depth conflict detection, and according to the result of depth conflict detection to all friendships in the pending trading group It is easily divided, obtains the second class trading group not conflicted mutually;
Judgment module, for judging the transaction in each grouping of the second class trading group in the first kind trading group It whether is same group;Module is repeated, for if it is same group, the current block to be written in the implementing result In, transaction, which executes, to be terminated;If it is different groups, by friendship different from the first kind trading group in the second class trading group Easily group is used as the pending trading group, and starts the workflow of the transaction execution module.
Optionally, first grouping module, comprising:
According to the preliminary collision detection as a result, the identical target transaction in address in transaction is merged into same point Group.
Optionally, further includes:
Mark module is each in the first kind trading group after obtaining the mutual first kind trading group not conflicted Trading group addition mark.
Optionally, the second packet module, comprising:
First judging unit is in the practical read/write address of All Activity in trading group after the execution for judging It is no that there are common address;
First judging unit, for if there is no common address, then being judged to not conflicting;
Second judgment unit, for if there is common address, then judging the type of the common address;
Second judging unit is judged to not conflicting if being two read addresses traded for the common address;
Third judging unit, if for the common address be two transaction write addresses or the common address be one The read address of a transaction, another write address traded, then be judged to conflicting.
The third aspect, the invention discloses a kind of electronic equipment, comprising:
Memory, for storing computer program;
Processor realizes aforementioned disclosed block chain transaction execution method when for executing the computer program.
Fourth aspect, the invention discloses a kind of computer readable storage mediums, for storing computer program, wherein The computer program realizes aforementioned disclosed block chain transaction execution method when being executed by processor.
As it can be seen that the present invention obtains all target transactions in current block, the address of all target transactions is carried out just Walk collision detection;Wherein, the address includes sender address and recipient address;According to the result of the preliminary collision detection All target transactions are divided, obtain the first kind trading group not conflicted mutually, and using the first kind trading group as wait hold Row trading group;The pending trading group is issued to executive process, and obtains the executive process to the pending transaction The implementing result that group processing obtains;To the practical read-write of All Activity in the pending trading group using the implementing result Location carry out depth conflict detection, and according to the depth conflict detection result to All Activity in the pending trading group into Row divides, and obtains the second class trading group not conflicted mutually;Judge the transaction in each grouping of the second class trading group described It whether is same group in first kind trading group;If it is same group, the implementing result is written in the current block, is handed over Easily executing terminates;If it is different groups, by trading group different from the first kind trading group in the second class trading group As the pending trading group, and return to the step of pending trading group is issued to executive process.That is, of the invention By carrying out collision detection to the address traded in block, the trading group not conflicted mutually is obtained, will further be traded to organize as list Position is issued to executive process execution, and the parallel processing of transaction is realized on the basis of guaranteeing that transaction implementing result is correct, is mentioned The performance of block chain has been risen, practical commercialization demand can be better met.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is the flow chart of block chain provided by the present invention transaction execution method;
Fig. 2 is the flow diagram of block chain provided by the present invention transaction execution method;
Fig. 3 is the schematic diagram that trading group issues in block chain provided by the present invention transaction execution method;
Fig. 4 is the flow chart of depth conflict detection process in block chain provided by the present invention transaction execution method;
Fig. 5 is the structural block diagram of block chain transaction execution system provided by the present invention;
Fig. 6 is the hardware structure diagram of electronic equipment provided by the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The extensive commercial one of problem of block chain is restricted in the prior art and is exactly that performance is poor, such as ether mill one Second probably processing 30, general 8, bit coin, this performance is difficult to meet performance requirement in practical application scene.And In block chain, transaction all has sequence and must execute in sequence, leads to degraded performance.
It trades execution method the embodiment of the invention discloses a kind of block chain, referring to shown in Fig. 1, Fig. 2, method includes:
Step S101: obtaining all target transactions in current block, carries out to the address of all target transactions preliminary Collision detection;Wherein, the address includes sender address and recipient address;
In the present embodiment, all target transactions in current block are obtained, and with detecting the transmission that all target transactions are related to Location and reception address whether there is common address.If it exists, then it is judged to conflicting, it is on the contrary then do not conflict.
Step S102: all target transactions are divided according to the result of the preliminary collision detection, obtain not conflicting mutually First kind trading group, and using the first kind trading group as pending trading group;
Further, the present embodiment is according to preliminary collision detection as a result, by being related to jointly in all target transactions Same grouping is merged into the transaction of location.
Specifically, if any address is identical in two transaction, two transaction is merged, multiple trading groups are obtained.If two Two trading groups are then merged into a trading group by least one common address in a trading group, until any two group it Between all there is no until the common address of conflict, obtain the corresponding first kind trading group of preliminary collision detection result, and will be described First kind trading group is as pending trading group.
Step S103: being issued to executive process for the pending trading group, and obtain the executive process to it is described to Execute the implementing result that trading group is handled;
Referring to Fig. 3, pending trading group is issued to different executive process using scheduler module and carried out simultaneously by the present embodiment Hair executes, and obtains the corresponding implementing result of pending trading group after handling by executive process.
Step S104: using the implementing result to the practical read/write address of All Activity in the pending trading group into The detection of row depth conflict, and All Activity in the pending trading group is drawn according to the result that the depth conflict detects Point, obtain the second class trading group not conflicted mutually;
It should be noted that the present embodiment utilizes implementing result, it is further practical to All Activity in pending trading group The read/write address being related to carries out depth conflict detection and is grouped to transaction, obtains the second class that read/write address does not conflict mutually and hands over Easy group.
Step S105: judge the transaction in each grouping of the second class trading group in the first kind trading group whether It is same group;
In the present embodiment, is carried out after being grouped again using implementing result, the second obtained class trading group and the first kind are handed over The group result easily organized compares, and checks after the address being actually related to is grouped and is formed by new grouping, judgement is new to divide Whether each transaction in group is same group in current practical execution grouping.
It can also be described the it is understood that the present embodiment is after obtaining the mutually first kind trading group that does not conflict Each trading group addition mark in a kind of trading group.Correspondingly, when the pending trading group is issued to executive process, it can benefit It is issued with mark, and after obtaining the second class trading group, realizes the differentiation to each trading group using mark.
Step S106: if it is same group, the implementing result is written in the current block, transaction executes knot Beam;If it is different groups, using trading group different from the first kind trading group in the second class trading group as described in Pending trading group, and return to the step of pending trading group is issued to executive process.
In the present embodiment, if the transaction in each grouping of the second class trading group is same in the first kind trading group It one group, indicates without there is new conflict, block is written in implementing result at this time, and current block transaction is finished;If not Same group, there is shown showed new conflict, then will need combined transaction point in the second class trading group that depth conflict detects Group, the i.e. trading group different from first kind trading group are issued to executive process as the pending trading group that needs re-execute, Re-executed without all trading groups, only need to execute this discovery there are the trading groups of conflict.
For example, if finding group i in trading group group 1, group 2......group N in the second class trading group There is conflict with group j, then group i and group j merging are handed down to executive process again and executed.This, which is executed, only needs to hold Row has group i and group the j trading group of conflict, does not need to execute other trading groups, to promote execution performance.
It should be pointed out that the present embodiment successive ignition detection address is with the presence or absence of the reason of conflict, new grouping Execution may be related to the reading of new address, and these addresses may be before temporarily without wherein one in conflict grouping A address, it is possible to will lead to and generate new conflict.For strict guarantee transaction must successively execute in sequence, so need into Row successive ignition collision detection, to guarantee the accuracy of transaction results.
As it can be seen that the present invention obtains all target transactions in current block, the address of all target transactions is carried out just Walk collision detection;Wherein, the address includes sender address and recipient address;According to the result of the preliminary collision detection All target transactions are divided, obtain the first kind trading group not conflicted mutually, and using the first kind trading group as wait hold Row trading group;The pending trading group is issued to executive process, and obtains the executive process to the pending transaction The implementing result that group processing obtains;To the practical read-write of All Activity in the pending trading group using the implementing result Location carry out depth conflict detection, and according to the depth conflict detection result to All Activity in the pending trading group into Row divides, and obtains the second class trading group not conflicted mutually;Transaction in each grouping of second class trading group is described first It whether is same group in class trading group;If it is same group, the implementing result is written in the current block, transaction is held Row terminates;If it is different groups, using trading group different from the first kind trading group in the second class trading group as The pending trading group, and return to the step of pending trading group is issued to executive process.That is, the present invention passes through Collision detection is carried out to the address traded in block, obtains the trading group not conflicted mutually, under further trading as unit of group It is sent to executive process execution, the parallel processing of transaction is realized on the basis of guaranteeing that transaction implementing result is correct, is improved The performance of block chain can better meet practical commercialization demand.
In a kind of specific embodiment of the transaction execution method of the block chain provided by the embodiment of the present invention, for utilization The process that implementing result carries out depth conflict detection to the practical read/write address of All Activity is further elaborated, such as Fig. 4 institute Show, comprising:
Step S201: judge after the execution in trading group in the practical read/write address of All Activity with the presence or absence of altogether Same address;
Step S202: if it is not, then being judged to not conflicting;
Step S203: if it is, judging the type of the common address;
Step S204: if the common address is the read address of two transaction, it is judged to not conflicting;
Step S205: if the common address is the write address of two transaction or the common address is a transaction Read address, another write address traded, then be judged to conflicting.
In the present embodiment, after obtaining implementing result, since the reading of new address may be related to, need to carry out into One step collision detection.Specifically, judge to whether there is common address in the practical read/write address of All Activity, herein depth The All Activity that collision detection is related to does not detect the trading group of entry/exit conflicts before including, that is, depth conflict detection is for current The All Activity that transaction has been executed before including in block is detected.
For example, if finding group i in trading group group 1, group 2......group N in the second class trading group There is conflict with group j, then group i and group j merging are handed down to executive process again and executed.It executes after returning, to institute Having trading group includes that other trading groups after group i and group j are removed in group 1, group 2......group N, And this group for having executed group ij carries out depth conflict detection.Assuming that group ij and group k conflict, further will Group ij and group k merge, and re-execute.
It is understood that further judging the type of common address if being related to common address.If common address is The read address of two transaction does not influence the execution of transaction then, and there is no conflicts;If common address is the write address of two transaction, Or be a read address traded, the write address of another transaction, then the implementing result of transaction may be influenced, punching is determined to have It is prominent.
Block chain transaction execution system provided in an embodiment of the present invention is introduced below, block chain described below is handed over Easy execution system can correspond to each other reference with above-described block chain transaction execution method.
Fig. 5 is the structural block diagram of block chain transaction execution system provided by the embodiment of the present invention, referring to Figure 5, area Block chain transaction execution system includes:
Preliminary detection module 100, for obtaining all target transactions in current block, to the ground of all target transactions Location carries out preliminary collision detection;Wherein, the address includes sender address and recipient address;
First grouping module 200 divides all target transactions according to the result of the preliminary collision detection, obtains mutually The first kind trading group not conflicted, and using the first kind trading group as pending trading group;
Transaction execution module 300, for the pending trading group to be issued to executive process, and obtain it is described execute into The implementing result that journey handles the pending trading group;
Second packet module 400, for the reality using the implementing result to All Activity in the pending trading group Border read/write address carries out depth conflict detection, and according to the result of depth conflict detection to institute in the pending trading group There is transaction to be divided, obtains the second class trading group not conflicted mutually;
Judgment module 500, for the transaction in each grouping of the second class trading group in the first kind trading group It whether is same group;
Module 600 is repeated, for if it is same group, the implementing result to be written in the current block, Transaction, which executes, to be terminated;If it is different groups, by transaction different from the first kind trading group in the second class trading group Group is used as the pending trading group, and starts the workflow of the transaction execution module.
Specifically, first grouping module, comprising:
According to the preliminary collision detection as a result, the identical target transaction in address in transaction is merged into same point Group.
It further, can also include: mark module, after the first kind trading group for obtaining not conflicting mutually, for institute State each trading group addition mark in first kind trading group.
It is understood that second packet module described in the present embodiment may include:
First judging unit is in the practical read/write address of All Activity in trading group after the execution for judging It is no that there are common address;
First judging unit, for if there is no common address, then being judged to not conflicting;
Second judgment unit, for if there is common address, then judging the type of the common address;
Second judging unit is judged to not conflicting if being two read addresses traded for the common address;
Third judging unit, if for the common address be two transaction write addresses or the common address be one The read address of a transaction, another write address traded, then be judged to conflicting.
Further, the embodiment of the invention discloses a kind of electronic equipment, which includes memory 11 and processing Device 12, wherein the memory 11 is for storing computer program, and the processor 12 is for when executing the computer program Realize aforementioned disclosed block chain transaction execution method.
Further, shown in Figure 6, the electronic equipment in the present embodiment can also include:
Input interface 13, for obtaining the computer program of extraneous importing, and the computer program that will acquire save to In the memory 11, it can be also used for the various instructions and parameter that obtain extraneous terminal device transmission, and be transmitted to processor In 12, so that processor 12 is handled accordingly using above-mentioned various instructions and parametric evolving.In the present embodiment, the input interface 13, which can specifically include but be not limited to USB interface, serial line interface, speech input interface, fingerprint input interface, hard disk, reads interface Deng.
Output interface 14, the various data for generating processor 12 are exported to coupled terminal device, so as to The various data of the generation of processor 12 can be got in other terminal devices being connected with output interface 14.In the present embodiment, The output interface 14 can specifically include but be not limited to USB interface, serial line interface etc..
Display unit 15, the data for sending over to processor 12 are shown.
Communication unit 16 is used to establish telecommunication connection between external server, obtains the number that extraneous terminal is sent According to being then forwarded to processor 12 and carry out processing analysis, in addition, processor 12 can also lead to the various results obtained after processing It crosses communication unit 16 and is sent to preset various data receivers.In the present embodiment, communication used by above-mentioned communication unit 16 Technology can be cable communicating technology or wireless communication technique, as universal serial bus (USB), adopting wireless fidelity technology (WiFi), Bluetooth Communication Technology, low-power consumption bluetooth communication technology (BLE) etc..In addition, communication unit 16 specifically can be more according to wideband code division Location (W-CDMA), long term evolution (LTE) and the cellular radio transceiver similar to standard operation.
Further, the embodiment of the invention discloses a kind of computer readable storage medium, which may include: USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), the various media that can store program code such as magnetic or disk.Computer is stored on the storage medium Program, the computer program realizes aforementioned disclosed block chain transaction execution method when being executed by processor, about this method Specific steps can no longer be repeated herein with reference to corresponding contents disclosed in previous embodiment.
The present invention obtains the trading group not conflicted mutually, further by carrying out collision detection to the address traded in block Transaction is issued to executive process to execute as unit of group, realizes transaction on the basis of guaranteeing that transaction implementing result is correct Parallel processing, improve the performance of block chain, practical commercialization demand can be better met.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with it is other The difference of embodiment, same or similar part may refer to each other between each embodiment.For being filled disclosed in embodiment For setting, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part Explanation.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered Think beyond the scope of this invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In any other form of storage medium well known in field.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.
Above to block chain provided by the present invention transaction execution method, system and a kind of electronic equipment and storage medium into It has gone and has been discussed in detail, used herein a specific example illustrates the principle and implementation of the invention, the above implementation The explanation of example is merely used to help understand method and its core concept of the invention;Meanwhile for the general technology people of this field Member, according to the thought of the present invention, there will be changes in the specific implementation manner and application range, in conclusion this explanation Book content should not be construed as limiting the invention.

Claims (10)

  1. A kind of execution method 1. block chain is traded characterized by comprising
    All target transactions in current block are obtained, preliminary collision detection is carried out to the address of all target transactions;Wherein, The address includes sender address and recipient address;
    All target transactions are divided according to the result of the preliminary collision detection, obtain the first kind not conflicted mutually transaction Group, and using the first kind trading group as pending trading group;
    The pending trading group is issued to executive process, and obtains the executive process and the pending trading group is handled Obtained implementing result;
    Depth conflict inspection is carried out using practical read/write address of the implementing result to All Activity in the pending trading group It surveys, and All Activity in the pending trading group is divided according to the result that the depth conflict detects, obtain mutually not Second class trading group of conflict;
    Judge whether the transaction in each grouping of the second class trading group is same group in the first kind trading group;If It is same group, then the implementing result is written in the current block, transaction, which executes, is terminated;If it is different groups, by institute Trading group different from the first kind trading group in the second class trading group is stated as the pending trading group, and is returned institute State the step of pending trading group is issued to executive process.
  2. The execution method 2. block chain according to claim 1 is traded, which is characterized in that described to be examined according to the preliminary conflict The result of survey divides all target transactions, comprising:
    According to the preliminary collision detection as a result, the identical target transaction in address in transaction is merged into same grouping.
  3. The execution method 3. block chain according to claim 1 is traded, which is characterized in that described to be examined according to the preliminary conflict The result of survey divides all target transactions, after obtaining the first kind trading group not conflicted mutually, further includes:
    It adds and identifies for trading group each in the first kind trading group.
  4. The execution method 4. block chain according to any one of claims 1 to 3 is traded, which is characterized in that described in the utilization Implementing result carries out depth conflict detection to the practical read/write address of All Activity in trading group after execution, comprising:
    Judge after the execution in trading group in the practical read/write address of All Activity with the presence or absence of common address;
    If it is not, then being judged to not conflicting;
    If it is, judging the type of the common address;
    If the common address is the read address of two transaction, it is judged to not conflicting;
    If the common address be two transaction write addresses or the common address be one trade read address, another The write address of transaction is then judged to conflicting.
  5. 5. a kind of block chain transaction execution system characterized by comprising
    Preliminary detection module carries out the address of all target transactions for obtaining all target transactions in current block Preliminary collision detection;Wherein, the address includes sender address and recipient address;
    First grouping module divides all target transactions according to the result of the preliminary collision detection, obtains not conflicting mutually First kind trading group, and using the first kind trading group as pending trading group;
    Transaction execution module for the pending trading group to be issued to executive process, and obtains the executive process to institute State the implementing result that pending trading group is handled;
    Second packet module, for utilizing practical read-write of the implementing result to All Activity in the pending trading group Location carry out depth conflict detection, and according to the depth conflict detection result to All Activity in the pending trading group into Row divides, and obtains the second class trading group not conflicted mutually;
    Judgment module, for judge the transaction in each grouping of the second class trading group in the first kind trading group whether It is same group;
    Module is repeated, for if it is same group, the implementing result to be written in the current block, transaction is executed Terminate;If it is different groups, using trading group different from the first kind trading group in the second class trading group as institute Pending trading group is stated, and starts the workflow of the transaction execution module.
  6. 6. block chain transaction execution system according to claim 5, which is characterized in that first grouping module, comprising:
    According to the preliminary collision detection as a result, the identical target transaction in address in transaction is merged into same grouping.
  7. The execution method 7. block chain according to claim 5 is traded, which is characterized in that further include:
    Mark module is each transaction in the first kind trading group after obtaining the mutual first kind trading group not conflicted Group addition mark.
  8. 8. according to the described in any item block chain transaction execution systems of claim 5 to 7, which is characterized in that the second packet Module, comprising:
    First judging unit, for judging whether deposited in the practical read/write address of All Activity after the execution in trading group In common address;
    First judging unit, for if there is no common address, then being judged to not conflicting;
    Second judgment unit, for if there is common address, then judging the type of the common address;
    Second judging unit is judged to not conflicting if being two read addresses traded for the common address;
    Third judging unit, if for the common address be two transaction write addresses or the common address be one hand over The write address of easy read address, another transaction, then be judged to conflicting.
  9. 9. a kind of electronic equipment characterized by comprising
    Memory, for storing computer program;
    Processor realizes that the described in any item block chain transaction of Claims 1-4 such as are held when for executing the computer program Row method.
  10. 10. a kind of computer readable storage medium, which is characterized in that for storing computer program, wherein the computer journey It is realized when sequence is executed by processor such as the described in any item block chains transaction execution methods of Claims 1-4.
CN201811437041.1A 2018-11-28 2018-11-28 Block chain transaction execution method and system, electronic device and storage medium Active CN109559226B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811437041.1A CN109559226B (en) 2018-11-28 2018-11-28 Block chain transaction execution method and system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811437041.1A CN109559226B (en) 2018-11-28 2018-11-28 Block chain transaction execution method and system, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN109559226A true CN109559226A (en) 2019-04-02
CN109559226B CN109559226B (en) 2021-03-02

Family

ID=65867709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811437041.1A Active CN109559226B (en) 2018-11-28 2018-11-28 Block chain transaction execution method and system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN109559226B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110135985A (en) * 2019-04-04 2019-08-16 杭州抖音科技有限公司 A kind of parallel execution method and system traded on block chain
CN110706101A (en) * 2019-08-30 2020-01-17 阿里巴巴集团控股有限公司 Method and apparatus for concurrently executing transactions in a blockchain
CN111340482A (en) * 2020-02-10 2020-06-26 腾讯科技(深圳)有限公司 Conflict detection method, device, node equipment and storage medium
CN111563093A (en) * 2020-05-15 2020-08-21 电子科技大学 Detection and avoidance system and method for union block chain conflict transaction
CN112037058A (en) * 2020-08-28 2020-12-04 平安科技(深圳)有限公司 Data verification method, device and storage medium
CN112883067A (en) * 2021-04-30 2021-06-01 支付宝(杭州)信息技术有限公司 Block chain transaction execution method, block chain node and control device
CN112887437A (en) * 2021-04-28 2021-06-01 支付宝(杭州)信息技术有限公司 Block chain transaction processing method, block chain node and block chain
CN112988819A (en) * 2021-04-30 2021-06-18 支付宝(杭州)信息技术有限公司 Block chain transaction execution method, block chain node and control device
CN113064730A (en) * 2021-04-30 2021-07-02 支付宝(杭州)信息技术有限公司 Block chain transaction execution method, block chain node and control device
US11057217B2 (en) 2019-04-12 2021-07-06 Advanced New Technologies Co., Ltd. Performing parallel execution of transactions in a distributed ledger system
US11106487B2 (en) 2019-04-12 2021-08-31 Advanced New Technologies Co., Ltd. Performing parallel execution of transactions in a distributed ledger system
CN114328133A (en) * 2022-03-16 2022-04-12 北京微芯感知科技有限公司 Single-mechanism distributed conflict detection method and system and deposit separation framework
CN114546884A (en) * 2022-04-21 2022-05-27 北京微芯感知科技有限公司 Block chain batch transaction conflict detection method and system
CN115796874A (en) * 2023-01-09 2023-03-14 杭州安节科技有限公司 Operation-level block chain transaction concurrent execution method
WO2023078097A1 (en) * 2021-11-04 2023-05-11 深圳前海微众银行股份有限公司 Blockchain attack interception method and apparatus

Citations (1)

* 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

Patent Citations (1)

* 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

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ILYA SERGEY 等: "《A Concurrent Perspective on Smart Contracts》", 《ARXIV.ORG》 *
THOMAS DICKERSON 等: "《ACM》", 27 July 2017 *
戎朋: "《用分治思路解决区块链并行化交易问题》", 《HTTPS://WWW.INFOQ.CN/ARTICLE/DIVIDE-AND-CONQUER-IN-BLOCKCHAIN》 *

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110135985B (en) * 2019-04-04 2021-07-27 杭州抖音科技有限公司 Parallel execution method and system for transactions on block chain
CN110135985A (en) * 2019-04-04 2019-08-16 杭州抖音科技有限公司 A kind of parallel execution method and system traded on block chain
US11106487B2 (en) 2019-04-12 2021-08-31 Advanced New Technologies Co., Ltd. Performing parallel execution of transactions in a distributed ledger system
US11231957B2 (en) 2019-04-12 2022-01-25 Alibaba Group Holding Limited Performing parallel execution of transactions in a distributed ledger system
US11057217B2 (en) 2019-04-12 2021-07-06 Advanced New Technologies Co., Ltd. Performing parallel execution of transactions in a distributed ledger system
US11082230B2 (en) 2019-04-12 2021-08-03 Advanced New Technologies Co., Ltd. Performing parallel execution of transactions in a distributed ledger system
CN110706101B (en) * 2019-08-30 2021-06-29 创新先进技术有限公司 Method and apparatus for concurrently executing transactions in a blockchain
CN110706101A (en) * 2019-08-30 2020-01-17 阿里巴巴集团控股有限公司 Method and apparatus for concurrently executing transactions in a blockchain
CN111340482A (en) * 2020-02-10 2020-06-26 腾讯科技(深圳)有限公司 Conflict detection method, device, node equipment and storage medium
CN111563093A (en) * 2020-05-15 2020-08-21 电子科技大学 Detection and avoidance system and method for union block chain conflict transaction
CN111563093B (en) * 2020-05-15 2023-04-25 电子科技大学 Method for detecting and avoiding system based on alliance blockchain conflict transaction
CN112037058A (en) * 2020-08-28 2020-12-04 平安科技(深圳)有限公司 Data verification method, device and storage medium
CN112037058B (en) * 2020-08-28 2024-03-26 平安科技(深圳)有限公司 Data verification method, device and storage medium
CN112887437B (en) * 2021-04-28 2021-08-03 支付宝(杭州)信息技术有限公司 Block chain transaction processing method, block chain node and block chain system
CN112887437A (en) * 2021-04-28 2021-06-01 支付宝(杭州)信息技术有限公司 Block chain transaction processing method, block chain node and block chain
CN112988819B (en) * 2021-04-30 2021-08-20 支付宝(杭州)信息技术有限公司 Block chain transaction execution method, block chain node and control device
CN113064730A (en) * 2021-04-30 2021-07-02 支付宝(杭州)信息技术有限公司 Block chain transaction execution method, block chain node and control device
CN112988819A (en) * 2021-04-30 2021-06-18 支付宝(杭州)信息技术有限公司 Block chain transaction execution method, block chain node and control device
CN112883067A (en) * 2021-04-30 2021-06-01 支付宝(杭州)信息技术有限公司 Block chain transaction execution method, block chain node and control device
WO2023078097A1 (en) * 2021-11-04 2023-05-11 深圳前海微众银行股份有限公司 Blockchain attack interception method and apparatus
CN114328133A (en) * 2022-03-16 2022-04-12 北京微芯感知科技有限公司 Single-mechanism distributed conflict detection method and system and deposit separation framework
CN114546884A (en) * 2022-04-21 2022-05-27 北京微芯感知科技有限公司 Block chain batch transaction conflict detection method and system
CN115796874A (en) * 2023-01-09 2023-03-14 杭州安节科技有限公司 Operation-level block chain transaction concurrent execution method

Also Published As

Publication number Publication date
CN109559226B (en) 2021-03-02

Similar Documents

Publication Publication Date Title
CN109559226A (en) Block chain transaction execution method, system and electronic equipment and storage medium
CN107590654A (en) A kind of method of on-line payment, terminal and computer-readable medium
CN106231090A (en) The analog card changing method of a kind of NFC mobile terminal and device
CN108122012B (en) Method, device and equipment for determining center point of stationary point and storage medium
CN110009327A (en) A kind of method and terminal of electronic transaction
CN105227604B (en) A kind of method, server and system for transmitting share-car information
US20150178739A1 (en) Systems and methods for passively determining a ratio of purchasers and prosepective purchasers in a merchant location
CN105160537A (en) Indoor environment positioning method and user terminal
CN110135590B (en) Information processing method, information processing apparatus, information processing medium, and electronic device
CN103793801A (en) Logistics business processing method and device
CN107463767A (en) Cloud HIS medical insurances data processing method and system
CN104881717A (en) Route recommend method and user terminal
CN107145574A (en) database data processing method, device and storage medium and electronic equipment
CN104408183B (en) The data lead-in method and device of data system
CN112465601A (en) Electronic order generation method and device and storage medium
CN111062770B (en) Merchant identification method, device and computer readable medium
US20220147724A1 (en) Methods and systems to generate a token
CN109271453A (en) A kind of determination method and apparatus of database volume
CN107679222A (en) Image processing method, mobile terminal and computer-readable recording medium
CN107213637A (en) The position display method and system of battle game
CN110245290A (en) A kind of data correlation method, device, storage medium and the server of application registration
CN110399361A (en) A kind of method and information processing unit of information processing
CN107665422A (en) A kind of online equity method for tracking and managing and terminal
CN104839962A (en) Smart wallet, information processing method thereof and device
US20140351097A1 (en) Registration process

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

Effective date of registration: 20191231

Address after: 310000 Room 203, floor 2, building 1, No.79 Yueda lane, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Lianlian Yinjia Information Technology Co., Ltd

Address before: 310000, Hangzhou, Zhejiang, Binjiang District C space building 6

Applicant before: Hangzhou Shield Network Technology Co., Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant