A blockchain-based invoice reimbursement method and device, and a readable storage medium
By using blockchain technology to transfer digital assets and verify the legality of electronic invoices in the invoice reimbursement process, the problem of low efficiency in manual review is solved, the efficiency of invoice reimbursement is improved and transparency is ensured.
Patent Information
- Application Number
- CN202010023310.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-01-09
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2040-01-09
AI Technical Summary
The current invoice reimbursement process relies on manual review, which is inefficient.
By using blockchain technology, electronic invoices are transferred from the current user's wallet address to the buyer's wallet address through the generation of reimbursement data, thereby realizing the transfer of digital assets and verifying the legality of the invoice and the reimbursement recipient in the blockchain network.
The process for reimbursing invoices has been simplified, efficiency has been improved, and the transparency of reimbursement has been ensured.
Smart Images

Figure CN111242764B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Internet, in particular to an invoice reimbursement method and device based on a block chain and a readable storage medium. BACKGROUND
[0002] With the development of Internet technology, electronic invoices have been widely used. Like ordinary invoices, electronic invoices are issued by the tax bureau to businesses. The invoice number uses a national unified number, and the invoice also uses the signature of the electronic tax bureau for anti-counterfeiting technology. The current electronic invoice reimbursement process is as follows: the reimbursement personnel verifies the electronic invoice on the national tax invoice verification platform through the invoice number, invoice code and other invoice information, confirms the authenticity of the invoice, prints the paper document of the electronic invoice and the paper document of the verification information, and submits it to the invoice auditing personnel. The auditor will verify the invoice again and confirm the reimbursement of the invoice after successful verification. However, the current reimbursement process involves a manual auditing process, which is low in efficiency. SUMMARY
[0003] The embodiments of the present application provide an invoice reimbursement method and device based on a block chain and a readable storage medium, which can verify the legality of the reimbursed invoice and the reimbursement information, simplify the auditing process, and improve the efficiency of invoice reimbursement.
[0004] In a first aspect, the embodiments of the present application provide an invoice reimbursement method based on a block chain. The method is applied to a first block chain node, and the method comprises:
[0005] receiving an instruction for reimbursing a first electronic ticket, the instruction carrying the first electronic ticket, an identifier of the first electronic ticket, reimbursement information of the first electronic ticket, and a wallet address of a purchaser;
[0006] generating reimbursement data according to the identifier of the first electronic ticket, the reimbursement information of the first electronic ticket, a wallet address of a current user of the first block chain node, and the wallet address of the purchaser, the reimbursement data being used to indicate that the first electronic ticket is transferred from the wallet address of the current user to the wallet address of the purchaser.
[0007] In a possible implementation, before the receiving instruction for reimbursing the first electronic ticket, the method further comprises:
[0008] receiving an electronic ticket uploaded by the current user;
[0009] extracting invoice information in the uploaded electronic ticket;
[0010] In a case where the transaction data matching the invoice information is queried in the blockchain network corresponding to the first blockchain node, the uploaded electronic bill is determined as a first electronic bill.
[0011] In a possible implementation, the method further includes:
[0012] extracting transaction data from the invoice information;
[0013] querying whether there is transaction data matching the extracted transaction data in the blockchain network, and in a case where it is queried that there is transaction data matching the extracted transaction data in the blockchain network, determining that the transaction data matching the invoice information is queried in the blockchain network.
[0014] In a possible implementation, the method further includes:
[0015] transferring the first electronic bill generated digital asset into the wallet address of the current user.
[0016] In a possible implementation, the transferring the first electronic bill generated digital asset into the wallet address of the current user includes:
[0017] extracting the identification of the first electronic bill;
[0018] generating an unspent transaction output (UTXO) of the first electronic bill in the wallet address of the current user according to the identification of the first electronic bill.
[0019] In a second aspect, an invoice reimbursement method based on a blockchain is provided, and the method is applied to a second blockchain node, and the method includes:
[0020] receiving reimbursement data from a first blockchain node, the first blockchain node and the second blockchain node belong to a same blockchain network, the reimbursement data carries an identification of a first electronic bill, reimbursement information of the first electronic bill, a wallet address of a current user of the first blockchain node, and a wallet address of a purchase party, the reimbursement information of the first electronic bill includes information of the purchase party, and the reimbursement data indicates that the first electronic bill is transferred from the wallet address of the current user to the wallet address of the purchase party;
[0021] obtaining information of the purchase party;
[0022] determining whether the obtained information of the purchase party is same as the information of the purchase party in the reimbursement information;
[0023] In a case where it is determined that the purchaser information in the reimbursement information is the same as the purchaser information, the first electronic invoice is reimbursed.
[0024] In a possible implementation, the method further includes:
[0025] verifying whether the first electronic invoice can be reimbursed;
[0026] In a case where it is verified that the first electronic invoice can be reimbursed, the first electronic invoice is received.
[0027] In a possible implementation, the reimbursement data further includes a public key of the current user and a signature of the reimbursement data, and the verifying whether the first electronic invoice can be reimbursed includes:
[0028] determining whether the current reimbursement data is valid according to the public key of the current user and the signature of the reimbursement data;
[0029] In a case where it is determined that the current reimbursement data is valid, it is verified that the first electronic invoice can be reimbursed.
[0030] In a possible implementation, the method further includes:
[0031] In a case where it is determined that the purchaser information in the reimbursement information is not the same as the purchaser information, return data is generated according to the identifier of the first electronic invoice, the wallet address of the purchaser and the wallet address of the current user, the return data being used to indicate that the first electronic invoice is transferred from the wallet address of the purchaser to the wallet address of the current user.
[0032] In a third aspect, an embodiment of the present application provides an invoice reimbursement device based on a block chain, the device including:
[0033] a first receiving unit configured to receive an instruction for reimbursing a first electronic invoice, the instruction carrying the first electronic invoice, an identifier of the first electronic invoice, reimbursement information of the first electronic invoice and a wallet address of a purchaser;
[0034] a first generating unit configured to generate reimbursement data according to the identifier of the first electronic invoice, the reimbursement information of the first electronic invoice, a wallet address of a current user of the first block chain node and the wallet address of the purchaser, the reimbursement data being used to indicate that the first electronic invoice is transferred from the wallet address of the current user to the wallet address of the purchaser.
[0035] In a possible implementation, the device further includes:
[0036] a second receiving unit configured to receive an electronic invoice uploaded by the current user.
[0037] The first extraction unit is configured to extract invoice information from the uploaded electronic invoice.
[0038] The determination unit is configured to determine the uploaded electronic invoice as the first electronic invoice in a case where the transaction data matching the invoice information is queried in a blockchain network corresponding to the first blockchain node.
[0039] In a possible implementation, the apparatus further includes:
[0040] The second extraction unit is configured to extract transaction data from the invoice information.
[0041] The query unit is configured to query whether there is transaction data matching the extracted transaction data in the blockchain network, and determine that the transaction data matching the invoice information is queried in the blockchain network in a case where the transaction data matching the extracted transaction data is queried in the blockchain network.
[0042] In a possible implementation, the apparatus further includes:
[0043] The second generation unit is configured to transfer the first electronic invoice into the wallet address of the current user.
[0044] In a possible implementation, the first generation unit is specifically configured to:
[0045] extract the identity of the first electronic invoice;
[0046] generate an unspent transaction output (UTXO) of the first electronic invoice in the wallet address of the current user according to the identity of the first electronic invoice.
[0047] In a fourth aspect, an embodiment of the present application provides an invoice reimbursement apparatus based on a blockchain, which includes:
[0048] The third receiving unit is configured to receive reimbursement data from a first blockchain node, the first blockchain node and the second blockchain node belong to the same blockchain network, the reimbursement data carries an identity of a first electronic invoice, reimbursement information of the first electronic invoice, a wallet address of a current user of the first blockchain node, and a wallet address of the purchaser, the reimbursement information of the first electronic invoice includes information of the purchaser, and the reimbursement data indicates that the first electronic invoice is transferred from the wallet address of the current user to the wallet address of the purchaser.
[0049] The obtaining unit is configured to obtain information of the purchaser.
[0050] The judging unit is configured to judge whether the obtained purchaser information is same as the information of the purchaser in the reimbursement information.
[0051] The reimbursement unit is configured to reimburse the first electronic bill in a case that the purchaser information in the reimbursement information is same as the purchaser information.
[0052] In a possible implementation, the apparatus further includes:
[0053] The verifying unit is configured to verify whether the first electronic bill can be reimbursed.
[0054] The fourth receiving unit is configured to receive the first electronic bill in a case that the first electronic bill is verified to be able to be reimbursed.
[0055] In a possible implementation, the reimbursement data further includes a public key of the current user and a signature of the reimbursement data, and the verifying unit is specifically configured to:
[0056] judge whether the current reimbursement data is valid according to the public key of the current user and the signature of the reimbursement data.
[0057] verify that the first electronic bill can be reimbursed in a case that the current reimbursement data is judged to be valid.
[0058] In a possible implementation, the apparatus further includes:
[0059] The third generating unit is configured to generate return data according to the identifier of the first electronic bill, the wallet address of the purchaser and the wallet address of the current user in a case that the purchaser information in the reimbursement information is not same as the purchaser information, the return data being used to indicate that the first electronic bill is transferred from the wallet address of the purchaser to the wallet address of the current user.
[0060] In a fifth aspect, an electronic device is provided, which includes an output device, an input device, a processor, a memory and a transceiver. The output device, the input device, the processor, the memory and the transceiver are connected to each other. The transceiver is configured to receive information from other devices outside the apparatus and output information to other devices outside the apparatus. The memory is configured to store a computer program supporting the terminal device to execute the method provided in the first aspect and / or any possible implementation of the first aspect, the computer program including program instructions, and the processor is configured to invoke the program instructions to execute the method provided in the first aspect and / or any possible implementation of the first aspect.
[0061] In a sixth aspect, an electronic device is provided, which includes an output device, an input device, a processor, a memory and a transceiver. The output device, the input device, the processor, the memory and the transceiver are connected to each other. The transceiver is configured to receive information from another device outside the device and output information to the another device outside the device. The memory is configured to store a computer program supporting the terminal device to execute the method provided in the second aspect and / or any possible implementation manner of the second aspect. The computer program includes program instructions. The processor is configured to invoke the program instructions to execute the method provided in the second aspect and / or any possible implementation manner of the second aspect.
[0062] In a seventh aspect, a computer readable storage medium is provided, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the method provided in the first aspect and / or any possible implementation manner of the first aspect.
[0063] In an eighth aspect, a computer readable storage medium is provided, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the method provided in the second aspect and / or any possible implementation manner of the second aspect.
[0064] In the embodiments of the present application, the instruction for reimbursing the first electronic ticket carries the first electronic ticket, the identifier of the first electronic ticket, the reimbursement information of the first electronic ticket and the wallet address of the purchaser. The reimbursement data is generated according to the identifier of the first electronic ticket, the reimbursement information of the first electronic ticket, the wallet address of the current user of the first blockchain node and the wallet address of the purchaser. The reimbursement data is used to indicate that the first electronic ticket is transferred from the wallet address of the current user to the wallet address of the purchaser. As can be seen, when the invoice is reimbursed, the invoice is transferred to the purchaser on the invoice in the form of a digital asset, and the blockchain verifies the legality of the invoice and the object of reimbursement, without the need for manual review, greatly improving the efficiency of invoice reimbursement and simplifying the process of invoice reimbursement. Since the invoice reimbursement is transferred in the form of a digital asset, other blockchain nodes in the blockchain network can view the transfer information, thereby ensuring the openness and transparency of the invoice reimbursement. BRIEF DESCRIPTION OF DRAWINGS
[0065] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor.
[0066] Figure 1 is a system architecture diagram of a blockchain-based invoice reimbursement method provided by an embodiment of the present application;
[0067] Figure 2 is a flowchart of a blockchain-based invoice reimbursement method provided by an embodiment of the present application;
[0068] Figure 3 is a scene application diagram of a blockchain-based invoice reimbursement method provided by an embodiment of the present application;
[0069] Figure 4a is an interface diagram of a blockchain-based invoice reimbursement method provided by an embodiment of the present application;
[0070] Figure 4b is an interface diagram of a blockchain-based invoice reimbursement method provided by an embodiment of the present application;
[0071] Figure 4c is an interface diagram of a blockchain-based invoice reimbursement method provided by an embodiment of the present application;
[0072] Figure 5 is a structural diagram of a blockchain-based invoice reimbursement device provided by an embodiment of the present application;
[0073] Figure 6 is a structural diagram of another blockchain-based invoice reimbursement device provided by an embodiment of the present application;
[0074] Figure 7 is a structural diagram of an electronic device provided by an embodiment of the present application;
[0075] Figure 8 is a structural diagram of another electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0076] The technical solutions in the present application will be described clearly and completely in the following description of the drawings in the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0077] In order to better understand the blockchain-based invoice reimbursement method, device and readable storage medium provided by the embodiments of the present application, the network architecture used by the embodiments of the present application will be described first. Please refer to Figure 1 , which is a network architecture diagram provided by the present application. As shown in Figure 1 , the network architecture can include a blockchain network, wherein the blockchain network includes a plurality of electronic devices, each electronic device corresponding to a blockchain node in the blockchain network. In fact, each blockchain node in the blockchain network can correspond to a plurality of electronic devices. Here, only one blockchain node corresponding to one electronic device is taken as an example to illustrate the present application. When a certain blockchain node corresponds to a plurality of electronic devices, the plurality of electronic devices can be used to jointly process the data of different electronic invoice reimbursements of the blockchain node, so as to reduce the burden of the blockchain node on electronic invoice reimbursement processing. Figure 1 As shown in the figure, the four blockchain nodes of the blockchain are only representative, which can respectively receive transaction data uploaded by a merchant, a request for invoice reimbursement initiated by a user, and an invoice reimbursed by a purchaser through the blockchain network, and according to the verification, the blockchain node can also receive a request for invoice return initiated by the purchaser.
[0078] Specifically, the tax bureau issues invoices to the merchant for use. The merchant uploads transaction data to the blockchain network according to the time of transaction occurrence. The blockchain node device verifies the format of the transaction data uploaded by the merchant. After verification, the transaction data is saved, and an invoice is issued to the user. After the user receives the paper or electronic invoice, if it is a paper invoice, the electronic invoice file can be uploaded to the blockchain network in the form of a photo or an electronic scan. The blockchain node device verifies the invoice uploaded by the user. By matching the transaction data uploaded by the merchant with the transaction information contained in the electronic invoice, it is determined that the invoice uploaded by the user is legal and effective if the transaction information uploaded by the merchant matches the invoice information of the electronic invoice uploaded by the user.
[0079] Further, the invoice reimbursement instruction initiated by the user is received, the reimbursement data is generated by extracting the reimbursement information of the invoice and the identification of the invoice and the wallet address of the purchaser, the reimbursement data is signed and encrypted using the public key of the user, and is broadcast in the blockchain network. The reimbursement data is received by the node device in the blockchain node and the transaction is verified. When at least six blockchain nodes verify that the transaction is legal, the blockchain network transfers the invoice from the wallet address of the user to the wallet address of the purchaser according to the reimbursement data. When the purchaser receives the invoice, the purchaser information in the reimbursement information in the reimbursement data can be compared with the obtained purchaser information, wherein the purchaser information can be stored locally by the blockchain node corresponding to the purchaser. In the case where the purchaser information in the reimbursement information is consistent with the obtained purchaser information, the invoice is reimbursed. Otherwise, the return data is generated, the return data is generated according to the invoice, the wallet address of the user and the wallet address of the purchaser, and is broadcast in the blockchain network after generation. The return data is used to indicate that the invoice is transferred from the wallet address of the purchaser to the wallet address of the user, so that the invoice cannot be reimbursed and is returned to the user.
[0080] In the embodiments of the present application, the instruction for reimbursing the first electronic ticket carries the first electronic ticket, the identification of the first electronic ticket, the reimbursement information of the first electronic ticket and the wallet address of the purchaser. The reimbursement data is generated according to the identification of the first electronic ticket, the reimbursement information of the first electronic ticket, the current wallet address of the user of the first blockchain node and the wallet address of the purchaser. The reimbursement data is used to indicate that the first electronic ticket is transferred from the current wallet address of the user to the wallet address of the purchaser. As can be seen, when the invoice is reimbursed, the invoice is transferred to the purchaser in the form of digital assets, and the legality of the invoice and the object of reimbursement are verified by the blockchain, without the need for manual review, greatly improving the efficiency of invoice reimbursement and simplifying the process of invoice reimbursement. Since the invoice reimbursement is transferred in the form of digital assets, the transfer information can be viewed by other blockchain nodes in the blockchain network, thereby ensuring the openness and transparency of the invoice reimbursement.
[0081] Please refer to Figure 2 , which is a flowchart of a blockchain-based invoice reimbursement method provided by the present application, as Figure 2 shown, the method can include:
[0082] 201, receiving an instruction for reimbursing a first electronic ticket, the instruction carrying the first electronic ticket, the identification of the first electronic ticket, the reimbursement information of the first electronic ticket and the wallet address of the purchaser.
[0083] Specifically, the first electronic invoice can be an invoice uploaded by the user through the client, the invoice information input by the user can be received at the same time of uploading the invoice, or the information about the invoice is extracted from the electronic invoice uploaded by the user, the first blockchain node can query the transaction data matched with the first electronic invoice in the blockchain, when it is found that the transaction data matched with the first electronic invoice is in the transaction data uploaded by the merchant, it is determined that the first electronic invoice is a legal invoice, otherwise, it is determined that the first electronic invoice is not a legal invoice. Wherein, the transaction data matched with the transaction data format can be generated according to the invoice information, and it is queried whether the transaction data is contained in the database corresponding to the blockchain network, the database is a database for incrementally updating the data in the blockchain network. Therefore, by uploading the real and valid transaction data by the merchant, the invoice uploaded by the user is matched with the transaction data, and it is ensured that the invoice uploaded by the user to the blockchain network is real and legal.
[0084] Please refer to Figure 3 , Figure 3 is a scene application diagram of an invoice reimbursement method based on a blockchain provided by the embodiment of the present application, as shown in Figure 3 , the first blockchain node generates a transaction sheet under the condition that the invoice uploaded by the user is a real and legal invoice, as shown in the left transaction sheet in Figure 3 : transaction id: 000, the "input" is the source of the invoice, here is the invoice uploaded by the user, the index is 0, the identifier refers to the unique identifier of the first electronic invoice, such as 0001 in Figure 3 , the script is a locking script for locking the first electronic invoice using the public key of the user, the function of the locking script is to set that only the user can use the invoice with the identifier 0001, the receiver public key is the public key of the current user, the operation of uploading the invoice and passing the verification is equivalent to issuing an invoice with the identifier 0001 in the blockchain network, and then the transaction sheet is broadcasted in the blockchain network.
[0085] Further, after verifying that the first electronic invoice is legal and valid, an identifier of an unspent transaction output (UTXO) of the invoice is generated and stored in the wallet address of the user. The user can view the first electronic invoice through the client and initiate a reimbursement instruction for the first electronic invoice. The first blockchain node receives the reimbursement instruction for the first electronic invoice initiated by the user through the client. When the user triggers the instruction to reimburse the first electronic invoice, the first electronic invoice can be any of the legal invoices uploaded by the user. When the first blockchain node receives the instruction, a transaction is created, which includes 1 input and 1 output (no change for the invoice). It should be noted that the transaction fee for the transaction is not considered in the embodiments of the present application. Therefore, the first blockchain node generates a reimbursement data, i.e., a “transaction sheet” in the blockchain network, to reimburse the first electronic invoice.
[0086] 202. Generate the reimbursement data according to the identifier of the first electronic invoice, the reimbursement information of the first electronic invoice, the current wallet address of the user of the first blockchain node, and the wallet address of the purchaser.
[0087] Specifically, the first blockchain node generates the reimbursement data, i.e., a new transaction sheet, according to the identifier of the first electronic invoice, the reimbursement information of the first electronic invoice, the current wallet address of the user of the first blockchain node, and the wallet address of the purchaser. The transaction sheet is used to indicate the transfer of the invoice from the wallet address of the user to the wallet address of the purchaser. Here, the purchaser refers to the wallet address corresponding to the purchaser on the invoice, which can be an enterprise, an individual, an institution, or the like, and is not limited here. The reimbursement information can be information similar to a “reimbursement sheet” filled in by the user, which specifically includes the name of the purchaser, the taxpayer identification number, and optionally, the address, telephone number, and account information of the purchaser, the name, taxpayer identification number, address, telephone number, and account information of the seller, and the payee, reviewer, and invoice issuer, and the like.
[0088] As shown in Figure 3 The generated transaction id: 001, the input in the transaction sheet is “the output of the previous transaction”, “script”, and “sender public key”, which mainly reflects the source of the first electronic invoice, as shown in Figure 3The transaction output can be a transaction output of "reference transaction id: 000 output index: 0", which can be traced back to the transaction with transaction id 000, confirming the source of the transaction input. The first blockchain node can traverse all transaction records of the user to ensure that the first electronic invoice UTXO can be used to pay the current transaction, because the user has obtained the first electronic invoice UTXO before, and thus can pay the current transaction, so the transaction can proceed, and the recipient of the first electronic invoice is filled in the output of the transaction, including the index, the identifier, the script and the public key of the recipient. The index references 0 of the previous transaction, the identifier is the identifier 0001 of the invoice, the script is the locking script of the purchaser, indicating that only the purchaser can use the invoice with identifier 0001, and the public key of the recipient is the public key of the purchaser. After generating the transaction with transaction id 001, the transaction is broadcast in the blockchain network, and other blockchain nodes can verify the transaction. When at least 6 blockchain nodes verify, the transaction is generated, and the first electronic invoice is transferred to the purchaser.
[0089] The blockchain node can verify whether the user uses the user's own invoice UTXO after receiving the transaction. Specifically, the unlocking script in the transaction with transaction id 001 includes the user's signature and public key of the previous transaction output, which can be verified by the user's public key and signature.
[0090] 203. Receive the reimbursement data from the first blockchain node, the reimbursement data carrying the identifier of the first electronic invoice, the reimbursement information of the first electronic invoice, the wallet address of the current user of the first blockchain node and the wallet address of the purchaser, and the reimbursement information of the first electronic invoice including the information of the purchaser.
[0091] Specifically, the second blockchain node and the first blockchain node are two different nodes in the same blockchain network. The second blockchain node receives the reimbursement data from the first blockchain node, that is, the reimbursement data received by the first blockchain node through broadcasting, that is, the transaction. According to the transaction, the current transaction can be verified by the user's signature and public key of the previous transaction output in the unlocking script. When the verification is passed, it is confirmed that the first electronic invoice can be reimbursed, and the broadcasting in the blockchain node is continued until every node in the blockchain network receives the transaction.
[0092] Further, the second blockchain node can verify the reimbursement information of the purchaser, so that the invoice reimbursement method based on the blockchain provided by the embodiment of the application can not only ensure the authenticity and legality of the reimbursed invoice, but also verify whether the reimbursement is normal, that is, whether the object of the reimbursement is the object corresponding to the purchaser on the invoice.
[0093] 204. Obtain the information of the purchaser.
[0094] Specifically, the second blockchain node can obtain the information of the purchaser from the blockchain network, or from the locally stored information of the purchaser, which is not limited here. It can be understood that the purchaser corresponding to the second blockchain needs to receive the name of the electronic ticket for which the reimbursement is made, and the second blockchain node verifies the information of the purchaser contained in the reimbursement information of the first electronic ticket received after the transaction is generated.
[0095] 205. Determine whether the obtained information of the purchaser is the same as the information of the purchaser in the above reimbursement information.
[0096] In a possible implementation, by comparing the information of the purchaser in the reimbursement information with the obtained information of the purchaser, only when the information of the purchaser is consistent, the reimbursement can be performed, and if the information of the purchaser is inconsistent, a return data, i.e. a new transaction sheet, is generated again to return the first electronic ticket to the user. The comparison of the information of the purchaser in the reimbursement information and the obtained information of the purchaser can be performed by comparing the text similarity, which is not limited here.
[0097] 206. In the case where the information of the purchaser in the above reimbursement information is the same as the above information of the purchaser, the first electronic ticket is reimbursed.
[0098] Specifically, in the case where the information of the purchaser in the above reimbursement information is the same as the above information of the purchaser, it is determined that the verification is passed, and the first electronic ticket is reimbursed. In the case where the information of the purchaser in the above reimbursement information is the same as the above information of the purchaser, it is determined that the first electronic ticket cannot be reimbursed to the purchaser, and a return data, i.e. a new transaction sheet, is generated to return the first electronic ticket to the user. For example, Figure 3As shown in the transaction sheet on the right side, the transaction id: 002 also includes the "input" and the "output" of the transaction, the "input" includes the output of the previous transaction: the transaction output of the transaction id: 001 output index: 0, the script is an unlocking script containing the public key of the buyer and the signature, and the sender public key, i.e. the public key of the buyer. The "output" includes index: 0, identification: 0001 and the locking script and the receiver public key. Then the second blockchain node also broadcasts the transaction sheet in the blockchain network after generating the transaction sheet, and the nodes in the blockchain verify the transaction sheet, and the verification method is consistent with the above-mentioned verification method of the transaction id: 001, which will not be repeated here, and after the verification of 6 or more blockchain nodes is passed, the transaction can be generated, and the above-mentioned first electronic ticket is returned to the wallet address of the user. The invoice with the identification of 001 will not be reimbursed by the buyer until the buyer initiates reimbursement to the buyer, and can be reimbursed.
[0099] Please see Figures 4a-4c , Figures 4a-4c An interface diagram of a blockchain-based invoice reimbursement method provided by an embodiment of the present application, Figures 4a-4c is the reimbursement interface of the invoice, which is the operation interface of the user. The invoice reimbursement program can be an application program, can be integrated into a mini-program in an instant messaging application (such as WeChat, QQ, etc.), or can be reimbursed through a WeChat public number, which is not limited herein. The present application takes the WeChat invoice reimbursement mini-program as an example for explanation, as shown in Figure 4a , buttons for uploading invoices and invoice inspection can be displayed in the interface, which are used to upload invoices that need to be reimbursed and to query whether the invoices have been reimbursed by scanning the two-dimensional code of the invoices. When the user clicks "upload invoice", the front end receives the uploaded invoice, and the back end can upload the invoice to the blockchain through the blockchain node and verify it. Further, after uploading the invoice file, the reimbursement information, i.e. the reimbursement form, can be input. Optionally, "my invoices" can also be displayed, i.e. the invoices that the user can currently reimburse, as well as the invoices that have been reimbursed and the reimbursement records. The user can click the invoice with the invoice number 0001 to reimburse it through the background through the blockchain node device. The user can view the reimbursement success information in the interface, as shown in Figure 4b , and the reimbursement information of the current invoice is displayed. When returning to the WeChat invoice reimbursement interface, the reimbursement of the invoice with the number 0001 can be viewed through the reimbursement record, as shown in Figure 4c .
[0100] In the embodiment of the present application, the instruction for reimbursing the first electronic ticket carries the first electronic ticket, the identifier of the first electronic ticket, the reimbursement information of the first electronic ticket, and the wallet address of the purchaser; the reimbursement data is generated according to the identifier of the first electronic ticket, the reimbursement information of the first electronic ticket, the wallet address of the current user of the first blockchain node, and the wallet address of the purchaser, and the reimbursement data is used to indicate that the first electronic ticket is transferred from the wallet address of the current user to the wallet address of the purchaser. As can be seen, when the invoice is reimbursed, the invoice is transferred to the purchaser in the form of digital assets, and the blockchain verifies the legality of the invoice and the object of reimbursement, without the need for manual review, greatly improving the efficiency of invoice reimbursement and simplifying the process of invoice reimbursement. Since the invoice reimbursement is transferred in the form of digital assets, other blockchain nodes in the blockchain network can view the transfer information, thereby ensuring the openness and transparency of the invoice reimbursement.
[0101] Please refer to Figure 5 , Figure 5 is a structural schematic diagram of a blockchain-based invoice reimbursement device 5000 provided by the embodiment of the present application. As shown in Figure 5 , the invoice reimbursement device 5000 comprises:
[0102] A first receiving unit 501 is configured to receive an instruction for reimbursing a first electronic ticket, wherein the instruction carries the first electronic ticket, an identifier of the first electronic ticket, reimbursement information of the first electronic ticket, and a wallet address of a purchaser.
[0103] A first generating unit 502 is configured to generate reimbursement data according to the identifier of the first electronic ticket, the reimbursement information of the first electronic ticket, a wallet address of a current user of the first blockchain node, and the wallet address of the purchaser, wherein the reimbursement data is used to indicate that the first electronic ticket is transferred from the wallet address of the current user to the wallet address of the purchaser.
[0104] In a possible implementation manner, the device 5000 further comprises:
[0105] A second receiving unit 503 is configured to receive an electronic ticket uploaded by the current user.
[0106] A first extracting unit 504 is configured to extract invoice information in the uploaded electronic ticket.
[0107] A determining unit 505 is configured to determine the uploaded electronic ticket as the first electronic ticket in a case where transaction data matched with the invoice information is queried in a blockchain network, wherein the blockchain network is a blockchain network corresponding to the first blockchain node.
[0108] In a possible implementation, the apparatus 5000 further includes:
[0109] a second extraction unit 506 configured to extract transaction data from the invoice information;
[0110] a query unit 507 configured to query whether there is transaction data matching the extracted transaction data in the blockchain network, and determine that the transaction data matching the invoice information is queried in the blockchain network in a case that the transaction data matching the extracted transaction data is queried in the blockchain network.
[0111] In a possible implementation, the apparatus 5000 further includes:
[0112] a second generation unit 508 configured to transfer the first electronic bill generation digital asset into the wallet address of the current user.
[0113] In a possible implementation, the first generation unit 508 is specifically configured to:
[0114] extract the identifier of the first electronic bill;
[0115] generate unspent transaction output (UTXO) of the first electronic bill in the wallet address of the current user according to the identifier of the first electronic bill.
[0116] The detailed description of the first receiving unit 501, the generation unit 502, the second receiving unit 503, the first extraction unit 504, the determination unit 505, the second extraction unit 506, the query unit 507, and the first generation unit 508 can be directly obtained by referring to the related description in the method embodiment shown in the above Figures 2-4c Therefore, no further description is given here.
[0117] In the embodiment of the present application, a blockchain-based invoice reimbursement device receives an instruction for reimbursing a first electronic bill, the instruction carrying the first electronic bill, an identifier of the first electronic bill, reimbursement information of the first electronic bill, and a wallet address of a purchaser; generates reimbursement data according to the identifier of the first electronic bill, the reimbursement information of the first electronic bill, a wallet address of a current user of the first blockchain node, and the wallet address of the purchaser, the reimbursement data being used to indicate that the first electronic bill is transferred from the wallet address of the current user to the wallet address of the purchaser. As can be seen, when the invoice is reimbursed, the invoice is transferred to the purchaser in the form of a digital asset, and the blockchain verifies the legality of the invoice and the object of reimbursement, without the need for manual review, greatly improving the efficiency of invoice reimbursement and simplifying the process of invoice reimbursement. Since the invoice reimbursement is transferred in the form of a digital asset, the transfer information can be viewed by other blockchain nodes in the blockchain network, thereby ensuring the openness and transparency of the invoice reimbursement.
[0118] Please refer to Figure 6 , Figure 6 is another structure diagram of a blockchain-based invoice reimbursement device 6000 provided by the embodiment of the present application, as shown in Figure 6 , the invoice reimbursement device 6000 comprises:
[0119] A third receiving unit 601 is configured to receive reimbursement data from a first blockchain node, the first blockchain node and the second blockchain node belong to the same blockchain network, the reimbursement data carries an identifier of a first electronic bill, reimbursement information of the first electronic bill, a wallet address of a current user of the first blockchain node, and a wallet address of a purchaser, the reimbursement information of the first electronic bill comprises information of the purchaser, and the reimbursement data indicates that the first electronic bill is transferred from the wallet address of the current user to the wallet address of the purchaser;
[0120] An obtaining unit 602 is configured to obtain information of the purchaser;
[0121] A judging unit 603 is configured to judge whether the obtained information of the purchaser is same as the information of the purchaser in the reimbursement information;
[0122] A reimbursement unit 604 is configured to reimburse the first electronic bill in a case where the information of the purchaser in the reimbursement information is same as the information of the purchaser.
[0123] In a possible implementation manner, the device 6000 further comprises:
[0124] A verifying unit 605 is configured to verify whether the first electronic bill can be reimbursed;
[0125] The fourth receiving unit 606 is configured to receive the first electronic bill in the case that it is verified that the first electronic bill can be reimbursed.
[0126] In a possible implementation, the reimbursement data further includes a public key of the current user and a signature of the reimbursement data, and the verification unit 605 is specifically configured to:
[0127] determine whether the current reimbursement data is valid according to the public key of the current user and the signature of the reimbursement data;
[0128] verify that the first electronic bill can be reimbursed in the case that the current reimbursement data is determined to be valid.
[0129] In a possible implementation, the apparatus 6000 further includes:
[0130] The third generating unit 607 is configured to generate return data according to the identifier of the first electronic bill, the wallet address of the purchaser and the wallet address of the current user in the case that the purchase information in the reimbursement information is different from the purchase information, and the return data is used to indicate that the first electronic bill is transferred from the wallet address of the purchaser to the wallet address of the current user.
[0131] The third receiving unit 601, the obtaining unit 602, the determining unit 603, the reimbursement unit 604, the verification unit 605, the fourth receiving unit 606 and the third generating unit 607 are directly described in the method embodiment shown in FIG. 6, and thus no further description is given here. Figures 2-4c
[0132] In the embodiment of the present application, a blockchain-based invoice reimbursement device receives reimbursement data from a first blockchain node, the first blockchain node and the second blockchain node belong to the same blockchain network, the reimbursement data carries the identification of a first electronic invoice, the reimbursement information of the first electronic invoice, the wallet address of the current user of the first blockchain node, and the wallet address of the purchaser, the reimbursement information of the first electronic invoice includes the information of the purchaser, and the reimbursement data indicates that the first electronic invoice is transferred from the wallet address of the current user to the wallet address of the purchaser; the information of the purchaser is obtained; it is judged whether the obtained information of the purchaser is same as the information of the purchaser in the reimbursement information; in the case that the information of the purchaser in the reimbursement information is same as the information of the purchaser, the first electronic invoice is reimbursed. It can be seen that, when the invoice is reimbursed, the invoice is transferred to the purchaser on the invoice in the form of digital assets, and the blockchain verifies the legality of the invoice and the object of reimbursement, without manual review, greatly improving the efficiency of invoice reimbursement, simplifying the process of invoice reimbursement, and since the invoice reimbursement is transferred in the form of digital assets, the transfer information can be viewed by other blockchain nodes in the blockchain network, thereby ensuring the openness and transparency of the invoice reimbursement.
[0133] Please refer to Figure 7 , Figure 7 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. As shown in Figure 7 , the electronic device 7000 can include:
[0134] one or more processors 701, input devices 702, output devices 703, memories 704, transceivers 705. The above-mentioned processors 701, input devices 702, output devices 703, memories 704, transceivers 705 are connected through a bus. Among them, the input device 702 can include a touch screen, a keyboard, a microphone, etc., the output device 703 can include a display screen, a sound, etc., the transceiver 705 is used for receiving and sending data. The memory 704 is used for storing a computer program, the computer program includes program instructions, the processor 701 is used for executing the program instructions stored in the memory 704, wherein the processor 701 is configured to call the program instructions to execute the following steps:
[0135] receiving an instruction for reimbursing a first electronic invoice, the instruction carrying the first electronic invoice, the identification of the first electronic invoice, the reimbursement information of the first electronic invoice, and the wallet address of the purchaser;
[0136] The reimbursement data is generated according to the identifier of the first electronic invoice, the reimbursement information of the first electronic invoice, a wallet address of a current user of the first blockchain node, and a wallet address of the purchaser, and the reimbursement data is used to indicate that the first electronic invoice is transferred from the wallet address of the current user to the wallet address of the purchaser.
[0137] In a possible implementation, before the instruction for reimbursing the first electronic invoice is received, the processor 701 is further called to perform the following steps:
[0138] receiving an electronic invoice uploaded by the current user;
[0139] extracting invoice information in the uploaded electronic invoice;
[0140] in a case where transaction data matching the invoice information is found in the blockchain network, determining the uploaded electronic invoice as the first electronic invoice, and the blockchain network is a blockchain network corresponding to the first blockchain node.
[0141] In a possible implementation, the processor 701 is further called to perform the following steps:
[0142] extracting transaction data from the invoice information;
[0143] querying whether there is transaction data matching the extracted transaction data in the blockchain network, and in a case where transaction data matching the extracted transaction data is found in the blockchain network, determining that the transaction data matching the invoice information is found in the blockchain network.
[0144] In a possible implementation, the processor 701 is further called to perform the following steps:
[0145] transferring the digital asset generated by the first electronic invoice into the wallet address of the current user.
[0146] In a possible implementation, the transferring the digital asset generated by the first electronic invoice into the wallet address of the current user includes:
[0147] extracting an identifier of the first electronic invoice;
[0148] generating an unspent transaction output (UTXO) of the first electronic invoice in the wallet address of the current user according to the identifier of the first electronic invoice.
[0149] It should be appreciated that in some feasible implementations, the processor 701 described above can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0150] The memory 704 can include read-only memory and random access memory, and provide instructions and data to the processor. A portion of the memory 704 can also include non-volatile random access memory.
[0151] In a specific implementation, the electronic device 7000 described above can perform the implementation manner provided by each of the steps described above through each functional module built therein. For details, refer to the implementation manner provided by each of the steps described above, which will not be repeated here. Figures 2-4c In a specific implementation, the electronic device 7000 described above can perform the implementation manner provided by each of the steps described above through each functional module built therein. For details, refer to the implementation manner provided by each of the steps described above, which will not be repeated here.
[0152] In the embodiment of the present application, a blockchain-based invoice reimbursement device receives an instruction for reimbursing a first electronic ticket, the instruction carrying the first electronic ticket, an identifier of the first electronic ticket, reimbursement information of the first electronic ticket, and a wallet address of a purchaser; generates reimbursement data according to the identifier of the first electronic ticket, the reimbursement information of the first electronic ticket, a wallet address of a current user of the first blockchain node, and the wallet address of the purchaser, the reimbursement data being used to indicate a transfer of the first electronic ticket from the wallet address of the current user to the wallet address of the purchaser. As can be seen, when performing invoice reimbursement, the invoice is transferred to the purchaser on the invoice in the form of a digital asset, and the blockchain verifies the legality of the invoice and the object of reimbursement, without the need for manual review, greatly improving the efficiency of invoice reimbursement and simplifying the process of invoice reimbursement. Moreover, since the invoice reimbursement is transferred in the form of a digital asset, the transfer information can be viewed by other blockchain nodes in the blockchain network, thereby ensuring the openness and transparency of invoice reimbursement.
[0153] Please refer to Figure 8 , Figure 8 is another structural schematic diagram of an electronic device provided by the embodiment of the present application. As shown in Figure 8 , the electronic device 8000 can include:
[0154] One or more processors 801, input device 802, output device 803, memory 804, transceiver 805. The above-mentioned processor 801, input device 802, output device 803, memory 804, transceiver 805 are connected through a bus. Among them, the input device 802 can include a touch screen, a keyboard, a microphone, etc., the output device 803 can include a display screen, a sound, etc., the transceiver 805 is used for receiving and sending data. The memory 804 is used to store a computer program, the computer program includes program instructions, the processor 801 is used to execute the program instructions stored in the memory 804, wherein the processor 801 is configured to call the program instructions to execute the following steps:
[0155] Receiving reimbursement data from a first blockchain node, the first blockchain node and the second blockchain node belong to the same blockchain network, the reimbursement data carries the identity of the first electronic ticket, the reimbursement information of the first electronic ticket, the current user's wallet address of the first blockchain node and the wallet address of the purchase party, the reimbursement information of the first electronic ticket includes the information of the purchase party, and the reimbursement data indicates that the first electronic ticket is transferred from the current user's wallet address to the wallet address of the purchase party;
[0156] Obtaining the information of the purchase party;
[0157] Determine whether the obtained purchase party information is same as the purchase party information in the reimbursement information;
[0158] In the case where the purchase party information in the reimbursement information is same as the purchase party information, the first electronic ticket is reimbursed.
[0159] In a possible implementation, the processor 801 is configured to call the program instructions to execute the following steps:
[0160] Verify whether the first electronic ticket can be reimbursed;
[0161] In the case where it is verified that the first electronic ticket can be reimbursed, the first electronic ticket is received.
[0162] In a possible implementation, the reimbursement data further includes the public key of the current user and the signature of the reimbursement data, and the verification of whether the first electronic ticket can be reimbursed includes:
[0163] According to the public key of the current user and the signature of the reimbursement data, it is judged whether the current reimbursement data is valid;
[0164] In the case where it is judged that the current reimbursement data is valid, it is verified that the first electronic ticket can be reimbursed.
[0165] In a possible implementation, the processor 801 is configured to execute the following steps by invoking program instructions:
[0166] In a case where the purchase party information in the reimbursement information is determined to be different from the purchase party information, return data is generated according to the identifier of the first electronic bill, the wallet address of the purchase party, and the current user wallet address, the return data being used to indicate that the first electronic bill is transferred from the wallet address of the purchase party to the wallet address of the current user.
[0167] It should be understood that, in some possible implementation, the processor 801 can be a central processing unit (CPU), and the processor 801 can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0168] The memory 804 can include a read-only memory and a random access memory, and provide instructions and data for the processor. A part of the memory 804 can also include a non-volatile random access memory.
[0169] In specific implementations, the electronic device 8000 can execute the implementation manners provided in the above steps by using the built-in function modules, and specific implementation manners can be referred to the implementation manners provided in the above steps, which will not be described herein. Figures 2-4c
[0170] In the embodiment of the present application, a blockchain-based invoice reimbursement device receives reimbursement data from a first blockchain node, the first blockchain node and the second blockchain node belong to the same blockchain network, the reimbursement data carries the identification of a first electronic invoice, the reimbursement information of the first electronic invoice, the wallet address of the current user of the first blockchain node, and the wallet address of the purchaser, the reimbursement information of the first electronic invoice includes the information of the purchaser, and the reimbursement data indicates that the first electronic invoice is transferred from the wallet address of the current user to the wallet address of the purchaser; the information of the purchaser is obtained; it is judged whether the obtained information of the purchaser is same as the information of the purchaser in the reimbursement information; and in the case that the information of the purchaser in the reimbursement information is same as the information of the purchaser, the first electronic invoice is reimbursed. It can be seen that, when the invoice is reimbursed, the invoice is transferred to the purchaser on the invoice in the form of digital assets, and the blockchain verifies the legality of the invoice and the object of reimbursement, without the need for manual review, greatly improving the efficiency of invoice reimbursement, simplifying the process of invoice reimbursement, and since the invoice reimbursement is transferred in the form of digital assets, other blockchain nodes in the blockchain network can view the transfer information, thereby ensuring the openness and transparency of the invoice reimbursement.
[0171] In addition, it should be noted that the present application also provides a computer readable storage medium, and the computer readable storage medium stores the computer program executed by the electronic device mentioned above, and the computer program includes program instructions, and when the processor executes the program instructions, the above-mentioned Figures 2-4c The data verification method is described in the corresponding embodiment, therefore, it will not be repeated here. In addition, the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer storage medium embodiments involved in the present application, please refer to the description of the method embodiments of the present application.
[0172] The terms "first", "second", and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. Moreover, the terms "comprises", "comprising", "includes", "including" and the like are used herein to mean either "consists of" or "consisting of" or "consists essentially of" or "consisting essentially of" or "includes of" or "including by way of example or otherwise, any element without limitation. For example, a process, method, article, or apparatus that comprises a list of steps or elements is not necessarily limited to the listed steps or elements, but can include additional or fewer steps or elements, and that the listed steps or elements can be performed in a variety of permutations. Reference throughout this document to "an embodiment" or "the embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. Appearances of the phrase "in an embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily mutually exclusive of one another. It is expressly understood that any of the embodiments described herein can be combined with any of the other embodiments described herein. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items. The foregoing description of various examples has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the application to the precise form disclosed, and various examples described herein can be modified as will be apparent to persons skilled in the art. The described embodiments were chosen and described in order to provide the best illustration of the principles of the application and its practical application to thereby enable one skilled in the art to best utilize the application.
[0173] As will be realized, the example shown and described herein are capable of a number of physical and material implementations. Although the example described herein can represent the best attempts at a working example, those skilled in the art will recognize and appreciate that components and techniques exist which can be used as alternatives, substitutions, and equivalents for the various
[0174] The foregoing description of various examples has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the application to the precise form disclosed, and various examples described herein can be modified as will be apparent to persons skilled in the art. The described embodiments were chosen and described in order to provide the best illustration of the principles of the application and its practical application to thereby enable one skilled in the art to best utilize the application.
Claims
1. A blockchain-based invoice reimbursement method, wherein the method is applied to a first blockchain node, characterized in that, include: After verifying the legality and validity of the first electronic invoice, the first blockchain node generates an identifier for the unused transaction output of the first electronic invoice and stores it in the user's wallet address to ensure that the first electronic invoice supports payment for the current transaction. It also receives an instruction for reimbursing the first electronic invoice, which carries the first electronic invoice, the identifier of the first electronic invoice, the reimbursement information of the first electronic invoice, and the buyer's wallet address. Reimbursement data is generated based on the identifier of the first electronic invoice, the reimbursement information of the first electronic invoice, the wallet address of the current user of the first blockchain node, and the wallet address of the buyer. The input of the reimbursement data includes the output of the previous transaction, which reflects the source of the first electronic invoice. The buyer refers to the buyer on the invoice. The reimbursement data is used to instruct the transfer of the first electronic invoice from the current user's wallet address to the buyer's wallet address. The reimbursement data is sent to a second blockchain node, allowing the second blockchain node to receive the reimbursement data from the first blockchain node. The reimbursement data carries the identifier of the first electronic invoice, the reimbursement information of the first electronic invoice, the wallet address of the current user of the first blockchain node, and the wallet address of the buyer. This allows the second blockchain node to retrieve the buyer's information from its locally stored buyer information. The buyer corresponding to the second blockchain node needs to receive an electronic invoice with its own header. The second blockchain node then determines whether the retrieved buyer information matches the buyer information in the reimbursement information. If the buyer information matches, the first electronic invoice is reimbursed. If the buyer information does not match, the first electronic invoice cannot be reimbursed to the buyer corresponding to the second blockchain node, and return data is generated.
2. The method according to claim 1, characterized in that, Before receiving the instruction for reimbursing the first electronic invoice, the method further includes: Receive the electronic ticket uploaded by the current user; Extract invoice information from uploaded electronic invoices; If a transaction matching the invoice information is found in the blockchain network, the uploaded electronic invoice is identified as the first electronic invoice, and the blockchain network is the blockchain network corresponding to the first blockchain node.
3. The method according to claim 2, characterized in that, The method further includes: Extract transaction data from the invoice information; The system queries whether there is transaction data in the blockchain network that matches the extracted transaction data. If transaction data matching the extracted transaction data is found in the blockchain network, it is determined that transaction data matching the invoice information has been found in the blockchain network.
4. The method according to claim 2, characterized in that, The method further includes: The first electronic ticket generates digital assets which are then transferred to the current user's wallet address.
5. The method according to claim 4, characterized in that, The step of transferring the digital asset generated from the first electronic invoice to the current user's wallet address includes: Extract the identifier of the first electronic ticket; Based on the identifier of the first electronic ticket, an unspent transaction output (UTXO) of the first electronic ticket is generated in the current user's wallet address.
6. A blockchain-based invoice reimbursement method, wherein the method is applied to a second blockchain node, characterized in that, include: The system receives reimbursement data from a first blockchain node, which belongs to the same blockchain network as the second blockchain node. The reimbursement data carries the identifier of the first electronic invoice, the reimbursement information of the first electronic invoice, the wallet address of the current user of the first blockchain node, and the wallet address of the buyer. The reimbursement information of the first electronic invoice includes the buyer's information. The reimbursement data indicates that the first electronic invoice is transferred from the current user's wallet address to the buyer's wallet address. The input of the reimbursement data includes the output of the previous transaction, reflecting the source of the first electronic invoice. The buyer refers to the buyer on the invoice. The current user's wallet address stores the unused transaction output of the first electronic invoice. The transaction output is generated by the first blockchain node after verifying the legality and validity of the first electronic invoice, and is used to ensure that the first electronic invoice supports payment for the current transaction. The information of the buyer is obtained from the locally stored buyer information. The buyer corresponding to the second blockchain node needs to receive the electronic invoice for reimbursement with its own invoice header. Determine whether the obtained buyer information is the same as the buyer information in the reimbursement information; If the buyer information in the reimbursement information is the same as the buyer information obtained, the first electronic invoice is reimbursed; if the buyer information in the reimbursement information is different from the obtained buyer information, the first electronic invoice cannot be reimbursed to the buyer corresponding to the second blockchain node, and return data is generated.
7. A blockchain-based invoice reimbursement device, wherein the device is applied to a first blockchain node, characterized in that, include: The first receiving unit is configured to, after the first blockchain node verifies the legality and validity of the first electronic invoice, generate an identifier for the unused transaction output of the first electronic invoice and store it in the user's wallet address, to ensure that the first electronic invoice supports payment for the current transaction, and to receive an instruction for reimbursing the first electronic invoice, the instruction carrying the first electronic invoice, the identifier of the first electronic invoice, the reimbursement information of the first electronic invoice, and the buyer's wallet address; The generation unit is used to generate reimbursement data based on the identifier of the first electronic invoice, the reimbursement information of the first electronic invoice, the wallet address of the current user of the first blockchain node, and the wallet address of the buyer. The input of the reimbursement data includes the output of the previous transaction, which reflects the source of the first electronic invoice. The buyer refers to the buyer on the invoice. The reimbursement data is used to instruct the transfer of the first electronic invoice from the current user's wallet address to the buyer's wallet address. The reimbursement data is sent to a second blockchain node, allowing the second blockchain node to receive the reimbursement data from the first blockchain node. The reimbursement data carries the identifier of the first electronic invoice, the reimbursement information of the first electronic invoice, the wallet address of the current user of the first blockchain node, and the wallet address of the buyer. This allows the second blockchain node to retrieve the buyer's information from its locally stored buyer information. The buyer corresponding to the second blockchain node needs to receive an electronic invoice with its own header. The second blockchain node then determines whether the retrieved buyer information matches the buyer information in the reimbursement information. If the buyer information matches, the first electronic invoice is reimbursed. If the buyer information does not match, the first electronic invoice cannot be reimbursed to the buyer corresponding to the second blockchain node, and return data is generated.
8. A blockchain-based invoice reimbursement device, wherein the device is applied to a second blockchain node, characterized in that, include: The third receiving unit is used to receive reimbursement data from the first blockchain node, which belongs to the same blockchain network as the second blockchain node. The reimbursement data carries the identifier of the first electronic invoice, the reimbursement information of the first electronic invoice, the wallet address of the current user of the first blockchain node, and the wallet address of the buyer. The reimbursement information of the first electronic invoice includes the information of the buyer. The reimbursement data indicates that the first electronic invoice is transferred from the wallet address of the current user to the wallet address of the buyer. The input of the reimbursement data includes the output of the previous transaction, reflecting the source of the first electronic invoice. The buyer refers to the buyer on the invoice. The wallet address of the current user stores the unused transaction output of the first electronic invoice. The transaction output is generated by the first blockchain node after verifying the legality and validity of the first electronic invoice, and is used to ensure that the first electronic invoice supports payment of the current transaction. The acquisition unit is used to obtain the buyer's information from the locally stored buyer information. The buyer corresponding to the second blockchain node needs to receive the electronic invoice for reimbursement with its own invoice header. The judgment unit is used to determine whether the obtained buyer information is the same as the buyer information in the reimbursement information; The reimbursement unit is used to reimburse the first electronic invoice if it determines that the buyer information in the reimbursement information is the same as the buyer information obtained; if it determines that the buyer information in the reimbursement information is different from the obtained buyer information, it determines that the first electronic invoice cannot be reimbursed to the buyer corresponding to the second blockchain node, and then generates return data.
9. An electronic device, characterized in that, The device includes a processor and a memory coupled together, wherein the memory is used to store computer instructions and the processor is used to execute the computer instructions to enable the electronic device to perform the method as described in any one of claims 1-6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more first instructions, which are adapted to be loaded by a processor and executed as described in any one of claims 1-6.
Citation Information
Patent Citations
Electronic invoice generation method and device, computer equipment and storage medium
CN110378755A
Bill reimbursement method, device and equipment, and computer storage medium
CN110458562A