CN110599268A - Electronic bill generating method, electronic bill generating device, computer equipment and storage medium - Google Patents

Electronic bill generating method, electronic bill generating device, computer equipment and storage medium Download PDF

Info

Publication number
CN110599268A
CN110599268A CN201910871956.1A CN201910871956A CN110599268A CN 110599268 A CN110599268 A CN 110599268A CN 201910871956 A CN201910871956 A CN 201910871956A CN 110599268 A CN110599268 A CN 110599268A
Authority
CN
China
Prior art keywords
bill
payment identifier
electronic
information
block chain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910871956.1A
Other languages
Chinese (zh)
Inventor
蔡弋戈
秦青
张懿方
戴传兵
张建俊
王宗友
郭鹏
洪晓雯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910871956.1A priority Critical patent/CN110599268A/en
Publication of CN110599268A publication Critical patent/CN110599268A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/04Billing or invoicing

Abstract

The application relates to an electronic bill generating method, an electronic bill generating device, computer equipment and a storage medium. The method comprises the following steps: receiving a bill generation request of completed order information, wherein the bill generation request carries a payment identifier; searching bill information corresponding to the payment identifier from the block chain according to the payment identifier; and generating an electronic bill corresponding to the order information according to the bill information and the payment identifier. By adopting the scheme, the order information corresponding to the electronic bill can be checked according to the payment identifier on the electronic bill, and the authenticity of the electronic bill is improved.

Description

Electronic bill generating method, electronic bill generating device, computer equipment and storage medium
Technical Field
The present application relates to the field of ticket generation technologies, and in particular, to an electronic ticket generation method and apparatus, a computer device, and a storage medium.
Background
With the development of internet technology, more and more users tend to select electronic bills, the electronic bills are used by merchants in a form of uniform issuing by a tax bureau as common invoices, invoice numbers are uniformly coded nationwide, a uniform anti-counterfeiting technology is adopted, the invoice numbers are distributed to the merchants, and a signature mechanism of the electronic tax bureau is attached to the electronic invoices.
However, in the conventional bill generation method, when an electronic bill is applied, only relevant information such as a seller, a buyer, a material and the like needs to be transmitted to a system, and the authenticity of the electronic bill cannot be judged, so that the authenticity of the electronic bill is low.
Disclosure of Invention
In view of the above, it is desirable to provide an electronic ticket generating method, apparatus, computer device, and storage medium capable of improving the authenticity of an electronic ticket.
An electronic ticket generating method, the method comprising:
receiving a bill generation request of completed order information, wherein the bill generation request carries a payment identifier;
searching bill information corresponding to the payment identifier from a block chain according to the payment identifier;
and issuing an electronic bill corresponding to the order information according to the bill information and the payment identifier.
An electronic ticket generating apparatus, the apparatus comprising:
the receiving module is used for receiving a bill generation request of completed order information, and the bill generation request carries a payment identifier;
the searching module is used for searching the bill information corresponding to the payment identifier from the block chain according to the payment identifier;
and the generating module is used for issuing an electronic bill corresponding to the order information according to the bill information and the payment identifier.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a bill generation request of completed order information, wherein the bill generation request carries a payment identifier;
searching bill information corresponding to the payment identifier from a block chain according to the payment identifier;
and issuing an electronic bill corresponding to the order information according to the bill information and the payment identifier.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving a bill generation request of completed order information, wherein the bill generation request carries a payment identifier;
searching bill information corresponding to the payment identifier from a block chain according to the payment identifier;
and issuing an electronic bill corresponding to the order information according to the bill information and the payment identifier.
According to the electronic bill generation method, the electronic bill generation device, the computer equipment and the storage medium, the bill generation request of the completed order information is received, the bill generation request carries the payment identifier of the completed order information, the bill information corresponding to the payment identifier is searched from the block chain according to the payment identifier, namely the received bill generation request is the bill generation request of the completed order information, and the bill generation request cannot be acquired according to the incomplete order information; after the bill information is acquired on the block chain, the acquired bill information and the payment identifier are used for generating the electronic bill corresponding to the completed order information, and the order information corresponding to the electronic bill can be checked according to the payment identifier on the electronic bill, so that the authenticity of the electronic bill is improved.
Drawings
FIG. 1 is a diagram showing an application environment of an electronic ticket generating method according to an embodiment;
FIG. 2 is a schematic flow chart showing an electronic ticket generating method according to an embodiment;
FIG. 3 is a block chain electronic ticket in one embodiment;
FIG. 4 is a flowchart showing the electronic ticket generating step in one embodiment;
FIG. 5 is a schematic flow chart showing an electronic ticket generating method in another embodiment;
FIG. 6 is a diagram of a flow interface for blockchain electronic tickets in accordance with one embodiment;
FIG. 7 is a diagram of an electronic ticket generating apparatus according to an embodiment;
FIG. 8 is a block diagram showing the construction of an electronic ticket generating apparatus according to another embodiment;
FIG. 9 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The electronic bill generating method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102, the blockchain 104, and the server 106 communicate with each other via a network. The terminal 102 receives a bill generation request of completed order information, the bill generation request carries a payment identifier, the bill information corresponding to the payment identifier is searched from the block chain 104 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. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, the block chain 104 may be, but is not limited to, a data sharing system, where the data sharing system refers to a system for performing data sharing between nodes, the data sharing system may include a plurality of nodes, and the plurality of nodes may refer to respective clients in the data sharing system. Each node may receive input information while operating normally and maintain shared data within the data sharing system based on the received input information. In order to ensure information intercommunication in the data sharing system, information connection can exist between each node in the data sharing system, and information transmission can be carried out between the nodes through the information connection. For example, when any node in the data sharing system receives input information, other nodes in the data sharing system acquire the input information according to a consensus algorithm, and store the input information as data in shared data, so that the data stored on all nodes in the data sharing system are consistent; the server 106 may be implemented as a stand-alone server or as a server cluster comprised of multiple servers.
In one embodiment, as shown in fig. 2, an electronic bill generating method is provided, which is described by taking the method as an example applied to the terminal 102 in fig. 1, and includes the following steps:
step 202, receiving a bill generation request of the completed order information, wherein the bill generation request carries a payment identifier.
The order information is related data generated by transferring resources, and the resources can be articles available for trading; the item may be a physical item or a virtual item or service, etc. The order information includes user information, resource information flow and other data. The user information may include data such as a resource sender name, a sending address and a contact way, a resource receiver name, a receiving address and a contact way; the resource information stream may include data such as item information, item transfer time, etc., and the item information may include the specification size, appearance shape, item category, etc. of the object. When a resource is transferred from a sender to a recipient, the generated order information is completed order information.
The ticket generation request is used for generating an electronic ticket of completed order information, the ticket generation request carries a payment identifier, the completed order information corresponds to a unique payment identifier, and the payment identifier may be a combination of fixed-length letters or arabic numbers, for example, the payment identifier may be an order number in the order information, and the payment identifier may also be an order transaction number when the order information is completed. The bill generation request can be generated by clicking a bill generation button on an order information interface or clicking the bill generation button on an order completion interface; when the completed order information is generated, the bill generation voice input by the user is received, and the bill generation voice is converted into the bill generation request according to the voice. The form of generating the ticket generation request is not limited herein.
Specifically, when an individual or an enterprise completes a transaction to generate corresponding order information, the terminal detects that a user clicks a bill generation button of a completed order information interface, and receives a generated bill generation request carrying a payment identifier.
In one embodiment, after the terminal detects that the user completes payment, a prompt message indicating successful payment is popped up, an interface corresponding to the prompt message is switched to, completed order information is displayed on the interface, a bill generation button on the interface is detected to be clicked, a bill generation request is generated, and the bill generation request carries a payment identifier.
And step 204, searching bill information corresponding to the payment identifier from the block chain according to the payment identifier.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block.
The ticket information is used to generate information for an electronic ticket. The bill information may include at least one of a bill issuer identification and a bill receiver identification, a bill type, a bill code, a bill number, an issuing date, a bill numerical value, a check code, an invoice status, and the like. Wherein, the bill value can be the actual value of the resource transfer; the bill code may be a national tax code, an administrative area code, a year code, an industry code, an invoice category code, etc., for example, invoice code 454545445445, which is compiled from left to right in the following order: the 1 st digit is a national tax code, the 2 nd to 5 th digits are administrative region codes, the 6 th and 7 th digits are year codes, the 8 th digit is an industry code, the 9 th to 12 th digits are invoice type codes, and one bill code can correspond to a plurality of electronic bills; the bill number is a code given by the tax bureau to generate the electronic bill, the code of each electronic bill is unique, the bill number can be combined by numbers with specified length, and the composition of the bill number is not limited; the invoicing party identification is used for identifying a unique invoicing party, the invoicing party can be an individual or an enterprise, and the invoicing party identification can comprise a seller name, a taxpayer identification number, a contact address, a contact telephone, an account opening row, an account number and the like; the receiver identification is used for identifying the unique electronic bill receiver, the receiver can be an individual or an enterprise, and the receiver identification can comprise a purchaser name, a taxpayer identification number, a contact address, a contact telephone and the like.
Specifically, when the terminal receives a bill generation request carrying a payment identifier, the bill information corresponding to the payment identifier is searched from the block chain according to the payment identifier.
In one embodiment, the payment identifier carried by the received ticket generation request is an order number. Searching bill information corresponding to the payment identifier from the block chain according to the payment identifier, wherein the bill information comprises: according to the order number, the bill information corresponding to the order number is searched from the block chain, the order number and the bill information are in one-to-one correspondence, the corresponding bill information can be accurately searched from the block chain according to the order number, the searching time is saved, and the bill searching accuracy is improved.
In one embodiment, the payment identifier carried by the received ticket generation request is an order transaction number. Searching bill information corresponding to the payment identifier from the block chain according to the payment identifier, wherein the bill information comprises: according to the order transaction number, the bill information corresponding to the order transaction number is searched from the block chain, the order transaction number and the bill information are in one-to-one correspondence, the corresponding bill information can be accurately searched from the block chain according to the order transaction number, the searching time is saved, and the searching accuracy of the bill information is improved.
And step 206, generating an electronic bill corresponding to the order information according to the bill information and the payment identifier.
The electronic bill is an electronic bill and can be stored in a computer device or a storage medium. The electronic bill can comprise bill information and a graphic code corresponding to the bill information, the graphic code comprises a link, the link can comprise a hash value of the electronic bill and a webpage domain name of a specified webpage for detecting the electronic bill, and the graphic code can be a two-dimensional code or a bar code; the link refers to a connection relationship that one object points to one target object, and the object can be a word, a picture or information; the bill Hash value is obtained by processing bill information corresponding to an electronic bill through a Hash Algorithm, the Hash Algorithm is a function constructed on the basis of the Hash function, the Hash Algorithm can convert an input with any length into an output with a fixed length through the Hash Algorithm to obtain a Hash value, and the Hash Algorithm comprises a Secure Hash Algorithm (SHA 256).
Specifically, the electronic bill generation method is called through the billing interface, the electronic bill is generated according to a preset bill template, the generated electronic bill comprises bill information and a graphic code corresponding to the bill information, and the bill template comprises data such as payment identification, bill type, bill code, bill number, billing date, total price and tax, check code, invoice state and the like.
In one embodiment, a block chain electronic ticket is provided, as shown in fig. 3, the ticket information of the ticket to be detected includes an electronic payment identifier, a two-dimensional code, a ticket number, a billing date, a check code, a password area, a purchaser and a seller of the ticket, etc., wherein the purchaser includes a name, a taxpayer identification code, an address and a telephone, a user line and an account.
The block chain electronic bill can enable a user to realize bill application, generation, inspection and entry on the block chain, and save bill generation and reimbursement processes; the user can also realize bill storage, circulation and reimbursement on the block chain, the user operates the bill on the block chain, generates a corresponding operation identifier and stores the operation identifier in a database corresponding to the block chain, for example, when receiving a reimbursement instruction corresponding to the block chain electronic bill, the user generates a reimbursement identifier corresponding to the reimbursement instruction, and when receiving the reimbursement instruction of the block chain electronic bill again, the user detects the corresponding reimbursement identifier and outputs a prompt of reimbursed expense, so that the block chain bill is prevented from being reimbursed for multiple times; the integrity and data of the block chain bill information cannot be changed, and the authenticity of the bill is guaranteed. On the block chain, any party of the block chain electronic bill can inquire specific data of each flow direction of the block chain electronic bill in a database corresponding to the block chain, so that historical tracing of the block chain bill can be realized, and application, generation, inspection, entry, storage, circulation, reimbursement and the like of the block chain bill can also be realized.
In the electronic bill generating method, the bill generating request carrying the payment identifier of the completed order information is received, and the bill information corresponding to the payment identifier is searched from the block chain according to the payment identifier, namely, the received bill generating request is the bill generating request of the completed order information, and the bill generating request cannot be acquired according to the uncompleted order information; after the bill information is acquired on the block chain, the acquired bill information and the payment identifier are used for generating the electronic bill corresponding to the completed order information, and the order information corresponding to the electronic bill can be checked according to the payment identifier on the electronic bill, so that the authenticity of the electronic bill is improved.
In one embodiment, the ticket information and the payment identifier are uploaded to the blockchain through a server corresponding to the ticket provider when the ticket generation request is detected.
Specifically, before the terminal searches for the bill information corresponding to the payment identifier from 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 identification and the bill information to the block chain node of the block chain corresponding to the server, or the block chain node can be formed by the server corresponding to the bill provider. A blockchain node is a data processing point.
In one embodiment, when the number of resource transfers in the completed order information is greater than the preset number of resource transfers, the server corresponding to the ticket provider automatically uploads the order information, the ticket information and the payment identifier to the blockchain when the order is completed. Order information, bill information and a payment identifier are processed by a block chain consensus algorithm and then uploaded to a block chain, so that data such as the order information, the bill information and the payment identifier are prevented from being tampered, and authenticity of the order information, the bill information and the payment identifier data on the block chain is guaranteed. The consensus algorithm includes Byzantine Fault-tolerant technology (BFT), Practical Byzantine Fault-tolerant algorithm (PBFT), Raft protocol, Proof of Work (POW), Proof of stock (POS), Proof of commission (DPOS), and rayleigh consensus algorithm.
In one embodiment, the method further comprises:
and finishing when the bill information corresponding to the payment identifier is not inquired from the block chain.
Specifically, when the corresponding bill information cannot be checked and stored on the block chain according to the payment identifier, the electronic bill corresponding to the payment identifier cannot be generated, and the phenomenon that the electronic bill is fake is avoided.
In one embodiment, when the terminal receives a bill generation request of completed order information, the bill generation request carries a payment identifier, corresponding bill information cannot be checked on a block chain according to the payment identifier, and the electronic bill page corresponding to the order information is switched to, so that the information of the electronic bill can be checked on the electronic bill page, and the false situations of secondary invoicing and repeated use of one bill are avoided.
In one embodiment, the method further comprises:
acquiring the generation time of a bill generation request and the completion time of order information;
calculating a time difference between the generation time and the completion time;
when the time difference is smaller than or equal to the preset effective time, the step of searching bill information corresponding to the payment identifier from the block chain according to the payment identifier is executed;
and when the time difference is larger than the preset effective time, determining the bill generation request as an invalid bill generation request.
Optionally, when receiving a ticket request of completed order information, acquiring generation time of the ticket generation request and completion time of the order information, calculating a time difference between the generation time and the completion time through a function, comparing the time difference with a preset effective time, when the time difference is less than or equal to the preset effective time, searching corresponding ticket information from the block chain according to the payment identifier, and generating an electronic ticket by the acquired ticket information and the payment identifier at the terminal. And when the time difference is greater than the preset effective time, automatically deleting the corresponding bill information and the payment identifier on the block chain, searching the corresponding bill information on the block chain according to the payment identifier, and determining the bill generation request as an invalid bill generation request. By setting the effective time for generating the electronic bill, when the effective time is exceeded, the bill information and the payment identifier exceeding the effective time are automatically deleted, so that the storage space is saved.
In one embodiment, after an electronic bill corresponding to order information is generated according to bill information and a payment identifier, the order information corresponding to the payment identifier is searched from a block chain according to the payment identifier, and when the order information corresponding to the payment identifier exists in the block chain, the electronic bill is displayed as true; and when the order information corresponding to the payment identifier does not exist on the block chain, displaying that the electronic ticket is false, wherein the order information is uploaded to the block chain through a server corresponding to a ticket provider when a ticket generation request is detected.
Specifically, the order information corresponding to the payment identifier is searched from the block chain through the payment identifier to judge the authenticity of the electronic bill, so that the use of the electronic bill is standardized, the authenticity of the electronic bill is improved, and the electronic bill is prevented from being used for an illegal use.
In one embodiment, as shown in fig. 4, there is provided an electronic bill generating step, which is described by taking the method as an example applied to the terminal 102 in fig. 1, and includes the following steps:
step 402, receiving a ticket generation request for completed order information.
Step 404, obtaining the generation time of the bill generation request and the completion time of the order information.
At step 406, a time difference between the generation time and the completion time is calculated.
And step 408, judging whether the time difference is larger than the preset effective time or not, and ending when the time difference is larger than the preset effective time.
In step 410, when the time difference between the generation time and the completion time is less than or equal to the preset effective time, step 412 is executed.
And step 412, searching the bill information corresponding to the payment identifier from the block chain according to the payment identifier.
And 414, generating an electronic bill corresponding to the order information according to the bill information and the payment identifier.
In the electronic bill generating step, a bill generating request of completed order information is received, the generating time of the bill generating request and the completing time of the order information are obtained, the time difference value between the generating time and the completing time is calculated, whether the time difference value is greater than the preset effective time or not is judged, and when the time difference value is greater than the preset effective time, the bill generating request is determined to be an invalid bill generating request, and a corresponding electronic bill 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, ticket information corresponding to the payment identifier is searched from the block chain according to the payment identifier, the electronic ticket corresponding to the order information of the completed order is generated by the acquired ticket information and the payment identifier, the order information corresponding to the electronic ticket can be checked according to the payment identifier on the electronic ticket, and the authenticity of the electronic ticket is improved.
In one embodiment, as shown in fig. 5, an electronic bill generating method is provided, which is described by taking the method as an example applied to the terminal 102 in fig. 1, and includes the following steps:
step 502, receiving a bill generation request of the completed order information, wherein the bill generation request carries a payment identifier.
Step 504, acquiring 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;
and step 506, when the time difference is less than or equal to the preset effective time, searching bill information corresponding to the payment identifier from the block chain according to the payment identifier.
And step 508, generating an electronic bill corresponding to the order information according to the bill information and the payment identifier.
And step 510, sending the electronic bill to a terminal corresponding to the communication address for receiving the electronic bill.
Specifically, when a user clicks a sharing button of an electronic bill generation interface, a sharing instruction is generated, the sharing interface corresponding to the sharing instruction is switched to, a sharing form and an electronic bill receiving object are selected, and the electronic bill is sent to a terminal corresponding to a communication address of the received electronic bill and displayed.
In one embodiment, switching to a sharing page when note sharing voice of a user is detected, sending an electronic note to a communication address of a sharing object by a terminal after the user selects the sharing object on a sharing interface, and displaying the received electronic note on a display interface after the sharing object receives the electronic note.
In the electronic bill generating method, the bill generating request carrying the payment identifier of the completed order information is received, and the bill information corresponding to the payment identifier is searched from the block chain according to the payment identifier, namely, the received bill generating request is the bill generating request of the completed order information, and the bill generating request cannot be acquired according to the uncompleted order information; after acquiring the bill information on the block chain, the acquired bill information and the payment identifier are used for generating an electronic bill corresponding to the completed order information, and the order information corresponding to the electronic bill can be checked according to the payment identifier on the electronic bill, so that the authenticity of the electronic bill is improved; and sending the electronic bill to a terminal corresponding to the communication address for receiving the electronic bill, and directly sending the electronic bill to a receiver.
In one embodiment, the blockchain responds to the bill generation request of the terminal and feeds back the electronic bill corresponding to the bill information and the payment identifier and the response information of successful invoicing to the terminal, wherein the response information of successful invoicing can be 00 or 11.
In one embodiment, the sending the electronic bill to the terminal corresponding to the communication address of the received electronic bill for displaying includes:
and sending the electronic bill to a terminal corresponding to the communication address of the electronic bill in the form of a picture or a link address.
Specifically, the electronic ticket is sent to a terminal corresponding to a communication address of the electronic ticket in a picture mode, and when the terminal receives the electronic ticket, the electronic ticket can be directly checked; and the electronic bill is sent to a terminal corresponding to the communication address of the electronic bill in the form of a link address, and the electronic bill is checked by clicking the link address.
In one embodiment, the link address of the electronic bill is acquired, and the link address is sent to the terminal corresponding to the communication address of the electronic bill.
In one embodiment, the method further comprises:
and sending the electronic invoice to the block chain in a resource form.
Specifically, the generated electronic ticket is sent in a resource form to a sub-block chain of archived electronic tickets in the block chain. The block chain is composed of a plurality of blocks, the starting block comprises a block head and a block main body, the block head stores an input information characteristic value, a version number, a timestamp and a difficulty value, and the block main body stores input information; the next block of the starting block takes the starting block as a parent block, the next block also comprises a block head and a block main body, the block head stores the input information characteristic value of the current block, the block head characteristic value of the parent block, the version number, the timestamp and the difficulty value, and the like, so that the block data stored in each block in the block chain is associated with the block data stored in the parent block, and the safety of the input information in the block is ensured. The resource form may be Bitcoin (Bitcoin), which is a virtually non-existent encrypted digital currency in the form of a peer-to-peer loan platform (P2P) for internet financing.
In one embodiment, when a ticket generation request is detected, order information corresponding to the payment identifier is uploaded to the blockchain through a server corresponding to the ticket provider, and the blockchain may encrypt the order information into order ciphertext by using an encryption algorithm. Among them, the encryption algorithm, such as symmetric encryption algorithm and asymmetric encryption algorithm, etc. A symmetric Encryption Algorithm, such as DES (Data Encryption Standard), AES (Advanced Encryption Standard), IDEA (International Data Encryption Algorithm), and the like. Asymmetric cryptographic algorithms, such as RSA (Rivest, Shamir, Adleman, cryptographic algorithm), DSA (Digital signature algorithm), or ECC (Elliptic curve cryptography), etc.
In one embodiment, when the billing enterprise receives a bill generation request of completed order information, the bill generation request carries a payment identifier, the bill information is acquired from a server corresponding to the billing enterprise according to the payment identifier, 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 the order information are uploaded to a block chain. In this embodiment, when the third-party terminal verifies the authenticity of the electronic bill, the order information corresponding to the payment identifier may be obtained from the blockchain according to the payment identifier on the electronic bill to check the electronic bill, or the order information corresponding to the payment identifier in the system of the billing enterprise may be obtained according to the payment identifier on the blockchain. And order information is acquired according to the payment identifier to check the electronic bill, so that the authenticity of the electronic bill is improved.
In one embodiment, a bill generation request of completed order information is received, the bill generation request carries a payment identifier, the field length of the payment identifier is obtained through a GET () function, when the field length is smaller than or equal to a preset field length, bill information corresponding to the payment identifier is searched from a block chain 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.
The following is a business scenario generated for electronic tickets.
In one embodiment, as shown in fig. 6, there is provided a schematic view of a circulation interface of a blockchain electronic ticket, including: the external equipment scans the payment code in the mobile application (for example, WeChat), and switches to an order completion interface after completing the payment order; the method comprises the following steps that a user clicks an invoicing button of an order completion interface to enter an invoicing blockchain electronic invoice interface, the invoicing amount and invoice content are automatically input into the invoicing blockchain electronic invoice interface, the user can input related information such as invoice head-up type, invoice head-up, tax number and the like into the invoicing blockchain electronic invoice interface, wherein the invoice head-up type can be an enterprise or an individual; when an invoice generation request is received, the application provided by the third-party agent side equipment uploads corresponding information to a block chain in a block chain network through the third-party agent equipment, the invoice generation request carries a payment identifier of an order, corresponding bill information is searched from the block chain according to the payment identifier to generate an electronic bill, and plaintext information of the corresponding electronic bill is fed back to a user; the user can receive the invoice generation prompt of the WeChat prompt; the user can inquire the generated electronic invoice in the WeChat card package, namely the WeChat server stores the received blockchain electronic invoice for the user.
It should be understood that although the various steps in the flow charts of fig. 2-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-6 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 7, there is provided an electronic ticket generating apparatus 700 comprising a receiving module 702, a searching module 704 and a generating module 706, wherein:
a receiving module 702, configured to receive a ticket generation request of completed order information, where the ticket generation request carries a payment identifier;
the searching module 704 is used for searching the bill information corresponding to the payment identifier from the block chain according to the payment identifier;
and the generating module 706 is used for issuing the electronic bill corresponding to the order information according to the bill information and the payment identifier.
In the electronic bill generating device, by receiving a bill generating request of completed order information, the bill generating request carries a payment identifier of the completed order information, and according to the payment identifier, the bill information corresponding to the payment identifier is searched from a block chain, that is, the received bill generating request is a bill generating request of the completed order information, and according to the incomplete order information, the bill generating request cannot be acquired; after the bill information is acquired on the block chain, the acquired bill information and the payment identifier are used for generating the electronic bill corresponding to the completed order information, and the order information corresponding to the electronic bill can be checked according to the payment identifier on the electronic bill, so that the authenticity of the electronic bill is improved.
In another embodiment, as shown in fig. 8, there is provided an electronic ticket generating apparatus 700, 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:
and an uploading module 708, configured to upload, when the ticket generation request is detected, the ticket information and the payment identifier to the blockchain through a server corresponding to the ticket provider.
Specifically, the bill information and the payment identifier are uploaded to the block chain through the uploading module 708, and are protected by a consensus mechanism based on the block chain, so that data such as the bill information and the payment identifier are prevented from being tampered, and the accuracy of the data is ensured.
A calculating module 710, configured to obtain generation time of the ticket generation request and completion time of the order information; a time difference between the generation time and the completion time is calculated.
A judging module 712, configured to judge that, when the time difference is smaller than or equal to the preset valid time, a step of searching for bill information corresponding to the payment identifier from the block chain according to the payment identifier is performed; and when the time difference is larger than the preset effective time, determining the bill generation request as an invalid bill generation request.
In one embodiment, the determining module 712 is further configured to search for order information corresponding to the payment identifier from the block chain according to the payment identifier, and when the order information corresponding to the payment identifier exists in the block chain, display that the electronic bill is true; and when the order information corresponding to the payment identifier does not exist in the block chain, displaying that the electronic ticket is false.
Specifically, whether the order information corresponding to the payment identifier can be searched from the block chain or not is judged according to the payment identifier, so that the authenticity of the electronic bill is judged, the authenticity of the electronic bill is improved, and the electronic bill is prevented from being used for an illegal purpose.
And the sending module 714 is configured to send the electronic ticket to the terminal corresponding to the communication address of the received electronic ticket.
In one embodiment, the sending module 714 is further configured to send the electronic ticket to a terminal corresponding to the communication address of the electronic ticket in the form of a picture or a link address.
In one embodiment, the sending module 714 is further configured to send the electronic invoice to the blockchain in the form of a resource.
For specific limitations of the electronic ticket generating apparatus, reference may be made to the above limitations of the electronic ticket generating method, and details are not repeated here. The modules in the electronic bill generating device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 9. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an electronic ticket generating method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
receiving a bill generation request of completed order information, wherein the bill generation request carries a payment identifier;
searching bill information corresponding to the payment identifier from the block chain according to the payment identifier;
and generating an electronic bill corresponding to the order information according to the bill information and the payment identifier.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and finishing when the bill information corresponding to the payment identifier is not inquired from the block chain.
In one embodiment, the processor, when executing the computer program, further implements the following:
when detecting the bill generation request, the bill information and the payment identifier are uploaded to the block chain through a server corresponding to a bill provider.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring the generation time of a bill generation request and the completion time of order information;
calculating a time difference between the generation time and the completion time;
when the time difference is smaller than or equal to the preset effective time, the step of searching bill information corresponding to the payment identifier from the block chain according to the payment identifier is executed;
and when the time difference is larger than the preset effective time, determining the bill generation request as an invalid bill generation request.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and sending the electronic bill to a terminal corresponding to the communication address for receiving the electronic bill.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and sending the electronic bill to a terminal corresponding to the communication address of the electronic bill in the form of a picture or a link address.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and sending the electronic invoice to the block chain in a resource form.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
after generating an electronic bill corresponding to the order information according to the bill information and the payment identifier, searching the order information corresponding to the payment identifier from the block chain according to the payment identifier, and displaying that the electronic bill is true when the order information corresponding to the payment identifier exists on the block chain;
and when the block chain does not have order information corresponding to the payment identifier, displaying that the electronic ticket is false, wherein the order information is uploaded to the block chain through a server corresponding to a ticket provider when a ticket generation request is detected.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a bill generation request of completed order information, wherein the bill generation request carries a payment identifier;
searching bill information corresponding to the payment identifier from the block chain according to the payment identifier;
and generating an electronic bill corresponding to the order information according to the bill information and the payment identifier.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and finishing when the bill information corresponding to the payment identifier is not inquired from the block chain.
In one embodiment, the computer program when executed by the processor further implements the following:
when detecting the bill generation request, the bill information and the payment identifier are uploaded to the block chain through a server corresponding to a bill provider.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring the generation time of a bill generation request and the completion time of order information;
calculating a time difference between the generation time and the completion time;
when the time difference is smaller than or equal to the preset effective time, the step of searching bill information corresponding to the payment identifier from the block chain according to the payment identifier is executed;
and when the time difference is larger than the preset effective time, determining the bill generation request as an invalid bill generation request.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and sending the electronic bill to a terminal corresponding to the communication address for receiving the electronic bill.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and sending the electronic bill to a terminal corresponding to the communication address of the electronic bill in the form of a picture or a link address.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and sending the electronic invoice to the block chain in a resource form.
In one embodiment, the computer program when executed by the processor further performs the steps of:
after generating an electronic bill corresponding to the order information according to the bill information and the payment identifier, searching the order information corresponding to the payment identifier from the block chain according to the payment identifier, and displaying that the electronic bill is true when the order information corresponding to the payment identifier exists on the block chain;
and when the block chain does not have order information corresponding to the payment identifier, displaying that the electronic ticket is false, wherein the order information is uploaded to the block chain through a server corresponding to a ticket provider when a ticket generation request is detected.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. 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. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An electronic ticket generating method, the method comprising:
receiving a bill generation request of completed order information, wherein the bill generation request carries a payment identifier;
searching bill information corresponding to the payment identifier from a block chain according to the payment identifier;
and generating an electronic bill corresponding to the order information according to the bill information and the payment identifier.
2. The method of claim 1, wherein the ticket information and payment identifier are uploaded to a blockchain through a server corresponding to a ticket provider when a ticket generation request is detected.
3. The method of claim 1, wherein after the generating an electronic ticket corresponding to the order information according to the ticket information and the payment identifier, the method further comprises:
searching order information corresponding to the payment identifier from the block chain according to the payment identifier, and displaying that the electronic bill is true when the order information corresponding to the payment identifier exists in the block chain;
and when the block chain does not have order information corresponding to the payment identifier, displaying that the electronic ticket is false, wherein the order information is uploaded to the block chain through a server corresponding to a ticket provider when a ticket generation request is detected.
4. The method of claim 1, further comprising:
acquiring the generation time of the bill generation request and the completion time of the order information;
calculating a time difference between the generation time and the completion time;
when the time difference is smaller than or equal to the preset effective time, a step of searching bill information corresponding to the payment identifier from a block chain according to the payment identifier is executed;
and when the time difference is larger than the preset effective time, determining the bill generation request as an invalid bill generation request.
5. The method of claim 1, further comprising:
and sending the electronic bill to a terminal corresponding to the communication address for receiving the electronic bill.
6. The method of claim 5, wherein the sending the electronic ticket to a terminal corresponding to a communication address for receiving the electronic ticket for displaying comprises:
and sending the electronic ticket data to a terminal corresponding to the communication address of the electronic ticket in the form of a picture or a link address.
7. The method of claim 1, further comprising:
and sending the electronic invoice to the block chain in a resource form.
8. An electronic ticket generating apparatus, comprising:
the receiving module is used for receiving a bill generation request of completed order information, and the bill generation request carries a payment identifier;
the searching module is used for searching the bill information corresponding to the payment identifier from the block chain according to the payment identifier;
and the generating module is used for issuing an electronic bill corresponding to the order information according to the bill information and the payment identifier.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN201910871956.1A 2019-09-16 2019-09-16 Electronic bill generating method, electronic bill generating device, computer equipment and storage medium Pending CN110599268A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910871956.1A CN110599268A (en) 2019-09-16 2019-09-16 Electronic bill generating method, electronic bill generating device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910871956.1A CN110599268A (en) 2019-09-16 2019-09-16 Electronic bill generating method, electronic bill generating device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110599268A true CN110599268A (en) 2019-12-20

Family

ID=68859818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910871956.1A Pending CN110599268A (en) 2019-09-16 2019-09-16 Electronic bill generating method, electronic bill generating device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110599268A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111695946A (en) * 2020-06-16 2020-09-22 中国银行股份有限公司 Electronic invoice generation method, system and server
CN112990992A (en) * 2021-04-16 2021-06-18 拉扎斯网络科技(上海)有限公司 Ticket issuing method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111695946A (en) * 2020-06-16 2020-09-22 中国银行股份有限公司 Electronic invoice generation method, system and server
CN112990992A (en) * 2021-04-16 2021-06-18 拉扎斯网络科技(上海)有限公司 Ticket issuing method and device

Similar Documents

Publication Publication Date Title
CN109034924B (en) Electronic bill generating method, electronic bill generating device, storage medium and computer equipment
CN109325812B (en) Data processing method, device, storage medium and equipment for electronic bill
CN107994991B (en) Data processing method, data processing server and storage medium
US20160342977A1 (en) Device, method and system for virtual asset transactions
US20200058023A1 (en) Decentralized Data Marketplace
CN110599137A (en) Electronic bill data processing method and device and computer equipment
US20180330342A1 (en) Digital asset account management
CN110378755B (en) Electronic invoice generation method and device, computer equipment and storage medium
CN116561789B (en) Processing method and device of privacy data, electronic equipment and readable storage medium
CN111127205B (en) Intelligent contract generation method and device, computer equipment and storage medium
CN110633963A (en) Electronic bill processing method, electronic bill processing device, computer-readable storage medium and equipment
CN111260488B (en) Data processing method and device and readable storage medium
CN111553792A (en) Data verification method and device based on block chain
CN111127150B (en) Intelligent contract demand matching method and device based on block chain and computer equipment
CN111815308A (en) Trade data processing method based on block chain and related equipment thereof
CN111597562B (en) Block chain-based on-chain data verification method, device, equipment and storage medium
CN110599269A (en) Bill generation method and device, computer readable storage medium and computer equipment
CN111131234A (en) Intelligent contract data processing method and device in supply chain and computer equipment
CN111291122B (en) Bidding method and device based on block chain
CN110599268A (en) Electronic bill generating method, electronic bill generating device, computer equipment and storage medium
CN114358766A (en) Method, equipment and blockchain system for trading green electric certificates
CN112131593A (en) Information-based feature encryption method, device, equipment and storage medium
CN113704704B (en) Collaborative work ownership confirmation method and system based on block chain and computer equipment
CN110942567A (en) Self-service equipment data processing method, device and system
CN115603900A (en) Fair bidding method, device and storage medium based on cryptology commitment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination