The content of the invention
It is a primary object of the present invention to provide a kind of transaction verification method and system based on block chain, it is intended to effectively protect
The safety of Transaction Information is demonstrate,proved, and can guarantee that the speed of trading processing.
To achieve the above object, a kind of transaction verification method based on block chain provided by the invention, methods described include
Following steps:
A node on a1, block chain is when handling a transaction with type of transaction and dealing money, the node
The first deciphering parameter sent by the counterparty of the transaction decrypts the original balance of each counterparty, and based on described
Type of transaction and dealing money to the original balance of each counterparty carry out that corresponding new balance is calculated, by each institute
State the encryption parameter that new balance corresponding to counterparty is sent by the counterparty to be encrypted to obtain encryption new balance, pass through
Intelligent contract will be encrypted new balance and is broadcast on each node of the block chain corresponding to each counterparty;
A2, when the node of the block chain receive broadcast come each counterparty corresponding to encrypt new balance after, open
Intelligent contract corresponding to dynamic carries out closing number checking;
If intelligent contract corresponding to each node corresponding to each counterparty to encrypting new balance on a3, the block chain
Conjunction number be verified, then on the block chain intelligent contract corresponding to each node be based on each counterparty corresponding to encrypt
New balance is updated to its data;
A4, default negative balance checking system outside the block chain is called to start multiple threads, each thread is born simultaneously
Blame and negative balance inspection is carried out to the remaining sum of the single account of each node on the block chain, if each node on the block chain
The negative balance of single account balance is upchecked, then judges that the transaction verification passes through.
Preferably, this method also includes:
Second deciphering parameter is entered by the node key corresponding with the monitoring party node on the block chain of the block chain
Row encryption, and the second deciphering parameter after encryption is broadcast on the monitoring party node on the block chain by intelligent contract, institute
The second deciphering parameter is stated to be used to be decrypted to encrypting new balance corresponding to each counterparty;
Monitoring party node on the block chain reads encryption new balance corresponding to updated each counterparty, and leads to
The second deciphering parameter crossed after the secret key pair encryption is decrypted, by the second deciphering parameter after decryption to each friendship
Encryption new balance is decrypted corresponding to Yi Fang, and carries out negative balance checking to each new balance after decryption.
Preferably, this method also includes:
If there is account not examined by negative balance, the monitoring party node determines abnormal block chain corresponding to the account
Node, and the unusual condition of the account is notified to other nodes in addition to the abnormal block chain link point.
Preferably, this method also includes:
If there is account not examined by negative balance, the monitoring party node passes through default block chain rights management system
System cancels trading privilege of the abnormal block chain link point on the block chain.
Preferably, this method also includes:
If conjunction number of the intelligent contract corresponding to the block chain node to the parameter transaction is verified not by the transaction
All nodes that participate in of event send the notice that the transaction event closes number authentication failed, or, all nodes on the block chain
Send the notice that the transaction event closes number authentication failed.
In addition, to achieve the above object, the present invention also provides a kind of transaction verification system based on block chain, the transaction
Checking system includes:
Broadcast module, for when a node on block chain is in one friendship with type of transaction and dealing money of processing
Yi Shi, the first deciphering parameter sent by the node by the counterparty of the transaction decrypt the original remaining of each counterparty
Volume, and based on the type of transaction and dealing money the original balance of each counterparty is calculated corresponding to it is new
Remaining sum, the encryption parameter that new balance corresponding to each counterparty is sent by the counterparty is encrypted and added
Close new balance, encryption new balance corresponding to each counterparty is broadcast to each node of the block chain by intelligent contract
On;
Number authentication module is closed, for adding when the node of the block chain receives corresponding to the next each counterparty of broadcast
After close new balance, intelligent contract corresponding to startup carries out closing number checking;
Update module, if intelligent contract corresponding to each node is to corresponding to each counterparty on the block chain
The conjunction number of encryption new balance is verified, then intelligent contract is based on each transaction as corresponding to each node on the block chain
Encryption new balance is updated to its data corresponding to side;
Remaining sum inspection module, for calling default negative balance checking system outside the block chain to start multiple threads,
Each thread is responsible for carrying out negative balance inspection to the remaining sum of the single account of each node on the block chain simultaneously, if the block
The negative balance of the single account balance of each node is upchecked on chain, then judges that the transaction verification passes through.
Preferably, the broadcast module is additionally operable to:
Second deciphering parameter is entered by the node key corresponding with the monitoring party node on the block chain of the block chain
Row encryption, and the second deciphering parameter after encryption is broadcast on the monitoring party node on the block chain by intelligent contract, institute
The second deciphering parameter is stated to be used to be decrypted to encrypting new balance corresponding to each counterparty;
The remaining sum inspection module is additionally operable to:
Read as the monitoring party node on the block chain and encrypt new balance corresponding to updated each counterparty, and
The second deciphering parameter after being encrypted by the secret key pair is decrypted, by the second deciphering parameter after decryption to each described
Encryption new balance is decrypted corresponding to counterparty, and carries out negative balance checking to each new balance after decryption.
Preferably, the remaining sum inspection module is additionally operable to:
If there is account not examined by negative balance, the abnormal block as corresponding to the monitoring party node determines the account
Chain node, and the unusual condition of the account is notified to other nodes in addition to the abnormal block chain link point.
Preferably, the remaining sum inspection module is additionally operable to:
If there is account not examined by negative balance, default block chain rights management is passed through by the monitoring party node
System cancels trading privilege of the abnormal block chain link point on the block chain.
Preferably, the conjunction number authentication module is additionally operable to:
If conjunction number of the intelligent contract corresponding to the block chain node to the parameter transaction is verified not by the transaction
All nodes that participate in of event send the notice that the transaction event closes number authentication failed, or, all nodes on the block chain
Send the notice that the transaction event closes number authentication failed.
Transaction verification method and system proposed by the present invention based on block chain, node on block chain is in processing with handing over
During the transaction of easy type and dealing money, the original balance based on the type of transaction and dealing money to each counterparty
Carry out that corresponding new balance is calculated, and new balance corresponding to each counterparty is sent by the counterparty
Encryption parameter is encrypted to obtain encryption new balance, is broadcast on each node of the block chain;When the node of the block chain connects
After receiving encryption new balance corresponding to each counterparty that broadcast comes, intelligent contract corresponding to startup carries out closing number checking;
It is verified closing number, just the intelligent contract as corresponding to the block chain node is based on the parameter transaction to its data progress
Renewal.Because new balance corresponding to each counterparty of broadcast has carried out encryption, other nodes of the block chain
The new balance can not be known, and only just carry out data renewal after closing number and being verified, each account in multi transaction can be prevented
Remaining sum leakage, be effectively guaranteed the safety of Transaction Information.In addition, the remaining sum of the single account of each node is also issued into institute
State default negative balance outside block chain and verify system to carry out negative balance inspection.Due to being tested using the negative balance of outside
Card system carries out negative balance inspection, can further verify whether multi transaction is normal, and and can is being not take up overhead
In the case of ensure block chain on trading processing speed.
Embodiment
In order that technical problems, technical solutions and advantages to be solved are clearer, clear, tie below
Drawings and examples are closed, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only
To explain the present invention, it is not intended to limit the present invention.
The present invention provides a kind of transaction verification method based on block chain.
Reference picture 1, Fig. 1 are the schematic flow sheet of transaction verification method one embodiment of the invention based on block chain.
In one embodiment, being somebody's turn to do the transaction verification method based on block chain includes:
Step S10, a node on block chain, should when handling a transaction with type of transaction and dealing money
The first deciphering parameter that node is sent by the counterparty of the transaction decrypts the original balance of each counterparty, and is based on
The type of transaction and dealing money carry out that corresponding new balance is calculated to the original balance of each counterparty, will be each
The encryption parameter that new balance corresponding to the individual counterparty is sent by the counterparty is encrypted to obtain encryption new balance,
New balance will be encrypted corresponding to each counterparty by intelligent contract to be broadcast on each node of the block chain.
, can be by parameter transaction corresponding to the transaction event after node on block chain completes a transaction event
Other nodes being broadcast on the block chain.Wherein, the parameter transaction may include type of transaction and/or dealing money, for example,
If the A nodes on block chain are to B node payment by the transfer of accounts, amount of money X, A nodes broadcast parameter transaction corresponding to the transaction event
To other nodes on the block chain, the parameter transaction of overseas broadcast includes " type of transaction:A nodes produce ", A nodes are external
Also include " dealing money in the parameter transaction of broadcast:X”;Meanwhile B node also broadcasts parameter transaction corresponding to the transaction event
To other nodes on the block chain, the parameter transaction of overseas broadcast includes " type of transaction:B node is transferred to ", B node is external
Also include " dealing money in the parameter transaction of broadcast:X”.
In the present embodiment, when a node on block chain carries type of transaction (for example, A transfers accounts to B) for one in processing
During with the transaction of dealing money, the first deciphering parameter that the node is sent by the counterparty of the transaction decrypts each friendship
Yi Fang original balance, and the original balance of each counterparty is calculated based on the type of transaction and dealing money
To calculate corresponding new balance, encryption parameter that new balance corresponding to each counterparty is sent by the counterparty
(encryption parameter and the deciphering parameter can be with identical, can also be different) is encrypted, by intelligent contract by each institute
The new balance after encrypting corresponding to counterparty is stated to be broadcast on each node of the block chain.
Step S20, new balance is encrypted corresponding to the next each counterparty of broadcast when the node of the block chain receives
Afterwards, intelligent contract corresponding to startup carries out closing number checking.
Data on block chain would generally be stored in two places participated on node:Intelligent contract (close by each intelligence
About have the present situation of oneself) neutralize node on transaction journal (transaction log, for roll out it is each intelligence close
The current situation of about upper data) in, the corresponding transaction journal of each block chain node and one or more intelligent contracts.When one
When individual parameter transaction is passed on the node of block chain, this parameter transaction can be recorded to corresponding to the node in transaction journal simultaneously
Simultaneously intelligent contract corresponding with the parameter transaction is transmitted to go to run, and the code as corresponding to the parameter transaction on intelligent contract
Its data of intelligent contract is updated.
In the present embodiment, if there is block chain node to receive each friendship that other node broadcasts on the block chain are come
New balance is encrypted corresponding to Yi Fang, then the encryption new balance is issued intelligence corresponding to the block chain node by the block chain node
Contract carries out closing number checking, i.e. whether the remaining sum sum of all nodes before checking transaction is equal to all nodes after transaction
Remaining sum sum, to verify whether the transaction is normal.In the present embodiment, intelligent contract corresponding to the block chain node can be based on default
Homomorphic cryptography verification algorithm come carry out close number checking.
Wherein, homomorphic cryptography is the cryptological technique of the computational complexity theory based on difficult math question.To adding by homomorphism
Close data are handled to obtain an output, and this output is decrypted, and its result with Same Way with handling unencryption
The obtained output result of initial data be the same.In the present embodiment, it can verify that based on default homomorphic cryptography verification algorithm
Whether the remaining sum sum of all nodes before transaction is equal to the remaining sum sum of all nodes after transaction, so as to verify the transaction
It is whether normal.For example, in one embodiment, intelligent contract corresponding to the block chain node can use additive homomorphism to encrypt
Verification algorithm carries out closing number checking, it is assumed that R and S is domain, claims encryption function E:R → S is additive homomorphism, if there is efficient algorithm
⊕ so that E (x+y)=E (x) ⊕ E (y) or x+y=D (E (x) ⊕ E (y)) are set up, and efficient algorithm ⊕ is additive homomorphism
Encrypted authentication algorithm, this algorithm are not only able to verify that account closes number, simultaneously, moreover it is possible to ensure not leak the remaining sum x and y of account.
When the transaction event event such as money transfer transactions, payment transaction participated in many ways with block chain technology,
Among the block catenary system of decentralization, due to not absolute authoritative agency node, therefore every transaction must all be carried out
Collective verifies.Close number checking using homomorphic cryptography verification algorithm in the present embodiment, can effectively verify with block
Whether the transaction that chain technology is participated in many ways is normal, and and can prevents the remaining sum of multi-party account from revealing, and is effectively guaranteed transaction
The safety of information.
Step S30, if intelligent contract corresponding to each node is to encryption corresponding to each counterparty on the block chain
The conjunction number of new balance is verified, then intelligent contract corresponding to each node is corresponding based on each counterparty on the block chain
Encryption new balance its data is updated;
If conjunction number of the intelligent contract to the parameter transaction is verified corresponding to the block chain node, illustrate the transaction
Normally, then intelligent contract corresponding to each node is based on encryption new balance progress corresponding to each counterparty on the block chain
Renewal.If for example, the type of transaction that the parameter transaction includes is " A nodes produce ", the trade gold that the parameter transaction includes
Volume is X, then the A nodes remaining sum in its data is reduced X by intelligent contract corresponding to the block chain node.
S40, default negative balance checking system outside the block chain is called to start multiple threads, each thread is born simultaneously
Blame and negative balance inspection is carried out to the remaining sum of the single account of each node on the block chain, if each node on the block chain
The negative balance of single account balance is upchecked, then judges that the transaction verification passes through.
Because the remaining sum of each node is independent array, it is possible to multithreading inspection is carried out to multiple node remaining sums,
Meanwhile because same node participates in account, type of transaction and the amount of money merchandised every time and is described on record, pass through void
False remaining sum examines the form that can effectively prevent user from sharing by point account remaining sum in some node to change some point of account
Remaining sum is so as to evade the verification of the conjunction number checking, for example, 100 bills in account 001 can be passed through following point of account by bank A
The form that remaining sum is shared at family becomes 400:First create 002 account and put 400 remaining sums, then again at one new 003
- 300 are deposited in account.
System is verified by the negative balance outside the block chain in the present embodiment, that is, utilized not in the block chain
The negative balance checking system of upper operation starts multiple threads to participating in each account of each node of the transaction event
Remaining sum carries out negative balance inspection, is avoided that user and closes the feelings of number checking by way of the account that manufacture has negative to out-trick
Condition occurs, and further more can accurately verify whether transaction is normal, moreover, negative balance verifies system not in the area
Run on block chain, but in outside isolated operation, the trading processing speed on block chain will not be impacted, effectively ensured
Faster trading processing speed on block chain.
If there is block chain node to receive the parameter transaction that other node broadcasts on block chain are come, block in the present embodiment
Node on chain is when processing carries the transaction of type of transaction and dealing money, based on the type of transaction and dealing money to each
The original balance of the individual counterparty be calculated corresponding new balance, and by new balance corresponding to each counterparty
The encryption parameter sent by the counterparty is encrypted to obtain encryption new balance, is broadcast to each node of the block chain
On;After the node of the block chain, which receives, encrypts new balance corresponding to the next each counterparty of broadcast, corresponding to startup
Intelligent contract carries out closing number checking;It is verified closing number, just the intelligent contract as corresponding to the block chain node is based on described
Parameter transaction is updated to its data.Because new balance has been carried out at encryption corresponding to each counterparty of broadcast
Reason, other nodes of the block chain can not know the new balance, and only just carry out data renewal after closing number and being verified,
It can prevent the remaining sum of each account in multi transaction from revealing, be effectively guaranteed the safety of Transaction Information.In addition, also by each node
The remaining sum of single account issue outside the block chain default negative balance checking system to carry out negative balance inspection.By
In verifying system using the negative balance of outside to carry out negative balance inspection, whether just multi transaction can be further verified
Often, and can ensures the trading processing speed on block chain in the case where being not take up overhead.
Further, in other embodiments, this method can also include:
Second deciphering parameter is entered by the node key corresponding with the monitoring party node on the block chain of the block chain
Row encryption, and the second deciphering parameter after encryption is broadcast on the monitoring party node on the block chain by intelligent contract, institute
The second deciphering parameter is stated to be used to be decrypted to encrypting new balance corresponding to each counterparty;
Monitoring party node on the block chain reads encryption new balance corresponding to updated each counterparty, and leads to
The second deciphering parameter crossed after the secret key pair encryption is decrypted, by the second deciphering parameter after decryption to each friendship
Encryption new balance is decrypted corresponding to Yi Fang, and carries out negative balance checking to each new balance after decryption.
In the present embodiment, in the node new balance will be encrypted by intelligent contract corresponding to each counterparty and be broadcast to
While on each node of the block chain, also by for being solved to the new balance after encryption corresponding to each counterparty
The second close deciphering parameter is encrypted by node key corresponding with monitoring party node, and by the deciphering parameter after encryption
It is broadcast to by intelligent contract on the monitoring party node on the block chain.The intelligent contract corresponding to each node on the block chain
The conjunction number that new balance is encrypted corresponding to each counterparty is verified, and intelligence corresponding to each node on the block chain
After contract is based on encryption new balance is updated corresponding to each counterparty, read by the monitoring party node on the block chain
After taking encryption new balance corresponding to updated each counterparty, pass through the deciphering parameter after encryption described in the secret key pair
It is decrypted, the new balance after encryption corresponding to each counterparty is decrypted by the deciphering parameter after decryption, and
Negative balance checking is carried out to each new balance after decryption, further from block chain in itself to each account on the block chain
The remaining sum at family carries out negative balance inspection, further to verify whether the transaction is normal.
Further, in other embodiments, this method can also include:
If there is account not examined by negative balance, the monitoring party node determines abnormal block chain corresponding to the account
Node, and the unusual condition of the account is notified to other nodes in addition to the abnormal block chain link point.
If there is account not examined by negative balance, it is likely that to be the account that user has negative by manufacture occurred
Mode close the situation of number checking, the then abnormal block chain as corresponding to the monitoring party node on block chain determines the account to out-trick
Node, and other nodes of the unusual condition of the account into the block chain in addition to the abnormal block chain link point are carried out
Notice, to remind other nodes account to be in unusual condition, the transaction thing that abnormal block chain link point corresponding to the account participates in
Part there may be risk.
Further, in other embodiments, this method can also include:
If there is account not examined by negative balance, default block chain rights management is passed through by the monitoring party node
System cancels trading privilege of the abnormal block chain link point on the block chain.
If verify that system carries out negative balance inspection to the remaining sum of single account by the negative balance, there is account not lead to
Cross negative balance inspection, it is likely that be user occurred to close number checking by way of the account that manufacture has negative to out-trick
Situation, illustrate that the transaction event that abnormal block chain link point corresponding to the account participates in there may be risk, then by default
Block chain Rights Management System cancels trading privilege of the abnormal block chain link point on the block chain, described different to prevent
Normal block chain node continues to participate in transaction on the block chain, ensure to remove in the block chain the abnormal block chain link point it
The transaction security of other outer nodes.
Further, in other embodiments, this method can also include:
If conjunction number of the intelligent contract corresponding to the block chain node to the parameter transaction is verified not by the friendship
All participation nodes of easy event send the notice that the transaction event closes number authentication failed, or, the institute on the block chain
There is node to send the notice that the transaction event closes number authentication failed.To remind all participation nodes of the transaction event or the area
All nodes transaction event appearance on block chain is abnormal, and the transaction event that the block chain node participates in there may be risk.
The present invention further provides a kind of transaction verification system based on block chain.
Reference picture 2, Fig. 2 are the high-level schematic functional block diagram of the embodiment of transaction verification system one of the present invention.
In one embodiment, the transaction verification system includes:
Broadcast module 01, for when a node on block chain in processing one with type of transaction and dealing money
During transaction, the first deciphering parameter sent by the node by the counterparty of the transaction decrypts the original of each counterparty
Remaining sum, and corresponding to the original balance of each counterparty being calculated based on the type of transaction and dealing money
New balance, the encryption parameter that new balance corresponding to each counterparty is sent by the counterparty is encrypted to obtain
New balance is encrypted, encryption new balance corresponding to each counterparty is broadcast to each section of the block chain by intelligent contract
Point on.
, can be by parameter transaction corresponding to the transaction event after node on block chain completes a transaction event
Other nodes being broadcast on the block chain.Wherein, the parameter transaction may include type of transaction and/or dealing money, for example,
If the A nodes on block chain are to B node payment by the transfer of accounts, amount of money X, A nodes broadcast parameter transaction corresponding to the transaction event
To other nodes on the block chain, the parameter transaction of overseas broadcast includes " type of transaction:A nodes produce ", A nodes are external
Also include " dealing money in the parameter transaction of broadcast:X”;Meanwhile B node also broadcasts parameter transaction corresponding to the transaction event
To other nodes on the block chain, the parameter transaction of overseas broadcast includes " type of transaction:B node is transferred to ", B node is external
Also include " dealing money in the parameter transaction of broadcast:X”.
In the present embodiment, when a node on block chain carries type of transaction (for example, A transfers accounts to B) for one in processing
During with the transaction of dealing money, the first deciphering parameter that the node is sent by the counterparty of the transaction decrypts each friendship
Yi Fang original balance, and the original balance of each counterparty is calculated based on the type of transaction and dealing money
To calculate corresponding new balance, encryption parameter that new balance corresponding to each counterparty is sent by the counterparty
(encryption parameter and the deciphering parameter can be with identical, can also be different) is encrypted, by intelligent contract by each institute
The new balance after encrypting corresponding to counterparty is stated to be broadcast on each node of the block chain.
Number authentication module 02 is closed, for being received when the node of the block chain corresponding to the next each counterparty of broadcast
After encrypting new balance, intelligent contract corresponding to startup carries out closing number checking.
Data on block chain would generally be stored in two places participated on node:Intelligent contract (close by each intelligence
About have the present situation of oneself) neutralize node on transaction journal (transaction log, for roll out it is each intelligence close
The current situation of about upper data) in, the corresponding transaction journal of each block chain node and one or more intelligent contracts.When one
When individual parameter transaction is passed on the node of block chain, this parameter transaction can be recorded to corresponding to the node in transaction journal simultaneously
Simultaneously intelligent contract corresponding with the parameter transaction is transmitted to go to run, and the code as corresponding to the parameter transaction on intelligent contract
Its data of intelligent contract is updated.
In the present embodiment, if there is block chain node to receive each friendship that other node broadcasts on the block chain are come
New balance is encrypted corresponding to Yi Fang, then the encryption new balance is issued intelligence corresponding to the block chain node by the block chain node
Contract carries out closing number checking, i.e. whether the remaining sum sum of all nodes before checking transaction is equal to all nodes after transaction
Remaining sum sum, to verify whether the transaction is normal.In the present embodiment, intelligent contract corresponding to the block chain node can be based on default
Homomorphic cryptography verification algorithm come carry out close number checking.
Wherein, homomorphic cryptography is the cryptological technique of the computational complexity theory based on difficult math question.To adding by homomorphism
Close data are handled to obtain an output, and this output is decrypted, and its result with Same Way with handling unencryption
The obtained output result of initial data be the same.In the present embodiment, it can verify that based on default homomorphic cryptography verification algorithm
Whether the remaining sum sum of all nodes before transaction is equal to the remaining sum sum of all nodes after transaction, so as to verify the transaction
It is whether normal.For example, in one embodiment, intelligent contract corresponding to the block chain node can use additive homomorphism to encrypt
Verification algorithm carries out closing number checking, it is assumed that R and S is domain, claims encryption function E:R → S is additive homomorphism, if there is efficient algorithm
⊕ so that E (x+y)=E (x) ⊕ E (y) or x+y=D (E (x) ⊕ E (y)) are set up, and efficient algorithm ⊕ is additive homomorphism
Encrypted authentication algorithm, this algorithm are not only able to verify that account closes number, simultaneously, moreover it is possible to ensure not leak the remaining sum x and y of account.
When the transaction event event such as money transfer transactions, payment transaction participated in many ways with block chain technology,
Among the block catenary system of decentralization, due to not absolute authoritative agency node, therefore every transaction must all be carried out
Collective verifies.Close number checking using homomorphic cryptography verification algorithm in the present embodiment, can effectively verify with block
Whether the transaction that chain technology is participated in many ways is normal, and and can prevents the remaining sum of multi-party account from revealing, and is effectively guaranteed transaction
The safety of information.
Update module 03, if intelligent contract corresponding to each node is corresponding to each counterparty on the block chain
The conjunction number of encryption new balance be verified, then intelligent contract is based on each friendship as corresponding to each node on the block chain
Encryption new balance is updated to its data corresponding to Yi Fang.
If conjunction number of the intelligent contract to the parameter transaction is verified corresponding to the block chain node, illustrate the transaction
Normally, then intelligent contract corresponding to each node is based on encryption new balance progress corresponding to each counterparty on the block chain
Renewal.If for example, the type of transaction that the parameter transaction includes is " A nodes produce ", the trade gold that the parameter transaction includes
Volume is X, then the A nodes remaining sum in its data is reduced X by intelligent contract corresponding to the block chain node.
Remaining sum inspection module 04, for calling default negative balance checking system outside the block chain to start multiple lines
Journey, each thread is responsible for carrying out negative balance inspection to the remaining sum of the single account of each node on the block chain simultaneously, if should
The negative balance of the single account balance of each node is upchecked on block chain, then judges that the transaction verification passes through.
Because the remaining sum of each node is independent array, it is possible to multithreading inspection is carried out to multiple node remaining sums,
Meanwhile because same node participates in account, type of transaction and the amount of money merchandised every time and is described on record, pass through void
False remaining sum examines the form that can effectively prevent user from sharing by point account remaining sum in some node to change some point of account
Remaining sum is so as to evade the verification of the conjunction number checking, for example, 100 bills in account 001 can be passed through following point of account by bank A
The form that remaining sum is shared at family becomes 400:First create 002 account and put 400 remaining sums, then again at one new 003
- 300 are deposited in account.
System is verified by the negative balance outside the block chain in the present embodiment, that is, utilized not in the block chain
The negative balance checking system of upper operation starts multiple threads to participating in each account of each node of the transaction event
Remaining sum carries out negative balance inspection, is avoided that user and closes the feelings of number checking by way of the account that manufacture has negative to out-trick
Condition occurs, and further more can accurately verify whether transaction is normal, moreover, negative balance verifies system not in the area
Run on block chain, but in outside isolated operation, the trading processing speed on block chain will not be impacted, effectively ensured
Faster trading processing speed on block chain.
If there is block chain node to receive the parameter transaction that other node broadcasts on block chain are come, block in the present embodiment
Node on chain is when processing carries the transaction of type of transaction and dealing money, based on the type of transaction and dealing money to each
The original balance of the individual counterparty be calculated corresponding new balance, and by new balance corresponding to each counterparty
The encryption parameter sent by the counterparty is encrypted to obtain encryption new balance, is broadcast to each node of the block chain
On;After the node of the block chain, which receives, encrypts new balance corresponding to the next each counterparty of broadcast, corresponding to startup
Intelligent contract carries out closing number checking;It is verified closing number, just the intelligent contract as corresponding to the block chain node is based on described
Parameter transaction is updated to its data.Because new balance has been carried out at encryption corresponding to each counterparty of broadcast
Reason, other nodes of the block chain can not know the new balance, and only just carry out data renewal after closing number and being verified,
It can prevent the remaining sum of each account in multi transaction from revealing, be effectively guaranteed the safety of Transaction Information.In addition, also by each node
The remaining sum of single account issue outside the block chain default negative balance checking system to carry out negative balance inspection.By
In verifying system using the negative balance of outside to carry out negative balance inspection, whether just multi transaction can be further verified
Often, and can ensures the trading processing speed on block chain in the case where being not take up overhead.
Further, in other embodiments, above-mentioned broadcast module 01 can be also used for:
Second deciphering parameter is entered by the node key corresponding with the monitoring party node on the block chain of the block chain
Row encryption, and the second deciphering parameter after encryption is broadcast on the monitoring party node on the block chain by intelligent contract, institute
The second deciphering parameter is stated to be used to be decrypted to encrypting new balance corresponding to each counterparty;
Above-mentioned remaining sum inspection module 04 can be also used for:
Read as the monitoring party node on the block chain and encrypt new balance corresponding to updated each counterparty, and
The second deciphering parameter after being encrypted by the secret key pair is decrypted, by the second deciphering parameter after decryption to each described
Encryption new balance is decrypted corresponding to counterparty, and carries out negative balance checking to each new balance after decryption.
In the present embodiment, in the node new balance will be encrypted by intelligent contract corresponding to each counterparty and be broadcast to
While on each node of the block chain, also by for being solved to the new balance after encryption corresponding to each counterparty
The second close deciphering parameter is encrypted by node key corresponding with monitoring party node, and by the deciphering parameter after encryption
It is broadcast to by intelligent contract on the monitoring party node on the block chain.The intelligent contract corresponding to each node on the block chain
The conjunction number that new balance is encrypted corresponding to each counterparty is verified, and intelligence corresponding to each node on the block chain
After contract is based on encryption new balance is updated corresponding to each counterparty, read by the monitoring party node on the block chain
After taking encryption new balance corresponding to updated each counterparty, pass through the deciphering parameter after encryption described in the secret key pair
It is decrypted, the new balance after encryption corresponding to each counterparty is decrypted by the deciphering parameter after decryption, and
Negative balance checking is carried out to each new balance after decryption, further from block chain in itself to each account on the block chain
The remaining sum at family carries out negative balance inspection, further to verify whether the transaction is normal.
Further, in other embodiments, above-mentioned remaining sum inspection module 04 can be also used for:
If there is account not examined by negative balance, the abnormal block as corresponding to the monitoring party node determines the account
Chain node, and the unusual condition of the account is notified to other nodes in addition to the abnormal block chain link point.
If there is account not examined by negative balance, it is likely that to be the account that user has negative by manufacture occurred
Mode close the situation of number checking, the then abnormal block chain as corresponding to the monitoring party node on block chain determines the account to out-trick
Node, and other nodes of the unusual condition of the account into the block chain in addition to the abnormal block chain link point are carried out
Notice, to remind other nodes account to be in unusual condition, the transaction thing that abnormal block chain link point corresponding to the account participates in
Part there may be risk.
Further, in other embodiments, above-mentioned remaining sum inspection module 04 can be also used for:
If there is account not examined by negative balance, default block chain rights management is passed through by the monitoring party node
System cancels trading privilege of the abnormal block chain link point on the block chain.
If verify that system carries out negative balance inspection to the remaining sum of single account by the negative balance, there is account not lead to
Cross negative balance inspection, it is likely that be user occurred to close number checking by way of the account that manufacture has negative to out-trick
Situation, illustrate that the transaction event that abnormal block chain link point corresponding to the account participates in there may be risk, then by default
Block chain Rights Management System cancels trading privilege of the abnormal block chain link point on the block chain, described different to prevent
Normal block chain node continues to participate in transaction on the block chain, ensure to remove in the block chain the abnormal block chain link point it
The transaction security of other outer nodes.
Further, in other embodiments, above-mentioned conjunction number authentication module 02 can be also used for:
If conjunction number of the intelligent contract corresponding to the block chain node to the parameter transaction is verified not by the friendship
All participation nodes of easy event send the notice that the transaction event closes number authentication failed, or, the institute on the block chain
There is node to send the notice that the transaction event closes number authentication failed.To remind all participation nodes of the transaction event or the area
All nodes transaction event appearance on block chain is abnormal, and the transaction event that the block chain node participates in there may be risk.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row
His property includes, so that process, method, article or device including a series of elements not only include those key elements, and
And also include the other element being not expressly set out, or also include for this process, method, article or device institute inherently
Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this
Other identical element also be present in the process of key element, method, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to realized by hardware, but a lot
In the case of the former be more preferably embodiment.Based on such understanding, technical scheme is substantially in other words to existing
The part that technology contributes can be embodied in the form of software product, and the computer software product is stored in a storage
In medium (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal equipment (can be mobile phone, calculate
Machine, server, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
Above by reference to the preferred embodiments of the present invention have been illustrated, not thereby limit to the interest field of the present invention.On
State that sequence number of the embodiment of the present invention is for illustration only, do not represent the quality of embodiment.Patrolled in addition, though showing in flow charts
Order is collected, but in some cases, can be with the step shown or described by being performed different from order herein.
Those skilled in the art do not depart from the scope of the present invention and essence, can have a variety of flexible programs to realize the present invention,
It can be used for another embodiment for example as the feature of one embodiment and obtain another embodiment.All technologies with the present invention
The all any modification, equivalent and improvement made within design, all should be within the interest field of the present invention.