Bill Processing Method, Device and Medium
By receiving and storing bill information on blockchain node devices, and using public and private key verification and transfer processing, the possible duplicate reimbursement and false reimbursement problems that may exist in reimbursement of electronic invoices are solved, and the uniqueness and simplified processing process of bills are achieved.
Patent Information
- Application Number
- CN202010074851.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-01-22
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2040-01-22
AI Technical Summary
Electronic invoices may have the risk of repeated reimbursement and false reimbursement in reimbursement, and the existing management system has not been fully improved.
Blockchain technology is adopted to receive and store user-generated target bill information through blockchain node equipment, including bill content and signature, and use public and private keys for verification and transfer processing to ensure that the bill applicant can only reimburse target bill information in one go.
It effectively avoids duplicate reimbursement of bills, ensures the uniqueness and non-forgery of bills, and simplifies the issuance and processing process of bills.
Smart Images

Figure CN111311341B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technologies, and in particular, to a method, device, and medium for processing bills. Background Art
[0002] An invoice is a business voucher issued and received by units and individuals in the purchase and sale of goods, provision or receipt of services, and other business activities. It is the original basis for accounting and an important basis for law enforcement inspections by auditing and tax authorities. An invoice can be a paper invoice or an electronic invoice. With the development of the economy and technology, electronic invoices have gradually replaced traditional paper invoices with their advantages such as convenience, environmental protection, low cost, and high efficiency. Electronic invoices can even achieve invoice-free reimbursement in the field of reimbursement, which is deeply loved by enterprises and users. However, the management system of electronic invoices is not yet fully perfect, and there may be risks of duplicate reimbursement and false reimbursement in the reimbursement of electronic invoices. Therefore, avoiding duplicate reimbursement and false reimbursement of electronic invoices is an urgent problem to be solved currently. Summary of the Invention
[0003] Embodiments of this application propose a method, device, and medium for processing bills, which helps to avoid duplicate reimbursement of bills and simplifies the bill issuance and processing process.
[0004] On the one hand, embodiments of this application provide a method for processing bills. The method is applied to a blockchain node device, and the method includes:
[0005] Receiving target bill information generated by a bill issuance user for a bill application user;
[0006] Storing the target bill information in the blockchain. The target bill information includes bill content and a bill signature. The bill signature includes: a first public key and a second public key. The first public key is the encryption public key corresponding to the bill application user on the blockchain network, and the second public key is the encryption public key corresponding to the bill management user on the blockchain network;
[0007] When receiving a transfer request for the target bill information, matching and verifying the verification private key carried in the transfer request with the first public key, or matching and verifying the verification private key carried in the transfer request with the second public key;
[0008] If the result of the matching verification is that the verification private key matches the first public key or the verification private key matches the second public key, then responding to the transfer request and performing transfer processing on the target bill information according to the bill reimbursement user identifier included in the transfer request.
[0009] On the other hand, an embodiment of the present application provides a blockchain node device, which has the function of implementing the above-mentioned bill processing method. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes:
[0010] A receiving unit, configured to receive target bill information generated by a bill issuing user for a bill applying user;
[0011] A storage unit, configured to store the target bill information in the blockchain. The target bill information includes bill content and a bill signature. The bill signature includes: a first public key and a second public key. The first public key is the encryption public key corresponding to the bill applying user on the blockchain network, and the second public key is the encryption public key corresponding to the bill management user on the blockchain network;
[0012] A verification unit, configured to, when receiving a transfer request for the target bill information, perform matching verification between the to-be-verified private key carried in the transfer request and the first public key, or perform matching verification between the to-be-verified private key carried in the transfer request and the second public key;
[0013] A transfer unit, configured to, if the result of the matching verification is that the to-be-verified private key matches the first public key or the to-be-verified private key matches the second public key, respond to the transfer request and perform transfer processing on the target bill information according to the bill reimbursement user identifier included in the transfer request.
[0014] On the other hand, an embodiment of the present application provides a blockchain node device, which includes a memory and a processor. The memory stores a set of program codes, and the processor calls the program codes stored in the memory to perform operations involved in the above-mentioned bill processing method.
[0015] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which is used to store computer program instructions for a blockchain node device and includes programs for performing operations involved in the above-mentioned bill processing method.
[0016] Using the embodiment of the present application, the blockchain node device first receives the target bill information generated by the bill issuing user for the bill applying user, and then stores the target bill information in the blockchain. The target bill information includes bill content and bill signature. The bill signature includes: a first public key and a second public key. The first public key is the encryption public key corresponding to the bill applying user on the blockchain network, and the second public key is the encryption public key corresponding to the bill management user on the blockchain network. When receiving a transfer request for the target bill information, match and verify the private key to be verified carried in the transfer request with the first public key, or match and verify the private key to be verified carried in the transfer request with the second public key. Finally, if the result of the match verification is that the private key to be verified matches the first public key, or the private key to be verified matches the second public key, then respond to the transfer request, and perform transfer processing on the target bill information according to the bill reimbursement user identifier included in the transfer request. Since the bill applying user has only one transfer authority for the target bill information, after the transfer, the bill reimbursement user can sign the target bill information with the private key, so that other users cannot obtain the target bill information again, ensuring that the bill applying user can only reimburse the bill indicated by the target bill information once. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0018] Figure 1a It is a schematic diagram of the bill processing system architecture provided by the embodiment of the present application;
[0019] Figure 1b It is a schematic diagram of the structure of a blockchain provided by the embodiment of the present application;
[0020] Figure 2 It is a schematic flowchart of a bill processing method provided by the embodiment of the present application;
[0021] Figure 3 It is a schematic flowchart of another bill processing method provided by the embodiment of the present application;
[0022] Figure 4 It is a schematic diagram of the structure of a blockchain node device provided by the embodiment of the present application;
[0023] Figure 5 It is a schematic diagram of the structure of another blockchain node device provided by the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0025] The terms "first", "second", "third", etc. in the specification and claims of the present invention and the above-mentioned accompanying drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or modules is not limited to the listed steps or modules, but optionally further includes steps or modules not listed, or optionally further includes other steps or modules inherent to these processes, methods, products or devices.
[0026] Referring to "embodiments" herein means that the specific features, structures or characteristics described in connection with the embodiments can be included in at least one embodiment of the present invention. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0027] To better understand a bill processing method, device and medium disclosed in the embodiments of the present invention, the system architecture applicable to the embodiments of the present invention will be described first below.
[0028] Please refer to Figure 1a as Figure 1aAs shown in the figure, the bill processing system architecture includes a first blockchain node device, a second blockchain node device, a third blockchain node device, a fourth blockchain node device, and a blockchain network. Among them, the first blockchain node device can be the device corresponding to the bill issuer in the blockchain, the second blockchain node device can be the device corresponding to the bill applicant in the blockchain, the third blockchain node device can be the device corresponding to the bill manager in the blockchain, and the fourth blockchain node device can be the device corresponding to the bill reimburse user in the blockchain. The first blockchain node device, the second blockchain node device, the third blockchain node device, and the fourth blockchain node device can be clients or servers, which is not limited in the embodiments of the present application. Among them, the client can be any one of the following: a terminal, an independent application, an API (Application Programming Interface), or an SDK (Software Development Kit). Among them, the terminal can include, but is not limited to: smartphones (such as Android phones, iOS phones, etc.), tablets, portable personal computers, mobile Internet devices (Mobile Internet Devices, abbreviated as MID), etc., which is not limited in the embodiments of the present invention.
[0029] Among them, the blockchain is a chained data structure formed by combining data blocks in sequence according to the time sequence, and a distributed ledger that ensures the data cannot be tampered with and forged by cryptographic means. Multiple independent distributed nodes (i.e., the first blockchain node device) store the same records. The blockchain technology has achieved decentralization and has become the cornerstone of reliable digital asset storage, transfer, and transaction. Taking Figure 1b the structural schematic diagram of the blockchain shown in the figure as an example, whenever new data needs to be written into the blockchain, these data will be aggregated into a block and added to the end of the existing blockchain. Through the consensus algorithm, it is ensured that the newly added blocks of each node are exactly the same. Each block records the platform protocol data and / or activity announcement data, and at the same time contains the hash value of the previous block. All blocks save the hash value in the previous block in this way and are connected in sequence to form the blockchain. The hash value of the previous block will be stored in the block header of the next block in the blockchain. When the fingerprint data in the previous block changes, the hash value of this block will also change accordingly. Therefore, it is difficult to tamper with the fingerprint data uploaded to the blockchain network. The transaction between the client and the business platform on the blockchain realizes the openness and transparency of the transaction process and improves the reliability of the fingerprint data.
[0030] The present application provides a bill processing method based on blockchain, aiming to solve the problems of duplicate reimbursement of electronic bills and fraudulent reimbursement bills in the traditional bill process, and at the same time simplify the bill issuance and reimbursement process. In the bill processing method provided by the present application, the blockchain node device first receives the target bill information generated by the bill issuance user for the bill application user, and then stores the target bill information in the blockchain. The target bill information includes bill content and bill signature. The bill signature includes: a first public key and a second public key. The first public key is the encryption public key corresponding to the bill application user on the blockchain network, and the second public key is the encryption public key corresponding to the bill management user on the blockchain network. When receiving a transfer request for the target bill information, the blockchain node device matches the verification private key carried in the transfer request with the first public key, or matches the verification private key carried in the transfer request with the second public key. Finally, if the result of the matching verification is that the verification private key matches the first public key, or the verification private key matches the second public key, the blockchain node device responds to the transfer request and performs transfer processing on the target bill information according to the bill reimbursement user identifier included in the transfer request. Since the bill application user has only one transfer right for the target bill information, after the transfer, the bill reimbursement user can sign the target bill information with the private key, so that other users cannot obtain the target bill information again, ensuring that the bill application user can only reimburse the bill indicated by the target bill information once.
[0031] Please refer to Figure 2 , Figure 2 FIG. is a schematic flowchart of a bill processing method provided by an embodiment of the present application. This method is applied to a blockchain node device and includes but is not limited to the following steps S201 to S204:
[0032] S201. Receive the target bill information generated by the bill issuance user for the bill application user.
[0033] In the process of bill issuance and reimbursement, it involves a bill application user (such as a consumer), a bill issuance user (such as an invoicing enterprise), a bill management user (such as a tax bureau), and a bill reimbursement user (such as a reimbursement enterprise). Among them, the bill application user, the bill issuance user, the bill management user, and the bill reimbursement user can upload the obtained bill information to the blockchain or obtain bill information from the blockchain through their respective associated blockchain node devices, which is equivalent to forming a tax chain. The bill information can be circulated or transferred on the tax chain, and the bill information is unique. After the bill issuance user generates the target bill information for the bill application user, the bill issuance user can upload the target bill information to the blockchain, so that the target bill information can be transferred to the bill reimbursement user through the blockchain.
[0034] S202. Store the target bill information in the blockchain. The target bill information includes bill content and a bill signature. The bill signature includes: a first public key and a second public key. The first public key is the encryption public key corresponding to the bill application user on the blockchain network, and the second public key is the encryption public key corresponding to the bill management user on the blockchain network.
[0035] After obtaining the target bill information generated by the bill issuing user for the bill application user, upload the target bill information to the blockchain. In a specific implementation, storing the target bill information in the blockchain includes: broadcasting the target bill information so that the node devices in the blockchain perform a consensus check on the target bill information; if the node devices in the blockchain pass the check on the target bill information, then package the key information into a first block and link the first block to the blockchain. In this way, the target bill information is successfully stored in the blockchain.
[0036] The target bill information includes bill content and a bill signature. The bill signature includes a first public key and a second public key. The second public key is the encryption public key corresponding to the bill application user on the blockchain, and the second public key is the encryption public key corresponding to the bill management user on the blockchain. This is equivalent to the bill issuing user taking the bill content as bill assets and simultaneously issuing them to the address of the bill application user on the blockchain and the address of the bill management user on the blockchain. Among them, the address of the bill application user on the blockchain can be understood as the first public key corresponding to the consumer, and the address corresponding to the bill management user on the blockchain can be understood as the second public key corresponding to the tax bureau.
[0037] S203. When receiving a transfer request for the target bill information, match and verify the private key to be verified carried in the transfer request with the first public key, or match and verify the private key to be verified carried in the transfer request with the second public key.
[0038] When receiving a transfer request for a target bill, the transfer request may be initiated by the bill management user or the bill application user. Since the private key to be verified is carried in the transfer request, matching verification can be performed through the private key to be verified. When it is detected that the private key to be verified matches the first public key, it can be determined that the transfer request is sent by the bill application user. Or, when it is detected that the private key to be verified matches the second public key, it can be determined that the transfer request is sent by the bill management user.
[0039] In one implementation, the transfer request for the target bill information includes: a first transfer request sent by a bill management user. When receiving the transfer request for the target bill information, matching and verifying the to-be-verified private key carried in the transfer request with the first public key, or matching and verifying the to-be-verified private key carried in the transfer request with the second public key, includes: querying in the blockchain for the target bill information corresponding to the target bill identifier carried in the first transfer request; extracting the private key of the bill management user carried in the first transfer request as the to-be-verified private key; verifying whether the to-be-verified private key matches the second public key included in the queried target bill information; if it matches, the verification is successful, otherwise the verification fails. Both the bill application user and the bill management user have the permission to transfer the target bill information from the blockchain. Therefore, the transfer request sent for the target bill information can be the first transfer request sent by the bill management user. At this time, according to the target bill identifier carried in the first transfer request, the target bill information corresponding to the target bill identifier can be queried in the blockchain. Thus, the private key of the bill management user carried in the first transfer request can be extracted as the to-be-verified private key. By verifying whether the to-be-verified private key matches the second public key included in the target bill information, it can be determined whether to transfer the target bill information to the bill management user. If the match is successful, the transfer is initiated; if the match fails, the transfer is rejected.
[0040] For example, the bill management user corresponds to the tax bureau. The tax bureau stores a large number of bill information in the blockchain. When receiving the first transfer request sent by the tax bureau, it is first necessary to determine which bill information the tax bureau wants to transfer according to the target bill information identifier in the first transfer request. After finding the target bill information corresponding to the target bill identifier, it is detected whether the private key carried in the first transfer request matches the second public key corresponding to the tax bureau in the blockchain. If so, it can be proved that the first transfer request is indeed initiated by the tax bureau, that is, the identity verification is successful. At this time, the tax bureau can be granted the transfer permission for the target bill information, so that the tax bureau can transfer the target bill information to the bill reimbursement user corresponding to the bill reimbursement user identifier.
[0041] In a specific implementation, the target bill identifier carried in the first transfer request is obtained by the bill management user based on the key information sent by the user terminal corresponding to the bill reimbursement user identifier; the key information is obtained by the user terminal corresponding to the bill reimbursement user identifier based on the bill voucher file sent by the user terminal corresponding to the bill application user identifier, and the bill voucher file is sent by the user terminal corresponding to the bill issuing user identifier to the user terminal corresponding to the bill application user identifier after generating the target bill information. The target bill identifier carried in the first transfer request is obtained by the bill management user based on the key information sent by the user terminal corresponding to the bill reimbursement user identifier, and the key information may be one or more of the ticket number information, the bill issuing user information, the bill issuing date information, and the bill issuing amount information. The key information is obtained by the user terminal corresponding to the bill reimbursement user identifier based on the bill voucher file sent by the user terminal corresponding to the bill application user, and the bill file is sent by the user terminal corresponding to the bill issuing user identifier to the bill application user after generating the target bill information. Among them, before the bill application user initiates a bill issuance request to the bill issuing user through the blockchain network, the bill application user needs to upload identity authentication information. After passing the real-name authentication, the bill issuing user will respond to the bill issuance request and send the target bill information generated for the bill application user to the blockchain.
[0042] For example, a consumer applies to an invoicing company for a designated invoice. After issuing the designated invoice, the invoicing company generates an invoice voucher, which can be a PDF file, and sends the invoice voucher to the consumer terminal. The consumer terminal sends the invoice voucher to the reimbursement company terminal. When the reimbursement company wants to obtain the designated invoice from the tax bureau, it can extract key information from the PDF file and send the key information to the tax bureau terminal, so that the tax bureau terminal can quickly find the designated invoice from a large number of invoices based on the key information.
[0043] In one implementation, the transfer request for the target bill information includes: a first transfer request sent by the bill application user. When receiving the transfer request for the target bill information, matching and verifying the to-be-verified private key carried in the transfer request with the first public key, or matching and verifying the to-be-verified private key carried in the transfer request with the second public key, includes: extracting the private key of the bill application user carried in the second transfer request as the to-be-verified private key; verifying whether the to-be-verified private key matches the first public key included in the queried target bill information; if it matches, the verification is successful, otherwise the verification fails. Both the bill application user and the bill management user have the permission to transfer the target bill information from the blockchain. Therefore, the transfer request sent for the target bill information can be a second transfer request sent by the bill application user. At this time, the private key of the bill application user carried in the second transfer request can be directly extracted as the to-be-verified private key. By verifying whether the to-be-verified private key matches the first public key included in the target bill information, it can be determined whether to transfer the target bill information to the bill application user. If the match is successful, the transfer is initiated; if the match fails, the transfer is rejected.
[0044] For example, the bill application user corresponds to a consumer. The consumer can obtain an invoice through a hosting platform such as WeChat. When receiving the second transfer request sent by the consumer, it is detected whether the private key carried in the second transfer request matches the first public key corresponding to the consumer in the blockchain. If so, it can be proved that the second transfer request is indeed initiated by the consumer who has passed real-name authentication, that is, the identity verification is successful. At this time, the consumer can be granted the transfer permission for the target bill information. Thus, the consumer can obtain the target bill information through a hosting platform such as WeChat, and then the consumer can transfer the target bill information to the bill reimbursement user corresponding to the bill reimbursement user identifier.
[0045] S204. If the result of the matching verification is that the to-be-verified private key matches the first public key or the to-be-verified private key matches the second public key, then in response to the transfer request, perform a transfer process on the target bill information according to the bill reimbursement user identifier included in the transfer request.
[0046] When the private key to be verified carried in the transfer request matches the first public key, it can be determined that the transfer request is sent by the bill application user. That is, the bill application user can transfer the target bill information through the private key to be verified. When the private key to be verified carried in the transfer request matches the second public key, it can be determined that the transfer request is sent by the bill management user. That is, the bill management user can transfer the target bill information through the private key to be verified. Furthermore, the target bill information is then transferred by the bill application user or the bill management user to the bill reimbursement user corresponding to the bill reimbursement user identifier. For the bill application user, that is, the consumer, the process of bill issuance and reimbursement is completed.
[0047] In one implementation, the transferring and processing the target bill information according to the bill reimbursement user identifier included in the transfer request includes: updating the target bill information, and the update includes: deleting the first public key in the target bill information and adding the third public key corresponding to the bill reimbursement user on the blockchain network to the target bill information. After transferring the target bill information to the bill reimbursement user corresponding to the bill reimbursement user identifier, the target bill information needs to be updated, that is, deleting the first public key in the target bill information and adding the third public key corresponding to the bill reimbursement user on the blockchain network to the target bill information. In this way, the bill application user no longer has the permission to transfer the target bill information, and only the bill reimbursement user can transfer the target bill information through its own private key. Regarding the second public key in the target bill information, it can be deleted or not. By retaining the second public key, the bill management user can still process the target bill information. When the private key of the bill reimbursement user matches the third public key, the bill reimbursement user can have the permission to process the target bill information.
[0048] For example, existing electronic invoices can be reimbursed repeatedly, especially electronic invoices issued for individual users, which are not related to the company, and electronic invoices are generally sent to consumers' mailboxes in the form of PDF, so consumers can copy the invoices and reimburse the copied invoices repeatedly. In the blockchain-based bill processing method, the invoice uploaded to the blockchain by the billing company is not a file, but can be understood as an asset. Assets can be transferred, and the asset holder no longer holds the asset after transferring it. Consumers first need to perform real-name authentication on the blockchain, so that consumers can use their own private keys to transfer the bill assets to the reimbursement company. At this time, the consumer no longer has the bill asset. If the bill asset is to be circulated again, the reimbursement company can only use its own private key to transfer the bill asset again. Consumers have to interact a lot with the blockchain during the reimbursement process. Consumers can use WeChat, DingTalk or other platforms to host invoices. When using WeChat to host invoices, WeChat uses its own private key to sign the bill asset and give it to the reimbursement company. Therefore, the reimbursement company needs to connect with the WeChat platform. When consumers use different platforms, the reimbursement company needs to connect with different platforms, which makes the processing process cumbersome. This application introduces a multi-signature method. The invoicing company issues the bill asset to the consumer address and the tax bureau address. At this time, the reimbursement company can use the consumer's private key to transfer the bill asset, or use the tax bureau's private key to transfer the bill asset, so that it no longer needs to connect with the WeChat platform, which helps to improve processing efficiency.
[0049] The embodiment of the present application proposes a bill processing method, which is applied to a blockchain node device. The blockchain node device first receives the target bill information generated by the bill issuing user for the bill applying user, and then stores the target bill information in the blockchain. The target bill information includes the bill content and the bill signature. The bill signature includes: a first public key and a second public key. The first public key is the encrypted public key corresponding to the bill applying user on the blockchain network, and the second public key is the encrypted public key corresponding to the bill management user on the blockchain network. When a transfer request for the target bill information is received, the private key to be verified carried in the transfer request is matched with the first public key. Verify, or match and verify the private key to be verified carried in the transfer request and the second public key. Finally, if the result of the matching verification is that the private key to be verified matches the first public key, or the private key to be verified matches the second public key, respond to the transfer request, and transfer the target ticket information according to the ticket reimbursement user identifier included in the transfer request. Since the ticket application user has only one transfer authority to the target ticket information, the ticket reimbursement user can use the private key to sign the target ticket information after the transfer, so that other users cannot obtain the target ticket information again, which ensures that the ticket application user can only reimburse the ticket indicated by the target ticket information once.
[0050] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of another bill processing method provided by an embodiment of the present application. This method is applied to a blockchain node device, and this method includes but is not limited to the following steps S301 to S306:
[0051] S301. Receive the target bill information generated by the bill issuing user for the bill applying user.
[0052] S302. Store the target bill information in the blockchain. The target bill information includes bill content and bill signature. The bill signature includes: a first public key and a second public key. The first public key is the encryption public key corresponding to the bill applying user on the blockchain network, and the second public key is the encryption public key corresponding to the bill management user on the blockchain network.
[0053] S303. When receiving a transfer request for the target bill information, match and verify the to-be-verified private key carried in the transfer request with the first public key, or match and verify the to-be-verified private key carried in the transfer request with the second public key.
[0054] S304. If the result of the match verification is that the to-be-verified private key matches the first public key, or the to-be-verified private key matches the second public key, then respond to the transfer request, and perform transfer processing on the target bill information according to the bill reimbursement user identifier included in the transfer request.
[0055] Among them, steps S301 - S304 above can be referred to Figure 2 steps S201 - S204 in, which will not be elaborated here.
[0056] S305. Receive a bill storage request sent by the client corresponding to the bill reimbursement user identifier. The storage request includes bill content encrypted data, and the bill content encrypted data includes: data obtained by encrypting the bill content included in the target bill information using the bill reimbursement user private key by the client corresponding to the bill reimbursement user.
[0057] After obtaining the target bill information, the bill reimbursement user can obtain the bill content from the target bill information, thus ending the reimbursement process of the bill applying user for the target bill information. At this time, the bill reimbursement user can encrypt the bill content with his own private key and upload the encrypted bill content to the blockchain.
[0058] S306. Store the bill content encrypted data included in the storage request in the blockchain.
[0059] In one implementation, storing the encrypted data of the bill content included in the storage request in the blockchain includes: broadcasting the encrypted data of the bill content so that the node devices in the blockchain perform consensus verification on the encrypted data of the bill content; if the node devices in the blockchain pass the verification of the encrypted data of the bill content, then packing the encrypted data of the bill content into a first block and linking the first block to the blockchain. In this way, the user of bill reimbursement uploads the encrypted bill content to the blockchain using a private key.
[0060] An embodiment of the present application provides a bill processing method, which is applied to a blockchain node device. The blockchain node device first receives the target bill information generated by the bill issuing user for the bill applying user, and then stores the target bill information in the blockchain. The target bill information includes bill content and a bill signature. The bill signature includes: a first public key and a second public key. The first public key is the encrypted public key corresponding to the bill applying user on the blockchain network, and the second public key is the encrypted public key corresponding to the bill management user on the blockchain network. When receiving a transfer request for the target bill information, match and verify the private key to be verified carried in the transfer request with the first public key, or match and verify the private key to be verified carried in the transfer request with the second public key. Finally, if the result of the match verification is that the private key to be verified matches the first public key, or the private key to be verified matches the second public key, then respond to the transfer request and perform transfer processing on the target bill information according to the bill reimbursement user identifier included in the transfer request. Since the bill applying user has only one transfer right for the target bill information, after the transfer, the bill reimbursement user can sign the target bill information with a private key, so that other users cannot obtain the target bill information again, ensuring that the bill applying user can only reimburse the bill indicated by the target bill information once.
[0061] Please refer to Figure 4 , Figure 4 FIG. is a schematic structural diagram of a blockchain node device provided by an embodiment of the present application. The blockchain node device is used to execute Figures 2 to 3 the steps performed by the first blockchain node device in the corresponding method embodiment. The blockchain node device includes: one or more processors 401; one or more input devices 402, one or more output devices 403, and a memory 404. The above-mentioned processors 401, input devices 402, output devices 403, and memory 404 are connected through a bus 404. The memory 402 is used to store a computer program, and the computer program includes program instructions. The processors 401, input devices 402, and output devices 403 are used to execute the program instructions stored in the memory 404 and perform the following operations:
[0062] The input device 402 receives the target bill information generated by the bill issuing user for the bill applying user;
[0063] The processor 401 stores the target bill information in the blockchain. The target bill information includes bill content and a bill signature. The bill signature includes: a first public key and a second public key. The first public key is the encryption public key corresponding to the bill applying user on the blockchain network, and the second public key is the encryption public key corresponding to the bill management user on the blockchain network;
[0064] When the input device 402 receives a transfer request for the target bill information, it performs a matching verification between the to-be-verified private key carried in the transfer request and the first public key, or performs a matching verification between the to-be-verified private key carried in the transfer request and the second public key;
[0065] If the result of the matching verification is that the to-be-verified private key matches the first public key, or the to-be-verified private key matches the second public key, the output device 403 responds to the transfer request and performs a transfer process on the target bill information according to the bill reimbursement user identifier included in the transfer request.
[0066] It can be seen that the embodiment of the present application proposes a bill processing method. This method is applied to a blockchain node device. The blockchain node device first receives the target bill information generated by the bill issuing user for the bill applying user, and then stores the target bill information in the blockchain. The target bill information includes bill content and a bill signature. The bill signature includes: a first public key and a second public key. The first public key is the encryption public key corresponding to the bill applying user on the blockchain network, and the second public key is the encryption public key corresponding to the bill management user on the blockchain network. When receiving a transfer request for the target bill information, it performs a matching verification between the to-be-verified private key carried in the transfer request and the first public key, or performs a matching verification between the to-be-verified private key carried in the transfer request and the second public key. Finally, if the result of the matching verification is that the to-be-verified private key matches the first public key, or the to-be-verified private key matches the second public key, it responds to the transfer request and performs a transfer process on the target bill information according to the bill reimbursement user identifier included in the transfer request. Since the bill applying user has only one transfer authority for the target bill information, after the transfer, the bill reimbursement user can sign the target bill information with the private key, so that other users cannot obtain the target bill information again, ensuring that the bill applying user can only reimburse the bill indicated by the target bill information once.
[0067] In one implementation, the transfer request for the target bill information includes: a first transfer request sent by a bill management user. When the processor 401 receives the transfer request for the target bill information, it performs a matching verification between the to-be-verified private key carried in the transfer request and the first public key, or performs a matching verification between the to-be-verified private key carried in the transfer request and the second public key, including:
[0068] Query the target bill information corresponding to the target bill identifier in the blockchain according to the target bill identifier carried in the first transfer request;
[0069] Extract the private key of the bill management user carried in the first transfer request as the to-be-verified private key;
[0070] Verify whether the to-be-verified private key matches the second public key included in the queried target bill information;
[0071] If they match, the verification is successful; otherwise, the verification fails.
[0072] In one implementation, the target bill identifier carried in the first transfer request is obtained by the bill management user based on the key information sent by the corresponding client of the bill reimbursement user identifier;
[0073] The key information is obtained by the client corresponding to the bill reimbursement user identifier based on the bill voucher file sent by the client corresponding to the bill application user identifier. The bill voucher file is sent by the client corresponding to the bill issuing user identifier to the client corresponding to the bill application user identifier after generating the target bill information.
[0074] In one implementation, the transfer request for the target bill information includes: a first transfer request sent by a bill application user. When the processor 401 receives the transfer request for the target bill information, it performs a matching verification between the to-be-verified private key carried in the transfer request and the first public key, or performs a matching verification between the to-be-verified private key carried in the transfer request and the second public key, including:
[0075] Extract the private key of the bill application user carried in the second transfer request as the to-be-verified private key;
[0076] Verify whether the to-be-verified private key matches the first public key included in the queried target bill information;
[0077] If they match, the verification is successful; otherwise, the verification fails.
[0078] In one implementation, the processor 401 performs transfer processing on the target bill information according to the bill reimbursement user identifier included in the transfer request, including:
[0079] Update the target bill information, where the update includes: deleting the first public key in the target bill information, and adding the third public key corresponding to the bill reimbursement user on the blockchain network to the target bill information.
[0080] In one implementation, after the processor 401 performs transfer processing on the target bill information according to the reimbursement user identifier included in the transfer request, the method further includes:
[0081] Receive a bill storage request sent by the client corresponding to the bill reimbursement user identifier, where the storage request includes encrypted bill content data, and the encrypted bill content data includes: data obtained by encrypting the bill content included in the target bill information using the private key of the bill reimbursement user by the client corresponding to the bill reimbursement user;
[0082] Store the encrypted bill content data included in the storage request in the blockchain.
[0083] In one implementation, when the processor 401 stores the encrypted bill content data included in the storage request in the blockchain, it includes:
[0084] Broadcast the encrypted bill content data so that the node devices in the blockchain perform consensus verification on the encrypted bill content data;
[0085] If the node devices in the blockchain pass the verification of the encrypted bill content data, package the encrypted bill content data into a first block and link the first block to the blockchain.
[0086] Please refer to Figure 5 , Figure 5 FIG. is a schematic structural diagram of a blockchain node device provided by an embodiment of the present application. This blockchain node device is used to execute Figures 2 to 3 The steps executed by the first blockchain node device in the corresponding method embodiment. This blockchain node device may include:
[0087] A receiving unit 501, configured to receive target bill information generated by a bill issuing user for a bill applying user;
[0088] A storage unit 502, configured to store the target bill information in the blockchain. The target bill information includes bill content and a bill signature. The bill signature includes: a first public key and a second public key. The first public key is the encryption public key corresponding to the bill applying user on the blockchain network, and the second public key is the encryption public key corresponding to the bill management user on the blockchain network;
[0089] A verification unit 503, configured to, when receiving a transfer request for the target bill information, perform matching verification on the to-be-verified private key carried in the transfer request and the first public key, or perform matching verification on the to-be-verified private key carried in the transfer request and the second public key;
[0090] A transfer unit 504, configured to, if the result of the matching verification is that the to-be-verified private key matches the first public key or the to-be-verified private key matches the second public key, respond to the transfer request and perform transfer processing on the target bill information according to the bill reimbursement user identifier included in the transfer request.
[0091] It can be seen that the embodiment of the present application proposes a bill processing method, which is applied to a blockchain node device. The blockchain node device first receives target bill information generated by a bill issuing user for a bill applying user, and then stores the target bill information in the blockchain. The target bill information includes bill content and a bill signature, and the bill signature includes: a first public key and a second public key. The first public key is the encryption public key corresponding to the bill applying user on the blockchain network, and the second public key is the encryption public key corresponding to the bill management user on the blockchain network. When receiving a transfer request for the target bill information, perform matching verification on the to-be-verified private key carried in the transfer request and the first public key, or perform matching verification on the to-be-verified private key carried in the transfer request and the second public key. Finally, if the result of the matching verification is that the to-be-verified private key matches the first public key or the to-be-verified private key matches the second public key, respond to the transfer request and perform transfer processing on the target bill information according to the bill reimbursement user identifier included in the transfer request. Since the bill applying user has only one transfer right for the target bill information, after the transfer, the bill reimbursement user can sign the target bill information with the private key, so that other users cannot obtain the target bill information again, ensuring that the bill applying user can only reimburse the bill indicated by the target bill information once.
[0092] In one implementation, the transfer request for the target bill information includes: a first transfer request sent by a bill management user. When receiving the transfer request for the target bill information and performing matching verification on the to-be-verified private key carried in the transfer request and the first public key, or performing matching verification on the to-be-verified private key carried in the transfer request and the second public key, the processing unit 502 further includes:
[0093] Query, in the blockchain, the target bill information corresponding to the target bill identifier carried in the first transfer request;
[0094] Extract the private key of the bill management user carried in the first transfer request as the private key to be verified;
[0095] Verify whether the private key to be verified matches the second public key included in the queried target bill information;
[0096] If they match, the verification is successful; otherwise, the verification fails.
[0097] In one implementation, the target bill identifier carried in the first transfer request is obtained by the bill management user based on the key information sent to the corresponding client according to the bill reimbursement user identifier;
[0098] The key information is obtained by the client corresponding to the bill reimbursement user identifier based on the bill voucher file sent by the client corresponding to the bill application user identifier. The bill voucher file is sent by the client corresponding to the bill issuing user identifier to the client corresponding to the bill application user identifier after generating the target bill information.
[0099] In one implementation, the transfer request for the target bill information includes: a first transfer request sent by the bill application user. When receiving the transfer request for the target bill information, when matching and verifying the private key to be verified carried in the transfer request with the first public key or matching and verifying the private key to be verified carried in the transfer request with the second public key, the processing unit 502 further includes:
[0100] Extract the private key of the bill application user carried in the second transfer request as the private key to be verified;
[0101] Verify whether the private key to be verified matches the first public key included in the queried target bill information;
[0102] If they match, the verification is successful; otherwise, the verification fails.
[0103] In one implementation, when performing transfer processing on the target bill information according to the bill reimbursement user identifier included in the transfer request, the processing unit 502 further includes:
[0104] Update the target bill information. The update includes: deleting the first public key in the target bill information and adding the third public key corresponding to the bill reimbursement user on the blockchain network to the target bill information.
[0105] In one implementation, after performing transfer processing on the target bill information according to the reimbursement user identifier included in the transfer request, the processing unit 502 further includes:
[0106] Receive a bill storage request sent by the client corresponding to the bill reimbursement user identifier. The storage request includes encrypted bill content data, and the encrypted bill content data includes: data obtained by encrypting the bill content included in the target bill information using the private key of the bill reimbursement user by the client corresponding to the bill reimbursement user;
[0107] Store the encrypted bill content data included in the storage request in the blockchain.
[0108] In one implementation, when storing the encrypted bill content data included in the storage request in the blockchain, the processing unit 502 further includes:
[0109] Broadcast the encrypted bill content data so that the node devices in the blockchain perform consensus verification on the encrypted bill content data;
[0110] If the node devices in the blockchain pass the verification of the encrypted bill content data, package the encrypted bill content data into a first block and link the first block to the blockchain.
[0111] An embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, the steps executed in the above embodiments can be performed.
[0112] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0113] The foregoing disclosure is only part of the embodiments of the present application. Of course, the scope of the rights of the present application cannot be limited thereby. Those of ordinary skill in the art can understand all or part of the processes of implementing the above embodiments and make equivalent changes according to the claims of the present application, which still fall within the scope covered by the invention.
Claims
1. A bill processing method, characterized in that, the method is applied to a blockchain node device, and the method includes: Receiving target bill information generated by a bill issuing user for a bill applying user; Storing the target bill information in the blockchain, where the target bill information includes bill content and a bill signature, and the bill signature includes: a first public key and a second public key, the first public key is the encryption public key corresponding to the bill applying user on the blockchain network, and the second public key is the encryption public key corresponding to the bill management user on the blockchain network; When receiving a transfer request for the target bill information, matching and verifying the verification private key carried in the transfer request with the first public key, or matching and verifying the verification private key carried in the transfer request with the second public key; If the result of the matching verification is that the verification private key matches the first public key, or the verification private key matches the second public key, then respond to the transfer request, and perform transfer processing on the target bill information according to the bill reimbursement user identifier included in the transfer request.
2. The method according to claim 1, characterized in that, the transfer request for the target bill information includes: a first transfer request sent from a bill management user, and when receiving a transfer request for the target bill information, matching and verifying the verification private key carried in the transfer request with the first public key, or matching and verifying the verification private key carried in the transfer request with the second public key, includes: Querying, in the blockchain, target bill information corresponding to the target bill identifier according to the target bill identifier carried in the first transfer request; Extracting the private key of the bill management user carried in the first transfer request as the verification private key; Verifying whether the verification private key matches the second public key included in the queried target bill information; If they match, the verification is successful, otherwise the verification fails.
3. The method according to claim 2, characterized in that, the target bill identifier carried in the first transfer request is obtained from key information sent by the client corresponding to the bill management user according to the bill reimbursement user identifier; The key information is obtained by the client corresponding to the bill reimbursement user identifier from a bill voucher file sent by the client corresponding to the bill applying user identifier, and the bill voucher file is sent by the client corresponding to the bill issuing user identifier to the client corresponding to the bill applying user identifier after generating the target bill information.
4. The method according to claim 1, characterized in that, the transfer request for the target bill information includes: a second transfer request sent from a bill applying user, and when receiving a transfer request for the target bill information, matching and verifying the verification private key carried in the transfer request with the first public key, or matching and verifying the verification private key carried in the transfer request with the second public key, includes: Extracting the private key of the bill applying user carried in the second transfer request as the verification private key; Verify whether the private key to be verified matches the first public key included in the queried target bill information; If they match, the verification is successful; otherwise, the verification fails.
5. The method according to any one of claims 1-4, characterized in that, The transferring the target bill information according to the bill reimbursement user identifier included in the transfer request includes: Updating the target bill information, the update including: deleting the first public key in the target bill information and adding the third public key corresponding to the bill reimbursement user on the blockchain network to the target bill information.
6. The method according to any one of claims 1-4, characterized in that, After the transferring the target bill information according to the reimbursement user identifier included in the transfer request, the method further includes: Receiving a bill storage request sent by the client corresponding to the bill reimbursement user identifier, the storage request including bill content encrypted data, and the bill content encrypted data including: data obtained by encrypting the bill content included in the target bill information with the private key of the bill reimbursement user by the client corresponding to the bill reimbursement user; Storing the bill content encrypted data included in the storage request in the blockchain.
7. The method according to claim 6, characterized in that, The storing the bill content encrypted data included in the storage request in the blockchain includes: Broadcasting the bill content encrypted data so that the node devices in the blockchain perform consensus verification on the bill content encrypted data; If the node devices in the blockchain pass the verification of the bill content encrypted data, packing the bill content encrypted data into a first block and linking the first block to the blockchain.
8. A bill processing device, characterized in that, comprising: A receiving unit, configured to receive target bill information generated by a bill issuing user for a bill applying user; A storage unit, configured to store the target bill information in a blockchain, the target bill information including bill content and a bill signature, and the bill signature including: a first public key and a second public key, where the first public key is an encryption public key corresponding to the bill applying user on the blockchain network, and the second public key is an encryption public key corresponding to the bill management user on the blockchain network; A verification unit, configured to, when receiving a transfer request for the target bill information, perform matching verification on the private key to be verified carried in the transfer request and the first public key, or perform matching verification on the private key to be verified carried in the transfer request and the second public key; A transfer unit, configured to, if the result of the matching verification is that the private key to be verified matches the first public key or the private key to be verified matches the second public key, respond to the transfer request and transfer the target bill information according to the bill reimbursement user identifier included in the transfer request.
9. A blockchain node device, characterized in that, It includes a processor, an input device, an output device, and a memory. The processor, input device, output device, and memory are interconnected. Among them, the memory is used to store a computer program, and the computer program includes program instructions. The processor is configured to call the program instructions to execute the bill processing method according to any one of claims 1-7.
10. A computer storage medium, characterized in that the computer storage medium stores computer program instructions, and the computer program instructions are adapted to be loaded and executed by a processor to execute the bill processing method according to any one of claims 1-7.
Citation Information
Patent Citations
Method and system for issuing online invoice with two-dimension code
CN105678598A
Electronic invoice reimbursement method and device, data sharing server and system
CN109978479A