Electronic bill generation method, device, computer equipment and storage medium

By using blockchain technology in the electronic bill generation method, searching the bill information based on the payment identifier and generating the electronic bill, the problem of low authenticity of electronic bills is solved and higher authenticity and anti-counterfeiting are achieved.

CN110599268BActive Publication Date: 2025-04-01TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201910871956.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-16
Publication Date
2025-04-01
Estimated Expiration
2040-03-08

AI Technical Summary

Technical Problem

In the prior art, the authenticity of electronic bills is low and it is impossible to effectively judge the authenticity of electronic bills.

Method used

By receiving the bill generation request for completed order information, the corresponding bill information is found from the blockchain according to the payment identification, and an electronic bill corresponding to the order information is generated based on the bill information and the payment identification.

Benefits of technology

The authenticity of electronic bills is improved. Through the payment identification and bill information on the blockchain, the order information corresponding to the electronic bill can be effectively checked to prevent the bill from being falsified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110599268B_ABST
    Figure CN110599268B_ABST
Patent Text Reader

Abstract

The present application relates to an electronic invoice generation method, device, computer equipment and storage medium. The method comprises: receiving an invoice generation request for completed order information, the invoice generation request carrying a payment identifier; searching for the invoice information corresponding to the payment identifier from the blockchain according to the payment identifier; and generating an electronic invoice corresponding to the order information according to the invoice information and the payment identifier. The present solution can verify the order information corresponding to the electronic invoice according to the payment identifier on the electronic invoice, thereby improving the authenticity of the electronic invoice.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of bill generation, and in particular to an electronic bill generation method, apparatus, computer equipment and storage medium. Background Art

[0002] With the development of Internet technology, more and more users tend to choose electronic invoices. Electronic invoices are the same as ordinary invoices. They are issued uniformly by the tax bureau to merchants for use. The invoice numbers use a national unified code and unified anti-counterfeiting technology and are assigned to merchants. The electronic invoices are attached with the signature mechanism of the electronic tax bureau.

[0003] However, in the current traditional bill generation method, when applying for an electronic bill, only relevant information such as the seller, buyer, and materials need to be transmitted to the system. The authenticity of the electronic bill cannot be determined, resulting in low authenticity of the electronic bill. Summary of the invention

[0004] Based on this, it is necessary to provide an electronic invoice generation method, apparatus, computer equipment and storage medium that can improve the authenticity of electronic invoices in response to the above technical problems.

[0005] An electronic bill generation method, the method comprising:

[0006] Receive a bill generation request for completed order information, wherein the bill generation request carries a payment identifier;

[0007] According to the payment identifier, search for the bill information corresponding to the payment identifier on the blockchain;

[0008] An electronic invoice corresponding to the order information is issued according to the invoice information and the payment identifier.

[0009] An electronic bill generating device, the device comprising:

[0010] A receiving module, used to receive a bill generation request for completed order information, wherein the bill generation request carries a payment identifier;

[0011] A search module, used to search for bill information corresponding to the payment identifier from the blockchain according to the payment identifier;

[0012] A generating module is used to issue an electronic invoice corresponding to the order information according to the invoice information and the payment identifier.

[0013] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0014] Receive a bill generation request for completed order information, wherein the bill generation request carries a payment identifier;

[0015] According to the payment identifier, search for the bill information corresponding to the payment identifier on the blockchain;

[0016] An electronic invoice corresponding to the order information is issued according to the invoice information and the payment identifier.

[0017] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0018] Receive a bill generation request for completed order information, wherein the bill generation request carries a payment identifier;

[0019] According to the payment identifier, search for the bill information corresponding to the payment identifier on the blockchain;

[0020] An electronic invoice corresponding to the order information is issued according to the invoice information and the payment identifier.

[0021] The above-mentioned electronic invoice generation method, device, computer equipment and storage medium accept a bill generation request for completed order information, and the bill generation request carries the payment identifier of the completed order information. The ticket information corresponding to the payment identifier is searched from the blockchain according to the payment identifier, that is, the received bill generation request is a bill generation request for the completed order information, and the bill generation request cannot be obtained according to the unfinished order information; after obtaining the bill information on the blockchain, the electronic invoice corresponding to the completed order information is generated by using the obtained bill information and the payment identifier, and the order information corresponding to the electronic invoice can be checked according to the payment identifier on the electronic invoice, thereby improving the authenticity of the electronic invoice. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A diagram of an application environment of an electronic bill generation method in one embodiment;

[0023] Figure 2 A schematic diagram of a flow chart of an electronic bill generation method in one embodiment;

[0024] Figure 3 A schematic diagram of a blockchain electronic bill in one embodiment;

[0025] Figure 4 A schematic diagram of a flow chart of an electronic bill generation step in one embodiment;

[0026] Figure 5 A schematic diagram of a flow chart of an electronic bill generating method in another embodiment;

[0027] Figure 6A schematic diagram of the circulation interface of blockchain electronic bills in one embodiment;

[0028] Figure 7 A diagram of an electronic bill generating device in one embodiment;

[0029] Figure 8 It is a structural block diagram of an electronic bill generating device in another embodiment;

[0030] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0032] The electronic bill generation method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102, the blockchain 104 and the server 106 communicate through the network. The terminal 102 receives a bill generation request for the completed order information, and the bill generation request carries a payment identifier. According to the payment identifier, the bill information corresponding to the payment identifier is searched from the blockchain 104, and an electronic bill corresponding to the order information is generated according to the bill information and the payment identifier. Among them, the terminal 102 can be, but not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the blockchain 104 can be, but not limited to, a data sharing system. The data sharing system refers to a system for sharing data between nodes, and the data sharing system may include multiple nodes, and the multiple nodes may refer to each client in the data sharing system. Each node can receive input information when performing normal work, and maintain the shared data in the data sharing system based on the received input information. In order to ensure the information intercommunication within the data sharing system, there can be an information connection between each node in the data sharing system, and the nodes can transmit information through the above information connection. For example, when any node in the data sharing system receives input information, other nodes in the data sharing system obtain the input information according to the consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes in the data sharing system are consistent; server 106 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0033] In one embodiment, Figure 2 As shown, a method for generating an electronic bill is provided, and the method is applied to Figure 1 The following steps are taken as an example of the terminal 102 in FIG. 1 :

[0034] Step 202: Receive a bill generation request for the completed order information, where the bill generation request carries a payment identifier.

[0035] Among them, order information is the relevant data generated for transferring resources. Resources can be items that can be used for transactions; items can be physical items or virtual items or services, etc. Order information includes user information, resource information flow and other data. Among them, user information can include data such as the name, sending address and contact information of the resource sender, the name, receiving address and contact information of the resource receiver, etc.; resource information flow can include data such as item information and item transfer time, and item information can include the size, appearance, shape, and category of the object. When resources are transferred from the sender to the receiver, the generated order information is the completed order information.

[0036] The bill generation request is used to generate an electronic bill for the completed order information. The bill generation request carries a payment identifier. The completed order information corresponds to a unique payment identifier. The payment identifier can be a combination of letters or Arabic numerals of a fixed length. For example, the payment identifier can be the order number in the order information, or the order transaction number when the order information is completed. The bill generation request can be generated by clicking the bill generation button on the order information interface or by clicking the bill generation button on the order completion interface; it can also be generated by receiving the bill generation voice input by the user when generating the completed order information, and converting the voice into a bill generation request. There is no limitation on the generation method of the bill generation request here.

[0037] Specifically, when an individual or enterprise completes a transaction and generates corresponding order information, the terminal detects that the user clicks a bill generation button on the completed order information interface, and receives a generated bill generation request carrying a payment identifier.

[0038] In one embodiment, after the terminal detects that the user has completed the payment, a prompt message indicating successful payment pops up and switches to the interface corresponding to the prompt message, which displays the completed order information. It detects that the bill generation button on the interface is clicked and generates a bill generation request, which carries the payment identifier.

[0039] Step 204, searching the blockchain for the bill information corresponding to the payment identifier according to the payment identifier.

[0040] Among them, blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block.

[0041] The bill information is information used to generate electronic invoices. The bill information may include at least one of the bill issuer identification and the bill recipient identification, bill type, bill code, bill number, billing date, bill value, check code, invoice status, etc. Among them, the bill value may be the actual value of resource transfer; the bill code may be composed of national and local tax codes, administrative region codes, year codes, industry codes, invoice type codes, etc. For example, the invoice code 454545445445 is compiled from left to right in the following order: the first digit is the national and local tax code, the second to fifth digits are the administrative region code, the sixth and seventh digits are the year code, the eighth digit is the industry code, and the ninth to twelfth digits are the invoice type code. One bill code can correspond to multiple electronic invoices; the bill number is the number given by the tax bureau to generate the electronic invoice. Code, the code of each electronic invoice is unique, the invoice number can be a combination of digits of a specified length, and there is no limitation on the composition of the invoice number; the issuer identification is used to identify the unique invoice issuer, which can be an individual or an enterprise. The issuer identification can include the seller's name, taxpayer identification number, contact address and telephone number, bank and account number, etc.; the recipient identification is used to identify the unique electronic invoice recipient, which can be an individual or an enterprise. The recipient identification can include the purchaser's name, taxpayer identification number, contact address and telephone number, etc.

[0042] Specifically, when the terminal receives a bill generation request carrying a payment identifier, the bill information corresponding to the payment identifier is searched on the blockchain according to the payment identifier.

[0043] In one embodiment, the payment identifier carried by the received bill generation request is an order number. Searching for bill information corresponding to the payment identifier from the blockchain according to the payment identifier includes: searching for bill information corresponding to the order number from the blockchain according to the order number, there is a one-to-one correspondence between the order number and the bill information, and the corresponding bill information can be accurately searched from the blockchain according to the order number, saving search time and improving the accuracy of bill search.

[0044] In one embodiment, the payment identifier carried by the received bill generation request is an order transaction number. Searching for bill information corresponding to the payment identifier from the blockchain according to the payment identifier includes: searching for bill information corresponding to the order transaction number from the blockchain according to the order transaction number, there is a one-to-one correspondence between the order transaction number and the bill information, and the corresponding bill information can be accurately searched from the blockchain according to the order transaction number, saving search time and improving the accuracy of bill information search.

[0045] Step 206: Generate an electronic receipt corresponding to the order information based on the receipt information and the payment identifier.

[0046] Among them, an electronic ticket is an electronic ticket that can be stored in a computer device or storage medium. The electronic ticket may include ticket information and a graphic code corresponding to the ticket information. The graphic code includes a link. The link may include the hash value of the electronic ticket and the webpage domain name of the designated webpage for verifying the electronic ticket. The graphic code may be a QR code or a barcode; wherein, a link refers to a connection relationship from an object to a target object. The object may be a word, a picture or information, etc.; the ticket hash value is obtained by processing the ticket information corresponding to the electronic ticket through a hash algorithm. The hash algorithm is a function constructed based on a hash function. The hash algorithm can transform an input of any length into an output of a fixed length through a hash algorithm to obtain a hash value. The hash algorithm includes a secure hash algorithm (Secure Hash Algorithm, SHA256).

[0047] Specifically, the electronic invoice generation method is called through the invoicing interface, and the electronic invoice is generated according to the preset invoice template. The generated electronic invoice includes the invoice information and the graphic code corresponding to the invoice information. The invoice template includes payment identification, invoice type, invoice code, invoice number, invoicing date, total price and tax, verification code, invoice status and other data.

[0048] In one embodiment, a blockchain electronic ticket is provided, such as Figure 3 As shown, the bill information of the bill to be tested includes the bill's electronic payment identification, QR code, bill code, bill number, issue date, verification code, password area, purchaser and seller, etc., among which the purchaser includes name, taxpayer identification code, address and telephone number, user bank and account number.

[0049] Blockchain electronic invoices allow users to apply for, generate, check, and enter bills on the blockchain, saving the bill generation and reimbursement process; users can also store, circulate, and reimburse bills on the blockchain. When users operate bills on the blockchain, corresponding operation identifiers will be generated and stored in the database corresponding to the blockchain. For example, when a reimbursement instruction corresponding to a blockchain electronic invoice is received, a reimbursement identifier corresponding to the reimbursement instruction will be generated. When the reimbursement instruction of the blockchain electronic invoice is received again, the corresponding reimbursement identifier is detected, and a "reimbursed" prompt is output to avoid multiple reimbursement of blockchain bills; the integrity of blockchain bill information and data cannot be changed, ensuring the authenticity of the bill. On the blockchain, any participant of the blockchain electronic invoice can query the specific data of each flow of the blockchain electronic invoice in the database corresponding to the blockchain, which can realize the historical tracing of blockchain bills, and can also realize the application, generation, inspection, entry, storage, circulation and reimbursement of blockchain bills.

[0050] In the above-mentioned electronic invoice generation method, by accepting a bill generation request for completed order information, the bill generation request carries the payment identifier of the completed order information, and the ticket information corresponding to the payment identifier is searched from the blockchain according to the payment identifier, that is, the received bill generation request is a bill generation request for the completed order information, and the bill generation request cannot be obtained according to the unfinished order information; after obtaining the bill information on the blockchain, the electronic invoice corresponding to the completed order information is generated by using the obtained bill information and the payment identifier, and the order information corresponding to the electronic invoice can be checked according to the payment identifier on the electronic invoice, thereby improving the authenticity of the electronic invoice.

[0051] In one embodiment, the ticket information and payment identification are uploaded to the blockchain through the server corresponding to the ticket provider when a ticket generation request is detected.

[0052] Specifically, before the terminal searches for the bill information corresponding to the payment identifier on the blockchain according to the payment identifier, the server corresponding to the bill provider uploads the payment identifier and the bill information to the blockchain node of the blockchain. The server corresponding to the bill provider uploads the payment identifier and the bill information to the blockchain node of the blockchain corresponding to the server, which can also be a blockchain node composed of the server corresponding to the bill provider. The blockchain node is a data processing point.

[0053] In one embodiment, when the number of resource transfers in the completed order information is greater than the preset number of resource transfers, when the order is completed, the server corresponding to the bill provider automatically uploads the order information, bill information and payment identification to the blockchain. The order information, bill information and payment identification are processed by the blockchain consensus algorithm and uploaded to the blockchain to avoid tampering of data such as order information, bill information and payment identification, thereby ensuring the authenticity of the order information, bill information and payment identification data on the blockchain. Among them, the consensus algorithm includes Byzantine Fault Tolerance (BFT), Practical Byzantine Fault Tolerance (PBFT), Raft protocol, Proof of Work (POW), Proof of Stake (POS), Delegated Proof of Stake (DPOS), and Ripple consensus algorithm.

[0054] In one embodiment, the method further comprises:

[0055] The process ends when no bill information corresponding to the payment ID can be found on the blockchain.

[0056] Specifically, when the corresponding bill information cannot be found on the blockchain based on the payment identifier, an electronic bill corresponding to the payment identifier cannot be generated, thereby avoiding the phenomenon of electronic bill forgery.

[0057] In one embodiment, when the terminal receives a bill generation request for completed order information, the bill generation request carries a payment identifier. If the corresponding bill information cannot be found on the blockchain based on the payment identifier, the terminal switches to the electronic bill page corresponding to the order information. The electronic bill information can be viewed on the electronic bill page to avoid secondary invoicing and multiple uses of one bill.

[0058] In one embodiment, the method further comprises:

[0059] Get the generation time of the invoice generation request and the completion time of the order information;

[0060] Calculate the time difference between the generation time and the completion time;

[0061] When the time difference is less than or equal to the preset validity time, the step of searching the bill information corresponding to the payment identifier from the blockchain is performed according to the payment identifier;

[0062] When the time difference is greater than the preset validity time, the ticket generation request is determined to be an invalid ticket generation request.

[0063] Optionally, when receiving a bill request for completed order information, the generation time of the bill generation request and the completion time of the order information are obtained, and the time difference between the generation time and the completion time is calculated by a function and compared with the preset effective time. When the time difference is less than or equal to the preset effective time, the corresponding bill information is searched from the blockchain according to the payment identifier, and the obtained bill information and payment identifier are used to generate an electronic bill at the terminal. When the time difference is greater than the preset effective time, the corresponding bill information and payment identifier on the blockchain are automatically deleted, and the corresponding bill information cannot be found on the blockchain according to the payment identifier, and the bill generation request is determined to be an invalid bill generation request. By setting the effective time for generating electronic bills, when the effective time is exceeded, the bill information and payment identifier that have exceeded the effective time are automatically deleted, saving storage space.

[0064] In one embodiment, after an electronic invoice corresponding to the order information is generated based on the invoice information and the payment identifier, the order information corresponding to the payment identifier is searched on the blockchain based on the payment identifier. When the order information corresponding to the payment identifier exists on the blockchain, the electronic invoice is displayed as true; when the order information corresponding to the payment identifier does not exist on the blockchain, the electronic invoice is displayed as false. The order information is uploaded to the blockchain through the server corresponding to the invoice provider when a request to generate an invoice is detected.

[0065] Specifically, the authenticity of the electronic bill is determined by searching the order information corresponding to the payment identifier on the blockchain through the payment identifier, which standardizes the use of the electronic bill, improves the authenticity of the electronic bill, and prevents the electronic bill from being used for improper purposes.

[0066] In one embodiment, Figure 4 As shown, a step of generating an electronic bill is provided, and the method is applied to Figure 1 The following steps are taken as an example of the terminal 102 in FIG. 1 :

[0067] Step 402, receiving a request for generating a bill for completed order information.

[0068] Step 404, obtaining the generation time of the bill generation request and the completion time of the order information.

[0069] Step 406, calculating the time difference between the generation time and the completion time.

[0070] Step 408, determine whether the time difference is greater than the preset effective time, and end when the time difference is greater than the preset effective time.

[0071] Step 410: When the time difference between the generation time and the completion time is less than or equal to the preset effective time, execute step 412.

[0072] Step 412, searching the blockchain for the bill information corresponding to the payment identifier according to the payment identifier.

[0073] Step 414: Generate an electronic receipt corresponding to the order information based on the receipt information and the payment identifier.

[0074] In the above-mentioned electronic invoice generation step, by receiving the invoice generation request of the completed order information, the generation time of the invoice generation request is obtained, the time difference between the generation time and the completion time is calculated, and it is determined whether the time difference is greater than the preset effective time. When the time difference is greater than the preset effective time, the invoice generation request is determined to be an invalid invoice generation request, and the corresponding electronic invoice cannot be generated; when the time difference between the generation time and the completion time is less than or equal to the preset effective time, the ticket information corresponding to the payment identifier is searched on the blockchain according to the payment identifier, and the electronic invoice corresponding to the order information completed by the obtained invoice information and the payment identifier is generated. The order information corresponding to the electronic invoice can be checked according to the payment identifier on the electronic invoice, thereby improving the authenticity of the electronic invoice.

[0075] In one embodiment, Figure 5 As shown, a method for generating an electronic bill is provided, and the method is applied to Figure 1 The following steps are taken as an example of the terminal 102 in FIG. 1 :

[0076] Step 502: Receive a bill generation request for the completed order information, where the bill generation request carries a payment identifier.

[0077] Step 504, obtaining the generation time of the bill generation request and the completion time of the order information, and calculating the time difference between the generation time and the completion time;

[0078] Step 506: When the time difference is less than or equal to the preset validity time, the bill information corresponding to the payment identifier is searched from the blockchain according to the payment identifier.

[0079] Step 508: Generate an electronic receipt corresponding to the order information based on the receipt information and the payment identifier.

[0080] Step 510: Send the electronic receipt to a terminal corresponding to the communication address for receiving the electronic receipt.

[0081] Specifically, when it is detected that the user clicks the share button on the electronic invoice generation interface, a sharing instruction is generated, the interface corresponding to the sharing instruction is switched to, the sharing form and the object of receiving the electronic invoice are selected, and the electronic invoice is sent to the terminal corresponding to the communication address of the electronic invoice recipient and displayed.

[0082] In one embodiment, when the user's ticket sharing voice is detected, the terminal switches to the sharing page. When the user selects a sharing object on the sharing interface, the terminal sends the electronic ticket to the communication address of the sharing object. After the sharing object receives the electronic ticket, it displays the received electronic ticket on the display interface.

[0083] In the above-mentioned electronic invoice generation method, by accepting a bill generation request for completed order information, the bill generation request carries the payment identifier of the completed order information, and the ticket information corresponding to the payment identifier is searched from the blockchain according to the payment identifier, that is, the received bill generation request is a bill generation request for the completed order information, and the bill generation request cannot be obtained according to the unfinished order information; after obtaining the bill information on the blockchain, the electronic invoice corresponding to the completed order information is generated by using the obtained bill information and the payment identifier, and the order information corresponding to the electronic invoice can be checked according to the payment identifier on the electronic invoice, thereby improving the authenticity of the electronic invoice; the electronic invoice is sent to the terminal corresponding to the communication address for receiving the electronic invoice, and the electronic invoice can be directly sent to the recipient.

[0084] In one embodiment, the blockchain responds to the terminal's request for bill generation, and feeds back to the terminal the bill information, the electronic bill corresponding to the payment identifier, and a response message of successful billing, wherein the response message of successful billing can be 00 or 11.

[0085] In one embodiment, sending the electronic ticket to a terminal corresponding to a communication address for receiving the electronic ticket for display includes:

[0086] The electronic receipt is sent in the form of an image or a link address to the terminal corresponding to the communication address of the electronic receipt.

[0087] Specifically, the electronic invoice is sent to the terminal corresponding to the communication address of the electronic invoice in the form of a picture, and when the terminal receives the electronic invoice, the electronic invoice can be viewed directly; the electronic invoice is sent to the terminal corresponding to the communication address of the electronic invoice in the form of a link address, and the electronic invoice can be viewed by clicking the link address.

[0088] In one embodiment, the link address of the electronic invoice is obtained, and the link address is sent to a terminal corresponding to the communication address of the electronic invoice.

[0089] In one embodiment, the method further comprises:

[0090] Send electronic invoices to the blockchain as resources.

[0091] Specifically, the generated electronic bill is sent to the child blockchain in the blockchain in the form of resources. The blockchain consists of multiple blocks. The genesis block includes a block header and a block body. The block header stores input information feature values, version numbers, timestamps and difficulty values, and the block body stores input information. The next block of the genesis block uses the genesis block as the parent block. The next block also includes a block header and a block body. The block header stores the input information feature values ​​of the current block, the block header feature values, version numbers, timestamps and difficulty values ​​of the parent block, and so on. The block data stored in each block in the blockchain is associated with the block data stored in the parent block, ensuring the security of the input information in the block. The resource form can be a value certificate that represents the value of the transaction item in the transaction.

[0092] In one embodiment, when a bill generation request is detected, the order information corresponding to the payment identifier is uploaded to the blockchain through the server corresponding to the bill provider, and the blockchain can use an encryption algorithm to encrypt the order information into an order ciphertext. Among them, encryption algorithms include symmetric encryption algorithms and asymmetric encryption algorithms. Symmetric encryption algorithms include DES (Data Encryption Standard), AES (Advanced Encryption Standard) or IDEA (International Data Encryption Algorithm). Asymmetric encryption algorithms include RSA (Rivest, Shamir, Adleman, encryption algorithm), DSA (Digital Signature Algorithm) or ECC (Elliptic curve cryptography).

[0093] In one embodiment, when the billing company receives a bill generation request for completed order information, the bill generation request carries a payment identifier, obtains bill information from the server corresponding to the billing company according to the payment identifier, generates an electronic bill corresponding to the bill information and the payment identifier through a preset electronic bill template, and uploads the payment identifier and order information to the blockchain. In this embodiment, when the third-party terminal verifies the authenticity of the electronic bill, it can obtain the order information corresponding to the payment identifier from the blockchain according to the payment identifier on the electronic bill to check the electronic bill, or it can obtain the order information corresponding to the payment identifier in the billing company's system according to the payment identifier on the blockchain. The order information is obtained according to the payment identifier to check the electronic bill, which improves the authenticity of the electronic bill.

[0094] In one embodiment, a bill generation request for completed order information is received, the bill generation request carries a payment identifier, and the field length of the payment identifier is obtained through a GET() function. When the field length is less than or equal to a preset field length, the bill information corresponding to the payment identifier is searched on the blockchain according to the payment identifier, and an electronic bill corresponding to the order information is generated according to the bill information and the payment identifier.

[0095] The following is a business scenario for electronic invoice generation.

[0096] In one embodiment, Figure 6As shown, a schematic diagram of the circulation interface of blockchain electronic invoices is provided, including: an external device scans the payment code in a mobile application (for example, WeChat) to complete the payment order and then switches to the order completion interface; the user enters the blockchain electronic invoice issuance interface by clicking the click to issue invoice button in the order completion interface, and the blockchain electronic invoice issuance interface automatically enters the invoice amount and invoice content, and the user can enter the invoice header type, invoice header, tax number and other related information in the blockchain electronic invoice issuance interface, where the invoice header type can be either enterprise or individual; when accepting an invoice generation request, the application provided by the third-party agent device uploads the corresponding information to the blockchain in the blockchain network through the third-party agent device, and the invoice generation request carries the payment identifier of the order, searches the corresponding invoice information from the blockchain according to the payment identifier to generate an electronic invoice, and feeds back the corresponding electronic invoice plain text information to the user; the user can receive an "invoice generation prompt" from WeChat; the user can query the generated electronic invoice in the WeChat card wallet, that is, the WeChat server saves the received blockchain electronic invoice for the user.

[0097] It should be understood that although Figure 2-6 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-6 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0098] In one embodiment, Figure 7 As shown, an electronic bill generating device 700 is provided, comprising a receiving module 702, a searching module 704 and a generating module 706, wherein:

[0099] A receiving module 702 is used to receive a bill generation request for completed order information, where the bill generation request carries a payment identifier;

[0100] A search module 704 is used to search for bill information corresponding to the payment identifier from the blockchain according to the payment identifier;

[0101] The generating module 706 is used to issue an electronic invoice corresponding to the order information according to the invoice information and the payment identifier.

[0102] In the above-mentioned electronic invoice generating device, by accepting a bill generation request for completed order information, the bill generation request carries the payment identifier of the completed order information, and searches the blockchain for the bill information corresponding to the payment identifier, that is, the received bill generation request is a bill generation request for the completed order information, and the bill generation request cannot be obtained based on the unfinished order information; after obtaining the bill information on the blockchain, the electronic invoice corresponding to the completed order information is generated using the obtained bill information and the payment identifier, and the order information corresponding to the electronic invoice can be checked based on the payment identifier on the electronic invoice, thereby improving the authenticity of the electronic invoice.

[0103] In another embodiment, Figure 8 As shown, an electronic bill generating device 700 is provided, including a receiving module 702, a searching module 704, a generating module 706, an uploading module 708, a calculating module 710, a judging module 712 and a sending module 714, wherein:

[0104] The upload module 708 is used to upload the bill information and payment identification to the blockchain through the server corresponding to the bill provider when a bill generation request is detected.

[0105] Specifically, the bill information and payment identification are uploaded to the blockchain through the upload module 708, and the consensus mechanism protection based on the blockchain prevents the data such as the bill information and payment identification from being tampered with, thereby ensuring the accuracy of the data.

[0106] The calculation module 710 is used to obtain the generation time of the bill generation request and the completion time of the order information; and calculate the time difference between the generation time and the completion time.

[0107] The judgment module 712 is used to judge that when the time difference is less than or equal to the preset effective time, the step of searching the bill information corresponding to the payment identifier from the blockchain is executed according to the payment identifier; when the time difference is greater than the preset effective time, the bill generation request is determined to be an invalid bill generation request.

[0108] In one embodiment, the judgment module 712 is also used to search for order information corresponding to the payment identifier on the blockchain based on the payment identifier. When order information corresponding to the payment identifier exists on the blockchain, the electronic invoice is displayed as true; when order information corresponding to the payment identifier does not exist on the blockchain, the electronic invoice is displayed as false.

[0109] Specifically, the authenticity of the electronic invoice is determined by judging whether the order information corresponding to the payment identifier can be found on the blockchain based on the payment identifier, thereby standardizing the use of electronic invoices, improving the authenticity of electronic invoices, and preventing electronic invoices from being used for improper purposes.

[0110] The sending module 714 is used to send the electronic receipt to the terminal corresponding to the communication address for receiving the electronic receipt.

[0111] In one embodiment, the sending module 714 is further used to send the electronic receipt in the form of a picture or a link address to a terminal corresponding to the communication address of the electronic receipt.

[0112] In one embodiment, the sending module 714 is further configured to send the electronic invoice to the blockchain in the form of resources.

[0113] The specific definition of the electronic invoice generation device can be found in the definition of the electronic invoice generation method above, which will not be repeated here. Each module in the above electronic invoice generation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0114] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an electronic ticket generation method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0115] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0116] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0117] Receive a bill generation request for the completed order information, the bill generation request carrying a payment identifier;

[0118] Search the blockchain for the bill information corresponding to the payment identifier based on the payment identifier;

[0119] Generate an electronic receipt corresponding to the order information based on the receipt information and payment identifier.

[0120] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0121] The process ends when no bill information corresponding to the payment ID can be found on the blockchain.

[0122] In one embodiment, when the processor executes the computer program, it also implements the following:

[0123] The bill information and payment identification are uploaded to the blockchain through the server corresponding to the bill provider when a bill generation request is detected.

[0124] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0125] Get the generation time of the invoice generation request and the completion time of the order information;

[0126] Calculate the time difference between the generation time and the completion time;

[0127] When the time difference is less than or equal to the preset validity time, the step of searching the bill information corresponding to the payment identifier from the blockchain is performed according to the payment identifier;

[0128] When the time difference is greater than the preset validity time, the ticket generation request is determined to be an invalid ticket generation request.

[0129] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0130] The electronic receipt is sent to the terminal corresponding to the communication address for receiving the electronic receipt.

[0131] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0132] The electronic receipt is sent in the form of an image or a link address to the terminal corresponding to the communication address of the electronic receipt.

[0133] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0134] Send electronic invoices to the blockchain as resources.

[0135] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0136] After an electronic receipt corresponding to the order information is generated according to the receipt information and the payment identifier, the order information corresponding to the payment identifier is searched on the blockchain according to the payment identifier. When the order information corresponding to the payment identifier exists on the blockchain, the electronic receipt is displayed as true;

[0137] When there is no order information corresponding to the payment identifier on the blockchain, the electronic ticket is displayed as false. The order information is uploaded to the blockchain through the server corresponding to the ticket provider when a ticket generation request is detected.

[0138] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0139] Receive a bill generation request for the completed order information, the bill generation request carrying a payment identifier;

[0140] Search the blockchain for the bill information corresponding to the payment identifier based on the payment identifier;

[0141] Generate an electronic receipt corresponding to the order information based on the receipt information and payment identifier.

[0142] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0143] The process ends when no bill information corresponding to the payment ID can be found on the blockchain.

[0144] In one embodiment, the computer program, when executed by a processor, further implements the following:

[0145] The bill information and payment identification are uploaded to the blockchain through the server corresponding to the bill provider when a bill generation request is detected.

[0146] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0147] Get the generation time of the invoice generation request and the completion time of the order information;

[0148] Calculate the time difference between the generation time and the completion time;

[0149] When the time difference is less than or equal to the preset validity time, the step of searching the bill information corresponding to the payment identifier from the blockchain is performed according to the payment identifier;

[0150] When the time difference is greater than the preset validity time, the ticket generation request is determined to be an invalid ticket generation request.

[0151] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0152] The electronic receipt is sent to the terminal corresponding to the communication address for receiving the electronic receipt.

[0153] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0154] The electronic receipt is sent in the form of an image or a link address to the terminal corresponding to the communication address of the electronic receipt.

[0155] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0156] Send electronic invoices to the blockchain as resources.

[0157] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0158] After an electronic receipt corresponding to the order information is generated according to the receipt information and the payment identifier, the order information corresponding to the payment identifier is searched on the blockchain according to the payment identifier. When the order information corresponding to the payment identifier exists on the blockchain, the electronic receipt is displayed as true;

[0159] When there is no order information corresponding to the payment identifier on the blockchain, the electronic ticket is displayed as false. The order information is uploaded to the blockchain through the server corresponding to the ticket provider when a ticket generation request is detected.

[0160] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0161] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0162] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. An electronic bill generation method, applied to a terminal, the method comprising: Receiving a bill generation request for the completed order information, the bill generation request carrying a payment identifier, the terminal detecting that a user clicks a bill generation button on the completed order information interface, and receiving a generated bill generation request carrying a payment identifier, the completed order information corresponds to a unique payment identifier; The bill information corresponding to the payment identifier is searched from the blockchain according to the payment identifier. The bill information and payment identifier are uploaded to the blockchain through the server corresponding to the bill provider when a bill generation request is detected. The blockchain is the blockchain corresponding to the server, and the server is not a blockchain node of the blockchain. The bill information is information used to generate an electronic bill. When the billing enterprise receives a bill generation request for completed order information, the bill information is obtained from the server corresponding to the billing enterprise according to the payment identifier, and an electronic bill corresponding to the bill information and the payment identifier is generated through a preset electronic bill template, and the payment identifier and order information are uploaded to the blockchain; Generate an electronic receipt corresponding to the order information according to the receipt information and the payment identifier; When the third-party terminal verifies the authenticity of the electronic invoice, it obtains the order information corresponding to the payment identifier from the blockchain based on the payment identifier on the electronic invoice to verify the electronic invoice, and obtains the order information corresponding to the payment identifier in the system of the invoicing company based on the payment identifier on the blockchain to verify the electronic invoice.

2. The method according to claim 1, characterized in that The method further comprises: When the number of resource transfers in the completed order information is greater than the preset number of resource transfers, when the order is completed, the server corresponding to the ticket provider automatically uploads the order information, ticket information and payment identification to the blockchain.

3. The method according to claim 1, characterized in that: After generating an electronic receipt corresponding to the order information according to the receipt information and the payment identifier, the method further includes: Searching the blockchain for order information corresponding to the payment identifier according to the payment identifier, and displaying that the electronic bill is true when order information corresponding to the payment identifier exists on the blockchain; When there is no order information corresponding to the payment identifier on the blockchain, the electronic ticket is displayed as false. The order information is uploaded to the blockchain through the server corresponding to the ticket provider when a ticket generation request is detected.

4. The method according to claim 1, characterized in that: The method further comprises: Obtain the generation time of the invoice generation request and the completion time of the order information; Calculate the time difference between the generation time and the completion time; When the time difference is less than or equal to the preset validity time, performing the step of searching the blockchain for the bill information corresponding to the payment identifier according to the payment identifier; When the time difference is greater than the preset valid time, the ticket generation request is determined as an invalid ticket generation request.

5. The method according to claim 1, characterized in that: The method further comprises: The electronic bill is sent to a terminal corresponding to a communication address for receiving the electronic bill.

6. The method according to claim 5, characterized in that: The sending of the electronic ticket to a terminal corresponding to a communication address for receiving the electronic ticket for display includes: The electronic receipt is sent in the form of a picture or a link address to a terminal corresponding to the communication address of the electronic receipt.

7. The method according to claim 1, characterized in that: The method further comprises: The electronic invoice is sent to the blockchain in the form of resources.

8. An electronic bill generating device, characterized in that: Applied to a terminal, the device comprises: A receiving module, used to receive a bill generation request for completed order information, the bill generation request carries a payment identifier, the terminal detects that a user clicks a bill generation button on the completed order information interface, and receives the generated bill generation request carrying the payment identifier, the completed order information corresponds to a unique payment identifier; A search module is used to search for the bill information corresponding to the payment identifier from the blockchain according to the payment identifier. The bill information and payment identifier are uploaded to the blockchain through the server corresponding to the bill provider when a bill generation request is detected. The blockchain is the blockchain corresponding to the server, and the server is not a blockchain node of the blockchain. The bill information is information used to generate an electronic bill. When the billing enterprise receives a bill generation request for completed order information, the bill information is obtained from the server corresponding to the billing enterprise according to the payment identifier, and an electronic bill corresponding to the bill information and the payment identifier is generated through a preset electronic bill template, and the payment identifier and order information are uploaded to the blockchain; A generation module is used to issue an electronic invoice corresponding to the order information based on the invoice information and the payment identifier; when a third-party terminal verifies the authenticity of the electronic invoice, the order information corresponding to the payment identifier is obtained from the blockchain according to the payment identifier on the electronic invoice to verify the electronic invoice, and the order information corresponding to the payment identifier in the system of the invoicing enterprise is obtained according to the payment identifier on the blockchain to verify the electronic invoice.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Electronic payment invoicing method

    CN108960941A

  • Electronic ticket generation method, device, storage medium, and computer device

    CN109034924A

  • Invoice creating method and device based on block chain and electronic device

    CN110060112A