CN110457353A - Contract data process method, apparatus, computer readable storage medium and computer equipment - Google Patents

Contract data process method, apparatus, computer readable storage medium and computer equipment Download PDF

Info

Publication number
CN110457353A
CN110457353A CN201910735459.9A CN201910735459A CN110457353A CN 110457353 A CN110457353 A CN 110457353A CN 201910735459 A CN201910735459 A CN 201910735459A CN 110457353 A CN110457353 A CN 110457353A
Authority
CN
China
Prior art keywords
transaction
caching
current
processed
block
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
CN201910735459.9A
Other languages
Chinese (zh)
Other versions
CN110457353B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910853888.6A priority Critical patent/CN110569264B/en
Priority to CN201910735459.9A priority patent/CN110457353B/en
Publication of CN110457353A publication Critical patent/CN110457353A/en
Application granted granted Critical
Publication of CN110457353B publication Critical patent/CN110457353B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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

Abstract

This application involves a kind of contract data process methods, device, computer readable storage medium and computer equipment, it include: reception transaction request, it includes at least one transaction to be processed, the corresponding intelligent contract method of each transaction to be processed is obtained according to transaction request, corresponding piece of object block caching of creation, creation initial transaction caching corresponding with each transaction to be processed, execute corresponding intelligent contract method parallel in each initial transaction caching, obtain corresponding more New Transaction caching, more New Transaction caching is successively incorporated into block caching by trading order, when current more New Transaction caching to be combined, which has merged the data cached No Assets of transaction with the history in block caching, to conflict, current more New Transaction caching to be combined is incorporated into block caching, mesh is obtained until each corresponding more New Transaction caching to be processed of trading is incorporated into block caching Block caching is marked, is cached according to object block and generates update block.Scheme provided by the present application can be improved the execution efficiency of intelligent contract method.

Description

Contract data process method, apparatus, computer readable storage medium and computer equipment
Technical field
It, can more particularly to a kind of contract data process method, apparatus, computer this application involves field of computer technology Read storage medium and computer equipment.
Background technique
With the development of computer technology, intelligent contract and block chain are closely related, and intelligent contract is that one kind is intended to believe The computer protocol of contract is propagated, verifies or executed to breathization mode.Intelligent contract permission carries out in no third-party situation Credible transaction, these transaction are traceable and irreversible.However, can only successively be held according to the trading order of transaction to be processed at present The corresponding intelligent contract method of row, if occurring the biggish business scenario of request amount in the short time, current intelligence contract method Serial approach be easy to cause the execution efficiency of intelligent contract method low.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of execution efficiency that can be improved intelligent contract method Contract data process method, apparatus, computer readable storage medium and computer equipment.
A kind of contract data process method, this method comprises:
Transaction request is received, transaction request includes at least one transaction to be processed;
The corresponding intelligent contract method of each transaction to be processed is obtained according to transaction request;
Corresponding piece of object block caching of creation, creation initial transaction caching corresponding with each transaction to be processed;
It executes corresponding intelligent contract method parallel in each initial transaction caching, obtains each transaction to be processed and correspond to More New Transaction caching;
Each more New Transaction caching is successively incorporated into block caching by trading order;
Conflict when current more New Transaction caching to be combined has merged the data cached No Assets of transaction with the history in block caching When, current more New Transaction caching to be combined is incorporated into block caching;
Trade that data cached there are resource punchings when current more New Transaction caching to be combined has merged with the history in block caching When prominent, then transaction caching among corresponding is re-created based on block caching, trading to cache in centre executes current update to be combined The corresponding transaction caching of implementing result is incorporated into block caching by the corresponding intelligent contract method of transaction caching;
Object block caching is obtained until each corresponding more New Transaction caching to be processed of trading is incorporated into block caching;
It is cached to generate according to object block and updates block.
A kind of contract data process device, the device include:
Transaction request receiving module, for receiving transaction request, transaction request includes at least one transaction to be processed;
Intelligent contract method obtains module, for obtaining the corresponding intelligent contract of each transaction to be processed according to transaction request Method;
Spatial cache creation module creates corresponding with each transaction to be processed for creating corresponding piece of object block caching Initial transaction caching;
Initial transaction buffer update module, for executing corresponding intelligent contract side parallel in each initial transaction caching Method obtains the corresponding more New Transaction caching of each transaction to be processed;
More New Transaction caches merging module, delays for each more New Transaction caching to be successively incorporated into block by trading order It deposits;
Resource contention detection module, for having merged friendship with the history in block caching when current more New Transaction caching to be combined When easy data cached No Assets conflict, current more New Transaction caching to be combined is incorporated into block caching;
Resource contention detection module is also used to merge when current more New Transaction caching to be combined with the history in block caching It trades data cached there are when resource contention, then corresponding intermediate transaction caching is re-created based on block caching, traded in centre Caching executes the corresponding intelligent contract method of current more New Transaction caching to be combined, and the corresponding transaction caching of implementing result is merged It is cached to block;
Resource contention detection module is also used to delay until each corresponding more New Transaction caching to be processed of trading is incorporated into block Object block caching is obtained in depositing;
Object block caches merging module, updates block for caching to generate according to object block.
A kind of computer equipment can be run on a memory and on a processor including memory, processor and storage Computer program, the processor perform the steps of when executing described program
Transaction request is received, transaction request includes at least one transaction to be processed;
The corresponding intelligent contract method of each transaction to be processed is obtained according to transaction request;
Corresponding piece of object block caching of creation, creation initial transaction caching corresponding with each transaction to be processed;
It executes corresponding intelligent contract method parallel in each initial transaction caching, obtains each transaction to be processed and correspond to More New Transaction caching;
Each more New Transaction caching is successively incorporated into block caching by trading order;
Conflict when current more New Transaction caching to be combined has merged the data cached No Assets of transaction with the history in block caching When, current more New Transaction caching to be combined is incorporated into block caching;
Trade that data cached there are resource punchings when current more New Transaction caching to be combined has merged with the history in block caching When prominent, then transaction caching among corresponding is re-created based on block caching, trading to cache in centre executes current update to be combined The corresponding transaction caching of implementing result is incorporated into block caching by the corresponding intelligent contract method of transaction caching;
Object block caching is obtained until each corresponding more New Transaction caching to be processed of trading is incorporated into block caching;
It is cached to generate according to object block and updates block.
A kind of computer readable storage medium is stored thereon with computer program, when computer program is executed by processor, So that processor executes following steps:
Transaction request is received, transaction request includes at least one transaction to be processed;
The corresponding intelligent contract method of each transaction to be processed is obtained according to transaction request;
Corresponding piece of object block caching of creation, creation initial transaction caching corresponding with each transaction to be processed;
It executes corresponding intelligent contract method parallel in each initial transaction caching, obtains each transaction to be processed and correspond to More New Transaction caching;
Each more New Transaction caching is successively incorporated into block caching by trading order;
Conflict when current more New Transaction caching to be combined has merged the data cached No Assets of transaction with the history in block caching When, current more New Transaction caching to be combined is incorporated into block caching;
Trade that data cached there are resource punchings when current more New Transaction caching to be combined has merged with the history in block caching When prominent, then transaction caching among corresponding is re-created based on block caching, trading to cache in centre executes current update to be combined The corresponding transaction caching of implementing result is incorporated into block caching by the corresponding intelligent contract method of transaction caching;
Object block caching is obtained until each corresponding more New Transaction caching to be processed of trading is incorporated into block caching;
It is cached to generate according to object block and updates block.
Above-mentioned contract data process method, apparatus, computer readable storage medium and computer equipment, at least one is waited for Processing transaction obtains corresponding intelligent contract method by transaction request, by corresponding piece of object block caching of creation, then creates Initial transaction corresponding with each transaction to be processed caches, and executes corresponding intelligent contract parallel in each initial transaction caching Method obtains the corresponding more New Transaction caching of each transaction to be processed, successively caches each more New Transaction by trading order and close And cached to block, it is rushed when current more New Transaction caching to be combined has merged the data cached No Assets of transaction with the history in block caching When prominent, current more New Transaction caching to be combined is incorporated into block caching, when current more New Transaction caching to be combined is cached with block In history to have merged transaction data cached there are when resource contention, then it is slow corresponding intermediate transaction to be re-created based on block caching It deposits, trading to cache in centre executes the corresponding intelligent contract method of current more New Transaction caching to be combined, and implementing result is corresponded to Transaction caching be incorporated into block caching, obtained until each transaction to be processed corresponding more New Transaction caching is incorporated into block caching Object block caching caches according to object block and generates update block.
Therefore, it is cached by creating the corresponding initial transaction of each transaction to be processed, is held parallel in initial transaction caching The corresponding intelligent contract method of row, without showing interest in the trading order of each transaction to be processed, in respective initial transaction caching Corresponding intelligent contract method is executed parallel, improves the execution efficiency of intelligent contract method.Further, respective initial Corresponding intelligent contract method is executed in transaction parallel and obtains corresponding more New Transaction caching, it successively will be each according still further to trading order A more New Transaction caching is incorporated into block caching, in merging process, by detect currently pending transaction it is corresponding currently to Merging more New Transaction caching, to merge transaction with history in block caching data cached with the presence or absence of resource contention, when resource punching is not present When prominent, each corresponding more New Transaction caching to be processed of trading is incorporated into block caching and obtains object block caching, last basis Object block caching, which generates, updates block, and the detection in merging process with the presence or absence of resource contention is not needed by analyzing intelligent contract side The bytecode of method can just detected, and improve the comprehensive and accuracy of contract collision detection.
Detailed description of the invention
Fig. 1 is the applied environment figure of contract data process method in one embodiment;
Fig. 2 is the flow diagram of contract data process method in one embodiment;
Fig. 3 is the schematic diagram of block caching and initial transaction caching in one embodiment;
Fig. 4 is the flow diagram that intelligent contract method executes step in one embodiment;
Fig. 5 is the flow diagram for the merging step that more New Transaction caching is incorporated into block caching in one embodiment;
Fig. 5 A is that the transaction results in one embodiment in more New Transaction caching are incorporated into the schematic diagram that block caches;
Fig. 6 is the flow diagram of resource contention detecting step in one embodiment;
Fig. 6 A is the schematic diagram of intelligent contract method collision detection in one embodiment;
Fig. 7 is currently to update write buffer in one embodiment to have merged with history that transaction is data cached to whether there is intersection The flow diagram of judgment step;
Fig. 8 is the flow diagram of resource contention detecting step in another embodiment;
Fig. 9 is currently to update read buffer in one embodiment to have merged with history that transaction is data cached to whether there is intersection The flow diagram of judgment step;
Fig. 9 A be one embodiment in currently update read buffer merged with history transaction it is data cached whether there is intersection Judgment step schematic illustration;
Figure 10 is the schematic illustration of contract data process method in one embodiment;
Figure 11 is the structural block diagram of contract data process device in one embodiment;
Figure 12 is the structural block diagram of spatial cache creation module in one embodiment;
Figure 13 is the structural block diagram of initial transaction buffer update module in one embodiment;
Figure 14 is the structural block diagram that more New Transaction caches merging module in one embodiment;
Figure 15 is the structural block diagram of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and It is not used in restriction the application.
Fig. 1 is the applied environment figure of contract data process method in one embodiment.Referring to Fig.1, the contract data process Method is applied to contract data process system.The contract data process system includes terminal 110 and server 120.110 He of terminal Server 120 passes through network connection.Terminal 110 specifically can be terminal console or mobile terminal, and mobile terminal specifically can be with hand At least one of machine, tablet computer, laptop etc..Server 120 can use independent server either at least one The server cluster of a server composition is realized.Wherein, server 120 is a node, and one is preserved in node completely Block chain, block chain includes at least one block.
Specifically, at least one transaction to be processed is sent to server 120 by transaction request by terminal 110.Server 120 receive transaction request, obtain the corresponding intelligent contract method of each transaction to be processed according to transaction request, create object block Corresponding piece of caching, creation initial transaction corresponding with each transaction to be processed cache, in each initial transaction caches parallel Corresponding intelligent contract method is executed, the corresponding more New Transaction caching of each transaction to be processed is obtained, successively will by trading order Each more New Transaction caching is incorporated into block caching, when current more New Transaction caching to be combined has merged friendship with the history in block caching When easy data cached No Assets conflict, current more New Transaction caching to be combined is incorporated into block caching, when it is current it is to be combined more It is data cached there are when resource contention that New Transaction caching has merged transaction with the history in block caching, then is cached based on block and created again Corresponding intermediate transaction caching is built, transaction caching executes the corresponding intelligence contract side of current more New Transaction caching to be combined in centre The corresponding transaction caching of implementing result is incorporated into block caching by method, until each corresponding more New Transaction caching to be processed of trading It is incorporated into block caching and obtains object block caching, cached according to object block and generate update block.
As shown in Fig. 2, in one embodiment, providing a kind of contract data process method.The contract data process side Method can be executed by computer equipment, and computer equipment can be at least one of server or terminal.The present embodiment is main It is applied to the server 120 in above-mentioned Fig. 1 in this way to illustrate.Referring to Fig. 2, which is specifically wrapped Include following steps:
Step 202, transaction request is received, transaction request includes at least one transaction to be processed.
Wherein, transaction request is usually to send transaction request to service by terminal for requesting to handle transaction to be processed In device, after server receives transaction request, corresponding transaction to be processed can be handled according to transaction request.Wherein, transaction request Including at least one transaction to be processed, the transaction to be processed such as transaction to be processed is.Wherein, transaction to be processed presence pair here Intelligent contract method is answered, there are the transaction to be processed of corresponding intelligent contract method can create corresponding initial transaction caching, and There is no the transaction to be processed of corresponding intelligent contract method without creating corresponding initial transaction caching.
Specifically, terminal can generate transaction request by related application or control triggering, by least one friendship to be processed Easy corresponding Transaction Information is carried into transaction request, is sent to server by network.
Step 204, the corresponding intelligent contract method of each transaction to be processed is obtained according to transaction request.
Wherein, intelligent contract and block chain are closely related, and block chain is Distributed Storage, point-to-point transmission, common recognition The new application mode of the computer technologies such as mechanism, Encryption Algorithm, block chain are substantially the databases of a decentralization, together When Floor layer Technology of the block chain as bit coin, be a string using the associated data blocks generated of cryptography methods, each number According to the information of a batch bit coin network trading is contained in block, for verifying the validity (anti-fake) of its information and generating next A block.And intelligent contract is that block chain is referred to as " decentralization " major reason, it allows not needing third-party feelings Under condition, traceable, irreversible and safe transaction is executed.
Wherein, it is a kind of computer protocol used in block chain technology, intelligent contract packet that intelligent contract, which is intelligent contract, All information for having contained at least one transaction to be processed just understand implementing result operation only after meeting the requirements.And intelligent contract Including at least one variable and corresponding contract method, intelligent contract method here refers to the contract side in intelligent contract Method.
Specifically, after server receives transaction request, the corresponding intelligence of each transaction to be processed is obtained according to transaction request It can contract method.It specifically can be, corresponding variable determined according to each transaction to be processed, determines corresponding conjunction further according to variable About method, using the corresponding contract method of variable as corresponding corresponding intelligent contract method to be processed of trading.
Step 206, corresponding piece of object block caching is created, creation initial transaction corresponding with each transaction to be processed is delayed It deposits.
Wherein, object block is cached for creating block, and object block can be determined from block, for example, object block can be with It is newest block, so-called newest block refers to the highest block of height in the block of server preservation.And block caching is for delaying Deposit transaction to be handled corresponding transaction results, and initial transaction caching is for caching each transaction execution pair to be processed The transaction results that the intelligent contract method answered generates.Each transaction to be processed is when executing corresponding intelligent contract method, intelligence Change brought by energy contract method can all be cached into corresponding initial transaction caching, and each transaction to be processed executes correspondence Intelligent contract method generate transaction results it is all combinable to block caching in.Need to be located that is, temporarily saving in block caching The corresponding transaction results of reason transaction.
Specifically, block caching can cache newest block based on contract and create to obtain, and newest block refers to that server is protected The highest block of height in the block deposited can be each transaction creation to be processed based on block caching after creation obtains block caching Corresponding initial transaction caching.Here contract caching refers to for saving the corresponding intelligent contract method of each transaction to be processed , after obtaining corresponding intelligent contract method in database, the intelligent contract method that will acquire is united for each transaction to be processed One, which is put into contract caching, saves.Wherein, contract caching includes contract read buffer and contract write buffer, and contract read buffer is used to record The read access situation of intelligent contract method, contract write buffer are used to record the write access situation of intelligent contract method.
It in one embodiment, is that newest block creates the corresponding read and write cache of block caching based on contract caching, Read and write cache again based on block caching, which is that the corresponding initial transaction caching of each transaction creation to be processed is corresponding, to be read to delay It deposits and write buffer.Wherein, transaction to be processed caches corresponding read and write cache in corresponding initial transaction and executes respectively pair The intelligent contract method answered, what the corresponding transaction results of read buffer and initial transaction for respectively obtaining initial transaction caching cached The corresponding transaction results of read buffer that initial transaction caches finally are incorporated into block caching and corresponded to by the corresponding transaction results of write buffer Read buffer in, the corresponding transaction results of write buffer that initial transaction caches are incorporated into block and are cached in corresponding write buffer.
Step 208, it executes corresponding intelligent contract method parallel in each initial transaction caching, obtains each to be processed Corresponding more New Transaction of trading caches.
Specifically, after having created piece caching and the corresponding initial transaction caching of each transaction to be processed, due to initial Transaction caching is the Transaction Information generated during executing intelligent contract method for recording transaction to be processed, therefore each Corresponding intelligent contract method is executed in a corresponding initial transaction caching to be processed of trading, to obtain each transaction to be processed Corresponding more New Transaction caching.That is, intelligent contract is a set of promise defined in digital form, each friendship to be processed is being got After easily corresponding intelligent contract method, each transaction to be processed is needed to be held according to the agreement of corresponding intelligent contract method defined Row, therefore the corresponding transaction results of each transaction to be processed are obtained, update initial transaction caching according to transaction results, i.e., it will transaction As a result it saves into more New Transaction caching.Here transaction results are that each transaction to be processed executes in corresponding transaction caching Corresponding intelligence contract method, the brought change result of intelligent contract method all can be used as corresponding transaction results.
Wherein, it is parallel that each transaction to be processed executes corresponding intelligent contract method in corresponding initial transaction caching It executes, i.e., regardless of the trading order of each transaction to be processed, each transaction to be processed is directly slow in corresponding initial transaction parallel Deposit the corresponding intelligent contract method of middle execution.
Step 210, each more New Transaction caching is successively incorporated into block caching by trading order.
Wherein, sequence has been sequenced when transaction to be processed is bundled to object block, has been not required to sort again herein, can directly acquire each Corresponding trading order to be processed of trading.And when transaction to be processed is not packed into object block, it can be according to each transaction to be processed The exchange hour of time determines trading order, and exchange hour here refers to the corresponding exchange hour point of each transaction to be processed. And trading order refers to the transaction order between each transaction to be processed, it can be according to each corresponding exchange hour to be processed of trading Determine the corresponding trading order of each transaction to be processed.Specifically, each transaction to be processed can be directly acquired according to transaction request Corresponding trading order.
Further, successively that each transaction to be processed is corresponding more according to each corresponding trading order to be processed of trading New Transaction caching is incorporated into block caching, that is, includes the corresponding transaction of institute's transaction to be handled after the completion of merging, in block caching As a result, that is to say, that include each corresponding transaction results to be processed of trading in more New Transaction caching in block caching.
In one embodiment, block caching includes corresponding read and write cache, and each transaction to be processed is corresponding just The transaction caching that begins includes read and write cache, each transaction to be processed corresponding initial transaction cache corresponding read buffer and Write buffer executes corresponding intelligent contract method respectively, respectively obtains the corresponding transaction results of read buffer of initial transaction caching, Transaction results corresponding with the write buffer of initial transaction caching update initial transaction caching further according to transaction results, are updated Transaction caching.
Finally, the trading order between each transaction to be processed is obtained, according to trading order successively by each friendship to be processed The corresponding transaction results of read buffer of easily corresponding initial transaction caching are incorporated into block and cache in corresponding read buffer, will initially hand over The corresponding transaction results of the write buffer easily cached are incorporated into block and cache in corresponding write buffer, i.e., successively will be each according to trading order A corresponding more New Transaction caching to be processed of trading is incorporated into block caching.
Step 212, when current more New Transaction caching to be combined has merged the data cached nothing of transaction with the history in block caching When resource contention, current more New Transaction caching to be combined is incorporated into block caching.
Wherein, each corresponding more New Transaction caching to be processed of trading successively is being incorporated by block caching according to trading order Merging process in, it is understood that there may be the resource contention between intelligent contract method, so-called resource contention are exactly currently pending friendship Easily in block caching to have merged transaction data cached there are competitive relation, only currently pending transaction in block caching When merging the data cached uncontested relationship of transaction, then current more New Transaction caching to be combined is incorporated into block caching.
Wherein, more New Transaction caching to be combined temporarily saves the corresponding current transaction results of currently pending transaction, and Currently pending transaction refers to the transaction to be processed being presently processing, and obtains the corresponding current transaction knot of currently pending transaction More New Transaction to be combined caching where fruit, specifically can be by currently pending transaction corresponding more New Transaction caching as to Merge more New Transaction caching, since each corresponding more New Transaction caching to be processed of trading temporarily saves corresponding transaction knot Fruit, i.e., more New Transaction caching is incorporated into block caching is exactly that each corresponding transaction results to be processed of trading are incorporated into block to delay In depositing, the transaction to be processed that transaction results are incorporated into block caching is successfully updated to processed transaction, i.e., is temporarily protected in block caching Deposited the All Activity of processed transaction as a result, i.e. history merged transaction it is data cached.Here processed transaction refer to The corresponding more New Transaction of processing transaction caches the transaction of the processing after being successfully incorporated into block buffer update, i.e., will successfully correspond to More New Transaction caching be incorporated into block caching processing transaction.
Specifically, the corresponding current more New Transaction caching of currently pending transaction is obtained, will currently more New Transaction caching be made It for more New Transaction to be combined caching, then obtains the history that temporarily saves in block caching to have merged transaction data cached, when to be combined When more New Transaction caching has merged transaction data cached No Assets with history in block caching and conflict, by currently more New Transaction to be combined Caching is incorporated into block caching, i.e., in merging process, the currently pending corresponding intelligent contract method of transaction and processed friendship There is conflict between easily corresponding intelligent contract method, i.e., there are resource contention passes with processed transaction for currently pending transaction System.
Conversely, when trading that data cached there are resource punchings when more New Transaction to be combined caching has merged with history in block caching When prominent, it is determined that between the corresponding intelligent contract method of currently pending transaction intelligence contract method corresponding with processed transaction There are resource contention, current updates caching to be combined can not be incorporated into block caching, need to cache based on block and re-create pair The intermediate transaction caching answered, in centre, transaction caching executes the corresponding intelligence contract method of current more New Transaction caching to be combined, The corresponding transaction caching of implementing result is incorporated into block caching, until each corresponding more New Transaction caching to be processed of trading merges Object block caching is obtained into block caching.
Step 214, when current more New Transaction caching to be combined has merged data cached deposit of trading with the history in block caching In resource contention, then corresponding intermediate transaction caching is re-created based on block caching, centre trade caching execute currently to Merge the corresponding intelligent contract method of more New Transaction caching, the corresponding transaction caching of implementing result is incorporated into block caching.
Step 216, object block is obtained until each corresponding more New Transaction caching to be processed of trading is incorporated into block caching Caching.
Step 218, it is cached to generate according to object block and updates block.
Specifically, when current more New Transaction caching to be combined has merged the data cached presence of transaction with the history in block caching When resource contention, illustrate the corresponding intelligent contract method of currently pending transaction intelligence corresponding with the processed transaction in block caching There are competitive relations for energy contract method, therefore current update friendship to be combined can not be incorporated into block caching at present.In order to solve This problem needs to be based on block caching and re-creates corresponding intermediate transaction caching, executes in intermediate caching of trading current to be combined The corresponding transaction caching of implementing result is incorporated into block caching by the corresponding intelligent contract method of more New Transaction caching.
But cached if re-creating corresponding intermediate trade based on block caching, caching execution is traded currently in centre More New Transaction to be combined caches the implementing result that corresponding intelligent contract method obtains and has still merged transaction caching number with history According to there are competitive relations, corresponding intermediate transaction caching can be re-created based on block caching again again, in centre transaction caching The corresponding intelligent contract method of current more New Transaction caching to be combined is executed, until implementing result has merged transaction caching with history Resource contention is not present in data, then the corresponding transaction caching of implementing result is incorporated into block caching.Wherein it is possible to according to reality Using setting preset times, when reaching preset times, implementing result still can not merge data cached deposit of trading with history In resource contention, then currently pending transaction can be abandoned.
Further, successively that each transaction to be processed is corresponding according to each corresponding trading order to be processed of trading More New Transaction caching is incorporated into block caching, in merging process, if currently pending transaction has merged with history in block caching Transaction caching then re-creates corresponding intermediate transaction caching based on block caching, in centre transaction caching there are when resource contention The corresponding intelligent contract method of current more New Transaction caching to be combined is executed, until currently pending transaction and history in block caching Having merged transaction caching, there is no resource contentions, and the corresponding transaction caching of implementing result is incorporated into block caching.By this method, will In each object block caching that corresponding more New Transaction caching is all incorporated into block caching to be processed of trading, that is to say, that target It is data cached all there is no competitive relation and No Assets conflict that all history in block caching have merged transaction.
Finally, saving a complete block chain in server, block chain includes at least one block, is obtaining target After block caching, need to cache generation update block according to object block.
At least one transaction to be processed is obtained corresponding intelligence by transaction request and closed by above-mentioned contract data process method About method by corresponding piece of object block caching of creation, then creates initial transaction caching corresponding with each transaction to be processed, In Corresponding intelligent contract method is executed in each initial transaction caching parallel, obtains the corresponding more New Transaction of each transaction to be processed Each more New Transaction caching is successively incorporated into block caching by trading order by caching, when current more New Transaction caching to be combined with When history in block caching has merged transaction data cached No Assets conflict, current more New Transaction caching to be combined is incorporated into block In caching, trade that data cached there are resource contentions when current more New Transaction caching to be combined has merged with the history in block caching When, then corresponding intermediate trade is re-created based on block caching and cached, trading in centre, currently update to be combined is handed over for caching execution Corresponding intelligent contract method is easily cached, the corresponding transaction caching of implementing result is incorporated into block caching, until each to be processed Corresponding more New Transaction caching of trading, which is incorporated into block caching, obtains object block caching, caches generation according to object block and updates block.
Therefore, it is cached by creating the corresponding initial transaction of each transaction to be processed, is held parallel in initial transaction caching The corresponding intelligent contract method of row, without showing interest in the trading order of each transaction to be processed, in respective initial transaction caching Corresponding intelligent contract method is executed parallel, improves the execution efficiency of intelligent contract method.Further, respective initial Corresponding intelligent contract method is executed in transaction parallel and obtains corresponding more New Transaction caching, it successively will be each according still further to trading order A more New Transaction caching is incorporated into block caching, in merging process, by detect currently pending transaction it is corresponding currently to Merging more New Transaction caching, to merge transaction with history in block caching data cached with the presence or absence of resource contention, when resource punching is not present When prominent, each corresponding more New Transaction caching to be processed of trading is incorporated into block caching and obtains object block caching, last basis Object block caching, which generates, updates block, and the detection in merging process with the presence or absence of resource contention is not needed by analyzing intelligent contract side The bytecode of method can just detected, and improve the comprehensive and accuracy of contract collision detection.
In one embodiment, corresponding piece of object block caching is created, is created corresponding with each transaction to be processed initial Transaction caching, comprising: obtain object block, be that object block creates corresponding piece of read buffer and block write buffer, base based on contract caching In block read buffer and block write buffer be the corresponding initial transaction read buffer of each transaction creation to be processed and initial transaction write buffer.
Wherein, contract caching refers to for saving the corresponding intelligent contract method of each transaction to be processed, each wait locate After obtaining corresponding intelligent contract method in database, it is slow that the intelligent contract method that will acquire uniformly is put into contract for reason transaction Deposit preservation.And block caching is the corresponding transaction results of transaction to be handled for caching, and initial transaction cache be for It caches each transaction to be processed and executes the Transaction Information that corresponding intelligent contract method generates.Each transaction to be processed is in execution pair When the intelligent contract method answered, change brought by intelligent contract method can all be cached into corresponding initial transaction caching, from And more New Transaction caching is obtained, and each transaction to be processed executes the transaction results that corresponding intelligent contract method generates and can all close And into block caching.That is, temporarily saving the corresponding transaction results of institute's transaction to be handled in block caching.
It specifically, is that newest block creation block caches corresponding piece of read buffer and block write buffer, then base based on contract caching It is that the corresponding initial transaction of the corresponding initial transaction caching of each transaction creation to be processed is read to delay in block read buffer and block write buffer It deposits and initial transaction write buffer.Wherein, transaction to be processed corresponding initial transaction cache corresponding initial transaction read buffer and Initial transaction write buffer executes corresponding intelligent contract method respectively, respectively obtains the initial transaction read buffer of initial transaction caching The corresponding transaction results of initial transaction write buffer of corresponding transaction results and initial transaction caching are read slow according to initial transaction It deposits corresponding transaction results and updates initial transaction read buffer, obtain more New Transaction read buffer, similarly write according to initial transaction slow It deposits corresponding transaction results update initial transaction write buffer and obtains more New Transaction write buffer.
Finally, the corresponding transaction results of more New Transaction read buffer that more New Transaction caches, which are incorporated into block, caches corresponding piece In read buffer, by more New Transaction cache the corresponding transaction results of more New Transaction write buffer be incorporated into block cache corresponding piece write it is slow In depositing.
In one embodiment, as shown in figure 3, Fig. 3 is shown, block in one embodiment is cached and what initial transaction cached shows It is intended to, specifically can be, server obtains newest block, is that newest block creation block caches corresponding piece of reading based on contract caching It include block read buffer and block write buffer in caching and block write buffer, i.e. block caching.Further, it is write based on block read buffer and block slow The corresponding initial transaction read buffer of each transaction creation to be processed and initial transaction write buffer are saved as, i.e., each transaction to be processed is deposited In corresponding initial transaction read buffer and initial transaction write buffer.
In one embodiment, as shown in figure 4, executing corresponding intelligent contract side parallel in each initial transaction caching Method obtains the corresponding more New Transaction caching of each transaction to be processed, comprising:
Step 402, corresponding intelligent contract is executed parallel in each corresponding initial transaction read buffer to be processed of trading Method obtains the corresponding more New Transaction read buffer of each transaction to be processed.
Step 404, corresponding intelligent contract is executed parallel in each corresponding initial transaction write buffer to be processed of trading Method obtains the corresponding more New Transaction write buffer of each transaction to be processed.
Wherein, the corresponding more New Transaction caching of each transaction to be processed is write slow including more New Transaction read buffer and more New Transaction Deposit, more New Transaction read buffer is the read access situation for recording transaction to be processed, more New Transaction write buffer be for record to The write access situation of transaction is handled, each transaction to be processed can execute corresponding intelligent contract method in initial transaction caching, To obtain more New Transaction caching.
Specifically, corresponding intelligent contract method is executed parallel in each corresponding transaction read buffer to be processed of trading, Intelligent contract method all saves in the easy read buffer of best friend brought variation, obtains the corresponding transaction of each transaction to be processed Read buffer is as a result, saving transaction read buffer result to more New Transaction read buffer.Similarly, corresponding in each transaction to be processed Corresponding intelligent contract method is executed in transaction write buffer parallel, obtains the corresponding transaction write buffer knot of each transaction to be processed Fruit saves transaction write buffer result into more New Transaction write buffer.That is, transaction read buffer and transaction write buffer are all used to execute Corresponding execution contract, temporarily saves corresponding implementing result.
In one embodiment, delay as shown in figure 5, each more New Transaction caching is successively incorporated into block by trading order It deposits, comprising:
Step 502, the corresponding trading order of each transaction to be processed is obtained.
Wherein, sequence has been sequenced when transaction to be processed is bundled to object block, has been not required to sort again herein, can directly acquire each Corresponding trading order to be processed of trading.And when transaction to be processed is not packed into object block, it can be according to each transaction to be processed The exchange hour of time determines trading order, and exchange hour here refers to the corresponding exchange hour point of each transaction to be processed. Specifically, server (node) directly acquires the corresponding trading order of each transaction to be processed.
Step 504, each corresponding more New Transaction write buffer to be processed of trading successively is incorporated by block according to trading order In write buffer.
Specifically, after obtaining the corresponding trading order of each transaction to be processed, successively each transaction to be processed is corresponded to More New Transaction write buffer be incorporated into block write buffer.That is, by the transaction write buffer result for write buffer of trading be committed to block write it is slow In depositing, i.e., block write buffer for it is to be handled transaction it is corresponding transaction write buffer result union.
Wherein, the corresponding intelligence of each transaction to be processed is identified by the way that more New Transaction write buffer is committed to block write buffer With the presence or absence of conflict between contract method, it can be specifically explained by following embodiment, not make any repeat herein.
Wherein, and the corresponding intelligent contract method of each transaction to be processed in the process of implementation, can will from database or In the data deposit block read buffer read in contract caching.
In one embodiment, as shown in Figure 5A, Fig. 5 A shows the transaction knot in one embodiment in more New Transaction caching Fruit is incorporated into the schematic diagram of block caching.Fig. 5 A show transaction 1 read buffer, transaction 1 write buffer and transaction 2 read buffers, transaction 2 write it is slow It deposits.Specifically, according to trading order, 1 read buffer of transaction is committed in block read buffer, 1 write buffer of transaction is committed to block and is write In caching.And then 2 read buffers of transaction are committed in block read buffer, 2 write buffers of transaction are committed in block write buffer.
In one embodiment, as shown in fig. 6, current more New Transaction caching to be combined for current more New Transaction write buffer or Current more New Transaction read buffer, initial transaction caching include initial transaction read buffer and initial transaction write buffer, and current update is handed over Easy write buffer is that currently pending transaction executes corresponding intelligent contract method in current initial transaction write buffer and obtains, when Preceding more New Transaction read buffer is that currently pending transaction executes corresponding intelligent contract method in current initial transaction read buffer It obtains, block caching includes block read buffer and block write buffer, when current more New Transaction caching to be combined and the history in block caching Having merged transaction, data cached there are when resource contention, comprising:
Step 602, when more New Transaction to be combined caching is current more New Transaction write buffer, going through in block write buffer is obtained History has merged that transaction is data cached, and it is the corresponding more New Transaction write buffer of processed transaction that it is data cached, which to have merged transaction, for history, Corresponding more New Transaction caching to be processed of trading is updated to processed transaction after being incorporated into block caching.
Wherein, more New Transaction to be combined caching can for current transaction write buffer result or current transaction read buffer as a result, More New Transaction caching includes more New Transaction read buffer and more New Transaction write buffer, and current write buffer of trading is the result is that currently pending Transaction executes what corresponding intelligent contract method obtained in currently more New Transaction write buffer, current read buffer of trading be currently to Processing transaction executes what corresponding intelligent contract method obtained in currently more New Transaction read buffer, and block caching includes block read buffer With block write buffer, each corresponding more New Transaction read buffer to be processed of trading is incorporated into block read buffer, each transaction to be processed Corresponding transaction write buffer is incorporated into block write buffer.
Wherein, more New Transaction caching to be combined can be current more New Transaction write buffer here, can also update to be current Transaction read buffer.Specifically, it is current more New Transaction write buffer when more New Transaction to be combined caches, illustrates currently pending friendship Yi Geng New Transaction write buffer execute current more New Transaction write buffer that corresponding intelligent contract method obtains as it is to be combined more New Transaction caching.Obtain block write buffer in history merged transaction it is data cached, history merged transaction it is data cached be The corresponding more New Transaction write buffer of processing transaction, corresponding more New Transaction caching to be processed of trading are updated to after being incorporated into block caching Processed transaction.
Wherein, processed transaction refers to that corresponding more New Transaction caching is successfully incorporated into block buffer update by be processed trade Processing transaction later.History in block caching, which has merged, is not present punching between the data cached corresponding transaction to be processed of transaction It is prominent.That is, transaction write buffer result will not be committed in block write buffer if transaction to be processed has conflict, therefore block is write Any conflict is all not present between processed transaction in caching.
Step 604, having merged transaction at least one history when current more New Transaction write buffer, data cached there are intersections When, it is determined that current more New Transaction caching to be combined has merged with the history in block caching trades that data cached there are resource punchings It is prominent.
Specifically, having merged transaction at least one history when current more New Transaction write buffer, data cached there are intersections When, illustrate that same holding tank has all been changed in currently pending transaction and processed transaction, so holding in practical intelligent contract method During row, currently pending transaction has to wait for start after the completion of the corresponding transaction of all processed transaction, i.e., currently Transaction to be processed cannot be parallel with processed transaction, it is determined that the corresponding intelligent contract method of currently pending transaction with it is processed There is conflict in corresponding intelligent contract method of trading.
In one embodiment, as shown in Figure 6A, Fig. 6 A shows intelligent contract method collision detection in one embodiment Schematic diagram.Fig. 6 A shows block write buffer and the corresponding current transaction write buffer of currently pending transaction as a result, currently pending friendship It is easily transaction 4, includes transaction 1, transaction 2,3 corresponding transaction write buffers of transaction in block write buffer as a result, in blocking write buffer Historical trading write buffer results set.As shown in Figure 6A, the corresponding current transaction write buffer result of currently pending transaction and There are intersections at least one historical trading write buffer result in block write buffer, it is determined that currently pending corresponding intelligence of trading There is conflict in contract method intelligent contract method corresponding with processed transaction, i.e., currently pending transaction have to wait for it is all Processing is traded, and transaction could start after the completion for corresponding transaction.
In one embodiment, as shown in fig. 7, currently more New Transaction write buffer at least one history transaction ought have been merged It is data cached that there are when intersection, comprising:
Step 702, it obtains the corresponding current transaction of current more New Transaction write buffer and writes key-value pair, key-value pair is write in current transaction Including current key and corresponding current value.
Step 704, it obtains history and has merged the data cached corresponding historical trading of transaction and write key-value pair, historical trading writes key Value is to including history button and corresponding history value.
Wherein, currently more New Transaction write buffer temporarily saves current transaction write buffer as a result, transaction write buffer result can To be key-value pair, so-called key-value pair (" key=value ") character string is commonly used in exploitation, corresponds to phase behind each key The value answered will export corresponding result when pressing corresponding key.Therefore, the more corresponding key of New Transaction write buffer can be passed through Value whether there is conflict between the intelligent contract method of detection.
Specifically, it obtains the corresponding current transaction of the current transaction write buffer result in current more New Transaction write buffer and writes key Value pair, it includes current key and corresponding current value that key-value pair is write in current transaction, while obtaining history to have merged transaction data cached Corresponding historical trading writes key-value pair, and it includes history button and corresponding history value that historical trading, which writes key-value pair,.
Step 706, when there are when at least one target histories key identical with current key in each history button, it is determined that when Preceding more New Transaction write buffer has merged transaction at least one history, and data cached there are intersections.
Specifically, target histories key identical with current key is obtained from each history button, when current key is corresponding current When being worth target histories value difference corresponding with target histories key, it is same to illustrate that currently pending transaction and processed transaction have all been changed One holding tank, so currently pending transaction has to wait for all processed friendships in practical intelligent contract method implementation procedure It could start after the completion of easy corresponding transaction, i.e., currently pending transaction cannot be parallel with processed transaction, it is determined that currently more New Transaction write buffer has merged transaction at least one history, and data cached there are intersections.
It in one embodiment, as shown in Figure 6A, include the corresponding history of processed transaction in the block write buffer in Fig. 6 A Write buffer of trading as a result, as transaction 1 transaction write buffer result: 1=1, the 1 of left side of the equal sign represent key key, the 1 of right side of the equal sign Typical value value, trade 2 transaction write buffer result: 2=2 and trade 3 transaction write buffer result 3=3, currently wait locate Reason transaction is 4 corresponding transaction write buffer results of transaction: 3=4,4=4, thus, it could be seen that in the transaction write buffer result of transaction 4 Key be 3 with block caching in historical trading write buffer result in key be 3 value it is not identical, it is determined that currently pending transaction Exist with the processed transaction of front and conflict, needs to wait all processed corresponding transaction of trading of fronts can just open after the completion Begin.
In one embodiment, as shown in figure 8, on the basis of Fig. 6, when current more New Transaction caching to be combined and block are slow History in depositing has merged transaction, and data cached there are when resource contention, comprising:
Step 802, the corresponding current more New Transaction read buffer of currently pending transaction is obtained, currently more New Transaction will read to delay It deposits and is cached as more New Transaction to be combined.
Step 804, having merged transaction at least one history when current more New Transaction read buffer, data cached there are intersections When, it is determined that current more New Transaction caching to be combined has merged with the history in block caching trades that data cached there are resource punchings It is prominent.
It wherein, currently include that currently pending transaction is held in corresponding more New Transaction read buffer in more New Transaction read buffer The corresponding intelligent contract method of row obtains, and it is that all processed transaction are corresponding in block caching that it is data cached, which to have merged transaction, for history More New Transaction write buffer is as a result, more New Transaction write buffer result refers to processed transaction in corresponding more New Transaction write buffer here Execute what corresponding intelligent contract obtained.
Wherein, processed transaction refers to that corresponding more New Transaction caching is successfully incorporated into block buffer update by be processed trade Processing transaction later.History in block caching, which has merged, is not present punching between the data cached corresponding transaction to be processed of transaction It is prominent.That is, transaction write buffer result will not be committed in block write buffer if transaction to be processed has conflict, therefore block is write Any conflict is all not present between forward direction in caching is to be processed.
Specifically, the corresponding current more New Transaction read buffer of currently pending transaction is obtained, currently more New Transaction read buffer In include that currently pending transaction executes what corresponding intelligent contract method obtained in corresponding more New Transaction read buffer, will be current More New Transaction read buffer is cached as more New Transaction to be combined, when current more New Transaction read buffer has merged at least one history Trading, data cached there are when intersection, it is determined that the corresponding intelligent contract method of currently pending transaction is corresponding with processed transaction Intelligent contract method exist conflict.
In one embodiment, as shown in figure 9, currently more New Transaction read buffer at least one history transaction ought have been merged It is data cached that there are when intersection, comprising:
Step 902, it obtains the corresponding current transaction of current more New Transaction read buffer and reads key-value pair, key-value pair is read in current transaction Including current key and corresponding current value.
Step 904, it obtains history and has merged the data cached corresponding historical trading of transaction and write key-value pair, historical trading writes key Value is to including history button and corresponding history value.
Wherein, currently more New Transaction read buffer temporarily saves current transaction read buffer as a result, transaction read buffer result can To be key-value pair, key-value pair (" key=value ") character string here is commonly used in exploitation, corresponds to behind each key Corresponding value, when pressing corresponding key, will export corresponding result.It therefore, can be corresponding by more New Transaction read buffer Key-value pair detects between intelligent contract method with the presence or absence of conflict.
Specifically, it obtains the corresponding current transaction of the current transaction read buffer result in current more New Transaction read buffer and reads key Value pair, it includes current key and corresponding current value that key-value pair is read in current transaction, while obtaining history to have merged transaction data cached Corresponding historical trading writes key-value pair, and it includes history button and corresponding history value that historical trading, which writes key-value pair,.
Step 906, when there are when at least one target histories key identical with current key in each history button, it is determined that when Preceding more New Transaction read buffer has merged transaction at least one history, and data cached there are intersections.
Specifically, when, there are when at least one target histories key identical with current key, illustrating each in each history button For the corresponding intelligent contract method of a transaction to be processed in parallel situation, the value of the target histories key in different server has can Different situations can be had, it is unified pessimistically to think currently pending transaction in order to keep the consistency between each server Having read legacy data, i.e., currently pending transaction has to wait for start after the completion of the corresponding transaction of all processed transaction, So currently pending transaction cannot be parallel with processed transaction, it is determined that current more New Transaction read buffer and at least one history Having merged transaction, data cached there are intersections.
It in one embodiment, as shown in Figure 9 A, include the corresponding history of processed transaction in the block write buffer in Fig. 9 A Write buffer of trading as a result, as transaction 1 transaction write buffer result: 1=1, the 1 of left side of the equal sign represent key key, the 1 of right side of the equal sign Typical value value, trade 2 transaction write buffer result: 2=2 and trade 3 transaction write buffer result 3=3, currently wait locate Reason transaction 3 corresponding transaction read buffer results: 3=0,4=4, thus, it could be seen that transaction 4 transaction read buffer result in the presence of with The identical target histories key of history button in block caching, i.e. key=3, therefore regardless of whether the corresponding value of key=3 identical, all may be used It determines that currently pending transaction exists with the processed transaction of front to conflict, needs to wait all processed transaction of fronts corresponding It could start after the completion of transaction.
In a specific embodiment, a kind of contract data process method is provided, specifically includes the following steps:
1, transaction request is received, transaction request includes at least one transaction to be processed.
2, the corresponding intelligent contract method of each transaction to be processed is obtained according to transaction request.
3, corresponding piece of object block caching, creation initial transaction caching corresponding with each transaction to be processed are created.
3-1, object block is obtained, is that object block creates corresponding piece of read buffer and block write buffer based on contract caching.
3-2, be based on block read buffer and block write buffer the corresponding initial transaction read buffer of each transaction creation to be processed and Initial transaction write buffer.
4, it executes corresponding intelligent contract method parallel in each initial transaction caching, obtains each transaction pair to be processed The more New Transaction caching answered.
4-1, corresponding intelligent contract method is executed parallel in each corresponding initial transaction read buffer to be processed of trading, Obtain the corresponding more New Transaction read buffer of each transaction to be processed.
4-2, corresponding intelligent contract method is executed parallel in each corresponding initial transaction write buffer to be processed of trading, Obtain the corresponding more New Transaction write buffer of each transaction to be processed.
5, each more New Transaction caching is successively incorporated into block caching by trading order.
5-1, the corresponding trading order of each transaction to be processed is obtained.
5-2, according to trading order successively by the corresponding more New Transaction write buffer of each transaction to be processed be incorporated into block write it is slow In depositing.
6, it is rushed when current more New Transaction caching to be combined has merged the data cached No Assets of transaction with the history in block caching When prominent, current more New Transaction caching to be combined is incorporated into block caching.
7, merged when current more New Transaction caching to be combined with the history in block caching and traded that data cached there are resources When conflict, then corresponding intermediate transaction caching is re-created based on block caching, centre trade caching execute it is current it is to be combined more The corresponding transaction caching of implementing result is incorporated into block caching by the corresponding intelligent contract method of New Transaction caching.
7-1, wherein, current more New Transaction caching to be combined are read slow for current more New Transaction write buffer or current more New Transaction Deposit, initial transaction caching include initial transaction read buffer and initial transaction write buffer, currently more New Transaction write buffer be currently to Processing transaction executes what corresponding intelligent contract method obtained in current initial transaction write buffer, currently more New Transaction read buffer Currently pending transaction executes corresponding intelligent contract method in current initial transaction read buffer and obtains, and block caching includes Block read buffer and block write buffer,
Wherein, when more New Transaction to be combined caching is current more New Transaction write buffer, the history in block write buffer is obtained It is data cached to have merged transaction, it is the corresponding more New Transaction write buffer of processed transaction that it is data cached, which to have merged transaction, for history, to Processing trades after corresponding more New Transaction caching is incorporated into block caching and is updated to processed transaction.
When current more New Transaction write buffer has merged at least one history transaction, data cached there are when intersection, it is determined that Current more New Transaction caching to be combined has merged with the history in block caching trades that data cached there are resource contentions.
Key-value pair is write in the corresponding current transaction of 7-1-1, the current more New Transaction write buffer of acquisition, and key-value pair packet is write in current transaction Include current key and corresponding current value.
7-1-2, acquisition history have merged the data cached corresponding historical trading of transaction and have write key-value pair, and historical trading writes key assignments To including history button and corresponding history value.
7-1-3, when there are when at least one target histories key identical with current key in each history button, it is determined that it is current More New Transaction write buffer has merged transaction at least one history, and data cached there are intersections.
7-2, the corresponding current more New Transaction read buffer of currently pending transaction is obtained, will currently more New Transaction read buffer made For more New Transaction to be combined caching, when currently, more New Transaction read buffer has merged the data cached presence of transaction at least one history When intersection, it is determined that current more New Transaction caching to be combined has merged with the history in block caching trades that data cached there are resources Conflict.
7-2-1, the corresponding current transaction reading key-value pair of current more New Transaction read buffer is obtained, key-value pair packet is read in current transaction Include current key and corresponding current value.
7-2-2, acquisition history have merged the data cached corresponding historical trading of transaction and have write key-value pair, and historical trading writes key assignments To including history button and corresponding history value.
7-2-3, when there are when at least one target histories key identical with current key in each history button, it is determined that it is current More New Transaction read buffer has merged transaction at least one history, and data cached there are intersections.
8, object block caching is obtained until each corresponding more New Transaction caching to be processed of trading is incorporated into block caching.
9, it is cached to generate according to object block and updates block.
In one embodiment, as shown in Figure 10, Figure 10 shows the principle of contract data process method in one embodiment Schematic diagram.Specifically includes the following steps:
Step 1001, contract virtual machine get object block.
Step 1002 creates corresponding piece of caching based on contract caching for object block.
Step 1003 is the corresponding initial transaction caching of each transaction creation to be processed based on block caching.
Step 1004 is cached based on respective initial transaction, is executed corresponding intelligent contract method parallel in thread pool, is obtained It is cached to corresponding more New Transaction.
Step 1005, according to the corresponding trading order of each transaction to be processed, first more New Transaction caching is merged into Block caching, as there are resource contentions (to have modified the data modified in the transaction merged, have read for discovery in merging process Legacy data), then this contract is re-executed based on the block caching (new data) merged, merged again later.
The corresponding more New Transaction caching of the intelligent contract method of successful execution is merged into block by transaction order by step 1006 In caching.Wherein, the clash handle in merging process and previous step 5 are consistent.
It is step 1007, final, new block is formed according to merging the block caching completed and closing.
It should be understood that although each step in above-mentioned flow chart is successively shown according to the instruction of arrow, this A little steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly state otherwise herein, these steps It executes there is no the limitation of stringent sequence, these steps can execute in other order.Moreover, in above-mentioned flow chart at least A part of step may include that perhaps these sub-steps of multiple stages or stage are not necessarily in same a period of time to multiple sub-steps Quarter executes completion, but can execute at different times, the execution in these sub-steps or stage be sequentially also not necessarily according to Secondary progress, but in turn or can replace at least part of the sub-step or stage of other steps or other steps Ground executes.
In one embodiment, as shown in figure 11, a kind of contract data process device 1100 is provided, comprising:
Transaction request receiving module 1102, for receiving transaction request, transaction request includes at least one transaction to be processed.
Intelligent contract method obtains module 1104, for obtaining the corresponding intelligence of each transaction to be processed according to transaction request Contract method.
Spatial cache creation module 1106, for creating corresponding piece of object block caching, creation and each transaction to be processed Corresponding initial transaction caching.
Initial transaction buffer update module 1108 is closed for executing corresponding intelligence parallel in each initial transaction caching About method obtains the corresponding more New Transaction caching of each transaction to be processed.
More New Transaction caches merging module 1110, for each more New Transaction caching to be successively incorporated into block by trading order Caching.
Resource contention detection module 1112, for having been closed when current more New Transaction caching to be combined with the history in block caching And trade the conflict of data cached No Assets when, current more New Transaction caching to be combined is incorporated into block caching.
Resource contention detection module 1112 is also used to cache with the history in block caching when current more New Transaction to be combined It is data cached there are when resource contention to merge transaction, then corresponding intermediate transaction caching is re-created based on block caching, in centre Transaction caching executes the corresponding intelligent contract method of current more New Transaction caching to be combined, and the corresponding transaction of implementing result is cached It is incorporated into block caching.
Resource contention detection module 1112 is also used to be incorporated into until each corresponding more New Transaction caching to be processed of trading Object block caching is obtained in block caching.
Object block caches merging module 1114, updates block for caching to generate according to object block.
In one embodiment, as shown in figure 12, spatial cache creation module 1106 includes:
Block caches creating unit 1106a, is that object block creates corresponding piece based on contract caching for obtaining object block Read buffer and block write buffer.
Transaction son caching creating unit 1106b, for being each transaction wound to be processed based on block read buffer and block write buffer Build corresponding initial transaction read buffer and initial transaction write buffer.
In one embodiment, as shown in figure 13, initial transaction buffer update module 1108 includes:
Initial transaction read buffer execution unit 1108a, in each corresponding initial transaction read buffer to be processed of trading In execute corresponding intelligent contract method parallel, obtain the corresponding more New Transaction read buffer of each transaction to be processed.
Initial transaction write buffer execution unit 1108b, in each corresponding initial transaction write buffer to be processed of trading In execute corresponding intelligent contract method parallel, obtain the corresponding more New Transaction write buffer of each transaction to be processed.
In one embodiment, as shown in figure 14, more New Transaction caching merging module 1110 includes:
Trading order determination unit 1110a, for obtaining the corresponding trading order of each transaction to be processed.
More New Transaction write buffer combining unit 1110b, for successively being corresponded to each transaction to be processed according to trading order More New Transaction write buffer be incorporated into block write buffer.
In one embodiment, current more New Transaction caching to be combined is handed over for current more New Transaction write buffer or current update Easy read buffer, initial transaction caching include initial transaction read buffer and initial transaction write buffer, and currently more New Transaction write buffer is Currently pending transaction executes what corresponding intelligent contract method obtained in current initial transaction write buffer, currently more New Transaction Read buffer is that currently pending transaction executes corresponding intelligent contract method in current initial transaction read buffer and obtains, and block is slow Bag deposit includes block read buffer and block write buffer, and contract data process device 1100 is also used to when more New Transaction to be combined caching be current When more New Transaction write buffer, obtain block write buffer in history merged transaction it is data cached, history merged transaction caching number According to being the corresponding more New Transaction write buffer of processed transaction, after the corresponding more New Transaction caching of transaction to be processed is incorporated into block caching It is updated to processed transaction, data cached there are intersections when current more New Transaction write buffer has merged at least one history transaction When, it is determined that current more New Transaction caching to be combined has merged with the history in block caching trades that data cached there are resource punchings It is prominent.
In one embodiment, it is corresponding to be also used to obtain current more New Transaction write buffer for contract data process device 1100 Key-value pair is write in current transaction, and it includes current key and corresponding current value that key-value pair is write in current transaction, obtains history and has merged transaction Data cached corresponding historical trading writes key-value pair, and it includes history button and corresponding history value that historical trading, which writes key-value pair, when each There are when at least one target histories key identical with current key in a history button, it is determined that current more New Transaction write buffer with extremely Few history has merged transaction, and data cached there are intersections.
In one embodiment, it is corresponding current to be also used to obtain currently pending transaction for contract data process device 1100 More New Transaction read buffer will currently more New Transaction read buffer be cached as more New Transaction to be combined, and when currently, more New Transaction is read to delay It deposits and has merged transaction at least one history data cached there are when intersection, it is determined that current more New Transaction caching to be combined and block History in caching has merged transaction, and data cached there are resource contentions.
In one embodiment, it is corresponding to be also used to obtain current more New Transaction read buffer for contract data process device 1100 Key-value pair is read in current transaction, and it includes current key and corresponding current value that key-value pair is read in current transaction, is obtained history and has been merged transaction Data cached corresponding historical trading writes key-value pair, and it includes history button and corresponding history value that historical trading, which writes key-value pair, when each There are when at least one target histories key identical with current key in a history button, it is determined that current more New Transaction read buffer with extremely Few history has merged transaction, and data cached there are intersections.
Figure 15 shows the internal structure chart of computer equipment in one embodiment.The computer equipment specifically can be figure Server 120 in 1.As shown in figure 15, it includes being connected by system bus which, which includes the computer equipment, Processor, memory, network interface, input unit.Wherein, memory includes non-volatile memory medium and built-in storage.It should The non-volatile memory medium of computer equipment is stored with operating system, can also be stored with computer program, the computer program When being executed by processor, processor may make to realize contract data process method.Computer can also be stored in the built-in storage Program when the computer program is executed by processor, may make processor to execute contract data process method.Computer equipment Input unit can be the touch layer covered on display screen, be also possible to the key being arranged on computer equipment shell, trace ball Or Trackpad, it can also be external keyboard, Trackpad or mouse etc..
It will be understood by those skilled in the art that structure shown in Figure 15, only part relevant to application scheme The block diagram of structure, does not constitute the restriction for the computer equipment being applied thereon to application scheme, and specific computer is set Standby may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, contract data process device provided by the present application can be implemented as a kind of computer program Form, computer program can be run in computer equipment as shown in figure 15.Group can be stored in the memory of computer equipment At each program module of the contract data process device, for example, transaction request receiving module shown in Figure 11, intelligent contract side Method obtains module, spatial cache creation module, initial transaction buffer update module, more New Transaction caching merging module, resource punching Prominent detection module and object block cache merging module.The computer program that each program module is constituted makes processor execute this theory Step in the contract data process method of each embodiment of the application described in bright book.
For example, computer equipment shown in figure 15 can pass through the transaction in contract data process device as shown in figure 11 Request receiving module, which executes, receives transaction request, and transaction request includes at least one transaction to be processed.Computer equipment can pass through Intelligent contract method obtains module and executes according to each corresponding intelligent contract method to be processed of trading of transaction request acquisition.It calculates Machine equipment can execute corresponding piece of object block caching of creation, creation and each transaction pair to be processed by spatial cache creation module The initial transaction caching answered.Computer equipment can be executed in each initial transaction caching by initial transaction buffer update module Corresponding intelligent contract method is executed parallel, obtains the corresponding more New Transaction caching of each transaction to be processed.Computer equipment can Merging module execution is cached by more New Transaction, and each more New Transaction caching is successively incorporated into block caching by trading order.It calculates Machine equipment can be executed by resource contention detection module when current more New Transaction caching to be combined has been closed with the history in block caching And trade the conflict of data cached No Assets when, current more New Transaction caching to be combined is incorporated into block caching.Computer equipment It can also be executed by resource contention detection module when current more New Transaction caching to be combined has merged friendship with the history in block caching Easily data cached then to re-create transaction caching among corresponding based on block caching there are when resource contention, in centre, transaction is delayed The corresponding intelligent contract method of more New Transaction to be combined caching, the corresponding transaction of implementing result is cached and is incorporated into before the counter foil trade Block caching.Computer equipment can be also executed by resource contention detection module until each corresponding more New Transaction to be processed of trading Caching, which is incorporated into block caching, obtains object block caching.Computer equipment can cache merging module by object block and execute according to mesh It marks block caching and generates and update block.
In one embodiment, a kind of computer equipment, including memory and processor are provided, memory is stored with meter Calculation machine program, when computer program is executed by processor, so that the step of processor executes above-mentioned contract data process method.This The step of locating contract data process method can be the step in the contract data process method of above-mentioned each embodiment.
In one embodiment, a kind of computer readable storage medium is provided, computer program, computer journey are stored with When sequence is executed by processor, so that the step of processor executes above-mentioned contract data process method.Contract data process side herein The step of method, can be the step in the contract data process method of above-mentioned each embodiment.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read In storage medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, provided herein Each embodiment used in any reference to memory, storage, database or other media, may each comprise non-volatile And/or volatile memory.Nonvolatile memory may include that read-only memory (ROM), programming ROM (PROM), electricity can be compiled Journey ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) directly RAM (RDRAM), straight Connect memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously The limitation to the application the scope of the patents therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the concept of this application, various modifications and improvements can be made, these belong to the guarantor of the application Protect range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (15)

1. a kind of contract data process method, comprising:
Transaction request is received, the transaction request includes at least one transaction to be processed;
Each corresponding intelligent contract method to be processed of trading is obtained according to transaction request;
Corresponding piece of object block caching of creation, creation initial transaction caching corresponding with each transaction to be processed;
Corresponding intelligent contract method is executed parallel in each initial transaction caching, obtains each transaction to be processed Corresponding more New Transaction caching;
Each more New Transaction caching is successively incorporated into described piece of caching by trading order;
Conflict when current more New Transaction caching to be combined has merged the data cached No Assets of transaction with the history in described piece of caching When, the current more New Transaction caching to be combined is incorporated into described piece of caching;
Trade that data cached there are resource punchings when current more New Transaction caching to be combined has merged with the history in described piece of caching When prominent, then caching of trading among corresponding is re-created based on described piece of caching, caches in the intermediate transaction and work as described in execution Preceding more New Transaction to be combined caches corresponding intelligent contract method, and the corresponding transaction caching of implementing result is incorporated into described piece and is delayed It deposits;
Object block caching is obtained until each corresponding more New Transaction caching to be processed of trading is incorporated into described piece of caching;
It is cached to generate according to the object block and updates block.
2. the method according to claim 1, wherein corresponding piece of the creation object block caching, creates and each A corresponding initial transaction caching to be processed of trading, comprising:
Object block is obtained, is that the object block creates corresponding piece of read buffer and block write buffer based on contract caching;
It is slow to be that the corresponding initial transaction of each transaction creation to be processed is read based on described piece of read buffer and described piece of write buffer It deposits and initial transaction write buffer.
3. according to the method described in claim 2, it is characterized in that, described execute parallel in each initial transaction caching Corresponding intelligence contract method obtains each corresponding more New Transaction caching to be processed of trading, comprising:
Corresponding intelligent contract method is executed parallel in each corresponding initial transaction read buffer to be processed of trading, and is obtained Each corresponding more New Transaction read buffer to be processed of trading;
Corresponding intelligent contract method is executed parallel in each corresponding initial transaction write buffer to be processed of trading, and is obtained Each corresponding more New Transaction write buffer to be processed of trading.
4. according to the method described in claim 3, it is characterized in that, the trading order of pressing successively will each more New Transaction Caching is incorporated into described piece of caching, comprising:
Obtain each corresponding trading order to be processed of trading;
Each corresponding more New Transaction write buffer to be processed of trading successively is incorporated into described piece according to the trading order In write buffer.
5. the method according to claim 1, wherein the current more New Transaction caching to be combined updates to be current Write buffer of trading or current more New Transaction read buffer, the initial transaction caching include that initial transaction read buffer and initial transaction are write Caching, the current more New Transaction write buffer are that currently pending transaction executes corresponding intelligence in current initial transaction write buffer Energy contract method obtains, and the current more New Transaction read buffer is that the currently pending transaction reads to delay in current initial transaction Deposit what the corresponding intelligent contract method of middle execution obtained, described piece of caching includes block read buffer and block write buffer;
It is described to have merged that transaction is data cached to have money with the history in described piece of caching when current more New Transaction caching to be combined When source conflicts, comprising:
When the more New Transaction caching to be combined is current more New Transaction write buffer, the history in described piece of write buffer of acquisition is It is data cached to merge transaction, it is the corresponding more New Transaction write buffer of processed transaction that it is data cached, which to have merged transaction, for the history, Corresponding more New Transaction caching to be processed of trading is updated to processed transaction after being incorporated into described piece of caching;
When the current more New Transaction write buffer merged with history described at least one trade it is data cached there are when intersection, then It determines that the current more New Transaction caching to be combined has merged with the history in described piece of caching and trades that data cached there are resources Conflict.
6. according to the method described in claim 5, it is characterized in that, described when the current more New Transaction write buffer and at least one A history has merged transaction, and data cached there are when intersection, comprising:
It obtains the corresponding current transaction of the current more New Transaction write buffer and writes key-value pair, the current transaction writes key-value pair and includes Current key and corresponding current value;
It obtains the history and has merged the data cached corresponding historical trading of transaction and write key-value pair, the historical trading writes key-value pair Including history button and corresponding history value;
When there are when at least one target histories key identical with the current key in each history button, it is determined that described to work as Preceding more New Transaction write buffer has merged transaction with history described at least one, and data cached there are intersections.
7. according to the method described in claim 5, it is characterized in that, the method also includes:
The corresponding current more New Transaction read buffer of the currently pending transaction is obtained, the current more New Transaction read buffer is made It is cached for the more New Transaction to be combined;
When the current more New Transaction read buffer merged with history described at least one trade it is data cached there are when intersection, then It determines that the current more New Transaction caching to be combined has merged with the history in described piece of caching and trades that data cached there are resources Conflict.
8. the method according to the description of claim 7 is characterized in that described when the current more New Transaction read buffer and at least one A history has merged transaction, and data cached there are when intersection, comprising:
It obtains the corresponding current transaction of the current more New Transaction read buffer and reads key-value pair, the current transaction reads key-value pair and includes Current key and corresponding current value;
It obtains the history and has merged the data cached corresponding historical trading of transaction and write key-value pair, the historical trading writes key-value pair Including history button and corresponding history value;
When there are when at least one target histories key identical with the current key in each history button, it is determined that described to work as Preceding more New Transaction read buffer has merged transaction with history described at least one, and data cached there are intersections.
9. a kind of contract data process device, which is characterized in that described device includes:
Transaction request receiving module, for receiving transaction request, the transaction request includes at least one transaction to be processed;
Intelligent contract method obtains module, for obtaining the corresponding intelligent contract side of each transaction to be processed according to transaction request Method;
Spatial cache creation module creates corresponding with each transaction to be processed for creating corresponding piece of object block caching Initial transaction caching;
Initial transaction buffer update module, for executing corresponding intelligent contract side parallel in each initial transaction caching Method obtains each corresponding more New Transaction caching to be processed of trading;
More New Transaction caches merging module, for each more New Transaction caching to be successively incorporated into described piece by trading order Caching;
Resource contention detection module, for having merged friendship with the history in described piece of caching when current more New Transaction caching to be combined When easy data cached No Assets conflict, the current more New Transaction caching to be combined is incorporated into described piece of caching;
The resource contention detection module is also used to cache with the history in described piece of caching when current more New Transaction to be combined It is data cached there are when resource contention to merge transaction, then corresponding intermediate transaction caching, In are re-created based on described piece of caching The intermediate transaction caching executes the corresponding intelligent contract method of the more New Transaction caching currently to be combined, by implementing result pair The transaction caching answered is incorporated into described piece of caching;
Described in the resource contention detection module is also used to be incorporated into until each corresponding more New Transaction caching to be processed of trading Object block caching is obtained in block caching;
Object block caches merging module, updates block for caching to generate according to the object block.
10. device according to claim 9, which is characterized in that the spatial cache creation module includes:
Block caches creating unit, for obtaining object block, creates corresponding piece based on contract caching for the object block and reads to delay It deposits and block write buffer;
Transaction son caching creating unit, for being each transaction to be processed based on described piece of read buffer and described piece of write buffer Create corresponding initial transaction read buffer and initial transaction write buffer.
11. device according to claim 10, which is characterized in that the initial transaction buffer update module includes:
Initial transaction read buffer execution unit, for parallel in each corresponding initial transaction read buffer to be processed of trading Corresponding intelligent contract method is executed, each corresponding more New Transaction read buffer to be processed of trading is obtained;
Initial transaction write buffer execution unit, for parallel in each corresponding initial transaction write buffer to be processed of trading Corresponding intelligent contract method is executed, each corresponding more New Transaction write buffer to be processed of trading is obtained.
12. device according to claim 11, which is characterized in that the more New Transaction caches merging module and includes:
Trading order determination unit, for obtaining each corresponding trading order to be processed of trading;
More New Transaction write buffer combining unit, for successively that each transaction to be processed is corresponding according to the trading order More New Transaction write buffer is incorporated into described piece of write buffer.
13. device according to claim 9, which is characterized in that the current more New Transaction caching to be combined for it is current more New Transaction write buffer or current more New Transaction read buffer, the initial transaction caching includes initial transaction read buffer and initial transaction Write buffer, it is corresponding that the current more New Transaction write buffer is that currently pending transaction executes in current initial transaction write buffer What intelligent contract method obtained, the current more New Transaction read buffer is that the currently pending transaction is read in current initial transaction Execute what corresponding intelligent contract method obtained in caching, described piece of caching includes block read buffer and block write buffer;
Described device is also used to obtain described piece when the more New Transaction caching to be combined is current more New Transaction write buffer and write History in caching merged transaction it is data cached, the history merged transaction it is data cached be it is processed transaction it is corresponding more New Transaction write buffer, the corresponding more New Transaction caching to be processed of trading are updated to described located after being incorporated into described piece of caching Reason transaction;
When the current more New Transaction write buffer merged with history described at least one trade it is data cached there are when intersection, then It determines that the current more New Transaction caching to be combined has merged with the history in described piece of caching and trades that data cached there are resources Conflict.
14. a kind of computer readable storage medium is stored with computer program, when the computer program is executed by processor, So that the processor is executed such as the step of any one of claims 1 to 8 the method.
15. a kind of computer equipment, including memory and processor, the memory is stored with computer program, the calculating When machine program is executed by the processor, so that the processor executes the step such as any one of claims 1 to 8 the method Suddenly.
CN201910735459.9A 2019-08-09 2019-08-09 Contract data processing method and device, computer readable storage medium and computer equipment Active CN110457353B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910853888.6A CN110569264B (en) 2019-08-09 2019-08-09 Contract data processing method and device, computer readable storage medium and computer equipment
CN201910735459.9A CN110457353B (en) 2019-08-09 2019-08-09 Contract data processing method and device, computer readable storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910735459.9A CN110457353B (en) 2019-08-09 2019-08-09 Contract data processing method and device, computer readable storage medium and computer equipment

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN201910853888.6A Division CN110569264B (en) 2019-08-09 2019-08-09 Contract data processing method and device, computer readable storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN110457353A true CN110457353A (en) 2019-11-15
CN110457353B CN110457353B (en) 2021-03-16

Family

ID=68485724

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201910735459.9A Active CN110457353B (en) 2019-08-09 2019-08-09 Contract data processing method and device, computer readable storage medium and computer equipment
CN201910853888.6A Active CN110569264B (en) 2019-08-09 2019-08-09 Contract data processing method and device, computer readable storage medium and computer equipment

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201910853888.6A Active CN110569264B (en) 2019-08-09 2019-08-09 Contract data processing method and device, computer readable storage medium and computer equipment

Country Status (1)

Country Link
CN (2) CN110457353B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111383031A (en) * 2020-05-29 2020-07-07 支付宝(杭州)信息技术有限公司 Intelligent contract execution method and system in block chain and electronic equipment
CN112395300A (en) * 2021-01-20 2021-02-23 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and readable storage medium
CN113094396A (en) * 2021-01-18 2021-07-09 腾讯科技(深圳)有限公司 Data processing method, device, equipment and medium based on node memory
WO2022174735A1 (en) * 2021-02-19 2022-08-25 腾讯科技(深圳)有限公司 Data processing method and apparatus based on distributed storage, device, and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190034402A1 (en) * 2017-07-28 2019-01-31 International Business Machines Corporation Cognitive mediator for generating blockchain smart contracts
CN109508337A (en) * 2018-11-12 2019-03-22 杭州秘猿科技有限公司 A kind of transaction is parallel to execute method, apparatus, electronic equipment and system
CN109784930A (en) * 2019-02-18 2019-05-21 深圳市网心科技有限公司 A kind of processing method, device, electronic equipment and the medium of block chain transaction data

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6711654B2 (en) * 2001-06-28 2004-03-23 Intel Corporation Mechanism for bank conflict resolution for an out-of-order cache
US10083126B2 (en) * 2016-12-06 2018-09-25 Arm Limited Apparatus and method for avoiding conflicting entries in a storage structure
CN109284625A (en) * 2018-09-03 2019-01-29 佛山科学技术学院 A kind of Data Access Security method and device based on block chain
CN109377362B (en) * 2018-09-19 2022-05-13 联动优势科技有限公司 Transaction data processing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190034402A1 (en) * 2017-07-28 2019-01-31 International Business Machines Corporation Cognitive mediator for generating blockchain smart contracts
CN109508337A (en) * 2018-11-12 2019-03-22 杭州秘猿科技有限公司 A kind of transaction is parallel to execute method, apparatus, electronic equipment and system
CN109784930A (en) * 2019-02-18 2019-05-21 深圳市网心科技有限公司 A kind of processing method, device, electronic equipment and the medium of block chain transaction data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王磊等: "基于区块链机制的云计算环境下服务组合策略的研究", 《计算机应用研究》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111383031A (en) * 2020-05-29 2020-07-07 支付宝(杭州)信息技术有限公司 Intelligent contract execution method and system in block chain and electronic equipment
CN113094396A (en) * 2021-01-18 2021-07-09 腾讯科技(深圳)有限公司 Data processing method, device, equipment and medium based on node memory
CN113094396B (en) * 2021-01-18 2022-07-26 腾讯科技(深圳)有限公司 Data processing method, device, equipment and medium based on node memory
CN112395300A (en) * 2021-01-20 2021-02-23 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and readable storage medium
CN112395300B (en) * 2021-01-20 2021-05-25 腾讯科技(深圳)有限公司 Data processing method, device and equipment based on block chain and readable storage medium
WO2022156574A1 (en) * 2021-01-20 2022-07-28 腾讯科技(深圳)有限公司 Blockchain-based method and apparatus for data processing, device, and readable storage medium
WO2022174735A1 (en) * 2021-02-19 2022-08-25 腾讯科技(深圳)有限公司 Data processing method and apparatus based on distributed storage, device, and medium

Also Published As

Publication number Publication date
CN110457353B (en) 2021-03-16
CN110569264B (en) 2021-04-09
CN110569264A (en) 2019-12-13

Similar Documents

Publication Publication Date Title
CN110457353A (en) Contract data process method, apparatus, computer readable storage medium and computer equipment
CN110443712A (en) Contract collision detection method, device, readable storage medium storing program for executing and computer equipment
US10698885B2 (en) Method and device for writing service data in block chain system
US20210049715A1 (en) Blockchain-based data procesing method, apparatus, and electronic device
US11386065B2 (en) Database concurrency control through hash-bucket latching
CN104541244B (en) Method and apparatus for carrying out resetting execution
CN108648078A (en) A kind of transaction preprocess method, device and electronic equipment
CN113743941B (en) Method for executing transaction in block chain, block chain and main node
CN110706101B (en) Method and apparatus for concurrently executing transactions in a blockchain
CN106062707A (en) Enabling maximum concurrency in a hybrid transactional memory system
CN110489086A (en) Process executes control method, device, computer equipment and storage medium
CN110209355A (en) Full firmware read-write operation optimization method and device based on solid state hard disk
CN109446211A (en) A kind of consistency desired result method and device
CN105335143A (en) Business processing method and apparatus
CN110675255A (en) Method and apparatus for concurrently executing transactions in a blockchain
CN115098594A (en) Method for executing transaction in block chain system, block chain system and node
CN113064730A (en) Block chain transaction execution method, block chain node and control device
CN113744062B (en) Method for performing transactions in a blockchain, blockchain node and blockchain
CN113505024B (en) Data processing method and device of alliance chain, electronic equipment and storage medium
CN110706108B (en) Method and apparatus for concurrently executing transactions in a blockchain
CN106919474A (en) A kind of data cached guard method and device
US8375188B1 (en) Techniques for epoch pipelining
CN108563693A (en) A kind of processing method of affairs, device and equipment
CN114022148B (en) Transaction conflict detection method, device, equipment and storage medium based on block chain
CN115037472B (en) Transaction processing method and system based on double-layer DAG consensus mechanism and service equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40015763

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant