Summary of the invention
This specification embodiment provides a kind of cashing method based on intelligent contract, system and readable storage medium storing program for executing, energy
The enough efficiency that gathering is improved in the case where full-amount gathering, so that the experience of user is more preferable.
This specification embodiment first aspect provides a kind of cashing method based on intelligent contract, is applied to multiple users
In contract creation terminal in terminal, the multiple user terminal includes that the contract creation terminal and at least one contract participate in
Terminal, including
Expense is created in block chain and shares gathering contract equally, and obtains the contract address that the expense shares gathering contract equally;
The contract address is sent to each terminal at least one described contract participation terminal;
The expense, which is downloaded, from the contract address shares gathering contract equally;
It runs the expense and shares gathering contract equally, then execute the expense automatically in local and share gathering contract equally, pay
The expense shares the Consideration in gathering contract equally.
This specification embodiment second aspect provides a kind of cashing method based on intelligent contract, is applied to multiple users
In contract participation terminal in terminal, comprising:
Receive the contract address that the expense that the contract creation terminal in the multiple user terminal is sent shares gathering contract equally;
The expense, which is downloaded, from the contract address shares gathering contract equally;
It runs the expense and shares gathering contract equally, then execute the expense automatically in local and share gathering contract equally, pay
The expense shares the Consideration in gathering contract equally.
This specification embodiment third aspect additionally provides a kind of contract creation terminal, comprising:
Contract creating unit shares gathering contract equally for creating expense in block chain;
Contract address acquisition unit shares the contract address of gathering contract equally for obtaining the expense;
Contract address transmission unit, for the contract address to be sent to each of at least one contract participation terminal
Terminal;
Contract download unit shares gathering contract equally for downloading the expense from the contract address;
Contract execution unit shares gathering contract equally for running the expense, is then locally executing the expense automatically
Share gathering contract equally, pay the expense share equally gathering contract in Consideration.
This specification embodiment fourth aspect additionally provides a kind of contract participation terminal, comprising:
Contract address receiving unit, the expense for receiving contract creation terminal transmission is with sharing the contract of gathering contract equally
Location;
Contract address download unit shares gathering contract equally for downloading the expense from the contract address;
Contract execution unit shares gathering contract equally for running the expense, is then locally executing the expense automatically
Share gathering contract equally, pay the expense share equally gathering contract in Consideration.
The 5th aspect of this specification embodiment additionally provides a kind of cash collecting system based on intelligent contract, the system comprises
Multiple user terminals, wherein the multiple user terminal includes contract creation terminal and at least one contract participation terminal, packet
It includes:
The contract creates terminal, shares gathering contract equally for creating expense in block chain, and it is equal to obtain the expense
The contract address of booth gathering contract, and the contract address is sent to each end at least one described contract participation terminal
End;
Each terminal in the multiple user terminal, for obtaining the contract address, and under the contract address
It carries the expense and shares gathering contract equally, and run the expense and share gathering contract equally, then locally executing the expense automatically
Share gathering contract equally, pay the expense share equally gathering contract in Consideration.
The aspect of this specification embodiment the 6th additionally provides a kind of electronic equipment, including memory, processor and is stored in
On memory and the computer program that can run on a processor, the processor are realized above-mentioned based on intelligence when executing described program
The step of cashing method of energy contract.
The 7th aspect of this specification embodiment additionally provides a kind of computer readable storage medium, is stored thereon with computer
Program, the program is when being executed by processor the step of the above-mentioned cashing method based on intelligent contract.
This specification embodiment has the beneficial effect that:
Based on the above-mentioned technical proposal, expense is created in block chain and share gathering contract equally, and will acquire the expense and share equally
The each terminal of the contract address of gathering contract being sent at least one contract participation terminal, so that multiple user terminals
Each terminal runs the expense and shares gathering conjunction equally after sharing gathering contract equally from the contract address downloading expense
About, then the expense is executed automatically share gathering contract equally, pay the expense and share about deposit in gathering contract equally locally
Volume, in this way, in the multiple user terminal each terminal run the expense share equally gathering contract after, institute can be passed through
The expense of stating shares gathering contract equally and is automatically performed and withholds, thus in the case where ensuring to collect money in full amount, additionally it is possible to improve the effect of gathering
Rate, so that the experience of user is more preferable.
Specific embodiment
In order to better understand the above technical scheme, below by attached drawing and specific embodiment to this specification embodiment
Technical solution be described in detail, it should be understood that the specific features in this specification embodiment and embodiment are to this explanation
The detailed description of book embodiment technical solution, rather than the restriction to this specification technical solution, in the absence of conflict,
Technical characteristic in this specification embodiment and embodiment can be combined with each other.
In a first aspect, as shown in Figure 1, this specification embodiment provides a kind of cash collecting system based on intelligent contract, it is described
System includes multiple user terminals, wherein the multiple user terminal includes contract creation terminal 100 and at least one contract ginseng
With terminal 200, comprising:
Contract creates terminal 100, shares gathering contract equally for creating expense in block chain 300, and obtain the expense
It shares the contract address of gathering contract equally, and the contract address is sent at least one described contract participation terminal 200
Each terminal;
Each terminal in the multiple user terminal, for obtaining the contract address, and under the contract address
It carries the expense and shares gathering contract equally, and run the expense and share gathering contract equally, then locally executing the expense automatically
Share gathering contract equally, pay the expense share equally gathering contract in Consideration.
In this specification embodiment, contract, which creates terminal 100, to be any one use in the multiple user terminal
Family terminal;Further, the expense shares gathering contract i.e. AA gathering contract equally.
In this specification embodiment, contract creates terminal 100 when the creation expense shares gathering contract equally, needs to obtain first
The expense is taken to share the corresponding project data of gathering contract equally, wherein the project data includes at least the project participated in jointly
And amount paid;Then according to the project data, the expense is created in block chain 300 and shares gathering contract equally.
Certainly, the amount of money of payment needed for each terminal can also be limited by sharing equally in gathering contract in the creation expense
System, in this way, the maximum dollar amount paid needed for each terminal can be set.Wherein, the project data can also include common ginseng
With project source and data such as item object time for participating in jointly.
In this specification embodiment, contract creates terminal 100 when the creation expense shares gathering contract equally, also needs to utilize
The private key of contract creation terminal 100 shares gathering contract equally to the expense and signs.
In this specification embodiment, contract creation terminal 100 creates the expense and shares gathering contract equally, specifically includes:
Contract main body and agreement terms that the expense shares gathering contract equally are set, the contract main body is the multiple use
The payment account of each terminal in the terminal of family, the agreement terms include response condition and rule of response, wherein the response
Condition includes across the chain payment behavior of credit, and the rule of response includes in the backward the multiple user terminal that turnover is shared equally
Each terminal initiate gathering.
In this specification embodiment, contract creates terminal 100 during the creation expense shares gathering contract equally, also needs
The shroff account number that the expense shares gathering contract equally is set, the shroff account number is any one in the multiple user terminal
The payment account of terminal.
In this specification embodiment, the payment account can be indicated with code key and unique address, wherein it is described only
One address can be the cryptographic Hash for the elliptic curve cipher public key that block chain 300 uses.
Specifically, the response condition includes across the chain payment behavior of credit, and across the chain payment behavior of the credit is used
Credit is carried out in the payment behavior shared equally in gathering contract to the expense, so that the expense shares gathering contract equally and sets up it
Afterwards, by the response condition and the rule of response, may not need user terminal, credit can be from the user terminal pair again
Auto deduction in the account answered, so that promoting the expense to share gathering contract equally is automatically performed execution.
In this specification embodiment, each terminal in the multiple user terminal is shared gathering equally in the operation expense and is closed
When about, needs to be written the payment account of the terminal expense and share equally in gathering contract, then use the private key pair of the terminal
The expense for being written with payment account shares gathering contract equally and signs.
In this specification embodiment, each terminal in the multiple user terminal pays the expense and shares gathering conjunction equally
During Consideration in about, it can be used that chain that relaying technique carries out block chain 300 by third party's connector is outer and chain
Interior exchange of value realizes that the payment expense shares the Consideration in gathering contract equally, wherein the relaying technique can
Think the relaying technique of Po l kadot.
Specifically, due to being to be generally used in the first token to circulate in block chain 300 in chain in block chain 300
(token) it trades, and i.e. chain usually requires to trade using transaction coin outside during real trade, wherein the friendship
Easy coin includes franc and other tokens, in this way, to share equally used in gathering contract in the expense is the first token, and
Withholing when sharing gathering contract execution equally using the expense is transaction coin, to need to carry out area by third party's connector
Exchange of value outside the chain of block chain 300 and in chain, to realize that the payment expense shares the Consideration in gathering contract equally.
For example, it is 20token that the expense, which shares the total value being written in gathering contract equally, 20token corresponds to 200 franc, such as
This, when the expense is shared equally and collected money in gathering contract, if corresponding to 5token to first terminal, according to token and franc
Transformational relation, then the expense shares gathering contract equally and withholds in the corresponding account of first terminal 5 × (200/20)=50 method
Coin.
Specifically, third party's connector is the connector that Third-party payment mechanism provides, third party's connection
Device is used to for each terminal in the multiple user terminal provide evidence for payment, overall flow the following steps are included: one,
Each terminal is paid the bill using the payment function that the third payment mechanism provides, and using the private key of the terminal to paying bill
According to signing;Secondly, the Third-party payment mechanism collect the payment document, generate evidence for payment;And it is detecting
There are after the evidence for payment, expense described in automatic trigger shares gathering contract equally, then controls the expense and shares gathering conjunction equally
About in local runtime, it is automatically performed and withholds.
In this specification embodiment, each terminal in the multiple user terminal is from described in the downloading of the contract address
After expense shares gathering contract equally, during the operation expense shares gathering contract equally, also need corresponding using each terminal
Private key shares gathering contract equally to the expense and signs.So it is found that each terminal shares gathering contract equally to the expense
Private key signature is carried out, making the expense share gathering contract equally on the basis of private key signature has mandatory, and described takes
It include across the chain payment behavior of credit with the response condition for sharing the agreement terms in gathering contract equally, so that the expense shares receipts equally
Payment behavior credit in money contract carries out in this way, can use the contract rule that the expense is shared equally in gathering contract
Automatic gathering.
In this specification embodiment, the expense shares gathering contract equally and belongs to intelligent contract, and intelligent contract is to execute conjunction
The about computer transactions agreement of clause is the important component of block chain 2.0.AA gathering based on intelligent contract is participant
It for the formula of common payment behavior, can not be distorted once signing, while in the whole network publicity.The branch that participant should bear jointly
The automatic execution of triggering gathering, is not necessarily to participant's duplicate acknowledgment after occurring out, so that it is guaranteed that full-amount gathering;And in the receipts
In money contract implementation procedure, can the case where being reaffirmed without participant auto deduction, with phase of actively withholing in the prior art
Than gathering efficiency can be effectively improved, so that the experience of user is more preferable.
In this specification embodiment, each terminal in the multiple user terminal is shared gathering equally in the operation expense and is closed
After about, just the expense can be executed automatically in local and share gathering contract equally.
For example, if at least one described participation terminal 200 includes smart phone B1, smart phone B2 and smart phone B3,
Contract creation terminal 100 initiates the AA gathering contract, discloses the content of the AA gathering contract, sends and close to B1, B2 and B3
About address;After B1 receives the contract address, B1 downloads the AA gathering contract from the contract address, and described in operation
AA gathering contract the payment account of B1 can be written in the AA gathering contract, so during running the AA gathering contract
It is signed afterwards using AA gathering contract of the private key of B1 to the payment account for being written with B1, so that B1 becomes described
The contract participant of AA gathering contract;Contract creates terminal 100, B2 and B2 after getting the contract address, execute with
The identical operation of B1 becomes the contract participant of AA gathering contract;In this way, making the participant of the AA gathering contract
Terminal 100, B1, B2 and B3 this 4 terminals are created for contract.
Wherein, if the content of AA gathering contract is to have a dinner party and total amount is 50token, an and token corresponding 10
Franc is shared total amount 50token equally by above-mentioned 4 terminals, then according to the rule of response in AA gathering contract thus really
Making the corresponding franc of each terminal is 50 × 10/4=125, is then received according to AA gathering contract to each terminal
Money, collection amount are franc 125, i.e. the branch from each terminal in contract creation terminal 100, B1, B2 and B3 this 4 terminals
It pays a bill franc 125 of withholing in family.
Further, if the shroff account number set in AA gathering contract is the payment account of B1, by above-mentioned 4 ends
It withholds and is put into the payment account of B1 in the payment account of each terminal in end, so that 125 × 4=500 franc is put into B1
Payment account in.In this way, in the multiple user terminal each terminal run the expense share equally gathering contract after,
Gathering contract can be shared equally by the expense to be automatically performed and withhold, thus in the case where ensuring to collect money in full amount, additionally it is possible to mention
The efficiency of height gathering, so that the experience of user is more preferable.
Second aspect, based on the same inventive concept with first aspect, this specification embodiment provides a kind of based on intelligence
The cashing method of contract, applied in the contract creation terminal in multiple user terminals, the multiple user terminal includes described
Contract creates terminal and at least one contract participation terminal, as shown in Figure 2, comprising:
S202, creation expense shares gathering contract equally in block chain, and obtains the contract that the expense shares gathering contract equally
Address;
S204, the contract address is sent to each terminal at least one described contract participation terminal;
S206, from the contract address, the downloading expense shares gathering contract equally;
S208, the operation expense share gathering contract equally, then execute the expense automatically in local and share gathering contract equally,
Pay the expense share equally gathering contract in Consideration.
In a kind of optional way, the expense that creates in block chain shares gathering contract equally, specifically includes:
It obtains the expense and shares the corresponding project data of gathering contract equally, wherein the project data includes common participates in
Project and amount paid;
According to the project data, the expense is created in the block chain and shares gathering contract equally.
In a kind of optional way, the expense that creates in block chain shares gathering contract equally, specifically includes:
The agreement terms that the expense shares gathering contract equally are set, the agreement terms include response condition and response rule
Then, wherein the response condition includes across the chain payment behavior of credit, and the rule of response includes the backward institute that turnover is shared equally
The each terminal stated in multiple user terminals initiates gathering.
In this specification embodiment, the response condition includes across the chain payment behavior of credit, across the chain branch of the credit
The payment behavior that the behavior of paying is used to share the expense equally in gathering contract carries out credit, so that the expense shares gathering contract equally
After establishment, by the response condition and the rule of response, may not need terminal, credit can be corresponding from the terminal again
Account in auto deduction, thus promote the expense share equally gathering contract be automatically performed execution, can ensure to collect money in full amount
In the case where, additionally it is possible to the efficiency of gathering is improved, so that the experience of user is more preferable.
In a kind of optional way, when the creation expense shares gathering contract equally, the method also includes:
Gathering contract is shared equally to the expense using the private key of contract creation terminal to sign.
In a kind of optional way, each terminal in the multiple user terminal pays the expense and shares gathering conjunction equally
During Consideration in about, the method also includes:
The exchange of value outside the chain of the block chain and in chain is carried out by third party's connector using relaying technique, is realized
The payment expense shares the Consideration in gathering contract equally, wherein third party's connector is Third-party payment machine
The connector that structure provides.
The third aspect, based on the same inventive concept with first aspect, this specification embodiment provides a kind of based on intelligence
The cashing method of contract, applied in the contract participation terminal in multiple user terminals, as shown in Figure 3, comprising:
S302, the contract that the expense that the contract creation terminal in the multiple user terminal is sent shares gathering contract equally is received
Address;
S304, from the contract address, the downloading expense shares gathering contract equally;
S306, the operation expense share gathering contract equally, then execute the expense automatically in local and share gathering contract equally,
Pay the expense share equally gathering contract in Consideration.
In a kind of optional embodiment, during the payment expense shares the Consideration in gathering contract equally, institute
State method further include:
The exchange of value outside the chain of the block chain and in chain is carried out by third party's connector using relaying technique, is realized
The payment expense shares the Consideration in gathering contract equally, wherein third party's connector is Third-party payment machine
The connector that structure provides.
In a kind of optional embodiment, the operation expense shares gathering contract equally, specifically includes:
The expense is written in the payment account of the contract participation terminal to share equally in gathering contract, then uses the conjunction
About the private key of participation terminal shares gathering contract equally to the expense for being written with payment account and signs.
Fourth aspect, based on the same inventive concept with second aspect, this specification embodiment provides a kind of contract creation
Terminal, as shown in Figure 4, comprising:
Contract creating unit 401 shares gathering contract equally for creating expense in block chain;
Contract address acquisition unit 402 shares the contract address of gathering contract equally for obtaining the expense;
Contract address transmission unit 403, for the contract address to be sent at least one contract participation terminal
Each terminal;
Contract download unit 404 shares gathering contract equally for downloading the expense from the contract address;
Contract execution unit 405 shares gathering contract equally for running the expense, is then locally executing the expense automatically
With gathering contract is shared equally, pay the expense share equally gathering contract in Consideration.
In a kind of optional way, it is corresponding to share gathering contract equally specifically for the acquisition expense for contract creating unit 401
Project data, wherein the project data includes the project participated in jointly and amount paid;According to the project data,
The expense, which is created, in the block chain shares gathering contract equally.
In a kind of optional way, contract creating unit 401 shares the conjunction of gathering contract equally specifically for setting the expense
About clause, the agreement terms include response condition and rule of response, wherein the response condition includes across the chain payment of credit
Behavior, the rule of response include that each terminal in the backward the multiple user terminal that turnover is shared equally initiates gathering.
In this specification embodiment, the response condition includes across the chain payment behavior of credit, across the chain branch of the credit
The payment behavior that the behavior of paying is used to share the expense equally in gathering contract carries out credit, so that the expense shares gathering contract equally
After establishment, by the response condition and the rule of response, may not need terminal, credit can be corresponding from the terminal again
Account in auto deduction, thus promote the expense share equally gathering contract be automatically performed execution.
In a kind of optional way, further includes:
Signature unit, for utilizing the private key of contract creation terminal when the creation expense shares gathering contract equally
Gathering contract is shared equally to the expense to sign.
In a kind of optional way, contract execution unit 405, for the payment account of contract creation terminal to be written
The expense is shared equally in gathering contract, then using the private key of contract creation terminal to the expense for being written with payment account
It is signed with gathering contract is shared equally.
In a kind of optional way, further includes:
Exchange of value unit pays the expense for each terminal in the multiple user terminal and shares gathering conjunction equally
During Consideration in about, carried out outside the chain of block chain 300 and in chain using relaying technique by third party's connector
Exchange of value realizes that the payment expense shares the Consideration in gathering contract equally, wherein third party's connector is
The connector that Third-party payment mechanism provides.
5th aspect, based on the same inventive concept with the third aspect, this specification embodiment provides a kind of contract participation
Terminal, as shown in Figure 5, comprising:
Contract address receiving unit 501 shares the contract of gathering contract equally for receiving the expense that contract creation terminal is sent
Address;
Contract address download unit 502 shares gathering contract equally for downloading the expense from the contract address;
Contract execution unit 503 shares gathering contract equally for running the expense, is then locally executing the expense automatically
With gathering contract is shared equally, pay the expense share equally gathering contract in Consideration.
In a kind of optional embodiment, further includes:
Exchange of value unit, during for sharing the Consideration in gathering contract equally in the payment expense, in use
After the exchange of value outside the chain that technology carries out the block chain by third party's connector and in chain, wherein the third party connects
Connecing device is the connector that Third-party payment mechanism provides.
In a kind of optional embodiment, contract execution unit 503, specifically for by the payment of the contract participation terminal
Account is written the expense and shares equally in gathering contract, and then the private key using the contract participation terminal is to being written with payment account
The expense share equally gathering contract sign.
6th aspect, based on inventive concept same as the cashing method based on intelligent contract in previous embodiment, this theory
Bright book embodiment also provides a kind of electronic equipment, as shown in fig. 6, including memory 604, processor 602 and being stored in memory
On 604 and the computer program that can run on processor 602, the processor 602 realize institute above when executing described program
The step of stating either the cashing method based on intelligent contract method.
Wherein, in Fig. 6, bus architecture (is represented) with bus 600, and bus 600 may include any number of interconnection
Bus and bridge, bus 600 will include the one or more processors represented by processor 602 and what memory 604 represented deposits
The various circuits of reservoir link together.Bus 600 can also will peripheral equipment, voltage-stablizer and management circuit etc. it
Various other circuits of class link together, and these are all it is known in the art, therefore, no longer carry out further to it herein
Description.Bus interface 605 provides interface between bus 600 and receiver 601 and transmitter 603.Receiver 601 and transmitter
603 can be the same element, i.e. transceiver, provide the unit for communicating over a transmission medium with various other devices.Place
It manages device 602 and is responsible for management bus 600 and common processing, and memory 604 can be used for storage processor 602 and execute behaviour
Used data when making.
7th aspect, based on the inventive concept with the cashing method based on intelligent contract in previous embodiment, this specification
Embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, when which is executed by processor
The step of realizing either the cashing method described previously based on intelligent contract method.
This specification is referring to the method, equipment (system) and computer program product according to this specification embodiment
Flowchart and/or the block diagram describes.It should be understood that can be realized by computer program instructions every in flowchart and/or the block diagram
The combination of process and/or box in one process and/or box and flowchart and/or the block diagram.It can provide these computers
Processor of the program instruction to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices
To generate a machine, so that generating use by the instruction that computer or the processor of other programmable data processing devices execute
In setting for the function that realization is specified in one or more flows of the flowchart and/or one or more blocks of the block diagram
It is standby.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of equipment, the commander equipment realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of this specification has been described, once a person skilled in the art knows basic wounds
The property made concept, then additional changes and modifications may be made to these embodiments.So the following claims are intended to be interpreted as includes
Preferred embodiment and all change and modification for falling into this specification range.
Obviously, those skilled in the art can carry out various modification and variations without departing from this specification to this specification
Spirit and scope.In this way, if these modifications and variations of this specification belong to this specification claim and its equivalent skill
Within the scope of art, then this specification is also intended to include these modifications and variations.