CN107909440A - A kind of distribution general ledger system transaction synchronization liquidation method and system - Google Patents

A kind of distribution general ledger system transaction synchronization liquidation method and system Download PDF

Info

Publication number
CN107909440A
CN107909440A CN201711161950.2A CN201711161950A CN107909440A CN 107909440 A CN107909440 A CN 107909440A CN 201711161950 A CN201711161950 A CN 201711161950A CN 107909440 A CN107909440 A CN 107909440A
Authority
CN
China
Prior art keywords
transaction
input
seller
buyer
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711161950.2A
Other languages
Chinese (zh)
Other versions
CN107909440B (en
Inventor
商建祥
王继武
张国华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN201711161950.2A priority Critical patent/CN107909440B/en
Publication of CN107909440A publication Critical patent/CN107909440A/en
Application granted granted Critical
Publication of CN107909440B publication Critical patent/CN107909440B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0609Buyer or seller confidence or verification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

This application provides the synchronous liquidation method of distributed general ledger system transaction and system, wherein, method includes:Seller terminal initiates to sell transaction to distributed general ledger system, wherein, selling transaction includes the first input and the first output;Distributed general ledger system sells whether transaction is legal, and transaction verification is legal, and record sells transaction if selling according to the first input validation;Buyer terminal is obtained from distributed general ledger system sells transaction, and initiates purchase-transaction to distributed general ledger system before deadline according to selling to merchandise, wherein, purchase-transaction includes the second input, the 3rd input, the seller exports and buyer's output;Whether distributed general ledger system is legal according to the second input and the 3rd input validation purchase-transaction, if purchase-transaction verification is legal, records purchase-transaction.The application can eliminate transaction risk, reduce transaction cost, expand distributed general ledger system application scenarios.

Description

A kind of distribution general ledger system transaction synchronization liquidation method and system
Technical field
The application belongs to distributed general ledger system regions, more particularly to a kind of synchronous clearance side of distributed general ledger system transaction Method and system.
Background technology
With Information Technology Development, assets digitrend is more and more common, including digital cash, digital ticket, numeral A variety of assets that can be used for transaction such as equity, digitally property right.Existing method of commerce includes:
1) rely on to concentrate with exchange and carry out, digital asset is hosted in exchange, and there is digital asset in exchange complete control System power.This mode existing defects, if exchange is attacked or network operator has fraud, digital asset may be by " stealing ".
2) take distributed general ledger transaction system to carry out transaction in assets, but third-party involvement is needed in process of exchange, one As freeze the transaction funds of buyer by third party first, after digital asset transfer, third party and buyer authorize jointly by Transaction funds pay seller.This mode, which still has, relies on third-party defect, and fund cannot clear in real time.Rely on Third party not only increases to transaction cost and risk, but also is difficult to obtain due to trusting third party so that many business scenarios exist There are obstacle for popularization practical.
The content of the invention
The application is used to solve in the prior art, and opponent's credit can not be guaranteed during direct dealing, be handed over using third party Yi Shi, there are the problem of authoritative third party is rare, and transaction cost is high.
In order to solve the above-mentioned technical problem, the technical solution of the application is same to provide a kind of distributed general ledger system transaction The method for walking clearance, including:
Seller terminal initiates to sell transaction to distributed general ledger system, wherein, selling transaction includes the first input and first Output, wherein, recorded seller's output and seller's ownership turn in the distributed general ledger system that the first input includes quoting Moving proves information, and the first output includes the digital asset of sale, has the ownership transfer condition of deadline and transaction to valency;
Whether distributed general ledger system is legal according to the sale transaction of the first input validation, if sale transaction verification is legal, Record sells transaction;
Buyer terminal is obtained from distributed general ledger system sells transaction, and merchandises according to selling before deadline to distribution Formula general ledger system initiates purchase-transaction, wherein, purchase-transaction includes the second input, the 3rd input, seller's output and buyer's output, Second input includes the first output quoted and buyer's ownership transfer proves information, and the distribution that the 3rd input includes quoting is total Recorded buyer output and buyer's ownership transfer prove information in account system, and seller's output includes transaction to valency and the seller Ownership transfer condition, buyer's output include digital asset and the buyer's ownership transfer condition sold;
Whether distributed general ledger system is legal according to the second input and the 3rd input validation purchase-transaction, if purchase-transaction is tested It is legal to demonstrate,prove, then records purchase-transaction.In another technical solution of the application, it is synchronous clear also to provide a kind of distributed general ledger system transaction The system of calculation, including:Seller terminal, buyer terminal and the distributed general ledger system based on block chain, the distribution general ledger system System includes multiple working nodes;The seller terminal is communicated to connect with the working node respectively with buyer terminal;
The seller terminal is used to initiate to sell transaction to distributed general ledger system, wherein, it is defeated that sale transaction includes first Enter and first exports, wherein, first inputs seller's output recorded in the distributed general ledger system for including quoting and the seller Ownership transfer proves information, and the first output includes the digital asset of sale, has the ownership of deadline and transaction to valency Jump condition;
Whether the distribution general ledger system is used for legal according to the sale transaction of the first input validation, if selling transaction verification Legal, then record sells transaction;
The buyer terminal, which is used to obtain from distributed general ledger system, sells transaction, and according to sale transaction in deadline Forward direction distribution general ledger system initiate purchase-transaction, wherein, purchase-transaction include second input, the 3rd input, the seller output and Buyer exports, and the second input includes the first output quoted and buyer's ownership transfer proves information, and the 3rd input includes quoting Distributed general ledger system in recorded buyer's output and buyer's ownership transfer prove information, seller's output includes merchandising To valency and seller's ownership transfer condition, buyer's output includes digital asset and the buyer's ownership transfer condition sold;
Whether the distribution general ledger system is additionally operable to legal according to the second input and the 3rd input validation purchase-transaction, if Purchase-transaction verification is legal, then records purchase-transaction.
The synchronous liquidation method of distributed general ledger system transaction and system provided by the application can realize following technology Effect.1. eliminate transaction risk:Due to being " collect on delivery, collect on delivery ", assets and currency ownership, or assets and assets institute Have the right synchronous transfer, credit risk is not present in process of exchange;2. transaction cost is low:In process of exchange without third-party involvement into Row freezing of funds, guarantee, signature, arbitration etc., transaction cost substantially reduces.3. expand distributed general ledger system application scenarios:When Due to can not realize " collect on delivery, collect on delivery ", generally requiring to introduce authoritative third party can just take preceding distribution general ledger system Transaction system is built out, it is invisible to improve the threshold for building transaction system since authority is third-party rare, limit applied field Scape, the application can build distributed general ledger system in the case of no third side, greatly expand application scenarios.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, required use in being described below to embodiment Attached drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this For the those of ordinary skill of field, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is the flow chart of the synchronous liquidation method of distributed general ledger system transaction of one embodiment of the application;
Fig. 2 is the flow chart of the synchronous liquidation method of distributed general ledger system transaction of another embodiment of the application;
Fig. 3 is that the flow chart of transaction is sold in the distributed general ledger system verification of one embodiment of the application;
Fig. 4 is that the distributed general ledger system of one embodiment of the application verifies the flow chart of purchase-transaction;
Fig. 5 is the flow chart of the distributed general ledger system verification revocation transaction of one embodiment of the application;
Fig. 6 is the structure chart of the synchronous system for settling account of distributed general ledger system transaction of one embodiment of the application.
Embodiment
In order to make the technical characterstic of the present invention and effect more obvious, technical scheme is done below in conjunction with the accompanying drawings Further illustrate, the present invention can also there are other different instantiations to be illustrated or implement, any those skilled in the art The equivalents done within the scope of the claims belong to the protection category of the present invention.
In the description of this specification, reference term " embodiment ", " specific embodiment ", " such as " etc. description meaning Refer at least one reality that the application is contained in reference to the embodiment or example particular features, structures, materials, or characteristics described Apply in example or example.In the present specification, schematic expression of the above terms is not necessarily referring to identical embodiment or shows Example.Moreover, particular features, structures, materials, or characteristics described can be in any one or more embodiments or example Combine in an appropriate manner.The step of involved in each embodiment, is sequentially used for the implementation for schematically illustrating the application, step therein Suddenly sequentially it is not construed as limiting, can appropriately adjusts as needed.
As shown in Figure 1, Fig. 1 is the flow chart of the synchronous liquidation method of distributed general ledger system transaction of the embodiment of the present application. The application can eliminate transaction risk, reduce transaction cost, expand distributed general ledger system application scenarios.It is specifically, distributed The synchronous liquidation method of general ledger transaction includes:
Step 101, seller terminal initiates to sell transaction to distributed general ledger system, wherein, it is defeated that sale transaction includes first Enter and first exports, first inputs seller's output recorded in the distributed general ledger system for including quoting and seller's ownership Transfer proves information, and the first output includes the digital asset of sale, has the ownership transfer bar of deadline and transaction to valency Part;Specifically, the seller's output quoted in the first input includes:The digital asset and seller's ownership transfer bar that the seller possesses Part, the digital asset that the seller possesses in seller's output of the reference sell the digital asset sold in transaction;
Step 102, whether distributed general ledger system is legal according to the sale transaction of the first input validation, if selling transaction verification Legal, then record sells transaction;
Step 103, buyer terminal is obtained from distributed general ledger system sells transaction, and buyer can weigh after obtaining sale transaction Under whether receive the sale transaction, if receive the sale transaction, according to sell transaction before deadline to distributed general ledger System initiates purchase-transaction, wherein, purchase-transaction includes the second input, the 3rd input, seller's output and buyer's output, and second is defeated Entering the first output including reference and buyer's ownership transfer proves information, and the 3rd input includes the distributed general ledger system quoted In recorded buyer's output and buyer's ownership transfer prove information, seller's output includes merchandising to valency and seller's ownership Jump condition, buyer's output include digital asset and the buyer's ownership transfer condition sold;Specifically, draw in the 3rd input Buyer's output includes:The digital asset and buyer's ownership transfer condition that buyer possesses, sell in buyer's output of the reference The digital asset of Fang Yongyou is to sell the digital asset sold in transaction;
Step 104, whether distributed general ledger system is legal according to the second input and the 3rd input validation purchase-transaction, if purchase It is legal to buy transaction verification, then records purchase-transaction.
The transfer of both parties' assets is completed after step 104, i.e., the digital asset that the seller sells is transferred to buyer, will bought The transaction just provided is transferred to the seller to valency.
Transaction described in the present embodiment includes but not limited to the digital asset type of valency and sale digital cash, digital ticket According to, digital equity, digitally property right etc. can be used for the assets of transaction, merchandises and belongs to different numbers to the digital asset of valency and sale Word Asset Type.
When it is implemented, distributed general ledger system can also receive and register capital to transaction to inject assets, it is special for one kind to register capital to transaction Different transaction, its input of merchandising is sky.
The present embodiment can realize the synchronous transfer of both parties' digital asset ownership in distributed general ledger system, i.e., " collect on delivery, collect on delivery ", and need not introduce third party in whole process of exchange and be assured, authorized or signed.Due to " collect on delivery, collect on delivery " is realized, without having to worry about the credit problems of counterparty, significantly reduces transaction risk;Hand over Easy process goes third party completely, can reduce transaction cost;Meanwhile the present embodiment can also be solved since authority is third-party rare And the problem of can not merchandising, greatly expand distributed general ledger systematic difference scene.Further, the present embodiment can also realize number The synchronous exchange of word assets, i.e., " bater ", such as digital ticket and digital share exchange.
In one embodiment of the application, as shown in Fig. 2, the synchronous liquidation method of distributed general ledger system transaction further includes:
Step 105, if distributed general ledger system did not received the purchase-transaction of buyer terminal initiation, the seller before deadline Terminal initiates revocation transaction after deadline to the distributed general ledger system, wherein, revocation transaction include the 4th input and The seller exports, and the 4th input includes the first output quoted and seller's ownership transfer proves information, and seller's output includes selling Digital asset and seller's ownership transfer condition;
Step 106, distributed general ledger system is cancelled according to the 4th input validation and merchandised, if revocation transaction verification is legal, Record revocation transaction.
Buyer can be ensured through this embodiment when not receiving to sell transaction, and the seller can withdraw the numeral money of sale Production, merchandises for use in next time.
In one embodiment of the application, seller's ownership transfer proves that information includes:The private key label to match with seller's public key Name.Buyer's ownership transfer proves that information includes:The private key signature to match with buyer's public key.With deadline and transaction pair The ownership transfer condition of valency includes:Private key signature with buyer's public key match, and buyer transaction are provided before deadline Export to merchandise to valency;Or offer and the private key signature of seller's public key match after deadline.Seller's ownership transfer bar Part includes:Private key signature with seller's public key match is provided.Buyer's ownership transfer condition includes:There is provided and buyer's public key match Private key signature.
When it is implemented, with deadline and ownership transfer condition, the seller's ownership transfer condition merchandised to valency And buyer's ownership transfer condition is realized with locking script.Seller's ownership transfer proves that information and buyer's ownership transfer prove Information is realized with unlock script.
Unlock script and lock the execution language based on storehouse that script uses reverse Polish notation.The following operation of setting Code:
DUP:Replicate stack top element;
HASH160:Stack top item carries out HASH twice, first with SHA-256, then uses RIPEMD-160;
EQUALVERIFY:If two numbers of input are equal, continue to execute, otherwise return to 0, and marker transactions are invalid;
CHECKSIG:The signature of exchange must be effective signature of cryptographic Hash and public key, no if true, return 1 Then return to 0;
IF:If stack top element is not 0, sentence will be performed;
ELSE:If IF or ELSE above is not carried out, this sentence will be performed;
ENDIF:Terminate IF, ELSE blocks;
GREATERTHAN:If Section 2 is more than stack top item, 1 is exported, otherwise exports 0;
OUT1:Take using the output 1 merchandised;
OUT1HASH:Take using 1 cryptographic Hash of output merchandised;
BLOCKTIME:Take the timestamp using the place block merchandised.
Assuming that the seller is A, buyer B, can set following constant during description:
<pubk_A>:The public key of A;
<pubk_B>:The public key of B;
<pubkhash_A>:The public key of A carries out the result of HASH160 computings;
<pubkhash_B>:The public key of B carries out the result of HASH160 computings;
<sig_A>:Result after the cryptographic Hash of transaction is signed using the private key of A;
<sig_B>:Result after the cryptographic Hash of transaction is signed using the private key of B;
<Txout1>:The transaction output that the initiator that merchandises sets;
<Txout1hash>:The cryptographic Hash for the transaction output that the initiator that merchandises sets;
<Txtime>:The transaction execution time time limit.
As shown in figure 3, in one embodiment of the application, whether distributed general ledger system sells transaction according to the first input validation Legal process includes:
Step 301, whether the seller's output for judging to quote in the first input is quoted by other transaction, if not merchandised by other Quote, then perform step 302, if being quoted by other transaction, it is illegal that transaction is sold in verification;
Step 302, the corresponding unlock script of the first input is performed, such as locking script is<sig_A><pubk_A>If should Unlock script does not report an error in the process of implementation, then performs step 303, if the unlock script reports an error in the process of implementation, verify It is illegal to sell transaction;
Step 303, perform the seller quoted in the first input and export corresponding locking script, such as unlock script is DUP HASH160<pubkhash_A>EQUALVERIFY CHECKSIG, if the locking script implementing result is true, verification, which is sold, hands over Easily legal, if the locking script implementing result is false, it is illegal that transaction is sold in verification.
As shown in figure 4, in one embodiment of the application, distributed general ledger system is purchased according to the second input and the 3rd input validation Buying transaction, whether legal process includes:
Step 401, whether the first output for judging to quote in the second input is quoted by other transaction, if not merchandised by other Quote, then perform step 402, if being quoted by other transaction, verification purchase-transaction is illegal;
Step 402, the corresponding unlock script of the second input is performed, such as the corresponding unlock script of the second input is<sig_B ><pubk_B>, B is buyer, if the unlock script does not report an error in the process of implementation, step 403 is performed, if the unlock script exists Report an error in implementation procedure, then verify that purchase-transaction is illegal;
Step 403, the corresponding locking script of the first output is performed, such as the corresponding locking script of the first output is BLOCKTIME<Txtime>GREATERTHAN IF DUP HASH160<pubkhash_A>EQUALVERIFY CHECKSIG ELSE OUT1<Txout1>EQUALVERIFY DUP HASH160<pubkhash_B>EQUALVERIFY CHECKSIG ENDIF;
Step 401', whether the buyer's output for judging to quote in the 3rd input is quoted by other transaction, if not handed over by other Easily quote, then perform step 402', if being quoted by other transaction, verification purchase-transaction is illegal;
Step 402', performs the corresponding unlock script of the 3rd input, such as the corresponding unlock script of the 3rd input is<sig_ B><pubk_B>, B is buyer, if the unlock script does not report an error in the process of implementation, step 403' is performed, if the unlock script Report an error in the process of implementation, then verify that purchase-transaction is illegal;
Step 403', the corresponding locking script of buyer's output quoted in the input of execution the 3rd, such as the buyer of reference are defeated It is DUP HASH160 to go out corresponding locking script<pubkhash_B>EQUALVERIFY CHECKSIG;
If step 403 and the locking script implementing result of step 403' are true, verification purchase-transaction is legal, if step One of them is false to the locking script implementing result of 403 and step 403', then verifies that purchase-transaction is illegal.
As shown in figure 5, in one embodiment of the application, whether distributed general ledger system merchandises according to the revocation of the 4th input validation Legal process includes:
Step 501, whether the first output for judging to quote in the 4th input has been quoted by other transaction, if not handed over by other Easily quote, then perform step 502, if being quoted by other transaction, verification revocation transaction is illegal;
Step 502, the corresponding unlock script of the 4th input is performed, for example, unlock script is<sig_A><pubk_A>If The unlock script does not report an error in the process of implementation, then performs step 503, if the decoding script reports an error in the process of implementation, test Card revocation transaction is illegal;
Step 503, the corresponding locking script of the first output is performed, if locking script implementing result is true, verification revocation It is legal to merchandise, if the locking script implementing result is false, verification revocation transaction is illegal.
In order to become apparent from explanation technical scheme, it is described in detail below with a specific embodiment, it is assumed that transaction Before beginning, owner A possesses digital asset a, and owner B possesses digital cash b, has in distributed general ledger system as follows Two transactions, and export unreferenced:
Merchandise X:
Input:******;
Output 1:
Assets information:Digital asset a;
Ownership transfer condition:Private key signature with the public key match of A is provided.Corresponding to locking script is:DUP HASH160 <pubkhash_A>EQUALVERIFY CHECKSIG。
Merchandise Y:
Input:******;
Output 1:
Assets information:Digital cash b;
Ownership transfer condition:Private key signature with the public key match of B is provided.Corresponding to locking script is:DUP HASH160 <pubkhash_B>EQUALVERIFY CHECKSIG。
Distributed general ledger system transaction synchronization liquidation method, which performs step, to be included:
1) A initiates transaction 1 (sell and merchandise) to distributed general ledger system, which is used for the digital asset a held B is transferred to, and sets jump condition, it is desirable to which B completes transaction before expiring, and payment transaction is to valency (i.e. digital cash b), transaction 1 represents as follows:
Transaction 1:
Input 1 (the first input):
Input is quoted:The output 1 of transaction X;
Ownership transfer proves:Matched private key signature is carried out with the public key of A.Corresponding to unlock script is:<sig_A>
<pubk_A>;
Output 1 (the first output):
Assets information:Digital asset a;
Ownership transfer condition:Specifying<Txtime>Before, there is provided the private key signature with the public key match of B,
And the output 1 (seller's output) for transaction of passing ownership is given content, it is worth and is<Txout1>;Or
<Txtime>Afterwards, there is provided the private key signature with the public key match of A.Corresponding to locking script is:
BLOCKTIME<Txtime>GREATERTHAN IF DUP HASH160<pubkhash_A>
EQUALVERIFY CHECKSIG ELSE OUT1<Txout1>EQUALVERIFY DUP HASH160< pubkhash_B>EQUALVERIFY CHECKSIG ENDIF。
Wherein,<Txtime>It it is the last trade time of A settings, B can initiate purchase-transaction to complete to provide before this Production exchanges, the recoverable digital asset a of A after this time;<Txout1>It is that the transaction of A settings exports the purchase friendship of 1, B initiations Output 1 must be worth for this in easily, and pair valency of content as this transaction for output of merchandising, and digital cash b are transferred to A under one's name.
It is selectable, herein in ownership transfer condition<Txout1>Can be its HASH value, advantage is to reduce transaction length Degree, and maintain secrecy before transaction does not complete to trade quotation, shortcoming is to need online lower and counterparty (i.e. buyer) to provide quotation. Specifically ownership transfer condition is:Specifying<Txtime>Before, there is provided the private key signature with the public key match of B, and shift institute Have the right seller's output of transaction is given content, and value is after hash<Txout1hash>;Or<Txtime>Afterwards, there is provided with A Public key match private key signature.Corresponding to locking script is:BLOCKTIME<Txtime>GREATERTHAN IF DUP HASH160<pubkhash_A>EQUALVERIFY CHECKSIG ELSE OUT1HASH<Txout1hash>EQUALVERIFY DUP HASH160<pubkhash_B>EQUALVERIFY CHECKSIG ENDIF。
Wherein,<Txtime>It it is the last trade time of A settings, B can initiate purchase-transaction to complete to provide before this Production exchanges, the recoverable digital asset a of A after this time;<Txout1hash>It is that the transaction of A settings exports 1 cryptographic Hash, B The cryptographic Hash of output 1 must be worth for this in the transaction 2 of initiation, and the content for output of merchandising is pair valency of this time transaction, and numeral Currency b is transferred to A under one's name.
It is selectable, herein command code OUT1 not only limit take using merchandise output 1, can with defining operation code OUT2, OUT3 ... use the output 2 merchandised, output 3 ... to take.
2) distributed general ledger system receives transaction 1, and transaction 1 is verified, if transaction 1 is legal, record transaction 1.
3) B knows that transaction 1 is confirmed by distributed general ledger system.
4) whether B balances receive transaction 1.
If 5) B determines to receive transaction 1, before deadline, B initiates the (purchase of transaction 2 to distributed general ledger system Transaction), distributed general ledger system verifies transaction 2, if verification is legal, record transaction 2.Complete to turn digital asset a Move to B, synchronous will merchandise is transferred to the digital cash b of valency A, and transaction 2 represents as follows:
Transaction 2:
Input 1 (the second input):
Input is quoted:The output 1 of transaction 1;
Ownership transfer proves:Matched private key signature is carried out with the public key of B.Corresponding to unlock script is:<sig_B>
<pubk_B>;
Input Y (the 3rd input):
Input is quoted:The output 1 of transaction Y;
Ownership transfer proves:Matched private key signature is carried out with the public key of B.Corresponding to unlock script is:<sig_B>
<pubk_B>;
Export 1 (seller's output):
Assets information:Digital cash b;
Ownership transfer condition:Private key signature with the public key match of A is provided.Corresponding to locking script is:DUP HASH160 <pubkhash_A>EQUALVERIFY CHECKSIG;
Export 2 (buyer's outputs):
Assets information:Digital asset a;
Ownership transfer condition:Private key signature with the public key match of B is provided.Corresponding to locking script is:DUP HASH160 <pubkhash_B>EQUALVERIFY CHECKSIG。
As described above, after the completion of transaction 2, A has digital cash b, B and has the institute of digital asset a, assets and currency Have the right synchronously to shift and complete.
6) after if deadline expires, the 5) step perform not successfully, then A initiates the (revocation of transaction 3 to distributed general ledger system Transaction), digital asset a is gone back to oneself.The expression of transaction 3 is as follows:
Transaction 3:
Input 1 (the 4th input):
Input is quoted:The output 1 of transaction 1;
Ownership transfer proves:Matched private key signature is carried out with the public key of A.Corresponding to unlock script is:<sig_A>
<pubk_A>;
Export 1 (seller's output):
Assets information:Digital asset a;
Ownership transfer condition:Private key signature with the public key match of A is provided.Corresponding to locking script is:DUP
HASH160<pubkhash_A>EQUALVERIFY CHECKSIG。
As it appears from the above, after transaction 3 is completed, A has digital asset a again, and transaction is cancelled.
As shown in fig. 6, Fig. 6 is the structure of the synchronous system for settling account of distributed general ledger system transaction of one embodiment of the application Figure.Therefore the implementation of the system may refer to the implementation of the above method, and overlaps will not be repeated.
Specifically, distributed general ledger system transaction synchronization system for settling account includes:
Seller terminal 601, buyer terminal 602 and the distributed general ledger system 603 based on block chain, the distribution general ledger System 603 includes multiple working nodes;Seller terminal 601 is communicated to connect with working node respectively with buyer terminal 603.Each work Node is in the different scope of organization, is, for example, the server of different bank, the server etc. of different exchange.
Seller terminal 601 is used to initiate to sell transaction to distributed general ledger system 603, wherein, selling transaction includes first Input and the first output, wherein, the recorded seller exports and sells in the distributed general ledger system that the first input includes quoting Square ownership transfer proves information, and the first output includes the digital asset of sale, there is deadline and transaction to own to valency Weigh jump condition;
Whether distributed general ledger system 603 is used for legal according to the sale transaction of the first input validation, if selling transaction verification Legal, then record sells transaction;
Buyer terminal 602, which is used to obtain from distributed general ledger system 603, sells transaction, and according to sale transaction when cut-off Between forward direction distribution general ledger system 603 initiate purchase-transaction, wherein, purchase-transaction include second input, the 3rd input, the seller it is defeated Go out and buyer output, second input include quote first output and buyer's ownership transfer prove information, the 3rd input include Recorded buyer output and buyer's ownership transfer prove information in the distributed general ledger system of reference, and seller's output includes Transaction includes digital asset and the buyer's ownership transfer condition sold to valency and seller's ownership transfer condition, buyer's output;
Whether distributed general ledger system 603 is additionally operable to legal according to the second input and the 3rd input validation purchase-transaction, if Purchase-transaction verification is legal, then records purchase-transaction.
The verification of distributed general ledger system sells the process of transaction and purchase-transaction referring to described in previous embodiment, herein no longer Repeat.
In one embodiment of the application, if distributed general ledger system 603 did not received buyer terminal 602 before deadline and initiates Purchase-transaction, then seller terminal 601 be additionally operable to after deadline to distributed general ledger system 603 initiate revocation transaction, its In, revocation transaction includes the 4th input and seller's output, and the 4th input includes the first output quoted and seller's ownership transfer Prove information, seller's output includes digital asset and the seller's ownership transfer condition sold;
Distributed general ledger system 603 is additionally operable to be cancelled according to the 4th input validation and merchandises, if revocation transaction verification is legal, Record revocation transaction.
The synchronous liquidation method of distributed general ledger system transaction and system provided by the application can realize following technology Effect.1. eliminate transaction risk:Due to being " collect on delivery, collect on delivery ", assets and currency ownership, or assets and assets institute Have the right synchronous transfer, credit risk is not present in process of exchange;2. transaction cost is low:In process of exchange without third-party involvement into Row freezing of funds, guarantee, signature, arbitration etc., transaction cost substantially reduces.3. expand distributed general ledger system application scenarios:When Due to can not realize " collect on delivery, collect on delivery ", generally requiring to introduce authoritative third party can just take preceding distribution general ledger system Transaction system is built out, it is invisible to improve the threshold for building transaction system since authority is third-party rare, limit applied field Scape, the application can build distributed general ledger system in the case of no third side, greatly expand application scenarios.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program Product.Therefore, the present invention can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.Moreover, the present invention can use the computer for wherein including computer usable program code in one or more The computer program production that usable storage medium is implemented on (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that it can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or square frame in journey and/or square frame and flowchart and/or the block diagram.These computer programs can be provided The processors of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that the instruction performed by computer or the processor of other programmable data processing devices, which produces, to be used in fact The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or The instruction performed on other programmable devices is provided and is used for realization in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a square frame or multiple square frames.
The above is merely to illustrate the technical solution of the application, any those of ordinary skill in the art can without prejudice to Under the spirit and scope of the present invention, above-described embodiment is modified and is changed.Therefore, the scope of the present invention should regard Subject to right.

Claims (10)

  1. A kind of 1. distribution general ledger system transaction synchronization liquidation method, it is characterised in that including:
    Seller terminal initiates to sell transaction to distributed general ledger system, wherein, selling transaction includes the first input and the first output, Wherein, recorded seller's output and seller's ownership transfer prove in the distributed general ledger system that the first input includes quoting Information, the first output include the digital asset of sale, have the ownership transfer condition of deadline and transaction to valency;
    Whether distributed general ledger system is legal according to the sale transaction of the first input validation, if sale transaction verification is legal, records Sell transaction;
    Buyer terminal is obtained from distributed general ledger system sells transaction, and merchandises according to selling before deadline to distributed total Account system initiates purchase-transaction, wherein, purchase-transaction includes the second input, the 3rd input, the seller exports and buyer's output, and second Input includes the first output quoted and buyer's ownership transfer proves information, and the 3rd input includes the distributed general ledger system quoted Recorded buyer output and buyer's ownership transfer prove information in system, and seller's output, which includes transaction, owns valency and the seller Jump condition is weighed, buyer's output includes digital asset and the buyer's ownership transfer condition sold;
    Whether distributed general ledger system is legal according to the second input and the 3rd input validation purchase-transaction, if purchase-transaction verification is closed Method, then record purchase-transaction.
  2. 2. the method as described in claim 1, it is characterised in that the seller's output quoted in the first input includes:The seller possesses Digital asset and seller's ownership transfer condition;
    The buyer's output quoted in 3rd input includes:The digital asset and buyer's ownership transfer condition that buyer possesses.
  3. 3. method as claimed in claim 2, it is characterised in that if distributed general ledger system did not received buyer before deadline The purchase-transaction that terminal is initiated, then the seller terminal initiate revocation to the distributed general ledger system after deadline and hand over Easily, wherein, revocation transaction includes the 4th input and seller's output, and the 4th input includes the first output quoted and seller's ownership Transfer proves information, and seller's output includes digital asset and the seller's ownership transfer condition sold;
    The distribution general ledger system is cancelled according to the 4th input validation merchandises, if revocation transaction verification is legal, record revocation Transaction.
  4. 4. method as claimed in claim 3, it is characterised in that seller's ownership transfer proves that information includes:With the seller The private key signature that public key matches;
    Buyer's ownership transfer proves that information includes:The private key signature to match with buyer's public key;
    It is described that the ownership transfer condition of valency is included with deadline and transaction:There is provided before deadline public with buyer The matched private key signature of key, and buyer transaction output is to merchandise to valency;Or provided and seller's public key match after deadline Private key signature;
    Seller's ownership transfer condition includes:Private key signature with seller's public key match is provided;
    Buyer's ownership transfer condition includes:Private key signature with buyer's public key match is provided.
  5. 5. method as claimed in claim 3, it is characterised in that described that there is the ownership transfer of deadline and transaction to valency Condition, seller's ownership transfer condition and buyer's ownership transfer condition are realized with locking script;
    Seller's ownership transfer proves that information and buyer's ownership transfer prove that information is realized with unlock script.
  6. 6. method as claimed in claim 5, it is characterised in that distributed general ledger system sells according to the first input validation and merchandises Whether legal process includes:
    Whether the seller's output for judging to quote in the first input is quoted by other transaction, if not quoted by other transaction, performs The corresponding unlock script of first input, if the unlock script does not report an error in the process of implementation, performs what is quoted in the first input The seller exports corresponding locking script, if the locking script implementing result is true, verifies that the sale transaction is legal.
  7. 7. method as claimed in claim 5, it is characterised in that distributed general ledger system is tested according to the second input and the 3rd input The whether legal process of card purchase-transaction includes:
    Whether the first output for judging to quote in the second input is quoted by other transaction, if not quoted by other transaction, performs The corresponding unlock script of second input, if the unlock script does not report an error in the process of implementation, performs the corresponding lock of the first output Determine script;
    Whether the buyer's output for judging to quote in the 3rd input is quoted by other transaction, if not quoted by other transaction, performs The corresponding unlock script of 3rd input, if the unlock script does not report an error in the process of implementation, performs what is quoted in the 3rd input Buyer exports corresponding locking script;
    If locking script implementing result is true, it is legal that transaction is sold in verification.
  8. 8. method as claimed in claim 5, it is characterised in that distributed general ledger system is cancelled according to the 4th input validation and merchandised Whether legal process includes:
    Whether the first output for judging to quote in the 4th input has been quoted by other transaction, if not quoted by other transaction, holds Row the 4th inputs corresponding unlock script, if the unlock script does not report an error in the process of implementation, it is corresponding to perform the first output Script is locked, if locking script implementing result is true, verification revocation transaction is legal.
  9. A kind of 9. distribution general ledger system transaction synchronization system for settling account, it is characterised in that including:Seller terminal, buyer terminal and Distributed general ledger system based on block chain, the distribution general ledger system include multiple working nodes;The seller terminal with Buyer terminal is communicated to connect with the working node respectively;
    The seller terminal be used for distributed general ledger system initiate sell transaction, wherein, sell transaction include first input and First output, wherein, recorded seller's output and the seller own in the distributed general ledger system that the first input includes quoting Power transfer proves information, and the first output includes the digital asset of sale, has the ownership transfer of deadline and transaction to valency Condition;
    Whether the distribution general ledger system is used for legal according to the sale transaction of the first input validation, is closed if selling transaction verification Method, then record, which is sold, merchandises;
    The buyer terminal be used for from distributed general ledger system obtain sell transaction, and according to sell transaction before deadline to Distributed general ledger system initiates purchase-transaction, wherein, purchase-transaction includes the second input, the 3rd input, seller's output and buyer Output, the second input includes the first output quoted and buyer's ownership transfer proves information, and the 3rd input includes point quoted Recorded buyer output and buyer's ownership transfer prove information in cloth general ledger system, and seller's output includes transaction to valency And seller's ownership transfer condition, buyer's output include digital asset and the buyer's ownership transfer condition sold;
    Whether the distribution general ledger system is additionally operable to legal according to the second input and the 3rd input validation purchase-transaction, if purchase Transaction verification is legal, then records purchase-transaction.
  10. 10. system as claimed in claim 9, it is characterised in that if the distribution general ledger system was not received before deadline The purchase-transaction initiated to buyer terminal, then the seller terminal be additionally operable to after deadline to the distributed general ledger system Initiate revocation transaction, wherein, revocation transaction include the 4th input and the seller output, the 4th input include reference first export and Seller's ownership transfer proves information, and seller's output includes digital asset and the seller's ownership transfer condition sold;
    The distribution general ledger system, which is additionally operable to be cancelled according to the 4th input validation, merchandises, if revocation transaction verification is legal, remembers Record revocation transaction.
CN201711161950.2A 2017-11-21 2017-11-21 Transaction synchronous clearing method and system for distributed general ledger system Active CN107909440B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711161950.2A CN107909440B (en) 2017-11-21 2017-11-21 Transaction synchronous clearing method and system for distributed general ledger system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711161950.2A CN107909440B (en) 2017-11-21 2017-11-21 Transaction synchronous clearing method and system for distributed general ledger system

Publications (2)

Publication Number Publication Date
CN107909440A true CN107909440A (en) 2018-04-13
CN107909440B CN107909440B (en) 2022-03-25

Family

ID=61846732

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711161950.2A Active CN107909440B (en) 2017-11-21 2017-11-21 Transaction synchronous clearing method and system for distributed general ledger system

Country Status (1)

Country Link
CN (1) CN107909440B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109242686A (en) * 2018-08-31 2019-01-18 深圳付贝科技有限公司 Transaction Recall voluntarily method digs mine machine and block catenary system
CN109359980A (en) * 2018-10-22 2019-02-19 成都凡特客科技有限公司 A kind of enterprise's equity online trading platform based on block chain technology
CN109658240A (en) * 2018-11-20 2019-04-19 深圳变设龙信息科技有限公司 A kind of data trade method, apparatus and terminal device based on block chain
CN109741169A (en) * 2018-12-14 2019-05-10 深圳壹账通智能科技有限公司 Liquidation method, system, computer equipment based on distributed account book
CN110555696A (en) * 2018-05-31 2019-12-10 厦门本能管家科技有限公司 asset issuing method, system and device based on block chain guarantee

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105427104A (en) * 2015-12-08 2016-03-23 布比(北京)网络技术有限公司 Method and method for handling digital assets by means of distributed general ledger
CN106504094A (en) * 2016-11-25 2017-03-15 中国银行股份有限公司 Transaction match method and system based on the distributed general ledger system of block chain technology

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105427104A (en) * 2015-12-08 2016-03-23 布比(北京)网络技术有限公司 Method and method for handling digital assets by means of distributed general ledger
CN106504094A (en) * 2016-11-25 2017-03-15 中国银行股份有限公司 Transaction match method and system based on the distributed general ledger system of block chain technology

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110555696A (en) * 2018-05-31 2019-12-10 厦门本能管家科技有限公司 asset issuing method, system and device based on block chain guarantee
CN109242686A (en) * 2018-08-31 2019-01-18 深圳付贝科技有限公司 Transaction Recall voluntarily method digs mine machine and block catenary system
CN109359980A (en) * 2018-10-22 2019-02-19 成都凡特客科技有限公司 A kind of enterprise's equity online trading platform based on block chain technology
CN109658240A (en) * 2018-11-20 2019-04-19 深圳变设龙信息科技有限公司 A kind of data trade method, apparatus and terminal device based on block chain
CN109741169A (en) * 2018-12-14 2019-05-10 深圳壹账通智能科技有限公司 Liquidation method, system, computer equipment based on distributed account book

Also Published As

Publication number Publication date
CN107909440B (en) 2022-03-25

Similar Documents

Publication Publication Date Title
CN106504094B (en) Transaction matching method and system of distributed general ledger system based on block chain technology
US11695578B2 (en) Systems and methods for storing and sharing transactional data using distributed computer systems
Asgaonkar et al. Solving the buyer and seller’s dilemma: A dual-deposit escrow smart contract for provably cheat-proof delivery and payment for a digital good without a trusted mediator
CN107909440A (en) A kind of distribution general ledger system transaction synchronization liquidation method and system
EP3776441B1 (en) Digital asset exchange
Bech et al. On the future of securities settlement
CN107679976A (en) A kind of auction system based on block chain
US20190139136A1 (en) Systems and methods for trading, clearing and settling securities transactions using blockchain technology
CN110192216B (en) Computer-implemented method and system
CN107844978A (en) A kind of staple commodities transaction processing method and system based on block chain
CN107248076A (en) A kind of core algorithm of the double-chain block chain the Internet model merchandised across chain
WO2018058108A1 (en) System and method of providing a multi-asset rebalancing mechanism
EP3326138A1 (en) Device, system, and method for transfer of commodities
KR20160132307A (en) Method and storage medium using cryptocurrency for money transfer
TW201935299A (en) Blockchain system, node server and method for processing strategy model scripts of financial assets
CZ287663B6 (en) Method of secured distribution of electronic money and apparatus for making the same
WO2020164738A1 (en) Method and system for settling a blockchain transaction
GB2578168A (en) Computer-implemented method and system for digital signing of transactions
CN110860090A (en) Game asset transaction method based on block chain
KR20210053774A (en) System and method for trading based on party trust using blockchain
CN113449340A (en) Stock house transaction fund supervision method and device based on alliance chain
Yutia et al. Blockchain-based Smart Contract for Decentralized Marketplace
WO2024039286A1 (en) A system and method for integrating a traditional financial exchange and an exchange on a blockchain
CN109224450B (en) Virtual house property game method, equipment and storage medium
Jansen Secure Arbitrage Trades between Centralized and Decentralized Exchanges

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant