Assets transfer method, apparatus and system based on block chain intelligence contract
Technical field
This specification one or more embodiment is related to block chain technical field, more particularly to a kind of based on block chain intelligence
The assets transfer method, apparatus and system of contract.
Background technique
Block chain technology (being also referred to as, distributed account book technology) is a kind of distributed data base skill for going neutralisation
Art, have decentralization, it is open and clear, can not distort, the various features such as trusted, have suitable for many pairs of data reliabilities
In the application scenarios of high demand.
Summary of the invention
In view of this, this specification one or more embodiment provides a kind of assets transfer based on block chain intelligence contract
Method, apparatus and system.
To achieve the above object, it is as follows to provide technical solution for this specification one or more embodiment:
According to this specification one or more embodiment in a first aspect, proposing a kind of based on block chain intelligence contract
Assets transfer method, comprising:
Block chain node executes the assets transfer transaction that client is submitted, the assets transfer that the assets transfer transaction is called
The assets transfer project and corresponding assets transfer condition between multiple participants are defined in intelligent contract;Wherein, when outside chain
Statistics indicate that the assets transfer intelligence contract is directed to for being written in transaction log when the assets transfer condition is satisfied
The trigger event of the assets transfer project;
Assets transfer platform is determining that the transaction log includes by monitoring the transaction log of assets transfer transaction
For the assets transfer project trigger event when, implement the money between the corresponding asset account of the multiple participant
It produces transfer project and corresponds to assets transfer operation.
According to the second aspect of this specification one or more embodiment, propose a kind of based on block chain intelligence contract
Assets transfer method, comprising:
Block chain node receives the assets transfer transaction that client is submitted, the assets transfer that the assets transfer transaction is called
The assets transfer project and corresponding assets transfer condition between multiple participants are defined in intelligent contract;
The block chain node executes the assets transfer transaction to call the assets transfer intelligence contract, makes the money
It produces and shifts intelligent contract outside chain statistics indicate that when the assets transfer condition is satisfied, write-in is for described in transaction log
The trigger event of assets transfer project, the trigger event are corresponding in the multiple participant for triggering assets transfer platform
Implement the corresponding assets transfer operation of the assets transfer project between asset account.
According to the third aspect of this specification one or more embodiment, propose a kind of based on block chain intelligence contract
Assets transfer system, comprising:
Block chain node, for executing the assets transfer transaction of client submission, the money that the assets transfer transaction is called
Produce the assets transfer project and corresponding assets transfer condition for shifting and being defined between multiple participants in intelligent contract;Wherein,
When statistics indicate that when the assets transfer condition is satisfied, the assets transfer intelligence contract in transaction log for writing outside chain
Enter to be directed to the trigger event of the assets transfer project;
Assets transfer platform is determining the day of trade for the transaction log by monitoring the assets transfer transaction
When will includes the trigger event for the assets transfer project, implement between the corresponding asset account of the multiple participant
The assets transfer project corresponds to assets transfer operation.
According to the fourth aspect of this specification one or more embodiment, propose a kind of based on block chain intelligence contract
Assets transfer device, comprising:
Receiving unit, makes block chain node receive the assets transfer transaction that client is submitted, and the assets transfer transaction is adjusted
The assets transfer project and corresponding assets transfer condition between multiple participants are defined in assets transfer intelligence contract;
Execution unit makes the block chain node execute the assets transfer transaction to call the assets transfer intelligently to close
About, make the assets transfer intelligence contract outside chain statistics indicate that when the assets transfer condition is satisfied, in transaction log
Write-in is directed to the trigger event of the assets transfer project, and the trigger event is for triggering assets transfer platform the multiple
Implement the corresponding assets transfer operation of the assets transfer project between the corresponding asset account of participant.
According to the 5th of this specification one or more embodiment the aspect, a kind of electronic equipment is proposed, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is by running the executable instruction to realize the method as described in second aspect.
According to the 6th of this specification one or more embodiment the aspect, a kind of computer readable storage medium is proposed,
It is stored thereon with computer instruction, is realized when which is executed by processor such as the step of second aspect the method.
Detailed description of the invention
Fig. 1 is a kind of schematic diagram for example context that an exemplary embodiment provides.
Fig. 2 is a kind of schematic diagram for conceptual framework that an exemplary embodiment provides.
Fig. 3 is a kind of process for assets transfer method based on block chain intelligence contract that an exemplary embodiment provides
Figure.
Fig. 4 is the process for another assets transfer method based on block chain intelligence contract that an exemplary embodiment provides
Figure.
Fig. 5 is a kind of schematic diagram based on the process of contract performance across chain technology that an exemplary embodiment provides.
Fig. 6 is that a kind of structure for assets transfer system based on block chain intelligence contract that an exemplary embodiment provides is shown
It is intended to.
Fig. 7 is a kind of structural schematic diagram for equipment that an exemplary embodiment provides.
Fig. 8 is a kind of block diagram for assets transfer device based on block chain intelligence contract that an exemplary embodiment provides.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with this specification one or more embodiment.Phase
Instead, they are only some aspects phases with the one or more embodiments of as detailed in the attached claim, this specification
The example of consistent device and method.
It should be understood that the sequence that might not show and describe according to this specification in other embodiments executes
The step of correlation method.In some other embodiments, step included by method can than described in this specification more
It is more or less.In addition, single step described in this specification, may be broken down into other embodiments multiple steps into
Row description;And multiple steps described in this specification, it may also be merged into single step progress in other embodiments
Description.
Fig. 1 is a kind of schematic diagram for example context that an exemplary embodiment provides.As shown in Figure 1, example context 100 permits
Perhaps entity participates in block chain network 102.Block chain network 102 can be the block of publicly-owned type, private type or alliance's type
Chain network.Example context 100 may include calculating equipment 104,106,108,110,112 and network 114;In one embodiment,
Network 114 may include local area network (Local Area Network, LAN), wide area network (Wide Area Network, WAN),
Internet or combinations thereof, and it is connected to website, user equipment (such as calculating equipment) and back-end system.In one embodiment, may be used
Network 114 is accessed in a manner of through wired and or wireless communications.
In some cases, calculate equipment 106,108 can be cloud computing system node (not shown) or each meter
Calculating equipment 106,108 can be individual cloud computing system, including by network interconnection and as distributed processing system(DPS) work
Multiple stage computers.
In one embodiment, any computing system appropriate can be run by calculating equipment 104~108, can conduct
Node in block chain network 102;For example, calculate equipment 104~108 can include but is not limited to server, desktop computer,
Laptop, tablet computer calculate equipment and smart phone.In one embodiment, calculating equipment 104~108 can belong to
Related entities simultaneously can be used for for realizing corresponding service, such as the service to the transaction between a certain entity or multiple entities
It is managed.
In one embodiment, it calculates equipment 104~108 and is stored with the corresponding block chain account book of block chain network 102 respectively.
Calculating equipment 104 can be (or comprising) for providing the network server of browser function, which can be based on net
Network 114 provides visual information relevant to block chain network 102.In some cases, area can be not involved in by calculating equipment 104
Block verifying, but block chain network 102 is monitored to determine when other nodes (for example may include calculating equipment 106-108) reach
At common recognition, and accordingly generate corresponding block chain visible user interface.
In one embodiment, calculate equipment 104 can receive client device (such as calculate equipment 110 or calculate equipment
112) request initiated for block chain visible user interface.In some cases, the node of block chain network 102 can also be with
As client device, for example calculates the user of equipment 108 and the browser that operates in calculate in equipment 108 can be used to calculating
Equipment 104 sends above-mentioned request.
In response to above-mentioned request, block chain visualization use can be generated based on the block chain account book of storage by calculating equipment 104
Family interface (such as webpage), and the block chain visible user interface of generation is sent to the client device of request.If block
Chain network 102 is the block chain network of private type or alliance's type, be can wrap to the request of block chain visible user interface
Authorized user message is included, before generating block chain visible user interface and being sent to the client device of request, Ke Yiyou
It calculates equipment 104 to verify the authorized user message, and returns to corresponding block chain visual user after being verified
Interface.
Block chain visible user interface, which may be displayed on client device, (such as can be displayed in user shown in FIG. 1
In interface 116).When block chain account book updates, the display content of user interface 116 can also update therewith.This
Outside, the interaction of user and user interface 116 may cause the request to other users interface, such as display block list, block
Details, transaction List Table, Transaction Details, account list, account details, contract list, contract details or user are to block link network
Network implements search and the result of page searching etc. of generation.
Fig. 2 is a kind of schematic diagram for conceptual framework that an exemplary embodiment provides.As shown in Fig. 2, the conceptual framework 200
Including physical layer 202, trusteeship service layer 204 and block link network network layers 206.For example, physical layer 202 may include three entities:
Entity 1, entity 2 and entity 3, each entity have respective trade managing system 208.
In one embodiment, trusteeship service layer 204 may include the corresponding interface 210 of each transaction management system 208.Example
Such as, each transaction management system 208 using agreement (such as hypertext transfer protocol secure (HTTPS) etc.) by network (such as
Network 114 in Fig. 1) it is communicated with respective interface 210.In some instances, each interface 210 can provide corresponding
Communication connection between trade managing system 208 and block link network network layers 206;More specifically, interface 210 can be with block chain network
The block chain network 212 of layer 206 communicates.In some instances, the communication between interface 210 and block link network network layers 206 can be with
It is realized using remote procedure call (Remote Procedure Calls, RPCs).In some instances, interface 210 can be with
The api interface for accessing block chain network 212 is provided to trade managing system 208.
As described herein, block chain network 212 is provided in the form of peer-to-peer network, which includes multiple nodes
214, these nodes 214 are respectively used to be formed by block chain data the progress persistence of block chain account book 216;Wherein, in Fig. 2 only
A block chain account book 216 is shown, but may exist more parts of block chain account books 216 or its copy in block chain network 212, than
As each node 214 can safeguard a block chain account book 216 or its copy respectively.
It is noted that transaction (transaction) described in this specification, refers to that user passes through block chain
Client creation, and need finally to be distributed to data in the distributed data base of block chain.Wherein, in block chain
Transaction, there are points of the transaction of narrow sense and the transaction of broad sense.The transaction of narrow sense refers to the valence that user issues to block chain
Value transfer;For example, transaction can be one that user initiates in block chain and turn in traditional bit coin block chain network
Account.And the transaction of broad sense refers to the business datum being intended to business that user issues to block chain;For example, operator can
To build alliance's chain based on actual business demand, relies on alliance's chain and dispose some other classes unrelated with value Transfer
Type in line service (for example, business of renting a house, vehicle scheduling business, settlement of insurance claim business, credit services, medical services etc.), and
In this kind of alliance's chain, transaction can be the service message or industry with business intention that user issues in alliance's chain
Business request.
Block chain is normally divided into three types: publicly-owned chain (Public Blockchain), privately owned chain (Private
) and alliance's chain (Consortium Blockchain) Blockchain.In addition, there are also a plurality of types of combinations, such as privately owned chain
The different combinations such as+alliance chain, alliance's chain+publicly-owned chain.It is publicly-owned chain that wherein decentralization degree is highest.Publicly-owned chain with than
Special coin, ether mill are representative, and the participant that publicly-owned chain is added can read data record on chain, participate in business and compete newly
Book keeping operation power of block etc..Moreover, each participant's (i.e. node) freely can be added and exit network, and carry out relevant operation.It is private
There is chain then on the contrary, the write-in permission of the network is by some tissue or mechanism controls, reading data permission is by organization prescribed.Simply
For, privately owned chain can be weak center's system, and participating in node has stringent limitation and less.Such block chain is more
It is suitable for using inside particular organization.Alliance's chain is then block chain between publicly-owned chain and privately owned chain, it can be achieved that " part
Decentralization ".Each node usually has corresponding physical mechanism or tissue in alliance's chain;Participant is added by authorization
Enter network and composition interests correlation alliance, it is common to safeguard the operation of block chain.
Whether publicly-owned chain, privately owned chain or alliance's chain may all provide the function of intelligent contract.Intelligence on block chain
Contract is the contract that can be executed by transaction triggering on block catenary system.Intelligent contract can pass through the formal definition of code.
By taking ether mill as an example, support user that the logic of some complexity is created and called in the network of ether mill, this is that ether mill is different from
The ultimate challenge of bit coin block chain technology.Ether mill is ether mill virtual machine as the core of a programmable block chain
(Ethereum Virtual Machine, EVM), each ether mill node can run EVM.EVM is that a figure spirit is complete
Virtual machine, it means that the logic of various complexity can be realized by it.User issues in ether mill and calls intelligence to close
It is about exactly to be run on EVM.
And in the technical solution of this specification, it can be closed based on the intelligence issued in data-triggered block chain network outside chain
About, and the implementing result of intelligent contract can trigger the execution of the outer event of chain.Below with reference to embodiment to the technology of this specification
Scheme is described.
Fig. 3 is a kind of process for assets transfer method based on block chain intelligence contract that an exemplary embodiment provides
Figure.As shown in figure 3, this method may comprise steps of:
Step 302, block chain node executes the assets transfer transaction that client is submitted, what the assets transfer transaction was called
The assets transfer project and corresponding assets transfer condition between multiple participants are defined in assets transfer intelligence contract;Its
In, when statistics indicate that when the assets transfer condition is satisfied, the assets transfer intelligence contract is used in transaction log outside chain
Middle write-in is directed to the trigger event of the assets transfer project.
After intelligent contract creation, it will appear a contract account corresponding with the intelligence contract on block chain, and possess one
A specific address, contract code and account storage will be stored in the contract account.The behavior of intelligent contract is by contract code
Control, and the account storage of intelligent contract then saves the state of contract.In other words, intelligent contract to generate on block chain
Virtual account comprising contract code and account storage (Storage).Correspondingly, asset allocation platform can trade in block chain
The address for example can be added the to word traded in block chain in ether mill by the address of middle addition asset allocation intelligence contract
Duan Zhong, to show to wish to call the asset allocation intelligence contract.
After client submits assets transfer transaction, assets transfer transaction is by each block chain node in block chain network
Common recognition after, the account book data of self maintained can be updated respectively by each block chain node, then due to each block
Chain node is performed both by the transaction of the assets transfer by common recognition, so that account book data documented by each block chain node keep one
It causes, it is thus regarded that maintaining the unified block chain account book of content between all block chain nodes jointly.
Assets transfer intelligence contract is predefined, creates and be distributed to and carries out depositing card in block chain, so that assets transfer
The code of intelligent contract can be disclosed inquiry and verifying, these codes can be used for characterizing above-mentioned assets transfer project and money
Produce jump condition;Meanwhile assets transfer intelligence contract it is called after can be performed automatically.Therefore, it is intelligently closed by assets transfer
It about realizes above-mentioned assets transfer project, can be influenced to avoid by external human factor, it is ensured that the reality of assets transfer project
Apply transparent procedures, just.
Assets transfer transaction can trigger on the client generation by for example a certain participant, and be committed to block by client
Chain network.Alternatively, assets transfer transaction can trigger on the client generation by the object of other except participant, and by client
It is committed to block chain network.
Data in the chain on block chain can be read directly in assets transfer intelligence contract, and for example data are recorded in the chain
In block chain account book.And based on across chain technology in the related technology, so that assets transfer intelligence contract can also obtain its own
The outer data of chain except locating block chain network, and based on data outside the chain to the situation that meets of assets transfer condition, control pair
Assets transfer project implementation.For example, the outer data of chain may come from except block chain network locating for assets transfer intelligence contract
Other block chain networks;For another example the outer data of chain be not from it is a certain except block chain network, such as block chain network
Server or other calculating equipment.
Across chain technology in the related technology can be applied in the technical solution of this specification, to realize assets transfer intelligence
It can acquisition of the contract for data outside chain.Such as in the scheme using prophesy machine technology, assets transfer intelligence contract can be into
One step with prophesy is quick-witted can contract, in which: when assets transfer intelligence contract is called, assets transfer intelligence contract be used for
Prophesy wisdom energy contract is passed to demand information, so that the quick-witted energy contract of prophesy obtains data outside above-mentioned chain and passes assets transfer back
Intelligent contract.Demand information herein can be predefined in assets transfer intelligence contract or the demand information can be by
The incoming assets transfer intelligence contract of assets transfer transaction (for example demand information is added to the data field traded in assets transfer
It is interior).All information for being used to describe the outer data of chain, can be used as above-mentioned demand information.For example, demand information may include
At least one of: index information (such as hash value etc. of the outer data of chain) of the outer data of access address, chain of the outer data of chain etc.,
This specification is limited not to this.
Block chain node can execute in credible performing environment (Trusted Execution Environment, TEE)
The code of assets transfer intelligence contract.TEE is the security extension based on CPU hardware, and the credible execution completely isolated with outside
Environment.TEE is the concept proposed by Global Platform earliest, for solving the security isolation of resource in mobile device, is put down
Row provides credible and secure performing environment for application program in operating system.For example, the software protection of Intel extends (SGX) etc.
The code execution of TEE technology insulation, remote proving, security configuration, the secure storage of data and for executing the credible of code
Path.The application program run in TEE is kept safe, as a consequence it is hardly possible to be accessed by third party.
By taking Intel SGX technology as an example.Block chain node, in memory can be with using the processor instruction increased newly in CPU
A part of region EPC (Enclave Page Cache, enclosure page cache or enclave page cache) is distributed, EVM is loaded onto
In EPC, and by remote proving confirm loaded EVM code it is consistent with the code of EVM at Key Management server (such as than
Compared with hash value).After remote proving passes through, block chain node passes through crypto engine MEE (the Memory Encryption in CPU
Engine) encryption is carried out to the code of above-mentioned assets transfer intelligence contract to be stored in the EPC.The content encrypted in EPC only has
It can be decrypted into after into CPU in plain text.In CPU, operation is carried out to the code of the plaintext, completes implementation procedure.Cause
This can make assets transfer intelligence contract in safe and reliable environment by executing the code of assets transfer intelligence contract in TEE
In executed, avoid the interference by extraneous factor.
The technical solution of this specification can be adapted for several scenes.Such as under contract scene, above-mentioned assets transfer
The content of project and assets transfer condition can be matched with the contract signed between multiple participants;In other words, multiple ginsengs are based on
The contract signed between person can determine above-mentioned assets transfer project and assets transfer condition, so that assets transfer respectively
Assets transfer project can be implemented in condition in the case where being satisfied, realize the assets transfer operation between multiple participants, thus
Realize fulfiling for treaty content.
Step 304, the transaction log that assets transfer platform is traded by monitoring the assets transfer, is determining the transaction
It is real between the corresponding asset account of the multiple participant when log includes the trigger event for the assets transfer project
It applies the assets transfer project and corresponds to assets transfer operation.
When assets transfer condition is satisfied, assets transfer intelligence contract can be written in transaction log to be turned for assets
Transplant purpose trigger event, so that assets transfer platform is by carrying out monitoring readjustment to the trigger event in transaction log
It triggers assets transfer platform and implements the corresponding assets transfer operation of assets transfer project, to realize the intelligent contract pair on chain
The triggering of assets transfer operation under chain, and active operation or interference can be implemented to avoid participant, it can be ensured that entire money
Produce transfer scheme can reliability service, not will receive the interference of human factor.
Fig. 4 is the process for another assets transfer method based on block chain intelligence contract that an exemplary embodiment provides
Figure.As shown in figure 4, this method is applied to block chain node, may comprise steps of:
Step 402, block chain node receives the assets transfer transaction that client is submitted, what the assets transfer transaction was called
The assets transfer project and corresponding assets transfer condition between multiple participants are defined in assets transfer intelligence contract.
After intelligent contract creation, it will appear a contract account corresponding with the intelligence contract on block chain, and possess one
A specific address, contract code and account storage will be stored in the contract account.The behavior of intelligent contract is by contract code
Control, and the account storage of intelligent contract then saves the state of contract.In other words, intelligent contract to generate on block chain
Virtual account comprising contract code and account storage (Storage).Correspondingly, asset allocation platform can trade in block chain
The address for example can be added the to word traded in block chain in ether mill by the address of middle addition asset allocation intelligence contract
Duan Zhong, to show to wish to call the asset allocation intelligence contract.
After client submits assets transfer transaction, assets transfer transaction is by each block chain node in block chain network
Common recognition after, the account book data of self maintained can be updated respectively by each block chain node, then due to each block
Chain node is performed both by the transaction of the assets transfer by common recognition, so that account book data documented by each block chain node keep one
It causes, it is thus regarded that maintaining the unified block chain account book of content between all block chain nodes jointly.
Assets transfer intelligence contract is predefined, creates and be distributed to and carries out depositing card in block chain, so that assets transfer
The code of intelligent contract can be disclosed inquiry and verifying, these codes can be used for characterizing above-mentioned assets transfer project and money
Produce jump condition;Meanwhile assets transfer intelligence contract it is called after can be performed automatically.Therefore, it is intelligently closed by assets transfer
It about realizes above-mentioned assets transfer project, can be influenced to avoid by external human factor, it is ensured that the reality of assets transfer project
Apply transparent procedures, just.
Assets transfer transaction can trigger on the client generation by for example a certain participant, and be committed to block by client
Chain network.Alternatively, assets transfer transaction can trigger on the client generation by the object of other except participant, and by client
It is committed to block chain network.
Step 404, the block chain node executes the assets transfer and trades to call the assets transfer intelligence contract,
The assets transfer intelligence contract is written, statistics indicate that when the assets transfer condition is satisfied, in transaction log outside chain
For the trigger event of the assets transfer project, the trigger event is for triggering assets transfer platform in the multiple participation
Implement the corresponding assets transfer operation of the assets transfer project between the corresponding asset account of person.
Data in the chain on block chain can be read directly in assets transfer intelligence contract, and for example data are recorded in the chain
In block chain account book.And based on across chain technology in the related technology, so that assets transfer intelligence contract can also obtain its own
The outer data of chain except locating block chain network, and based on data outside the chain to the situation that meets of assets transfer condition, control pair
Assets transfer project implementation.For example, the outer data of chain may come from except block chain network locating for assets transfer intelligence contract
Other block chain networks;For another example the outer data of chain be not from it is a certain except block chain network, such as block chain network
Server or other calculating equipment.
Across chain technology in the related technology can be applied in the technical solution of this specification, to realize assets transfer intelligence
It can acquisition of the contract for data outside chain.Such as in the scheme using prophesy machine technology, assets transfer intelligence contract can be into
One step with prophesy is quick-witted can contract, in which: when assets transfer intelligence contract is called, assets transfer intelligence contract be used for
Prophesy wisdom energy contract is passed to demand information, so that the quick-witted energy contract of prophesy obtains data outside above-mentioned chain and passes assets transfer back
Intelligent contract.Demand information herein can be predefined in assets transfer intelligence contract or the demand information can be by
The incoming assets transfer intelligence contract of assets transfer transaction (for example demand information is added to the data field traded in assets transfer
It is interior).All information for being used to describe the outer data of chain, can be used as above-mentioned demand information.For example, demand information may include
At least one of: index information (such as hash value etc. of the outer data of chain) of the outer data of access address, chain of the outer data of chain etc.,
This specification is limited not to this.
Block chain node can execute in credible performing environment (Trusted Execution Environment, TEE)
The code of assets transfer intelligence contract.TEE is the security extension based on CPU hardware, and the credible execution completely isolated with outside
Environment.TEE is the concept proposed by Global Platform earliest, for solving the security isolation of resource in mobile device, is put down
Row provides credible and secure performing environment for application program in operating system.For example, the software protection of Intel extends (SGX) etc.
The code execution of TEE technology insulation, remote proving, security configuration, the secure storage of data and for executing the credible of code
Path.The application program run in TEE is kept safe, as a consequence it is hardly possible to be accessed by third party.
By taking Intel SGX technology as an example.Block chain node, in memory can be with using the processor instruction increased newly in CPU
A part of region EPC (Enclave Page Cache, enclosure page cache or enclave page cache) is distributed, EVM is loaded onto
In EPC, and by remote proving confirm loaded EVM code it is consistent with the code of EVM at Key Management server (such as than
Compared with hash value).After remote proving passes through, block chain node passes through crypto engine MEE (the Memory Encryption in CPU
Engine) encryption is carried out to the code of above-mentioned assets transfer intelligence contract to be stored in the EPC.The content encrypted in EPC only has
It can be decrypted into after into CPU in plain text.In CPU, operation is carried out to the code of the plaintext, completes implementation procedure.Cause
This can make assets transfer intelligence contract in safe and reliable environment by executing the code of assets transfer intelligence contract in TEE
In executed, avoid the interference by extraneous factor.
The technical solution of this specification can be adapted for several scenes.Such as under contract scene, above-mentioned assets transfer
The content of project and assets transfer condition can be matched with the contract signed between multiple participants;In other words, multiple ginsengs are based on
The contract signed between person can determine above-mentioned assets transfer project and assets transfer condition, so that assets transfer respectively
Assets transfer project can be implemented in condition in the case where being satisfied, realize the assets transfer operation between multiple participants, thus
Realize fulfiling for treaty content.
When assets transfer condition is satisfied, assets transfer intelligence contract can be written in transaction log to be turned for assets
Transplant purpose trigger event, so that assets transfer platform is by carrying out monitoring readjustment to the trigger event in transaction log
It triggers assets transfer platform and implements the corresponding assets transfer operation of assets transfer project, to realize the intelligent contract pair on chain
The triggering of assets transfer operation under chain, and active operation or interference can be implemented to avoid participant, it can be ensured that entire money
Produce transfer scheme can reliability service, not will receive the interference of human factor.
There are plurality of application scenes for the technical solution of this specification.Below by taking contract signing scene as an example, to this specification
Technical solution be introduced.Fig. 5 is a kind of based on the process of contract performance across chain technology of exemplary embodiment offer
Schematic diagram.As shown in Figure 5, it is assumed that user Ua and user Ub sign a contract under chain, and are generated based on the content signed a contract
Intelligent contract;For example, treaty content includes " when the municipal court X is R1 about the court verdict of Y case, to be paid by user Ua
Account Za at platform transfers accounts M1 member to the account Zb of user Ub;When court verdict be R2 when, from the account Zb of user Ub to
The account Za of family Ua transfers accounts M2 member ", can be accordingly comprising project and the condition of transferring accounts of transferring accounts in intelligent contract: the project P1 of transferring accounts be
" from the account Za at payment platform to account Zb transfer accounts M1 member ", it is corresponding transfer accounts condition T1 be " municipal court X is about Y case
Court verdict is R1 ", project of transferring accounts P2 be " from the account Zb at payment platform to account Za transfer accounts M2 member ", corresponding item of transferring accounts
Part T2 is " municipal court X is R2 about the court verdict of Y case ".
Above-mentioned intelligent contract can be generated in user Ua or user Ub, and through corresponding client into block chain network
Issue above-mentioned intelligent contract;Alternatively, above-mentioned intelligent contract can be committed to contract distribution platform by user Ua or user Ub,
Above-mentioned intelligent contract is issued to block chain network by corresponding client from contract distribution platform;Alternatively, user Ua or use
The content of said contract can be committed to contract distribution platform by family Ub, generate above-mentioned intelligent contract simultaneously by contract distribution platform
The intelligence contract is issued to block chain network by corresponding client.
By taking contract distribution platform generates and issues intelligent contract as an example.Contract distribution platform can pass through client and block
Following interactive processes are realized between chain network:
Step 501, client generates contract creation transaction, and is sent to block chain network.
Step 502, block chain node creates intelligent contract.
After contract creation transaction is distributed to block chain network by client, contract creation transaction can be by a certain block chain
Node is received and is packed into newest block;And after contract creation transaction passes through common recognition between all block chain nodes,
Contract creation transaction can be executed by all block chain nodes.Wherein, the common recognition stage may betide above-mentioned newest block quilt
After packing, i.e., block chain node is known together for All Activity contained in the newest block, or the common recognition stage may
Betide contract creation transaction be packaged before so that by common recognition contract creation transaction be just packed into above-mentioned most new district
In block.
Block chain node creates transaction by executing above-mentioned contract, can create intelligent contract.As previously mentioned, intelligence is closed
It after about creating, will appear a contract account corresponding with the intelligence contract on block chain, and possess a specific address, close
About code and account storage will be stored in the contract account.The behavior of intelligent contract is controlled by contract code, and intelligent contract
Account storage then save the state of contract.
For the purpose to intelligent contract internal security, the processing of intelligent contract can be added after contract intelligent after encryption
Into contract creation transaction, so that irrelevant personnel is by inquiring contract creation after contract creation transaction is packed into block
Transaction can only view intelligent contract after encryption, and can not view the content of intelligent contract.It can be by user Ua or user Ub
Intelligent contract is encrypted, and contract intelligent after encryption is provided to contract distribution platform, at this time the user Ua or user Ub palm
The key encrypted to intelligent contract is held, after contract intelligent after encryption is decrypted in user Ua or user Ub,
View the content of intelligent contract;Alternatively, can be encrypted by contract distribution platform to intelligent contract, contract in a kind of situation
The key that distribution platform uses when can be by encryption is provided to user Ua and/or user Ub, and contract publication is flat in another case
Platform provides key unlike user Ua and user Ub, but when the content of intelligent contract is checked in user Ua or user Ub request,
After contract distribution platform can be decrypted contract intelligent after encryption, intelligent contract is transmitted to user Ua or user Ub (can
Using encrypted transmission).
When generating contract account, the contract code in contract account can be deposited block chain node using ciphertext form
Storage.For example, block chain node can carry out intelligent contract after encryption contained by contract creation transaction in credible performing environment
Decryption, and the contract code obtained in credible performing environment to decryption encrypts, and obtained ciphertext code is added
It is stored into contract account, the plaintext of intelligent contract is known when can inquire to avoid irrelevant personnel block chain link point
Code.
Step 503, client generates contract and calls transaction, and is sent to block chain network.
Step 504, block chain node obtains law court's trial as a result, and being written to transaction log by calling intelligent contract
It transfers accounts event.
It is similar with contract creation transaction, after contract is called transaction to be distributed to block chain network by client, the contract
Call transaction can be received by a certain block chain node and be packed into newest block (block height should be above contract creation trade
Locating block) in;And after contract calls transaction between all block chain nodes by common recognition, which, which calls, is handed over
It can easily be executed by all block chain nodes.Wherein, the common recognition stage may betide after above-mentioned newest block is packaged, i.e. area
Block chain node is known together for All Activity contained in the newest block, or the common recognition stage may betide contract calling
Before transaction is packaged, so that the contract by common recognition calls transaction to be just packed into above-mentioned newest block.
When contract calls the to field of transaction to include the address of contract account corresponding to above-mentioned intelligent contract, show this
Contract calls transaction to wish to call above-mentioned intelligent contract.Correspondingly, block chain node can call transaction in according to contract
Above-mentioned intelligent contract is transferred, and executes the code of the intelligence contract in the address that field includes.
If block chain node is stored in the form of above-mentioned ciphertext code, block chain node is according to contract
Call transaction that can read the ciphertext code of above-mentioned intelligent contract.Correspondingly, block chain node can by ciphertext code read in can
Believe performing environment in, in credible performing environment by ciphertext code decryption be corresponding plaintext code.And block chain node can
To run EVM in credible performing environment, and above-mentioned plaintext code is executed by the EVM, to realize above-mentioned intelligent contract
Correlation function.And if block chain node stores the code of above-mentioned intelligent contract, block chain node using plaintext version
EVM can be equally run in credible performing environment, and the code of plaintext version is executed by the EVM.
In above-mentioned intelligent contract, the access address of the corresponding law court's server in the municipal court X can be written into;Alternatively, intelligence
The access function to a certain address can be only defined in energy contract, and calls the corresponding method in the addition municipal court X in transaction in contract
The access address of institute's server, in this way can should the access address of law court's server there is a situation where change.Since law court takes
Business device is not present in block chain network, thus can realize across chain access based on such as prophesy machine technology, so that above-mentioned intelligence
Energy contract can obtain the municipal court X for the court verdict of Y case.For example, the quick-witted energy of prophesy can be issued on block chain in advance
Contract, and above-mentioned intelligent contract can call the prophesy wisdom energy contract, so that the code of above-mentioned intelligence contract is performed,
It can will be informed for the requirements for access of law court's server and foretell quick-witted energy contract, thus by the quick-witted energy contract of prophesy under chain
Law court's server accesses, and obtains the municipal court X for the court verdict of Y case;Then, the quick-witted energy contract of prophesy can incite somebody to action
The information of the court verdict of acquisition feeds back to above-mentioned intelligent contract.
According to acquired court decision as a result, it is above-mentioned intelligence contract may determine that transfer accounts defined in code condition T1 or
T2 is whether it is satisfied;If condition of transferring accounts T1 " municipal court X is R1 about the court verdict of Y case " is satisfied, intelligent contract can
Executing instruction for the project P1 that transfers accounts to be written into transaction log, if " municipal court X is about Y case by the condition T1 that transfers accounts
Court verdict is that R2 " is satisfied, and executing instruction for the project P2 that transfers accounts can be written in intelligent contract into transaction log;Its
In, above-mentioned execute instruction can be described using case mechanism, be properly termed as the event of transferring accounts.
Payment platform server can call the transaction log of transaction to monitor contract.If listening to above-mentioned turn
Account event, payment platform server can execute corresponding transfer operation under chain automatically, to realize the above-mentioned project P1 that transfers accounts
Or P2.For example, payment platform server can be from when the event of transferring accounts listened to is for when executing instruction of project P1 of transferring accounts
Account Za transfers accounts to account Zb, and M1 is first, and when the event of transferring accounts listened to is for when executing instruction of project P2 of transferring accounts, payment is flat
Platform server can from account Zb to account Za transfer accounts M2 member.
In conclusion the Content Transformations such as contract under chain can be that corresponding intelligence is closed by the technical solution of this specification
About, it can be executed automatically on block chain node after the intelligence contract is called, it can be to avoid human interference.Meanwhile intelligence is closed
About in the process of implementation, data outside chain can be obtained based on across chain technology, and implementing result can trigger outside chain in turn
Assets transfer platform implement assets transfer operation, thus realize on chain under chain (or chain in and chain outside) between get through,
Fusion, the automatic implementation based on automatic execution of the intelligent contract on chain, the assets transfer operation under triggering chain, can promote chain
Under the protocol contents such as contract execution efficiency and success rate.
Fig. 6 is a kind of signal knot for assets transfer system based on block chain intelligence contract that an exemplary embodiment provides
Composition.As shown in fig. 6, the assets transfer system based on block chain intelligence contract of being somebody's turn to do may include:
Block chain node 601, for executing the assets transfer transaction of client submission, what the assets transfer transaction was called
The assets transfer project and corresponding assets transfer condition between multiple participants are defined in assets transfer intelligence contract;Its
In, when statistics indicate that when the assets transfer condition is satisfied, the assets transfer intelligence contract is used in transaction log outside chain
Middle write-in is directed to the trigger event of the assets transfer project;
Assets transfer platform 602 is determining the transaction for the transaction log by monitoring the assets transfer transaction
It is real between the corresponding asset account of the multiple participant when log includes the trigger event for the assets transfer project
It applies the assets transfer project and corresponds to assets transfer operation.
Optionally, the assets transfer intelligence contract further has invoked the quick-witted energy contract of prophesy;When the assets transfer
When intelligent contract is called, the assets transfer intelligence contract is used to be passed to demand information to the quick-witted energy contract of the prophesy, with
So that the quick-witted energy contract of the prophesy is obtained the outer data of the chain and passes the assets transfer intelligence contract back.
Optionally, the demand information is defined in the assets transfer intelligence contract;Alternatively, the demand information by
The assets transfer transaction is passed to the assets transfer intelligence contract.
Optionally, the demand information includes at least one of: access address, the chain of the outer data of the chain count outside
According to index information.
Optionally, the content matching of the assets transfer project and the assets transfer condition in the multiple participant it
Between the contract signed.
Fig. 7 is a kind of schematic configuration diagram for equipment that an exemplary embodiment provides.Referring to FIG. 7, in hardware view, it should
Equipment includes processor 702, internal bus 704, network interface 706, memory 708 and nonvolatile memory 710, is gone back certainly
It may include hardware required for other business.Processor 702 reads corresponding computer journey from nonvolatile memory 710
Then sequence is run into memory 708, the assets transfer device based on block chain intelligence contract is formed on logic level.Certainly,
Other than software realization mode, other implementations, such as logic device is not precluded in this specification one or more embodiment
Part or the mode of software and hardware combining etc., that is to say, that the executing subject of following process flow is not limited to each logic list
Member is also possible to hardware or logical device.
Referring to FIG. 8, being somebody's turn to do the assets transfer device based on block chain intelligence contract can wrap in Software Implementation
It includes:
Receiving unit 801 makes block chain node receive the assets transfer transaction that client is submitted, the assets transfer transaction
The assets transfer project between multiple participants and corresponding assets transfer item are defined in the assets transfer intelligence contract of calling
Part;
Execution unit 802 makes the block chain node execute the assets transfer transaction to call the assets transfer intelligence
Can contract, make the assets transfer intelligence contract outside chain statistics indicate that when the assets transfer condition is satisfied, in the day of trade
Write-in is directed to the trigger event of the assets transfer project in will, and the trigger event is for triggering assets transfer platform described
Implement the corresponding assets transfer operation of the assets transfer project between the corresponding asset account of multiple participants.
Optionally, the assets transfer intelligence contract further has invoked the quick-witted energy contract of prophesy;When the assets transfer
When intelligent contract is called, the assets transfer intelligence contract is used to be passed to demand information to the quick-witted energy contract of the prophesy, with
So that the quick-witted energy contract of the prophesy is obtained the outer data of the chain and passes the assets transfer intelligence contract back.
Optionally, the demand information is defined in the assets transfer intelligence contract;Alternatively, the demand information by
The assets transfer transaction is passed to the assets transfer intelligence contract.
Optionally, the demand information includes at least one of: access address, the chain of the outer data of the chain count outside
According to index information.
Optionally, the content matching of the assets transfer project and the assets transfer condition in the multiple participant it
Between the contract signed.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
In a typical configuration, computer includes one or more processors (CPU), input/output interface, network
Interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, based on graphene
Storage medium or other magnetic storage devices or any other non-transmission medium, can be used for storing can be accessed by a computing device
Information.As defined in this article, computer-readable medium does not include temporary computer readable media (transitory media),
Such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims
It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment
It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable
Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can
With or may be advantageous.
The term that this specification one or more embodiment uses be only merely for for the purpose of describing particular embodiments, and
It is not intended to be limiting this specification one or more embodiment.In this specification one or more embodiment and the appended claims
Used in the "an" of singular, " described " and "the" be also intended to including most forms, unless context understands earth's surface
Show other meanings.It is also understood that term "and/or" used herein refers to and includes one or more associated list
Any or all of project may combine.
It will be appreciated that though this specification one or more embodiment may using term first, second, third, etc. come
Various information are described, but these information should not necessarily be limited by these terms.These terms are only used to same type of information area each other
It separates.For example, the first information can also be referred to as in the case where not departing from this specification one or more scope of embodiments
Two information, similarly, the second information can also be referred to as the first information.Depending on context, word as used in this is " such as
Fruit " can be construed to " ... when " or " when ... " or " in response to determination ".
The foregoing is merely the preferred embodiments of this specification one or more embodiment, not to limit this theory
Bright book one or more embodiment, all within the spirit and principle of this specification one or more embodiment, that is done is any
Modification, equivalent replacement, improvement etc. should be included within the scope of the protection of this specification one or more embodiment.