CN109951546A - Transactions requests processing method, device, equipment and medium based on intelligent contract - Google Patents
Transactions requests processing method, device, equipment and medium based on intelligent contract Download PDFInfo
- Publication number
- CN109951546A CN109951546A CN201910199179.0A CN201910199179A CN109951546A CN 109951546 A CN109951546 A CN 109951546A CN 201910199179 A CN201910199179 A CN 201910199179A CN 109951546 A CN109951546 A CN 109951546A
- Authority
- CN
- China
- Prior art keywords
- acquisition system
- transactions requests
- data
- data acquisition
- block chain
- 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
Links
Abstract
The embodiment of the invention discloses a kind of transactions requests processing method, device, equipment and media based on intelligent contract.Wherein, this method is applied to block chain node, this method comprises: generating the transactions requests based on Intelligent target contract;Pre-execution operation is carried out to the transactions requests according to local data, determines input dependence data acquisition system and output change data acquisition system;By the transactions requests, input dependence data acquisition system and output change data acquisition system binding, and it is transmitted to block chain network, to request other nodes in block chain network to execute the transactions requests.Using the technical solution of the embodiment of the present invention, it can be effectively prevent the delayed execution of intelligent contract call request, result caused by avoiding because of delayed execution is uncertain.
Description
Technical field
The present embodiments relate to block chain technical field more particularly to a kind of transactions requests processing based on intelligent contract
Method, apparatus, equipment and medium.
Background technique
Currently, the intelligent contract of block chain deployment is executed after the transactions requests for receiving initiation by block chain node
Intelligent contract in transactions requests, and implementing result is stored into executive mode on the chain into block.
In above-mentioned executive mode, the affairs that the node of transactions requests only needs to initiate to be called intelligent contract are initiated
Request, it is easy to operate.But it is different in the result that different time executes intelligent contract, in above-mentioned executive mode, intelligent contract
Call request is packaged into after transactions requests, and block chain node can send at any time or postpone to send, corresponding, other blocks
Chain link point can also be immediately performed after receiving or postpone to execute, and accordingly, there exist the uncertain defects of implementing result.
Summary of the invention
The embodiment of the invention provides transactions requests processing method, device, equipment and the media of a kind of intelligent contract, can
It is effectively prevent the delayed execution of intelligent contract call request, result caused by avoiding because of delayed execution is uncertain.
In a first aspect, being applied to the embodiment of the invention provides a kind of transactions requests processing method based on intelligent contract
Block chain node, this method comprises:
Generate the transactions requests based on Intelligent target contract;
Pre-execution operation is carried out to the transactions requests according to local data, determines that input dependence data acquisition system and output become
More data acquisition system;
By the transactions requests, input dependence data acquisition system and output change data acquisition system binding, and it is transmitted to block chain
Network, to request other nodes in block chain network to execute the transactions requests.
Second aspect, the embodiment of the invention also provides a kind of transactions requests processing method based on intelligent contract, applications
In block chain node, this method comprises:
Obtain the transactions requests transmitted in block chain network, input dependence data acquisition system and output change data acquisition system;
During executing the transactions requests, input data involved in the transactions requests and output data are determined;
By the input data and output data, with the input dependence data acquisition system of acquisition and output change data acquisition system into
Row uniformity comparison;
According to comparison result, the validity that the transactions requests execute is determined.
The third aspect, the embodiment of the invention also provides a kind of transactions requests processing unit based on intelligent contract, configurations
In block chain node, which includes:
Transactions requests generation module, for generating the transactions requests based on Intelligent target contract;
Data acquisition system determining module determines defeated for carrying out pre-execution operation to the transactions requests according to local data
Enter to rely on data acquisition system and output change data acquisition system;
Transmission module, for the transactions requests, input dependence data acquisition system and output change data acquisition system to be bound, and
It is transmitted to block chain network, to request other nodes in block chain network to execute the transactions requests.
Fourth aspect, the embodiment of the invention also provides a kind of transactions requests processing unit based on intelligent contract, configurations
In block chain node, which includes:
Module is obtained, for obtaining the transactions requests transmitted in block chain network, input dependence data acquisition system and output
Change data acquisition system;
Data determining module, for determining defeated involved in the transactions requests during executing the transactions requests
Enter data and output data;
Data comparing module, for by the input data and output data, with the input dependence data acquisition system of acquisition and
Output change data acquisition system carries out uniformity comparison;
Validity determining module, for determining the validity that the transactions requests execute according to comparison result.
5th aspect, the embodiment of the invention provides a kind of equipment, comprising:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing
Device realizes any transactions requests processing method based on intelligent contract in first aspect, or realizes in second aspect and appoint
The meaning transactions requests processing method based on intelligent contract.
6th aspect, the embodiment of the invention provides a kind of computer readable storage mediums, are stored thereon with computer journey
Sequence realizes any transactions requests processing side based on intelligent contract in first aspect when the program is executed by processor
Method, or realize any transactions requests processing method based on intelligent contract in second aspect.
Transactions requests processing method, device, equipment and medium provided in an embodiment of the present invention based on intelligent contract, block
Chain node is after generating the transactions requests based on Intelligent target contract, it will is held in advance according to local data to the transactions requests
Row operation determines input dependence data acquisition system and output change data acquisition system, then by identified input dependence data acquisition system
Data acquisition system is changed with output, block chain network is bound and be transmitted to the transactions requests, so that other in block chain network
Node executes the transactions requests.Since the result for executing intelligent contract in different time is different, this programme, the initiation of transactions requests
Node to block chain network transmission transaction when requesting, together by the input dependence data acquisition system of the transactions requests locally determined
It is transmitted together with output change data acquisition system, is equivalent to and constructs the effective constraint condition of the transactions requests in advance, convenient for subsequent
Other nodes determine the validity of the result performed by itself according to the constraint condition, and then can effectively prevent intelligent contract tune
With the delayed execution of request, result caused by avoiding because of delayed execution is uncertain.
Detailed description of the invention
Fig. 1 is a kind of process of the transactions requests processing method based on intelligent contract provided in the embodiment of the present invention one
Figure;
Fig. 2 is a kind of process of the transactions requests processing method based on intelligent contract provided in the embodiment of the present invention two
Figure;
Fig. 3 is a kind of process of the transactions requests processing method based on intelligent contract provided in the embodiment of the present invention three
Figure;
Fig. 4 is a kind of process of the transactions requests processing method based on intelligent contract provided in the embodiment of the present invention four
Figure;
Fig. 5 is a kind of process of the transactions requests processing method based on intelligent contract provided in the embodiment of the present invention five
Figure;
Fig. 6 is a kind of process of the transactions requests processing method based on intelligent contract provided in the embodiment of the present invention six
Figure;
Fig. 7 is that a kind of structure of the transactions requests processing unit based on intelligent contract provided in the embodiment of the present invention seven is shown
It is intended to;
Fig. 8 is the structural representation that the present invention implements a kind of transactions requests processing unit based on intelligent contract provided in eight
Figure;
Fig. 9 is a kind of structural schematic diagram of the equipment provided in the embodiment of the present invention nine.
Specific embodiment
The embodiment of the present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this
Locate described specific embodiment and is used only for explaining the embodiment of the present invention, rather than limitation of the invention.It further needs exist for
Bright, only parts related to embodiments of the present invention are shown for ease of description, in attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is a kind of flow chart for transactions requests processing method based on intelligent contract that the embodiment of the present invention one provides,
The present embodiment is applicable to how the transactions requests based on intelligent contract are avoided causing to execute because delay executes transactions requests
As a result uncertain situation.Transactions requests processing method of the whole series based on intelligent contract can by transactions requests initiation node and
Other nodes cooperation for executing the transactions requests executes.The scheme of the embodiment of the present invention is by the block chain node in block chain network
It executing, the initiation nodes of transactions requests executes specially in block chain network, which can be normal block chain node,
It is also possible to lightweight node.Wherein, lightweight node refers to the deployment data for being deployed with block chain, such as intelligent contract, common recognition
Mechanism etc., but the block chain network node of not stored or storage section block data and Transaction Information, can participate in block chain
Transactions requests interactive process, lightweight node can generally be deployed in terminal device.
The scheme of the embodiment of the present invention can be by being executed based on the transactions requests processing unit of intelligent contract, which can
It is realized, and can be integrated in the calculating equipment of carrying block chain link point by the way of hardware and/or software.Referring to Fig. 1, the party
Method can specifically include:
S110 generates the transactions requests based on Intelligent target contract.
In the present embodiment, intelligent contract, which refers to, to be called based on what Plugin Mechanism was write for the node in block chain network
And the code segment executed, the execution of an intelligent contract can be achieved at least one function or handle a kind of transactions requests;It can be
It makes an appointment, is stored in wound generation block when block chain creation;It can also be and create what process dynamics added in block chain,
It is stored in a certain block;It is local that block chain node can also be stored in independently of block chain.Optionally, block chain node can portion
Multiple intelligent contracts are affixed one's name to, different intelligent contracts can correspond to different functions.Intelligent target contract refers to that localized nodes are disposed
Intelligent contract in one.
Transactions requests can be the locally generated issued transaction demand of localized nodes, or receive a certain trigger mechanism such as
When the issued transaction demand that three method, apparatus (such as client, terminal device or server) are sent, according to the issued transaction demand
Intelligent target contract is determined, then based on other sections for being used to request caused by the Intelligent target contract in block chain network
Point, as current block chain generates the request of certain affairs of node processing.
For example, localized nodes are detecting that user clicks affairs button event on localized nodes, it is determined that generate affairs
Process demand;Issued transaction demand interface can be showed to user later, and according to the input and/or selection of acquired user
Operation, determines Intelligent target contract;And then generate the transactions requests based on the Intelligent target contract.
If localized nodes according to user input, determine invocation target intelligence contract " contract.add " to count into
Row plus 1 processing, then the generated transactions requests based on Intelligent target contract are as follows:
S120 carries out pre-execution operation to transactions requests according to local data, determines input dependence data acquisition system and output
Change data acquisition system.
In the present embodiment, local data is the localization data of block chain node.Optionally, if localized nodes are general areas
Block chain node then directly can get the data from local;If localized nodes are lightweight node, can be from block link network
Other nodes in network obtain local data.
Pre-execution operation is localized nodes after determining transactions requests of the generation based on Intelligent target contract, is existed in advance
The transactions requests are locally executed, then execute the operation sent to block chain network again.
Optionally, transactions requests need to rely in the process of implementation some data with existing in local data, and may change,
Some data are deleted or increased newly, that is, correspond to input dependence data and output change data.Input dependence data refer to that affairs are asked
Seek the data for needing to read from local data in the process of implementation;Output change data to be updated after executing for transactions requests
The data of (such as increase, change or delete).In turn, input dependence data acquisition system is needed by transactions requests in the process of implementation
All data read from local data are constituted, that is to say, that are made of all input dependence data of transactions requests;
It specifically can be input dependence data clear text composition, can also be and relevant treatment is carried out (such as encryption or pressure to input dependence data
Contracting processing etc.) constitute afterwards etc..
Corresponding, output change data acquisition system to be updated after being executed by transactions requests, and (such as increase, change are deleted
Deng) all data constituted, that is to say, that by transactions requests all outputs change data constituted;It specifically can be defeated
Change data clear text is constituted out, be can also be and is carried out relevant treatment (such as encryption or compression processing) structure afterwards to output change data
At etc..
In the present embodiment, the data of reading or the data of update may include parameter name and specific parameter value.Example
Property, input dependence data acquisition system may include the required parameter name and parameter read during pre-execution transactions requests
Value;Output change data acquisition system includes the parameter name to be updated after transactions requests described in pre-execution and parameter value.
Specifically, localized nodes can carry out pre-execution behaviour to the locally generated transactions requests based on Intelligent target contract
Make, and in implementation procedure, input dependence data acquisition system and output change data acquisition system are determined based on local data.For above-mentioned mesh
The example that intelligent contract is " contract.add " is marked, if count is 3 in local data, localized nodes should in local pre-execution
During transactions requests, input dependence data acquisition system can be determined are as follows: { count=3 };Output change data acquisition system are as follows:
Output is { count=4 }.
The transactions requests as caused by localized nodes are the transactions requests based on Intelligent target contract, localized nodes
Virtual machine can be called to run the Intelligent target contract, and then realize the pre-execution to transactions requests.Illustratively, according to local
Data carry out pre-execution operation to transactions requests, determine input dependence data acquisition system and output change data acquisition system may include:
It determines and is read from local data in Intelligent target contract implementation procedure in local runtime Intelligent target contract according to transactions requests
The data taken, as input dependence data, and the data being written into local data, data are changed as output, thus
Form input dependence data acquisition system and output change data acquisition system.
It should be noted that the transactions requests data to be updated after executing and (such as increase, change or delete), need more
Newly into local data.
Specifically, localized nodes can obtain the title of Intelligent target contract from transactions requests and user is inputted
Parameter name etc.;Later using the parameter name as the input of Intelligent target contract, virtual machine is called, the Intelligent target is run
Contract;Simultaneously in the implementation procedure of Intelligent target contract, the data that read from local data are determined, and to local data
The data of middle write-in, and using the data read from local data as input dependence data, by what is be written into local data
Data are as output change data;And then form input dependence number can be distinguished according to input dependence data and output change data
According to set and output change data acquisition system.
S130 by transactions requests, input dependence data acquisition system and output change data acquisition system binding, and is transmitted to block chain
Network, to request other nodes in block chain network to execute transactions requests.
In the present embodiment, transactions requests, input dependence data acquisition system and output change data acquisition system binding are referred to
Establish the incidence relation between input dependence data acquisition system and output change data acquisition system, with transactions requests;Specifically can be by
Input dependence data acquisition system and output change data acquisition system are added in the preset field of transactions requests.
Specifically, localized nodes are after the input dependence data acquisition system that determines transactions requests and output change data, it can
Input dependence data acquisition system and output change data acquisition system to be added in the preset field of transactions requests, then by the affairs
Request is transmitted to block chain network;After other nodes in block chain network get the transactions requests, the thing can be executed
Business request, the dependence data acquisition system that can then input according to transactions requests and output change data acquisition system determine that transactions requests execute
Validity.It, can also be according to the defeated of the transactions requests after other nodes in block chain network get the transactions requests
Enter to rely on data acquisition system and output change data acquisition system determines dependence between the transactions requests and other transactions requests, into
And the transactions requests etc. are executed according to dependence.
Illustratively, input dependence data acquisition system and output change data acquisition system, for receiving the block of transactions requests
Chain node carries out dependence data verification when executing transactions requests, to determine the validity of transactions requests execution.
Specifically, localized nodes are after the input dependence data acquisition system that determines transactions requests and output change data, it can
To bind transactions requests, input dependence data acquisition system and output change data acquisition system, and it is transmitted to block chain network.Block chain
After other nodes in network get the transactions requests, the transactions requests can be executed, can specifically be asked executing affairs
During asking, input data and output data involved in transactions requests are determined;Then by input data and output data, and obtain
The input dependence data acquisition system and output change data acquisition system of the transactions requests taken carry out uniformity comparison;And then can according to than
Pair as a result, determine the transactions requests execute validity.
Technical solution provided in an embodiment of the present invention, block chain node are generating the transactions requests based on Intelligent target contract
Afterwards, it will pre-execution operation is carried out to the transactions requests according to local data, determines input dependence data acquisition system and output change
Data acquisition system, then by identified input dependence data acquisition system and output change data acquisition system, simultaneously with transactions requests binding
It is transmitted to block chain network, so that other nodes in block chain network execute the transactions requests.Due to being executed in different time
The result of intelligent contract is different, this programme, and the initiation node of transactions requests to block chain network transmission transaction when requesting, together
The input dependence data acquisition system of the transactions requests locally determined and output change data acquisition system are transmitted together, are equivalent in advance
The effective constraint condition of the transactions requests is constructed, is determined performed by itself convenient for other subsequent nodes according to the constraint condition
As a result validity, and then it can be effectively prevent the delayed execution of intelligent contract call request, caused by avoiding because of delayed execution
As a result uncertain;In addition, other nodes can also determine affairs according to input dependence data acquisition system and output change data acquisition system
Dependence between request, to maximize the parallel processing for realizing transactions requests, speed up processing.
Embodiment two
Fig. 2 is a kind of flow chart of the transactions requests processing method based on intelligent contract provided by Embodiment 2 of the present invention,
The present embodiment on the basis of the above embodiments, provide it is a kind of according to local data to transactions requests carry out pre-execution operation,
Determine the mode of input dependence data acquisition system and output change data acquisition system.Referring to fig. 2, this method can specifically include:
S210 generates the transactions requests based on Intelligent target contract.
S220 carries out pre-execution operation to transactions requests according to local data, to determine that input dependence data and output become
More data.
Specifically, localized nodes can call virtual machine, generated transactions requests are locally being first carried out in advance;And then it determines
Input dependence data and output change data.
S230, is encrypted input dependence data or Hash is handled, to form input dependence data acquisition system.
In the present embodiment, localized nodes, can be directly with number after determining input dependence data and output change data
Input dependence data acquisition system and output change data acquisition system are formed according to plaintext.But in order to guarantee the safety of data, the machine section
Put cipher mode specified by the key (such as private key of unsymmetrical key centering) that can use itself or block chain network
Deng, respectively to input dependence data and output change data be encrypted.
In addition, in the limited situation of bandwidth, in order to accelerate transmission rate, localized nodes can to input dependence data and
Output change data carry out compression processing, to reduce the data volume of transmission, and then accelerate transmission rate.Since Hash operation has
High security, and data bit can be reduced, in the present embodiment, it is preferred to use Hash operation changes input dependence data and output
Data carry out compression processing.Such as SHA256 (Secure Hash Algorithm, secure hash algorithm) algorithm or MD5 algorithm
Deng.
Localized nodes can determine input dependence data acquisition system using following manner, be specifically chosen which kind of mode, the machine section
Point can be determined according to actual needs.Specifically, 1) localized nodes can use the key pair input dependence data of itself
It is encrypted, and then forms input dependence data acquisition system;2) input dependence data can also be carried out using hash algorithm
Hash processing, and then form input dependence data acquisition system;3) first input dependence data can also be breathed out using hash algorithm
Uncommon processing, is then encrypted using the key pair Hash processing result of itself, and then forms input dependence data acquisition system.
S240, is encrypted output change data or Hash is handled, and exports change data acquisition system to be formed.
Identical as the mode of input dependence data acquisition system is determined, localized nodes can determine output change using following manner
Which kind of mode data acquisition system, be specifically chosen, and localized nodes can be determined according to actual needs.Specifically, 1) localized nodes
It can be encrypted using the key pair output change data of itself, and then form output change data acquisition system;2) may be used also
To carry out Hash processing to output change data using hash algorithm, and then form output change data acquisition system;It 3) can also be first
Hash processing is carried out to output change data using hash algorithm, is then added using the key pair Hash processing result of itself
Close processing, and then form output change data acquisition system.
S250 by transactions requests, input dependence data acquisition system and output change data acquisition system binding, and is transmitted to block chain
Network, to request other nodes in block chain network to execute transactions requests.
Technical solution provided in an embodiment of the present invention, block chain node according to local data to generated transactions requests
Pre-execution operation is carried out, it, can be respectively to input dependence data and defeated after determining input dependence data and output change data
Change data carry out Hash processing etc. out, and then make the input dependence data acquisition system to be formed and output change data acquisition system, have
Less data amount and higher safety etc.;In turn, it accelerates to block chain network transmission input dependence data acquisition system, defeated
The rate of data acquisition system and transactions requests is changed out.
Embodiment three
Fig. 3 is a kind of flow chart for transactions requests processing method based on intelligent contract that the embodiment of the present invention three provides,
The present embodiment on the basis of the above embodiments, to input dependence data acquisition system and output change data acquisition system, is being used to receive
Block chain node to transactions requests carries out dependence data verification when executing transactions requests, to determine having for transactions requests execution
It is further to optimize under the scene of effect property.Referring to Fig. 3, this method be can specifically include:
S310 generates the transactions requests based on Intelligent target contract.
S320 carries out pre-execution operation to transactions requests according to local data, determines input dependence data acquisition system and output
Change data acquisition system.
S330 by transactions requests, input dependence data acquisition system and output change data acquisition system binding, and is transmitted to block chain
Network, to request other nodes in block chain network to execute transactions requests.
S340, after waiting preset duration, poll block chain, to determine whether be stored with transactions requests association in block chain
Transaction Information.
In the present embodiment, preset duration be it is preset, the initiation node of transactions requests is sent to by transactions requests
After block chain network, waiting period, such as 10s required for inquiring the associated Transaction Information of the transactions requests on chain are want.It is optional
, preset duration can be adjusted flexibly according to the actual situation.
Optionally, can be with poll local block chain if localized nodes are normal block chain nodes, and then determine block chain
In whether be stored with the associated Transaction Information of the transactions requests.It, can be to block link network if localized nodes are lightweight nodes
Whether other nodes in network send polling request, to request other node feeding back polling results, and then determine and deposit in block chain
Contain the associated Transaction Information of the transactions requests.
It should be noted that the frequency of poll block chain, can carry out true according to the actually located network environment of localized nodes
It is fixed, it is inferior can be such as spaced 2s poll one.
Specifically, localized nodes are bound by transactions requests, input dependence data acquisition system and output change data acquisition system, and
It is transmitted to after block chain network, it, can be with poll block chain, to determine the affairs itself initiated if having waited preset duration
Whether request is executed by other nodes, that is, determines in block chain whether be stored with the associated Transaction Information of transactions requests.
S350, in determining block chain it is not stored have the associated Transaction Information of transactions requests after, pre-execution affairs are asked again
It asks to determine input dependence data acquisition system and output change data acquisition system, and sends transactions requests, Yi Jichong to block chain network
Newly determining input dependence data acquisition system and output change data acquisition system.
Specifically, since the result for executing intelligent contract in different time is different, localized nodes in determining block chain not
After being stored with the associated Transaction Information of transactions requests, need to re-execute the process of S320 and S330, i.e. pre-execution affairs again
Request with determine input dependence data acquisition system and output change data acquisition system, and to block chain network send transactions requests and
The input dependence data acquisition system and output change data acquisition system redefined.
Optionally, localized nodes are stored with the associated Transaction Information of transactions requests in determining block chain, then can be by this
Ground pre-execution data, that is, input dependence data acquisition system and output change data acquisition system are deleted.
It should be noted that localized nodes by way of poll block chain, can determine that the affairs itself initiated are asked
Seeking Truth is no to be performed;In the case where determination is not performed, the mode of S350 can be used, to ensure that the transactions requests finally can
The phenomenon that really being executed, being avoided the occurrence of without feedback, to promote the satisfaction of user.
Technical solution provided in an embodiment of the present invention, block chain node by transactions requests, input dependence data acquisition system and
Output change data acquisition system binding, and be transmitted to after block chain network, itself can be determined by way of poll block chain
Whether the transactions requests initiated are executed by other nodes, that is, determine in block chain whether be stored with the associated affairs of transactions requests
Data;In determining block chain it is not stored have the associated Transaction Information of transactions requests after, can carry out the affairs locally again and ask
The pre-execution operation asked, and operation is sent, ensure that transactions requests can be executed really by this method.
Example IV
Fig. 4 is a kind of flow chart for transactions requests processing method based on intelligent contract that the embodiment of the present invention four provides,
The present embodiment is applicable to the case where handling the transactions requests based on intelligent contract, is particularly suitable for for based on intelligence
How the transactions requests of contract avoid leading to the uncertain situation of implementing result because delay executes transactions requests.The whole series are based on intelligence
The transactions requests processing method of energy contract can be matched by the initiation node of transactions requests with other nodes for executing the transactions requests
It closes and executes.Wherein, the initiation node of transactions requests can using any way in embodiment one to three to transactions requests at
Reason.The scheme of the embodiment of the present invention is executed by the block chain node in block chain network, is specially obtained in block chain network
It is executed to transactions requests node, which can be current block and generate node.The scheme of the embodiment of the present invention can be by base
It is executed in the transactions requests processing unit of intelligent contract, which can be used hardware and/or the mode of software is realized, and can collect
At in the calculating equipment of carrying block chain link point.Referring to fig. 4, this method can specifically include:
S410 obtains the transactions requests transmitted in block chain network, input dependence data acquisition system and output change data
Set.
In the present embodiment, input dependence data acquisition system and output change data acquisition system are being produced by the initiation node of transactions requests
After raw transactions requests, pre-execution operation is carried out to transactions requests according to its local data and is determined.Specifically, input dependence data
Gather all data for needing to read from local data during pre-execution by transactions requests to be constituted, that is to say, that by
All input dependence data of transactions requests are constituted;It specifically can be input dependence data clear text composition, can also be to defeated
Enter to rely on data and carries out relevant treatment (such as encryption or compression processing) composition etc. afterwards.It is corresponding, output change data acquisition system by
It to be updated all data (such as increase, change or deletion etc.) after transactions requests pre-execution to constitute, that is to say, that by affairs
All outputs change data of request are constituted;It specifically can be output change data clear text to constitute, can also be and output is become
More data carry out relevant treatment (such as encryption or compression processing) composition etc. afterwards.
Illustratively, input dependence data acquisition system and output change data acquisition system can be data clear text, or for via
The data ciphertext that encryption obtains, or the compressed data to be handled via Hash.
The data of reading or the data of update may include parameter name and specific parameter value.Illustratively, input according to
Bad data acquisition system may include the required parameter name read and parameter value during pre-execution transactions requests;Output change number
Include the parameter name to be updated after transactions requests described in pre-execution and parameter value according to set.
Optionally, in the present embodiment, input dependence data acquisition system and output change data acquisition system and transactions requests, which have, to be closed
Connection relationship, e.g., input dependence data acquisition system and output change data acquisition system are stored in the preset field of transactions requests.
Specifically, localized nodes can obtain transactions requests from block chain network, then extracted from transactions requests defeated
Enter to rely on data acquisition system and output change data acquisition system.
S420 determines input data and output data involved in transactions requests during executing transactions requests.
In the present embodiment, input data refers to that localized nodes rely on (such as required reading during executing transactions requests
Take) data, may include parameter name and design parameter value;Output data refers to institute after localized nodes execute the transactions requests
The data for needing to update (such as newly-increased, deletion after change), also may include parameter name and design parameter value.
Specifically, localized nodes are after getting transactions requests in block chain network, it can be according to the transactions requests
It determines the title for the Intelligent target contract to be called and the input parameter of Intelligent target contract, and then calls virtual machine, fortune
The row Intelligent target contract;In the operational process of Intelligent target contract, the data read required for Intelligent target contract are determined,
And the data to be updated, and then determine input data and output data involved in the transactions requests.
S430, by input data and output data, input dependence data acquisition system and output change data acquisition system with acquisition
Carry out uniformity comparison.
Specifically, localized nodes are after determining input data and output data involved in transactions requests, can first by
The data mode (such as can be data clear text, data ciphertext or compressed data) of input data and output data be processed into,
Input dependence data acquisition system data mode identical with output change data acquisition system;Then respectively by the defeated of input data and acquisition
Enter to rely on data acquisition system and be compared, output data is compared with the output of acquisition change data acquisition system;If the two compares
It is consistent, it is determined that comparison passes through;If there are any one comparison is inconsistent in the two, it is determined that comparison does not pass through.
S440 determines the validity that transactions requests execute according to comparison result.
Specifically, if the output of the input dependence data acquisition system and output data and acquisition of input data and acquisition becomes
More data acquisition system, the two compare consistent, it is determined that comparison passes through, and then can determine the transactions requests execution be it is effective,
That is the transactions requests are validity;If there are any one comparison is inconsistent in the two, it is determined that comparison does not pass through,
It can then determine that the execution of the transactions requests is invalid, that is to say, that the transactions requests are invalid.
Illustratively, according to comparison result, if determining that the validity that transactions requests execute may include: to compare to pass through,
Then determine that the implementing result of transactions requests is effective, is stored in implementing result as Transaction Information in block chain;Otherwise, thing is abandoned
Business request, input dependence data acquisition system and output change data acquisition system.
Specifically, passing through if comparing, it is determined that the implementing result of transactions requests is validity, then can be by implementing result
It is written in current block as Transaction Information, and current block is transmitted to block chain network, so as to the initiation section of transactions requests
Point is available.If comparison does not pass through, it is determined that the implementing result of transactions requests be it is invalid, localized nodes then can will be from area
Transactions requests, input dependence data acquisition system and the output change data acquisition system obtained in block chain network abandons, while can be by this
Implementing result discarding of transactions requests etc..
It should be noted that since the result for executing intelligent contract in different time is different, if network delay is allowing
In the range of, it can be by the way that input dependence data acquisition system determined by node pre-execution and output change data will be initiated, with reception
Input data determined by the node of transactions requests and output data are compared, and determine whether the node for receiving transactions requests is deposited
The phenomenon that delay executes transactions requests;If it exists, these will eventually be lost against the transactions requests for initiating user's original idea
It abandons.
Technical solution provided in an embodiment of the present invention, block chain node by the input that will be obtained from block chain network according to
Rely data acquisition system and output change data acquisition system, is carried out with input data determined by itself execution transactions requests and output data
Uniformity comparison, and then can determine the validity that transactions requests execute.Compared to existing technical solution, the present embodiment is to determine
The validity that transactions requests execute provides a kind of new approaches, can effectively prevent the delayed execution of intelligent contract call request,
Result caused by avoiding because of delayed execution is uncertain, and then guarantees the Recycle mechanism of block chain network.
Embodiment five
Fig. 5 is a kind of flow chart for transactions requests processing method based on intelligent contract that the embodiment of the present invention five provides,
The present embodiment on the basis of the above embodiments, input dependence data acquisition system and output change data acquisition system be data ciphertext or
Under the scene of compressed data, to by input data and output data, number is changed with the input dependence data acquisition system of acquisition and output
Uniformity comparison is carried out according to set to be explained.Referring to Fig. 5, this method be can specifically include:
S510 obtains the transactions requests transmitted in block chain network, input dependence data acquisition system and output change data
Set.
S520 determines input data and output data involved in transactions requests during executing transactions requests.
S530, is respectively encrypted input data and output data or Hash is handled, and obtains local data ciphertext
Or locally compressed data.
In the present embodiment, if the data mode data of the input dependence data acquisition system and output change data acquisition system that obtain are bright
Text, then the input dependence data set that localized nodes can directly by input data and output data, with acquisition after executing S520
It closes and output change data acquisition system carries out uniformity comparison;If the input dependence data acquisition system and output change data acquisition system that obtain
Data mode be not data clear text, be data ciphertext or compressed data, localized nodes need to be using place identical with node is initiated
Reason mode handles input data and output data.
Specifically, if the data mode of the input dependence data acquisition system and output change data acquisition system that obtain is that data are close
Text, then localized nodes can respectively be encrypted input data and output data, and then obtain local data ciphertext.If
The input dependence data acquisition system of acquisition and the data mode of output change data acquisition system are compressed data, then localized nodes can divide
It is other that Hash processing is carried out to input data and output data, and then obtain locally compressed data etc..
S540, by the local data ciphertext or locally compressed data of input data and output data, input with acquisition according to
The data ciphertext or locally compressed data for relying data acquisition system and output change data acquisition system carry out uniformity comparison.
Specifically, localized nodes are processed into and input dependence data acquisition system and output by input data and output data
After changing the identical data mode (such as local data ciphertext or locally compressed data) of data acquisition system, can by input data and
The local data ciphertext or locally compressed data of output data, input dependence data acquisition system and output change data set with acquisition
The data ciphertext of conjunction or locally compressed data carry out uniformity comparison, and then according to comparison result, determine what transactions requests executed
Validity.
S550 determines the validity that transactions requests execute according to comparison result.
Technical solution provided in an embodiment of the present invention, block chain node by the input that will be obtained from block chain network according to
Rely data acquisition system and output change data acquisition system, is carried out with input data determined by itself execution transactions requests and output data
Uniformity comparison, and then can determine the validity that transactions requests execute.Compared to existing technical solution, the present embodiment is to determine
The validity that transactions requests execute provides a kind of new approaches, can effectively prevent the delayed execution of intelligent contract call request,
Result caused by avoiding because of delayed execution is uncertain, and then guarantees the Recycle mechanism of block chain network.
Embodiment six
Fig. 6 is a kind of flow chart for transactions requests processing method based on intelligent contract that the embodiment of the present invention six provides,
The present embodiment on the basis of the above embodiments, provides the node of a kind of transactions requests initiated node and receive transactions requests
Cooperation, transactions requests are handled, with determine transactions requests execute validity the case where.Referring to Fig. 6, this method specifically may be used
To include:
S610, block chain node generate the transactions requests based on Intelligent target contract.
S620, block chain node carry out pre-execution operation to transactions requests according to local data, determine input dependence data
Set and output change data acquisition system.
S630, block chain node binds transactions requests, input dependence data acquisition system and output change data acquisition system, and passes
Transport to block chain network.
S640, other nodes obtain transactions requests, input dependence data acquisition system and the output transmitted in block chain network
Change data acquisition system.
S650, other nodes determine input data and output involved in transactions requests during executing transactions requests
Data.
S660, other nodes change input data and output data with the input dependence data acquisition system of acquisition and output
Data acquisition system carries out uniformity comparison.
S670, other nodes determine the validity that transactions requests execute according to comparison result.
Technical solution provided in an embodiment of the present invention, block chain node are generating the transactions requests based on Intelligent target contract
Afterwards, it will pre-execution operation is carried out to the transactions requests according to local data, determines input dependence data acquisition system and output change
Data acquisition system, then by identified input dependence data acquisition system and output change data acquisition system, simultaneously with transactions requests binding
It is transmitted to block chain network;After other nodes in block chain network get the transactions requests, the affairs can be executed and asked
It asks, the dependence data acquisition system and output change data acquisition system that can then input according to transactions requests determine having for transactions requests execution
Effect property.Since the result for executing intelligent contract in different time is different, this programme, the initiation nodes of transactions requests is to block chain
When network transmission transactions requests, together by the input dependence data acquisition system of the transactions requests locally determined and output change data
Set is transmitted together, is equivalent to and is constructed the effective constraint condition of the transactions requests in advance, should convenient for subsequent other nodes foundation
Constraint condition determines the validity of the result performed by itself, and then the delay of intelligent contract call request can be effectively prevent to hold
Row, result caused by avoiding because of delayed execution are uncertain.
Embodiment seven
Fig. 7 is a kind of structural representation for transactions requests processing unit based on intelligent contract that the embodiment of the present invention seven provides
Figure, the device are configured in block chain node, which can be performed provided by the embodiment of the present invention one to three based on intelligence
The transactions requests processing method of contract has the corresponding functional module of execution method and beneficial effect.As shown in fig. 7, the device
Include:
Transactions requests generation module 710, for generating the transactions requests based on Intelligent target contract;
Data acquisition system determining module 720 determines input for carrying out pre-execution operation to transactions requests according to local data
Rely on data acquisition system and output change data acquisition system;
Transmission module 730, for transactions requests, input dependence data acquisition system and output change data acquisition system to be bound, and
It is transmitted to block chain network, to request other nodes in block chain network to execute transactions requests.
Technical solution provided in an embodiment of the present invention, block chain node are generating the transactions requests based on Intelligent target contract
Afterwards, it will pre-execution operation is carried out to the transactions requests according to local data, determines input dependence data acquisition system and output change
Data acquisition system, then by identified input dependence data acquisition system and output change data acquisition system, simultaneously with transactions requests binding
It is transmitted to block chain network, so that other nodes in block chain network execute the transactions requests.Due to being executed in different time
The result of intelligent contract is different, this programme, and the initiation node of transactions requests to block chain network transmission transaction when requesting, together
The input dependence data acquisition system of the transactions requests locally determined and output change data acquisition system are transmitted together, are equivalent in advance
The effective constraint condition of the transactions requests is constructed, is determined performed by itself convenient for other subsequent nodes according to the constraint condition
As a result validity, and then it can be effectively prevent the delayed execution of intelligent contract call request, caused by avoiding because of delayed execution
As a result uncertain;In addition, other nodes can also determine affairs according to input dependence data acquisition system and output change data acquisition system
Dependence between request, to maximize the parallel processing for realizing transactions requests, speed up processing.
Illustratively, data acquisition system determining module 720 specifically can be used for:
According to transactions requests, in local runtime Intelligent target contract, determine in Intelligent target contract implementation procedure from local
The data read in data, as input dependence data, and the data being written into local data, number is changed as output
According to form input dependence data acquisition system and output change data acquisition system.
Illustratively, input dependence data acquisition system may include the required parameter read during pre-execution transactions requests
Title and parameter value;Output change data acquisition system may include the parameter name and parameter to be updated after pre-execution transactions requests
Value.
Illustratively, data acquisition system determining module 720 specifically can be also used for:
Pre-execution operation is carried out to transactions requests according to local data, to determine input dependence data and output change number
According to;
Input dependence data are encrypted or Hash is handled, to form input dependence data acquisition system;
Output change data are encrypted or Hash is handled, export change data acquisition system to be formed.
Illustratively, input dependence data acquisition system and output change data acquisition system, for receiving the block of transactions requests
Chain node carries out dependence data verification when executing transactions requests, to determine the validity of transactions requests execution.
Illustratively, above-mentioned apparatus can also include:
Poller module for binding by transactions requests, input dependence data acquisition system and output change data acquisition system, and passes
It transports to after block chain network, after waiting preset duration, poll block chain, to determine that whether being stored with affairs in block chain asks
Seek associated Transaction Information;
Re-execute module, in determining block chain it is not stored have the associated Transaction Information of transactions requests after, again
Pre-execution transactions requests send affairs to block chain network to determine input dependence data acquisition system and output change data acquisition system
Request and the input dependence data acquisition system redefined and output change data acquisition system.
Embodiment eight
Fig. 8 is a kind of structural representation for transactions requests processing unit based on intelligent contract that the embodiment of the present invention eight provides
Figure, the device are configured in block chain node, which can be performed provided by the embodiment of the present invention four to five based on intelligence
The transactions requests processing method of contract has the corresponding functional module of execution method and beneficial effect.As shown in figure 8, the device
Include:
Module 810 is obtained, for obtaining the transactions requests transmitted in block chain network, input dependence data acquisition system and defeated
Data acquisition system is changed out;
Data determining module 820, for determining input data involved in transactions requests during executing transactions requests
And output data;
Data comparing module 830, for by input data and output data, with the input dependence data acquisition system of acquisition and defeated
Change data acquisition system carries out uniformity comparison out;
Validity determining module 840, for determining the validity that transactions requests execute according to comparison result.
Technical solution provided in an embodiment of the present invention, block chain node by the input that will be obtained from block chain network according to
Rely data acquisition system and output change data acquisition system, is carried out with input data determined by itself execution transactions requests and output data
Uniformity comparison, and then can determine the validity that transactions requests execute.Compared to existing technical solution, the present embodiment is to determine
The validity that transactions requests execute provides a kind of new approaches, can effectively prevent the delayed execution of intelligent contract call request,
Result caused by avoiding because of delayed execution is uncertain, and then guarantees the Recycle mechanism of block chain network.
Illustratively, input dependence data acquisition system may include the required parameter read during pre-execution transactions requests
Title and parameter value;Output change data acquisition system may include the parameter name and parameter to be updated after pre-execution transactions requests
Value.
Illustratively, input dependence data acquisition system and output change data acquisition system can be data clear text, or for via
The data ciphertext that encryption obtains, or the compressed data to be handled via Hash.
Illustratively, if input dependence data acquisition system and output change data acquisition system be data ciphertext or compressed data,
Data comparing module 830 specifically can be used for:
Input data and output data are encrypted respectively or Hash is handled, obtains local data ciphertext or local
Compressed data;
Input dependence data by the local data ciphertext or locally compressed data of input data and output data, with acquisition
The data ciphertext or locally compressed data of set and output change data acquisition system carry out uniformity comparison.
Illustratively, validity determining module 840 specifically can be used for:
If comparison passes through, it is determined that the implementing result of transactions requests is effective, stores implementing result as Transaction Information
In block chain;
Otherwise, transactions requests, input dependence data acquisition system and output change data acquisition system are abandoned.
Embodiment nine
Fig. 9 is a kind of structural schematic diagram for equipment that the embodiment of the present invention nine provides, and Fig. 9, which is shown, to be suitable for being used to realizing this
The block diagram of the example devices of inventive embodiments embodiment.The equipment that Fig. 9 is shown is only an example, should not be to the present invention
The function and use scope of embodiment bring any restrictions.12 typical case of equipment can be the meter for undertaking block chain network nodal function
Calculate equipment.
As shown in figure 9, equipment 12 is showed in the form of universal computing device.The component of equipment 12 may include but unlimited
In one or more processor 16, system storage 28, different system components (including system storage 28 and processing are connected
Device 16) bus 18.
Bus 18 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller,
Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts
For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC)
Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Equipment 12 typically comprises a variety of computer system readable media.These media can be it is any can be by equipment 12
The usable medium of access, including volatile and non-volatile media, moveable and immovable medium.
System storage 28 may include the computer system readable media of form of volatile memory, such as arbitrary access
Memory (RAM) 30 and/or cache memory 32.Equipment 12 may further include it is other it is removable/nonremovable,
Volatile/non-volatile computer system storage medium.Only as an example, storage system 34 can be used for reading and writing irremovable
, non-volatile magnetic media (Fig. 9 do not show, commonly referred to as " hard disk drive ").Although being not shown in Fig. 9, use can be provided
In the disc driver read and write to removable non-volatile magnetic disk (such as " floppy disk "), and to removable anonvolatile optical disk
The CD drive of (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driver can
To be connected by one or more data media interfaces with bus 18.System storage 28 may include that at least one program produces
Product, the program product have one group of (for example, at least one) program module, these program modules are configured to perform of the invention real
Apply the function of each embodiment of example.
Program/utility 40 with one group of (at least one) program module 42 can store and store in such as system
In device 28, such program module 42 includes but is not limited to operating system, one or more application program, other program modules
And program data, it may include the realization of network environment in each of these examples or certain combination.Program module 42
Usually execute the function and/or method in described embodiment of the embodiment of the present invention.
Equipment 12 can also be communicated with one or more external equipments 14 (such as keyboard, sensing equipment, display 24 etc.),
Can also be enabled a user to one or more equipment interacted with the equipment 12 communication, and/or with enable the equipment 12 with
One or more of the other any equipment (such as network interface card, modem etc.) communication for calculating equipment and being communicated.It is this logical
Letter can be carried out by input/output (I/O) interface 22.Also, equipment 12 can also by network adapter 20 and one or
The multiple networks of person (such as local area network (LAN), wide area network (WAN) and/or public network, such as internet) communication.As shown,
Network adapter 20 is communicated by bus 18 with other modules of equipment 12.It should be understood that although not shown in the drawings, can combine
Equipment 12 uses other hardware and/or software module, including but not limited to: microcode, device driver, redundant processor, outer
Portion's disk drive array, RAID system, tape drive and data backup storage system etc..
The program that processor 16 is stored in system storage 28 by operation, thereby executing various function application and number
According to processing, such as realize the transactions requests processing method based on intelligent contract provided by the embodiment of the present invention.
Embodiment ten
The embodiment of the present invention ten also provides a kind of computer readable storage medium, be stored thereon with computer program (or
For computer executable instructions), for executing at a kind of transactions requests based on intelligent contract when which is executed by processor
Reason method, this method comprises:
Generate the transactions requests based on Intelligent target contract;
Pre-execution operation is carried out to transactions requests according to local data, determines input dependence data acquisition system and output change number
According to set;
By transactions requests, input dependence data acquisition system and output change data acquisition system binding, and it is transmitted to block chain network,
To request other nodes in block chain network to execute transactions requests.
Alternatively,
Obtain the transactions requests transmitted in block chain network, input dependence data acquisition system and output change data acquisition system;
During executing transactions requests, input data and output data involved in transactions requests are determined;
By input data and output data, one is carried out with the input dependence data acquisition system and output change data acquisition system of acquisition
Cause property compares;
According to comparison result, the validity that transactions requests execute is determined.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media
Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable
Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or
Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool
There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires
(ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-
ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage
Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device
Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited
In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
Can with one or more programming languages or combinations thereof come write for execute the embodiment of the present invention operation
Computer program code, described program design language include object oriented program language-such as Java,
Smalltalk, C++, further include conventional procedural programming language-such as " C " language or similar program design language
Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence
Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or
It is executed in equipment.In situations involving remote computers, remote computer can pass through the network of any kind --- including
Local area network (LAN) or wide area network (WAN)-are connected to subscriber computer, or, it may be connected to outer computer (such as using
ISP is connected by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being implemented by above embodiments to the present invention
Example is described in further detail, but the embodiment of the present invention is not limited only to above embodiments, is not departing from structure of the present invention
It can also include more other equivalent embodiments in the case where think of, and the scope of the present invention is determined by scope of the appended claims
It is fixed.
Claims (15)
1. a kind of transactions requests processing method based on intelligent contract, which is characterized in that be applied to block chain node, the method
Include:
Generate the transactions requests based on Intelligent target contract;
Pre-execution operation is carried out to the transactions requests according to local data, determines input dependence data acquisition system and output change number
According to set;
By the transactions requests, input dependence data acquisition system and output change data acquisition system binding, and it is transmitted to block chain network,
To request other nodes in block chain network to execute the transactions requests.
2. the method according to claim 1, wherein carrying out pre-execution to the transactions requests according to local data
Operation determines input dependence data acquisition system and output change data acquisition system, comprising:
According to the transactions requests, the Intelligent target contract described in local runtime determines the Intelligent target contract implementation procedure
In the data that are read from local data, as input dependence data, and the data being written into local data, as defeated
Data are changed out, to form input dependence data acquisition system and output change data acquisition system.
3. the method according to claim 1, wherein the input dependence data acquisition system includes thing described in pre-execution
The parameter name and parameter value of required reading in business request process;The output change data acquisition system includes thing described in pre-execution
The parameter name and parameter value to be updated after business request.
4. the method according to claim 1, wherein carrying out pre-execution to the transactions requests according to local data
Operation determines input dependence data acquisition system and output change data acquisition system, comprising:
Pre-execution operation is carried out to the transactions requests according to local data, to determine input dependence data and output change number
According to;
The input dependence data are encrypted or Hash is handled, to form input dependence data acquisition system;
Output change data are encrypted or Hash is handled, export change data acquisition system to be formed.
5. the method according to claim 1, wherein the input dependence data acquisition system and output change data set
It closes, the block chain node for receiving transactions requests carries out dependence data verification when executing the transactions requests, with determination
The validity that the transactions requests execute.
6. according to the method described in claim 5, it is characterized in that, by the transactions requests, input dependence data acquisition system and defeated
Change data acquisition system binding out, and be transmitted to after block chain network, further includes:
After waiting preset duration, poll block chain, to determine whether be stored with the associated thing of the transactions requests in block chain
Business data;
In determining block chain it is not stored have the associated Transaction Information of the transactions requests after, transactions requests described in pre-execution again
To determine input dependence data acquisition system and output change data acquisition system, and to block chain network send the transactions requests and
The input dependence data acquisition system and output change data acquisition system redefined.
7. a kind of transactions requests processing method based on intelligent contract, which is characterized in that be applied to block chain node, the method
Include:
Obtain the transactions requests transmitted in block chain network, input dependence data acquisition system and output change data acquisition system;
During executing the transactions requests, input data involved in the transactions requests and output data are determined;
By the input data and output data, one is carried out with the input dependence data acquisition system and output change data acquisition system of acquisition
Cause property compares;
According to comparison result, the validity that the transactions requests execute is determined.
8. the method according to the description of claim 7 is characterized in that the input dependence data acquisition system includes thing described in pre-execution
The parameter name and parameter value of required reading in business request process;The output change data acquisition system includes thing described in pre-execution
The parameter name and parameter value to be updated after business request.
9. the method according to the description of claim 7 is characterized in that number is changed in the input dependence data acquisition system and the output
It is combined into data clear text according to collection, perhaps the pressure for the data ciphertext that obtains via encryption or to handle via Hash
Contracting data.
10. according to the method described in claim 9, it is characterized in that, if the input dependence data acquisition system and the output become
More data acquisition system is data ciphertext or compressed data, then the input dependence number by the input data and output data, with acquisition
Uniformity comparison is carried out according to set and output change data acquisition system, comprising:
The input data and output data are encrypted respectively or Hash is handled, obtains local data ciphertext or local
Compressed data;
Input dependence data by the local data ciphertext or locally compressed data of the input data and output data, with acquisition
The data ciphertext or locally compressed data of set and output change data acquisition system carry out uniformity comparison.
11. the method according to the description of claim 7 is characterized in that determining what the transactions requests executed according to comparison result
Validity, comprising:
If comparison passes through, it is determined that the implementing result of the transactions requests is effective, using the implementing result as Transaction Information
It is stored in block chain;
Otherwise, the transactions requests, input dependence data acquisition system and output change data acquisition system are abandoned.
12. a kind of transactions requests processing unit based on intelligent contract, which is characterized in that be configured at block chain node, the dress
It sets and includes:
Transactions requests generation module, for generating the transactions requests based on Intelligent target contract;
Data acquisition system determining module, for according to local data to the transactions requests carry out pre-execution operation, determine input according to
Rely data acquisition system and output change data acquisition system;
Transmission module for binding the transactions requests, input dependence data acquisition system and output change data acquisition system, and is transmitted
To block chain network, to request other nodes in block chain network to execute the transactions requests.
13. a kind of transactions requests processing unit based on intelligent contract, which is characterized in that be configured at block chain node, the dress
It sets and includes:
Module is obtained, for obtaining the transactions requests transmitted in block chain network, input dependence data acquisition system and output change
Data acquisition system;
Data determining module inputs number for determining during executing the transactions requests involved in the transactions requests
According to and output data;
Data comparing module is used for by the input data and output data, with the input dependence data acquisition system of acquisition and output
It changes data acquisition system and carries out uniformity comparison;
Validity determining module, for determining the validity that the transactions requests execute according to comparison result.
14. a kind of equipment characterized by comprising
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
Now as the transactions requests processing method of any of claims 1-6 based on intelligent contract, or realization such as right are wanted
Seek the transactions requests processing method described in any one of 7-11 based on intelligent contract.
15. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
It is realized when execution such as the transactions requests processing method of any of claims 1-6 based on intelligent contract, or realization
Described in any item transactions requests processing methods based on intelligent contract as claim in claims 7-11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910199179.0A CN109951546B (en) | 2019-03-15 | 2019-03-15 | Transaction request processing method, device, equipment and medium based on intelligent contract |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910199179.0A CN109951546B (en) | 2019-03-15 | 2019-03-15 | Transaction request processing method, device, equipment and medium based on intelligent contract |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109951546A true CN109951546A (en) | 2019-06-28 |
CN109951546B CN109951546B (en) | 2021-12-14 |
Family
ID=67009986
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910199179.0A Active CN109951546B (en) | 2019-03-15 | 2019-03-15 | Transaction request processing method, device, equipment and medium based on intelligent contract |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109951546B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110753028A (en) * | 2019-09-11 | 2020-02-04 | 复旦大学 | Method for controlling distributed accounting network resource use |
CN111181731A (en) * | 2019-12-31 | 2020-05-19 | 南京可信区块链与算法经济研究院有限公司 | Execution optimization method, system and storage medium of intelligent contract in alliance chain |
CN111312352A (en) * | 2020-02-19 | 2020-06-19 | 百度在线网络技术(北京)有限公司 | Data processing method, device, equipment and medium based on block chain |
CN111506783A (en) * | 2020-04-08 | 2020-08-07 | 百度在线网络技术(北京)有限公司 | Transaction request processing method, device, equipment and medium in block chain |
CN114066446A (en) * | 2021-11-16 | 2022-02-18 | 上海鸿米信息科技有限责任公司 | Block chain data processing method and device, storage medium and block chain link points |
CN114327804A (en) * | 2022-03-15 | 2022-04-12 | 北京百度网讯科技有限公司 | Block chain based distributed transaction processing method, device, equipment and medium |
WO2023231339A1 (en) * | 2022-05-30 | 2023-12-07 | 蚂蚁区块链科技(上海)有限公司 | Transaction execution method and node in blockchain system, and blockchain system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107342858A (en) * | 2017-07-05 | 2017-11-10 | 武汉凤链科技有限公司 | A kind of intelligent contract guard method and system based on trusted context |
CN108073513A (en) * | 2017-04-21 | 2018-05-25 | 富士通株式会社 | The apparatus and method tested the intelligent contract based on block chain |
CN108346110A (en) * | 2018-01-26 | 2018-07-31 | 广东工业大学 | A kind of information interaction system based on manufacture block chain |
US20180300382A1 (en) * | 2017-04-12 | 2018-10-18 | Vijay K. Madisetti | Method and System for Tuning Blockchain Scalability for Fast and Low-Cost Payment and Transaction Processing |
CN109446211A (en) * | 2018-10-08 | 2019-03-08 | 联动优势科技有限公司 | A kind of consistency desired result method and device |
-
2019
- 2019-03-15 CN CN201910199179.0A patent/CN109951546B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180300382A1 (en) * | 2017-04-12 | 2018-10-18 | Vijay K. Madisetti | Method and System for Tuning Blockchain Scalability for Fast and Low-Cost Payment and Transaction Processing |
CN108073513A (en) * | 2017-04-21 | 2018-05-25 | 富士通株式会社 | The apparatus and method tested the intelligent contract based on block chain |
CN107342858A (en) * | 2017-07-05 | 2017-11-10 | 武汉凤链科技有限公司 | A kind of intelligent contract guard method and system based on trusted context |
CN108346110A (en) * | 2018-01-26 | 2018-07-31 | 广东工业大学 | A kind of information interaction system based on manufacture block chain |
CN109446211A (en) * | 2018-10-08 | 2019-03-08 | 联动优势科技有限公司 | A kind of consistency desired result method and device |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110753028A (en) * | 2019-09-11 | 2020-02-04 | 复旦大学 | Method for controlling distributed accounting network resource use |
CN111181731A (en) * | 2019-12-31 | 2020-05-19 | 南京可信区块链与算法经济研究院有限公司 | Execution optimization method, system and storage medium of intelligent contract in alliance chain |
CN111181731B (en) * | 2019-12-31 | 2022-07-12 | 南京可信区块链与算法经济研究院有限公司 | Execution optimization method, system and storage medium of intelligent contract in alliance chain |
CN111312352A (en) * | 2020-02-19 | 2020-06-19 | 百度在线网络技术(北京)有限公司 | Data processing method, device, equipment and medium based on block chain |
US11630821B2 (en) | 2020-02-19 | 2023-04-18 | Baidu Online Network Technology (Beijing) Co., Ltd. | Blockchain-based data processing method and apparatus, device, and medium |
CN111506783A (en) * | 2020-04-08 | 2020-08-07 | 百度在线网络技术(北京)有限公司 | Transaction request processing method, device, equipment and medium in block chain |
CN111506783B (en) * | 2020-04-08 | 2023-12-22 | 百度在线网络技术(北京)有限公司 | Transaction request processing method, device, equipment and medium in blockchain |
CN114066446A (en) * | 2021-11-16 | 2022-02-18 | 上海鸿米信息科技有限责任公司 | Block chain data processing method and device, storage medium and block chain link points |
CN114327804A (en) * | 2022-03-15 | 2022-04-12 | 北京百度网讯科技有限公司 | Block chain based distributed transaction processing method, device, equipment and medium |
CN114327804B (en) * | 2022-03-15 | 2022-06-07 | 北京百度网讯科技有限公司 | Block chain based distributed transaction processing method, device, equipment and medium |
WO2023231339A1 (en) * | 2022-05-30 | 2023-12-07 | 蚂蚁区块链科技(上海)有限公司 | Transaction execution method and node in blockchain system, and blockchain system |
Also Published As
Publication number | Publication date |
---|---|
CN109951546B (en) | 2021-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109951546A (en) | Transactions requests processing method, device, equipment and medium based on intelligent contract | |
US11469891B2 (en) | Expendable cryptographic key access | |
CN110365491B (en) | Service processing method, device, equipment, storage medium and data sharing system | |
EP3639465B1 (en) | Improved hardware security module management | |
CN109951547B (en) | Transaction request parallel processing method, device, equipment and medium | |
US20210304201A1 (en) | Transaction verification method and apparatus, storage medium, and electronic device | |
US20190386940A1 (en) | Method for providing recording and verification service for data received and transmitted by messenger service, and server using method | |
US20220239496A1 (en) | Blockchain consensus method, device and system | |
CN110689349B (en) | Transaction hash value storage and searching method and device in blockchain | |
CN112204557A (en) | System and method for automated decentralized multilateral transaction processing | |
US20160048703A1 (en) | Securing integrity and consistency of a cloud storage service with efficient client operations | |
CN110489440B (en) | Data query method and device | |
CN109995523B (en) | Activation code management method and device and activation code generation method and device | |
CN113505520A (en) | Method, device and system for supporting heterogeneous federated learning | |
CN109101664A (en) | A kind of data transmission method, device, equipment and the medium of lightweight node | |
CN109858285A (en) | Processing method, device, equipment and the medium of block chain data | |
CN111047444A (en) | Data transaction method and device based on block chain network | |
CN108595973B (en) | Instruction determination method, equipment control method, device and system | |
JP7273241B2 (en) | Intelligent contract execution method and apparatus | |
CN113689296B (en) | Contract scheduling method and device for asynchronous trusted computing and electronic equipment | |
CN113726885A (en) | Method and device for adjusting flow quota | |
CN112738153A (en) | Gateway selection method, system, device, server and medium in service system | |
CN111754348A (en) | Scene combined transaction method and device | |
CN111598544A (en) | Method and apparatus for processing information | |
CN110262756B (en) | Method and device for caching data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |