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 flow chart for money transfer method based on block chain that an exemplary embodiment provides, and is applied to block
The ustomer premises access equipment of chain, the account balance of user account are at least divided into a reserve fund remaining sum and a spare remaining sum;Wherein, institute
Stating user account includes the reserve fund list that a dynamic updates;The reserve fund list includes multiple reserve fund amount of money.
Block chain described in above-described embodiment, specifically can refer to it is that each node device is reached by common recognition mechanism, have
The P2P network system of Distributed Storage structure, data distribution in the block chain " block one by one connected in time
(block) " within, latter block includes the data summarization of previous block, and according to specific common recognition mechanism (such as POW, POS,
DPOS or PBFT etc.) difference, reach the data full backup of all or part of node.Those skilled in the art is known, due to
Block catenary system is run under corresponding common recognition mechanism, has been included to the data in block chain database and has been difficult to be usurped by arbitrary node
Change, for example, by using the block chain of Pow common recognition, the attack at least needing the whole network 51% to calculate power is possible to distort data with existing, because
This block catenary system have other centralization Database Systems it is incomparable guarantee data security, the characteristic that attack protection is distorted.
It follows that in the embodiment provided by this specification, the money transfer transactions that are included into the distributed data base of block chain
And other transaction are not easy to be attacked or distorted, so that the transaction of the distributed data base to be distributed to the block chain is deposited
Card.
The ustomer premises access equipment of the money transfer method based on block chain described in the present embodiment is executed, can be above-mentioned block chain
Node device can also be the client device connecting with the node device of above-mentioned block chain, be not construed as limiting in the present specification.
Using the decentralization platform of the above-mentioned block chain management Obj State conversion general as one, user account is exactly
Stateful object, the content that content included by user account can include by the state of above-mentioned user account, this explanation
User account provided by book includes account balance information and the reserve fund list to support money transfer transactions.In this specification
In, it include the reserve fund list that a dynamic updates, institute in order to support user that can send money transfer transactions without pause, in user account
Stating reserve fund list includes multiple reserve fund amount of money.
Above-mentioned multiple reserve fund amount of money can be dispensed in different money transfer transactions, provided for each money transfer transactions and be enough to prop up
Pay the proof of its remittance.It is worth noting that, " account " described in this specification is not limited to external all accounts (EOA) and closes
About account (Contract), and also do not limit the specific manifestation form of above-mentioned reserve fund list, if comprising or management it is above-mentioned more
The data organization form of a reserve fund amount of money, as described in dimensional table, bivariate table, tree form data structure etc. belong to this specification
Reserve fund list.The value of reserve fund remaining sum and spare remaining sum described in this specification may not be displayed in the user account of block chain
In state, and the content that can be shown or manage as user client;Certainly, the value of above-mentioned reserve fund remaining sum and spare remaining sum
It may be displayed in the account status of block chain, be not construed as limiting in the present specification.
As shown in Figure 1, above-mentioned money transfer method may comprise steps of:
Step 102, it remits money and operates in response to Client-initiated, be the remittance that user submits according to current reserve fund list
Volume distributes the corresponding reserve fund amount of money;
Step 104, money transfer transactions are constructed based on the remittance and the reserve fund amount of money of distribution, and by the remittance
Money transaction is distributed to block chain, with after the money transfer transactions are verified by the node device in block chain, from the account
The remittance is reduced in the reserve fund remaining sum of remaining sum sum.
In the above-described embodiments, the reserve fund amount of money corresponding with remittance is at least one, and corresponding with remittance pre-
The sum of standby gold amount of money should be not less than the remittance of transaction, to provide the voucher for being enough to pay for the money transfer transactions.For example, current
Reserve fund list in include { 5,10,15,20 } four reserve fund amount of money, for remittance be 10 money transfer transactions, user terminal
Equipment can select a reserve fund amount of money 10 (or 15 or 20) from the aforementioned four reserve fund amount of money, by said one reserve fund gold
Volume 10 (or 15 or 20) is distributed into above-mentioned money transfer transactions;The money transfer transactions that corresponding remittance is 12, ustomer premises access equipment can be from upper
It states and selects a reserve fund amount of money 15 (or 20) in four parts of reserve fund amount of money, the said one reserve fund amount of money 15 (or 20) is distributed
To two reserve fund amount of money 5 and 10 (or 5 Hes in above-mentioned money transfer transactions, can also be selected from the aforementioned four reserve fund amount of money
15), it is using the sum of two reserve fund amount of money into above-mentioned money transfer transactions by the distribution of above-mentioned two reserve fund amount of money 15 (or 20)
Money transfer transactions provide the verifying for being enough to pay and prove.
In one embodiment, remittance abroad side user and recipient user can arrange from remittance abroad side's block chain account to recipient
Block chain account imports the assets voucher that (or to shift) corresponds to the remittance.Assets voucher can correspond in block chain
Token (token), the intellectual capitals such as digital asset, assets voucher is also can correspond to cash outside block chain, security, preferential
The outer assets of the chains such as certificate, house property, this specification are limited not to this.
Block chain is sent to by ustomer premises access equipment after money transfer transactions building, and receives testing for block chain interior joint equipment
Card.Money transfer method based on block chain as provided by this specification can be used in based on a variety of common recognition mechanism types
In block chain, therefore this specification neither limits the quantity and type that above-mentioned money transfer transactions are executed with the block chain node of verifying,
The interior perhaps process that above-mentioned verifying is included is not limited yet.But those skilled in the art, it should be understood that above-mentioned verifying include at least test
The remittance whether the sum of reserve fund amount of money in money transfer transactions is greater than or equal to money transfer transactions is demonstrate,proved, whether to examine user account
There are enough remaining sums to pay the money transfer transactions.After above-mentioned money transfer transactions are verified by the node device of block chain, from user
Account balance and reserve fund remaining sum in reduce the remittance.
Fig. 2 illustrates the creation and renewal process of reserve fund list in above-described embodiment, and the process as shown in Figure 2 can be general
Include the circulation step being connected with each other for two:
Step A obtains current reserve fund remaining sum, obtains reserve fund list according to current reserve fund remaining sum;
Whether step B, the reserve fund amount of money that can be used in the current reserve fund list of dynamic monitoring distributing are lower than preset threshold,
If it is after current spare remaining sum being switched to reserve fund remaining sum, step A is executed.
After user's registration is the user of above-mentioned block chain, account balance can be at least divided into the pre- of an initialization by user
The spare remaining sum of standby gold remaining sum and an initialization, the reserve fund remaining sum that user equipment is primarily based on the initialization execute above-mentioned steps
Process described in A.
Above-mentioned current spare remaining sum can generate the reserve fund amount of money in new reserve fund list after handover;Optionally,
Before not being triggered to generate new reserve fund list, which may act as balance of remittance to support user to initiate
Individually (not concurrent) money transfer transactions can also be used as gathering remaining sum and converge to receive other accounts to the remittance of the user account
Money;Moreover, the spare remaining sum of some of them can also be not involved in when account balance includes two or more spare remaining sums
Remittance or gathering, only as static remaining sum, in (the reserve fund list such as generated based on former reserve fund remaining sum of suitable opportunity
In the reserve fund amount of money that can be used for distributing lower than preset threshold when, or receive the new reserve fund list builder of user's transmission and refer to
When enabling) it is triggered to divide the reserve fund amount of money obtained in new reserve fund list.
In the embodiment that one shows, reserve fund list is obtained according to current reserve fund remaining sum described in step A
Process, comprising:
Current reserve fund remaining sum is divided to obtain multiple reserve fund amount of money, the multiple reserve funds gold obtained based on division
Volume constructs the transaction of reserve fund list creating;
Reserve fund list creating transaction is distributed to block chain, to trade in the reserve fund list creating by block
After node device in chain is verified, constructed in advance in the user account based on the obtained multiple reserve fund amount of money that divide
Standby Jin Liebiao.
In the above-described embodiment, current reserve fund remaining sum can be divided in order to obtain multiple reserve fund amount of money, to guarantee
Above-mentioned multiple reserve fund amount of money obtain the common recognition verifying of block chain node, that reserve fund list creating exchange includes, based on working as
The sum of multiple reserve fund amount of money that preceding reserve fund remaining sum divides should be not more than the reserve fund remaining sum.By this specification institute
The money transfer method based on block chain provided can be used in the block chain based on a variety of common recognition mechanism types, therefore this theory
Bright book, which neither limits to trade to above-mentioned reserve fund list creating, executes the quantity and type of the block chain node of verifying, does not also limit
The interior perhaps process that above-mentioned verifying is included.But those skilled in the art are, it should be understood that above-mentioned verifying includes at least verifying reserve fund
Whether the sum of reserve fund amount of money in list creating transaction is less than or equal to current reserve fund remaining sum (or the account shape as user
When not showing reserve fund remaining sum in state, whether the sum of the reserve fund amount of money that should at least verify in the transaction of reserve fund list creating is less than
Or equal to current account balance), to examine the validity of above-mentioned reserve fund remaining sum.When above-mentioned reserve fund list creating transaction quilt
It is including based on reserve fund list creating exchange in the user account, described after the node device of block chain is verified
Divide obtained multiple reserve fund amount of money building reserve fund list.
In the another embodiment shown, the current reserve fund remaining sum of above-mentioned basis obtains reserve fund list, comprising:
Current reserve fund remaining sum is divided to obtain multiple reserve fund amount of money, the multiple reserve funds gold obtained based on division
Volume constructs reserve fund list, and is traded based on the reserve fund list builder reserve fund list creating;
Reserve fund list creating transaction is distributed to block chain, to trade in the reserve fund list creating by block
After node device in chain is verified, by the reserve fund list update into the user account.
In the above-described embodiments, current reserve fund remaining sum can be divided in order to obtain multiple reserve fund amount of money, based on above-mentioned
The multiple reserve fund amount of money construct reserve fund lists, and by it is above-mentioned include divided based on current reserve fund remaining sum it is multiple pre-
The reserve fund list of the standby gold amount of money is included in above-mentioned reserve fund list creating transaction.To guarantee that above-mentioned multiple reserve fund amount of money obtain
Common recognition to block chain node is verified, that reserve fund list creating exchange includes, divided based on current reserve fund remaining sum
The sum of multiple reserve fund amount of money arrived should be not more than the reserve fund remaining sum.Remittance based on block chain as provided by this specification
Money method can be used in the block chain based on a variety of common recognition mechanism types, therefore this specification is neither limited to above-mentioned pre-
Standby gold list creating transaction executes the quantity and type of the block chain node of verifying, does not also limit the content that above-mentioned verifying is included
Or process.But those skilled in the art are, it should be understood that above-mentioned verifying includes at least the preparation in verifying reserve fund list creating transaction
Whether the sum of amount of money is less than or equal to current reserve fund remaining sum (or when not showing reserve fund remaining sum in the account status of user
When, it should at least verify whether the sum of reserve fund amount of money in the transaction of reserve fund list creating is less than or equal to more than current account
Volume), to examine the validity of above-mentioned reserve fund remaining sum.It trades when above-mentioned reserve fund list creating and is tested by the node device of block chain
After card passes through, the reserve fund list update for including by reserve fund list creating exchange is into the user account.
Those skilled in the art is, it should be understood that each reserve fund amount of money in reserve fund list is to provide to be enough for money transfer transactions
The remaining sum voucher of payment, the money transfer transactions based on same reserve fund amount of money duplicate allocation can not pass through the verifying of block chain node.
With the sending of more and more money transfer transactions, it can be used for the reserve fund amount of money of distribution in user account in current reserve fund list
It is fewer and fewer.Money transfer transactions are sent in order to not have to pause when switching prepares new reserve fund list, can be existing preparation
Can be used in golden list distribute the reserve fund amount of money be arranged a threshold value, the threshold value either the reserve fund amount of money full amount threshold value
(the payable maximum remittance threshold value of the i.e. remaining available reserve fund amount of money), is also possible to the number threshold value of the reserve fund amount of money
(the number threshold value that i.e. remaining available reserve fund remaining sum at most can also be used in the money transfer transactions sent), in ustomer premises access equipment dynamic
It, then will be current when monitoring the reserve fund amount of money that can be used for distributing in existing reserve fund list lower than above-mentioned preset threshold
After spare remaining sum is switched to reserve fund remaining sum, process described in step A in above-described embodiment is executed.Optionally, above-mentioned will be current
Spare remaining sum the step of being switched to reserve fund remaining sum can also be triggered using the instruction that family issues.
Node device (including the ustomer premises access equipment) publication of block chain, common recognition are verified, are updated in the state of user account
The process of new reserve fund list usually requires to consume the regular hour, the specific common recognition mechanism for consuming duration and the block chain,
The correlations such as block frequency out.During this period, if user has the transmission demand of new money transfer transactions, due to current pre- in user account
Standby gold list is still in active states, can be still based on the reserve fund amount of money building remittance that can be used for distributing in current reserve fund list
Transaction.After new reserve fund list is updated to user account, the new reserve fund list can be used as in user account when
Preceding reserve fund list, user can be based on the current reserve fund gold list builder money transfer transactions, and issue and remit money to block chain
Transaction;Correspondingly, after above-mentioned money transfer transactions are verified by the node device in block chain, from the account balance and described
The remittance is reduced in reserve fund remaining sum after switching.
The money transfer method that this specification provides, due to there is a reserve fund list to come into force in user account always,
Without suspending money transfer transactions, transaction handling capacity is maximised.
In the embodiment shown in one, to differentiate the reserve fund amount of money that can be used for distributing in reserve fund list, it can mark
The use state of the reserve fund amount of money in reserve fund list.When the money transfer transactions including the reserve fund amount of money are by the section in block chain
Point device is verified, and is included the money transfer transactions in the distributed data base of block chain and updated the remittance of the money transfer transactions
Out when the account balance of square user, the reserve fund amount of money which is included should be in the reserve fund list of remittance abroad side's account
It is identified as use state (state 3), skilled person is known, in the above-mentioned distributed data base for being incorporated in block chain
Money transfer transactions can be described as " completed money transfer transactions ".Node for the new money transfer transactions not yet completed, in block chain
Equipment can verify that the reserve fund amount of money in the above-mentioned new money transfer transactions not yet completed is arranged in the reserve fund of remittance abroad side's user account
Whether state in table is use state: if it is use state, then this verifying does not pass through, corresponding new not yet complete
At money transfer transactions can be retired;If not use state, then this is verified.Similarly, when the new remittance
When transaction after verifying in the distributed data base of block chain by updating, block chain node also should will be in the new money transfer transactions
The reserve fund amount of money for including is updated to " use state " in the reserve fund list of remittance abroad side's user account.
More preferably, ustomer premises access equipment can also be by the pre- of money transfer transactions have not been used that is, also unassigned to any
It is (state 1) that the standby gold amount of money can mark in reserve fund list;The one reserve fund amount of money is once distributed in one
Money transfer transactions, the reserve fund amount of money can be identified as at once by use state (state 2) in the reserve fund list of user account,
That is, the above-mentioned reserve fund amount of money is demarcated as by use state (state 2) in the current reserve fund list that user terminal saves.By
This, ustomer premises access equipment is only capable of the reserve fund amount of money of distribution unused state (state 1) for new money transfer transactions, and after dispensing
The assigned reserve fund amount of money is locally being changed to by use state (state 2) immediately, to prevent to same reserve fund gold
The duplicate allocation of volume.
In the embodiment shown in one, after obtaining reserve fund list according to current reserve fund remaining sum, before switching
Reserve fund remaining sum be switched to spare remaining sum.
Reserve fund column are obtained according to the current reserve fund amount of money in ustomer premises access equipment process according to above-described embodiment
After table, at this point, since new reserve fund list can be used for new money transfer transactions, original preparation as current reserve fund list
Golden list can stop being used as money transfer transactions, correspondingly, former reserve fund remaining sum can be switched to spare remaining sum, existing current
Reserve fund list in the reserve fund amount of money lower than preset threshold or when receiving new reserve fund list builder instruction, based on should
Current preparation remaining sum constructs new reserve fund list.
It more preferably, is each remaining sum in optimum management user account, spare remaining sum described in this specification can be used as collecting money
Remaining sum, after other users initiation is verified the money transfer transactions of above-mentioned user account by the node device of block chain, the remittance
Remittance in money transaction will be increased to the gathering remaining sum and the account balance.
For protect block chain user account personal secrets, in existing some block chains, the account balance of user and
The turnover of money transfer transactions is encrypted;Money transfer method provided by this specification can be used for the block chain of privacy mode
In.
In the embodiment shown in one, the account balance of block chain user account, the reserve fund amount of money in reserve fund list,
The remittance in money transfer transactions that user equipment is initiated has been carried out encryption in advance.The remittance as included by money transfer transactions
Amount of money and the reserve fund amount of money are encrypted state, for guarantee block chain node can verify it is above-mentioned be assigned it is pre- to money transfer transactions
The standby gold amount of money is enough to pay this remittance, should also include pre- to prove that the money transfer transactions include in above-mentioned money transfer transactions
The sum of standby gold amount of money is greater than or equal to the first zero-knowledge proof of the remittance of the money transfer transactions.
Account balance and user accordingly, due to user account are divided more based on the reserve fund remaining sum after switching
A reserve fund amount of money has been carried out encryption in advance, to guarantee that block chain node can verify the transaction of reserve fund list creating
For the sum of reserve fund amount of money for being included without departing from the account balance of user, above-mentioned reserve fund list creating transaction should also include using
To prove that the sum of multiple reserve fund amount of money marked off based on the reserve fund remaining sum after switching are less than or equal to the account of the user
Second zero-knowledge proof of family remaining sum.
Zero-knowledge proof, any useful letter can not provided to verifier by being commonly referred to as certifier (authenticatee)
In the case where breath, verifier is made to believe that some judgement is correct.In the present specification, ustomer premises access equipment can be by providing first
Zero-knowledge proof, so that the feelings of node (verifier) in block chain in the occurrence for not knowing remittance and the reserve fund amount of money
Under condition, it is believed that the sum of occurrence of the reserve fund amount of money distributed by money transfer transactions is more than or equal to the remittance
Occurrence, it is sufficient to pay above-mentioned money transfer transactions, that is, the node (verifier) in block chain is made to be based on zero-knowledge proof algorithm
Carry out zero knowledge proof for first zero-knowledge proof, be confirmed as the reserve fund amount of money that the money transfer transactions are distributed it
Whether the remittance is more than or equal to.Similarly, ustomer premises access equipment can be by providing the second zero-knowledge proof, so that block
The preparation that node (verifier) in chain includes in the account balance and reserve fund list creating exchange for not knowing user account
In the case of the actual value (plaintext) of the amount of money, it is believed that multiple reserve fund amount of money included in the transaction of reserve fund list creating
The sum of whether be not more than above-mentioned user account account balance.
In the embodiment shown in one, when reserve fund remaining sum, the spare remaining sum in user account are also shown in user's account
In the state at family, i.e., other nodes on block chain can know the reserve fund of this user equipment by inquiring account status
When remaining sum and spare remaining sum, for protect user account personal secrets, the reserve fund remaining sum and spare remaining sum of user account also by
Encryption is carried out in advance, the reserve fund remaining sum after the second above-mentioned at this time zero-knowledge proof can be used for proving based on switching is drawn
The sum of multiple reserve fund amount of money separated are less than or equal to the reserve fund remaining sum after the switching.Due to the preparation after above-mentioned switching
Golden remaining sum is divided based on account balance, which is necessarily smaller than account balance, so the above-mentioned the 2nd 0
Knowledge proof can also be not more than account for the sum of the reserve fund amount of money that block chain node verification reserve fund list creating exchange includes
Family remaining sum provides effective proof.
This specification does not limit the type of above-mentioned cryptography Encryption Algorithm, may include additive homomorphism Encryption Algorithm or complete
Homomorphic encryption algorithm may also include Homomorphic Commitment algorithm (such as Pederson Commitment), as long as ensuring the Encryption Algorithm
It can satisfy additive homomorphism and one clear data of verifying can be supported to belong to the zero-knowledge proof in some section, so that encryption
The account balance (or reserve fund remaining sum) of remittance abroad side user can directly deduct the remittance of encryption, the account of the recipient user of encryption
Family remaining sum can directly increase the remittance of encryption.
For example, above-mentioned block chain can support the Pedersen Commitment based on elliptic curve to promise to undertake algorithm, to
Guarantee that the number being encrypted in block chain can be verified number range in encrypted state and can realize additive homomorphism.
This specification does not limit the concrete type of above-mentioned first zero-knowledge proof, the second zero-knowledge proof, such as can be with
(Range Proof) technology is proved using section in the related technology, for example Bulletproofs scheme or " zksnark " are general
Zero-knowledge proof technology etc..
In the another embodiment shown, block chain is attacked to prevent in block chain user node to do evil, it is above-mentioned
It may also include the third zero-knowledge proof for being greater than or equal to zero to prove the remittance in money transfer transactions, the above-mentioned 3rd 0 knows
Knowing proves to generate based on the encrypted remittance, so that the node (verifier) in block chain is not knowing remittance
In the case of actual value (plaintext), the remittance of money transfer transactions can be verified not less than zero.
In the another embodiment shown, the invalid reserve fund amount of money is generated to prevent in block chain user node to do evil,
It may also include each reserve fund for including to prove above-mentioned reserve fund list creating exchange in the transaction of reserve fund list creating
The amount of money is all larger than or null 4th zero-knowledge proof, and above-mentioned 4th zero-knowledge proof can be raw based on each reserve fund amount of money
At, can be with so that the node (verifier) in block chain is in actual value (plaintext) for not knowing each reserve fund amount of money
The each reserve fund amount of money for including in verifying reserve fund list creating transaction is all larger than or is equal to zero.
In the another embodiment shown of this specification, above-mentioned money transfer transactions and the transaction of reserve fund list creating may also include
Digital signature made by private key of the ustomer premises access equipment based on user account, to test for the node of block chain electronic signature
Card prevents other nodes from pretending to be remittance abroad side and issuing above-mentioned first transaction, and publication error message, malice upset transaction order.
The money transfer method based on block chain that this specification provides, by the way that the account balance of user account to be at least divided into
One reserve fund remaining sum and a spare remaining sum include the reserve fund list of multiple reserve fund amount of money based on the building of reserve fund remaining sum, are
The concurrent money transfer transactions of user account provide payable proof;The available reserve fund amount of money in above-mentioned reserve fund list is lower than default
When threshold value, or when being connected to new reserve fund list builder instruction, then above-mentioned spare remaining sum is switched to the reserve fund moon, based on above-mentioned
Reserve fund remaining sum building after switching includes the new reserve fund list of multiple reserve fund amount of money;In new reserve fund list by area
After block chain node verification passes through, new reserve fund list is updated to user account, user account is arranged based on new reserve fund again
Table constructs new money transfer transactions.During above-mentioned reserve fund list switching, money transfer transactions can be still based on former reserve fund list structure
It builds without pause;And and above-mentioned handover preparation gold remaining sum and create the process of new reserve fund list can be with current reserve fund
The service condition (can be used for distribute the reserve fund amount of money whether be lower than preset threshold) of list or the new reserve fund that should be received
List builder instruction cycles execute, therefore whole without suspending the transaction for sending remittance, improve the concurrency of transaction, and avoid handing over
It easily interrupts, maximises the handling capacity of block chain transaction.
In order to make it easy to understand, below by taking the money transfer transactions in block chain network as an example, to the technical solution of this specification into
Row is described in detail.Fig. 3 is that one kind that an exemplary embodiment provides implements money transfer transactions and reserve fund column in block chain network
The schematic diagram of table transaction.It is assumed that the remittance abroad method, apparatus that uses of user A is user equipment 1, for example it is logged on the user equipment 1 pair
It should be in the user account of user A;Similarly, the receiver equipment that user B is used is user equipment 2.It can be transported on user equipment 1
Row has the client-side program of block chain, so that there are corresponding block chain nodes in block chain network for the user equipment 1, such as
Node 1 shown in Fig. 2.Similarly, the client-side program of block chain can be run on user equipment 2, so that the user equipment 2
There are corresponding block chain nodes, such as node shown in Fig. 32 in block chain network.There is also other in block chain network
Block chain node, such as node i shown in Fig. 3 etc..By above-mentioned node 1, node 2, node i etc., so that user A and user
The reserve fund list creating transaction that money transfer transactions and user A between B are sent can be implemented via block chain network, and correlation is handed over
Easy information can be recorded in the block chain account book safeguarded respectively to each block chain node, can be to avoid distorting, and be had
Help subsequent examination.
For example, carrying out block chain remittance from user A to user B.User A should send reserve fund after login account first
List creating is traded to initialize the reserve fund list in its account.Wherein, " user " in this specification can show as institute
The user account of login, and the user account can actually belong to individual or entity, this specification is limited not to this.
As shown in figure 5, the account balance s_A of user A is divided into two sub- remaining sums: s_A_1 and s_ in above-mentioned block chain
The account balance s_B of A_2, user B are also divided into two sub- remaining sums: s_B_1 and s_B_2.More than the account balance s_A of user A, son
The account balance s_B of volume s_A_1 and s_A_2 and user B, sub- remaining sum s_B_1 and s_B_2 are based on Encryption Algorithm and are encrypted:
S_A=HE (s_A), S_A_1=HE (s_A_1), S_A_2=HE (s_A_2);
S_B=HE (s_B), S_B_1=HE (s_B_1), S_B_2=HE (s_B_2).
In one embodiment, above-mentioned Encryption Algorithm can be Pederson Commitment Homomorphic Commitment algorithm.
When initial, sub- remaining sum s_A_1 is as reserve fund remaining sum, and s_A_2 is as gathering remaining sum, and sub- remaining sum s_B_1 is as pre-
Standby gold remaining sum, s_B_2 is as gathering remaining sum.
Fig. 4 illustrates user A setting reserve fund list MAAnd it is based on reserve fund list MAInitiate the process of money transfer transactions.If
Set the reserve fund list M of user AAProcess the following steps are included:
Step 401, user A establishes reserve fund list MA, above-mentioned reserve fund list MASub- remaining sum s_A_1 is directed to including user A
Divide reserve fund amount of money M obtain, being encrypted based on above-mentioned homomorphic encryption algorithm HE, multipleA[1], MA[2] ..., MA
[LA], and by above-mentioned reserve fund amount of money M in above-mentioned reserve fund listA[1], MA[2] ..., MA[LA] use state be labeled as
" unused state ".
When specific implementation, user A can divide the part remaining sum of sub- remaining sum s_A_1 or sub- remaining sum s_A_1, obtain
State the plaintext m of multiple reserve fund amount of moneya[1], ma[2] ..., ma[LA], and based on above-mentioned homomorphic encryption algorithm to above-mentioned multiple pre-
Standby gold amount of money encryption, to obtain reserve fund amount of money ciphertext MA[1], MA[2] ..., MA[LA];User A can also be with antithetical phrase remaining sum s_A_
1 ciphertext S_A_1 is directly divided to obtain MA[1], MA[2] ..., MA[LA], and based on above-mentioned homomorphic encryption algorithm into
The corresponding plaintext m of above-mentioned reserve fund amount of money ciphertext is known in row inverse operationa[1], ma[2] ..., ma[LA].User A can will be above-mentioned pre-
The plaintext m of the standby gold amount of moneya[1], ma[2] ..., ma[LA] and ciphertext MA[1], MA[2] ..., MA[LA] corresponding relationship protect alone
It deposits, to facilitate user A to choose the suitable reserve fund amount of money in specific money transfer transactions.Alternatively, user A can only local user
End saves the plaintext of the above-mentioned reserve fund amount of money, and user terminal periodically synchronizes account data from block chain, will be from block chain
After the encryption data decryption of acquisition, the reserve fund amount of money having been used can be obtained.
Step 402, user A generates zero-knowledge proof PF [s_A_1 >=(ma[1]+ma[2]+…+ma[LA])], for proving
Above-mentioned reserve fund list MAIn MA[1], MA[2] ..., MA[LA] corresponding reserve fund amount of money ma[1], ma[2] ..., ma[LA] it
With the sub- remaining sum s_A_1, above-mentioned zero-knowledge proof PF [s_A_1 >=(m for being less than or equal to user Aa[1]+ma[2]+…+ma
[LA])] do not use reserve fund amount of money ma[1], ma[2] ..., maThe value of [L-A] and s_A_1 can make verifier believe ma[1],
ma[2] ..., ma[LA] the sum of be less than or equal to s_A_1.In one embodiment, above-mentioned zero-knowledge proof PF [s_A_1 >=(ma
[1]+ma[2]+…+ma[LA])] sections such as general zero-knowledge proof technology or Bulletproof scheme such as zksnark can be used
Proof technology.
Step 403, user A generates zero-knowledge proof PF (ma[i] >=0), to prove above-mentioned reserve fund list MAIn MA
[1], MA[2] ..., MA[LA] corresponding reserve fund amount of money ma[1], ma[2] ..., ma[LA] it is not less than zero.Above-mentioned Zero Knowledge card
Bright PF (ma[i] >=0) do not use reserve fund amount of money maThe value of [i] can make verifier believe ma[i]≥0.In one embodiment,
Above-mentioned zero-knowledge proof PF (ma[i] >=0) the general zero-knowledge proof such as Borromean ring signatures scheme or zksnark can be used
The sections such as technical solution prove technology.
Step 404, user A is based on MA、PF[s_A_1≥(ma[1]+ma[2]+…+ma[L-A])]、PF(ma[i] >=0) it is raw
At digital signature Sign As。
Step 405, user A sends transaction T to the block chainsWith the above-mentioned reserve fund list M of determinationA, above-mentioned transaction Ts
Including MA、PF[s_A_1≥(ma[1]+ma[2]+…+ma[LA])]、PF(ma[i] >=0), wherein 1≤i≤L_A and Sign
As。
Step 406, the node of block chain receives above-mentioned transaction Ts。
Step 407, the node of block chain is executed to above-mentioned transaction TsElectronic signature Sign AsVerifying, if passed through, holds
The next step of row.
Step 408, the node of block chain is based on zero-knowledge proof algorithm to PF [s_A_1 >=(ma[1]+ma[2]+…+ma
[LA])] zero knowledge proof is carried out, to confirm ma[1], ma[2] ..., ma[LA] the sum of whether less than or equal to the user A
Sub- remaining sum s_A_1;If so, executing next step.
Step 409, the node of block chain is based on zero-knowledge proof algorithm to PF (ma[i] >=0) zero knowledge proof is carried out, with
Confirm (ma[i] >=0 is not less than zero, wherein 1≤i≤L_A;If so, executing next step.
Step 410, the node of block chain will pass through the transaction T of verifyingsIt includes to the distributed data base of the block chain,
And by reserve fund list MAIt is updated to the account status of the user A.
So far, the node of block chain completes the reserve fund list M to user AAUpdate, those skilled in the art is ripe
Know, in the reserve fund list M for being arranged or updating user AAActual implementation during, may also include many other verifying steps
Suddenly, such as the verifying of anti-replay etc., it is not limited here;And this specification does not limit and generates each proof or electronic signature
Sequencing, do not limit in the transaction Ts that the node in block chain proposes remittance abroad side testing for every proof or electronic signature yet
The sequencing of card, Fig. 4 are only a kind of embodiment of the method for the reserve fund list for the setting user that this specification provides, this
Specification is without being limited thereto.The setting up procedure and the process phase of above-mentioned steps 401 to 410 of reserve fund list MB in user's B account
Seemingly, details are not described herein.
It is as follows that block chain in Fig. 4 executes the process that user A transfers accounts to user B remittance:
Step 411, user A is based on above-mentioned homomorphic encryption algorithm and generates remittance ciphertext St=HE (s_t), wherein s_t is
The remittance that user A transfers accounts to user B.
Step 412, user A is from reserve fund list MAOne original and its plaintext m of middle selectionA[k] is enough to pay
The reserve fund amount of money ciphertext M of remittance s_tA[k], and by reserve fund amount of money ciphertext MA[k] is labeled as by use state, so that
MA[k] can not be specified in again in other new money transfer transactions.
Step 413, user A generates zero-knowledge proof Pf (mA[k] >=s_t), to prove MA[k] corresponding reserve fund gold
Volume mA[k] is enough to pay this remittance s_t;Above-mentioned zero-knowledge proof Pf (mA[k] >=s_t) do not use mAThe value of [k] and s_t,
Verifier can be made to believe mA[k]≥s_t。
Step 414, user A generates zero-knowledge proof Pf (s_t >=0), to prove remittance s_t not less than zero;It is above-mentioned
Above-mentioned zero-knowledge proof Pf (s_t >=0) does not use the value of s_t, verifier can be made to believe s_t >=0.
Step 415, user A is based on St, MA[k]、Pf(mA[k] >=s_t), Pf (s_t >=0) generate digital signature Sign
At。
Step 416, user A sends transaction T to the block chaintTo transfer accounts to user B remittance, trade TtIncluding St、MA
[k]、Pf(mA[k] >=s_t), Pf (s_t >=0) and Sign At, above content is ciphertext state, therefore protects user A, B
Money transfer transactions privacy.
Step 417, the node of block chain receives above-mentioned transaction Tt。
Step 418, the node of block chain is executed to above-mentioned transaction TtElectronic signature Sign AtVerifying, if passed through, holds
The next step of row.
Step 419, the above-mentioned T of the node verification of block chaintThe M for being includedAWhether [k] is use state;If not, holding
The next step of row.
Step 420, the node of block chain is based on zero-knowledge proof algorithm to PF (ma[k] >=s_t) zero knowledge proof is carried out,
To confirm MAWhether [k] corresponding reserve fund amount of money is more than or equal to the remittance;If so, executing next step.
Step 421, the node of block chain is based on zero-knowledge proof algorithm and carries out zero knowledge proof to PF (s_t >=0), with true
Recognize the remittance ciphertext S of this money transfer transactionstCorresponding remittance actual value is not less than zero;If so, executing next step.
Step 422, the node of block chain will pass through the transaction T of verifyingtIt includes to the distributed data base of the block chain,
And it is based in the account balance ciphertext S_A of user A and sub- account balance ciphertext S_A_1 described in homomorphism Operation Nature deduction
Remittance ciphertext St, homomorphism operation is based in the account balance ciphertext S_B and sub- account balance ciphertext S_B_2 of user B
Matter increases the remittance ciphertext St, so that the account balance of above-mentioned user A is updated to (s_A-s_t), more than the sub- account of the remittance of A
Volume s_A_1 is updated to (s_A_1-s_t), and the account balance of user B is updated to (s_B+s_t), the sub- account balance s_B_ of the gathering of B
2 are updated to (s_B_2+s_t);And by the reserve fund list M of user AAMiddle MA[k] corresponding state is changed to use state.
In addition, those skilled in the art is known, during the actual implementation of money transfer transactions, may also include many other
Verification step, such as the verifying of anti-replay etc., it is not limited here;And this specification do not limit generate it is each proof or
The sequencing of electronic signature does not limit the transaction T that the node in block chain proposes remittance abroad side yettMiddle every proof or electronics
The sequencing of the verifying of signature, Fig. 4 are only a kind of embodiment for the money transfer method based on block chain that this specification provides,
This specification is without being limited thereto.
Although illustrating user A Initialize installation reserve fund list and user A to user B using continuous number in Fig. 4
The process of remittance, but this is not offered as user A and is both needed to the reserve fund being arranged in its account before initiating money transfer transactions every time
List.Those skilled in the art are known, and user needs before the first time money transfer transactions after the user for being registered as the block chain
Want the reserve fund list in its account of Initialize installation;When the encrypted reserve fund amount of money in above-mentioned reserve fund list is used
It finishes or the corresponding reserve fund amount of money of the remaining encrypted reserve fund amount of money is no longer enough to pay next money transfer transactions,
User need to just reset the reserve fund list in its account;User can periodically update above-mentioned also according to the specific requirements of itself
Reserve fund list.
With increasing for the user A money transfer transactions sent, reserve fund list MAIn the available reserve fund amount of money gradually tail off,
The device node 1 of user A monitors reserve fund list MAIn the available reserve fund amount of money numerical value summation or monitoring reserve fund list
MAIn the available reserve fund amount of money the sum of number, when the sum of above-mentioned numerical value summation or number lower than setting threshold value when, user
A switches mutually its sub- account s_A_1 and s_A_2, and new reserve fund list is generated based on new reserve fund remaining sum s_A_2
MA'.New reserve fund list MA' building process it is similar with step 401-410, details are not described herein, MA' it is updated to user A
Account after, former reserve fund list M will be substitutedATo provide payable card as money transfer transactions as new effective reserve fund list
It is bright.
Fig. 2 illustrates the creation and renewal process of the reserve fund list in above-mentioned user's A account, as seen from Figure 2,
It can be concurrent for there is an effective reserve fund list always by the cyclic switching of sub- account balance, in the account of user A
Money transfer transactions provide multiple reserve fund amount of money, so that user A guarantees without suspending money transfer transactions to update reserve fund list
The maximization of money transfer transactions is concurrently submitted and is executed.Moreover, in money transfer transactions method provided in this embodiment, due to respectively
Provided with for remit money and for gathering two sub- account balances, it is assumed that user A to B execute money transfer transactions when, have other
User C is also initiating money transfer transactions to user A, these all transaction can be submitted and execute simultaneously;Because of entire transaction
Implementation procedure in the zero-knowledge proof that uses it is only related with the relevant reserve fund amount of money, the remaining sum of account can arbitrarily increase
Add or reduces.
It is worth noting that, as shown in figure 5, the sub- account balance S_A_2 of user A be used as at the beginning gathering transaction, when
User equipment monitors are to reserve fund list MAIn the reserve fund amount of money be lower than preset threshold value when, need to be by sub- account balance S_A_1
Switch mutually with the function of sub- account balance S_A_2, S_A_1 is as gathering remaining sum, and S_A_2 is as reserve fund remaining sum.By S_
Before A_2 executes the building of new reserve fund list as reserve fund remaining sum, user equipment needs to wait for a period of time, until upper
The transaction for the sub- account balance S_A_2 that other users are sent to user A on block chain before stating switching, which is updated, is shown in user A
Account balance S_A and sub- account balance S_A_2 after, after the value of sub- account balance S_A_2 no longer changes, then be based on S_A_2
Construct new reserve fund list, to prevent the value due to S_A_2 variation cause the value based on S_A_2 to generate PF [s_A_2 >=
(ma[1]+ma[2]+…+ma[LA])] verifying of block chain node can not be passed through.The above-mentioned waiting time can be according to the blocking of block chain
Depending on frequency, for example, about waiting 3-5 Chunky Time.
Fig. 6 is a kind of schematic configuration diagram for equipment that an exemplary embodiment provides.Referring to FIG. 6, in hardware view, it should
Equipment includes processor 602, internal bus 604, network interface 606, memory 608 and nonvolatile memory 610, is gone back certainly
It may include hardware required for other business.Processor 602 reads corresponding computer journey from nonvolatile memory 610
Then sequence is run into memory 608, block chain the transaction device is formed on logic level.Certainly, in addition to software realization mode it
Outside, this specification one or more embodiment is not precluded other implementations, such as logical device or software and hardware combining
Mode etc., that is to say, that the executing subject of following process flow is not limited to each logic unit, be also possible to hardware or
Logical device.
Referring to FIG. 7, this specification additionally provides a kind of money transfer device 70 based on block chain, the use applied to block chain
Family end equipment, the account balance of user account are at least divided into a reserve fund remaining sum and a spare remaining sum;Wherein, the user
Account includes the reserve fund list that a dynamic updates;The reserve fund list includes multiple reserve fund amount of money;
Described device 70 includes:
Reserve fund amount of money allocation unit 702 is remitted money in response to Client-initiated and is operated, according to reserve fund list creating unit
The 704 current reserve fund lists provided are that the remittance that user submits distributes the corresponding reserve fund amount of money;
Money transfer transactions building and release unit 706, are constructed based on the remittance and the reserve fund amount of money of distribution
Money transfer transactions, and the money transfer transactions are distributed to block chain, to be tested in the money transfer transactions by the node device in block chain
After card passes through, the remittance is reduced from the account balance and the reserve fund remaining sum;
Wherein, the reserve fund list creating unit 704 includes:
Reserve fund List Generating Module 7042 obtains current reserve fund remaining sum, is obtained according to current reserve fund remaining sum
Reserve fund list;
Reserve fund list monitoring modular 7044 can be used for the reserve fund amount of money distributed in the current reserve fund list of dynamic monitoring
Whether preset threshold is lower than.
In the embodiment shown in one, the reserve fund List Generating Module 7042:
Current reserve fund remaining sum is divided to obtain multiple reserve fund amount of money, the multiple reserve funds gold obtained based on division
Volume constructs the transaction of reserve fund list creating;
Reserve fund list creating transaction is distributed to block chain, to trade in the reserve fund list creating by block
After node device in chain is verified, constructed in advance in the user account based on the obtained multiple reserve fund amount of money that divide
Standby Jin Liebiao.
In the embodiment shown in one, the reserve fund List Generating Module 7042:
Current reserve fund remaining sum is divided to obtain multiple reserve fund amount of money, the multiple reserve funds gold obtained based on division
Volume constructs reserve fund list, and is traded based on the reserve fund list builder reserve fund list creating;
Reserve fund list creating transaction is distributed to block chain, to trade in the reserve fund list creating by block
After node device in chain is verified, by the reserve fund list update into the user account.
In the embodiment shown in one, described device 70 further include:
Switch unit 708, after obtaining reserve fund list according to current reserve fund remaining sum, by the reserve fund before switching
Remaining sum is switched to spare remaining sum.
In the embodiment shown in one, the spare remaining sum is gathering remaining sum;Wherein, when other users are initiated to the use
After the money transfer transactions of family account are verified by the node device of block chain, the remittance in the money transfer transactions will be increased to institute
State gathering remaining sum and the account balance.
In the embodiment shown in one, the account balance of the user account, the reserve fund amount of money and the remittance
Encryption has been carried out in advance;
The money transfer transactions further include the first zero-knowledge proof, the reserve fund gold for including to prove the money transfer transactions
The sum of volume is greater than or equal to the remittance of the money transfer transactions;
The reserve fund list creating transaction further includes the second zero-knowledge proof, to the reserve fund after proving based on switching
The sum of multiple reserve fund amount of money that remaining sum marks off are less than or equal to the account balance of the user.
In the embodiment shown in one, the reserve fund remaining sum and spare remaining sum of the user account are encrypted in advance
Processing, multiple reserve fund amount of money that second zero-knowledge proof is marked off to the reserve fund remaining sum after proving based on switching it
Be less than or equal to the switching after reserve fund remaining sum.
In the embodiment shown in one, the money transfer transactions further include third zero-knowledge proof, to prove the remittance
Volume is greater than or equal to zero.
In the embodiment shown in one, the reserve fund list creating transaction further includes the 4th zero-knowledge proof, to demonstrate,prove
Multiple reserve fund amount of money that the bright reserve fund remaining sum based on after switching marks off are all larger than or are equal to zero.
The realization process of the function and effect of each unit and module is specifically detailed in the above method corresponding in above-mentioned apparatus
The realization process of step, the relevent part can refer to the partial explaination of embodiments of method, and details are not described herein.
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.
Corresponding with above method embodiment, the embodiment of this specification additionally provides a kind of computer equipment, the calculating
Machine equipment includes memory and processor.Wherein, the computer program that can be run by processor is stored on memory;Processing
Device executes each step of the money transfer method based on block chain in this specification embodiment in the computer program of operation storage
Suddenly.Content before referring to the detailed description of each step of the money transfer method based on block chain, is not repeated.
Corresponding with above method embodiment, the embodiment of this specification additionally provides a kind of computer-readable storage medium
Matter is stored with computer program on the storage medium, and it is real to execute this specification when being run by processor for these computer programs
Apply each step of the money transfer method based on block chain in example.The detailed of each step of money transfer method based on block chain is retouched
The content before referring to is stated, is not repeated.
The foregoing is merely the preferred embodiments of this specification, all in this explanation not to limit this specification
Within the spirit and principle of book, any modification, equivalent substitution, improvement and etc. done should be included in the model of this specification protection
Within enclosing.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
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), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory
(ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory techniques, CD-ROM are read-only
Memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or
Other magnetic storage devices or any other non-transmission medium, can be used for storage can be accessed by a computing device information.According to
Herein defines, and computer-readable medium does not include temporary computer readable media (transitory media), such as modulation
Data-signal and carrier wave.
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 will be understood by those skilled in the art that the embodiment of this specification can provide as the production of method, system or computer program
Product.Therefore, the embodiment of this specification can be used complete hardware embodiment, complete software embodiment or combine software and hardware side
The form of the embodiment in face.Moreover, it wherein includes that computer is available that the embodiment of this specification, which can be used in one or more,
It is real in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code
The form for the computer program product applied.