Bill processing method, device, computer readable storage medium and computer equipment
By introducing a second blockchain node into the blockchain system to handle bill creation and collection requests separately, the problem of low efficiency in bill data reception, generation and downloading in traditional technology is solved, and a more efficient bill processing process is achieved.
Patent Information
- Application Number
- CN201910912039.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-25
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2039-09-27
AI Technical Summary
In traditional blockchain technology, the efficiency of receiving, generating and downloading bill data is low, resulting in limited system performance.
By introducing a second blockchain node into the blockchain system, after the first blockchain node receives the user's ticket creation request and generates the target ticket, it sends it to the second blockchain node for storage. The chain node is responsible for the user's ticket collection request and data return, realizing data division of labor and efficiency improvement.
It improves the efficiency of receiving, generating and issuing bill-related data, reduces system load and improves user experience.
Smart Images

Figure CN110599347B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a bill processing method, apparatus, computer-readable storage medium, and computer equipment. Background Art
[0002] Blockchain is a chain data structure that combines data blocks in a sequential manner in chronological order. It is a distributed ledger that ensures that data cannot be tampered with or forged through cryptography. Blockchain is also often used in the processing of bill data, but in traditional technology, all user-related bill data is stored in the same node on the blockchain. The same node not only receives the bill-related data uploaded by the user, but also generates the corresponding bill in real time. On the other hand, it also provides users with the service of downloading the generated bill, which affects the efficiency of receiving, generating and downloading bill data. Summary of the invention
[0003] Based on this, it is necessary to provide a bill processing method, apparatus, computer-readable storage medium and computer equipment to address the technical problem of low efficiency in receiving, generating and downloading bill data.
[0004] A bill processing method, characterized in that the method comprises:
[0005] The first blockchain node receives a ticket creation request uploaded by the first user identification;
[0006] The first blockchain node generates a target note according to the note creation request;
[0007] The first blockchain node sends the target bill to a second blockchain node, and the second blockchain node is used to store the target bill; the first user identifier is associated with the first blockchain node and the second blockchain node;
[0008] The second blockchain node receives a ticket collection request initiated by the second user identifier after logging into the second blockchain node;
[0009] The second blockchain node obtains the corresponding target ticket according to the ticket collection request, and returns the obtained target ticket to the second user identifier.
[0010] A bill issuance method, applied to a second blockchain node, comprising:
[0011] Receiving a ticket collection request initiated by a second user identifier after logging into the second blockchain node;
[0012] Obtaining a corresponding target bill according to the bill collection request; the target bill is generated by the first blockchain node according to the bill creation request uploaded by the first user identifier; the first user identifier is associated with the first blockchain node and the second blockchain node;
[0013] The obtained target ticket is sent to the second user identifier.
[0014] A bill processing device, characterized in that the device comprises:
[0015] A first receiving module, configured for a first blockchain node to receive a bill creation request uploaded by a first user identifier;
[0016] A generation module, configured for the first blockchain node to generate a target note according to the note creation request;
[0017] A storage module, used for the first blockchain node to send the target bill to a second blockchain node, and the second blockchain node is used to store the target bill; the first user identifier is associated with the first blockchain node and the second blockchain node;
[0018] A second receiving module, configured for the second blockchain node to receive a ticket collection request initiated by a second user identifier after logging into the second blockchain node;
[0019] A return module is used for the second blockchain node to obtain the corresponding target ticket according to the ticket collection request, and return the obtained target ticket to the second user identifier.
[0020] A bill issuance device, applied to a second blockchain node, comprising:
[0021] A second receiving module, configured to receive a ticket collection request initiated by a second user identifier after logging into the second blockchain node;
[0022] an acquisition module, configured to acquire a corresponding target bill according to the bill collection request; the target bill is generated by the first blockchain node according to the bill creation request uploaded by the first user identifier; the first user identifier is associated with the first blockchain node and the second blockchain node;
[0023] A sending module is used to send the acquired target ticket to the second user identifier.
[0024] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the bill processing method and the bill issuing method.
[0025] 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 the bill processing method and the bill issuing steps.
[0026] In the above-mentioned bill processing method, device, computer-readable storage medium and computer equipment, the first blockchain node receives a bill creation request uploaded by the first user identifier, generates a target bill according to the bill creation request, and sends the target bill to the second blockchain node, the second blockchain node is used to store the target bill, and the first user identifier is associated with the first blockchain node and the second blockchain node. The second blockchain node receives a bill collection request initiated by the second user identifier after logging into the second blockchain node, obtains the corresponding target bill according to the bill collection request, and returns the obtained target bill to the second user identifier. The use of this solution can improve the efficiency of bill-related data reception, bill generation and bill issuance. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is an application environment diagram of a blockchain system in one embodiment;
[0028] Figure 2 A diagram of an application environment of a bill processing method in an embodiment;
[0029] Figure 3 A schematic diagram of a process flow of a bill processing method in one embodiment;
[0030] Figure 4 A schematic diagram of a process of generating a bill in one embodiment;
[0031] Figure 5 A schematic diagram of a process of issuing a bill in one embodiment;
[0032] Figure 6 A schematic diagram of an optional block structure in an embodiment;
[0033] Figure 7 is a structural block diagram of a bill processing device in one embodiment;
[0034] Figure 8 is a structural block diagram of a bill generating device in one embodiment;
[0035] Fig. 9 It is a structural block diagram of a bill issuing device in another embodiment;
[0036] Fig.10 FIG. 4 is a structural block diagram of a computer device in one embodiment. DETAILED DESCRIPTION
[0037] 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.
[0038] The system involved in the embodiment of the present invention may be a distributed system formed by connecting a client and multiple nodes (computing devices of any form in an access network, such as a server and a user terminal) through network communication.
[0039] Take the distributed system as the blockchain system as an example, see Figure 1 , Figure 1 It 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 110 (any form of computing devices in the access network, such as servers and user 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) protocol. In a distributed system, any machine such as a server or a 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.
[0040] See also Figure 1 The functions of each node in the blockchain system shown include:
[0041] 1) Routing: a basic function of a node, used to support communication between nodes.
[0042] In addition to the routing function, the node can also have the following functions:
[0043] 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.
[0044] For example, the services implemented by the application include:
[0045] 2.1) Wallet, used to provide the function of conducting transactions of electronic digital assets, including initiating transactions (i.e., sending the transaction record of the current transaction to other nodes in the blockchain system. After successful verification by other nodes, 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 digital assets in the electronic digital asset address;
[0046] 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.
[0047] 2.3) Smart contracts are computerized protocols that can execute the terms of a contract. They are implemented through code deployed 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 digital assets 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.
[0048] 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.
[0049] like Figure 2As shown, it is an application environment diagram of the bill processing method in one embodiment. The enterprise user receives the bill creation request sent by the consumer through the consumer terminal 230 through the enterprise user terminal 200. The enterprise user can log in to the client through the first user identification, and upload the consumer's bill creation request to the first blockchain node 210 through the enterprise user terminal 200 where the client is located. The first blockchain node 210 receives the bill creation request on the enterprise user terminal 200, generates a target bill according to the bill creation request, and the first blockchain node 210 sends the target bill to the second blockchain node 220. The second blockchain node 220 receives the target bill and stores it. The enterprise user sends the address of the second blockchain node 220 to the consumer terminal 230 through the enterprise user terminal 200 to send the address of the second blockchain node 220 to the consumer. The consumer uses the second user identification to access the address of the second blockchain node 220 through the consumer terminal 230, thereby logging in to the second blockchain node 220. The consumer uses the second user identification to initiate a bill collection request to the second blockchain node 220 using the consumer terminal 230. When the second blockchain node 220 receives the bill collection request initiated by the consumer, the second blockchain node 220 obtains the corresponding target bill according to the bill collection request, and returns the obtained target bill to the consumer terminal 230 where the second user identifier is located. By associating the first user identifier with two blockchain nodes, one blockchain node is used to generate the target bill, and the other blockchain node is used to issue the target bill to the consumer, the efficiency of bill processing can be improved.
[0050] like Figure 3 As shown, in one embodiment, a bill processing method is provided, the bill processing method comprising:
[0051] Step 302: The first blockchain node receives a ticket creation request uploaded by the first user ID.
[0052] The first user identifier may be an instant messaging account, an email account, a mobile communication number, etc.
[0053] Specifically, the enterprise user receives the bill creation request from the consumer, which includes bill creation information and transaction identification. The transaction identification refers to a unique identification of the payment, such as a transaction number, order number, etc. Then, the enterprise user can log in to the client through the first user identification, and upload the bill creation request including the bill creation information and transaction identification to the associated first blockchain node through the client. The first blockchain node receives the bill creation request uploaded by the associated first user identification.
[0054] Step 304: The first blockchain node generates a target note according to the note creation request.
[0055] Specifically, the note creation information and transaction identifier in the note creation request of the second blockchain node generate a corresponding target note.
[0056] In step 306, the first blockchain node sends the target bill to the second blockchain node, and the second blockchain node is used to store the target bill; the first user identifier is associated with the first blockchain node and the second blockchain node.
[0057] Among them, associating the first user identifier with the first blockchain node and the second blockchain node means that the first user identifier is bound to the address of the first blockchain node, the first user identifier is bound to the address of the second blockchain node, and the address of the first blockchain node is bound to the address of the second blockchain node.
[0058] Specifically, the first user identifier is associated with the first blockchain node, the first user identifier is associated with the second blockchain node, and the first blockchain node is associated with the second blockchain node. After the first blockchain node generates the target bill, the generated target bill can be associated with the transaction identifier. The first blockchain node sends the generated target bill and the transaction identifier to the bound second blockchain node.
[0059] Step 308: The second blockchain node receives a ticket collection request initiated by the second user identifier after logging into the second blockchain node.
[0060] Specifically, the second blockchain node receives the target bill and the corresponding transaction identifier sent by the first blockchain node, and stores the target bill and the transaction identifier in correspondence. The consumer logs in to the terminal through the second user identifier, and the terminal can be a desktop terminal or a mobile terminal. The mobile terminal can be at least one of a mobile phone, a tablet computer, a laptop computer, etc. And access the address of the second blockchain node through the terminal where the second user identifier is located, so as to log in to the second blockchain node. After logging in to the second blockchain node, a bill collection request is initiated through the mobile terminal where the second user identifier is located, and the bill collection request contains the transaction identifier. The second blockchain node receives the bill collection request containing the transaction identifier initiated by the second user identifier.
[0061] Step 310: The second blockchain node obtains the corresponding target ticket according to the ticket collection request, and returns the obtained target ticket to the second user identifier.
[0062] Specifically, the second blockchain node obtains a transaction identifier from the bill collection request and compares the transaction identifier with the transaction identifier stored on the second blockchain node. When the second blockchain node has a transaction identifier identical to the bill collection request, the target bill corresponding to the transaction identifier is obtained. The target bill is generated by the first blockchain node according to the bill creation request uploaded by the first user identifier. The second blockchain node sends the obtained target invoice to the terminal where the second user identifier is located.
[0063] In the above-mentioned bill processing method, the first blockchain node receives the bill creation request uploaded by the first user identifier, generates the target bill according to the bill creation request, and sends the target bill to the second blockchain node. The second blockchain node is used to store the target bill so that the second user identifier logs in to the second blockchain node to receive the target bill. The first user identifier is associated with the first blockchain node and the second blockchain node. The second blockchain node receives and stores the target bill sent by the first blockchain node. The second blockchain node receives the bill collection request initiated by the second user identifier after logging in to the second blockchain node, obtains the corresponding target bill according to the bill collection request, and returns the obtained target bill to the second user identifier. This solution associates the first user identifier with two blockchain nodes, so that one blockchain node is used to receive data related to the bill and generate the target bill, and the other blockchain node is used to issue the target bill to the user, so that different blockchain nodes realize different functions and are responsible for a part of the business, thereby improving the efficiency of receiving relevant data of the bill, bill generation and bill issuance.
[0064] In one embodiment, after the target bill is generated according to the bill creation request, the method further includes: setting the generated target bill to an uncollected state. All newly generated target bills are set to an uncollected state to distinguish whether the target bill has been collected.
[0065] In one embodiment, the note creation request includes note creation information and a transaction identifier; the first blockchain node generates a target note according to the note creation request, including:
[0066] The first blockchain node obtains corresponding transaction information and bill attribute information according to the transaction identifier; the first blockchain node generates a target bill according to the bill creation information, transaction information and bill attribute information.
[0067] 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. Bill creation information includes taxpayer information provided by consumers, such as taxpayer header information, taxpayer identification number, address, telephone number, bank and account number.
[0068] Specifically, after the first blockchain node receives the bill creation request uploaded by the associated first user ID, it determines the transaction identifier that is the same as the transaction identifier in the bill creation request from the block storing transaction information in the first blockchain node, and obtains the transaction platform, transaction amount, transaction content, transaction participants, transaction time and other transaction information corresponding to the same transaction identifier on the first blockchain node. Then, the first blockchain node can obtain the attribute information of the bill, such as the bill code, bill number, etc. Obtaining the bill creation information in the bill creation request means obtaining the taxpayer's header information, taxpayer identification number, address, telephone number, bank and account number and other information. Generate a target bill corresponding to the transaction information based on the bill creation information, transaction information and bill attribute information.
[0069] The above-mentioned bill processing method obtains the corresponding transaction information and bill attribute information according to the transaction identifier, generates a target bill according to the bill creation information, transaction information and bill attribute information, so that the first blockchain node is responsible for receiving and storing data related to the bill, and generates the target bill by obtaining the relevant data, thereby improving the efficiency of the first blockchain node in receiving data and generating the target bill.
[0070] In one embodiment, sending the acquired target ticket to the second user identifier includes:
[0071] The second blockchain node determines the status of the acquired target ticket, where the status of the target ticket includes an uncollected status and a collected status; when the status of the acquired target ticket is an uncollected status, the second blockchain node sends the acquired target ticket to the second user identifier.
[0072] The target bill status includes an uncollected status and a collected status. After generating the target bill, the first blockchain node may set the target bill status to an uncollected status and send it to the second blockchain node for storage. The target bill status may also be set by the second blockchain node.
[0073] Specifically, after the second blockchain node obtains the corresponding target ticket according to the ticket collection request, it detects whether the obtained target ticket has not been collected or has been collected. When the state of the obtained target ticket is uncollected, the obtained target ticket is sent to the terminal where the second user identifier is located.
[0074] In this embodiment, when the status of the acquired target ticket is an uncollected status, the second blockchain node can detect the number of times the acquired target ticket has been collected; obtain a collection number threshold, and when the number of times the target ticket has been collected is less than the collection number threshold, the acquired target ticket is sent to the second user identifier.
[0075] In this embodiment, the number of times the target ticket is collected can be detected first; a collection number threshold is obtained, and when the number of times the target ticket is collected is less than the collection number threshold, the status of the target ticket is determined, and the status of the target ticket includes an uncollected state and a collected state; when the status of the target ticket is an uncollected state, the target ticket is sent to the second user identifier.
[0076] In the above ticket processing method, the state of the target ticket obtained is determined, and the state of the target ticket includes an uncollected state and a collected state, so as to determine whether the target ticket has been collected. When the state of the target ticket obtained is an uncollected state, the target ticket obtained is sent to the second user identifier, thereby completing the response to the user's ticket collection request.
[0077] In one embodiment, the bill processing method further includes:
[0078] When the status of the target ticket obtained is the received status, the second blockchain node displays the time and number of times the target ticket is received, and determines whether the second user identifier receives the target ticket again; when the second user identifier determines to receive the target ticket again, the second blockchain node sends the obtained target ticket to the second user identifier.
[0079] Specifically, after the second blockchain node obtains the corresponding target bill according to the bill collection request, it detects whether the obtained target bill has not been collected or has been collected. When the status of the obtained target bill is the collected status, it is determined that the target bill has been collected, and the second blockchain node obtains the time and number of times the target bill is collected, and displays the time and number of times the target bill is collected on the terminal where the second user ID is located. Then, the second blockchain node sends a prompt to the terminal where the user ID is located to determine whether the terminal where the user ID is located collects the target bill again. The collection method can be downloading. Further, the second blockchain node can display a prompt "The target bill has been collected, whether it needs to be collected again" on the terminal interface where the user ID is located, and provide a mark of collecting again or not collecting. Then, when the terminal where the second user ID is located submits a request to collect the target bill again, the obtained target bill is sent to the terminal where the second user ID is located.
[0080] In this embodiment, when the second user identifier determines to collect the target ticket again, the second blockchain node can detect the number of times the target ticket has been collected; obtain the collection number threshold, and when the number of times the target ticket has been collected is less than the collection number threshold, the obtained target ticket is sent to the second user identifier.
[0081] In the above-mentioned ticket processing method, when the state of the target ticket obtained is the received state, the time and number of times the target ticket was received are displayed, and it is determined whether the second user identification will receive the target ticket again. The time and number of times the target ticket was received are displayed to the user to provide the user with detailed information on the receipt of the target ticket. For the received ticket, the user is prompted again whether to apply for it to ensure the safe issuance of the target ticket. When the second user identification determines to receive the target ticket again, the obtained target ticket is sent to the second user identification, so that the user confirms the receipt of the target ticket again, which can remind the user to pay attention to the safety of the receipt of the ticket.
[0082] In one embodiment, sending the acquired target ticket to the second user identifier includes:
[0083] The second blockchain node detects the number of times the target ticket is collected; the second blockchain node obtains a collection number threshold, and when the number of times the target ticket is collected is less than the collection number threshold, the obtained target ticket is sent to the second user identifier.
[0084] The collection times threshold refers to the preset number of times each target ticket is allowed to be collected.
[0085] Specifically, after the second blockchain node obtains the corresponding target ticket according to the ticket collection request, it detects the number of times the target ticket has been collected. The second blockchain node obtains the number of times the target ticket is allowed to be collected, and compares the number of times the target ticket is collected with the number of times the target ticket is allowed to be collected. When the number of times the target ticket is collected is less than the number of times the target ticket is allowed to be collected, the terminal where the second user identifier is located is allowed to download the target ticket. Then the second blockchain node sends the obtained target ticket to the second user identifier.
[0086] Furthermore, when the second blockchain node detects that the number of times the target ticket has been collected is equal to the number of times the target ticket is allowed to be collected, the terminal where the second user ID is located is not allowed to download the target ticket. Then the second blockchain node locks the target ticket and returns the information that the target ticket is not allowed to be downloaded to the terminal where the second user ID is located.
[0087] The above-mentioned ticket processing method sets the number of times the target ticket can be collected. When the collection number threshold is reached, the target ticket is no longer allowed to be collected. When it is not reached, the target ticket can be collected, which can remind the user to pay attention to the safe collection of the ticket and the safe storage after collection, thereby avoiding the possibility of leakage of the target ticket and improving the safe storage of the target ticket.
[0088] In one embodiment, when the second user identifier is an instant messaging account, the second blockchain node is associated with the second user identifier, and the bill processing method further includes:
[0089] The second blockchain node obtains a target note corresponding to the second user identifier; and automatically sends the corresponding target note to the second user identifier.
[0090] The instant messaging account refers to the account used by the user to log in to the instant messaging client. Each instant messaging account of the instant messaging client is a unique account.
[0091] Specifically, when the second user identifier is an instant messaging account, the second blockchain node is associated with the instant messaging account. When the second user identifier is an instant messaging account, the second user identifier is also included in the bill creation request uploaded by the first user identifier to the first blockchain node. After the first blockchain node generates the target bill, it sends the second user identifier, transaction identifier and target bill together to the second blockchain node. The second blockchain node receives the second user identifier, transaction identifier and target bill, and stores the three in association. Then, the second blockchain node automatically sends the target bill corresponding to the second user identifier to the second user identifier.
[0092] In the above-mentioned bill processing method, when the second user identifier is an instant messaging account, the second blockchain node is associated with the second user identifier, the second blockchain node obtains the target bill corresponding to the second user identifier, and automatically sends the corresponding target bill to the second user identifier. The generated target bill can be automatically sent to the bound user without the user having to go online to obtain it, thereby completing the issuance of the bill more quickly.
[0093] like Figure 4 As shown, in one embodiment, a bill generation method is provided. This embodiment mainly applies the method to the above Figure 1 Take the first blockchain node in as an example. Figure 3 The bill generation method specifically includes the following steps:
[0094] Step 402: Receive a ticket creation request uploaded by a first user ID.
[0095] Specifically, the enterprise user receives the bill creation request from the consumer, which includes bill creation information and transaction identification. The transaction identification refers to a unique identification of the payment, such as a transaction number, order number, etc. Then, the enterprise user can log in to the client through the first user identification, and upload the bill creation request including the bill creation information and transaction identification to the associated first blockchain node through the client. The first blockchain node receives the bill creation request uploaded by the associated first user identification.
[0096] Step 404: Generate a target ticket according to the ticket creation request.
[0097] Specifically, the note creation information and transaction identifier in the note creation request of the second blockchain node generate a corresponding target note.
[0098] Step 406: Send the target note to the second blockchain node, which is used to store the target note so that the second user identifier logs in to the second blockchain node to receive the target note; the first user identifier is associated with the first blockchain node and the second blockchain node.
[0099] Specifically, the first user identifier is associated with the first blockchain node, the first user identifier is associated with the second blockchain node, and the first blockchain node is associated with the second blockchain node. After the first blockchain node generates the target bill, the generated target bill can be associated with the transaction identifier. The first blockchain node sends the generated target bill and the transaction identifier to the bound second blockchain node, so that the second blockchain node receives the target bill and the transaction identifier, and stores the target bill and the transaction identifier in correspondence. This allows consumers to log in to the second blockchain node according to the second user identifier to collect their own target bills.
[0100] The above-mentioned bill generation method applied to the first blockchain node receives a bill creation request uploaded by the first user identifier, generates a target bill according to the bill creation request, and sends the target bill to the second blockchain node. The second blockchain node is used to store the target bill, so that the second user identifier logs in to the second blockchain node to receive the target bill, and the first user identifier is associated with the first blockchain node and the second blockchain node. By associating the first user identifier with the two blockchain nodes, one blockchain node is used to receive data related to the bill and generate the target bill, and the other blockchain node is used to issue the target bill to the user, so that different blockchain nodes realize different functions and are responsible for a part of the business, thereby improving the efficiency of receiving relevant data of the bill, bill generation and bill issuance.
[0101] In one embodiment, after the target bill is generated according to the bill creation request, the method further includes: setting the generated target bill to an uncollected state. All newly generated target bills are set to an uncollected state to distinguish whether the target bill has been collected.
[0102] In one embodiment, the bill creation request includes bill creation information and a transaction identifier; and generating a target bill according to the bill creation request includes:
[0103] The corresponding transaction information and bill attribute information are obtained according to the transaction identifier; and the target bill is generated according to the bill creation information, transaction information and bill attribute information.
[0104] 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. Bill creation information includes taxpayer information provided by consumers, such as taxpayer header information, taxpayer identification number, address, telephone number, bank and account number.
[0105] Specifically, after the first blockchain node receives the bill creation request uploaded by the associated first user ID, it determines the transaction identifier that is the same as the transaction identifier in the bill creation request from the block storing transaction information in the first blockchain node, and obtains the transaction platform, transaction amount, transaction content, transaction participants, transaction time and other transaction information corresponding to the same transaction identifier on the first blockchain node. Then, the first blockchain node can obtain the attribute information of the bill, such as the bill code, bill number, etc. Obtaining the bill creation information in the bill creation request means obtaining the taxpayer's header information, taxpayer identification number, address, telephone number, bank and account number and other information. Generate a target bill corresponding to the transaction information based on the bill creation information, transaction information and bill attribute information.
[0106] The above-mentioned bill generation method obtains the corresponding transaction information and bill attribute information according to the transaction identifier, generates the target bill according to the bill creation information, transaction information and bill attribute information, so that the first blockchain node is responsible for receiving and storing data related to the bill, and generates the target bill by obtaining the relevant data, thereby improving the efficiency of the first blockchain node in receiving data and generating the target bill.
[0107] In one embodiment, after the first blockchain node stores the target invoice in the second blockchain node, it obtains the address of the second blockchain node and sends the address of the second blockchain node to the first user ID, so that the first user ID sends the address of the second blockchain node to the address reserved by the consumer. The address reserved by the consumer can be a mobile phone number, an email address, etc. After receiving the address of the second blockchain node, the consumer can log in to the second blockchain node through the second user ID to collect his own bill. By sending the generated target bill to the address reserved by the user, the user can get the required bill in the fastest time.
[0108] In one embodiment, Figure 5 As shown, a bill issuance method is provided, which is applied to a second blockchain node, and the bill issuance method includes:
[0109] Step 502: Receive a ticket collection request initiated by a second user identifier after logging into a second blockchain node.
[0110] The bill collection request refers to a request for applying for collection of a target bill.
[0111] Specifically, the consumer logs in to the terminal through the second user ID, and the terminal can be a desktop terminal or a mobile terminal. The mobile terminal can be at least one of a mobile phone, a tablet computer, a laptop computer, etc. And access the address of the second blockchain node through the terminal where the second user ID is located, so as to log in to the second blockchain node. After logging in to the second blockchain node, a bill collection request is initiated through the mobile terminal where the second user ID is located, and the bill collection request contains a transaction identifier. The second blockchain node receives the bill collection request including the transaction identifier initiated by the second user ID.
[0112] Step 504, obtaining a corresponding target bill according to the bill collection request; the target bill is generated by the first blockchain node according to the bill creation request uploaded by the first user identifier; the first user identifier is associated with the first blockchain node and the second blockchain node.
[0113] Specifically, the second blockchain node obtains a transaction identifier from the bill collection request and compares the transaction identifier with the transaction identifier stored on the second blockchain node. When the second blockchain node has a transaction identifier identical to the bill collection request, the target bill corresponding to the transaction identifier is obtained. The target bill is generated by the first blockchain node according to the bill creation request uploaded by the first user identifier, and the first user identifier is associated with the first blockchain node and the second blockchain node.
[0114] Step 506: Send the acquired target ticket to the second user ID.
[0115] Specifically, the second blockchain node sends the acquired target invoice to the terminal where the second user identifier is located.
[0116] The above-mentioned ticket issuance method applied to the second blockchain node receives a ticket collection request initiated by the second user identifier after logging into the second blockchain node, and obtains the corresponding target ticket according to the ticket collection request. The target ticket is generated by the first blockchain node according to the ticket creation request uploaded by the first user identifier. The first user identifier is associated with the first blockchain node and the second blockchain node. The obtained target ticket is sent to the second user identifier. The second blockchain node is specifically used for storing and issuing tickets, thereby improving the efficiency of ticket issuance.
[0117] In one embodiment, after sending the acquired target ticket to the second user identifier, the ticket issuance method further includes: recording the time and number of times the target ticket is collected.
[0118] The time when the target ticket is collected refers to the time when the second blockchain node sends the target ticket to the second user ID. The sending method may be that the second user ID directly downloads the target ticket from the second blockchain node, or the second blockchain node automatically sends the target ticket to the second user ID.
[0119] Specifically, the second blockchain node sends the acquired target bill to the second user ID, indicating that the target bill has been received. The second blockchain node records the time when the target bill is sent to the second user ID, and uses the time as the time when the target bill is received. At the same time, the number of times the target bill is received is recorded. Further, the second blockchain node can associate and store the time and number of times the target bill is received with the user ID of each time the target bill is received. By recording the time and number of times the target bill is received, the information of each time the target bill is received can be recorded in detail, so that the user can query the specific circumstances of the target bill being received.
[0120] In one embodiment, sending the acquired target ticket to the second user identifier includes:
[0121] The state of the obtained target ticket is determined, where the state of the target ticket includes an uncollected state and a collected state; when the state of the obtained target ticket is an uncollected state, the obtained target ticket is sent to the second user identifier.
[0122] The target bill status includes an uncollected status and a collected status. After generating the target bill, the first blockchain node may set the target bill status to an uncollected status and send it to the second blockchain node for storage. The target bill status may also be set by the second blockchain node.
[0123] Specifically, after the second blockchain node obtains the corresponding target ticket according to the ticket collection request, it detects whether the obtained target ticket has not been collected or has been collected. When the state of the obtained target ticket is uncollected, the obtained target ticket is sent to the terminal where the second user identifier is located.
[0124] In this embodiment, when the status of the acquired target ticket is an uncollected status, the second blockchain node can detect the number of times the acquired target ticket has been collected; obtain a collection number threshold, and when the number of times the target ticket has been collected is less than the collection number threshold, the acquired target ticket is sent to the second user identifier.
[0125] In this embodiment, the number of times the target ticket is collected can be detected first; a collection number threshold is obtained, and when the number of times the target ticket is collected is less than the collection number threshold, the status of the target ticket is determined, and the status of the target ticket includes an uncollected state and a collected state; when the status of the target ticket is an uncollected state, the target ticket is sent to the second user identifier.
[0126] In the above ticket issuance method, the state of the target ticket obtained is determined, and the state of the target ticket includes an uncollected state and a collected state, so as to determine whether the target ticket has been collected. When the state of the target ticket obtained is an uncollected state, the target ticket obtained is sent to the second user identifier, thereby completing the response to the user's ticket collection request.
[0127] In one embodiment, the method further comprises:
[0128] When the status of the target ticket obtained is the received status, the time and number of times the target ticket was received are displayed, and it is determined whether the second user identifier receives the target ticket again; when the second user identifier determines to receive the target ticket again, the obtained target ticket is sent to the second user identifier.
[0129] Specifically, after the second blockchain node obtains the corresponding target bill according to the bill collection request, it detects whether the obtained target bill has not been collected or has been collected. When the status of the obtained target bill is the collected status, it is determined that the target bill has been collected, and the second blockchain node obtains the time and number of times the target bill is collected, and displays the time and number of times the target bill is collected on the terminal where the second user ID is located. Then, the second blockchain node sends a prompt to the terminal where the user ID is located to determine whether the terminal where the user ID is located collects the target bill again. The collection method can be downloading. Further, the second blockchain node can display a prompt "The target bill has been collected, whether it needs to be collected again" on the terminal interface where the user ID is located, and provide a mark of collecting again or not collecting. Then, when the terminal where the second user ID is located submits a request to collect the target bill again, the obtained target bill is sent to the terminal where the second user ID is located.
[0130] In this embodiment, when the second user identifier determines to collect the target ticket again, the second blockchain node can detect the number of times the target ticket has been collected; obtain the collection number threshold, and when the number of times the target ticket has been collected is less than the collection number threshold, the obtained target ticket is sent to the second user identifier.
[0131] In the above ticket issuance method, when the state of the target ticket obtained is the received state, the time and number of times the target ticket was received are displayed, and it is determined whether the second user identification will receive the target ticket again. The time and number of times the target ticket was received are displayed to the user to provide the user with detailed information on the receipt of the target ticket. For the received ticket, the user is prompted again whether to apply for it to ensure the safe issuance of the target ticket. When the second user identification determines to receive the target ticket again, the obtained target ticket is sent to the second user identification, so that the user confirms the receipt of the target ticket again, which can remind the user to pay attention to the safety of the receipt of the ticket.
[0132] In one embodiment, sending the acquired target ticket to the second user identifier includes:
[0133] Detect the number of times the target ticket is collected; obtain a collection number threshold, and when the number of times the target ticket is collected is less than the collection number threshold, send the obtained target ticket to the second user identifier.
[0134] The collection times threshold refers to the preset number of times each target ticket is allowed to be collected.
[0135] Specifically, after the second blockchain node obtains the corresponding target ticket according to the ticket collection request, it detects the number of times the target ticket has been collected. The second blockchain node obtains the number of times the target ticket is allowed to be collected, and compares the number of times the target ticket is collected with the number of times the target ticket is allowed to be collected. When the number of times the target ticket is collected is less than the number of times the target ticket is allowed to be collected, the terminal where the second user identifier is located is allowed to download the target ticket. Then the second blockchain node sends the obtained target ticket to the second user identifier.
[0136] Furthermore, when the second blockchain node detects that the number of times the target ticket has been collected is equal to the number of times the target ticket is allowed to be collected, the terminal where the second user ID is located is not allowed to download the target ticket. Then the second blockchain node locks the target ticket and returns the information that the target ticket is not allowed to be downloaded to the terminal where the second user ID is located.
[0137] The above ticket issuance method sets the number of times the target ticket can be collected. When the collection number threshold is reached, the target ticket is no longer allowed to be collected. If it is not reached, the target ticket can be collected, which can remind the user to pay attention to the safe collection of the ticket and the safe storage after collection, thereby avoiding the possibility of leakage of the target ticket and improving the safe storage of the target ticket.
[0138] In one embodiment, when the second user identifier is an instant messaging account, the second blockchain node is associated with the second user identifier, and the method further includes:
[0139] Acquire a target ticket corresponding to the second user identifier; and automatically send the corresponding target ticket to the second user identifier.
[0140] The instant messaging account refers to the account used by the user to log in to the instant messaging client. Each instant messaging account of the instant messaging client is a unique account.
[0141] Specifically, when the second user identifier is an instant messaging account, the second blockchain node is associated with the instant messaging account. When the second user identifier is an instant messaging account, the second user identifier is also included in the bill creation request uploaded by the first user identifier to the first blockchain node. After the first blockchain node generates the target bill, it sends the second user identifier, transaction identifier and target bill together to the second blockchain node. The second blockchain node receives the second user identifier, transaction identifier and target bill, and stores the three in association. Then, the second blockchain node automatically sends the target bill corresponding to the second user identifier to the second user identifier.
[0142] In the above-mentioned ticket issuance method, when the second user identifier is an instant messaging account, the second blockchain node is associated with the second user identifier, the second blockchain node obtains the target ticket corresponding to the second user identifier, and automatically sends the corresponding target ticket to the second user identifier. The generated target ticket can be automatically sent to the bound user without the user having to go online to obtain it, thereby completing the issuance of the ticket more quickly.
[0143] In one embodiment, when the second user identifier is an instant messaging account, the second user identifier is associated with the first blockchain node and the second blockchain node; receiving a bill creation request uploaded by the first user identifier includes: receiving a bill creation request uploaded by the second user identifier based on a payment voucher, the payment voucher being generated after the user identifier completes payment according to a graphic code; generating a target bill according to the bill creation request.
[0144] 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 coding, 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. Payment voucher refers to the payment receipt information generated after the mobile terminal completes the payment.
[0145] Specifically, the consumer logs in to the instant messaging account client on the mobile terminal through the instant messaging account, such as the WeChat client, etc. The graphic code is scanned offline through the mobile terminal, and the payment is completed according to the information of the graphic code. After the payment is completed, the payment receipt information is automatically generated. The mobile terminal can obtain the generated payment receipt information and store the payment receipt information.
[0146] In this embodiment, the consumer can log in to the instant messaging account client on the mobile terminal through the instant messaging account, display the graphic code to other devices through the mobile terminal, and have other devices scan the graphic code of the mobile terminal to complete the payment and obtain payment receipt information.
[0147] Next, the consumer logs in to the instant messaging client on the mobile terminal through the instant messaging account, clicks on the payment voucher to enter the payment voucher display page, and initiates a bill creation request to the first blockchain node through the bill creation identifier on the display page. When the first blockchain node receives the bill creation request initiated by the second user identifier based on the payment voucher, it obtains the corresponding transaction information and attribute information according to the transaction identifier in the bill creation request. Then, the first blockchain node generates the target bill according to the bill creation information, transaction information and attribute information in the bill creation request.
[0148] The target note is sent to the second blockchain node, and the second blockchain node is used to store the target note, so that the second user identifier logs in to the second blockchain node to receive the target note; the first user identifier is associated with the first blockchain node and the second blockchain node, including:
[0149] The target ticket is sent to the second blockchain node, and the second blockchain node is used to store the target ticket, so that the second user identifier logs in to the second blockchain node to receive the target ticket.
[0150] Specifically, the first blockchain node obtains the second user ID, binds the generated target bill to the second user ID, and sends the generated target bill to the second blockchain node for storage. The consumer can log in to the second blockchain node according to the second user ID to receive his or her target bill.
[0151] In this embodiment, the target ticket is sent to a second blockchain node, and the second blockchain node is used to store the target ticket, so that the second user identifier logs in to the second blockchain node to receive the target ticket; the first user identifier is associated with the first blockchain node and the second blockchain node, including:
[0152] The target ticket is sent to a second blockchain node, and the second blockchain node is used to store the target ticket, so that the second blockchain node sends the target ticket to the second user identifier.
[0153] Specifically, the first blockchain node obtains the second user identifier, binds the generated target bill to the second user identifier, and sends the generated target bill to the second blockchain node for storage. The second blockchain node receives the user identifier and the corresponding target bill for storage, and automatically sends the target bill to the second user identifier.
[0154] In the above-mentioned bill generation method, the instant messaging account is bound to the first blockchain node, and the user can directly send the bill creation request to the first blockchain node through the payment information after payment, without the help of a third party. After the first blockchain node generates the target bill, it sends it to the second blockchain node for storage, and the user logs in to the second blockchain node to obtain the target bill, thereby providing the user with autonomy and being able to go online to collect his own bill anytime and anywhere. The second blockchain node can also automatically send the generated target bill to the instant messaging account to quickly complete the issuance of the bill, so that the user can get his own bill in the first place.
[0155] See also Figure 6 , Figure 6 This is an optional schematic diagram of the block structure provided by an embodiment of the present invention. 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.
[0156] In one embodiment, the address of the second blockchain node is a multi-signature address based on the second blockchain node, the first user identifier, and the second user identifier.
[0157] The address of the first blockchain node is a virtual address in the blockchain system, which is used to store the target bill generated by the first blockchain node. Multi-signature can be simply understood as multiple signatures of a digital asset. The signature marks the ownership and permissions of the digital asset. Multi-signature indicates that the digital asset can be controlled and managed by multiple people.
[0158] Specifically, the multi-signature address based on the second blockchain node, the first user identifier and the second user identifier in this embodiment can be expressed as an association between the address of the second blockchain node and the key of the second blockchain node, the key of the first user identifier and the key of the second user identifier. The owner of the key associated with the multi-signature address has both the authority to access the multi-signature address and the authority to transfer the target bill within the multi-signature address. When the target bill needs to be transferred within the multi-signature address, at least one key associated with the multi-signature address is required to transfer the target bill within the multi-signature address.
[0159] In one embodiment, a method for generating and issuing a bill is provided, the method comprising:
[0160] The first blockchain node receives a bill creation request uploaded by the first user identifier, where the bill creation request includes bill creation information and a transaction identifier.
[0161] The first blockchain node obtains corresponding transaction information and bill attribute information according to the transaction identifier.
[0162] The first blockchain node generates a target bill according to the bill creation information, transaction information and bill attribute information.
[0163] The first blockchain node sends the target note to the second blockchain node, and the second blockchain node is used to store the target note so that the second user identifier logs in to the second blockchain node to receive the target note. The first user identifier is associated with the first blockchain node and the second blockchain node.
[0164] The second blockchain node receives a ticket collection request initiated by the second user identifier after logging into the second blockchain node.
[0165] The second blockchain node obtains the corresponding target bill according to the bill collection request; the target bill is generated by the first blockchain node according to the bill creation request uploaded by the first user identifier; the first user identifier is associated with the first blockchain node and the second blockchain node.
[0166] The second blockchain node determines the status of the acquired target bill, where the status of the target bill includes an uncollected status and a collected status.
[0167] When the status of the acquired target ticket is an uncollected status, the second blockchain node sends the acquired target ticket to the second user identifier.
[0168] When the status of the acquired target bill is a received status, the second blockchain node detects the number of times the acquired target bill has been received.
[0169] The second blockchain node obtains a collection times threshold, and when the number of times the target ticket is collected is less than the collection times threshold, displays the time and number of times the target ticket is collected, and determines whether the second user identifier collects the target ticket again.
[0170] When the second user identifier determines to collect the target ticket again, the second blockchain node sends the acquired target ticket to the second user identifier.
[0171] When the second user identifier is an instant messaging account, the second blockchain node is associated with the second user identifier to obtain a target ticket corresponding to the second user identifier.
[0172] The second blockchain node automatically sends the corresponding target ticket to the second user identifier.
[0173] In the above-mentioned bill generation and issuance method, the first user identifier, the first blockchain node and the second blockchain node are associated, so that the first blockchain node receives the bill creation request uploaded by the first user identifier, generates the corresponding target bill, and sends the target bill to the second blockchain node for storage. The second blockchain is used to store the target bill generated by the first blockchain, and receives the bill collection request of the second user identifier, obtains the corresponding target bill according to the bill collection request, and verifies the collection status, the number of times the target bill can be collected, etc., and sends the target bill to the second user identifier when the verification is passed. One blockchain node is used to receive data related to the bill and generate the target bill, and another blockchain node is used to issue the target bill to the user, so that different blockchain nodes realize different functions and are responsible for a part of the business, thereby improving the efficiency of receiving relevant data of the bill, bill generation and bill issuance.
[0174] Figure 3-Figure 5 The figure is a flowchart of a bill generation method in one embodiment. Figure 3-Figure 5 FIG. 1 is a flow chart of a bill issuing method in one embodiment. It should be understood that although Figure 3-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 3-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.
[0175] In one embodiment, Figure 7 As shown, a bill processing device is provided, the bill processing device comprising:
[0176] A first receiving module 702 is used for a first blockchain node to receive a ticket creation request uploaded by a first user identifier;
[0177] A generating module 704, configured for the first blockchain node to generate a target note according to the note creation request;
[0178] Storage module 706, used for the first blockchain node to send the target bill to the second blockchain node, and the second blockchain node is used to store the target bill; the first user identifier is associated with the first blockchain node and the second blockchain node;
[0179] The second receiving module 708 is used for the second blockchain node to receive a ticket collection request initiated by the second user identifier after logging into the second blockchain node;
[0180] The return module 710 is used for the second blockchain node to obtain the corresponding target ticket according to the ticket collection request, and return the obtained target ticket to the second user identifier.
[0181] In the above-mentioned bill processing device, the first blockchain node receives the bill creation request uploaded by the first user identifier, generates the target bill according to the bill creation request, and sends the target bill to the second blockchain node. The second blockchain node is used to store the target bill so that the second user identifier logs in to the second blockchain node to receive the target bill. The first user identifier is associated with the first blockchain node and the second blockchain node. The second blockchain node receives and stores the target bill sent by the first blockchain node. The second blockchain node receives the bill collection request initiated by the second user identifier after logging in to the second blockchain node, obtains the corresponding target bill according to the bill collection request, and returns the obtained target bill to the second user identifier. This solution associates the first user identifier with two blockchain nodes, so that one blockchain node is used to receive bill-related data and generate a target bill, and the other blockchain node is used to issue the target bill to the user, so that different blockchain nodes realize different functions and are responsible for a part of the business, thereby improving the efficiency of receiving bill-related data, bill generation and bill issuance.
[0182] In one embodiment, the note creation request includes note creation information and a transaction identifier; the generation module 704 is also used for: the first blockchain node obtains the corresponding transaction information and note attribute information according to the transaction identifier; the first blockchain node generates a target note according to the note creation information, transaction information and note attribute information.
[0183] The above-mentioned bill processing device obtains the corresponding transaction information and bill attribute information according to the transaction identifier, and generates a target bill according to the bill creation information, transaction information and bill attribute information, so that the first blockchain node is responsible for receiving and storing data related to the bill, and generates the target bill by obtaining the relevant data, thereby improving the efficiency of the first blockchain node in receiving data and generating the target bill.
[0184] In one embodiment, the return module 710 is also used for: the second blockchain node determines the status of the acquired target bill, and the status of the target bill includes an uncollected status and a collected status; when the status of the acquired target bill is an uncollected status, the second blockchain node sends the acquired target bill to the second user identifier.
[0185] In the above-mentioned bill processing device, the second blockchain node determines the status of the target bill obtained, and the status of the target bill includes an uncollected state and a collected state, and can determine whether the target bill has been collected. When the status of the target bill obtained is an uncollected state, the obtained target bill is sent to the second user identifier, thereby completing the response to the user's bill collection request.
[0186] In one embodiment, the return module 710 is also used to: when the status of the acquired target ticket is the received status, display the time and number of times the target ticket is received, and determine whether the second user identifier receives the target ticket again; when the second user identifier determines to receive the target ticket again, send the acquired target ticket to the second user identifier.
[0187] In the above-mentioned bill processing device, when the state of the target bill obtained is the received state, the time and number of times the target bill is received are displayed, and it is determined whether the second user identification receives the target bill again. The time and number of times the target bill is received are displayed to the user to provide the user with detailed information on the receipt of the target bill. For the received bill, the user is prompted again whether to apply for it to ensure the safe issuance of the target bill. When the second user identification determines to receive the target bill again, the obtained target bill is sent to the second user identification, so that the user confirms the receipt of the target bill again, which can remind the user to pay attention to the safety of bill receipt.
[0188] In one embodiment, the return module 710 is further used to: detect the number of times the target ticket is collected; obtain a collection number threshold, and when the number of times the target ticket is collected is less than the collection number threshold, send the obtained target ticket to the second user identifier.
[0189] The above-mentioned bill processing device sets the number of times the target bill can be collected. When the collection number threshold is reached, the target bill is no longer allowed to be collected. If it is not reached, it can be collected, and the user can be prompted to pay attention to the safe collection of the bill and the safe storage after collection, so as to avoid the possibility of leakage of the target bill and improve the safe storage of the target bill.
[0190] In one embodiment, the return module 710 is also used to: when the second user identifier is an instant messaging account, the second blockchain node is associated with the second user identifier, obtains the target ticket corresponding to the second user identifier; and automatically sends the corresponding target ticket to the second user identifier.
[0191] In the above-mentioned bill processing device, when the second user identifier is an instant messaging account, the second blockchain node is associated with the second user identifier, the second blockchain node obtains the target bill corresponding to the second user identifier, and automatically sends the corresponding target bill to the second user identifier. The generated target bill can be automatically sent to the bound user without the user having to go online to obtain it, thereby completing the issuance of the bill more quickly.
[0192] In one embodiment, Figure 8 As shown, a bill generation device is provided, which is applied to a first blockchain node, and the device includes: a first receiving module 802, a generating module 804 and a storage module 806. Among them,
[0193] The first receiving module 802 is used to receive a ticket creation request uploaded by a first user identification.
[0194] The generating module 804 is used to generate a target ticket according to the ticket creation request.
[0195] The storage module 806 is used to send the target bill to the second blockchain node, and the second blockchain node is used to store the target bill so that the second user identifier logs in to the second blockchain node to receive the target bill; the first user identifier is associated with the first blockchain node and the second blockchain node.
[0196] The above-mentioned bill generation device applied to the first blockchain node receives the bill creation request uploaded by the first user identification, generates the target bill according to the bill creation request, and sends the target bill to the second blockchain node. The second blockchain node is used to store the target bill, so that the second user identification logs in to the second blockchain node to receive the target bill. The first user identification is associated with the first blockchain node and the second blockchain node. By associating the first user identification with the two blockchain nodes, one blockchain node is used to receive data related to the bill and generate the target bill, and the other blockchain node is used to issue the target bill to the user, so that different blockchain nodes realize different functions and are responsible for a part of the business, thereby improving the efficiency of receiving relevant data of the bill, bill generation and bill issuance.
[0197] In one embodiment, Fig. 9 As shown, a bill issuance device is provided, which is applied to a second blockchain node. The device includes: a second receiving module 902, an acquisition module 904 and a sending module 906.
[0198] The second receiving module 902 is used to receive a ticket collection request initiated by the second user identification after logging into the second blockchain node.
[0199] The acquisition module 904 is used to obtain the corresponding target bill according to the bill collection request; the target bill is generated by the first blockchain node according to the bill creation request uploaded by the first user identifier; the first user identifier is associated with the first blockchain node and the second blockchain node.
[0200] The sending module 906 is used to send the obtained target ticket to the second user identifier.
[0201] The above-mentioned bill issuance device applied to the second blockchain node receives a bill collection request initiated by the second user identifier after logging into the second blockchain node, and obtains the corresponding target bill according to the bill collection request. The target bill is generated by the first blockchain node according to the bill creation request uploaded by the first user identifier. The first user identifier is associated with the first blockchain node and the second blockchain node. The obtained target bill is sent to the second user identifier, and the second blockchain node is used specifically for storing and issuing bills, thereby improving the efficiency of bill issuance.
[0202] In one embodiment, the sending module 906 is further used to: determine the status of the acquired target ticket, the status of the target ticket includes an uncollected status and a collected status; when the status of the acquired target ticket is an uncollected status, send the acquired target ticket to the second user identifier.
[0203] In the above-mentioned ticket issuing device, the state of the obtained target ticket is determined, and the state of the target ticket includes an uncollected state and a collected state, so as to determine whether the target ticket has been collected. When the state of the obtained target ticket is an uncollected state, the obtained target ticket is sent to the second user identification, thereby completing the response to the user's ticket collection request.
[0204] In one embodiment, the sending module 906 is also used to: when the status of the acquired target ticket is the received status, display the time and number of times the target ticket is received, and determine whether the second user identifier receives the target ticket again; when the second user identifier determines to receive the target ticket again, send the acquired target ticket to the second user identifier.
[0205] In the above-mentioned ticket issuing device, when the state of the target ticket obtained is the received state, the time and number of times the target ticket was received are displayed, and it is determined whether the second user identification will receive the target ticket again. The time and number of times the target ticket was received are displayed to the user to provide the user with detailed information on the receipt of the target ticket. For the received ticket, the user is prompted again whether to apply for it to ensure the safe issuance of the target ticket. When the second user identification determines to receive the target ticket again, the obtained target ticket is sent to the second user identification, so that the user confirms the receipt of the target ticket again, which can remind the user to pay attention to the safety of the receipt of the ticket.
[0206] In one embodiment, the sending module 906 is further used to: detect the number of times the target ticket is collected; obtain a collection number threshold, and when the number of times the target ticket is collected is less than the collection number threshold, send the obtained target ticket to the second user identifier.
[0207] The above-mentioned ticket issuing device sets the number of times the target ticket can be collected. When the collection number threshold is reached, the target ticket is no longer allowed to be collected. If it is not reached, it can be collected, and the user can be prompted to pay attention to the safe collection of the ticket and the safe storage after collection, so as to avoid the possibility of leakage of the target ticket and improve the safe storage of the target ticket.
[0208] In one embodiment, the sending module 906 is also used to: when the second user identifier is an instant messaging account, the second blockchain node is associated with the second user identifier, obtains the target ticket corresponding to the second user identifier; and automatically sends the corresponding target ticket to the second user identifier.
[0209] In the above-mentioned ticket issuance device, when the second user identifier is an instant messaging account, the second blockchain node is associated with the second user identifier, the second blockchain node obtains the target ticket corresponding to the second user identifier, and automatically sends the corresponding target ticket to the second user identifier. The generated target ticket can be automatically sent to the bound user without the user having to go online to obtain it, thereby completing the issuance of the ticket more quickly.
[0210] Fig.10 FIG. 2 shows an internal structure diagram of a computer device in one embodiment. Fig.10 As shown, the computer device includes a processor, a memory, a network interface, an input device and a display screen connected through a system bus.
[0211] 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 and bill issuance 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 processing 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.
[0212] 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.
[0213] 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 computer device shown in the figure is run on the computer device. The memory of the computer device can store various program modules constituting the bill processing device, such as: Figure 7 The first receiving module 702, the generating module 704, the storing module 706, the second receiving module 708 and the returning module 710 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.
[0214] For example, Fig.10 The computer device shown can be Figure 7The first receiving module 702 in the bill processing device shown executes the step of receiving the bill creation request uploaded by the first user identifier. The computer device can execute the step of generating a target bill according to the bill creation request through the generation module 704. The computer device can execute the step of sending the target bill to the second blockchain node through the storage module 706, and the second blockchain node is used to store the target bill; the first user identifier is associated with the first blockchain node and the second blockchain node. The computer device can execute the step of receiving the bill collection request initiated by the second user identifier after logging into the second blockchain node through the second receiving module 708. The computer device can execute the step of obtaining the corresponding target bill according to the bill collection request through the return module 710, and returning the obtained target bill to the second user identifier.
[0215] In one embodiment, the bill issuing device provided by the present application can be implemented in the form of a computer program. The computer program can be Fig.10 The computer device shown in the figure is run on the computer device. The memory of the computer device can store various program modules constituting the bill issuing device, such as: Fig. 9 The second receiving module 902, the obtaining module 904 and the sending module 906 are shown. The computer program composed of various program modules enables the processor to execute the steps of the bill generation method of each embodiment of the present application described in this specification.
[0216] For example, Fig.10 The computer device shown can be Fig. 9 The ticket issuing device shown in
[0217] The second receiving module 902 performs the step of receiving a bill collection request initiated by the second user identifier after logging into the second blockchain node. The computer device can obtain the corresponding target bill according to the bill collection request by the acquisition module 904; the target bill is generated by the first blockchain node according to the bill creation request uploaded by the first user identifier; the first user identifier is associated with the first blockchain node and the second blockchain node. The computer device can perform the step of sending the acquired target bill to the second user identifier through the sending module 906.
[0218] 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 and bill issuance method. The steps of the bill generation and bill issuance method here can be the steps of the bill generation and bill issuance method in the above-mentioned various embodiments.
[0219] In one embodiment, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the above-mentioned bill generation and bill issuance method. The steps of the bill generation and bill issuance method here can be the steps of the bill generation and bill issuance method in each of the above-mentioned embodiments.
[0220] 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).
[0221] 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.
[0222] 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 processing method, characterized in that: The method comprises: The first blockchain node receives a ticket creation request uploaded by the first user identification; The first blockchain node generates a target note according to the note creation request; The first blockchain node sends the target bill to the second blockchain node, and the multi-signature address of the second blockchain node is used to store the target bill; the first user identifier is associated with the first blockchain node and the second blockchain node, and the multi-signature address is an address obtained by performing multi-signature based on the second blockchain node, the first user identifier, and the second user identifier, and the multi-signature address is associated with the key of the first user identifier, the key of the second user identifier, and the key of the second blockchain node; The second blockchain node receives a ticket collection request initiated by the second user identifier after logging into the second blockchain node and a key provided by the second user identifier; The second blockchain node verifies the access rights of the second user identifier to the multi-signature address based on the key provided by the second user identifier. When the verification is successful, the second blockchain node obtains the corresponding target ticket from the multi-signature address according to the ticket collection request, and returns the obtained target ticket to the second user identifier.
2. The method according to claim 1, characterized in that The bill creation request includes bill creation information and a transaction identifier; the first blockchain node generates a target bill according to the bill creation request, including: The first blockchain node obtains corresponding transaction information and bill attribute information according to the transaction identifier; The first blockchain node generates a target note according to the note creation information, transaction information and note attribute information.
3. The method according to claim 1, characterized in that The step of returning the acquired target ticket to the second user identifier includes: The second blockchain node determines the status of the acquired target bill, where the status of the target bill includes an uncollected status and a collected status; When the status of the acquired target ticket is an uncollected status, the second blockchain node returns the acquired target ticket to the second user identifier.
4. The method according to claim 3, characterized in that The method further comprises: When the acquired state of the target ticket is a received state, the second blockchain node displays the time and number of times the target ticket is received, and determines whether the second user identifier receives the target ticket again; When the second user identifier determines to collect the target ticket again, the second blockchain node sends the acquired target ticket to the second user identifier.
5. The method according to claim 1, characterized in that The step of returning the acquired target ticket to the second user identifier includes: The second blockchain node detects the number of times the target ticket is collected; The second blockchain node obtains a collection times threshold, and when the number of times the target ticket is collected is less than the collection times threshold, the obtained target ticket is sent to the second user identifier.
6. The method according to claim 1, characterized in that When the second user identifier is an instant messaging account, the second blockchain node is associated with the second user identifier, and the method further includes: The second blockchain node obtains a target ticket corresponding to the second user identifier; The second blockchain node automatically sends the corresponding target ticket to the second user identifier.
7. A bill issuance method, applied to a second blockchain node, characterized in that: include: Receiving a ticket collection request initiated by a second user identifier after logging into the second blockchain node and a key provided by the second user identifier; Verify the access rights of the second user identifier to the multi-signature address according to the key provided by the second user identifier, and when the verification is successful, obtain the corresponding target ticket from the multi-signature address of the second blockchain node according to the ticket collection request; The multi-signature address is an address obtained by performing multi-signature based on the second blockchain node, the first user identifier, and the second user identifier, the multi-signature address is associated with the key of the first user identifier, the key of the second user identifier, and the key of the second blockchain node, the target ticket is generated by the first blockchain node according to the ticket creation request uploaded by the first user identifier; the first user identifier is associated with the first blockchain node and the second blockchain node; The obtained target ticket is sent to the second user identifier.
8. The method according to claim 7, characterized in that The step of sending the acquired target ticket to the second user identifier includes: Determine the status of the acquired target ticket, where the status of the target ticket includes an uncollected status and a collected status; When the state of the obtained target ticket is an uncollected state, the obtained target ticket is sent to the second user identifier.
9. The method according to claim 8, characterized in that The method further comprises: When the acquired state of the target ticket is the received state, display the time and number of times the target ticket is received, and determine whether the second user identifier receives the target ticket again; When the second user identification determines to obtain the target ticket again, the obtained target ticket is sent to the second user identification.
10. The method according to claim 7, characterized in that The step of sending the acquired target ticket to the second user identifier includes: Detecting the number of times the target ticket is collected; A collection times threshold is obtained, and when the number of times the target ticket is collected is less than the collection times threshold, the obtained target ticket is sent to the second user identifier.
11. A bill processing device, characterized in that: The device comprises: A first receiving module, configured for a first blockchain node to receive a bill creation request uploaded by a first user identifier; A generation module, configured for the first blockchain node to generate a target note according to the note creation request; A storage module, configured for the first blockchain node to send the target bill to a second blockchain node, wherein the multi-signature address of the second blockchain node is used to store the target bill; the first user identifier is associated with the first blockchain node and the second blockchain node, the multi-signature address is an address obtained by performing multi-signatures based on the second blockchain node, the first user identifier and the second user identifier, and the multi-signature address is associated with a key of the first user identifier, a key of the second user identifier and a key of the second blockchain node; A second receiving module, configured for the second blockchain node to receive a ticket collection request initiated by the second user identifier after logging into the second blockchain node; The apparatus further includes a module for receiving a key provided by the second user identifier, and a module for the second blockchain node to verify access rights of the second user identifier to the multi-signature address based on the key provided by the second user identifier; A return module is used for, when the verification is passed, the second blockchain node obtains the corresponding target ticket according to the ticket collection request, and returns the obtained target ticket to the second user identifier.
12. The device according to claim 11, characterized in that The bill creation request includes bill creation information and a transaction identifier; the generation module is also used for the first blockchain node to obtain corresponding transaction information and bill attribute information according to the transaction identifier; the first blockchain node generates a target bill according to the bill creation information, transaction information and bill attribute information.
13. The device according to claim 11, characterized in that The return module is also used for the second blockchain node to determine the status of the acquired target bill, and the status of the target bill includes an uncollected state and a collected state; when the status of the acquired target bill is an uncollected state, the second blockchain node returns the acquired target bill to the second user identifier.
14. The device according to claim 13, characterized in that The return module is also used for, when the status of the acquired target ticket is the received status, the second blockchain node displays the time and number of times the target ticket is received, and determines whether the second user identifier receives the target ticket again; when the second user identifier determines to receive the target ticket again, the second blockchain node sends the acquired target ticket to the second user identifier.
15. The device according to claim 11, characterized in that The return module is also used for the second blockchain node to detect the number of times the target ticket is collected; the second blockchain node obtains a collection number threshold, and when the number of times the target ticket is collected is less than the collection number threshold, the obtained target ticket is sent to the second user identifier.
16. The device according to claim 11, characterized in that The return module is also used for, when the second user identifier is an instant messaging account, associating the second blockchain node with the second user identifier, and the second blockchain node obtaining a target note corresponding to the second user identifier; the second blockchain node automatically sends the corresponding target note to the second user identifier.
17. A bill issuing device, applied to a second blockchain node, characterized in that: The device comprises: A second receiving module, configured to receive a ticket collection request initiated by a second user identifier after logging into the second blockchain node; The apparatus further comprises a module for receiving a key provided by a second user identifier, and a module for verifying access rights of the second user identifier to the multi-signature address based on the key provided by the second user identifier; an acquisition module, configured to acquire the corresponding target bill from the multi-signature address of the second blockchain node according to the bill collection request when the verification is passed; the multi-signature address is an address obtained by multi-signature based on the second blockchain node, the first user identifier and the second user identifier, the multi-signature address is associated with the key of the first user identifier, the key of the second user identifier and the key of the second blockchain node, the target bill is generated by the first blockchain node according to the bill creation request uploaded by the first user identifier; the first user identifier is associated with the first blockchain node and the second blockchain node; A sending module is used to send the acquired target ticket to the second user identifier.
18. The device according to claim 17, characterized in that The sending module is further used to determine the status of the acquired target ticket, where the status of the target ticket includes an uncollected status and a collected status; when the status of the acquired target ticket is an uncollected status, the acquired target ticket is sent to the second user identifier.
19. The device according to claim 18, characterized in that The sending module is also used to display the time and number of times the target ticket is collected when the status of the acquired target ticket is the collected status, and determine whether the second user identifier collects the target ticket again; when the second user identifier determines to collect the target ticket again, the acquired target ticket is sent to the second user identifier.
20. The device according to claim 17, characterized in that The sending module is further used to detect the number of times the target ticket is collected; obtain a collection number threshold, and when the number of times the target ticket is collected is less than the collection number threshold, send the obtained target ticket to the second user identifier.
21. 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 10.
22. 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 10.
