Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not
For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work
Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
The description and claims of this application and term " first ", " second ", " third ", " in above-mentioned attached drawing
The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage
The data that solution uses in this way are interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein
Or the sequence other than the content of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that
Cover it is non-exclusive include, for example, containing the process, method, system, product or equipment of a series of steps or units need not limit
In step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, produce
The other step or units of product or equipment inherently.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot
It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the
One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment
Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution
Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims
Protection scope within.
As shown in Figure 1, may include: the embodiment of the invention provides a kind of block chain transaction verification method
S100, the amount of money is produced according to the side of producing of the first block chain trading activity, the amount of money of the side of producing described in acquisition is held
Promise;
Wherein, producing can be for privacy account, or non-privacy account.Wherein, the side of producing trades in block chain
In can also be referred to as input side or sender, correspondingly, the side of being transferred to block chain trade in can also referred to as output side and
Recipient.
S200, the amount of money is transferred to according to the respectively side of being transferred to of the first block chain trading activity, obtains each described turn respectively
The amount of money for the side of entering is promised to undertake, wherein at least one party in the side of producing and the respectively side of being transferred to is non-privacy account;
Wherein, being transferred to can be to be one or more, it may be assumed that in the first block chain trading activity, the side of producing can will be empty
Quasi- currency produces the one or more side of being transferred to.Each side of being transferred to all can be privacy account or non-privacy account.
The sum of S300, the amount of money promise of the side of producing according to and amount of money promise of each side of being transferred to determine described first
Whether the transaction amount of block chain trading activity is legal.
Optionally, step S300 can be specifically included: the amount of money of the side of producing is promised to undertake the gold with each side of being transferred to
The sum of volume promise is compared, and determines whether the transaction amount of the first block chain trading activity is legal according to comparison result.
Further, step S300 can be specifically included: the amount of money of the side of producing described in determining is promised to undertake and each side of being transferred to
Whether the sum of amount of money promise is equal, if equal, it is determined that the transaction amount of the first block chain trading activity is legal.It is no
Then, determine that the transaction amount of the first block chain trading activity is illegal.
Additive homomorphism attribute based on cryptography is it is found that when the sum of amount of money promise of each side of being transferred to and the side of producing
Amount of money when promising to undertake equal, each side of being transferred to be transferred to the sum of amount of money and the side of producing to produce the amount of money equal.
The amount of money that method shown in Fig. 1 of the present invention can obtain the side of producing is promised to undertake and respectively the amount of money for the side of being transferred to is promised to undertake, and root
The amount of money of the sum of amount of money promise according to the respectively side of being transferred to and the side of producing, which is promised to undertake, determines whether the transaction amount of block chain trading activity closes
Method.Method shown in Fig. 1 of the present invention can be adapted for the transaction of block chain involved in the side of producing and the side of being transferred to of various privacy types
Behavior.
As shown in Fig. 2, in an alternate embodiment of the present invention, step S100 shown in Fig. 1 may include:
S110, it the amount of money will be produced will be added with service charge, obtain the side of producing produces total value, according to formula C1=a1×G1+b1
×H1Calculate the amount of money promise of the side of producing described in obtaining, the C1It is promised to undertake for the amount of money of the side of producing, a1Obscure for first
The factor, the b1For the total value that produces of the side of producing, the G1With the H1It is preset constant.
No matter producing for first block chain trading activity can be which type of with for privacy account or non-privacy account
Account, the amount of money that the present embodiment can obtain the side of producing by step S110 are promised to undertake.
Embodiment illustrated in fig. 2 realizes the calculating to the amount of money promise for the side of producing.Since embodiment illustrated in fig. 2 considers hand
It continues to pay dues, therefore more meets practical situations.
In practical applications, step S110 can be legal in the respectively side of being transferred to that determines the first block chain trading activity and be turned
Square remaining sum executes after carrying out the first block chain trading activity enough out.It is understood that when the first block chain trading activity
When at least one side of being transferred to is illegal or Sorry, your ticket has not enough value to carry out the first block chain trading activity for the side of producing, can determine this
First block chain trading activity failure.
As shown in figure 3, step S200 shown in Fig. 1 may include: in another alternative embodiment of the present invention
S210, according to formula C2i=a2×G2+b2i×H2The amount of money promise for obtaining each side of being transferred to is calculated separately,
In, the i is the number of the side of being transferred to, and i is nonnegative integer, the C2iTo number the amount of money promise for being the side of being transferred to described in i,
The a2For the second confounding factors, the b2iTo number the amount of money that is transferred to for being the side of being transferred to described in i, the G2With the H2It is
Preset constant.
When the side of being transferred to has it is multiple when, the present invention can be respectively that they are numbered by nonnegative integer.To each turn
The side of entering, step S210 can pass through formula C2i=a2×G2+b2i×H2Calculate the amount of money promise for obtaining the side of being transferred to.Fig. 3 institute
Show that step S210 realizes the calculating to the amount of money promise for the side of being transferred to.Pass through preset constant G2And H2, step S210 is calculated
The amount of money is promised to undertake can correspond with the amount of money is transferred to, therefore the amount of money can be used and promise to undertake the legal judgement of progress transaction amount.
The side of being transferred to of first block chain trading activity may include a certain number of privacy accounts and a certain number of non-hidden
Private account, no matter for which type of account, the amount of money that the present embodiment can obtain the side of being transferred to by step S210 is promised to undertake.It can
Choosing, for the side of being transferred to for non-privacy account: a2It is zero.
In other embodiments of the present invention, method shown in Fig. 2 can also include: to obtain the first block chain trading activity
The corresponding amount of money of service charge promise to undertake.On this basis, step S300 shown in Fig. 2 can specifically include: by each side of being transferred to
The amount of money promise to undertake and the corresponding amount of money of the service charge is promised to undertake and is added, obtain total amount and promise to undertake;The gold of the side of producing described in determination
Whether volume promise is equal with total amount promise, if equal, determines the transaction amount of the first block chain trading activity
It is legal.
The embodiment considers service charge, therefore is more in line with actual conditions.
Optionally, block chain transaction verification method provided in an embodiment of the present invention can be applied to what the transaction of block chain generated
In the process.For convenience of understanding, Fig. 4 and two kinds of block chains shown in fig. 5 transaction generation method is described below.Block chain shown in Fig. 4
Transaction generation method is block chain transaction generating process when producing Fang Weifei privacy account.The transaction of block chain shown in Fig. 5 generates
The block chain that method is the side of producing when being privacy account is traded generating process.
It is understood that ACCOUNT account can be non-privacy account, and UTXO account can in an alternative embodiment
Think privacy account.For a user, ACCOUNT account and UTXO account can be possessed simultaneously.The ACCOUNT account of user
Family can have the non-privacy account of plaintext, and UTXO account can have multiple and different privacy accounts.
The generation method as shown in figure 4, a kind of block chain provided in an embodiment of the present invention is traded, comprising:
S601, use the ACCOUNT account of user as the side of producing.
Wherein, the status informations such as remaining sum of ACCOUNT account are disclosed to third party.
Whether S602, the verification side of being transferred to are legal.If legal, S603 is thened follow the steps, otherwise determines transaction failed regeneration.
The whether legal process in the above-mentioned verification side of being transferred to may include: whether verification transfer amounts are greater than 0, verify the side of being transferred to
Account whether be preset length.
Wherein, the length of the privacy account of privacy account legal in the present embodiment is 95 bytes, legal non-privacy
The length of the non-privacy account of account is 42 bytes.When the length of the account for the side of being transferred to is not above-mentioned two byte length,
It can determine that the account for the side of being transferred to is illegal.
S603, service charge is calculated.
The present embodiment can be distinguished commonly to transfer accounts and be called with contract.If it is commonly transferring accounts, the present embodiment will be according to producing
The certain proportion of the amount of money collects service charge, and upper limit value can be arranged, and is not further added by then more than the upper limit.It is called if it is contract,
Then service charge is made of two parts, and a part is to collect the certain proportion for producing the amount of money, and a part is contract executive proceeding expense, this
This two parts can be added together the service charge called as contract by embodiment.
S604, check ACCOUNT account remaining sum whether enough payment produce the amount of money and service charge, if insufficient, transaction
Failed regeneration.If enough, thening follow the steps S605.
S605, the encapsulation non-privacy side of producing object, trade the non-privacy side of the producing object as the first block chain only
One side of producing.
The transaction of first block chain can be primary block chain trading activity, such as: according to contract, A was in some of certain day
Carve the ideal money for being respectively transferred to certain number to B, C, D respectively.Then this time A is transferred to the process of ideal money i.e. to B, C, D respectively
For a block chain trading activity.
Wherein, which may include following information: nonce value produces total value, amount of money promise and mixes
Confuse the factor.Wherein, nonce value is any or non-repetitive random number being only only used once in cryptography, can be with
It directly inquires and obtains from block chain.It produces total value and produces the sum of the amount of money and service charge for the transaction of block chain.
Much information can be encapsulated as object according to certain data structure by the present embodiment, so that object is sent to block
Catenary system carries out trading processing.Optionally, the side's of being transferred to object and the side's of producing object can be generated in the present embodiment.Optionally, step
The value that the amount of money in the non-privacy side of the producing object that S605 is encapsulated is promised to undertake is sky, and the value of confounding factors is also empty.
The present embodiment can will produce the amount of money and be added with service charge, and obtain the side of producing produces total value, according to formula C1=a1
×G1+b1×H1Calculate the amount of money promise of the side of producing described in obtaining, the C1It is promised to undertake for the amount of money of the side of producing, a1It is
One confounding factors, the b1For the total value that produces of the side of producing, the G1With the H1It is preset constant.
Due to not obtaining the value of confounding factors when step S605 is executed also, the side of producing also can not just be calculated
The amount of money is promised to undertake.To the present embodiment step S608 and step S609 obtain each privacy side of being transferred to of the first block chain transaction obscure because
After son, the confounding factors of each privacy side of being transferred to can be added by step S612, using calculated result as the confounding factors for the side of producing.
Formula C can thus be passed through1=a1×G1+b1×H1The amount of money that the side of producing is calculated is promised to undertake.
The non-privacy side of the producing object can be indicated with AccountInput object.
Respectively whether the side of being transferred to has encapsulated for S606, judgement.If encapsulated, step S612 is gone to, otherwise, after
Continuous step S607.
It is understood that the transaction of the first block chain can have multiple sides of being transferred to, present invention needs are transferred to Fang Jun to each
It is packaged.
One S607, selection unencapsulated side of being transferred to, judge the privacy type of the side of being transferred to.If the side of being transferred to is privacy account
Family then goes to step S609, if being non-privacy account, thens follow the steps S608.
Specifically, the present invention can determine that it be privacy account is also non-privacy account according to the length of the account for the side of being transferred to
Family.Specifically, the side of being transferred to is privacy account when the length of account is 95 bytes, when the length of account is 42 bytes,
It is transferred to Fang Weifei privacy account.Wherein, comprising spending public key and view public key in the privacy account of privacy account.
S608, the encapsulation non-privacy side of being transferred to object, be transferred to side of the non-privacy side of the being transferred to object as the first block chain.It
Go to step S606 afterwards to continue with the unencapsulated side of being transferred to.
The non-privacy side of the being transferred to object may include following information: the non-privacy account for the side of being transferred to is transferred to the amount of money and the amount of money
It promises to undertake.
Wherein, it is transferred to amount of money exposure (in plain text).The present invention can be according to formula C2i=a2×G2+b2i×H2It calculates separately
The amount of money for obtaining each side of being transferred to is promised to undertake, wherein the i is the number of the side of being transferred to, and i is nonnegative integer, the C2iFor
The amount of money promise for the side of being transferred to that number is i, a2For the second confounding factors, the b2iIt is to be transferred to described in i for number
Side is transferred to the amount of money, the G2With the H2It is preset constant.
Optionally, for the side of being transferred to for non-privacy account: a2It is zero.
Wherein, the non-privacy side of being transferred to object can be indicated with AccountOutput object.
S609, it parses the view public key (PV) in the account of privacy account and spends public key (PS).According to formula addr
=H ' (r*PV, i) G3+ PS, which is calculated, obtains disposable account address addr.Gold is transferred to according to formula key=H " (r*PV, i) calculating
The encryption key of volume.Continue step S610 later.
Wherein, H ' is the first hash function, and i is the number for being transferred to object that the transaction encapsulation of the first block chain obtains, G3For
Constant, H " are the second hash function, and R is to preset random public key, and r is default random private-key.
The present invention can calculate the confounding factors for obtaining privacy account according to key.Specifically, the present invention can be according to function
Key is mapped as confounding factors by mapping, such as: by key multiplied by a coefficient after, obtain confounding factors.
S610, the encapsulation privacy side of being transferred to object, be transferred to side of the privacy side of the being transferred to object as the first block chain.
Wherein, the privacy side of being transferred to object may include: that disposable account address and the amount of money are promised to undertake.
Wherein, the present embodiment can be according to formula C2i=a2×G2+b2i×H2It calculates separately and obtains each side of being transferred to
The amount of money is promised to undertake, wherein the i is the number of the side of being transferred to, and i is nonnegative integer, the C2iIt is the side of being transferred to described in i for number
The amount of money promise to undertake, a2For confounding factors, the b2iTo number the amount of money that is transferred to for being the side of being transferred to described in i, the G2And institute
State H2It is preset constant.
The privacy side of being transferred to object can be indicated by UTXOOutput object.
S611, it is based on bulletproofs algorithm, the section that calculating is transferred to the amount of money proves.Use what is generated in step S609
Encryption key is transferred to amount of money encryption in the non-privacy side of the being transferred to object of the encapsulation in step S608, obtains the encryption amount of money, protects
Deposit the encryption amount of money.Step S606 is gone to later.
S612, the confounding factors according to each side of being transferred to, calculate the confounding factors for the side of producing, pass through formula C1=a1×G1+b1
×H1The amount of money that the side of producing is calculated is promised to undertake and is filled in the non-privacy side of the producing object encapsulated to step S605.
S613, according to the account of non-privacy account and the cryptographic Hash of at least one Transaction Information, calculated based on elliptic curve
Method, which calculates, obtains non-privacy account signature.
Wherein, the Transaction Information can be with are as follows: remaining sum is transferred to the amount of money etc..
Wherein, non-privacy account signature can be signed with ACCOUNT and be indicated.Non- privacy account signature can be used in block
Whether verifying transaction initiator is legal in chain process of exchange.
S614, it each object of encapsulation is sent to block catenary system trades.
By each step shown in Fig. 4 it is found that the present invention can obtain the side of producing in block chain transaction generating process and turn
The amount of money for the side of entering is promised to undertake, is then respectively put into the side's of the producing object and the side's of being transferred to object of encapsulation.In this way, each when what is encapsulated
Object is sent to block catenary system when being traded, and block chain is assured that in the side's of producing object of the first block chain transaction
The amount of money promise to undertake whether with the first block chain transaction the respectively side of being transferred to object in the amount of money promise to undertake the sum of it is equal, and then determine transaction be
It is no legal.
As shown in figure 5, another kind block chain transaction generation method provided in an embodiment of the present invention, may include:
S701, use the specified privacy account of user as the side of producing.
Wherein, the information such as remaining sum of privacy account are unknowable to third party.Privacy account can be UTXO account.
Whether S702, the verification side of being transferred to are legal.If legal, S703 is thened follow the steps, otherwise determines transaction failed regeneration.
Whether legal it specifically can be the contents such as verification transfer amounts, the side of being transferred to address.
S703, service charge is calculated.
If it is commonly transferring accounts, service charge will be collected according to fixed value, this fixed value is arranged by special contract.If it is
Contract calls, and other than collecting fixed fee, can also be accumulated in the service charge consumed in contract implementation procedure.
S704, check the side's of producing account remaining sum whether enough payment produce the amount of money and service charge, if insufficient, transaction life
At failure.If enough, thening follow the steps S705.
Wherein, step S702 to step S704 is similar to step S604 to step S602 shown in Fig. 4, is no longer described in detail.
S705, privacy account team is obtained to the progress descending sort of these privacy accounts according to the remaining sum of each privacy account
Column.It is subsequent when selecting UTXO, preferentially select the UTXO of the privacy account of high remaining sum.
S705 is optional step.
S706, judge whether all sides of being transferred to all have encapsulated.If all encapsulated, step S715 is gone to, otherwise,
Continue step S707.
One S707, selection not used UTXO.One is preferentially randomly choosed from the UTXO of the privacy account of high remaining sum.
S708, judge whether all sides of being transferred to all have encapsulated again.If encapsulation finishes, step S715 is gone to, otherwise,
Continue step S709.
S709, judge whether to be more than transaction limits, if it exceeds limitation, this implementation can split out more transactions, at this time
Step S715 is gone to, otherwise, continues step S710.
Wherein, transaction limits can be the limitation of transaction size or transaction the number of output limitation etc..
S710, the account for selecting a unencapsulated side of being transferred to.
S711, judge selection the side of being transferred to account privacy type.It, can be to identical if being non-privacy account
The amount of money that is transferred to of non-privacy account merges, and continues step S712 at this time.If it is privacy account, then step S713 is gone to.
The selected account queue of S712, traversal, check the non-privacy account of step S710 selection in the queue whether
It has existed, if had existed, is merged to the amount of money is transferred to, then go to step S714, otherwise, continue step
S713。
S713, the account of the side of being transferred to currently selected is put into selected account queue.
S714, judge whether the amount of money of the UTXO of selection pays completely enough.If enough, payment is transferred to the amount of money, so
After go to step S708, otherwise the full amount of UTXO will be selected to pay, then goes to step S706.
S715, it judges whether there is transaction and needs to generate.If the account queue that step S706 to step S714 is selected is not
It for sky, then needs to generate transaction, continues step S716 and otherwise go to step S732.
S716, judge all UTXO having been selected whether all pull ring.If not provided, continuing step S717, otherwise
Pull ring is completed, and step S721 is gone to.
S717, step S717 are the process of pull ring to step S720.Firstly, inquiring the sum of UTXO on current chain
(MAXINDEX)。
S718, from 0-MAXINDEX, randomly choose N number of integer.Because the UTXO counting on chain be it is continuous, can
To pass through this N number of integer as the corresponding UTXO of search index.It needs to carry out deduplication operation to N number of integer in the step.
S719, the N number of integer selected using in step S718 inquire corresponding UTXO metadata as index from chain, main
It to include that disposable account address and the amount of money are promised to undertake.
S720, the step S718 and step S719 UTXO selected is encapsulated as ring object, ring members are risen according to index
Sequence sequence.Single UTXO pull ring is completed, and step S716 is gone to.
All the selected side of being transferred to of S721, judgement whether complete by encapsulation.If not provided, continuing step S722, otherwise turn
To step S727, into next stage.
S722, step S722 are to generate the process traded and exported to step S726.First judge the privacy of the account for the side of being transferred to
Type continues step S723 and otherwise goes to step S724 if being non-privacy account.
S723, the step are directed to non-privacy account.Encapsulate output of the AccountOutput object structure as transaction.It should
Object includes following member: the side's of being transferred to account, transfer amounts, amount of money promise.Wherein transfer amounts exposure, the calculating that the amount of money is promised to undertake
Based on C1=b1× H, wherein b1For transfer amounts, H is constant.Step S721 is gone to later handles next side of being transferred to.
S724, it parses the view public key (PV) in the account of privacy account and spends public key (PS).According to formula addr
=H ' (r*PV, i) G+PS, which is calculated, obtains disposable account address addr.Gold is transferred to according to formula key=H " (r*PV, i) calculating
The encryption key of volume.
Wherein, H ' is the first hash function, and i is the number for being transferred to object that the transaction encapsulation of the first block chain obtains, and G is normal
Amount H " is the second hash function, and R is to preset random public key, and r is default random private-key.
The present invention can calculate the confounding factors for obtaining privacy account according to key.Specifically, the present invention can be according to function
Key is mapped as confounding factors by mapping, such as: by key multiplied by a coefficient after, obtain confounding factors.
The output of S725, encapsulation UTXOOutput object structure as transaction.The object includes following member: disposable account
Family address and the amount of money are promised to undertake.
S726, it is based on bulletproofs algorithm, the section for calculating transfer amounts proves.And in setting steps S725
The amount of money of UTXOOutput object is promised to undertake.Transfer amounts are encrypted using the amount of money encryption key generated in step S724, are being handed over
Encrypted amount of money value is saved in easily.Step S721 is gone to later.
S727, judge selectively whether UTXO all calculates ring signatures for institute.If it is not, continue step S728, it is no
Then go to step S731.
S728, step S728 to step S730 be ring signatures calculating process.Firstly, according to formula sk=H ' (R*pv, i)+
Ps calculates disposable account address private key, and wherein R is random public key, and pv is view private key, and i is the output array index of transaction,
Ps is to spend private key.
S729, keyImage is calculated according to formula ki=sk*H " ' (addr), wherein sk is disposable account address private key,
H " ' is third hash function, and addr is disposable account address.KeyImage is used to anti-honeysuckle.
S730, ring signatures are calculated according to ring signatures algorithm.The ring signatures of single UTXO, which calculate, to be completed, and step S727 is gone to.
S731, trading object is generated, and caches each trading object of generation, then go to step S706.
S732, it each trading object of encapsulation is sent to block catenary system trades.
By each step shown in Fig. 5 it is found that the present invention can obtain the side of producing in block chain transaction generating process and turn
The amount of money for the side of entering is promised to undertake, is then respectively put into the side's of the producing object and the side's of being transferred to object of encapsulation.In this way, each when what is encapsulated
Object is sent to block catenary system when being traded, and block chain is assured that in the side's of producing object of the first block chain transaction
The amount of money promise to undertake whether with the first block chain transaction the respectively side of being transferred to object in the amount of money promise to undertake the sum of it is equal, and then determine transaction be
It is no legal.
As shown in fig. 6, the device includes memory the embodiment of the invention also provides a kind of block chain transaction verification device
11 and processor 12, the block chain transaction verification program that can be run on the processor 12 is stored on the memory 11,
The block chain transaction verification program realizes any block chain provided in an embodiment of the present invention when being executed by the processor 11
Transaction verification method.As shown in fig. 6, the device can also include bus 13, memory 11 and processor 12 can pass through bus
13 are communicated.
Fig. 6 shown device can be PC (Personal Computer, PC), be also possible to smart phone, plate
Computer, palm PC, portable computer, intelligent router, mine machine, network storage equipment terminal device.
Wherein, Fig. 6 shown device can be the node of composition CDN network or block chain network.
Wherein, memory 11 include at least a type of readable storage medium storing program for executing, the readable storage medium storing program for executing include flash memory,
Hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..Memory 11
It can be the internal storage unit of block chain transaction verification device, such as the block chain transaction verification device in some embodiments
Hard disk.Memory 11 is also possible to the External memory equipment of block chain transaction verification device in further embodiments, such as
The plug-in type hard disk being equipped on block chain transaction verification device, intelligent memory card (Smart Media Card, SMC), safe number
Word (Secure Digital, SD) card, flash card (Flash Card) etc..Further, memory 11 can also both include area
The internal storage unit of block chain transaction verification device also includes External memory equipment.Memory 11 can be not only used for storage installation
In the application software and Various types of data of block chain transaction verification device, such as the code etc. of block chain transaction verification program, may be used also
For temporarily storing the data that has exported or will export.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit,
CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11
Code or processing data, such as execute block chain transaction verification program etc..
The bus 13 can be Peripheral Component Interconnect standard (peripheral component interconnect, abbreviation
PCI) bus or expanding the industrial standard structure (extended industry standard architecture, abbreviation EISA)
Bus etc..The bus can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, in Fig. 6 only with one slightly
Line indicates, it is not intended that an only bus or a type of bus.
Further, block chain transaction verification device can also include network interface, and network interface optionally may include
Wireline interface and/or wireless interface (such as WI-FI interface, blue tooth interface), commonly used in the device and other electronic equipments
Between establish communication connection.
Optionally, which can also include user interface, and user interface may include display (Display), input
Unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface and wireless interface.It is optional
Ground, in some embodiments, display can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and OLED
(Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..Wherein, display can also be appropriate
Referred to as display screen or display unit, for being shown in the information handled in block chain transaction verification device and for showing visually
The user interface of change.
Fig. 6 illustrates only the block chain transaction verification device with component 11-13, it will be appreciated by those skilled in the art that
It is that the structure shown in Fig. 6 does not constitute the restriction to block chain transaction verification device, may include less or more than illustrating
Component, perhaps combine certain components or different component layouts.
As shown in fig. 7, the embodiment of the invention also provides a kind of block chain transaction verification system, which may include:
First amount of money promises to undertake that obtaining unit 100, second amount of money promise to undertake obtaining unit 200 and legal determination unit 300,
First amount of money promises to undertake obtaining unit 100, for producing according to the side of producing of the first block chain trading activity
The amount of money of the amount of money, the side of producing described in acquisition is promised to undertake;
Second amount of money promises to undertake obtaining unit 200, for the respectively side of being transferred to according to the first block chain trading activity
Be transferred to the amount of money, the amount of money for obtaining each side of being transferred to respectively is promised to undertake, wherein at least one in the side of producing and the respectively side of being transferred to
Fang Weifei privacy account;
The legal determination unit 300, the amount of money for the side of producing according to promise to undertake the amount of money with each side of being transferred to
The sum of promise determines whether the transaction amount of the first block chain trading activity is legal.
The amount of money that Fig. 7 shown device of the present invention can obtain the side of producing is promised to undertake and respectively the amount of money for the side of being transferred to is promised to undertake, and root
The amount of money of the sum of amount of money promise according to the respectively side of being transferred to and the side of producing, which is promised to undertake, determines whether the transaction amount of block chain trading activity closes
Method.Fig. 7 shown device of the present invention can be adapted for the transaction of block chain involved in the side of producing and the side of being transferred to of various privacy types
Behavior.
First amount of money promises to undertake that obtaining unit 100 can be specifically used for: will produce the amount of money and is added with service charge, is turned
It is square out to produce total value, according to formula C1=a1×G1+b1×H1Calculate the amount of money promise of the side of producing described in obtaining, the C1For institute
State the amount of money promise for the side of producing, a1For the first confounding factors, the b1For the total value that produces of the side of producing, the G1With
The H1It is preset constant.
Second amount of money promises to undertake that obtaining unit 200 can be specifically used for: according to formula C2i=a2×G2+b2i×H2Respectively
Calculate the amount of money promise for obtaining each side of being transferred to, wherein the i is the number of the side of being transferred to, and i is nonnegative integer, described
C2iTo number the amount of money promise for being the side of being transferred to described in i, a2For the second confounding factors, the b2iIt is described in i for number
The side of being transferred to is transferred to the amount of money, the G2With the H2It is preset constant.
Wherein, for the side of being transferred to for non-privacy account: a2It is zero.
In other embodiments, Fig. 7 shown device can also include: that the third amount of money promises to undertake obtaining unit, for obtaining
The corresponding amount of money of service charge for stating the first block chain trading activity is promised to undertake.On this basis, the legal determination unit 300 is specific
For: the amount of money of each side of being transferred to is promised to undertake and the corresponding amount of money of the service charge is promised to undertake and is added, total amount is obtained and promises to undertake;
Whether the amount of money promise of the side of producing described in determination is equal with total amount promise, if equal, determines the first block chain
The transaction amount of trading activity is legal.
The embodiment of the invention also provides a kind of computer readable storage medium, deposited on the computer readable storage medium
Block chain transaction verification program is contained, the block chain transaction verification program can be executed by one or more processor, with reality
Existing any block chain transaction verification method provided in an embodiment of the present invention.
The embodiment of the invention also provides a kind of computer program product, including computer instruction, when its on computers
When operation, computer is allowed to execute any block chain transaction verification method provided in an embodiment of the present invention.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.
The computer program product includes one or more computer instructions.Load and execute on computers the meter
When calculation machine program instruction, entirely or partly generate according to process or function described in the embodiment of the present invention.The computer can
To be general purpose computer, special purpose computer, computer network or other programmable devices.The computer instruction can be deposited
Storage in a computer-readable storage medium, or from a computer readable storage medium to another computer readable storage medium
Transmission, for example, the computer instruction can pass through wired (example from a web-site, computer, server or data center
Such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave) mode to another website
Website, computer, server or data center are transmitted.The computer readable storage medium can be computer and can deposit
Any usable medium of storage either includes that the data storages such as one or more usable mediums integrated server, data center are set
It is standby.The usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or partly lead
Body medium (such as solid state hard disk Solid State Disk (SSD)) etc.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application
Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And
The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet
Process, device, article or the method for including a series of elements not only include those elements, but also including being not explicitly listed
Other element, or further include for this process, device, article or the intrinsic element of method.Do not limiting more
In the case where, the element that is limited by sentence "including a ...", it is not excluded that including process, device, the article of the element
Or there is also other identical elements in method.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.