Specific embodiment
With reference to the accompanying drawing, the scheme provided this specification is described.
Fig. 1 is the implement scene schematic diagram of one embodiment that this specification discloses.In the implement scene, service platform
(such as sesame credit platform) on the one hand as a node in block chain network, executes the function of regular node, such as hand over
On the other hand easy record, forwarding, execution etc. interact with its user as service side, provide service for it.The service of offer
It may include converting intelligent contract for the treaty content of user.In one embodiment, service platform is provided for user and is connect
Enter the tool terminal of service, i.e. client utility, such as App, Dapp (distributed App), pc client etc., which is
User provides graphic user interface GUI (Graphical User Interface), which can be used for receiving intelligence
The treaty content of energy contract.Conclude the transaction consistent two parties A and B, can be by the GUI, using dragging, click, typing
Etc. intuitive ways, input treaty content.Tool terminal acquires the content of user's input, is sent to service platform.Service platform
The content for receiving user's input generates intelligent contract according to input content, and the intelligence contract is wide in block chain network
It broadcasts, record, execute it in block chain.Specifically, the first user A can create one by its tool terminal application
A contract, and input the first treaty content.It is defeated to pass through its tool terminal in turn with the second user B that the first user A reaches an agreement
Enter the second treaty content.Service platform receives above-mentioned first treaty content and the second treaty content respectively, is merged into complete
Contract, and it is compiled, format conversion, addition signature, to generate the intelligent contract for being suitable for executing automatically.According to user
The treaty content of input, above-mentioned intelligence contract can be contract in the real world, such as the sales note of actual products, really
The rental agreement in house etc..In this way, the treaty content that user is inputted by GUI, being converted into can execute in block chain
Intelligent contract so that user can customize the intelligent contract of oneself, and block chain technology is traded applied to real world
Execution.The generating process of the above intelligent contract is described below in detail.
Fig. 2 shows the flow charts of the intelligent contract of generation according to one embodiment.The executing subject of this method process can be with
It is service platform shown in FIG. 1.As shown in Fig. 2, above method process includes: step 21, receives the first user and used by figure
The first treaty content that family interface provides;Step 22, the second treaty content associated with second user is received;Step 23, root
According to the first treaty content and the second treaty content, using first user and the respective identity information of second user as number
Signature generates intelligent contract, to execute the intelligence contract in block chain.Above each step is described below with reference to example
Specific implementation procedure.
Firstly, the graphic user interface can as previously mentioned, tool terminal can provide graphic user interface GUI for user
For receiving the treaty content of intelligent contract.Specifically, tool terminal can may relate to different types of intelligent contract
Content be split as multiple modules, modules correspond to the different contract parts under different types of contract, such as rental agreement
Lower lessor's module, tenantry's module, merchant module and consumer module etc. under sales note again can bases under each module
Need to be divided into further submodule.These modules can be supplied to by tool terminal with the mode of graphic user interface GUI
User, user then can input contract with the mode of splicing module using modes of operation such as dragging, clicks at the GUI
Content generates desired intelligent contract.
Fig. 3 shows the schematic diagram of the graphic user interface according to one embodiment.As shown in figure 3, tool terminal will be intelligent
Contract is divided into a variety of reality scenes, including office lease, rents charging, hires a car, rent a house, consumption etc. of feeling at ease.In addition to the one of diagram
A little barter/rental agreements, also support the scene of service class, such as counseling services, education services, beauty services etc..Each
Scene corresponds to corresponding program module.It is assumed that user has selected the scene rented a house, that is, click the corresponding mould of scene of renting a house
Block, so that it may further be selected into the submodule under this scene, including landlord's module, tenant's module.It is assumed that with
Family has selected landlord's module, then can be selected in further module, such as houseclearing, landlord's information, hands over
The mode of paying, promise breaking agreement etc..It can see, graphic user interface GUI provided by tool terminal, allow by the example of Fig. 2
User splices modules by the way of building such as building blocks, to form the phase by operations such as simply dragging, clicks
The intelligent contract of prestige.
Based on such graphic user interface, in step 21, the first user is provided by graphic user interface the is received
One treaty content.In other words, the operation such as click, input carried out in above-mentioned graphic user interface according to the first user, is obtained
Take the first treaty content.Generally, creation side and initiator of first user as contract can input the major part weight in contract
Want information, for example, trading object, transaction value and transaction terms.For example, first uses in the case where renting a house contract
Family is usually landlord.Correspondingly, landlord may include house letter by the first treaty content that graphic user interface GUI is inputted
Breath, value of leass and other transaction terms, including delivery method, Treatment for Default mode etc..In another example in product sales note
In the case where, the first user is usually trade company.Correspondingly, trade company may include selling by the first treaty content that GUI is inputted
Product information, selling price and other transaction terms, such as promise of supporting value, replace processing, Treatment for Default etc..In addition, in majority
In the case of, the first treaty content will also include the identity information of the first user.
Then, in step 22, the second treaty content associated with second user is also received.Generally, second user is
Conclude the transaction opposite side of contract with the first user.In the included most of contract of the first treaty content that the first user provides
In the case where key content, the second treaty content generally includes the identity information of second user.It is described below with reference to specific example
The acquisition process of the above treaty content.
In one embodiment, above-mentioned contract is to feel at ease to consume contract.Feel at ease to consume contract to be also a kind of products in kind
Sales note, but unlike conventional consumer contract, it often further include some Additional Terms, such as clause of supporting value, three guarantees item
Money etc..Clause of supporting value is, for example, and within 3 months, in all such articles of head store sale, guaranteed price is minimum, otherwise
Give 3 times of present price of reparation.Three guarantees clause is, for example, to guarantee within certain time limit (such as 3 months), guarantees the repair free of charge guarantee for returns packet
It changes.For such contract, initiator is generally trade company.The graphic user interface that trade company can be provided by tool terminal, choosing
The contract type (as shown in the upper right corner Fig. 2) for selecting consumption of feeling at ease next proceeds through GUI and selects module appropriate, and then inputs
First treaty content.Correspondingly, in step 21, service platform receives first that trade company is inputted by the tool terminal of GUI form
Treaty content, these contents may include selling product information, selling price and other feel at ease to consume clause, such as support value and hold
Processing, Treatment for Default etc. are replaced in promise.
After obtaining the first treaty content, in one embodiment, encoding of graphs is generated for first treaty content.It should
Encoding of graphs is, for example, two dimensional code (can certainly be bar code or other more complicated codings).It is with two dimensional code below
Example is illustrated.It can uniquely be parsed for the two dimensional code that first treaty content generates, be associated with first treaty content.
Trade company can put up the two dimensional code at its trade company or its exhibition position for selling corresponding product after obtaining such two dimensional code.
On the other hand, consumer can scan the two dimensional code with its corresponding tool terminal, be looked by scanning the two-dimensional code
Read corresponding first treaty content of the two dimensional code, including it is therein feel at ease to consume clause, such as promise of supporting value replaces processing etc..
If consumer pleases oneself to the first treaty content, so that it may be operated on corresponding graphic user interface, such as point
" placing an order " or " confirmation " etc. are hit, so generation order, conclude contract, become another party of contract, that is, becomes above-mentioned the
Two users.The order information submitted accordingly, in response to the two dimensional code also just contains the second contract information.Generally,
One contract information has arranged the most clause information for feeling at ease to consume, and the second contract information generally comprises consumer, i.e., second
The identity information of user, such as User ID, reimbursement account etc..In this way, being obtained in the first treaty content and the second contract respectively
Hold.
The foregoing describe be directed to feel at ease to consume contract, the acquisition process of treaty content.
In another embodiment, the intelligent contract of Yao Shengcheng is rental agreement in kind, such as contract of renting a house.
In one example, as shown in Figure 3, it is assumed that user (the first user) has selected the scene rented a house, and continues to select
Landlord's module, then further selection has input houseclearing, pricing information, first contract such as delivery method in the module
Content.In one embodiment, after receiving such first treaty content, service platform correspondingly generates one and invites
Record, this invites record accordingly comprising the core feature of the first treaty content.Tool terminal, which invites this, is recorded in its service
It is broadcasted in network.Other nodes in network can recorde, this is forwarded to invite record, and then other users can connect
It receives, inquire this and invite record.Assuming that another user, i.e. second user are ready to conclude and close after consulting this and inviting record
About, then the user, which can extract this, invites record, its corresponding graphic user interface is opened, tenant's module is selected, at it
The second treaty content of middle input.Second treaty content is, for example, the identity information of second user.In this way, service platform obtains respectively
The first treaty content and the second treaty content are taken.
In another example, both the first treaty content and the second treaty content can also be inputted by same user.For example,
Under an implement scene, landlord and tenant are lower by seeing room on the spot online, have reached contract intention.Tenant can be certainly
Oneself identity information is supplied to landlord.In this case, landlord can be selected and be inputted by graphic user interface
The content for the entire contract reached an agreement with tenant, for example including houseclearing, pricing information, in first contract such as delivery method
Hold, and the second treaty content relevant to tenant's identity.In this way, tool terminal can directly obtain the first treaty content and
Two treaty contents, and service platform is sent by these treaty contents.
By various ways as described above, user can provide treaty content by the simple operations in GUI.Accordingly
Ground, in step 21 and 22, available first treaty content of service platform and the second treaty content.On this basis, in step
23, according to the first treaty content and the second treaty content, using the first user and the respective identity information of second user as number
Word signature generates intelligent contract.The process for generating intelligent contract mainly includes, to the first treaty content and the second treaty content into
Row contents extraction merges, and is compiled the process with code.
In one embodiment, the process for generating intelligent contract includes generating first for the trading object in contract unique
Identification code, to carry out code to trading object.For example, can be the house if trading object is house to be hired out
Generate exclusive identification code;If trading object is product to be sold, or the product generates exclusive identification code.
For other field contents of contract, specifically, step 23 be may further include, from the first treaty content and
Contract feature is extracted in two treaty contents, and the content of each contract field is determined according to the contract feature.It is appreciated that first
Treaty content and the second treaty content are that user is provided by graphic user interface, and graphic user interface is actually by contract
The disparate modules being split as under different type, and the function of these modules is visually supplied to the tool of user.User drags
The operation of dragging, click, selecting modules is equivalent to have activated the corresponding program code of modules.Accordingly for
The treaty content that family is inputted by modules, tool terminal/service platform can accordingly understand the meaning of input content, from
And contract feature is extracted from treaty content, corresponding contract feature is put into contract field corresponding with module, thus raw
At each contract field.For example, the first user has input content " hero peace xxx cell x xx building xx after selecting houseclearing module
The building room xx ".In this regard, service platform can therefrom extract contract feature " the hero peace building the xxx cell x xx building the xx room xx ", and pass through
The module " houseclearing " for inputting this feature, is put into corresponding contract field " house location " for the contract feature.
Fig. 4 shows the example of each contract field in a contract.Specifically, the example of Fig. 4 shows a conjunction of renting a house
A part about, wherein include multiple fields: house identification code, house location, landlord's identity information, lease side's identity information,
Lease way, the means of payment, promise breaking agreement etc..The first conjunction that the content of each field is provided from user by graphic user interface
About extracted in content/second treaty content.It is appreciated that Fig. 4 is only a signal, actual contract may be comprising more or more
Few field, can be using the form closer to executable code.
It, will also be to packet on the basis of generating each contract field based on the first treaty content and the second treaty content above
Entire contract containing each contract field carries out format compiling, and is believed using first user and the respective identity of second user
Breath is signed, and intelligent contract could be generated.
It is appreciated that intelligent contract is a kind of contract that can be propagated in block chain, record and execute automatically.In order to
It is executed automatically in block chain, the coding form that intelligent contract needs to have machine executable, and there is encryption, can not distorted
The features such as property.For this purpose, each contract field obtained above is combined, and its form for being compiled as intelligent contract.One
In a specific example, it converts the treaty content comprising each contract field to the form of shell script, which can be with
Directly is read and executed by the intelligent contract system in block chain.
In addition, user of the participant of intelligent contract as block chain, can obtain a pair of of public key and the private of the return of block chain
Key;Account address of the public key as user on block chain, unique key of the private key as the operation account.For above-mentioned first
The intelligent contract to be concluded of user and second user can use the first user and the respective private key of second user to sign as number
Name, is added in above-mentioned shell script, to generate intelligent contract.
In one embodiment, before generating above-mentioned intelligent contract, or later, the method for embodiment further includes obtaining
The credit information of at least one in the first user and second user.
In one embodiment, the credit information of the first user is only obtained.For example, in the case where feeling at ease to consume contract,
The first user, that is, the credit information of trade company can be only obtained, and consumer is not required.In another embodiment,
Only obtain the credit information of second user.For example, can only obtain the second use in the case where the rental agreement of certain material objects
Family, that is, the credit information of tenantry, and lessor is not required.In another embodiment, then it needs to obtain first
The credit information of both user and second user.For example, both need to obtain the first user in the case where house lease contract,
The credit information of house-owner side, it is also desirable to second user, the credit information of tenant side are obtained, to better assure that intelligent contract is formed
The authenticity of knot.
In one embodiment, above-mentioned credit information includes real people's authentication information.Real people's authentication information is for example including use
The information that the real informations such as face, identification card number are authenticated.
In one embodiment, above-mentioned credit information includes sesame credit information.Sesame credit is the transaction based on user
The big datas such as record, creditor-debtor entry, consumer record are fully assessed to user and the credit score that obtains, can be used for reflecting
The financial status of one user's totality.The registration information of user can be associated with its sesame credit.Correspondingly, obtain user's
Credit information includes the sesame credit information for reading the user.
In another embodiment, above-mentioned credit information can also include the credit information that third party credit institution provides.The
Tripartite credit institution may include that the mechanisms such as bank, government organs, credit information service, these mechanisms are also possible to based on user's
Various actions data are that user assesses its financial status.In order to obtain such credit information, user's offer can be obtained first
, identity information in the above-mentioned third-party institution and authorization issue according to such identity information and authorization to the third-party institution
Thus request receives the credit information that the third-party institution is directed to the user.
In another embodiment, above-mentioned credit information can also include, according to the executive condition of intelligent contract before
Determining credit score accumulation.In one example, the intelligent contract run in block chain can automatically derive execution.It abides by
Contract, so that the user that intelligent contract smoothly executes, available certain credit score accumulation after contract is finished.
Such credit score accumulation can also be used as the credit information of user.
Fig. 5 shows the interface schematic diagram for obtaining the credit information of user.In the example of fig. 5, user needs to enter core body
Platform can carry out next operation of concluding a treaty.In core body platform, user, which can choose, provides one or more credit letters
Breath, such as real people's certification is carried out, sesame credit is read, credit evaluation etc. is carried out using reference information.It is appreciated that credit information
It may include one of several information listed above or a variety of, can also include other kind of information for failing exclusive list.
In one embodiment, before generating intelligent contract, that is, the credit letter of the first user and/or second user is obtained
Breath, according to the credit information of acquisition, it is determined whether generate intelligent contract.In a specific example, if obtain first uses
The credit information of family and/or second user is unsatisfactory for pre-provisioning request, such as predetermined credit level is not achieved, then it is raw to refuse its contract
At request.For example, if the first user, i.e. the credit information of house-owner does not meet pre-provisioning request, then under the scene for contract of renting a house
It can abandon inviting record for its generation;If second user, i.e. the credit information of tenant does not meet pre-provisioning request, then can refuse
Its exhausted operation of concluding a treaty.It is as a result, only that the satisfactory user of credit information generates intelligent contract.
In one embodiment, it after generating intelligent contract according to the first treaty content and the second treaty content, obtains
The credit information of first user and/or second user, and according to credit information, modify the content of predetermined clause in intelligent contract.
For example, the first user has selected the means of payment of default in means of payment module under the scene for contract of renting a house: paying three and give as security
One.It correspondingly, can include the clause about the means of payment in the intelligent contract accordingly generated, regulation gives as security one to pay three in clause
Mode is paid.It is assumed that determining that the credit information satisfaction of second user is exempted to give as security after obtaining the credit information of second user
The condition of gold, such as sesame credit score can modify the item in intelligent contract about the means of payment at 750 points or more automatically at this time
Money is revised as exempting from cash pledge payment.Certainly, on the other hand, if it is determined that the credit of second user is lower than certain threshold value, may be used also
To be that cash pledge is double by the clause modification of the means of payment.In one example, in the first user and/or the credit of second user
In the case where not meeting predetermined condition, the intelligent contract generated can also be cancelled.
In one embodiment, authentic and valid in order to further ensure intelligent contract, third-party authentication can also be obtained
Verification information of the mechanism at least partly content in intelligent contract.Above-mentioned third-party authentication mechanism may include that government is corresponding
Administrative department or non-government organization certifying organization.Certifying organization can be to the authenticity of at least partly content in contract
Or legitimacy is verified, such as the authenticity of verifying trading object, verifies the reasonability etc. of transaction value.More specifically, example
Such as under the scene for contract of renting a house, third-party authentication mechanism can be sent by the information of trading object, i.e. houseclearing, such as
Housing bureau, to verify the authenticity and current statutory status in the house.In one embodiment, according to certifying organization
Verification information generates intelligent contract.This includes, according to verifying whether to pass through, it is determined whether generates intelligent contract.If verifying letter
Breath display, there are problems for the legitimacy or authenticity of trading object, then can cancel intelligent contract.If the verification passes,
Generate intelligent contract.In one embodiment, generating intelligent contract according to the verification information of certifying organization further includes, in intelligent conjunction
It include above-mentioned verification information in about.In one example, for the trading object being verified, the label having verified that is added for it
Or label.In another example, special field is added in intelligent contract, indicates verification result with the field.
In one embodiment, after the first user and second user sign, contract is also sent to third party
Arbitration or regulatory agency are that the contract is signed by these mechanisms.In this way, the event of default arranged in there is intelligent contract
In the case where, contract automatically can be transmitted to arbitration node or supervisory node, be arbitrated and supervised afterwards.
Intelligent contract added with user's signature (and optional third party's arbitration/regulatory agency's signature) can pass through
P2P network spreads and is stored in block chain.Specifically, service platform, can be by intelligent contract in area after generating intelligent contract
It is broadcasted in block chain, the mode for making it through P2P is spread in block chain the whole network, and each node can receive portion;Block
Verifying node in chain can keep in the contract received, under preset opportunity (referred to as common recognition time), nearest a period of time
Interior temporary all contracts, are packaged into a contract set, and calculate the Hash values of this contract set, then by this
The hash value of contract set is assembled into a block structure, is diffused into the whole network.After other verifying nodes receive this block structure,
The contract saved in block can be compared and be verified, until reaching one to newest contract set according to above-mentioned hash value
It causes.The newest contract collection credit union reached is diffused into the whole network in the form of block, and each block includes block head and block body, block
Head includes: the hash value of current block, the hash value of previous block, timestamp when reaching common understanding and other description informations;
The contract collection reached common understanding is recorded in block body.
The intelligent contract recorded in block can execute automatically in block chain.Specifically, the intelligence built in block chain bottom
Energy contract system at regular intervals traverses the state machine for including in each contract, affairs and trigger condition, meets trigger condition, will hold
Affairs specified in row contract, such as transfer accounts, contract forwarding, reparation changes User Status etc..In this way, realizing intelligent contract
It is automatic to execute.
It can be seen that, by providing a user graphic user interface, it can receive user for reality by above description
The treaty content of the concluded contract of the material object in the world, accordingly generates intelligent contract, allows the intelligence contract in block chain
It is automatic to execute.So that ordinary user can be for the intelligent contract of the transaction customization oneself of real world, preferably by area
Block chain technical application is into real world.
According to the embodiment of another aspect, a kind of device for generating intelligent contract is also provided.Fig. 6 is shown to be implemented according to one
The schematic block diagram of the device of the intelligent contract of the generation of example.As shown in fig. 6, the generating means 600 include: the first receiving unit
61, it is configured to receive the first treaty content that the first user is provided by graphic user interface;Second receiving unit 62, is configured to
Receive the second treaty content associated with second user;Generation unit 63 is configured to be closed according to the first treaty content and second
About content generates intelligent contract using first user and the respective identity information of second user as digital signature, so as to
The intelligence contract is executed in block chain.
In one embodiment, device 600 further includes coding generation unit (not shown), is configured to close according to described first
About content generates encoding of graphs, and the encoding of graphs is for being uniquely resolved to first treaty content.Correspondingly, it second connects
It receives unit 62 to be configured to, receives second treaty content that second user is submitted in response to the encoding of graphs.
In another embodiment, device 600 further includes inviting generation unit (not shown), is configured to close according to described first
Record is invited in about content generation;And the record of inviting is broadcasted.Correspondingly, second generation unit 62 is configured to,
The second user is received in response to second treaty content inviting record and providing.
According to a kind of embodiment, first treaty content includes: trading object, transaction value and transaction terms.
In one embodiment, device 600 further includes credit acquiring unit 610, be configured that obtain first user and
The credit information of at least one in the second user.
Correspondingly, in one embodiment, generation unit 63 is configured that according to the credit information, it is determined whether is generated
The intelligence contract.In one embodiment, generation unit 63 is additionally configured to: according to the credit information, modifying the intelligence
The content of the predetermined clause of contract.
According to one embodiment, the generation unit 63 is configured that from first treaty content and second contract
Contract feature is extracted in content;The content of each contract field is determined according to the contract feature;By each contract field
It is compiled as meeting the executable code of intelligent contract format, and adds the digital signature for it.
In one embodiment, device 600 further includes authentication unit (not shown), is configured to obtain third-party authentication mechanism
To the verification information of at least partly content in the intelligent contract.Correspondingly, the generation unit 63 is configured that according to
First treaty content, the second treaty content and the verification information generate intelligent contract.
In one embodiment, device 600 further includes radio unit 64, is configured that the intelligent contract in the area
It is broadcasted in block chain, so that the intelligent contract is recorded in some block by least one node in the block chain,
So that the intelligent contract system built in the block chain executes the intelligent contract automatically.
According to one embodiment, above-mentioned intelligence contract is rental agreement in kind, sales note in kind or service contract.
By above embodiments, can receive that user is provided by graphic user interface, for real world contract
Treaty content accordingly generates intelligent contract, which is executed automatically in block chain.So that commonly
User can be for the intelligent contract of the transaction customization oneself of real world, preferably by block chain technical application to real world
In.
According to the embodiment of another aspect, a kind of computer readable storage medium is also provided, is stored thereon with computer journey
Sequence enables computer execute method described in conjunction with Figure 2 when the computer program executes in a computer.
According to the embodiment of another further aspect, a kind of calculating equipment, including memory and processor, the memory are also provided
In be stored with executable code, when the processor executes the executable code, realize the method in conjunction with described in Fig. 2.
Those skilled in the art are it will be appreciated that in said one or multiple examples, function described in the invention
It can be realized with hardware, software, firmware or their any combination.It when implemented in software, can be by these functions
Storage in computer-readable medium or as on computer-readable medium one or more instructions or code transmitted.
Above-described specific embodiment has carried out further the purpose of the present invention, technical scheme and beneficial effects
It is described in detail, it should be understood that being not intended to limit the present invention the foregoing is merely a specific embodiment of the invention
Protection scope, all any modification, equivalent substitution, improvement and etc. on the basis of technical solution of the present invention, done should all
Including within protection scope of the present invention.