Transaction method and device based on blockchain UTXO model
By creating the UTXO model's transaction public address on the main chain of the blockchain and conducting transaction accounting through the side chain accounting node, the problem that the FastPay solution in the Libra system cannot be applied to the UTXO model is solved, and the effect of fast and frequent transactions by users on the UTXO blockchain is achieved, and transaction efficiency and system security are improved.
Patent Information
- Application Number
- CN202110751940.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-02
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2041-07-02
AI Technical Summary
The FastPay solution in the current Libra system is based on the account model and cannot effectively apply the digital currency trading system of the UTXO model, resulting in the inability to realize fast and frequent transactions between users on the UTXO blockchain.
Create a UTXO model's transaction public address on the main chain of the blockchain, receive UTXO transaction requests sent by users, and conduct transaction accounting through the accounting nodes of the blockchain side chain, realizing the introduction and use of UTXO-FastPay transaction public address.
By introducing UTXO-FastPay transaction public address, the main and side chains can be connected, and fast and frequent transactions between users on the blockchain with UTXO as the transaction model are realized, greatly improving the efficiency of user transactions and ensuring the security of the system.
Smart Images

Figure CN113592644B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a transaction method and device based on a blockchain UTXO model. Background Art
[0002] The latest FastPay expansion plan has been proposed in Libra, a cross-border payment project led by Facebook, which can support efficient distributed accounting and greatly speed up transactions. The transaction processing volume per second (TPS) has reached 80,000, which has exceeded traditional settlement systems such as Visa or Mastercard. However, in the Libra system, the FastPay plan is based on the account model, while the current transaction model of some digital currencies is the UTXO (Unspent Transaction Outputs) model, which makes the current FastPay plan inapplicable in a comprehensive manner. Summary of the invention
[0003] In view of this, the embodiments of the present invention provide a transaction method and device based on the blockchain UTXO model, which can realize fast and frequent transactions between users on the blockchain with UTXO as the transaction model, greatly improving the efficiency of user transactions, ensuring the security of the system, establishing trust in the network, and ensuring the normal operation of the system.
[0004] To achieve the above objectives, according to one aspect of an embodiment of the present invention, a transaction method based on the blockchain UTXO model is provided.
[0005] A transaction method based on the blockchain UTXO model, comprising:
[0006] A transaction public address of the UTXO model is created on the main chain of the blockchain, and the transaction public address is used to store the UTXO transferred by the user;
[0007] Receive a UTXO transaction request from a user, where the transaction request is used to perform a transaction operation on the UTXO stored in the transaction public address;
[0008] Transaction accounting is performed through the accounting nodes of the blockchain side chain to carry out transaction operations.
[0009] Optionally, the transaction operation includes main chain amount transfer-in, transfer and main chain amount transfer-out.
[0010] Optionally, if the transaction operation is a transfer of the main chain amount, the transaction request includes the UTXO number, user identifier and transaction locking script transferred to the transaction public address, and the transaction locking script is used to lock the transaction operation on the transferred UTXO and includes a transaction unlocking condition;
[0011] Transaction accounting through the accounting nodes of the blockchain side chain includes:
[0012] The UTXO number and user ID are verified by the accounting node of the blockchain side chain, and the amount transferred by the user to the transaction public address is updated in the account book after the verification.
[0013] Optionally, if the transaction operation is a transfer, the transaction request includes a transfer amount, a recipient identifier, and a user signature;
[0014] Transaction accounting through the accounting nodes of the blockchain side chain includes:
[0015] The transfer amount and user signature are verified by the accounting node of the blockchain side chain, and the accounting node signature is returned to the user after the verification, so that the user generates a joint signature according to the accounting node signature when the transaction unlocking conditions are met, and sends the joint signature and the transfer amount to the recipient;
[0016] The joint signature verification request sent by the recipient is verified by the accounting node of the blockchain side chain, and the ledger record is updated after the verification is passed.
[0017] Optionally, verifying the transfer amount includes:
[0018] According to the transfer amount, verify whether the balance of the mapping account corresponding to the transaction public address generated on the side chain is sufficient.
[0019] Optionally, if the transaction operation is to transfer out the main chain amount, the transaction request includes the transfer amount, user address and user signature;
[0020] Transaction accounting through the accounting nodes of the blockchain side chain includes:
[0021] The transfer amount and user signature are verified by the accounting node of the blockchain side chain, and the accounting node signature is returned to the user after the verification, so that the user can generate a joint signature based on the accounting node signature when the transaction unlocking conditions are met, and update the ledger record after receiving the joint signature broadcast by the user.
[0022] Optionally, after updating the ledger record, it also includes:
[0023] The UTXO to be transferred out is selected from the transaction public address, and the UTXO to be transferred out is signed and sent to the user, so that the user constructs a transaction unlocking script according to the signature of the accounting node and performs an amount transfer transaction with the main chain.
[0024] Optionally, verifying the transfer amount includes:
[0025] According to the transfer amount, verify whether the balance of the mapping account corresponding to the transaction public address generated on the side chain is sufficient.
[0026] According to another aspect of an embodiment of the present invention, a transaction device based on a blockchain UTXO model is provided.
[0027] A transaction device based on a blockchain UTXO model, comprising:
[0028] A public address creation module is used to create a transaction public address of the UTXO model on the main chain of the blockchain, and the transaction public address is used to store the UTXO transferred by the user;
[0029] A request receiving module, used to receive a UTXO transaction request from a user, wherein the transaction request is used to perform a transaction operation on the UTXO stored in the transaction public address;
[0030] The transaction accounting module is used to perform transaction accounting through the accounting nodes of the blockchain side chain to carry out transaction operations.
[0031] Optionally, the transaction operation includes main chain amount transfer-in, transfer and main chain amount transfer-out.
[0032] Optionally, if the transaction operation is a transfer of the main chain amount, the transaction request includes the UTXO number, user identifier and transaction locking script transferred to the transaction public address, and the transaction locking script is used to lock the transaction operation on the transferred UTXO and includes a transaction unlocking condition;
[0033] The transaction accounting module is also used for:
[0034] The UTXO number and user ID are verified by the accounting node of the blockchain side chain, and the amount transferred by the user to the transaction public address is updated in the account book after the verification.
[0035] Optionally, if the transaction operation is a transfer, the transaction request includes a transfer amount, a recipient identifier, and a user signature;
[0036] The transaction accounting module is also used for:
[0037] The transfer amount and user signature are verified by the accounting node of the blockchain side chain, and the accounting node signature is returned to the user after the verification, so that the user can generate a joint signature based on the accounting node signature when the transaction unlocking conditions are met, and send the joint signature and transfer amount to the recipient;
[0038] The joint signature verification request sent by the recipient is verified by the accounting node of the blockchain side chain, and the ledger record is updated after the verification is passed.
[0039] Optionally, when verifying the transfer amount, the transaction accounting module is further used to:
[0040] According to the transfer amount, verify whether the balance of the mapping account corresponding to the transaction public address generated on the side chain is sufficient.
[0041] Optionally, if the transaction operation is to transfer out the main chain amount, the transaction request includes the transfer amount, user address and user signature;
[0042] The transaction accounting module is also used for:
[0043] The transfer amount and user signature are verified by the accounting node of the blockchain side chain, and the accounting node signature is returned to the user after the verification, so that the user can generate a joint signature based on the accounting node signature when the transaction unlocking conditions are met, and update the ledger record after receiving the joint signature broadcast by the user.
[0044] Optionally, after updating the account book record, the transaction accounting module is further used to:
[0045] The UTXO to be transferred out is selected from the transaction public address, and the UTXO to be transferred out is signed and sent to the user, so that the user constructs a transaction unlocking script according to the signature of the accounting node, and performs an amount transfer transaction with the main chain.
[0046] Optionally, when verifying the transfer amount, the transaction accounting module is further used to:
[0047] According to the transfer amount, verify whether the balance of the mapping account corresponding to the transaction public address generated on the side chain is sufficient.
[0048] According to another aspect of an embodiment of the present invention, a transaction electronic device based on the blockchain UTXO model is provided.
[0049] A transaction electronic device based on a blockchain UTXO model, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement a transaction method based on a blockchain UTXO model provided in an embodiment of the present invention.
[0050] According to still another aspect of the embodiments of the present invention, a computer readable medium is provided.
[0051] A computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the transaction method based on the blockchain UTXO model provided in an embodiment of the present invention is implemented.
[0052] An embodiment of the above invention has the following advantages or beneficial effects: by creating a transaction public address of the UTXO model on the main chain of the blockchain, the transaction public address is used to store the UTXO transferred by the user; receiving a UTXO transaction request sent by the user, the transaction request is used to perform a transaction operation on the UTXO stored in the transaction public address; performing transaction accounting through the accounting node of the blockchain side chain to perform transaction operations, and by introducing the UTXO-FastPay transaction public address on the blockchain main chain, the main and side chains can be connected, thereby realizing fast and frequent transactions between users on the blockchain with UTXO as the transaction model, greatly improving the efficiency of user transactions, and ensuring the security of the system, establishing trust in the network, and ensuring the normal operation of the system.
[0053] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0055] Figure 1 It is a schematic diagram of the main steps of the transaction method based on the blockchain UTXO model according to an embodiment of the present invention;
[0056] Figure 2 This is a schematic diagram of the main chain deposit principle of an embodiment of the present invention;
[0057] Figure 3 This is a schematic diagram of the side chain transaction principle of an embodiment of the present invention;
[0058] Figure 4 This is a schematic diagram of the main chain withdrawal principle of an embodiment of the present invention;
[0059] Figure 5 It is a schematic diagram of the main modules of a transaction device based on a blockchain UTXO model according to an embodiment of the present invention;
[0060] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0061] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0062] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0063] The FastPay system includes three roles: the main chain smart contract, the FastPay Committee, and the user (Sender). The FastPay Committee is composed of accounting nodes. The smart contract records the address of the accounting node, the user's FastPay address, and the deposit and withdrawal records. The user is the initiator / receiver of the transaction. In the Libra system, the FastPay solution is based on the account model, while the current transaction model of some digital currencies is the UTXO (Unspent Transaction Outputs) model, which makes the current FastPay solution not fully applicable.
[0064] In order to solve the above technical problems, the present invention provides a FastPay transaction solution based on the blockchain UTXO model. Using the idea of the FastPay solution in the Libra project, the main chain FastPay public address is introduced in the blockchain with UTXO as the transaction model, and the FastPay solution originally based on the account model is transferred to the UTXO model, thereby realizing fast and frequent transactions between users on the blockchain with UTXO as the transaction model, greatly improving the efficiency of user transactions.
[0065] The present invention discloses a transaction method based on the blockchain UTXO model, wherein the transaction includes two roles: the FastPay committee and the user, and the committee is composed of accounting nodes (also known as account keepers). The method mainly includes: main chain deposit (transferring funds into the main chain of the blockchain, the main chain refers to the officially launched, independently running blockchain network), the user transfers funds to the FastPay public address, and the accounting is performed through the accounting node; side chain (relative to the concept of the side chain, as long as the side chain protocol is followed, the blockchain anchored to a node on the main chain can be called a side chain) transaction, the user broadcasts the transfer request, the accounting node verifies the request and signs it, and generates a joint signature, and the recipient confirms the transfer; main chain withdrawal (transferring funds from the main chain), the user applies for withdrawal, the accounting node verifies the request and signs it, and generates a joint signature, the user selects the UTXO to be withdrawn from the available UTXO, and the accounting node updates the account book after verification.
[0066] Figure 1 Schematic diagram of the main steps of the transaction method based on the blockchain UTXO model according to an embodiment of the present invention. Figure 1 As shown, the transaction method based on the blockchain UTXO model of an embodiment of the present invention mainly includes the following steps S101 to S103.
[0067] Step S101: Create a transaction public address of the UTXO model on the main chain of the blockchain. The transaction public address is used to store the UTXO transferred by the user;
[0068] Step S102: receiving a UTXO transaction request from a user, where the transaction request is used to perform a transaction operation on the UTXO stored in the transaction public address;
[0069] Step S103: Transaction accounting is performed through the accounting node of the blockchain side chain to carry out transaction operations.
[0070] The present invention designs a UTXO-FastPay system, which fully draws on the design ideas of the original account-based FastPay solution, retains its high efficiency and supports the UTXO transaction model. The system includes two types of roles: users and UTXO-FastPay committees, and the committees are composed of accounting nodes. In order to meet the UTXO transaction model, a UTXO-FastPay transaction public address is created on the blockchain main chain. The UTXO-FastPay transaction public address is responsible for storing all UTXOs transferred by users to the main chain. The committee will save a UTXO pool to record all UTXOs deposited by users in the UTXO-FastPay transaction public address. The transfer transaction between the user and the public address is implemented using the M / N multi-signature (multi-signature technology is that multiple users sign a digital asset at the same time. It can be simply understood that multiple people have the right to sign and the right to pay for one account) script. Users use the UTXO-FastPay transaction public address to transfer transactions, and the committee maintains the ledger records.
[0071] According to an embodiment of the present invention, transaction operations mainly include main chain amount transfer-in, account transfer and main chain amount transfer-out.
[0072] According to another embodiment of the present invention, if the transaction operation is a transfer of the main chain amount, the transaction request includes the UTXO number of the transfer transaction public address, the user identifier and the transaction locking script, and the transaction locking script is used to lock the transaction operation on the transferred UTXO and includes the transaction unlocking condition;
[0073] Transaction accounting through the accounting nodes of the blockchain side chain can specifically include:
[0074] The UTXO number and user ID are verified by the accounting node of the blockchain side chain, and the amount transferred by the user to the transaction public address is updated in the ledger after the verification.
[0075] Figure 2 This is a schematic diagram of the main chain deposit principle of an embodiment of the present invention. In this embodiment of the present invention, it is assumed that the committee has a total of (3f+1) account keepers, of which there are at most f malicious account keepers. Figure 2 As shown, in one embodiment of the present invention, the implementation principle of main chain deposit (i.e., transferring funds to the main chain of the blockchain) is mainly as follows:
[0076] (1) The user specifies UTXO, transfers it to the FastPay transaction public address, and locks the transferred UTXO. When the unlocking conditions are met, the transaction operation of the transferred UTXO can be unlocked. The locking script of the deposit transaction is implemented using M / N multi-signatures, and the unlocking condition is set to two-thirds (2f+1) signatures of the number of bookkeepers to pass the verification. The locking script format is: 2f+1<Public Key 1><Public Key 2> ...<Public Key 3f><Public Key (3f+1)> 3f+1OP_CHECKMULTISIG, where Public Key N is the public key of the bookkeeper in the committee, where N=1, 2, …, (3f+1);
[0077] (2) The user sends the entry information to the committee, where the entry information includes the UTXO number specified by the user, the user identifier (for example, the user address or user public key in the blockchain), and the locking script;
[0078] (3) The account keeper verifies the user's account entry information, mainly verifying the user ID and UTXO number, and updates the amount deposited by the user into the FastPay transaction public address in the side chain's ledger.
[0079] According to yet another embodiment of the present invention, if the transaction operation is a transfer, the transaction request includes the transfer amount, the recipient identification, and the user signature;
[0080] The transaction accounting through the accounting node of the blockchain side chain specifically includes:
[0081] The transfer amount and user signature are verified through the accounting node of the blockchain side chain, and the accounting node signature is returned to the user after verification, so that the user can generate a joint signature based on the accounting node signature when the transaction unlocking conditions are met, and send the joint signature and transfer amount to the recipient;
[0082] The joint signature verification request sent by the recipient is verified through the accounting node of the blockchain side chain, and the ledger record is updated after the verification is passed.
[0083] According to another embodiment of the present invention, verifying the transfer amount includes:
[0084] According to the transfer amount, verify whether the balance of the mapping account corresponding to the transaction public address generated on the side chain is sufficient.
[0085] Figure 3 Schematic diagram of the side chain transaction principle of an embodiment of the present invention. In the embodiment of the present invention, it is assumed that the committee has a total of (3f+1) bookkeepers, of which there are at most f malicious bookkeepers. Figure 3 As shown, in one embodiment of the present invention, when a transfer transaction is required (for example, a user transfers funds to a recipient), the transfer transaction is implemented through side chain accounting, and the specific principle is as follows:
[0086] (1) The user broadcasts a transfer transaction request to the committee. The transfer information includes the transfer amount, the recipient's identifier (for example, the recipient's address in the blockchain or the recipient's public key), the user's signature, and other information;
[0087] (2) The account keeper receives the transfer information and verifies it, mainly verifying whether the user's signature is correct and whether the account has sufficient balance. The account refers to the mapping account generated on the side chain that corresponds to the public transaction address created by the user;
[0088] (3) The account holder signs and returns the transaction to the user after verification.
[0089] (4) After the user collects (2f+1) signatures, he / she will concatenate the received (2f+1) signatures into a joint signature and broadcast it to all bookkeepers again to facilitate updating the ledger;
[0090] (5) The user sends the transfer information and joint signature to the recipient so that the recipient can confirm the transfer;
[0091] (6) The recipient broadcasts the joint signature to all bookkeepers for verification of the joint signature;
[0092] (7) The account holder confirms that the transfer is successful and updates the account record.
[0093] According to another embodiment of the present invention, if the transaction operation is to transfer out the main chain amount, the transaction request includes the transfer amount, the user address and the user signature;
[0094] Transaction accounting through the accounting nodes of the blockchain side chain can specifically include:
[0095] The transfer amount and user signature are verified through the accounting node of the blockchain side chain, and the accounting node signature is returned to the user after the verification, so that the user can generate a joint signature based on the accounting node signature when the transaction unlocking conditions are met, and update the ledger record after receiving the joint signature broadcast by the user.
[0096] According to another embodiment of the present invention, after updating the account book record, the method further includes:
[0097] Select the UTXO to be transferred out from the transaction public address, sign the UTXO to be transferred out and send it to the user, so that the user can construct a transaction unlocking script based on the signature of the accounting node and conduct an amount transfer transaction with the main chain.
[0098] According to another embodiment of the present invention, verifying the transfer amount includes:
[0099] Based on the transfer amount, verify whether the balance of the mapping account corresponding to the transaction public address generated on the side chain is sufficient.
[0100] Figure 4 This is a schematic diagram of the main chain withdrawal principle of an embodiment of the present invention. In this embodiment of the present invention, it is assumed that the committee has a total of (3f+1) account keepers, of which there are at most f malicious account keepers. Figure 4 As shown, in one embodiment of the present invention, when a user needs to transfer out the amount in the main chain's transaction public address, the main chain amount needs to be transferred out, and its main implementation principle is as follows:
[0101] (1) The user broadcasts a withdrawal request to the committee, which includes information such as the amount to be transferred, the user's address, and the user's signature;
[0102] (2) The account keeper receives the withdrawal request and verifies it, mainly verifying whether the user's signature is correct and whether the mapping account balance generated on the side chain corresponding to the transaction public address created by the user is sufficient;
[0103] (3) After verification, the account holder signs and sends it to the user;
[0104] (4) After the user collects (2f+1) signatures, he / she concatenates them to generate a joint signature and broadcasts the joint signature to the account keeper again;
[0105] (5) The bookkeeper updates the ledger;
[0106] (6) The account holder queries all the latest available UTXOs in the FastPay transaction public address and selects the UTXO to be withdrawn;
[0107] (7) The account keeper signs the UTXO number to be withdrawn and sends it to the user;
[0108] (8) The user constructs an unlocking script based on the signatures of the (2f+1) bookkeepers required when the unlocking conditions are met, and generates withdrawal transaction information, including: user address, UTXO number, unlocking script and the public transaction address created by the user, and then sends the withdrawal transaction information to the main chain to initiate a withdrawal transaction (the unlocking script is the signature of the (2f+1) bookkeepers on the transfer transaction using their private keys).
[0109] The present invention does not require consensus between accounting nodes for transaction verification, but adopts the Byzantine fault-tolerant consensus mechanism. Assuming that there are a total of (3f+1) account keepers in the system, of which there are at most f malicious account keepers, that is, as long as (2f+1) account keepers are honest, the system can prevent attacks such as "double spending" and "forking". This simple rule ensures the security of the system, establishes trust in the network, and ensures the normal operation of the system. Among them, "double spending" and "forking" refer to the repeatable operation of a sum of funds.
[0110] Figure 5 Schematic diagram of the main modules of a transaction device based on the blockchain UTXO model according to an embodiment of the present invention. Figure 5 As shown, the transaction device 500 based on the blockchain UTXO model of an embodiment of the present invention mainly includes a public address creation module 501, a request receiving module 502 and a transaction accounting module 503.
[0111] A public address creation module 501 is used to create a transaction public address of the UTXO model on the main chain of the blockchain, and the transaction public address is used to store the UTXO transferred by the user;
[0112] A request receiving module 502 is used to receive a UTXO transaction request sent by a user, wherein the transaction request is used to perform a transaction operation on the UTXO stored in the transaction public address;
[0113] The transaction accounting module 503 is used to perform transaction accounting through the accounting node of the blockchain side chain to perform transaction operations.
[0114] According to one embodiment of the present invention, the transaction operation includes main chain amount transfer-in, account transfer and main chain amount transfer-out.
[0115] According to another embodiment of the present invention, if the transaction operation is a transfer of the main chain amount, the transaction request includes the UTXO number, user identifier and transaction locking script transferred to the transaction public address, and the transaction locking script is used to lock the transaction operation on the transferred UTXO and includes a transaction unlocking condition;
[0116] The transaction accounting module 503 can also be used to:
[0117] The UTXO number and user ID are verified by the accounting node of the blockchain side chain, and the amount transferred by the user to the transaction public address is updated in the account book after the verification.
[0118] According to yet another embodiment of the present invention, if the transaction operation is a transfer, the transaction request includes a transfer amount, a recipient identifier, and a user signature;
[0119] The transaction accounting module 503 can also be used to:
[0120] The transfer amount and user signature are verified by the accounting node of the blockchain side chain, and the accounting node signature is returned to the user after the verification, so that the user can generate a joint signature based on the accounting node signature when the transaction unlocking conditions are met, and send the joint signature and transfer amount to the recipient;
[0121] The joint signature verification request sent by the recipient is verified by the accounting node of the blockchain side chain, and the ledger record is updated after the verification is passed.
[0122] According to another embodiment of the present invention, when verifying the transfer amount, the transaction accounting module 503 may also be used to:
[0123] According to the transfer amount, verify whether the balance of the mapping account corresponding to the transaction public address generated on the side chain is sufficient.
[0124] According to another embodiment of the present invention, if the transaction operation is to transfer out the main chain amount, the transaction request includes the transfer amount, the user address and the user signature;
[0125] The transaction accounting module 503 can also be used to:
[0126] The transfer amount and user signature are verified by the accounting node of the blockchain side chain, and the accounting node signature is returned to the user after the verification, so that the user can generate a joint signature based on the accounting node signature when the transaction unlocking conditions are met, and update the ledger record after receiving the joint signature broadcast by the user.
[0127] According to another embodiment of the present invention, after updating the account book record, the transaction accounting module 503 may also be used to:
[0128] The UTXO to be transferred out is selected from the transaction public address, and the UTXO to be transferred out is signed and sent to the user, so that the user constructs a transaction unlocking script according to the signature of the accounting node, and performs an amount transfer transaction with the main chain.
[0129] According to another embodiment of the present invention, the transaction accounting module 503 can also be used to:
[0130] According to the transfer amount, verify whether the balance of the mapping account corresponding to the transaction public address generated on the side chain is sufficient.
[0131] According to the technical solution of the embodiment of the present invention, a transaction public address of the UTXO model is created on the main chain of the blockchain, and the transaction public address is used to store the UTXO transferred by the user; a UTXO transaction request sent by the user is received, and the transaction request is used to perform a transaction operation on the UTXO stored in the transaction public address; transaction accounting is performed through the accounting node of the blockchain side chain to perform transaction operations, and the UTXO-FastPay transaction public address is introduced on the main chain of the blockchain, so that the main chain and the side chain can be connected, thereby realizing fast and frequent transactions between users on the blockchain with UTXO as the transaction model, greatly improving the efficiency of user transactions, ensuring the security of the system, establishing trust in the network, and ensuring the normal operation of the system.
[0132] Figure 6 An exemplary system architecture 600 is shown to which a transaction method based on a blockchain UTXO model or a transaction device based on a blockchain UTXO model according to an embodiment of the present invention can be applied.
[0133] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0134] The user can use the terminal devices 601, 602, 603 to interact with the server 605 through the network 604 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 601, 602, 603, such as banking applications, digital currency applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0135] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0136] Server 605 may be a server that provides various services, such as a background management server that provides support for transaction requests sent by users using terminal devices 601, 602, and 603 (for example only). The background management server may create a transaction public address of the UTXO model on the main chain of the blockchain for the received transaction request and other data, and the transaction public address is used to store the UTXO transferred by the user; receive the UTXO transaction request sent by the user, and the transaction request is used to perform transaction operations on the UTXO stored in the transaction public address; perform transaction accounting through the accounting node of the blockchain side chain to perform transaction operations and other processing, and feedback the processing results (such as transaction operation results - for example only) to the terminal device.
[0137] It should be noted that the transaction method based on the blockchain UTXO model provided in the embodiment of the present invention is generally executed by the server 605, and accordingly, the transaction device based on the blockchain UTXO model is generally set in the server 605.
[0138] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0139] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device or a server suitable for implementing an embodiment of the present invention. Figure 7 The terminal device or server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0140] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0141] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0142] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.
[0143] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0144] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0145] The units or modules involved in the embodiments of the present invention may be implemented in software or hardware. The units or modules described may also be provided in a processor, for example, may be described as: a processor including a public address creation module, a request receiving module, and a transaction accounting module. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves, for example, the public address creation module may also be described as a "module for creating a transaction public address of a UTXO model on the main chain of the blockchain".
[0146] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: creating a transaction public address of the UTXO model on the main chain of the blockchain, and the transaction public address is used to store the UTXO transferred by the user; receiving a UTXO transaction request sent by the user, and the transaction request is used to perform a transaction operation on the UTXO stored in the transaction public address; and performing transaction accounting through the accounting node of the blockchain side chain to perform transaction operations.
[0147] According to the technical solution of the embodiment of the present invention, a transaction public address of the UTXO model is created on the main chain of the blockchain, and the transaction public address is used to store the UTXO transferred by the user; a UTXO transaction request sent by the user is received, and the transaction request is used to perform a transaction operation on the UTXO stored in the transaction public address; transaction accounting is performed through the accounting node of the blockchain side chain to perform transaction operations, and the UTXO-FastPay transaction public address is introduced on the main chain of the blockchain, so that the main chain and the side chain can be connected, thereby realizing fast and frequent transactions between users on the blockchain with UTXO as the transaction model, greatly improving the efficiency of user transactions, ensuring the security of the system, establishing trust in the network, and ensuring the normal operation of the system.
[0148] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A transaction method based on the blockchain UTXO model, characterized in that: The blockchain is composed of a main chain and a side chain, and the transaction method includes: A transaction public address of the UTXO model is created on the main chain of the blockchain. The transaction public address is used to store all UTXOs transferred by users to the main chain. The committee saves a UTXO pool to record the UTXOs deposited by all users into the transaction public address. Receive a UTXO transaction request from a user, where the transaction request is used to perform a transaction operation on the UTXO stored in the transaction public address; the transaction operation between the user and the transaction public address is implemented using M / N multi-signature technology; Transaction accounting is performed through the accounting nodes of the blockchain side chain to carry out transaction operations; Wherein, if the transaction operation is a transfer of the main chain amount, the transaction request includes the UTXO number, user identification and transaction locking script transferred to the transaction public address, and the transaction locking script is used to lock the transaction operation on the transferred UTXO and includes the transaction unlocking condition; the transaction accounting through the accounting node of the blockchain side chain includes: verifying the UTXO number and user identification through the accounting node of the blockchain side chain, and updating the amount transferred by the user to the transaction public address in the account book after the verification is passed; If the transaction operation is a transfer, the transaction request includes the transfer amount, the recipient's identifier and the user's signature; the transaction accounting through the accounting node of the blockchain side chain includes: verifying the transfer amount and the user's signature through the accounting node of the blockchain side chain, and returning the accounting node signature to the user after the verification is passed, so that the user generates a joint signature according to the accounting node signature when the transaction unlocking condition is met, and sends the joint signature and the transfer amount to the recipient; verifying the joint signature verification request sent by the recipient through the accounting node of the blockchain side chain, and updating the account book record after the verification is passed; If the transaction operation is an outgoing transfer of the main chain amount, the transaction request includes the outgoing amount, the user address and the user signature; the transaction accounting through the accounting node of the blockchain side chain includes: verifying the outgoing amount and the user signature through the accounting node of the blockchain side chain, and returning the accounting node signature to the user after the verification, so that the user generates a joint signature according to the accounting node signature when the transaction unlocking conditions are met, and updates the account book record after receiving the joint signature broadcast by the user.
2. The transaction method according to claim 1, characterized in that: The transaction operations include main chain amount transfer in, transfer and main chain amount transfer out.
3. The transaction method according to claim 1, characterized in that: Verifying the transfer amount includes: According to the transfer amount, verify whether the balance of the mapping account corresponding to the transaction public address generated on the side chain is sufficient.
4. The transaction method according to claim 1, characterized in that: If the transaction operation is to transfer out the main chain amount, after updating the ledger record, it also includes: The UTXO to be transferred out is selected from the transaction public address, and the UTXO to be transferred out is signed and sent to the user, so that the user constructs a transaction unlocking script according to the signature of the accounting node, and performs an amount transfer transaction with the main chain.
5. The transaction method according to claim 1, characterized in that: Verification of the transfer amount includes: According to the transfer amount, verify whether the balance of the mapping account corresponding to the transaction public address generated on the side chain is sufficient.
6. A transaction device based on the blockchain UTXO model, characterized in that: The blockchain is composed of a main chain and a side chain, and the transaction device includes: The public address creation module is used to create a transaction public address of the UTXO model on the main chain of the blockchain. The transaction public address is used to store all UTXOs transferred by users to the main chain. The committee saves a UTXO pool to record the UTXOs deposited by all users into the transaction public address; A request receiving module, used to receive a UTXO transaction request from a user, wherein the transaction request is used to perform a transaction operation on the UTXO stored in the transaction public address; the transaction operation between the user and the transaction public address is implemented using M / N multi-signature technology; The transaction accounting module is used to record transactions through the accounting nodes of the blockchain side chain to perform transaction operations; Wherein, if the transaction operation is a transfer of the main chain amount, the transaction request includes the UTXO number, user identification and transaction locking script transferred to the transaction public address, and the transaction locking script is used to lock the transaction operation of the transferred UTXO and includes the transaction unlocking condition; the transaction accounting module is also used to: verify the UTXO number and user identification through the accounting node of the blockchain side chain, and update the amount transferred by the user to the transaction public address in the account book after the verification is passed; If the transaction operation is a transfer, the transaction request includes the transfer amount, the recipient's identifier and the user's signature; the transaction accounting module is also used to: verify the transfer amount and the user's signature through the accounting node of the blockchain side chain, and return the accounting node signature to the user after the verification is passed, so that the user generates a joint signature according to the accounting node signature when the transaction unlocking condition is met, and sends the joint signature and the transfer amount to the recipient; verify the joint signature verification request sent by the recipient through the accounting node of the blockchain side chain, and update the account book record after the verification is passed; If the transaction operation is an outgoing transfer of the main chain amount, the transaction request includes the outgoing amount, the user address and the user signature; the transaction accounting module is also used to: verify the outgoing amount and the user signature through the accounting node of the blockchain side chain, and return the accounting node signature to the user after the verification, so that the user can generate a joint signature according to the accounting node signature when the transaction unlocking conditions are met, and update the account book record after receiving the joint signature broadcast by the user.
7. A transaction electronic device based on the blockchain UTXO model, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Transfer flow based on a block chain main chain and multiple parallel sub-chains
CN109493050A
Main chain and side chain data exchange method and device
CN111585767A
Transaction creation method and verification method of blockchain system, and transaction device
CN112561701A