A refund method, system and computer-readable storage medium based on blockchain
By establishing a communication channel between the payer and the payee in blockchain payment, processing transaction verification and refund broadcast, the problem of double spending of the payee is solved, and transaction security and refund evidence are guaranteed.
Patent Information
- Application Number
- CN202210161632.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-22
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-02-22
AI Technical Summary
During the blockchain payment process, the payee may spend both money, resulting in the payment party's rights and interests being unable to be protected and there is a lack of effective legal evidence when the refund is not successful.
A communication channel is established between the payee SPV wallet and the payee SPV wallet, and a pre-built payment template is sent. The payee fills in UTXO and signs to generate the first transaction. If the verification fails, a second transaction is constructed, broadcast to the full node, and adjusts the transaction status according to the preset state judgment strategy, and stores the signature part of the second transaction for rights protection.
Effectively prevent the recipient from spending money on both expenses, ensure the safety of the transaction, promptly judge the payment and refund status, and provide legal evidence when the refund is not successful to protect the rights and interests of the payer.
Smart Images

Figure CN114565377B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a refund method, system and computer-readable storage medium based on blockchain. Background Art
[0002] With the development of science and technology, more and more people choose to shop online, which is not only convenient for consumers, but also can expand the business scale of merchants. Payment is currently the core link that both parties of the transaction are very concerned about, especially the rapid development of global commercial finance, which cannot be separated from the support of payment. The emergence of blockchain technology has brought new ideas to solve the pain points of the payment industry. Blockchain is a very impactful and revolutionary Internet technology developed in the past decade. It can be used to build a self-operating social trust network that does not rely on a third party, and promote the value interconnection of the entire society. Blockchain technology uses encrypted chain block structure to verify and store data, uses distributed node consensus algorithm to generate and update data, and uses automated script code (smart contract) to program and operate data. It is a new decentralized infrastructure and distributed computing paradigm. Blockchain has the characteristics of decentralization, immutability, traceability, and verifiability.
[0003] In the blockchain payment process, the payer pays the payee. If the constructed transaction fails to pass the verification of the payee, for example, the payee does not accept UTXO transactions with certain characteristics (UTXO is the abbreviation of unspent transaction outputs, which refers to unspent transaction outputs), the payee is required to return the amount paid by the payee to the payee. However, in the prior art, the payee often double-spends (the payee double-spends refers to the payee informing the payee that the transaction is not accepted after the verification transaction fails, but the payee secretly broadcasts the transaction later and takes the amount paid by the payee without refunding it), making it impossible to protect the rights and interests of the payee.
[0004] Therefore, in scenarios where a refund is required, how to complete the refund of the transaction while preventing the recipient from double-spending, and at the same time retain the recipient's evidence of the refund operation when the refund is unsuccessful, to ensure the security of the refund, has become an important research direction for blockchain payments and a technical problem that needs to be urgently solved by technicians in this field. Summary of the invention
[0005] In view of the technical problems in the prior art, the present invention provides a refund method, system and computer-readable storage medium based on blockchain.
[0006] The blockchain-based refund method provided by the present invention includes:
[0007] The payee's SPV wallet establishes a communication channel with the payer's SPV wallet;
[0008] The payee's SPV wallet sends the pre-built payment template to the payee's SPV wallet through the communication channel;
[0009] The payer's SPV wallet fills the UTXO as the transaction input into the payment template and signs it, generates a first transaction, sends the first transaction to the payee's SPV wallet through the communication channel, and the payer's SPV wallet sets the status of the UTXO filled into the payment template to used;
[0010] The payee's SPV wallet verifies the first transaction. If the verification fails, a second transaction is constructed based on the first transaction, and the first transaction and the second transaction are sent to the payer's SPV wallet through the communication channel.
[0011] The payer's SPV wallet broadcasts the first transaction and the second transaction to the full node, and determines the payment and refund status according to a preset status judgment strategy, adjusts the transaction input of the first transaction and / or the transaction output status of the second transaction according to the payment and refund status, and stores the signature part in the second transaction when it is determined that the payment and refund status is successful but the refund is unsuccessful.
[0012] Furthermore, the communication channel is short-distance communication or point-to-point communication based on the Internet.
[0013] Furthermore, the short-distance communication is NFC, Bluetooth or WIFI, and the point-to-point communication is http or socket.
[0014] Furthermore, according to the preset status judgment strategy, judging the payment and refund status includes:
[0015] If the first transaction and the second transaction are not included in the block, it is determined that the payment is unsuccessful;
[0016] If the first transaction is included in the block and the second transaction is not included in the block, the payment is considered successful but the refund is unsuccessful;
[0017] If the first transaction and the second transaction are included in the block, the payment is determined to be successful and the refund is successful.
[0018] Further, adjusting the transaction input of the first transaction and / or the transaction output of the second transaction according to the payment and refund status includes:
[0019] If the payment and refund status is payment unsuccessful, the status of the transaction input of the first transaction is set to unused;
[0020] If the payment and refund status is payment successful but refund unsuccessful, the status of the transaction input of the first transaction is set to refunding;
[0021] If the payment and refund status is payment successful and refund successful, the status of the transaction input of the first transaction is set to used, and the status of the transaction output of the second transaction is set to unused.
[0022] Furthermore, if the payer SPV is provided with a display, after judging the payment and refund status according to the preset status judgment strategy, it also includes:
[0023] If the payment and refund status is payment unsuccessful, the payer's SPV wallet will display "payment unsuccessful";
[0024] If the payment and refund status is payment successful but refund unsuccessful, the payer's SPV wallet will display "Refund in Progress";
[0025] If the payment and refund status is payment successful and refund successful, the payer's SPV wallet will display "Refund successful".
[0026] Furthermore, the method also includes: the SPV wallet of the payee pre-builds a payment template, the payment template is a transaction containing necessary payment information, and the necessary payment information includes the payment amount and the unlocking script.
[0027] Further, constructing the second transaction based on the first transaction includes:
[0028] The second transaction is constructed by using the transaction output of the first transaction as the transaction input of the second transaction and the payee as the script opener of the transaction output of the second transaction.
[0029] The present invention also provides a blockchain-based refund system, which adopts the above-mentioned blockchain-based refund method to achieve refund.
[0030] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned blockchain-based refund method is implemented.
[0031] The blockchain-based refund method, system, and computer-readable storage medium provided by the present invention have at least the following beneficial effects:
[0032] (1) When the two parties conduct a transaction, the payee's SPV wallet establishes a communication channel with the payee's SPV wallet; the payee's SPV wallet sends the pre-built payment template to the payee's SPV wallet through the communication channel; the payee's SPV wallet fills the UTXO as the transaction input into the payment template and signs it to generate a first transaction, which is sent to the payee's SPV wallet through the communication channel, and the payee's SPV wallet sets the status of the UTXO filled into the payment template to used, and by "the payee's SPV wallet verifies the first transaction, and if the verification fails, constructs a second transaction based on the first transaction, and sends the first transaction and the second transaction to the payee's SPV wallet; the payee's SPV wallet broadcasts the first transaction and the second transaction to the full node, determines the payment and refund status according to the preset status judgment strategy, and adjusts the status of the transaction input of the first transaction and / or the transaction output of the second transaction according to the payment and refund status", the payee's SPV wallet can receive the refund in real time and can promptly determine the current payment and refund status, effectively preventing the payee from double-spending and ensuring transaction security.
[0033] (2) When the payment and refund status is determined to be payment successful but refund unsuccessful, the signature portion of the second transaction (i.e., the signature of the payee) is stored as legal evidence. When the refund is unsuccessful, it provides the payer with evidence for rights protection. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1 This is a flowchart of a refund method based on blockchain according to an embodiment of the present invention;
[0036] Figure 2 It is a simple payment model in an embodiment of the present invention;
[0037] Figure 3 The figure is a structural diagram of a terminal device in an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the accompanying drawings in the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.
[0039] In one embodiment of the present invention, a blockchain-based refund method is provided.
[0040] like Figure 1 As shown, the blockchain-based refund method provided in this embodiment includes the following steps:
[0041] Step S10: The payee's SPV wallet establishes a communication channel with the payer's SPV wallet.
[0042] Among them, SPV is also called "light node" or "user node", which is used to store public and private keys, block headers, Merkle proofs, UTXO and other information related to users, and has certain capabilities of constructing and forwarding transactions. UTXO (Unspent Transaction Output) is the unspent transaction output.
[0043] In this step, the payee's SPV wallet establishes a communication channel with the payer's SPV wallet. Specifically, the communication channel can be short-distance communication or point-to-point communication based on the Internet. More specifically, the short-distance communication is NFC, Bluetooth or WIFI, and the point-to-point communication is http or socket. This embodiment does not limit the communication method. During the transaction, a suitable communication method can be selected according to actual needs.
[0044] Step S20: The payee's SPV wallet sends the pre-built payment template to the payer's SPV wallet through the communication channel.
[0045] That is, the blockchain-based refund method provided by the present invention, before step S20, the method also includes the SPV wallet of the payee pre-building a payment template, specifically, the payment template is a transaction containing necessary payment information, and the necessary payment information includes the payment amount and the unlocking script.
[0046] Step S30: The payer's SPV wallet fills the UTXO as the transaction input into the payment template and signs it to generate a first transaction, sends the first transaction to the payee's SPV wallet through the communication channel, and the payer's SPV wallet sets the status of the UTXO filled into the payment template to used.
[0047] Signature refers to a digital signature (also known as a public key digital signature), which is a string of numbers that can only be generated by the sender of the information and cannot be forged by others. This string of numbers is also an effective proof of the authenticity of the information sent by the sender. It is a method for authenticating digital information, similar to an ordinary physical signature written on paper, but it is implemented using technology in the field of public key encryption. Digital signatures have legal effect.
[0048] Specifically, during the SPV wallet payment process, the SPV wallet can manage all the available UTXOs of the user, mainly the UTXO usage pool. If the UTXO is available, it will be added to the "unused" pool; if the UTXO has been used, it will be added to the "used" pool; if the UTXO is being refunded, it will be added to the "refunding" pool. In this step, the payer's SPV wallet sets the status of the UTXO filled in the payment template to used, that is, the UTXO is added to the "used" pool.
[0049] In this step, the payer's SPV wallet fills the UTXO it owns into the first transaction as transaction input, then the UTXO is considered to have been used, and the UTXO is placed from the "unused" pool to the "used" pool.
[0050] Step S40: The payee's SPV wallet verifies the first transaction. If the verification fails, a second transaction is constructed based on the first transaction, and the first transaction and the second transaction are sent to the payer's SPV wallet through the communication channel.
[0051] Specifically, the SPV wallet of the payee verifies the first transaction, which means that the SPV wallet of the payee verifies the signature, verifies whether the UTXO filled in by the payer is legal, and verifies whether the UTXO filled in by the payer is blacklisted.
[0052] Whether the verification is successful or not is determined by the objective technical reasons mentioned above, such as whether the UTXO is complete, whether the signature is correct, etc.; there are also subjective reasons such as receiving a refund instruction from the payee, for example, the payee has paid but wants to return the goods, in which case the payee can click "Refund" in the SPV wallet; or the payee simply does not want the UTXO, so he clicks "Refund" in the SPV wallet, etc. Figure 2 As shown in the figure, a simple payment model is established. The payer's SPV wallet establishes point-to-point communication with the payee's SPV wallet. The payee's SPV wallet provides a transaction template (i.e., the payment template in this solution) filled in by the payer and sent to the payee. After the payee verifies it, the payee broadcasts it to complete the transaction.
[0053] In the process of the payer paying the payee, if the constructed first transaction fails to pass the payee verification (for example, the payee does not accept transactions with UTXOs with certain characteristics), a refund is required.
[0054] Specifically, the refund process of the payee's SPV wallet is: construct a second transaction based on the first transaction, and send the first transaction and the second transaction to the payer's SPV wallet through the communication channel.
[0055] Among them, constructing the second transaction based on the first transaction includes: using the transaction output of the first transaction as the transaction input of the second transaction, and the payer as the script opener of the transaction output of the second transaction to construct the second transaction. At the same time, the payee signs the second transaction (the payee in the first transaction is actually the party making the payment in the second transaction, and the payer in the first transaction is actually the party making the payment in the second transaction).
[0056] Step S50: The payer's SPV wallet broadcasts the first transaction and the second transaction to all nodes, and determines the payment and refund status according to a preset status judgment strategy, adjusts the transaction input of the first transaction or the transaction output of the second transaction according to the payment and refund status, and stores the signature part in the second transaction when the payment and refund status is determined to be payment successful but refund unsuccessful.
[0057] Full node: also known as "transaction processor". It stores all user-related transactions, all block headers and Merkle proofs, UTXO and other information, and has the functions of producing virtual currency, forwarding transactions, detecting double spending, etc.
[0058] Since all block headers are stored in the full node, the payer's SPV wallet broadcasts the first transaction and the second transaction to the full node. The full node will then return the result of whether the first transaction and the second transaction are already included in the block to the payer's SPV wallet, so that the payer's SPV wallet can determine the payment and refund status according to the preset status judgment strategy.
[0059] Specifically, according to the preset status judgment strategy, the payment and refund status is judged including:
[0060] If the first transaction and the second transaction are not included in the block, it is determined that the payment is unsuccessful;
[0061] If the first transaction is included in the block and the second transaction is not included in the block, the payment is considered successful but the refund is unsuccessful;
[0062] If the first transaction and the second transaction are included in the block, the payment is determined to be successful and the refund is successful.
[0063] When judging the payment and refund status, since a transaction is included in the block, it means that the transaction has been completed. Therefore, if the first transaction and the second transaction are not included in the block, it is determined that both the first transaction and the second transaction are not completed, and the first transaction represents the payment from the payee to the payee, which means that the payment is unsuccessful. If the first transaction is included in the block and the second transaction is not included in the block, it means that the first transaction is completed and the second transaction is not completed. The first transaction represents the payment from the payee to the payee, which means that the payment is successful, and the second transaction represents the refund from the payee to the payee, which means that the refund is unsuccessful. If both the first transaction and the second transaction are included in the block, similarly, it means that the payment is successful and the refund is successful.
[0064] In the blockchain-based refund method provided in this embodiment, when both parties conduct a transaction, the payee SPV wallet establishes a communication channel with the payee SPV wallet; the payee SPV wallet sends the pre-built payment template to the payee SPV wallet through the communication channel; the payee SPV wallet fills UTXO as transaction input into the payment template and signs it to generate a first transaction, sends the first transaction to the payee SPV wallet through the communication channel, and the payer SPV wallet sets the status of the UTXO filled into the payment template to used, and through "the payee SPV wallet verifies the first transaction, and when the verification fails, constructs a second transaction based on the first transaction, and sends the first transaction and the second transaction to the payer SPV wallet; the payer SPV wallet broadcasts the first transaction and the second transaction to the full node, judges the payment and refund status according to the preset status judgment strategy, and adjusts the status of the transaction input of the first transaction or the transaction output of the second transaction according to the payment and refund status", so that the payer SPV wallet can receive the refund in real time and can promptly judge the current payment and refund status, effectively preventing the payee from double-spending and ensuring transaction security. And when the payment and refund status is determined to be payment successful but refund unsuccessful, the signature part in the second transaction (that is, the signature of the payee) is stored as legal evidence. When the refund is unsuccessful, it provides the payer with evidence for rights protection.
[0065] In another embodiment of the present invention, adjusting the transaction input of the first transaction or the transaction output of the second transaction according to the payment and refund status includes:
[0066] If the payment and refund status is that the payment was unsuccessful, the status of the transaction input of the first transaction is set to unused, that is, the status of the UTXO corresponding to the transaction input of the first transaction is set to unused, and it is added to the "unused" pool.
[0067] If the payment and refund status is payment successful but refund unsuccessful, the status of the transaction input of the first transaction is set to refunding; that is, the status of the UTXO corresponding to the transaction input of the first transaction is set to refunding, and it is added to the "refunding" pool.
[0068] If the payment and refund status is payment successful and refund successful, the status of the transaction output of the second transaction is set to unused, that is, the status of the UTXO corresponding to the transaction output of the second transaction is set to unused, and it is added to the "unused" pool.
[0069] In this embodiment, after the payment and refund status is determined, the payer's SPV wallet promptly adjusts the transaction input of the first transaction or the transaction output of the second transaction according to the payment and refund status, thereby achieving timely management of the payer's UTXO.
[0070] In another embodiment of the present invention, if the payer SPV includes a display, after judging the payment and refund status according to a preset status judgment strategy, the method further includes:
[0071] If the payment and refund status is payment unsuccessful, the payer SPV will display "payment unsuccessful";
[0072] If the payment and refund status is payment successful but refund unsuccessful, the payer SPV will display "Refund in Progress";
[0073] If the payment and refund status is payment successful and refund successful, the payer's SPV wallet will display "Refund successful".
[0074] In this embodiment, after the payer SPV determines the payment and refund status, the payment and refund status is displayed so that the user can know the payment and refund status.
[0075] In yet another embodiment of the present invention, a blockchain-based refund system is also provided, and the system adopts the above-mentioned blockchain-based refund method to implement a refund.
[0076] Specifically, the blockchain-based refund method includes the following steps:
[0077] Step S10: The payee's SPV wallet establishes a communication channel with the payer's SPV wallet.
[0078] Step S20: The payee's SPV wallet sends the pre-built payment template to the payer's SPV wallet through the communication channel.
[0079] Step S30: The payer's SPV wallet fills the UTXO as the transaction input into the payment template and signs it to generate a first transaction, sends the first transaction to the payee's SPV wallet through the communication channel, and the payer's SPV wallet sets the status of the UTXO filled into the payment template to used.
[0080] Step S40: The payee's SPV wallet verifies the first transaction. If the verification fails, a second transaction is constructed based on the first transaction, and the first transaction and the second transaction are sent to the payer's SPV wallet through the communication channel.
[0081] Step S50: The payer's SPV wallet broadcasts the first transaction and the second transaction to all nodes, determines the payment and refund status according to a preset status judgment strategy, adjusts the transaction input of the first transaction or the transaction output of the second transaction according to the payment and refund status, and stores the signature part of the second transaction when it is determined that the payment and refund status is successful but the refund is unsuccessful.
[0082] The present invention provides a refund system based on blockchain. When the SPV wallet of the payee verifies the first transaction and the verification fails, the second transaction is constructed based on the first transaction, and the first transaction and the second transaction are sent to the SPV wallet of the payee; the SPV wallet of the payee broadcasts the first transaction and the second transaction to the whole node, judges the payment and refund status according to the preset status judgment strategy, and adjusts the transaction input of the first transaction and / or the transaction output status of the second transaction according to the payment and refund status, so that the SPV wallet of the payee can receive the refund in real time, and can timely judge the current payment and refund status, effectively preventing the payee from double-spending and ensuring the transaction security. And when it is determined that the payment and refund status is successful but the refund is unsuccessful, the signature part in the second transaction, that is, the signature of the payee (the payee in the first transaction), is stored as legal evidence, and when the refund is unsuccessful, it provides the payee with evidence for rights protection.
[0083] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned blockchain-based refund method is implemented.
[0084] The present invention also protects a terminal device, such as Figure 3 As shown, it includes a computer-readable storage medium 101 and a processor 102, wherein the computer-readable storage medium 101 stores computer instructions; the processor 102 is configured to run the computer instructions to enable the terminal device to execute the above-mentioned blockchain-based refund method.
[0085] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present invention can be implemented by combining software with a hardware platform. Based on this understanding, all or part of the contribution of the technical solution of the present invention to the background technology can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a server, a smart phone or a network device, etc.) to execute the methods described in various embodiments of the present invention or certain parts of the embodiments.
[0086] The present invention provides a refund method, system, computer-readable storage medium and terminal device based on blockchain. When the two parties conduct a transaction, the SPV wallet of the payee establishes a communication channel with the SPV wallet of the payee; the SPV wallet of the payee sends the pre-built payment template to the SPV wallet of the payee through the communication channel. Wallet; the payee SPV wallet fills UTXO as transaction input into the payment template and signs it, generates a first transaction, sends the first transaction to the payee SPV wallet through the communication channel, and the payee SPV wallet sets the status of the UTXO filled into the payment template to used, through "the payee SPV wallet verifies the first transaction, and when the verification fails, builds a second transaction based on the first transaction, and sends the first transaction and the second transaction to the payee SPV wallet; the payee SPV wallet broadcasts the first transaction and the second transaction to the full node, judges the payment and refund status according to the preset status judgment strategy, and adjusts the transaction input of the first transaction and / or the transaction output status of the second transaction according to the payment and refund status", so that the payee SPV wallet can receive the refund in real time, and can timely judge the current payment and refund status, effectively preventing the payee from double-spending and ensuring transaction security. And when the payment and refund status is determined to be payment successful but refund unsuccessful, the signature part of the second transaction (that is, the payee's signature) is stored as legal evidence, and when the refund is unsuccessful, it provides the payee with evidence for rights protection.
[0087] The terms and expressions used in the specification of the present invention are for illustration only and are not meant to constitute limitations. The "first" and "second" used in the claims and the specification of the present invention herein are only for the purpose of convenience of distinction, have no special meaning, and are not intended to limit the present invention. It should be understood by those skilled in the art that various changes may be made to the details in the above-mentioned embodiments without departing from the basic principles of the disclosed embodiments. Therefore, the scope of the present invention is determined only by the claims. In the claims, unless otherwise specified, all terms should be understood in the broadest and most reasonable sense.
Claims
1. A refund method based on blockchain, characterized in that: include: The payee's SPV wallet establishes a communication channel with the payer's SPV wallet; The payee SPV wallet sends the pre-built payment template to the payer SPV wallet through the communication channel; The payer SPV wallet fills the UTXO as transaction input into the payment template and signs it to generate a first transaction, sends the first transaction to the payee SPV wallet through the communication channel, and the payer SPV wallet sets the status of the UTXO filled into the payment template to used; The payee SPV wallet verifies the first transaction. If the verification fails, a second transaction is constructed based on the first transaction, and the first transaction and the second transaction are sent to the payer SPV wallet through the communication channel. The payer SPV wallet broadcasts the first transaction and the second transaction to the full node, and determines the payment and refund status according to a preset status determination strategy, adjusts the transaction input of the first transaction or the transaction output of the second transaction according to the payment and refund status, and stores the signature part of the second transaction when determining that the payment and refund status is payment success but refund failure; The payment and refund status is determined according to the preset status determination strategy, including: If the first transaction and the second transaction are not included in the block, it is determined that the payment is unsuccessful; If the first transaction is included in the block and the second transaction is not included in the block, it is determined that the payment is successful but the refund is unsuccessful; If the first transaction and the second transaction are included in the block, it is determined that the payment is successful and the refund is successful.
2. The blockchain-based refund method according to claim 1, characterized in that: The communication channel is short-distance communication or point-to-point communication based on the Internet.
3. The blockchain-based refund method according to claim 2, characterized in that: The short-distance communication is NFC, Bluetooth or WIFI, and the point-to-point communication is http or socket.
4. The blockchain-based refund method according to claim 3, characterized in that: The adjusting the transaction input of the first transaction or the transaction output of the second transaction according to the payment and refund status includes: If the payment and refund status is that the payment is unsuccessful, the status of the transaction input of the first transaction is set to unused; If the payment and refund status is payment successful but refund unsuccessful, setting the transaction input status of the first transaction to refunding; If the payment and refund status is payment successful and refund successful, the status of the transaction output of the second transaction is set to unused.
5. The blockchain-based refund method according to claim 1, characterized in that: If the payer SPV is provided with a display, after judging the payment and refund status according to the preset status judgment strategy, the method further includes: If the payment and refund status is payment unsuccessful, the payer's SPV wallet will display "payment unsuccessful"; If the payment and refund status is that the payment is successful but the refund is unsuccessful, the payer's SPV wallet will display "refund in progress"; If the payment and refund status is payment successful and refund successful, the payer's SPV wallet will display "Refund successful".
6. The blockchain-based refund method according to claim 1, characterized in that: The method further includes: the payee SPV wallet pre-builds a payment template, the payment template is a transaction containing necessary payment information, and the necessary payment information includes the payment amount and an unlocking script.
7. The blockchain-based refund method according to claim 1, characterized in that: The constructing the second transaction based on the first transaction comprises: The second transaction is constructed by using the transaction output of the first transaction as the transaction input of the second transaction and the payer as the script opener of the transaction output of the second transaction.
8. A refund system based on blockchain, characterized in that: The system adopts the blockchain-based refund method as described in any one of claims 1-7 to achieve refund.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the blockchain-based refund method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Refund processing method, apparatus and device and storage medium
CN109816407A
Computer-implemented systems and methods for implementing transfers over a blockchain network
CN113874898A