Bill processing method, device, terminal and computer-readable storage medium
By using multiple signature addresses and operation request signature mechanisms in the blockchain network, the security and legality of bill processing and operation in the blockchain network are solved, and the security processing and evidence storage of bills are realized.
Patent Information
- Application Number
- CN202010074828.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-01-22
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2040-01-22
AI Technical Summary
The prior art is difficult to effectively process and securely operate electronic receipts in blockchain networks, especially to ensure the legality and security of receipts in a multi-node environment.
By introducing a multi-signature address and operation request signature mechanism into the blockchain network, it is ensured that only authorized nodes can operate on the target ticket. The specific steps include: generating and publishing operation requests, performing validity approval, signing and verifying signatures, and ultimately performing target operations.
The security processing and evidence storage of bills in the blockchain network is realized, the security and transparency of bills are improved, and the legality and traceability of operations are ensured.
Smart Images

Figure CN111311259B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a bill processing method, a bill processing device, a terminal and a computer-readable storage medium. Background Art
[0002] With the advent of the information age, all industries are implementing informatization. As a product of "Internet +", electronic bills have improved the efficiency of bill issuance, reduced the cost of bill issuance, and brought great convenience to consumers, enterprises, and tax bureaus. The advantages of electronic bills, such as clean and environmentally friendly, easy to obtain, and easy to store, make traditional paper bills gradually replaced by electronic bills. However, how to achieve the processing of electronic bills is currently a hot research topic. Summary of the invention
[0003] The embodiments of the present invention provide a bill processing method, a bill processing device, a terminal and a computer-readable storage medium, which can realize the processing of bills in a blockchain network, improve the security of bill processing, and use blockchain to record the process of bill processing, thereby realizing evidence storage.
[0004] In a first aspect, an embodiment of the present invention provides a bill processing method, which is applied to a first node in a blockchain network, wherein the blockchain network also includes a second node, and the method includes:
[0005] In the process of acquiring transaction data associated with the first node from the blockchain network, when the acquired transaction data includes a first operation request for a target ticket, performing validity review on the first operation request, the first operation request carrying the requested target operation;
[0006] When the validity of the first operation request is confirmed, a second operation request is generated, and the second operation request is signed by using the first key of the first node to obtain a first signature, wherein the second operation request includes the target operation and the identifier of the target ticket;
[0007] Publishing the second operation request and the first signature to the blockchain network, so that the blockchain network verifies the first signature and performs the target operation on the target ticket after the first signature is successfully verified;
[0008] The target note is stored at a location corresponding to a first multi-signature address in the blockchain network, the first multi-signature address is associated with at least two keys, and the at least two keys include a second key of the first node that matches the first key, and the first operation request is issued by the second node to the blockchain network.
[0009] In one embodiment, the first operation request further carries an identifier of the target bill and an identifier of the tax bureau corresponding to the second node, and the validity review of the first operation request includes:
[0010] Acquire the bill information of the target bill from the blockchain network according to the identifier of the target bill, wherein the bill information includes the identifier of the tax bureau to which the target bill belongs;
[0011] Outputting approval prompt information, the approval prompt information including the identifier of the tax bureau corresponding to the second node, the target operation, and the bill information, the approval prompt information being used to prompt a user of the first node to approve the validity of the first operation request;
[0012] When it is detected that the user of the first node inputs an approval instruction in response to the approval prompt information, the validity of the first operation request is confirmed.
[0013] In one embodiment, before outputting the approval prompt information, the method further includes:
[0014] Obtaining the identification of the tax bureau to which the target bill belongs included in the bill information;
[0015] Detecting whether the identifier of the tax bureau corresponding to the second node is consistent with the identifier of the tax bureau to which the target bill belongs;
[0016] If they are consistent, the step of outputting the approval prompt information is executed;
[0017] If they are inconsistent, the invalidity of the first operation request is confirmed.
[0018] In one embodiment, the blockchain network further includes a third node, the target bill is pre-stored at a position corresponding to a second multi-signature address in the blockchain network, and at least two keys associated with the second multi-signature address include a third key of the third node; the target bill is transferred from the position corresponding to the second multi-signature address to the position corresponding to the first multi-signature address for storage after the second signature is successfully verified, the second signature is obtained by signing a bill transfer request using a secret key of the third node that matches the third secret key, and the bill transfer request carries an identifier of the target bill.
[0019] In one embodiment, executing the target operation on the target note includes: transferring the target note to a position corresponding to an invalidated address in the blockchain network, adjusting the resource quantity of the target note, or performing redemption processing on the target note.
[0020] In a second aspect, an embodiment of the present invention provides another bill processing method, which is applied to a second node in a blockchain network, wherein the blockchain network also includes a first node, and the method includes:
[0021] Generate a first operation request, the first operation request carrying the requested target operation, the identifier of the target ticket, and the identifier of the tax bureau corresponding to the first node;
[0022] Publishing the first operation request to the blockchain network, so that when the first node obtains the first operation request from the blockchain network, it examines the validity of the first operation request, and when the validity of the first operation request is confirmed, generates a second operation request including the target operation and the identifier of the target ticket, and publishes the second operation request and a first signature obtained by signing the second operation request with the first key of the first node to the blockchain network, so that the blockchain network verifies the first signature, and executes the target operation on the target ticket after the first signature verification succeeds;
[0023] The target note is stored at a location corresponding to a first multi-signature address in the blockchain network, the first multi-signature address is associated with at least two keys, and the at least two keys include a second key of the first node that matches the first key.
[0024] In one embodiment, the blockchain network further includes a third node, the target bill is pre-stored at a position corresponding to a second multi-signature address in the blockchain network, and at least two keys associated with the second multi-signature address include a third key of the third node; the target bill is transferred from the position corresponding to the second multi-signature address to the position corresponding to the first multi-signature address for storage after the second signature is successfully verified, the second signature is obtained by signing a bill transfer request using a secret key of the third node that matches the third secret key, and the bill transfer request carries an identifier of the target bill.
[0025] In a third aspect, an embodiment of the present invention provides a bill processing device, which includes a unit for executing the bill processing method described in the first aspect or the bill processing method described in the second aspect.
[0026] In a fourth aspect, an embodiment of the present invention provides a terminal, a processor, a communication interface and a memory, wherein the processor, the communication interface and the memory are interconnected, wherein the memory stores an executable program code, and the processor is used to call the executable program code to execute the bill processing method described in the first aspect or the bill processing method described in the second aspect.
[0027] Correspondingly, an embodiment of the present invention also provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute the bill processing method described in the first aspect or the bill processing method described in the second aspect.
[0028] In an embodiment of the present invention, the second node publishes a first operation request for executing a target operation on a target bill to a blockchain network. When the first node obtains the first operation request from the blockchain network, after confirming the validity of the first operation request, it publishes a second operation request for executing the target operation on the target bill and a first signature obtained by signing the second operation request to the blockchain network. The blockchain network executes the target operation on the target bill after the first signature is successfully verified. The above method can not only realize the processing of bills in the blockchain network and improve the security of bill processing, but also use the blockchain to record the process of bill processing, thereby realizing evidence storage. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 It is a schematic diagram of the architecture of a distributed system provided by an embodiment of the present invention;
[0031] Figure 2 This is a schematic diagram of the architecture of a blockchain network provided by an embodiment of the present invention;
[0032] Figure 3 It is a flowchart of a bill processing method provided by an embodiment of the present invention;
[0033] Figure 4 is a schematic diagram of a user interface provided by an embodiment of the present invention;
[0034] Figure 5 It is a structural schematic diagram of a bill processing device provided by an embodiment of the present invention;
[0035] Figure 6 is a structural schematic diagram of another bill processing device provided by an embodiment of the present invention;
[0036] Figure 7 is a schematic diagram of the structure of a terminal provided by an embodiment of the present invention;
[0037] Figure 8It is a schematic diagram of the structure of another terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0039] In order to better understand the bill processing method, device, terminal and computer-readable storage medium provided by the embodiments of the present invention, the system architecture applicable to the embodiments of the present invention is first described below. Figure 1 , Figure 1 It is an optional architecture diagram of the distributed system provided by the embodiment of the present invention applied to the blockchain system (or blockchain network), which is formed by connecting the first node, the second node and multiple node devices through network communication. A peer-to-peer (P2P) protocol 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 can be at the hardware layer, the middle layer, the operating system layer or the application layer.
[0040] Among them, the node device can be a full node or a light node (or SPV node) in the blockchain network. A light node (or SPV node) refers to a node that locally stores transaction data related to itself and does not store the complete blockchain. A full node refers to a node that stores the complete blockchain. A full node is usually a high-performance computing device. Blockchain (Block Chain) is a distributed ledger that combines data blocks in a sequential manner in chronological order into a chain data structure, and uses cryptography to ensure that the data cannot be tampered with or forged. Multiple independent distributed nodes (i.e. blockchain nodes) save the same records. Blockchain technology has achieved decentralization and has become the cornerstone of trusted resource storage, transfer, and transactions. Such as Figure 2 As shown, Figure 2 Take the example of a blockchain network that includes three blockchain nodes. Each blockchain node includes a blockchain. The blockchain includes three blocks, namely block 1, block 2 and block 3. When new data needs to be written into the blockchain, each blockchain node in the blockchain network adds a new block containing the new data after the end block 3 of the blockchain, that is, the new block is put on the chain. Each block records several transaction records and contains the hash value of the previous block. All blocks are connected in sequence by saving the information in the previous block, forming a blockchain that is difficult to be tampered with.
[0041] The first node and the second node may be light nodes (or SPV nodes) in the blockchain network. The first node may be a terminal corresponding to the tax bureau in the area where the enterprise that reimburses the bill is located, and the second node may be a terminal corresponding to the tax bureau in the area where the enterprise that issues the bill is located. The terminals may include, but are not limited to: smartphones (such as Android phones, iOS phones, etc.), tablet computers, portable personal computers, mobile Internet devices (Mobile Internet Devices, MID for short), etc.
[0042] In order to better understand the bill processing method, device, terminal and computer-readable storage medium provided by the embodiment of the present invention, the multi-signature technology involved in the embodiment of the present invention is described below. The principle of multi-signature technology can be summarized as: "Use N keys to generate a multi-signature authentication address, and M keys are required to use the assets on this address, where N ≥ M, and N is a positive integer greater than 1, and M is a positive integer. This is the multi-signature of the M / N mode." Taking cryptocurrency as an example, in actual operation, a multi-signature address can be associated with N keys (such as the private key in the key pair). When operations such as transfer are required, only M keys out of the N keys are needed to transfer funds. Among them, M must be less than or equal to N, that is, M / N≤1, such as 1 / 2 mode, 2 / 3 mode, 3 / 5 mode, 5 / 5 mode, etc. When establishing this multi-signature address, multiple parties can agree on the specific mode of M / N. It can be seen that a multi-signature address is a multi-signature authenticated address generated using at least two keys (such as the public key or private key in a key pair), and only one or more keys that match the at least two keys (such as the private key in a key pair) can be used to operate the objects stored in the multi-signature address (such as funds or bills, etc.).
[0043] In order to better understand a bill processing method, device, terminal and computer-readable storage medium provided by an embodiment of the present invention, the following describes an application scenario applicable to the embodiment of the present invention. Enterprise A is located in region E. Xiao Wang, an employee of enterprise A, goes on a business trip to region F. During the business trip, he conducts a transaction with enterprise B located in region F and issues an electronic bill (target bill) from enterprise B. At this time, employee Xiao Wang's terminal (the third node in the blockchain network), enterprise B's terminal (the fourth node in the blockchain network) and the terminal of tax bureau Y in region F (the second node in the blockchain network) will all obtain the electronic bill. Then the electronic bill can be stored by the second node, the third node or the fourth node to the position corresponding to the second multi-signature address in the blockchain network. Among them, the at least two keys associated with the second multi-signature address include: the third key of the third node and the fourth key of the second node. After the electronic bill is stored at the position corresponding to the second multi-signature address, only the key matching the third key or the fourth key can be used to operate the electronic bill; in other words, only the second node and the third node have the authority to operate the electronic bill.
[0044] When employee Xiao Wang uses the electronic invoice to claim reimbursement from his company A, and company A uses the electronic invoice to pay taxes at the tax bureau X in region E, employee Xiao Wang's terminal (the third node in the blockchain network), company A's terminal (the fifth node in the blockchain network), and the terminal of the tax bureau X in region E (the first node in the blockchain network) will all obtain the electronic bill. Then the first node, the third node, or the fifth node can publish the second signature and the bill transfer request to the blockchain network. The blockchain network verifies the second signature, and after the second signature is successfully verified, the target bill is transferred from the position corresponding to the second multi-signature address to the position corresponding to the first multi-signature address in the blockchain network for storage. Among them, the second signature is obtained by signing the bill transfer request using the secret key of the third node that matches the third secret key, and the bill transfer request carries the identification of the target bill. The at least two keys associated with the first multi-signature address include: the second key of the first node and the fifth secret key of the fifth node. After the electronic ticket is stored in the location corresponding to the first multi-signature address, the electronic ticket can only be operated using a key that matches the second key or the fifth key; in other words, only the first node and the fifth node have the authority to operate the electronic ticket.
[0045] In another embodiment, employee Xiao Wang's terminal, i.e., the third node, automatically detects the information of the purchaser (enterprise A) in the electronic bill, and when it is detected that the information indicates that the tax bureau in the area where enterprise A is located is tax bureau X, the third node generates a bill transfer request, and signs the bill transfer request with a secret key matching the third secret key to obtain a second signature. The third node publishes the second signature and the bill transfer request to the blockchain network, so that the blockchain network transfers the target bill from the position corresponding to the second multi-signature address to the position corresponding to the first multi-signature address in the blockchain network for storage after the second signature is successfully verified.
[0046] After the target bill is stored in the location corresponding to the first multi-signature address in the blockchain network, when the staff of the tax bureau Y needs to operate the target bill, for example, the target bill needs to be invalidated, etc.; because the terminal of the tax bureau Y, that is, the second node, no longer has the authority to operate the target bill, the second node cannot directly operate the target bill. At this time, how to operate the target bill is an urgent problem to be solved. Based on this, an embodiment of the present invention provides a bill processing method to operate the target bill through the tax bureau X, that is, the first node, which is described in detail below.
[0047] See also Figure 3 , Figure 3 A flowchart of a bill processing method provided by an embodiment of the present invention. The bill processing method described in the embodiment of the present invention is applied to Figure 1 The distributed system shown, the method includes:
[0048] S301. The second node generates a first operation request.
[0049] In an embodiment of the present invention, the first operation request carries one or more of the requested target operation, the identifier of the target bill, the identifier of the tax bureau corresponding to the first node, the identifier of the tax bureau corresponding to the second node, the bill information of the target bill, and the reason for requesting to perform the target operation on the target bill.
[0050] The identification of the target bill may be information that can uniquely identify the target bill, such as a bill code, a bill number, a bill verification code, etc. The bill information of the target bill includes, but is not limited to, the billing time, the amount of resources (such as the transaction amount), the transaction object (such as the buyer, the seller), etc. In one embodiment, the target bill may be an electronic invoice, and the bill information of the electronic invoice may also include: the name, taxpayer identification number, address, telephone number, bank and account number of the buyer, the name, taxpayer identification number, address, telephone number, bank and account number of the seller, tax rate, tax amount, payee, reviewer, and bill issuer.
[0051] The identification of the tax bureau corresponding to the first node may be the name or code of the tax bureau corresponding to the first node, and the identification of the tax bureau corresponding to the second node may be the name or code of the tax bureau corresponding to the second node. The second node may be a terminal corresponding to the tax bureau in the area where the enterprise (i.e., the seller) that issues the target bill is located. The first node may be a terminal corresponding to the tax bureau in the area where the enterprise (i.e., the buyer) that reimburses the target bill is located. The first node and the second node may be light nodes (or SPV nodes) in the blockchain network. It should be noted that the tax bureau in the area where the seller is located in the embodiment of the present invention is different from the tax bureau in the area where the buyer is located, that is, the tax bureaus corresponding to the first node and the second node are different.
[0052] S302. The second node publishes the first operation request to the blockchain network.
[0053] In an embodiment of the present invention, the second node determines a target node from the blockchain network and sends a first operation request to the target node. The target node is a full node and is connected to the second node. The target node generates a block according to the first operation request and adds the generated block to the blockchain stored therein; and broadcasts the generated block to the blockchain network so that the full nodes in the blockchain network add the block to their respective stored blockchains. The first operation request carried by the block can be regarded as a transaction data of an instruction type.
[0054] S303. The first node obtains transaction data associated with the first node from the blockchain network.
[0055] In an embodiment of the present invention, the first node may obtain transaction data associated with the first node from the blockchain network at preset time intervals, or may obtain corresponding transaction data from the blockchain network when newly added transaction data associated with the first node is detected in a message broadcast from the blockchain network. The transaction data associated with the first node includes: transaction data carrying information associated with the first node, such as carrying an identifier of the first node (such as a network address, a hardware address, etc.), carrying an identifier of the tax bureau corresponding to the first node, carrying information of bills related to enterprises in the area where the first node is located (such as bill identifiers, etc.), and so on.
[0056] S304: When the acquired transaction data includes a first operation request for a target bill, the first node performs validity review on the first operation request.
[0057] In an embodiment of the present invention, after the first node obtains the transaction data associated with it from the blockchain network, it can store the obtained transaction data in a local database. The first node detects the obtained transaction data, and when a first operation request for the target bill is detected, the first operation request is reviewed for validity. In one embodiment, the first node obtains the bill information of the target bill from the blockchain network based on the identifier of the target bill, and the bill information includes: the identifier of the tax bureau to which the target bill belongs (that is, the identifier of the tax bureau in the area where the enterprise that issued the target bill is located), the invoicing time, the transaction amount, the purchaser's information, the seller's information, the bill code, the bill number, the bill verification code, etc. One or more of the above. The first node outputs approval prompt information, such as Figure 4 As shown, it is a schematic diagram of an output interface of an approval prompt information provided by an embodiment of the present invention; the approval prompt information includes the identification (such as name, code) of the tax bureau corresponding to the second node, the requested target operation and the bill information of the target bill, and the approval prompt information is used to prompt the user of the first node to manually approve the validity of the first operation request. When it is detected that the user of the first node inputs an approval instruction for the approval prompt information, it is determined that the validity of the first operation request is approved, that is, the validity of the first operation request is confirmed.
[0058] In one embodiment, before the first node outputs the approval prompt information, it first obtains the identification of the tax bureau to which the target bill belongs from the bill information of the target bill, and obtains the identification of the tax bureau corresponding to the second node from the first operation request; it detects whether the identification of the tax bureau corresponding to the second node is consistent with the identification of the tax bureau to which the target bill belongs; if the two identifications are consistent, it means that the second node has the authority to initiate an operation request for the target bill, and performs the step of outputting the approval prompt information. If the two identifications are inconsistent, it means that the second node does not have the authority to initiate an operation request for the target bill, and determines that the validity approval of the first operation request has not passed, that is, confirms the invalidity of the first operation request.
[0059] S305: When the validity of the first operation request is confirmed, the first node generates a second operation request, wherein the second operation request includes the target operation and the identifier of the target ticket.
[0060] S306. The first node signs the second operation request using the first key of the first node to obtain a first signature.
[0061] In an embodiment of the present invention, the first key is a key of the first node that matches the second key. The matching of the first key and the second key may mean that the first key is the same as the second key, or it may mean that the first key and the second key are a key pair created using an asymmetric encryption algorithm, for example, the second key is the public key in the key pair, and the first key is the private key in the key pair; for example, the second key is the blockchain address of the first node obtained after the public key in the key pair is processed (such as hash algorithm processing, etc.), and the first key is the private key in the key pair. It should be noted that the third key of the third node described above and the key matching the third key also have a similar relationship, which will not be repeated in the embodiment of the present invention. The asymmetric encryption algorithm described in the embodiment of the present invention may include but is not limited to: Elgamal algorithm (an asymmetric encryption algorithm), Rabin algorithm (an asymmetric encryption algorithm), Diffie-Hellman algorithm (an asymmetric encryption algorithm), ECC algorithm (elliptic curve encryption algorithm).
[0062] S307. The first node publishes the second operation request and the first signature to the blockchain network.
[0063] S308. The blockchain network verifies the first signature, and performs the target operation on the target ticket after the first signature verification is successful.
[0064] In an embodiment of the present invention, the blockchain network verifies the first signature using the first key of the first node and the second operation request. If the first signature verification succeeds, the target operation is performed on the target bill. In one embodiment, performing the target operation on the target bill includes: transferring the target bill to a position corresponding to the invalidation address in the blockchain network to invalidate the target bill; adjusting the bill information of the target bill, such as adjusting the tax rate, tax, transaction amount (resource quantity) of the target bill; performing redemption processing on the target bill, etc.
[0065] The following specifically describes how the blockchain network verifies the first signature. For example, taking the hash algorithm as an example, the blockchain network uses the first key of the first node to decrypt the first signature to obtain hash value 1, and uses the hash algorithm to calculate the second operation request to obtain hash value 2; if hash value 1 is the same as hash value 2, it is determined that the first signature verification is successful. It should be noted that the method for verifying the second signature in the previous text is similar, and the embodiments of the present invention will not be repeated.
[0066] In one embodiment, after the first signature is successfully verified, the blockchain network may also generate a block based on the second operation request and the first signature, and add the generated block to the blockchain in the blockchain network.
[0067] In an embodiment of the present invention, when the second node does not have the authority to operate the target bill, the target bill can be operated through the first node in the blockchain network that has the authority to operate the target bill and the blockchain network, thereby realizing the processing of the bill in the blockchain network. In addition, in the process of processing the bill, the validity of the operation request initiated by the second node will be approved, and the signature of the first node will be verified. Only when the validity of the operation request initiated by the second node is approved and the signature verification of the first node is successful, the bill will be processed, thereby effectively ensuring the security of bill processing and preventing malicious processing of bills. In addition, the process of bill processing will be recorded in the blockchain, including the record of whether the second node requests the first node to process the target bill, the target operation performed on the target bill after the signature verification of the first node is successful, etc., so that evidence can be stored and provide a basis for subsequent accountability or tracing.
[0068] See also Figure 5 , Figure 5 A schematic diagram of the structure of a bill processing device provided in an embodiment of the present invention. The bill processing device described in the embodiment of the present invention corresponds to the first node in the blockchain network described above, and the device includes:
[0069] An acquisition unit 501 is used to acquire transaction data associated with the first node from a blockchain network;
[0070] The processing unit 502 is configured to, when the acquired transaction data includes a first operation request for a target ticket, review the validity of the first operation request, the first operation request carrying the requested target operation; when the validity of the first operation request is confirmed, generate a second operation request, and sign the second operation request using the first key of the first node to obtain a first signature, the second operation request including the target operation and the identifier of the target ticket;
[0071] The transceiver unit 503 is used to publish the second operation request and the first signature to the blockchain network, so that the blockchain network verifies the first signature and performs the target operation on the target ticket after the first signature is successfully verified;
[0072] The target note is stored at a location corresponding to a first multi-signature address in the blockchain network, the first multi-signature address is associated with at least two keys, and the at least two keys include a second key of the first node that matches the first key, and the first operation request is issued by the second node to the blockchain network.
[0073] In one embodiment, the first operation request also carries the identifier of the target bill and the identifier of the tax bureau corresponding to the second node; the acquisition unit 501 is further used to acquire the bill information of the target bill from the blockchain network according to the identifier of the target bill, and the bill information includes the identifier of the tax bureau to which the target bill belongs;
[0074] The device further includes an output unit 504, configured to output approval prompt information, wherein the approval prompt information includes an identifier of the tax bureau corresponding to the second node, the target operation, and the bill information, and the approval prompt information is used to prompt a user of the first node to perform validity approval for the first operation request;
[0075] The processing unit 502 is configured to confirm the validity of the first operation request when detecting that the user of the first node inputs an approval instruction in response to the approval prompt information.
[0076] In one embodiment, the processing unit 502 is further configured to: obtain the identifier of the tax bureau to which the target bill belongs included in the bill information; detect whether the identifier of the tax bureau corresponding to the second node is consistent with the identifier of the tax bureau to which the target bill belongs;
[0077] The output unit 504 is specifically configured to output approval prompt information when the identification of the tax bureau corresponding to the second node is consistent with the identification of the tax bureau to which the target bill belongs;
[0078] The processing unit 502 is further configured to confirm the invalidity of the first operation request when the identifier of the tax bureau corresponding to the second node is inconsistent with the identifier of the tax bureau to which the target bill belongs.
[0079] In one embodiment, the blockchain network further includes a third node, the target bill is pre-stored at a position corresponding to a second multi-signature address in the blockchain network, and at least two keys associated with the second multi-signature address include a third key of the third node; the target bill is transferred from the position corresponding to the second multi-signature address to the position corresponding to the first multi-signature address for storage after the second signature is successfully verified, the second signature is obtained by signing a bill transfer request using a secret key of the third node that matches the third secret key, and the bill transfer request carries an identifier of the target bill.
[0080] In one embodiment, executing the target operation on the target note includes: transferring the target note to a position corresponding to an invalidated address in the blockchain network, adjusting the resource quantity of the target note, or performing redemption processing on the target note.
[0081] It can be understood that the functions of each functional unit of the bill processing device of the embodiment of the present invention can be specifically implemented according to the method executed by the first node in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment and will not be repeated here.
[0082] See also Figure 6 , Figure 6 A schematic diagram of the structure of a bill processing device provided in an embodiment of the present invention. The bill processing device described in the embodiment of the present invention corresponds to the second node in the blockchain network described above, and the device includes:
[0083] The processing unit 601 is configured to generate a first operation request, where the first operation request carries the requested target operation, the identifier of the target ticket, and the identifier of the tax bureau corresponding to the first node;
[0084] The transceiver unit 602 is used to publish the first operation request to the blockchain network, so that when the first node obtains the first operation request from the blockchain network, it examines the validity of the first operation request, and when the validity of the first operation request is confirmed, it generates a second operation request including the target operation and the identifier of the target ticket, and publishes the second operation request and a first signature obtained by signing the second operation request with the first key of the first node to the blockchain network, so that the blockchain network verifies the first signature, and executes the target operation on the target ticket after the first signature verification is successful;
[0085] The target note is stored at a location corresponding to a first multi-signature address in the blockchain network, the first multi-signature address is associated with at least two keys, and the at least two keys include a second key of the first node that matches the first key.
[0086] In one embodiment, the blockchain network further includes a third node, the target bill is pre-stored at a position corresponding to a second multi-signature address in the blockchain network, and at least two keys associated with the second multi-signature address include a third key of the third node; the target bill is transferred from the position corresponding to the second multi-signature address to the position corresponding to the first multi-signature address for storage after the second signature is successfully verified, the second signature is obtained by signing a bill transfer request using a secret key of the third node that matches the third secret key, and the bill transfer request carries an identifier of the target bill.
[0087] It can be understood that the functions of each functional unit of the bill processing device of the embodiment of the present invention can be specifically implemented according to the method executed by the second node in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment and will not be repeated here.
[0088] See also Figure 7 , Figure 7 A schematic diagram of the structure of a terminal provided in an embodiment of the present invention. The terminal described in the embodiment of the present invention corresponds to the first node in the blockchain network described above, and the terminal includes: a processor 701, a user interface 702, a communication interface 703, and a memory 704. Among them, the processor 701, the user interface 702, the communication interface 703, and the memory 704 can be connected via a bus or other means. The embodiment of the present invention takes the connection via a bus as an example.
[0089] Among them, the processor 701 (or CPU (Central Processing Unit)) is the computing core and control core of the terminal, which can parse various instructions in the terminal and process various data of the terminal. For example, the CPU can be used to parse the power on and off instructions sent by the user to the terminal, and control the terminal to perform power on and off operations; for another example, the CPU can transmit various interactive data between the internal structures of the terminal, etc. The user interface 702 is a medium for realizing interaction and information exchange between the user and the terminal. Its specific embodiment can include a display screen (Display) for output and a keyboard (Keyboard) for input, etc. It should be noted that the keyboard here can be a physical keyboard, a touch screen virtual keyboard, or a keyboard that combines a physical and a touch screen virtual. The communication interface 703 can optionally include a standard wired interface, a wireless interface (such as Wi-Fi, a mobile communication interface, etc.), which is controlled by the processor 701 for sending and receiving data. The memory 704 (Memory) is a memory device in the terminal, which is used to store programs and data. It can be understood that the memory 704 here can include the built-in memory of the terminal, and of course, it can also include the extended memory supported by the terminal. The memory 704 provides a storage space, which stores the operating system of the terminal, including but not limited to: Android system, iOS system, Windows Phone system, etc., which is not limited in the present invention.
[0090] In the embodiment of the present invention, the processor 701 performs the following operations by running the executable program code in the memory 704:
[0091] In the process of obtaining transaction data associated with the first node from the blockchain network, when the obtained transaction data includes a first operation request for a target ticket, the validity of the first operation request is reviewed and approved, and the first operation request carries the requested target operation; when the validity of the first operation request is confirmed, a second operation request is generated, and the second operation request is signed with the first key of the first node to obtain a first signature, and the second operation request includes the target operation and the identifier of the target ticket; the second operation request and the first signature are published to the blockchain network through the communication interface 703, so that the blockchain network verifies the first signature, and executes the target operation on the target ticket after the first signature verification is successful;
[0092] The target note is stored at a location corresponding to a first multi-signature address in the blockchain network, the first multi-signature address is associated with at least two keys, and the at least two keys include a second key of the first node that matches the first key, and the first operation request is issued by the second node in the blockchain network to the blockchain network.
[0093] In one embodiment, the first operation request also carries an identifier of the target bill and an identifier of the tax bureau corresponding to the second node. When the processor 701 performs validity review on the first operation request, it is specifically used to: obtain the bill information of the target bill from the blockchain network according to the identifier of the target bill through the communication interface 703, and the bill information includes the identifier of the tax bureau to which the target bill belongs; output approval prompt information through the user interface 702, and the approval prompt information includes the identifier of the tax bureau corresponding to the second node, the target operation and the bill information, and the approval prompt information is used to prompt the user of the first node to review the validity of the first operation request; when it is detected that the user of the first node has input an approval instruction for the approval prompt information, the validity of the first operation request is confirmed.
[0094] In one embodiment, before the processor 701 outputs the approval prompt information through the user interface 702, the processor 701 is also used to: obtain the identifier of the tax bureau to which the target bill belongs included in the bill information; detect whether the identifier of the tax bureau corresponding to the second node is consistent with the identifier of the tax bureau to which the target bill belongs; if they are consistent, output the approval prompt information through the user interface 702; if they are inconsistent, confirm the invalidity of the first operation request.
[0095] In one embodiment, the blockchain network further includes a third node, the target bill is pre-stored at a position corresponding to a second multi-signature address in the blockchain network, and at least two keys associated with the second multi-signature address include a third key of the third node; the target bill is transferred from the position corresponding to the second multi-signature address to the position corresponding to the first multi-signature address for storage after the second signature is successfully verified, the second signature is obtained by signing a bill transfer request using a secret key of the third node that matches the third secret key, and the bill transfer request carries an identifier of the target bill.
[0096] In one embodiment, executing the target operation on the target note includes: transferring the target note to a position corresponding to an invalidated address in the blockchain network, adjusting the resource quantity of the target note, or performing redemption processing on the target note.
[0097] In a specific implementation, the processor 701, the user interface 702, the communication interface 703 and the memory 704 described in the embodiment of the present invention can execute the implementation of the first node described in the bill processing method provided in the embodiment of the present invention, and can also execute the implementation of the first node described in the embodiment of the present invention. Figure 5 The implementation method described in the illustrated bill processing device will not be repeated here.
[0098] See also Figure 8 , Figure 7 A schematic diagram of the structure of another terminal provided in an embodiment of the present invention. The terminal described in the embodiment of the present invention corresponds to the second node in the blockchain network described above, and the terminal includes: a processor 801, a communication interface 802, and a memory 803. Among them, the relevant introduction of the processor 801, the communication interface 802, and the memory 803 can be referred to the previous description, and will not be repeated here.
[0099] In the embodiment of the present invention, the processor 801 performs the following operations by running the executable program code in the memory 803:
[0100] Generate a first operation request, the first operation request carrying the requested target operation, the identifier of the target ticket, and the identifier of the tax bureau corresponding to the first node;
[0101] The first operation request is published to the blockchain network through the communication interface 802, so that when the first node in the blockchain network obtains the first operation request from the blockchain network, the first node examines the validity of the first operation request, and when the validity of the first operation request is confirmed, a second operation request including the target operation and the identifier of the target ticket is generated, and the second operation request and a first signature obtained by signing the second operation request with the first key of the first node are published to the blockchain network, so that the blockchain network verifies the first signature, and executes the target operation on the target ticket after the first signature verification is successful;
[0102] The target note is stored at a location corresponding to a first multi-signature address in the blockchain network, the first multi-signature address is associated with at least two keys, and the at least two keys include a second key of the first node that matches the first key.
[0103] In one embodiment, the blockchain network further includes a third node, the target bill is pre-stored at a position corresponding to a second multi-signature address in the blockchain network, and at least two keys associated with the second multi-signature address include a third key of the third node; the target bill is transferred from the position corresponding to the second multi-signature address to the position corresponding to the first multi-signature address for storage after the second signature is successfully verified, the second signature is obtained by signing a bill transfer request using a secret key of the third node that matches the third secret key, and the bill transfer request carries an identifier of the target bill.
[0104] In a specific implementation, the processor 801, the communication interface 802 and the memory 803 described in the embodiment of the present invention can execute the implementation of the second node described in a bill processing method provided in an embodiment of the present invention, and can also execute the implementation of the second node described in an embodiment of the present invention. Figure 6 The implementation method described in the illustrated bill processing device will not be repeated here.
[0105] An embodiment of the present invention also provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute the method executed by the first node or the second node in the bill processing method described in the embodiment of the present invention.
[0106] An embodiment of the present invention also provides a computer program product containing instructions, which, when executed on a computer, enables the computer to execute the method executed by the first node or the second node in the bill processing method described in the embodiment of the present invention.
[0107] It should be noted that, for the above-mentioned various method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0108] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0109] The above disclosure is only part of the embodiments of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A bill processing method, characterized in that: Applied to a first node in a blockchain network, the blockchain network also including a second node, the method comprising: In the process of acquiring transaction data associated with the first node from the blockchain network, when the acquired transaction data includes a first operation request for a target ticket, performing validity review on the first operation request, the first operation request carrying the requested target operation; When the validity of the first operation request is confirmed, a second operation request is generated, and the second operation request is signed by using the first key of the first node to obtain a first signature, wherein the second operation request includes the target operation and the identifier of the target ticket; Publishing the second operation request and the first signature to the blockchain network, so that the blockchain network verifies the first signature and performs the target operation on the target ticket after the first signature is successfully verified; The target note is stored at a location corresponding to a first multi-signature address in the blockchain network, the first multi-signature address is associated with at least two keys, and the at least two keys include a second key of the first node that matches the first key, and the first operation request is issued by the second node to the blockchain network.
2. The method according to claim 1, characterized in that The first operation request also carries the identifier of the target bill and the identifier of the tax bureau corresponding to the second node. The validity review of the first operation request includes: Acquire the bill information of the target bill from the blockchain network according to the identifier of the target bill, wherein the bill information includes the identifier of the tax bureau to which the target bill belongs; Outputting approval prompt information, the approval prompt information including the identifier of the tax bureau corresponding to the second node, the target operation, and the bill information, the approval prompt information being used to prompt a user of the first node to approve the validity of the first operation request; When it is detected that the user of the first node inputs an approval instruction in response to the approval prompt information, the validity of the first operation request is confirmed.
3. The method according to claim 2, characterized in that Before outputting the approval prompt information, the method further includes: Obtaining the identification of the tax bureau to which the target bill belongs included in the bill information; Detecting whether the identifier of the tax bureau corresponding to the second node is consistent with the identifier of the tax bureau to which the target bill belongs; If they are consistent, the step of outputting the approval prompt information is executed; If they are inconsistent, the invalidity of the first operation request is confirmed.
4. The method according to any one of claims 1 to 3, characterized in that: The blockchain network further includes a third node, the target note is pre-stored at a location corresponding to a second multi-signature address in the blockchain network, and the at least two keys associated with the second multi-signature address include a third key of the third node; The target bill is transferred from the position corresponding to the second multi-signature address to the position corresponding to the first multi-signature address for storage after the second signature is successfully verified, the second signature is obtained by signing the bill transfer request using the secret key of the third node matching the third key, and the bill transfer request carries the identifier of the target bill.
5. The method according to claim 1, characterized in that The performing of the target operation on the target note includes: transferring the target note to a position corresponding to an invalidated address in the blockchain network, adjusting the resource quantity of the target note, or performing redemption processing on the target note.
6. A bill processing method, characterized in that: Applied to a second node in a blockchain network, the blockchain network also including a first node, the method comprising: Generate a first operation request, the first operation request carrying the requested target operation, the identifier of the target ticket, and the identifier of the tax bureau corresponding to the first node; Publishing the first operation request to the blockchain network, so that when the first node obtains the first operation request from the blockchain network, it examines the validity of the first operation request, and when the validity of the first operation request is confirmed, generates a second operation request including the target operation and the identifier of the target ticket, and publishes the second operation request and a first signature obtained by signing the second operation request with the first key of the first node to the blockchain network, so that the blockchain network verifies the first signature, and executes the target operation on the target ticket after the first signature verification succeeds; The target note is stored at a location corresponding to a first multi-signature address in the blockchain network, the first multi-signature address is associated with at least two keys, and the at least two keys include a second key of the first node that matches the first key.
7. The method according to claim 6, characterized in that The blockchain network further includes a third node, the target note is pre-stored at a location corresponding to a second multi-signature address in the blockchain network, and the at least two keys associated with the second multi-signature address include a third key of the third node; The target bill is transferred from the position corresponding to the second multi-signature address to the position corresponding to the first multi-signature address for storage after the second signature is successfully verified, the second signature is obtained by signing the bill transfer request using the secret key of the third node matching the third key, and the bill transfer request carries the identifier of the target bill.
8. A bill processing device, characterized in that: The device includes a unit for executing the bill processing method according to any one of claims 1 to 5 or the bill processing method according to claim 6 or 7.
9. A terminal, characterized in that: include: A processor, a communication interface and a memory, wherein the processor, the communication interface and the memory are interconnected, wherein the memory stores an executable program code, and the processor is used to call the executable program code to execute the bill processing method as described in any one of claims 1 to 5 or the bill processing method as described in claim 6 or 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the bill processing method according to any one of claims 1 to 5 or the bill processing method according to claim 6 or 7.
Citation Information
Patent Citations
Bill processing method and device, processing equipment and computer storage medium
CN110598457A
Electronic bill processing method and device, computer equipment and computer storage medium
CN110599265A