Bill generation method, device, computer readable storage medium and computer equipment
Through the interaction between mobile terminals and blockchain nodes, users can directly generate invoices, which solves the problem of low inefficiency of invoicing in the existing technology and realizes the function of instant invoicing for transactions.
Patent Information
- Application Number
- CN201910872692.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-16
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2039-09-18
AI Technical Summary
The efficiency of invoicing in the existing technology is low, mainly because the invoicing power is in the hands of the invoicing company, and users need to communicate with the invoicing company, resulting in low efficiency.
After obtaining the user ID and graphic code through the mobile terminal to complete the payment, a payment voucher is generated, a bill creation request is sent to the blockchain node, and the target bill is generated using blockchain technology. The user can initiate a bill creation request directly through the mobile terminal without the need for a third-party agent. .
It enables users to generate invoices by themselves through mobile terminals, improves the efficiency of invoicing and reduces dependence on invoicing companies.
Smart Images

Figure CN110599269B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a bill generation method, apparatus, computer-readable storage medium, and computer equipment. Background Art
[0002] Blockchain is a distributed ledger that combines data blocks in a sequential manner in chronological order to form a chain data structure, and uses cryptography to ensure that the data cannot be tampered with or forged. Blockchain is also often used in issuing and storing invoices, but currently invoices are generally issued by users after consumption and communicate with the invoicing company, and then the invoicing company issues the invoice through the tax control disk. The initiative of the entire invoicing process is in the hands of the invoicing company, and the invoicing efficiency is low. Summary of the invention
[0003] Based on this, it is necessary to provide a bill generation method, apparatus, computer-readable storage medium and computer equipment to address the technical problem of low billing efficiency.
[0004] A bill generation method, applied to a mobile terminal, comprising:
[0005] Obtain the payment voucher generated after the user ID completes the payment according to the graphic code;
[0006] When receiving a bill creation request initiated by the user identifier based on the payment credential, sending the bill creation request to the blockchain node corresponding to the user identifier, wherein the bill creation request includes a transaction identifier;
[0007] Receiving transaction information and bill attribute information returned by the blockchain node according to the transaction identifier;
[0008] The bill creation information is obtained, and a target bill is generated according to the bill creation information, the transaction information and the bill attribute information.
[0009] A bill generation method, applied to a mobile terminal, comprising:
[0010] Obtain the payment voucher generated after the user ID completes the payment according to the graphic code;
[0011] When receiving a bill creation request initiated by the user identifier based on the payment voucher, sending the bill creation request to the blockchain node corresponding to the user identifier; the bill creation request includes bill creation information and a transaction identifier;
[0012] Receive the target note returned by the blockchain node corresponding to the user identifier in response to the note creation request; the target note is generated according to the note creation information, transaction information and note attribute information; the transaction information and the note attribute information are obtained by querying the transaction identifier.
[0013] A bill generation method, applied to a blockchain node, comprising:
[0014] Receiving a ticket creation request submitted by a user identifier, wherein the ticket creation request includes a transaction identifier;
[0015] Obtaining transaction information and ticket attribute information corresponding to the transaction identifier;
[0016] The transaction information and the ticket attribute information are sent to the user identifier so that the user identifier obtains the ticket creation information, and a target ticket is generated according to the ticket creation information, the transaction information and the ticket attribute information.
[0017] A bill generating device, applied to a mobile terminal, comprising:
[0018] A first acquisition module is used to obtain a payment voucher generated after the user identifier completes the payment according to the graphic code;
[0019] A first sending module, configured to, upon receiving a bill creation request initiated by the user identifier based on the payment voucher, send the bill creation request to a blockchain node corresponding to the user identifier, wherein the bill creation request includes a transaction identifier;
[0020] A first receiving module, configured to receive transaction information and bill attribute information returned by the blockchain node according to the transaction identifier;
[0021] The generation module is used to obtain the bill creation information and generate the target bill according to the bill creation information, the transaction information and the bill attribute information.
[0022] A bill generating device, applied to a mobile terminal, comprising:
[0023] The second acquisition module is used to obtain the payment voucher generated after the user identifier completes the payment according to the graphic code;
[0024] A second sending module is configured to, upon receiving a bill creation request initiated by the user identifier based on the payment voucher, send the bill creation request to the blockchain node corresponding to the user identifier; the bill creation request includes bill creation information and a transaction identifier;
[0025] The second receiving module receives the target note returned by the blockchain node corresponding to the user identifier in response to the note creation request; the target note is generated based on the note creation information, transaction information and note attribute information; the transaction information and the note attribute information are obtained by querying the transaction identifier.
[0026] A bill generating device, applied to a blockchain node, comprising:
[0027] A receiving module, configured to receive a bill creation request submitted by a user identifier, wherein the bill creation request includes a transaction identifier;
[0028] An acquisition module, used to acquire transaction information and bill attribute information corresponding to the transaction identifier;
[0029] The sending module is used to send the transaction information and the ticket attribute information to the user identifier so that the user identifier obtains the ticket creation information and generates a target ticket according to the ticket creation information, the transaction information and the ticket attribute information.
[0030] A computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to execute any step of the bill generation method.
[0031] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes any step of the bill generation method.
[0032] The above-mentioned bill generation method, device, computer-readable storage medium and computer equipment obtain the payment voucher generated by the user identifier after completing the payment according to the graphic code. When receiving the bill creation request initiated by the user identifier based on the payment voucher, the bill creation request is sent to the blockchain node corresponding to the user identifier. The bill creation request includes a transaction identifier, and the receiving blockchain node returns the transaction information and bill attribute information according to the transaction identifier, obtains the bill creation information, and generates the target bill according to the bill creation information, transaction information and bill attribute information. After the user completes the payment by using a mobile terminal, he can directly initiate a request to create a bill through the mobile terminal and obtain the target bill, without the need for a third-party agent, thereby realizing the function of issuing bills during transactions, greatly improving the efficiency of issuing bills. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 An application environment diagram of a bill generation method in an embodiment;
[0034] Figure 2 A schematic diagram of a flow chart of a bill generation method applied to a mobile terminal in one embodiment;
[0035] Figure 3 A flowchart of the steps of binding a user identifier to a blockchain node in one embodiment;
[0036] Figure 4 is a flow chart of a bill generation method applied to a mobile terminal in another embodiment;
[0037] Figure 5 A schematic diagram of a process of generating a bill applied to a blockchain node in one embodiment;
[0038] Figure 6 A schematic diagram of an optional block structure in an embodiment;
[0039] Figure 7 is a structural block diagram of a bill generating device applied to a mobile terminal in one embodiment;
[0040] Figure 8 is a structural block diagram of a bill generating device applied to a mobile terminal in another embodiment;
[0041] Fig. 9 It is a structural block diagram of a bill generating device applied to a blockchain node in another embodiment;
[0042] Fig.10 FIG. 4 is a structural block diagram of a computer device in one embodiment. DETAILED DESCRIPTION
[0043] 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.
[0044] The system involved in the embodiment of the present invention can be a distributed system formed by connecting a client and multiple nodes (any form of computing device in the access network, such as a server, a mobile terminal, and the mobile terminal can specifically be at least one of a desktop terminal, a mobile phone, a tablet computer, a laptop computer, etc.) through network communication.
[0045] Take the distributed system as the blockchain system as an example, see Figure 1 , Figure 1This is an optional structural diagram of the distributed system 100 provided by the embodiment of the present invention applied to the blockchain system, which is formed by multiple nodes 200 (any form of computing devices in the access network, such as servers and mobile terminals) and clients 300, and a peer-to-peer (P2P) network is formed between the nodes. The P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP). In a distributed system, any machine such as a server or a mobile terminal can join and become a node, and the node includes a hardware layer, an intermediate layer, an operating system layer, and an application layer.
[0046] See also Figure 1 The functions of each node in the blockchain system shown include:
[0047] 1) Routing: a basic function of a node, used to support communication between nodes.
[0048] In addition to the routing function, the node can also have the following functions:
[0049] 2) Applications are deployed in the blockchain to implement specific businesses based on actual business needs, record data related to the implementation of functions to form record data, carry digital signatures in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system for other nodes to add the record data to a temporary block when they successfully verify the source and integrity of the record data.
[0050] For example, the services implemented by the application include:
[0051] 2.1) Wallet, used to provide the function of conducting electronic currency transactions, including initiating transactions (i.e., sending the transaction record of the current transaction to other nodes in the blockchain system. After the other nodes successfully verify the transaction, as a response to acknowledge the validity of the transaction, the transaction record data is stored in the temporary block of the blockchain; of course, the wallet also supports querying the remaining electronic currency in the electronic currency address;
[0052] 2.2) Shared ledger, which is used to provide functions such as storage, query and modification of account data. The record data of the operation on the account data is sent to other nodes in the blockchain system. After other nodes verify the validity, as a response to acknowledging the validity of the account data, the record data is stored in a temporary block, and a confirmation can also be sent to the node that initiated the operation.
[0053] 2.3) Smart contracts are computerized protocols that can execute the terms of a contract. They are implemented by deploying code on a shared ledger that is executed when certain conditions are met. The code is used to complete automated transactions based on actual business needs, such as querying the logistics status of the goods purchased by the buyer and transferring the buyer's electronic currency to the merchant's address after the buyer signs for the goods. Of course, smart contracts are not limited to executing contracts for transactions, but can also execute contracts for processing received information.
[0054] 3) Blockchain, including a series of blocks that are connected to each other in the order of their generation. Once a new block is added to the blockchain, it will not be removed. The block records the record data submitted by the nodes in the blockchain system.
[0055] In this embodiment, the user logs in to the client on the mobile terminal through the user identification and interacts with the blockchain node connected to the mobile terminal. After the user logs in to the client on the mobile terminal through the user identification and completes the payment according to the graphic code, the mobile terminal where the user identification is located can send a record request to the blockchain node so that the blockchain node publishes the transaction information of the transaction to the blockchain. For example, the transaction information may include the transaction identification, transaction platform, transaction amount, transaction content, transaction participants, transaction time, etc. Of course, the specific content of the transaction information is not limited in this embodiment. When the mobile terminal receives the bill creation request initiated by the user identification based on the payment voucher, the bill creation request is sent to the blockchain node corresponding to the user identification, and the bill creation request contains the transaction identification. The blockchain node obtains the corresponding transaction information and bill attribute information according to the transaction identification and returns it to the mobile terminal where the user identification is located. The mobile terminal where the user identification is located receives the transaction information and bill attribute information returned by the blockchain node, obtains the bill creation information, and generates the target bill on the mobile terminal where the user identification is located according to the bill creation information, transaction information and bill attribute information. Further, the mobile terminal generates the target bill on the client corresponding to the user identification.
[0056] In one embodiment, Figure 2 As shown, a bill generation method is provided. This embodiment mainly uses the method applied to a mobile terminal as an example. Figure 2 The bill generation method specifically includes the following steps:
[0057] Step 202, obtaining the payment voucher generated after the user identification completes the payment according to the graphic code.
[0058] Among them, the graphic code refers to a black and white graphic that records data symbol information distributed on a plane (in two-dimensional direction) according to a certain pattern using a certain geometric figure. In the compilation of the code, the concept of "0" and "1" bit streams that constitute the internal logic basis of the computer is used, and several geometric shapes corresponding to binary are used to represent textual numerical information, which is automatically read by image input devices or photoelectric scanning devices to realize automatic information processing. The graphic code can be a QR code, etc. The payment voucher refers to the payment receipt information generated after the mobile terminal completes the payment. The user identifier can be an instant messaging account, an email account, a mobile communication number, etc.
[0059] Specifically, the user logs in to the client on the mobile terminal through the user ID, scans the graphic code offline through the mobile terminal, completes the payment according to the information of the graphic code, and automatically generates payment receipt information after the payment is completed. The mobile terminal can obtain the generated payment receipt information and store the payment receipt information.
[0060] In this embodiment, the user can log in to the client on the mobile terminal through the user identification, display the graphic code to other devices through the mobile terminal, and the other devices scan the graphic code of the mobile terminal to complete the payment.
[0061] Step 204: When a bill creation request initiated by the user identifier based on the payment voucher is received, the bill creation request is sent to the blockchain node corresponding to the user identifier, and the bill creation request includes a transaction identifier.
[0062] The transaction ID refers to a unique payment ID, such as a transaction number, order number, etc.
[0063] Specifically, the payment voucher display page displays payment information such as the transaction ID and provides an entry for bill creation. The user logs in to the client on the mobile terminal through the user ID, clicks on the payment voucher to enter the payment voucher display page, and initiates a bill creation request by clicking on the bill creation ID on the display page. When the mobile terminal receives the bill creation request initiated by the user ID based on the payment voucher, it obtains the transaction ID in the payment voucher and determines the blockchain node corresponding to the user ID. Then, the mobile terminal sends the bill creation request containing the transaction ID to the blockchain node corresponding to the user ID through the bill creation interface with the blockchain node.
[0064] Step 206, receiving the transaction information and bill attribute information returned by the blockchain node according to the transaction identifier.
[0065] Among them, transaction information may include transaction identification, transaction platform, transaction amount, transaction content, transaction participants, transaction time, etc., and bill attribute information refers to basic attributes such as bill code and bill number.
[0066] Specifically, after receiving the bill creation request, the blockchain node corresponding to the user identifier obtains transaction information and bill attribute information according to the transaction identifier in the bill creation request, and returns it to the mobile terminal. The mobile terminal receives the transaction information and bill attribute information returned by the blockchain node.
[0067] Step 208, obtaining the bill creation information, and generating the target bill according to the bill creation information, the transaction information and the bill attribute information.
[0068] Among them, the bill creation information includes the purchaser's information, such as the purchaser's header information, taxpayer identification number, address, telephone number, bank and account number.
[0069] Specifically, after the mobile terminal receives the transaction information and bill attribute information returned by the blockchain node according to the transaction identifier, it enters the transaction information and bill attribute information into the corresponding position of the bill creation page. The user directly enters the purchaser's title, taxpayer identification number, address, telephone number, bank and account number and other bill creation information on the page. The mobile terminal receives the bill creation information entered by the user, enters the bill creation information into the corresponding position of the bill creation page, and obtains the target bill.
[0070] In this embodiment, after the user enters the purchaser's title on the page, the mobile terminal can detect whether there is a taxpayer identification number, address, telephone number, bank account and account number corresponding to the title information. If there is, the taxpayer identification number, address, telephone number, bank account and account number corresponding to the title information are directly obtained and entered into the corresponding position of the bill creation page to obtain the target bill.
[0071] The above-mentioned bill creation method obtains the payment voucher generated after the user identifier completes the payment according to the graphic code. When a bill creation request initiated by the user identifier based on the payment voucher is received, the bill creation request is sent to the blockchain node corresponding to the user identifier. The bill creation request includes a transaction identifier, and the receiving blockchain node returns the transaction information and bill attribute information according to the transaction identifier, obtains the bill creation information, and generates the target bill according to the bill creation information, transaction information and bill attribute information. After the user completes the payment through his own mobile terminal, the invoice can be generated directly through the mobile terminal without the help of a third party, realizing the function of transaction and invoicing, which greatly improves the efficiency of issuing bills.
[0072] In one embodiment, Figure 3 As shown, before sending the bill creation request to the blockchain node corresponding to the user identifier, it also includes:
[0073] Step 302: Determine whether there is a blockchain node bound to the user ID.
[0074] Specifically, each user ID is bound to a blockchain node. When the user ID initiates a bill creation request for the first time, the mobile terminal first helps the user ID bind an address on the blockchain, which is the address of a blockchain node, so that the user ID establishes a mapping relationship with a blockchain node. Before the mobile terminal sends the bill creation request to the blockchain node corresponding to the user ID, it detects whether the user ID has been bound to the address of the blockchain node. When the user ID has been bound to the address of a blockchain node, the bill creation request is sent to the address of the blockchain node bound to the user ID, thereby sending the bill creation request to the blockchain node corresponding to the user ID.
[0075] Step 304: when the user identifier is not bound to a blockchain node, obtain an idle blockchain node.
[0076] Among them, idle blockchain nodes refer to blockchain nodes that are not bound to any user identity.
[0077] Specifically, when the mobile terminal detects that the user identification is not bound to a blockchain node, an idle blockchain node is obtained from the blockchain platform, and any blockchain node is selected from the idle blockchain nodes. Then, the mobile terminal obtains the address of the selected blockchain node.
[0078] Step 306: Bind the idle blockchain node to the user ID.
[0079] Specifically, the mobile terminal binds the acquired address of the blockchain node and the user identifier to realize the binding of the blockchain node and the user identifier, and after the binding is completed, sends the bill creation request to the blockchain node bound to the user identifier.
[0080] In this embodiment, by determining whether there is a bound blockchain node to the user identifier, when the user identifier is not bound to a blockchain node, an idle blockchain node is obtained, and the idle blockchain node is bound to the user identifier, so that each user identifier is bound to a blockchain node, thereby associating the user identifier and the blockchain node. Through this association, the user can generate tickets by himself through the mobile terminal.
[0081] In one embodiment, after generating the target note, the method further comprises:
[0082] Upload the target ticket to the blockchain node corresponding to the user ID.
[0083] Specifically, after the mobile terminal generates the target ticket, the target ticket is uploaded to the blockchain node bound to the user identifier, so that the target ticket is stored on the mobile terminal and the blockchain node at the same time to prevent loss.
[0084] In one embodiment, when the user identifier is an instant messaging account, the method further includes:
[0085] The target ticket is stored in a specific storage location of the instant messaging account.
[0086] Specifically, when the user identifier is an instant messaging account, after generating the target ticket, the mobile terminal stores the target ticket in the storage space corresponding to the instant messaging account. Further, the mobile terminal stores the target ticket in a specific storage location in the storage space corresponding to the instant messaging account.
[0087] For example, the instant messaging account can be a WeChat account, an Alipay account, etc. The WeChat account and the Alipay account each correspond to a storage space. After the user generates the target bill on the WeChat end through the WeChat account, the target bill is added to the card bag of the WeChat client. After the user generates the target bill on the Alipay client through the Alipay account, the target bill is added to the card bag of the Alipay client for easy viewing and use by the user.
[0088] In one embodiment, when the user identifier is an instant messaging account, the method further includes:
[0089] A viewing request is received; and according to the viewing request, the target ticket is displayed on a corresponding interface of the instant messaging terminal corresponding to the instant messaging account.
[0090] Specifically, when the user identifier is an instant messaging account, the mobile terminal can receive a ticket viewing request sent by the user through the instant messaging account. The mobile terminal obtains the corresponding target ticket from a specific storage location of the instant messaging account according to the viewing request, and displays the target ticket on the interface of the instant messaging terminal corresponding to the instant messaging account, so that the user can view the target ticket.
[0091] For example, the instant messaging account may be a WeChat account. The mobile terminal obtains the target ticket from the WeChat card wallet according to the user's ticket viewing request, and displays the target ticket on the WeChat card wallet interface.
[0092] In one embodiment, a ticket generation method is provided, which is applied to a mobile terminal and includes:
[0093] Step 402, obtaining the payment voucher generated after the user identification completes the payment according to the graphic code.
[0094] Specifically, the user logs in to the client on the mobile terminal through the user ID, scans the graphic code offline through the mobile terminal, completes the payment according to the information of the graphic code, and automatically generates payment receipt information after the payment is completed. The mobile terminal can obtain the generated payment receipt information and store the payment receipt information.
[0095] In this embodiment, the user can log in to the client on the mobile terminal through the user identification, display the graphic code to other devices through the mobile terminal, and the other devices scan the graphic code of the mobile terminal to complete the payment.
[0096] Step 404: When a bill creation request initiated by the user identifier based on the payment voucher is received, the bill creation request is sent to the blockchain node corresponding to the user identifier; the bill creation request includes bill creation information and a transaction identifier.
[0097] Specifically, the payment voucher display page displays payment information such as the transaction ID and provides an entry for bill creation. The user logs in to the mobile terminal through the user ID, clicks on the payment voucher to enter the payment voucher display page, and initiates a bill creation request by clicking on the bill creation ID. When the mobile terminal receives the bill creation request initiated by the user ID based on the payment voucher, it obtains the transaction ID in the payment voucher. And obtains the bill creation information entered by the user, such as the purchaser's title, taxpayer identification number, address, telephone number, bank and account number. Then, the mobile terminal determines the blockchain node corresponding to the user ID, and sends the bill creation request containing the transaction ID and bill creation information to the blockchain node corresponding to the user ID through the interface with the blockchain node.
[0098] Step 406, receiving the target note returned by the blockchain node corresponding to the user identifier in response to the note creation request; the target note is generated based on the note creation information, transaction information and note attribute information; the transaction information and the note attribute information are obtained by querying the transaction identifier.
[0099] Specifically, after receiving the bill creation request, the blockchain node corresponding to the user identifier queries and obtains the corresponding transaction information and bill attribute information according to the transaction identifier in the bill creation request. Then, the blockchain node generates a target bill according to the bill creation information, transaction information and bill attribute information in the bill creation request, and returns the generated target bill to the user identifier. The mobile terminal receives the target bill returned by the blockchain node corresponding to the user identifier.
[0100] The above-mentioned bill generation method obtains the payment voucher generated after the user identifier completes the payment according to the graphic code. When a bill creation request initiated by the user identifier based on the payment voucher is received, the bill creation request is sent to the blockchain node corresponding to the user identifier. The bill creation request includes bill creation information and transaction identification. The blockchain node corresponding to the user identifier is received in response to the bill creation request. The target bill is generated according to the bill creation information, transaction information and bill attribute information. The transaction information and bill attribute information are obtained by querying the transaction identification. After the user completes the payment through his own mobile terminal, he can directly initiate a bill creation request on the mobile terminal and directly receive the target bill generated on the corresponding blockchain node. There is no need to rely on a third party, so the function of transaction and invoicing is realized, which greatly improves the efficiency of issuing bills.
[0101] In one embodiment, before sending the ticket creation request to the blockchain node corresponding to the user identifier, it also includes: determining whether the user identifier has a bound blockchain node; when the user identifier is not bound to a blockchain node, obtaining an idle blockchain node; and binding the idle blockchain node to the user identifier.
[0102] Specifically, when the user ID initiates a bill creation request for the first time, the mobile terminal first helps the user ID bind an address on the blockchain, which is the address of a blockchain node, so that the user ID establishes a mapping relationship with a blockchain node. Before the mobile terminal sends the bill creation request to the blockchain node corresponding to the user ID, it detects whether the user ID has been bound to the address of the blockchain node. When the mobile terminal detects that the user ID is not bound to a blockchain node, it obtains an idle blockchain node from the blockchain platform and selects any blockchain node from the idle blockchain nodes. The mobile terminal binds the obtained blockchain node to the user ID to realize the binding of the blockchain node and the user ID. After the binding is completed, the bill creation request is sent to the blockchain node bound to the user ID.
[0103] In one embodiment, after generating the target ticket, the method further includes: uploading the target ticket to the blockchain node corresponding to the user identifier. Specifically, after the mobile terminal generates the target ticket, the target ticket is uploaded to the blockchain node bound to the user identifier, so that the target ticket is stored on the mobile terminal and the blockchain node at the same time to prevent loss.
[0104] In one embodiment, when the user identifier is an instant messaging account, the method further includes: storing the target ticket in a specific storage location of the instant messaging account. Specifically, when the user identifier is an instant messaging account, after generating the target ticket, the mobile terminal stores the target ticket in a storage space corresponding to the instant messaging account. Further, the mobile terminal stores the target ticket in a specific storage location in the storage space corresponding to the instant messaging account.
[0105] In one embodiment, when the user identifier is an instant messaging account, the method further includes: receiving a viewing request; and displaying the target ticket on a corresponding interface of the instant messaging terminal corresponding to the instant messaging account according to the viewing request.
[0106] Specifically, when the user identifier is an instant messaging account, the mobile terminal can receive a ticket viewing request sent by the user through the instant messaging account. The mobile terminal obtains the corresponding target ticket from a specific storage location of the instant messaging account according to the viewing request, and displays the target ticket on the interface of the instant messaging terminal corresponding to the instant messaging account, so that the user can view the target ticket.
[0107] In one embodiment, Figure 5 As shown, a bill generation method is provided, which is applied to a blockchain node, including:
[0108] Step 502: Receive a bill creation request submitted by a user identifier, where the bill creation request includes a transaction identifier.
[0109] Specifically, the user logs in to the mobile terminal through the user ID, scans the graphic code offline through the mobile terminal, completes the payment according to the information of the graphic code, and automatically generates payment receipt information after the payment is completed. The mobile terminal can obtain the generated payment receipt information and store the payment receipt information.
[0110] In this embodiment, the user can log in to the mobile terminal through the user identification, display the graphic code to other devices through the mobile terminal, and the other devices scan the graphic code of the mobile terminal to complete the payment.
[0111] Next, the user ID initiates a bill creation request based on the payment voucher, and the mobile terminal sends the bill creation request to the blockchain node corresponding to the user ID. The blockchain node receives the bill creation request submitted by the user ID and obtains the transaction ID from the bill creation request.
[0112] Step 504: Acquire transaction information and bill attribute information corresponding to the transaction identifier.
[0113] Specifically, the blockchain node queries the corresponding transaction information based on the transaction identifier. When the transaction information corresponding to the transaction identifier is queried, the transaction information can be obtained, and the bill attribute information can be obtained.
[0114] Step 506: Send the transaction information and the ticket attribute information to the user identifier, so that the user identifier obtains the ticket creation information, and generates a target ticket according to the ticket creation information, the transaction information and the ticket attribute information.
[0115] Specifically, the blockchain node sends the acquired transaction information and the bill attribute information to the user identifier, so that the user identifier obtains the bill creation information, and generates a target bill according to the bill creation information, the transaction information and the bill attribute information.
[0116] The above-mentioned bill generation method receives a bill creation request submitted by a user ID, the bill creation request includes a transaction ID, obtains the transaction information and bill attribute information corresponding to the transaction ID, sends the transaction information and the bill attribute information to the user ID, so that the user ID obtains the bill creation information, and generates a target bill according to the bill creation information, the transaction information and the bill attribute information. The bill generation method in this embodiment can obtain the transaction information and bill attribute information from the blockchain node corresponding to the user ID through the bill creation request, and establishes an association between the user mobile terminal and the blockchain node. In addition, an invoice is generated on the mobile terminal, so that the user can directly generate an invoice through the mobile terminal after completing the payment through the mobile terminal, realizing the function of transaction and invoicing, which greatly improves the efficiency of bill issuance.
[0117] In one embodiment, obtaining the transaction information and bill attribute information corresponding to the transaction identifier includes: determining whether there is a transaction corresponding to the transaction identifier on the blockchain node corresponding to the user identifier; when a transaction corresponding to the transaction identifier exists on the blockchain node, obtaining the transaction information and bill attribute information corresponding to the transaction.
[0118] Specifically, the blockchain node stores transaction information corresponding to the transaction identifier. After receiving the bill creation request submitted by the user identifier, the blockchain node obtains the transaction identifier from the bill creation request. It queries whether there is a transaction corresponding to the transaction identifier on the blockchain node. When the transaction corresponding to the transaction identifier is not found on the blockchain node, it is determined that the transaction identifier is invalid, and an error message is returned to the mobile terminal where the corresponding user identifier is located. When the transaction corresponding to the transaction identifier is found on the blockchain node, it is determined that the transaction identifier is valid, and the transaction information corresponding to the transaction is obtained. Then, after determining that there is a transaction corresponding to the transaction identifier, the blockchain node can obtain bill attribute information such as bill code and bill number to send the transaction information and bill attribute information to the mobile terminal where the user identifier is located. Determine the validity of the transaction identifier, and obtain the transaction information and attribute information such as bill code and bill number only when there is a corresponding transaction to ensure the authenticity of the bill information.
[0119] In one embodiment, when a transaction corresponding to the transaction identifier exists on the blockchain node, obtaining transaction information and bill attribute information corresponding to the transaction includes:
[0120] Determine the bill status of the transaction; when the bill status of the transaction is that the bill has not been created, obtain the transaction information and bill attribute information corresponding to the transaction.
[0121] The bill status refers to the status of a transaction in which a bill has not been created or has been created.
[0122] Specifically, when there is a transaction corresponding to the transaction identifier on the blockchain node, the blockchain node detects whether the transaction has created a bill. When the bill status of the transaction is that the bill has not been created, the blockchain node obtains the transaction information corresponding to the transaction, and then the blockchain node obtains the bill code and bill number, and generates bill attribute information including the bill code and bill number.
[0123] In this embodiment, when the blockchain node detects that the ticket status of the transaction is a created ticket, it obtains the ticket corresponding to the transaction identifier and sends the ticket to the mobile terminal where the user identifier corresponding to the blockchain node is located.
[0124] In this embodiment, by determining the bill status of the transaction corresponding to the transaction identifier, when the bill status of the transaction is that the bill has not been created, the transaction information and bill attribute information corresponding to the transaction are obtained, thereby avoiding repeated creation of bills and ensuring the authenticity and validity of the generated target bill.
[0125] In one embodiment, a bill generation method is provided, which is applied to a blockchain node and includes:
[0126] Receive a bill creation request initiated by a user ID based on a payment voucher, the bill creation request includes bill creation information and a transaction ID, the payment voucher is generated after the user ID completes the payment according to the graphic code; obtain corresponding transaction information and bill attribute information according to the transaction ID; generate a target bill according to the bill creation information, transaction information and bill attribute information; and return the target bill to the user ID.
[0127] Specifically, the blockchain node receives a bill creation request initiated by the corresponding user identifier based on the payment voucher, obtains a transaction identifier from the bill creation request, and obtains transaction information corresponding to the transaction identifier from the block according to the transaction identifier. The bill attribute information is obtained according to the transaction identifier, and the bill attribute information includes basic attributes such as the bill code and bill number. Then, the blockchain node can obtain the bill creation information from the bill creation information, generate a target bill according to the bill creation information, transaction information and bill attribute information, and send the generated target bill to the mobile terminal where the user identifier bound to the blockchain node is located.
[0128] The above-mentioned bill generation method receives a bill creation request initiated by a user identifier based on a payment voucher, obtains corresponding transaction information and bill attribute information according to the transaction identifier in the bill creation request, generates a target bill according to the bill creation information, transaction information and bill attribute information, and returns it to the user identifier, so that the target bill can be generated directly on the blockchain node corresponding to the user identifier according to the bill creation request initiated by the user based on the payment voucher, so that the user can apply for and generate bills by himself without the need for a third-party agent, realizing the function of transaction and invoicing, which greatly improves the efficiency of issuing bills.
[0129] In one embodiment, the bill creation information may include the bill header information and the transaction information of the transaction corresponding to the transaction identifier. The transaction information is input by the user. After receiving the bill creation request, the blockchain node compares the transaction information contained in the bill creation information with the transaction information stored on the blockchain node (corresponding to the transaction identifier). When the comparison result is that the two are consistent, the bill is created directly for the transaction corresponding to the transaction identifier based on the transaction information and header information contained in the bill creation information.
[0130] For example, after receiving a ticket creation request, the blockchain node reads the transaction information contained in the ticket creation information and calculates a first hash value, and compares the first hash value with the second hash value of the transaction information stored on the blockchain node (corresponding to the transaction identifier). When the first hash value is equal to the second hash value, it can be determined that the transaction information entered by the user is the transaction information of the transaction corresponding to the transaction identifier. Then, a ticket can be created directly for the transaction corresponding to the transaction identifier based on the transaction information and header information entered by the user, without reading the transaction information of the transaction corresponding to the transaction identifier stored on the blockchain, thereby ensuring that the transaction information is correct.
[0131] See also Figure 6 , Figure 6 This is an optional schematic diagram of the block structure provided by this embodiment. Each block includes the hash value of the transaction record stored in this block (the hash value of this block) and the hash value of the previous block. Each block is connected by the hash value to form a blockchain. In addition, the block can also include information such as the timestamp when the block was generated. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains relevant information for verifying the validity of its information (anti-counterfeiting) and generating the next block.
[0132] In one embodiment, a bill generation method is provided, the bill generation method comprising:
[0133] The mobile terminal obtains the user identification and generates a payment voucher after completing the payment according to the graphic code.
[0134] The mobile terminal where the user identification is located sends a record request to the corresponding blockchain node so that the blockchain node publishes the transaction information of the transaction to the blockchain.
[0135] The blockchain node corresponding to the user ID stores the transaction information of the transaction and publishes it to the blockchain.
[0136] When receiving a bill creation request initiated by the user identification based on the payment credential, the mobile terminal determines whether there is a bound blockchain node for the user identification.
[0137] When the user identification is not bound to a blockchain node, the mobile terminal obtains an idle blockchain node.
[0138] The mobile terminal binds the idle blockchain node to the user identifier.
[0139] The mobile terminal sends the bill creation request to the blockchain node corresponding to the user identifier, and the bill creation request includes a transaction identifier.
[0140] The blockchain node receives a ticket creation request submitted by a user identifier, where the ticket creation request includes a transaction identifier.
[0141] The blockchain node determines whether a transaction corresponding to the transaction identifier exists on the blockchain node corresponding to the user identifier.
[0142] When a transaction corresponding to the transaction identifier exists on the blockchain node, the ticket status of the transaction is determined.
[0143] When the ticket status of the transaction is that the ticket is not created, the blockchain node obtains the transaction information and ticket attribute information corresponding to the transaction, and returns the transaction information and ticket attribute information to the mobile terminal where the user identifier is located.
[0144] The mobile terminal receives the transaction information and bill attribute information returned by the blockchain node according to the transaction identifier.
[0145] The mobile terminal obtains the bill creation information, and generates a target bill according to the bill creation information, the transaction information and the bill attribute information.
[0146] The mobile terminal uploads the target ticket to the blockchain node corresponding to the user ID.
[0147] The blockchain node receives the target ticket uploaded by the mobile terminal where the user ID is located, and stores the target ticket in the block.
[0148] When the user identifier is an instant messaging account, the mobile terminal stores the target ticket in a specific storage location of the instant messaging account.
[0149] The mobile terminal receives the viewing request and displays the target ticket on a corresponding interface of the instant messaging terminal corresponding to the instant messaging account according to the viewing request.
[0150] The above-mentioned bill generation method applied to the mobile terminal obtains the payment voucher generated after the user identifier completes the payment according to the graphic code. When receiving the bill creation request initiated by the user identifier based on the payment voucher, it is determined whether the user identifier is bound to the blockchain node. If not bound, the user identifier is first bound to the blockchain node to establish an association between the user identifier and the blockchain node. Then the bill creation request is sent to the blockchain node corresponding to the user identifier to receive the transaction information and bill attribute information returned by the blockchain node. The target bill is generated according to the bill creation information, transaction information and bill attribute information, so that the user can directly generate an invoice on the mobile terminal after completing the payment through the mobile terminal, realizing the function of transaction and invoicing. After obtaining the target invoice, the target bill is uploaded to the blockchain node corresponding to the user identifier for storage to avoid the loss of the target bill. The target bill is stored in a specific storage location of the instant messaging account. When receiving the user's viewing request, the target bill is displayed on the corresponding interface of the instant messaging terminal corresponding to the instant messaging account, so that the user can view and use the target bill. Through the bill generation method in the embodiment, there is no need to rely on a third-party billing company to issue bills, thereby greatly improving the efficiency of bill issuance.
[0151] In one embodiment, a bill generation method is provided, the bill generation method comprising:
[0152] The mobile terminal obtains the user identification and generates a payment voucher after completing the payment according to the graphic code.
[0153] The mobile terminal sends a record request to the corresponding blockchain node by sending the mobile terminal where the user identification is located so that the blockchain node publishes the transaction information of the transaction to the blockchain.
[0154] The blockchain node corresponding to the user ID stores the transaction information of the transaction and publishes it to the blockchain.
[0155] When receiving a bill creation request initiated by the user identification based on the payment credential, the mobile terminal determines whether there is a bound blockchain node for the user identification.
[0156] When the user identification is not bound to a blockchain node, the mobile terminal obtains an idle blockchain node.
[0157] The mobile terminal binds the idle blockchain node to the user identifier.
[0158] The mobile terminal sends the bill creation request to the blockchain node corresponding to the user identifier, and the bill creation request includes bill creation information and a transaction identifier.
[0159] The blockchain node corresponding to the user ID receives a bill creation request initiated by the user ID based on the payment credential.
[0160] The blockchain node determines whether there is a transaction corresponding to the transaction identifier in the bill creation request on the blockchain node corresponding to the user identifier.
[0161] When a transaction corresponding to the transaction identifier exists on the blockchain node, the ticket status of the transaction is determined.
[0162] When the bill status of the transaction is that the bill has not been created, the blockchain node obtains the transaction information and bill attribute information corresponding to the transaction.
[0163] The blockchain node generates a target note based on the note creation information, transaction information and note attribute information, and returns the target note to the user ID.
[0164] The mobile terminal receives the target ticket returned by the blockchain node corresponding to the user identifier in response to the ticket creation request.
[0165] When the user identifier is an instant messaging account, the mobile terminal stores the target ticket in a specific storage location of the instant messaging account.
[0166] The mobile terminal receives the viewing request and displays the target ticket on a corresponding interface of the instant messaging terminal corresponding to the instant messaging account according to the viewing request.
[0167] The above-mentioned bill generation method obtains the payment voucher generated after the user identifier completes the payment according to the graphic code. When receiving the bill creation request initiated by the user identifier based on the payment voucher, it is determined whether the user identifier is bound to the blockchain node. If it is not bound, the user identifier is first bound to the blockchain node to establish an association between the user identifier and the blockchain node. Then the bill creation request is sent to the blockchain node corresponding to the user identifier. The blockchain node verifies whether the transaction identifier in the bill creation request is valid and whether the transaction has created a bill. When the transaction corresponding to the transaction identifier is valid and the bill has not been created, the transaction information corresponding to the transaction identifier is obtained, and the bill attribute information is obtained. The target bill is generated according to the bill creation information, transaction information and bill attribute information, and returned to the mobile terminal where the user identifier is located. After the user completes the payment through the mobile terminal, it is possible to directly apply for bill creation on the mobile terminal, realizing the function of transaction and billing. The target bill is stored in a specific storage location of the instant messaging account. When receiving the user's viewing request, the target bill is displayed on the corresponding interface of the instant messaging terminal corresponding to the instant messaging account, so that the user can view and use the target bill. Through the bill generation method in the embodiment, there is no need to rely on a third-party billing company to issue bills, thereby greatly improving the efficiency of bill issuance.
[0168] Figure 2-Figure 5 FIG. 1 is a flow chart of a bill generation method in one embodiment. It should be understood that although Figure 2-Figure 5 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-Figure 5 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.
[0169] In one embodiment, Figure 7 As shown, a bill generation device is provided, which is applied to a mobile terminal, and the device includes: a first acquisition module 702, a first sending module 704, a first receiving module 706 and a generation module 708. Among them,
[0170] The first acquisition module 702 is used to obtain the payment voucher generated after the user identifier completes the payment according to the graphic code.
[0171] The first sending module 704 is used to send the bill creation request initiated by the user identifier based on the payment voucher to the blockchain node corresponding to the user identifier when receiving the bill creation request, and the bill creation request includes a transaction identifier.
[0172] The first receiving module 706 is used to receive the transaction information and bill attribute information returned by the blockchain node according to the transaction identifier.
[0173] The generation module 708 is used to obtain the bill creation information, and generate the target bill according to the bill creation information, the transaction information and the bill attribute information.
[0174] The above-mentioned bill creation device obtains the payment voucher generated after the user identifier completes the payment according to the graphic code. When receiving the bill creation request initiated by the user identifier based on the payment voucher, the bill creation request is sent to the blockchain node corresponding to the user identifier. The bill creation request includes a transaction identifier, and the receiving blockchain node returns the transaction information and bill attribute information according to the transaction identifier, obtains the bill creation information, and generates the target bill according to the bill creation information, transaction information and bill attribute information. After the user completes the payment through his own mobile terminal, the invoice can be directly generated through the mobile terminal, realizing the function of transaction and invoicing, which greatly improves the efficiency of issuing bills.
[0175] In one embodiment, the first sending module 704 is also used to determine whether there is a bound blockchain node to the user identifier; when the user identifier is not bound to a blockchain node, obtain an idle blockchain node; and bind the idle blockchain node to the user identifier. By determining whether there is a bound blockchain node to the user identifier, when the user identifier is not bound to a blockchain node, obtain an idle blockchain node, and bind the idle blockchain node to the user identifier, each user identifier is bound to a blockchain node, thereby associating the user identifier with the blockchain node, and through this association, the user can generate a bill by himself through the mobile terminal.
[0176] In one embodiment, the bill generation device further includes: an upload module. The upload module is used to upload the target bill to the blockchain node corresponding to the user identifier. After the target bill is generated, the target bill is uploaded to the blockchain node bound to the user identifier, so that the target bill is stored on the mobile terminal and the blockchain node at the same time to prevent loss.
[0177] In one embodiment, the ticket generation device further includes: a storage module. The storage module is used to store the target ticket in a specific storage location of the instant messaging account. The target ticket is stored in a specific storage location for easy viewing and use by users.
[0178] In one embodiment, the bill generating device further comprises: a display module. The display module is used to receive a viewing request and display the target bill on a corresponding interface of the instant messaging terminal corresponding to the instant messaging account according to the viewing request.
[0179] In one embodiment, Figure 8 As shown, a bill generation device is provided, which is applied to a mobile terminal, and the device includes: a second acquisition module 802, a second acquisition module 802 and a second receiving module 806.
[0180] The second acquisition module 802 is used to acquire the payment voucher generated after the user identifier completes the payment according to the graphic code.
[0181] The second sending module 804 is used to send the bill creation request to the blockchain node corresponding to the user identifier when receiving the bill creation request initiated by the user identifier based on the payment voucher; the bill creation request includes bill creation information and transaction identifier.
[0182] The second receiving module 806 receives the target note returned by the blockchain node corresponding to the user identifier in response to the note creation request; the target note is generated based on the note creation information, transaction information and note attribute information; the transaction information and the note attribute information are obtained by querying the transaction identifier.
[0183] The above-mentioned bill generating device obtains the payment voucher generated by the user identifier after completing the payment according to the graphic code. When receiving the bill creation request initiated by the user identifier based on the payment voucher, the bill creation request is sent to the blockchain node corresponding to the user identifier. The bill creation request includes bill creation information and transaction identification. The blockchain node corresponding to the user identifier is received in response to the bill creation request. The target bill is generated according to the bill creation information, transaction information and bill attribute information. The transaction information and bill attribute information are obtained by querying the transaction identification. After the user completes the payment through his own mobile terminal, he can directly initiate the bill creation request on the mobile terminal and directly receive the target bill generated on the corresponding blockchain node. There is no need to rely on a third party, realizing the function of transaction and invoicing, which greatly improves the efficiency of issuing bills.
[0184] In one embodiment, Fig. 9 As shown, a bill generation device is provided, which is applied to a blockchain node, including:
[0185] The receiving module 902 is used to receive a bill creation request submitted by a user identifier, where the bill creation request includes a transaction identifier.
[0186] The acquisition module 904 is used to acquire the transaction information and bill attribute information corresponding to the transaction identifier.
[0187] The sending module 906 is used to send the transaction information and the ticket attribute information to the user identifier, so that the user identifier obtains the ticket creation information and generates a target ticket according to the ticket creation information, the transaction information and the ticket attribute information.
[0188] The above-mentioned bill generation device receives a bill creation request submitted by a user ID, the bill creation request includes a transaction ID, obtains the transaction information and bill attribute information corresponding to the transaction ID, sends the transaction information and the bill attribute information to the user ID, so that the user ID obtains the bill creation information, and generates a target bill according to the bill creation information, the transaction information and the bill attribute information. The bill generation method in this embodiment can obtain the transaction information and bill attribute information from the blockchain node corresponding to the user ID through the bill creation request, and establishes an association between the user mobile terminal and the blockchain node. In addition, an invoice is generated on the mobile terminal, so that the user can directly generate an invoice through the mobile terminal after completing the payment through the mobile terminal, realizing the function of transaction and invoicing, which greatly improves the efficiency of bill issuance.
[0189] In one embodiment, the acquisition module 904 is also used to: determine whether there is a transaction corresponding to the transaction identifier on the blockchain node corresponding to the user identifier; when there is a transaction corresponding to the transaction identifier on the blockchain node, obtain the transaction information and bill attribute information corresponding to the transaction. Determine the validity of the transaction identifier, and only obtain the transaction information and the bill code, bill number and other attribute information when there is a corresponding transaction to ensure the authenticity of the bill information.
[0190] In one embodiment, the acquisition module 904 is further used to: determine the bill status of the transaction; when the bill status of the transaction is that the bill has not been created, obtain the transaction information and bill attribute information corresponding to the transaction. By determining the bill status of the transaction corresponding to the transaction identifier, when the bill status of the transaction is that the bill has not been created, obtaining the transaction information and bill attribute information corresponding to the transaction, it is possible to avoid duplicate bill creation and ensure the authenticity and validity of the generated target bill.
[0191] Fig.10 FIG. 1 shows an internal structure diagram of a computer device in an embodiment. The computer device may specifically be a mobile terminal. Fig.10As shown, the computer device includes a processor, a memory, a network interface, an input device and a display screen connected through a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement the bill generation method. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can execute the bill generation method. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse.
[0192] Those skilled in the art will understand that Fig.10 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.
[0193] In one embodiment, the bill generating device provided by the present application can be implemented in the form of a computer program, and the computer program can be Fig.10 The memory of the computer device may store various program modules constituting the bill generating device, for example, Figure 7 The first acquisition module 702, the first sending module 704, the first receiving module 706 and the generating module 708 are shown. The computer program composed of various program modules enables the processor to execute the steps of the bill generating method of each embodiment of the present application described in this specification.
[0194] For example, Fig.10 The computer device shown can be Figure 7 The first acquisition module 702 in the bill generation device shown executes the step of acquiring the payment voucher generated by the user identifier after completing the payment according to the graphic code. The computer device can execute the step of sending the bill creation request to the blockchain node corresponding to the user identifier when receiving the bill creation request initiated by the user identifier based on the payment voucher through the first sending module 704, and the bill creation request includes a transaction identifier. The computer device can execute the step of receiving the transaction information and bill attribute information returned by the blockchain node according to the transaction identifier through the first receiving module 706. The computer device can execute the step of acquiring the bill creation information through the generation module 708, and generating the target bill according to the bill creation information, the transaction information and the bill attribute information.
[0195] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned bill generation method. The steps of the bill generation method here may be the steps of the bill generation method in the above-mentioned various embodiments.
[0196] In one embodiment, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the above-mentioned bill generation method. The steps of the bill generation method here can be the steps of the bill generation method in each of the above-mentioned embodiments.
[0197] 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 program can be stored in a non-volatile computer-readable storage medium. When the 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 may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may 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).
[0198] 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.
[0199] 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 present application. 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 present application shall be subject to the attached claims.
Claims
1. A bill generation method, applied to a mobile terminal, include: Log in to the client on the mobile terminal through the user identification, perform the payment transaction by scanning the graphic code through the client, and obtain the payment voucher generated after the payment transaction is completed; Sending a record request to a blockchain node corresponding to the mobile terminal, wherein the record request is used to instruct the blockchain node to store transaction information of the payment transaction and publish it to the blockchain; Entering the display page of the payment voucher, when receiving a bill creation request initiated by the user identifier by triggering a bill creation entry in the display page, determining whether there is a bound blockchain node for the user identifier; When the user identifier is not bound to a blockchain node, obtaining an idle blockchain node, where the idle blockchain node represents a blockchain node that is not bound to the user identifier; Binding the idle blockchain node to the user identifier, and sending the bill creation request to the blockchain node bound to the user identifier, wherein the bill creation request includes a transaction identifier; Receiving transaction information and bill attribute information returned by the blockchain node when it is determined that the transaction identifier has a corresponding payment transaction and the bill status of the payment transaction is that the bill is not created; Input the transaction information and the ticket attribute information into corresponding positions on the ticket creation page, and generate a target ticket by combining the ticket creation information input by the user identifier into corresponding positions on the ticket creation page; The target ticket is uploaded to the blockchain node bound to the user identifier.
2. The method according to claim 1, It is characterized in that When the user identifier is an instant messaging account, the method further includes: Storing the target ticket in a specific storage location of the instant messaging account; receiving viewing requests; According to the viewing request, the target ticket is displayed on a corresponding interface of the instant messaging terminal corresponding to the instant messaging account.
3. The method according to claim 1, It is characterized in that The method further comprises: Receive the bill returned by the blockchain node when it is determined that the transaction identifier has a corresponding payment transaction and the bill status of the payment transaction is a created bill.
4. A bill generation method, applied to a blockchain node, include: Receiving a bill creation request submitted by a user identifier bound to the blockchain node, the bill creation request including a transaction identifier, the bill creation request being initiated by the user identifier triggering a bill creation entry in a display page of a payment voucher, the payment voucher being generated after the user identifier scans a graphic code through a client logged in on a mobile terminal to execute a payment transaction, the user identifier being bound when the blockchain node is idle, and the blockchain node being idle indicates that the blockchain node is not bound to the user identifier; Obtaining transaction information and ticket attribute information corresponding to the transaction identifier; The transaction information is stored and published as indicated by a record request sent by the mobile terminal of the user identification; Sending the transaction information and the ticket attribute information to the mobile terminal of the user identifier, so that the mobile terminal inputs the transaction information and the ticket attribute information into corresponding positions on a ticket creation page, and generates a target ticket in combination with the ticket creation information input by the user identifier at corresponding positions on the ticket creation page; The target ticket uploaded by the mobile terminal is received.
5. A bill generating device, It is characterized in that Applied to a mobile terminal, the device comprises: A first acquisition module is used to log in to the client on the mobile terminal through a user identification, perform a payment transaction by scanning a graphic code through the client, and obtain a payment voucher generated after the payment transaction is completed; A module for sending a record request to a blockchain node corresponding to the mobile terminal, wherein the record request is used to instruct the blockchain node to store the transaction information of the payment transaction and publish it to the blockchain; A module for entering a display page of the payment voucher; The first sending module is used to determine whether there is a bound blockchain node for the user identifier when receiving a bill creation request initiated by the user identifier by triggering a bill creation entry in the display page; when the user identifier is not bound to a blockchain node, obtain an idle blockchain node, wherein the idle blockchain node represents a blockchain node that is not bound to the user identifier; bind the idle blockchain node to the user identifier, and send the bill creation request to the blockchain node bound to the user identifier, wherein the bill creation request includes a transaction identifier; A first receiving module is used to receive the transaction information and bill attribute information returned by the blockchain node when it is determined that the transaction identifier has a corresponding payment transaction and the bill status of the payment transaction is that the bill is not created; A generating module, configured to input the transaction information and the bill attribute information into corresponding positions on a bill creation page, and generate a target bill in combination with the bill creation information input by the user identifier at a corresponding position on the bill creation page; The uploading module is used to upload the target ticket to the blockchain node corresponding to the user identifier.
6. The device according to claim 5, It is characterized in that The user identifier is an instant messaging account, and the device further includes: The storage module is used to store the target ticket in a specific storage location of the instant messaging account; receive a viewing request; and display the target ticket on a corresponding interface of the instant messaging terminal corresponding to the instant messaging account according to the viewing request.
7. The device according to claim 5, It is characterized in that The device also includes: A module for receiving a bill returned by the blockchain node when it is determined that the transaction identifier has a corresponding payment transaction and the bill status of the payment transaction is a created bill.
8. A bill generation device, applied to a blockchain node, include: A receiving module, configured to receive a bill creation request submitted by a user identifier bound to the blockchain node, the bill creation request including a transaction identifier, the bill creation request being initiated by the user identifier triggering a bill creation entry in a display page of a payment voucher, the payment voucher being generated after the user identifier scans a graphic code through a client logged in on a mobile terminal to execute a payment transaction, the user identifier being bound when the blockchain node is idle, and the blockchain node being idle indicates that the blockchain node is not bound to the user identifier; An acquisition module, used to acquire transaction information and bill attribute information corresponding to the transaction identifier; The transaction information is stored and published as indicated by a record request sent by the mobile terminal of the user identification; A sending module is used to send the transaction information and the ticket attribute information to the mobile terminal of the user identifier, so that the mobile terminal enters the transaction information and the ticket attribute information into the corresponding position of the ticket creation page, and generates a target ticket in combination with the ticket creation information entered by the user identifier at the corresponding position of the ticket creation page.
9. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 4.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 4.
