CN109191272B - Data processing method, device, storage medium and equipment for electronic bill - Google Patents
Data processing method, device, storage medium and equipment for electronic bill Download PDFInfo
- Publication number
- CN109191272B CN109191272B CN201810941347.4A CN201810941347A CN109191272B CN 109191272 B CN109191272 B CN 109191272B CN 201810941347 A CN201810941347 A CN 201810941347A CN 109191272 B CN109191272 B CN 109191272B
- Authority
- CN
- China
- Prior art keywords
- bill
- electronic
- electronic bill
- stage
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/12—Accounting
- G06Q40/123—Tax preparation or submission
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
- G06Q20/3829—Payment protocols; Details thereof insuring higher security of transaction involving key management
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Engineering & Computer Science (AREA)
- Finance (AREA)
- Theoretical Computer Science (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Technology Law (AREA)
- Computer Security & Cryptography (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The application relates to a data processing method, a device, a computer readable storage medium and a computer device for electronic bills, wherein the method comprises the following steps: in each circulation stage of the circulation process of the electronic bill, acquiring bill information of the electronic bill in the circulation stage, and correspondingly generating an electronic bill inquiry code of the electronic bill in the circulation stage; correspondingly recording the bill information of the electronic bill in each circulation stage and the corresponding electronic bill query code into a block chain network; receiving a retrospective query instruction about the electronic bill; the tracing query instruction carries an electronic bill query code of the electronic bill at any circulation stage; inquiring bill information of the electronic bill in each circulation stage according to the electronic bill inquiry code carried by the tracing inquiry command; and feeding back the inquired bill information. The scheme provided by the application can realize the tracing of the electronic bill.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing data related to an electronic ticket, a computer-readable storage medium, and a computer device.
Background
Invoices are consumer vouchers provided by businesses or individuals for consumers when selling goods, providing services, or engaging in other business activities. When a business or an individual sells goods, provides services or carries out other business activities to a consumer, the business or the individual should make an invoice and carry out tax payment according to the invoice legally.
Data of all links of traditional receipt, issuing, reimbursement, tax payment and the like of invoices are split, and information such as whether blank invoices are successfully issued after being received by enterprises, whether issued invoices are reimbursed by consumers, whether enterprises related to the invoices reasonably receive taxes according to the invoices according to regulations and the like is unknown, so that the information is split, and detailed information of the invoices in the circulation process is not known.
Disclosure of Invention
Based on this, it is necessary to provide a data processing method, an apparatus, a computer-readable storage medium and a computer device for electronic bills, aiming at the technical problem that the conventional invoice processing method cannot query detailed information of invoices in the circulation process.
A data processing method about electronic bill is applied to a block chain node in a block chain network; the method comprises the following steps:
acquiring bill information of the electronic bill in the circulation stage at each circulation stage in the circulation process of the electronic bill, and correspondingly generating an electronic bill inquiry code of the electronic bill in the circulation stage;
correspondingly recording the bill information of the electronic bill in each circulation stage and the corresponding electronic bill query code into a block chain network;
receiving a retrospective query instruction about the electronic bill; the tracing query instruction carries an electronic bill query code of the electronic bill at any circulation stage;
inquiring bill information of the electronic bill in each circulation stage according to the electronic bill inquiry code carried by the tracing inquiry command;
and feeding back the inquired bill information.
A data processing apparatus relating to electronic tickets, the apparatus comprising:
the acquisition module is used for acquiring bill information of the electronic bills in the circulation stage at each circulation stage in the circulation process of the electronic bills and correspondingly generating electronic bill inquiry codes of the electronic bills in the circulation stage;
the recording module is used for correspondingly recording the bill information of the electronic bill in each circulation stage and the corresponding electronic bill query code into the block chain network;
the receiving module is used for receiving a tracing inquiry instruction about the electronic bill; the tracing query instruction carries an electronic bill query code of the electronic bill at any circulation stage;
the query module is used for querying the bill information of the electronic bill in each circulation stage according to the electronic bill query code carried by the tracing query instruction;
and the feedback module is used for feeding back the inquired bill information.
A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to perform the steps of the data processing method for electronic tickets.
A computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of the data processing method in respect of electronic tickets.
According to the data processing method, the data processing device, the computer readable storage medium and the computer equipment for the electronic bill, the bill information of the electronic bill is acquired at each circulation stage in the circulation process of the electronic bill, and the electronic bill inquiry code of the electronic bill at the circulation stage is correspondingly generated. And correspondingly recording the bill information of the electronic bill in each circulation stage and the corresponding electronic bill query code into the block chain network, wherein the block chain network stores the related information of the electronic bill in each circulation stage. Furthermore, after a tracing inquiry instruction carrying the electronic bill inquiry code is received, the bill information of the electronic bill in each circulation stage which is already passed through by the electronic bill can be inquired in the block chain network according to the electronic bill inquiry code, so that the information of the electronic bill in each circulation stage is not split and unknown. Therefore, the bill information of the electronic bill at the experienced circulation stage can be searched retrospectively by accessing the block chain nodes in the block chain network, and the retrospective query of the electronic bill in the circulation process is realized.
Drawings
FIG. 1 is a diagram showing an application environment of a data processing method for an electronic ticket according to an embodiment;
FIG. 2 is a flow diagram of a method of data processing with respect to electronic tickets in one embodiment;
FIG. 3 is a schematic diagram of the consensus algorithm in one embodiment;
FIG. 4 is a flowchart illustrating the steps of recording a ticket query record in one embodiment;
fig. 5 is a schematic flow chart illustrating steps of acquiring ticket information of an electronic ticket at a circulation stage and correspondingly generating an electronic ticket inquiry code of the electronic ticket at the circulation stage at each circulation stage in an electronic ticket circulation process in one embodiment;
FIG. 6 is a schematic flow chart showing steps of acquiring ticket information of an electronic ticket in a circulation stage and correspondingly generating an electronic ticket inquiry code of the electronic ticket in the circulation stage at each circulation stage in the circulation process of the electronic ticket in another embodiment;
FIG. 7 is a flowchart showing a data processing method for an electronic ticket according to an embodiment;
FIG. 8 is a schematic diagram showing the logical relationship of the electronic ticket at each stage of circulation in one embodiment;
FIG. 9 is a diagram of a deployment of a data processing system for electronic tickets in one embodiment;
FIG. 10 is a block diagram showing the configuration of a data processing apparatus relating to an electronic ticket in one embodiment;
FIG. 11 is a block diagram showing a configuration of a data processing apparatus relating to an electronic ticket in another embodiment;
FIG. 12 is a block diagram that illustrates the architecture of a computing device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
Fig. 1 is a diagram of an application environment of a data processing method for an electronic ticket in one embodiment. Referring to fig. 1, the data processing method for electronic tickets is applied to a data processing system for electronic tickets. The data processing system for electronic tickets includes a terminal 110, an electronic ticket management server 120, and a blockchain network. The blockchain network includes a plurality of blockchain nodes 130, specifically including blockchain nodes corresponding to tax office servers, invoicing party blockchain nodes corresponding to invoicing enterprises, blockchain nodes corresponding to electronic bill public servers, and blockchain nodes corresponding to reimbursement enterprises. And data can be transmitted between every two block chain nodes. The user terminal 110 and the electronic ticket management server 120 are connected through a network. The electronic ticket management server 120 and the block link point 130 are connected through a network.
The block chain node 130 acquires bill information of the electronic bill in the circulation stage at each circulation stage in the circulation process of the electronic bill, and correspondingly generates an electronic bill inquiry code of the electronic bill in the circulation stage; and correspondingly recording the bill information of the electronic bill in each circulation stage and the corresponding electronic bill inquiry code into the block chain network. The terminal 110 can send a trace back query instruction about the electronic ticket to the block link point 130 through the electronic ticket management server 120. The block chain node 130 queries the bill information of the electronic bill in each circulation stage according to the electronic bill query code carried by the traceback query instruction, and feeds back the queried bill information.
The terminal 110 may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The electronic ticket server 120 or the blockchain node 130 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, a data processing method for an electronic ticket is provided. This embodiment is mainly illustrated by applying this method to the block link point 130 in fig. 1. Referring to fig. 2, the data processing method for electronic bills specifically includes the following steps:
s202, acquiring bill information of the electronic bill in the circulation stage at each circulation stage in the circulation process of the electronic bill, and correspondingly generating an electronic bill inquiry code of the electronic bill in the circulation stage.
The electronic ticket is an electronically stored ticket, and may be stored in a storage medium or a computer device, for example. The electronic bill inquiry code is used for inquiring an electronic bill, and specifically can be a character string, a two-dimensional code or a bar code. The electronic bill circulation stage is a stage for transferring the electronic bill in the whole life cycle, and specifically comprises an invoicing stage, a reimbursement stage and a tax return stage.
The billing stage is a stage in which a billing party generates an electronic bill according to bill information, and after the electronic bill passes through the billing stage, the block link points add bill state information indicating that the electronic bill is in a state of having been made to the bill information.
The reimbursement stage is a stage in which a consumer applies for reimbursement to an reimbursement enterprise according to the electronic bill, and corresponding resources are transferred to the consumer according to the resource transfer share in the electronic bill after the reimbursement enterprise checks the electronic bill. When the electronic bill goes through the reimbursement stage, the block link points add bill status information indicating that the electronic bill is in the reimbursed status to the bill information.
The tax return stage refers to the stage of making out tax or making out tax according to the electronic bill. When the billing enterprise or the reimbursement enterprise finishes tax payment, the block link points add bill state information indicating that the electronic bill is in the tax payment state to the bill information.
The bill information is information used for generating the electronic bill and can comprise an identifier of a biller, an identifier of the electronic bill, an identifier of a receiver and a resource transfer share, and bill state information of the electronic bill. The electronic bill identification is used for uniquely identifying one electronic bill, and specifically can comprise a bill code and a bill number of the electronic bill.
The invoicing party identifier is an identifier corresponding to a party issuing the electronic bill and is used for uniquely identifying the invoicing party. The invoicing party may be a selling enterprise, and the invoicing party needs to provide a consumption certificate, i.e. an electronic bill, for the consumer when selling goods, providing services or engaging in other business activities. The invoicing party identification can be specifically a name of a seller, a taxpayer identification number of the seller, an account number of the seller for opening an account, and the like.
The receiver identification is used for uniquely identifying the electronic bill receiver. The recipient may in particular be a consuming individual or a consuming enterprise. After the consuming person or the consuming enterprise consumes at the selling enterprise, the selling enterprise can provide the consuming person or the consuming enterprise with the consumption certificate, namely the electronic bill. The receiver identification may specifically be a name of the purchaser, a taxpayer identification number of the purchaser, or an account number of the purchaser. A resource transfer share is a specific share of a resource consumed by a consumer.
The bill status information of the electronic bill may include bill status information that the electronic bill is in an issued status, bill status information that the electronic bill is in a reimbursed status, bill status information that the electronic bill is in a tax reimbursed status, and the like. When the electronic bill is in different circulation stages, the bill state information of the electronic bill acquired by the block link points is different. For example, when the electronic bill is in the billing stage, correspondingly, the bill state information of the electronic bill is information indicating that the electronic bill is in the billing state; when the electronic bill is in the reimbursement stage, correspondingly, the bill state information of the electronic bill is information indicating that the electronic bill is in the reimbursement state; when the electronic bill is in the tax declaring stage, correspondingly, the bill state information of the electronic bill is information indicating that the electronic bill is in the tax declaring state.
A blockchain node is a data processing node in a blockchain network. A blockchain network is a carrier and organization way to run blockchain technology. A Blockchain technology, BT (block chain technology) for short, also called a distributed book technology, is an internet database technology, and is characterized by decentralization, openness and transparency, so that everyone can participate in data recording. The blockchain technology is a brand new distributed infrastructure and computing mode that uses blockchain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, uses cryptography to secure data transmission and access, and uses intelligent contracts composed of automated script codes to program and manipulate data.
Specifically, at each circulation stage in the circulation process of the electronic bills, the block chain node can acquire the bill information of the electronic bills at the circulation stage and correspondingly generate the electronic bill inquiry code of the electronic bills at the circulation stage.
In one embodiment, in each circulation stage of the electronic bill circulation process, such as a billing stage, an reimbursement stage and a tax return stage, the block link points corresponding to each circulation stage can respectively acquire the bill information of the corresponding circulation stage.
For example, in the billing stage, the billing party device may generate the ticket information according to the identifier of the billing party, the identifier of the electronic ticket associated with the identifier of the billing party and in the unused state, the identifier of the receiving party, the resource transfer share, and the ticket state information of the electronic ticket in the invoiced state, and send the ticket information to the block chain node corresponding to the billing party device. And the block chain link points corresponding to the invoicing side equipment acquire the bill information of the electronic bill in the invoicing stage and generate the electronic bill invoicing inquiry code of the electronic bill in the invoicing stage.
In the reimbursement stage, an electronic bill public server for storing electronic bill service is provided for consumers, and updated bill information can be sent to the block link points corresponding to the electronic bill public server; the updated bill information includes bill status information indicating the reimbursed status. And acquiring the bill information of the electronic bill in the reimbursement stage by the block link points corresponding to the electronic bill public server, and generating an electronic bill reimbursement inquiry code of the electronic bill in the reimbursement stage.
In the tax return stage, for the tax payment enterprise, after the tax payment enterprise receives the tax according to the regulation, the tax payment side equipment sends the updated bill information to the block chain node corresponding to the tax payment side equipment; the updated bill information comprises bill state information which represents the tax declaration state of the tax payer. Wherein, the tax payment enterprise can be an invoicing enterprise or a reimbursement enterprise. That is, after the billing enterprise receives the tax according to the rule, the billing information added with the tax payment information of the billing party is reported to the block link point corresponding to the billing party, the block link point corresponding to the billing party acquires the billing information of the electronic bill at the tax payment node, and the tax payment inquiry code of the electronic bill is generated. When the reimbursement enterprise receives the tax according to the rule, reporting the bill information added with the tax information of the receiver to the block link point corresponding to the reimbursement enterprise, acquiring the bill information of the electronic bill at the tax return node by the block link point corresponding to the reimbursement enterprise, and generating the tax return inquiry code of the electronic bill.
In one embodiment, the block nodes can perform hash operation on the ticket information through a hash algorithm to obtain the electronic ticket inquiry code corresponding to the electronic ticket at each circulation stage. Examples of the Hash Algorithm include MD5 (Message Digest Algorithm, fifth version of Message Digest Algorithm), SHA1 (Secure Hash Algorithm), SHA2, and the like, which are not limited in this embodiment.
In one embodiment, the block chain node can encrypt the bill information by adopting an encryption algorithm in each circulation stage of the electronic bill to obtain a bill ciphertext. And generating a corresponding electronic bill inquiry code according to the bill ciphertext. Among them, the encryption algorithm, such as symmetric encryption algorithm and asymmetric encryption algorithm, etc. A symmetric Encryption Algorithm, such as DES (Data Encryption Standard), AES (Advanced Encryption Standard), IDEA (International Data Encryption Algorithm), and the like. Asymmetric cryptographic algorithms, such as RSA (Rivest, shamir, adleman, cryptographic Algorithm), DSA (Digital Signature Algorithm), or ECC (Elliptic curve cryptography), etc.
In one embodiment, at each stage of the electronic ticket circulation process, the blockchain node can directly use the ticket hash value as the electronic ticket inquiry code. In another embodiment, the blockchain node may return the ticket hash value to the source of the ticket information, and after receiving the signature data including the private key of the source and passing the verification, generate the electronic ticket query code corresponding to each forwarding stage according to the ticket hash value and the signature data including the signature of the private key of the source of the ticket information.
The source of the bill information is different in each transfer stage in the transfer process of the electronic bill, for example, in the billing stage, the source of the bill information is a billing enterprise; in the reimbursement stage, the source of the bill information is the consumer (also can be an electronic bill public server for providing electronic bill storage service for the consumer); in the tax return stage, when the invoicing enterprise returns the tax, the source of the bill information is the invoicing enterprise, and when the invoicing enterprise returns the tax, the source of the bill information is the reimbursement enterprise.
S204, correspondingly recording the bill information of the electronic bill in each circulation stage and the corresponding electronic bill query code into the block chain network.
Specifically, at each circulation stage in the circulation process of the electronic bills, the block chain node can associate and write the bill information of the electronic bills at each circulation stage and the corresponding electronic bill query code into the data block. The data block is a storage module for storing data in the block chain network.
In one embodiment, at each circulation stage in the circulation process of the electronic bill, the blockchain nodes send the corresponding bill information to other blockchain nodes in the blockchain network before generating the electronic bill inquiry code, and after the blockchain nodes reach consensus, the blockchain nodes generate the electronic bill inquiry code. At this time, the block chain node can write the bill information of the current circulation stage and the corresponding electronic bill inquiry code into the data block in an associated manner when a new block is generated.
In one embodiment, in each transfer stage of the electronic bill transfer process, after generating the electronic bill query code, the block chain node may send the bill information and the electronic bill query code of the current transfer stage to other block chain nodes in the block chain network in a correlated manner, and after the block chain nodes reach a consensus, the block chain node writes the bill information and the corresponding electronic bill query code of the current transfer stage into the data block in a correlated manner.
Common consensus algorithms in the blockchain network include POW (Proof of Work), POS (Proof of rights ), DPOS (cleared Proof of rights, proof of rights of commission), PBFT (Practical Byzantine Fault Tolerance algorithm), and the like.
The consensus algorithm used in one particular embodiment is specifically a consensus algorithm (Bft-Raft) based on a consensus algorithm (e.g., raft) and a Bzantine fault-tolerant algorithm (e.g., bft). Of course, other consensus algorithms may be adopted in other embodiments of the present invention, and the embodiments of the present invention are not limited herein.
For example, FIG. 3 shows a schematic diagram of the consensus algorithm in one embodiment. Referring to fig. 3, a Client (Client, specifically, a blockchain electronic invoice application platform as shown in fig. 9) initiates a consensus Request (Request) and sends the consensus Request to a blockchain node (master node Leader a) in a leading state. And the block chain nodes in the leader state are obtained by jointly electing each block chain link point in the block chain network. Continuing to enter an application Entity stage, broadcasting the consensus content (or intermediate data obtained after processing the consensus content) corresponding to the consensus request to other blockchain nodes (following nodes Follower B, follower C and Follower D \/8230) in the blockchain network which are not in a Leader state by the Leader A; continuing to enter an add Response stage, broadcasting the received consensus content to other block chain nodes by each slave node, entering a Commit stage when the consensus content broadcast by the other block chain nodes with the preset number (2f + 1) is received to be consistent, and feeding back the confirmation result to the master node by each slave node. And when the master node receives the feedback confirmation of other block link points with the preset number (2f + 1), judging that the result of the consensus feedback (Reply) to the Client is completed. Wherein, 3f +1 is less than or equal to N, and N is the number of block chain nodes in the block chain network. f is the number of bad blockchain nodes in the blockchain network.
In the following, the specific embodiment of the present disclosure is described as an example, in each flow stage of the electronic bill flow process, the source of the bill information uploads the bill information to the block chain node, that is, the bill information is intended to be written into the data block in the block chain network, and the bill information needs to be written into the data block, that is, an event that needs to achieve consensus is required. When the blockchain node corresponding to the source side of the ticket information is the blockchain node in the leader state, the blockchain node broadcasts the event needing to achieve the consensus to other blockchain nodes in the blockchain network.
After receiving the event needing to achieve the consensus, the blockchain nodes which are not in the leader state broadcast the received event needing to achieve the consensus to other blockchain nodes in the blockchain network. In this way, each block link point in the block chain network enters a confirmation stage when receiving the data broadcast by the preset number of other block chain nodes and being consistent, so as to prevent the cheating behavior of the block chain node in the leading state. And feeding back the confirmation result to the block chain nodes in the leading state after the confirmation is finished, judging that the consensus is finished on the event needing to be achieved when the block chain nodes in the leading state receive the feedback confirmation of the preset number of other block chain nodes, and writing the data corresponding to the event achieving the consensus into the data block by the block chain nodes.
When the block link point corresponding to the source of the ticket information is not the block link point in the leader state, the event needing to achieve consensus is forwarded to the block link node in the leader state, and the block link point in the leader state dominates the consensus process according to the previous steps. And the block chain nodes in the leader state are obtained by jointly electing each block chain link point in the block chain network.
S206, receiving a tracing inquiry command about the electronic bill; the tracing query instruction carries the electronic bill query code of the electronic bill at any circulation stage.
Specifically, the block link point can receive a tracing query instruction about the electronic bill, and the tracing query instruction carries an electronic bill query code of the electronic bill at any circulation stage. For example, the tracing query instruction may carry an electronic bill billing query code corresponding to a billing stage, an electronic bill reimbursement query code corresponding to a reimbursement stage, or an electronic bill tax return query code corresponding to a tax return stage.
In one embodiment, the block link node receives a trace back query command forwarded by the electronic bill management server. Wherein, the forwarding step of the tracing inquiry instruction comprises the following steps: the electronic bill management server can provide a query page; the electronic bill management server receives a tracing query instruction triggered by the terminal, the tracing query instruction is triggered after the terminal logs in a query page through a user account, and the user account is distributed by the electronic bill management server; and the electronic bill management server forwards the tracing query instruction to the block link point corresponding to the electronic bill management server.
Wherein, the inquiry page is a page for inquiring the electronic bill. The query page may specifically be a Web (World Wide Web) page, a page exposed by an application, a page exposed by a sub-application running in a parent application, or the like. The user logs in the query page through the user account distributed by the electronic bill management server, and the tracing query instruction can be triggered through clicking, pressing or touching and other triggering operations after logging in. And the terminal forwards the tracing query instruction to the electronic bill management server, and the electronic bill management server forwards the tracing query instruction to the block link point corresponding to the electronic bill management server.
In one embodiment, the user may also enter the query page in guest form and trigger a query instruction at the query page. When the user inquires in the visitor mode, only the authenticity of the electronic bill can be inquired. The terminal can send the query instruction to the electronic bill management server and forwards the query instruction to the block link point corresponding to the electronic bill management server through the electronic bill management server. And inquiring the electronic bill corresponding to the electronic bill inquiry code in the block chain network by the block chain node. And when the electronic bill exists in the blockchain network, returning a query result indicating that the queried electronic bill is true. And when the electronic bill cannot be found in the block chain network, returning a query result indicating that the queried electronic bill is false.
In one embodiment, there may be a blockchain node in the blockchain network corresponding to the electronic bill management server, and the corresponding blockchain node may provide an Interface for data communication with the electronic bill management server, such as Development sdk (Software Development Kit) and api (Application Programming Interface) interfaces. And the electronic bill management server carries out data communication with the block link points by calling corresponding interfaces.
In the above embodiment, the tracing query instruction may be triggered only by logging in the query page through the user account allocated by the electronic bill management server, and the electronic bill management server accesses the block link points in the block chain network to trace the bill information of the query electronic bill. Therefore, the tracing inquiry authority can be managed and controlled by the electronic bill management server, the data safety of the electronic bill is guaranteed, and the tracing inquiry of the electronic bill is realized.
And S208, inquiring the bill information of the electronic bill in each circulation stage according to the electronic bill inquiry code carried by the tracing inquiry instruction.
Specifically, the block link point can search the bill information of the electronic bill in each circulation stage in the block link network by tracing the electronic bill search code carried by the search instruction.
For example, when the circulation stage that the electronic ticket has undergone includes the invoicing stage and the reimbursement stage, the ticket information corresponding to the invoicing stage and the reimbursement stage is recorded in the blockchain network. The bill information recorded in the billing stage includes bill state information indicating that the electronic bill is in a billing state. The bill information recorded in the reimbursement stage includes bill status information indicating that the electronic bill is in a reimbursed status. Therefore, the block link point can inquire the bill information of the electronic bill in the billing stage and the reimbursement stage through the electronic bill inquiry code.
In one embodiment, the block link point can associate the electronic bills in different circulation stages, so that the bill information of the electronic bills in each circulation stage can be inquired through the electronic bill inquiry code of the electronic bills in any circulation stage.
And S210, feeding back the inquired bill information.
Specifically, the blockchain node can feed back the bill information of the inquired electronic bill in each circulation stage to the inquirer. In one embodiment, when the block link point receives a tracing query command forwarded by the electronic bill management server, the bill information of the queried electronic bill at each circulation stage which is already passed through can be fed back to the electronic bill management server. And forwarding to the query terminal through the electronic bill management server, and displaying the queried bill information in a query page.
In one embodiment, the ticket information recorded in the blockchain network is encrypted ciphertext. The electronic bill management server stores a key for decrypting the corresponding electronic bill. The electronic bill management server can display the bill information of the plaintext in the query page after decrypting the ciphertext.
The data processing method for the electronic bill obtains the bill information of the electronic bill at each circulation stage in the circulation process of the electronic bill and correspondingly generates the electronic bill inquiry code of the electronic bill at the circulation stage. And correspondingly recording the bill information of the electronic bill in each circulation stage and the corresponding electronic bill query code into the block chain network, wherein the block chain network stores the related information of the electronic bill in each circulation stage. Furthermore, after receiving a tracing inquiry command carrying an electronic bill inquiry code, the method can inquire bill information of the electronic bill in each circulation stage in the block chain network according to the electronic bill inquiry code, so that the information of the electronic bill in each circulation stage is not cracked and unknown. Therefore, the bill information of the electronic bill at the experienced circulation stage can be searched retrospectively by accessing the block chain nodes in the block chain network, and the retrospective query of the electronic bill in the circulation process is realized.
In one embodiment, the data processing method for the electronic bill further comprises a step of determining query authority, wherein the step specifically comprises the steps of obtaining a user account carried by a trace-back query instruction after the trace-back query instruction is received; and determining the query authority corresponding to the user account. According to the electronic bill query code carried by the tracing query instruction, the step of querying the bill information of the electronic bill in each circulation stage comprises the following steps: and inquiring the bill information of the electronic bill in the experienced circulation stage specified by the inquiry authority according to the electronic bill inquiry code carried by the tracing inquiry instruction.
The user account is a login account distributed by the electronic bill management server for the user. The query permission is a permission to specify a query range. The inquiry authority can comprise the authority for inquiring the bill information of the electronic bill and the authority for inquiring the authenticity of the electronic bill; or the inquiry authority can also be an authority for inquiring the bill information of the electronic bill in the specified circulation stage, such as an authority for inquiring the bill information in the invoicing stage, an authority for inquiring the bill information in the invoicing stage and the tax return stage related to the invoicer, an authority for inquiring the bill information in the invoicing stage, the reimbursement stage and the tax return stage related to the receiver, and the like.
Specifically, the user can log in the query page through the user account and trigger the tracing query instruction. When the block chain node receives the tracing query instruction, the user account carried in the tracing query instruction can be extracted. The block chain node can pre-store the user account and the query authority corresponding to the user account. After the block chain node acquires the user account, the query authority corresponding to the user account can be determined, and the bill information of the electronic bill in the experienced circulation stage specified by the query authority is queried according to the electronic bill query code carried by the tracing query instruction.
In one embodiment, when the electronic bill management server allocates a user account, the user account may be bound with information such as a fixed IP (Internet Protocol, protocol for interconnection between networks) address, a terminal identifier, and the like. The terminal identifier is used for uniquely identifying the terminal, and specifically may be a Media Access Control (MAC) address or an International Mobile Equipment Identity (IMEI) of the terminal. After the block chain node acquires the user account, whether the IP address and the terminal identification carried by the tracing inquiry instruction are the bound IP address and the bound terminal identification or not can be verified. If yes, further determining the query authority of the user account, and if not, directly refusing to respond to the tracing query instruction.
In one embodiment, when the electronic bill management server distributes the user account, the electronic bill management server can also bind the user account with the user correspondingly. For example, when the terminal logs in the query page through the user account, the terminal can successfully log in only by inputting the corresponding biological characteristics of the user, such as fingerprint characteristics or face characteristics.
In one embodiment, the inquiry authority comprises an authority to inquire bill information of the electronic bill and an authority to inquire authenticity of the electronic bill. The electronic bill server may pre-configure a login account having a right to query the bill information of the electronic bill. The block link point can store the pre-configured login account number of the electronic bill server. And after receiving the tracing query instruction, the block chain node extracts a user account carried in the tracing query instruction. And comparing and searching the stored login account numbers by the block chain nodes, and inquiring the bill information of the electronic bills in the experienced circulation stage according to the electronic bill inquiry code carried by the tracing inquiry command when the user account number is the login account number. And when the user account is not a pre-stored login account, only returning the true and false query result of the electronic bill.
In one embodiment, querying the rights includes querying rights to specify ticket information for the electronic ticket at the stage of circulation. The electronic bill server can be configured with user accounts with different inquiry authorities in advance. The block chain node can correspondingly store the user account and the authority level corresponding to the user account. And after receiving the tracing query instruction, the block chain node extracts the user account carried in the tracing query instruction. And the block link points can determine the inquiry authority corresponding to the user account, and inquire the bill information of the electronic bill at the experienced circulation stage specified by the inquiry authority according to the electronic bill inquiry code carried by the tracing inquiry command. For example, when the query authority corresponding to the user account specifies and queries the bill information of the invoicing stage and the tax declaring stage related to the invoicer, the block chain node queries the bill information in the specified circulation stage.
In the above embodiment, the query authority corresponding to the user account is determined by tracing the user account carried by the query instruction, so that the bill information of the electronic bill in the experienced circulation stage specified by the query authority can be queried according to the electronic bill query code carried by the trace query instruction. Therefore, the query content is limited by the query authority, the query operation can be controlled more finely, and the protection of the electronic bill data can be enhanced.
In one embodiment, the trace-back query instruction carries a user account, and the data processing method for the electronic bill further includes a step of recording a bill query record, which specifically includes:
s402, generating a bill inquiry record comprising the user account and the electronic bill inquiry code.
Specifically, after the block link point receives the tracing query instruction, the user account and the electronic bill query code carried in the tracing query instruction can be extracted. And the block chain node can generate a bill query record according to the correlation of the extracted user account and the electronic bill query code.
In one embodiment, when the block link point receives the trace-back query instruction, the block link point may further record information such as the current time, the IP address carried by the trace-back query instruction, and the terminal identifier. And recording the current time, IP address, terminal identification and other information, the user account and the electronic bill inquiry code into a bill inquiry record together.
And S404, recording the bill inquiry in the block chain network for consensus.
Specifically, a block chain link point corresponding to the electronic bill management server in the block chain network receives the tracing query instruction and generates a bill query record. And the block chain node corresponding to the electronic bill management server transmits the bill query record to other block chain nodes in the block chain network for consensus. Specifically, the consensus algorithm in step S204 can be referred to as a consensus algorithm, which is not described herein again.
S406, after the consensus is completed, writing the bill query record into the block chain network; the bill inquiry record is used for inquiring historical inquiry behaviors of the electronic bill.
Specifically, when the consensus is completed, the blockchain node may write the ticket query record into the data block. The ticket query record written into the data block is used for querying the historical query behavior of the electronic ticket. Therefore, related units or departments can retrieve the bill query records in a mode of accessing the block chain network so as to query the historical query behaviors about the electronic bills, and further can analyze the recorded historical query behaviors.
In the above embodiment, the ticket query record including the user account and the electronic ticket query code is generated, the ticket query record is written into the blockchain network, and the historical query behavior for the electronic ticket can be recorded, so that the subsequent analysis of the historical query behavior is facilitated.
In an embodiment, step S210, that is, feeding back the queried ticket information specifically includes: integrating the inquired bill information of each circulation stage into the same electronic bill; feeding back the integrated electronic bill; the fed-back electronic ticket is used for presenting each circulation stage that the electronic ticket goes through.
Specifically, after inquiring the ticket information of each circulation stage that the electronic ticket has undergone, the blockchain node integrates the inquired ticket information of each circulation stage into the same electronic ticket, so that the integrated electronic ticket can present each circulation stage that the electronic ticket has undergone. And feeding back the integrated electronic bill in response to the tracing query instruction.
In one embodiment, the bill information of each circulation stage comprises the same information such as the identifier of the invoicing party, the identifier of the receiving party, the identifier of the electronic bill and the resource transfer share. The bill information of each circulation stage further includes bill state information corresponding to each circulation stage, such as bill state information indicating that the electronic bill is in an issued state, bill state information indicating that the electronic bill is in a reimbursed state, bill state information indicating that the electronic bill is in a tax reimbursed state, and the like. The block chain node can integrate the same information such as the invoicing party identifier, the receiver identifier, the electronic bill identifier, the resource transfer share and the like in the bill information of each circulation stage and different bill state information to obtain the electronic bill comprising the bill state information corresponding to each circulation stage of the electronic bill.
In the above embodiment, the inquired bill information of each circulation stage is integrated into the same electronic bill, and the feedback can present the electronic bill of each circulation stage that the electronic bill experiences, so that the most complete current electronic bill can be inquired by tracing the inquiry instruction, and each circulation stage that the electronic bill experiences in the whole life cycle can be traced.
In one embodiment, when the circulation stage comprises a billing stage, the electronic ticket inquiry code comprises an electronic ticket billing inquiry code, and the ticket information comprises a billing party identifier, an electronic ticket identifier, a receiving party identifier and a resource transfer share.
Specifically, when the circulation stage includes an invoicing stage, the block chain node corresponding to the invoicing party can acquire the bill information sent by the invoicing party device, and perform hash operation on the bill information through a hash algorithm to obtain a hash value of the bill. The blockchain node corresponding to the invoicer can send the ticket hash value to the invoicer device corresponding to the invoicer identifier. And after receiving the ticket hash value, the invoicer device signs the ticket hash value by adopting a private key of the invoicer device to obtain signature data, and the signature data is transmitted back to the block chain node. And the block chain node point corresponding to the invoicing party receives the signature data returned by the invoicing party equipment, and verifies the signature data through the invoicing party public key locally stored in the block chain node point. And after the signature data passes the verification, performing hash operation on the hash value of the bill and the signature data to generate an electronic bill billing inquiry code.
After the block chain node generates the electronic bill billing inquiry code, the bill information and the electronic bill billing inquiry code can be associated to generate the electronic bill. The block chain node corresponding to the invoicer can write the generated electronic bill into the data block. The electronic bill billing inquiry code can be regarded as an index of the electronic bill and is used for searching the corresponding electronic bill.
In one embodiment, there may be blockchain nodes in the blockchain network that correspond to the invoicer device, which may provide interfaces for data communications with the invoicer device, such as developing sdk and api interfaces.
In one embodiment, when the electronic bill management server distributes the electronic bill identification for the billing enterprise, the billing party identification and the electronic bill identification can be written into the data block in an associated mode. Thus, after the electronic bill identification is distributed, a query can be made from the block chain network as to which business the electronic bill identification is distributed to and whether the corresponding electronic bill is issued.
In the above embodiment, when the circulation node includes the billing stage, the ticket information is acquired, the corresponding electronic ticket billing query code is generated according to the ticket information, and the ticket information and the electronic ticket billing query code are written into the data block in an associated manner, so that the ticket information that has passed through the billing stage can be recorded in the block chain network, and the electronic ticket can be conveniently traced and queried.
In one embodiment, when the circulation stage comprises an reimbursement stage, the electronic ticket reimbursement code comprises an electronic ticket reimbursement query code; step S202, that is, the step of acquiring the bill information of the electronic bill in the circulation stage at each circulation stage in the circulation process of the electronic bill, and correspondingly generating the electronic bill inquiry code of the electronic bill in the circulation stage specifically includes the following steps:
s502, in the reimbursement stage, receiving a bill information updating request; the bill information update request carries an electronic bill and a recipient identification.
Specifically, during the reimbursement phase, the block link point may receive a ticket information update request from an electronic ticket public server. Wherein, the bill information updating request carries the electronic bill and the receiver identification.
In one embodiment, a consumer submits an reimbursement document including an electronic ticket issuing inquiry code to an reimbursement enterprise. And the reimbursement enterprise acquires the corresponding electronic bill from the block chain network according to the electronic bill billing inquiry code and checks the reimbursement bill according to the acquired electronic bill. And after the reimbursement bill is checked, the reimbursement enterprise transfers resources according to the reimbursement bill. When the resource transfer is successful, the electronic bill public server for storing the electronic bill of the consumer can send a bill information updating request to the block link point corresponding to the electronic bill public server.
In one embodiment, there may be a blockchain node in the blockchain network that corresponds to the electronic ticket utility server, and the corresponding blockchain node may provide an interface for data communication with the electronic ticket utility server, such as developing sdk and api interfaces.
S504, the resource transfer record corresponding to the receiver identification is inquired.
In one embodiment, the reimbursement enterprise may generate a resource transfer record based on the reimbursement document and upload the resource transfer record to a blockchain node in the blockchain network. The resource transfer record comprises the reimbursed electronic ticket. When receiving a bill information updating request, the block chain link point corresponding to the electronic bill public server extracts a receiver identifier carried in the bill information updating request, and inquires a resource transfer record corresponding to the receiver identifier in the block chain link point.
S506, the electronic bill is checked according to the resource transfer record.
Specifically, the block chain node corresponding to the electronic bill public server can check whether the electronic bill has been reimbursed according to the resource transfer record, and when the electronic bill is confirmed to be reimbursed, the block chain node indicates that the electronic bill passes the verification.
And S508, after the electronic bill passes the verification, updating the reimbursed state into the bill information of the electronic bill, and generating an electronic bill reimbursement inquiry code according to the updated bill information.
Specifically, after the electronic bill passes the verification, the block chain node corresponding to the electronic bill public server can update the bill status information which represents the reimbursed status into the bill information of the electronic bill, and generate the electronic bill reimbursement inquiry code according to the updated bill information.
In one embodiment, the block link point corresponding to the electronic ticket public server performs hash operation on the updated ticket information through a hash algorithm to obtain a ticket hash value, and sends the ticket hash value to the electronic ticket public server. And after receiving the ticket hash value, the electronic ticket public server signs the ticket hash value by adopting a locally stored consumer private key to obtain signature data, and transmits the signature data back to the block chain node. And the block chain node point corresponding to the electronic bill public server receives the signature data returned by the electronic bill public server, and verifies the signature data through a consumer public key locally stored in the block chain node point. And after the signature data passes the verification, performing hash operation on the hash value of the bill and the signature data to generate an electronic bill reimbursement inquiry code.
In one embodiment, when the electronic bill passes through the reimbursement phase, the electronic bill public server can update the reimbursement status into the bill information of the electronic bill and send the updated bill information to the block link points corresponding to the electronic bill public server in the block chain network to write the updated bill information into the data blocks.
In the above embodiment, when the transfer node includes a reimbursement stage, the transfer node receives a bill information update request carrying an electronic bill and a receiver identifier, checks the electronic bill according to a resource transfer record corresponding to the receiver identifier, and updates a reimbursed state to bill information of the electronic bill after the electronic bill passes the checking. Therefore, after the electronic bill is subjected to the reimbursement stage, the information including the reimbursement state can be recorded into the block chain network, and the electronic bill can be conveniently traced and inquired.
In one embodiment, when the circulation phase comprises a tax return phase, the electronic bill inquiry code comprises an electronic bill tax return inquiry code; step S202, that is, the step of acquiring the bill information of the electronic bill in the circulation stage at each circulation stage in the circulation process of the electronic bill, and correspondingly generating the electronic bill inquiry code of the electronic bill in the circulation stage specifically includes the following steps:
s602, receiving a bill information updating request in a tax declaring stage; the bill information updating request carries an electronic bill and a tax declaring party identifier.
Specifically, in the tax return phase, the block link point corresponding to the tax return can receive the bill information update request initiated from the tax return terminal. The bill information updating request carries the electronic bill and the tax declaring party identification. When the billing enterprise carries out corresponding tax declaring and taxpaying according to the electronic bill, the tax declaring party mark is the billing party mark; and when the reimbursement enterprise performs corresponding tax reimbursement and tax payment according to the electronic bill, the identifier of the tax reimburser is the identifier of the receiver.
In one embodiment, after the tax declaring party carries out corresponding tax payment according to the tax declaring amount calculated according to the electronic bill, a bill information updating request can be sent to the block chain node corresponding to the tax declaring party.
In one embodiment, after the tax return party can carry out corresponding tax payment according to the tax payment amount calculated according to the electronic bill, the electronic bill management server can upload the tax payment record corresponding to the tax return party identification to the block chain node in the block chain network.
And S604, inquiring the tax payment record corresponding to the receiver identification.
Specifically, the blockchain node corresponding to the tax return can inquire tax payment records corresponding to the tax return amount and the tax return identification which are paid from the blockchain network, wherein the tax payment records are uploaded to the blockchain network through the electronic bill management server.
And S606, checking the electronic bill according to the tax payment record.
Specifically, when the tax payment record is queried by the blockchain node corresponding to the tax payer, the electronic bill can be checked according to the tax payment record. When the electronic bill is found in the tax payment record, the electronic bill is proved to have been subjected to the tax payment stage. It will be appreciated that for the same electronic ticket, the invoicing and receiving parties can each calculate the tax amount based on the electronic ticket. That is, when the electronic ticket is included in the tax payment record corresponding to the invoicing party identifier, it indicates that the electronic ticket has been subjected to the tax return stage for the invoicing enterprise. When the tax payment record corresponding to the receiver identification comprises the electronic bill, the electronic bill is indicated to have undergone a tax payment stage for the reimbursement enterprise.
And S608, after the electronic bill passes the verification, updating the tax declared state into the bill information of the electronic bill, and generating the tax declaring inquiry code of the electronic bill according to the updated bill information.
Specifically, after the electronic bill is checked, the blockchain node corresponding to the tax declaring party can update the tax declared state and/or the tax declaring party identification to the bill information of the electronic bill, and generate an electronic bill tax declaring query code according to the updated bill information.
In one embodiment, the block link point corresponding to the tax return performs hash operation on the updated bill information through a hash algorithm to obtain a bill hash value, and sends the bill hash value to the tax return equipment. And after receiving the bill hash value, the tax declaring party equipment signs the bill hash value by using a locally stored private key of the tax declaring party to obtain signature data, and transmits the signature data back to the block chain node. And the block chain node point corresponding to the tax declaring party receives the signature data returned by the tax declaring party equipment, and verifies the signature data through a tax declaring party public key locally stored in the block chain node point. And after the signature data passes the verification, performing hash operation on the hash value of the bill and the signature data to generate the tax declaration inquiry code of the electronic bill.
In one embodiment, when the electronic bill passes through the tax return stage, the electronic bill management server can update the tax return state into the bill information of the electronic bill and send the updated bill information to the block link point in the block chain network so as to write the updated bill information into the data block.
In the above embodiment, when the circulation node includes the tax declaring stage, the bill information update request carrying the electronic bill and the tax declaring party identifier is received, the electronic bill is checked according to the tax payment record corresponding to the tax declaring party identifier, and when the electronic bill passes the check, the tax declared state is updated to the bill information of the electronic bill. Therefore, after the electronic bill is subjected to the tax declaring stage, the information including the tax declared state can be recorded into the block chain network, so that the electronic bill can be conveniently traced and inquired.
As shown in fig. 7, in a specific embodiment, the data processing method for electronic tickets includes the steps of:
s702, acquiring bill information of the electronic bill in the circulation stage at each circulation stage in the circulation process of the electronic bill, and correspondingly generating an electronic bill inquiry code of the electronic bill in the circulation stage.
S704, correspondingly recording the bill information of the electronic bill in each circulation stage and the corresponding electronic bill inquiry code into the block chain network.
S706, receiving a tracing query instruction forwarded by the electronic bill management server; the tracing query instruction carries an electronic bill query code of the electronic bill at any circulation stage and a user account.
And S708, determining the query authority corresponding to the user account.
And S710, inquiring the bill information of the electronic bill in the experienced circulation stage specified by the inquiry authority according to the electronic bill inquiry code carried by the tracing inquiry instruction.
And S712, integrating the inquired bill information of each circulation stage into the same electronic bill.
S714, feeding back the integrated electronic bill; the fed-back electronic ticket is used for presenting each circulation stage that the electronic ticket goes through.
And S716, generating a bill inquiry record comprising the user account and the electronic bill inquiry code.
And S718, recording the bill inquiry in the block chain network for consensus.
S720, after the consensus is completed, writing the bill query record into the block chain network; the bill inquiry record is used for inquiring historical inquiry behaviors of the electronic bill.
In the data processing method related to the electronic bill, the bill information of the electronic bill is acquired at each circulation stage in the circulation process of the electronic bill, and the electronic bill inquiry code of the electronic bill at the circulation stage is correspondingly generated. And correspondingly recording the bill information of the electronic bill in each circulation stage and the corresponding electronic bill query code into the block chain network, wherein the block chain network stores the related information of the electronic bill in each circulation stage. Furthermore, after a tracing inquiry instruction carrying the electronic bill inquiry code is received, the bill information of the electronic bill in each circulation stage which is already passed through by the electronic bill can be inquired in the block chain network according to the electronic bill inquiry code, so that the information of the electronic bill in each circulation stage is not split and unknown. Therefore, the bill information of the electronic bill at the experienced circulation stage can be searched retrospectively by accessing the block chain nodes in the block chain network, and the retrospective query of the electronic bill in the circulation process is realized.
Fig. 7 is a flowchart illustrating a data processing method for an electronic ticket according to an embodiment. It should be understood that, although the steps in the flowchart of fig. 7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 7 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In a specific application scene, the electronic bill is a block chain electronic invoice; the electronic bill identification is a block chain electronic invoice number; the invoicing party identifier is an enterprise identifier; the receiver identification is an enterprise identification.
The block chain electronic invoice is an electronic invoice processed based on a block chain technology. The blockchain electronic invoice number may specifically include an invoice code and an invoice number. The enterprise identifier is used for uniquely identifying an enterprise, and can be a unique identifier distributed to the enterprise by a tax bureau after the enterprise is registered by the tax bureau. The electronic bill management server may specifically be a server corresponding to a tax bureau.
Referring to fig. 8, fig. 8 shows a logical relationship diagram of the electronic ticket at each circulation stage in one embodiment. First, a consumer may submit an invoice request through an applet or server running on a mobile terminal. And the merchant, namely the invoicing party audits the invoicing information submitted by the consumer, sends the billing information to the block chain nodes in the block chain network after the audit is finished, and generates the block chain electronic invoice through the block chain nodes. The merchant may deliver the blockchain electronic invoice to the consumer, who may use an electronic ticketing utility, such as a WeChat, hosting blockchain electronic invoice. Meanwhile, the consumer can log in the WeChat application through the user identification and inquire the block chain electronic invoice from the block chain network through WeChat.
In the reimbursement phase, the consumer may sort and submit reimbursement documents including blockchain electronic invoices through the WeChat application. After receiving the reimbursement bill, the enterprise (i.e., reimbursement enterprise) may query the corresponding blockchain electronic invoice from the blockchain network, check the reimbursement bill according to the queried blockchain electronic invoice, and perform resource transfer after the checking is completed. When the resource transfer is successful, the reimbursement enterprise can trigger the reimbursement status of the block chain electronic invoice to be updated.
In the tax return stage, both the merchant and the enterprise (i.e. the invoicing party and the receiving party) can return tax to the tax bureau according to the corresponding block chain electronic invoice and pay tax according to the tax amount. After completing tax payment, the tax bureau uploads the corresponding tax paid status to the blockchain node to record the tax paid status to the blockchain network.
Further, the tax bureau may assign some user accounts to relevant entities and departments, such as the court or public inspection institution. The units and departments can log in a query page through a user account number provided by a tax bureau to perform detailed query of the block chain electronic invoice. For example, the query page may be logged in through an application, such as a service number or applet. And the block chain node inquires the bill information of the block chain electronic invoice in each passing stage and feeds back the inquired bill information by receiving a tracing inquiry instruction of the electronic bill inquiry code carrying the block chain electronic invoice in any passing stage according to the electronic bill inquiry code.
Referring to FIG. 9, a deployment diagram of a data processing system for electronic tickets in a particular embodiment. In a specific block chain electronic invoice application scenario, referring to fig. 9, a block chain network includes at least 4 block chain nodes to form a federation chain, which are respectively a block chain node corresponding to a tax office server, a block chain node corresponding to an invoicing enterprise, a block chain node corresponding to an electronic invoice utility server, and a block chain node corresponding to an reimbursement enterprise. Typically, the devices of each role interact with the corresponding tile link points. The electronic bill public server is used for storing the issued block chain electronic invoices for the consumers, and can be a WeChat server and the like.
On one hand, the tax office server provides access interfaces (internal interfaces for tax office terminals and external interfaces for enterprise users) for the equipment of each role to access through the reverse proxy service, hosts the identity keys of each role and manages the characteristic data of each role. On the other hand, data of the blockchain network (or data to be written after consensus) is synchronously written in from the blockchain network module in the corresponding blockchain node through a synchronization tool in real time so as to query and count the blockchain electronic invoice related data of each role.
On one hand, each block link point in the block chain network provides an access interface for corresponding equipment to access through reverse proxy service (for example, equipment of an reimbursement enterprise accesses the block link point corresponding to the reimbursement enterprise, etc.). On the other hand, the data sent by the corresponding device through the reverse proxy service is received through the blockchain electronic invoice application platform (for example, the device of the reimbursement enterprise uploads the data to the blockchain link point corresponding to the reimbursement enterprise, that is, the data is transmitted to the blockchain electronic invoice application platform through an interface provided by the reverse proxy service, and the like). The blockchain electronic invoice application platform then transmits the data to the blockchain network module. The block chain network modules of each block chain node jointly form a consensus network, and after consensus is achieved in the consensus network, data is written into the block chain network modules. The blockchain node also comprises a cache database used for caching various data, such as an enterprise public key obtained from a system center server.
The deployment map may further include a block chain network module system central server, which stores the mapping between the enterprise identification and the public key of each enterprise, is isolated from the tax office server, and is mainly used for identity authentication (e.g., only the tax office is restricted to issue invoices, and constraint conditions related to the enterprise are changed). Subsequent operations which need to be centralized are uniformly put into the central server of the system to be executed.
The reverse proxy service may specifically be nginx. The block chain electronic invoice application platform realizes the main business logic of the block chain electronic invoice, and exposes and develops sdk and api interfaces for a third party to interact through reverse proxy service access. The blockchain network module can be specifically realized based on the Tencent underlay blockchain technology (trustSQL). The cache region can be specifically realized by a mysql database. It is to be understood that the present embodiments are for illustration and not intended to limit the implementations employed in specific implementations.
In a specific application scenario, the electronic ticket may specifically be a blockchain electronic invoice, the electronic ticket management server may specifically be a tax office server, the invoicing party device may specifically be a terminal or a server corresponding to an electronic ticket invoicing party (an electronic ticket submitting party), and the electronic ticket public server may specifically be a public storage service for providing an electronic ticket originating from a blockchain link point, such as a wechat server. It can be understood that the billing enterprise can be used as an electronic bill billing party to make an electronic bill and can also be used as an electronic bill reporting party to reimburse the electronic bill.
As shown in fig. 10, in one embodiment, there is provided a data processing apparatus 1000 regarding an electronic ticket, including: an acquisition module 1001, a recording module 1002, a receiving module 1003, a query module 1004, and a feedback module 1005.
The obtaining module 1001 is configured to obtain the ticket information of the electronic ticket at the transfer stage at each transfer stage in the transfer process of the electronic ticket, and correspondingly generate the electronic ticket inquiry code of the electronic ticket at the transfer stage.
The recording module 1002 is configured to correspondingly record the ticket information of the electronic ticket at each circulation stage and the corresponding electronic ticket query code in the blockchain network.
A receiving module 1003, configured to receive a tracing query instruction about an electronic bill; the tracing inquiry command carries the electronic bill inquiry code of the electronic bill at any circulation stage.
The query module 1004 is configured to query the ticket information of the electronic ticket at each circulation stage according to the electronic ticket query code carried by the trace-back query instruction.
And a feedback module 1005 for feeding back the inquired bill information.
In one embodiment, the receiving module 1003 is further configured to receive the tracing query instruction forwarded by the electronic bill management server.
In one embodiment, the data processing apparatus 1000 regarding electronic tickets further includes a determination module 1006.
The obtaining module 1001 is further configured to obtain a user account carried by the tracing query instruction after receiving the tracing query instruction.
The determining module 1006 is configured to determine a query right corresponding to the user account.
The query 1004 module is further configured to query, according to the electronic bill query code carried by the trace-back query instruction, bill information of the electronic bill at a circulation stage that has been experienced and is specified by the query authority.
Referring to fig. 11, in one embodiment, the trace back query instruction carries a user account; the data processing apparatus 1000 on electronic tickets further includes a generation module 1007 and a consensus module 1008.
A generating module 1007, configured to generate a ticket query record including the user account and the electronic ticket query code.
And a consensus module 1008, configured to perform consensus on the ticket query record in the blockchain network.
The recording module 1002 is further configured to write the ticket query record into the blockchain network after the consensus is completed; the bill inquiry record is used for inquiring historical inquiry behaviors of the electronic bill.
In one embodiment, the feedback module 1005 is further configured to integrate the queried ticket information of each circulation stage into the same electronic ticket; feeding back the integrated electronic bill; the fed-back electronic ticket is used for presenting each circulation stage that the electronic ticket goes through.
In one embodiment, when the circulation stage comprises a billing stage, the electronic ticket inquiry code comprises an electronic ticket billing inquiry code, and the ticket information comprises a billing party identifier, an electronic ticket identifier, a receiving party identifier and a resource transfer share.
In one embodiment, when the circulation stage comprises an reimbursement stage, the electronic ticket reimbursement code comprises an electronic ticket reimbursement query code; the obtaining module 1001 is further configured to receive a request for updating the ticket information in the reimbursement phase; the bill information updating request carries an electronic bill and a receiver identification; inquiring a resource transfer record corresponding to the receiver identification; checking the electronic bill according to the resource transfer record; and after the electronic bill passes the verification, updating the reimbursed state into the bill information of the electronic bill, and generating an reimbursement inquiry code of the electronic bill according to the updated bill information.
In one embodiment, when the circulation phase comprises a tax return phase, the electronic ticket tax return inquiry code comprises an electronic ticket tax return inquiry code; the obtaining module 1001 is further configured to receive a bill information update request in a tax return stage; the bill information updating request carries an electronic bill and a tax declaring party identifier; inquiring tax payment records corresponding to the receiver identification; checking the electronic bill according to the tax payment record; and after the electronic bill passes the verification, updating the tax declared state into the bill information of the electronic bill, and generating an electronic bill tax declaring inquiry code according to the updated bill information.
The data processing device for the electronic bill obtains the bill information of the electronic bill at each circulation stage in the circulation process of the electronic bill and correspondingly generates the electronic bill inquiry code of the electronic bill at the circulation stage. And correspondingly recording the bill information of the electronic bill in each circulation stage and the corresponding electronic bill query code into the block chain network, wherein the block chain network stores the related information of the electronic bill in each circulation stage. Furthermore, after receiving a tracing inquiry command carrying an electronic bill inquiry code, the method can inquire bill information of the electronic bill in each circulation stage in the block chain network according to the electronic bill inquiry code, so that the information of the electronic bill in each circulation stage is not cracked and unknown. Therefore, the bill information of the electronic bill at the experienced circulation stage can be searched retrospectively by accessing the block chain nodes in the block chain network, and the retrospective query of the electronic bill in the circulation process is realized.
FIG. 12 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be block link point 130 in fig. 1. As shown in fig. 12, the computer device includes a processor, a memory, and a network interface connected by a system bus. The memory comprises a nonvolatile 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 that, when executed by the processor, causes the processor to implement a data processing method with respect to an electronic ticket. The internal memory may also store a computer program that, when executed by the processor, causes the processor to perform a data processing method with respect to the electronic ticket.
Those skilled in the art will appreciate that the architecture shown in fig. 12 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the data processing apparatus provided herein for electronic tickets may be implemented in the form of a computer program that is executable on a computer device such as that shown in fig. 12. The memory of the computer device may store therein various program modules constituting the data processing apparatus on electronic tickets, such as an acquisition module, a recording module, a reception module, a query module, and a feedback module shown in fig. 10. The computer program constituted by the respective program modules causes the processor to execute the steps in the data processing method on the electronic ticket of the respective embodiments of the present application described in the present specification.
For example, the computer device shown in fig. 12 may execute step S202 by the acquiring module in the data processing apparatus on the electronic ticket shown in fig. 10. The computer device may perform step S204 through the recording module. The computer device may perform step S206 through the receiving module. The computer device may perform step S208 through the query module. The computer device may perform step S210 through the feedback module.
In one embodiment, there is provided a computer device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of: acquiring bill information of the electronic bills in the circulation stage at each circulation stage in the circulation process of the electronic bills, and correspondingly generating an electronic bill inquiry code of the electronic bills in the circulation stage; correspondingly recording bill information of the electronic bill in each circulation stage and a corresponding electronic bill inquiry code into a block chain network; receiving a retrospective query instruction about the electronic bill; the tracing inquiry instruction carries an electronic bill inquiry code of the electronic bill at any circulation stage; inquiring bill information of the electronic bill in each passing stage according to the electronic bill inquiry code carried by the tracing inquiry command; and feeding back the inquired bill information.
In one embodiment, the computer program causes the processor when executing the step of receiving a trace back query instruction for an electronic ticket to specifically perform the steps of: and receiving the tracing inquiry instruction forwarded by the electronic bill management server. The forwarding step of the tracing query instruction comprises the following steps: the electronic bill management server provides a query page; the electronic bill management server receives a tracing query instruction triggered by a terminal, wherein the tracing query instruction is triggered by the terminal after logging in a query page by a user account, and the user account is distributed by the electronic bill management server; and the electronic bill management server forwards the tracing query instruction to the block link point corresponding to the electronic bill management server.
In one embodiment, the computer program causes the processor to further perform the steps of: after receiving the tracing query instruction, acquiring a user account carried by the tracing query instruction; determining a query authority corresponding to a user account; according to the electronic bill inquiry code carried by the tracing inquiry instruction, inquiring the bill information of the electronic bill in each circulation stage comprises the following steps: and inquiring the bill information of the electronic bill in the experienced circulation stage specified by the inquiry authority according to the electronic bill inquiry code carried by the tracing inquiry instruction.
In one embodiment, the tracing query instruction carries a user account; the computer program causes the processor to further perform the steps of: generating a bill query record comprising a user account and an electronic bill query code; recording the bill query in a block chain network for consensus; when the consensus is completed, writing the bill query record into the block chain network; the ticket query record is used for querying historical query behaviors of the electronic ticket.
In one embodiment, the computer program causes the processor to specifically perform the following steps when performing the step of feeding back the queried ticket information: integrating the inquired bill information of each circulation stage into the same electronic bill; feeding back the integrated electronic bill; the fed-back electronic ticket is used for presenting each circulation stage that the electronic ticket goes through.
In one embodiment, when the circulation stage comprises a billing stage, the electronic ticket inquiry code comprises an electronic ticket billing inquiry code, and the ticket information comprises a billing party identifier, an electronic ticket identifier, a receiving party identifier and a resource transfer share.
In one embodiment, when the circulation stage comprises an reimbursement stage, the electronic ticket reimbursement code comprises an electronic ticket reimbursement query code; the computer program enables the processor to obtain the bill information of the electronic bill in the circulation stage when executing each circulation stage in the circulation process of the electronic bill, and specifically executes the following steps when correspondingly generating the electronic bill inquiry code of the electronic bill in the circulation stage: in the reimbursement stage, receiving a bill information updating request; the bill information updating request carries an electronic bill and a receiver identification; inquiring a resource transfer record corresponding to the receiver identification; checking the electronic bill according to the resource transfer record; and after the electronic bill passes the verification, updating the reimbursed state into the bill information of the electronic bill, and generating an reimbursement inquiry code of the electronic bill according to the updated bill information.
In one embodiment, when the circulation phase comprises a tax return phase, the electronic bill inquiry code comprises an electronic bill tax return inquiry code; the computer program enables the processor to obtain the bill information of the electronic bill in the circulation stage when executing each circulation stage in the circulation process of the electronic bill, and specifically executes the following steps when correspondingly generating the electronic bill inquiry code of the electronic bill in the circulation stage: in the tax declaring stage, receiving a bill information updating request; the bill information updating request carries an electronic bill and a tax declaring party identifier; inquiring the tax payment record corresponding to the receiver identification; checking the electronic bill according to the tax payment record; and after the electronic bill passes the verification, updating the tax declared state into the bill information of the electronic bill, and generating an electronic bill tax declaring inquiry code according to the updated bill information.
The computer equipment acquires the bill information of the electronic bill at each circulation stage in the circulation process of the electronic bill and correspondingly generates the electronic bill inquiry code of the electronic bill at the circulation stage. The bill information of the electronic bill in each circulation stage and the corresponding electronic bill query code are correspondingly recorded in the block chain network, and the block chain network stores the relevant information of the electronic bill in each circulation stage. Furthermore, after a tracing inquiry instruction carrying the electronic bill inquiry code is received, the bill information of the electronic bill in each circulation stage which is already passed through by the electronic bill can be inquired in the block chain network according to the electronic bill inquiry code, so that the information of the electronic bill in each circulation stage is not split and unknown. Therefore, the bill information of the electronic bill at the experienced circulation stage can be searched retrospectively by accessing the block chain nodes in the block chain network, and the retrospective query of the electronic bill in the circulation process is realized.
A computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of: acquiring bill information of the electronic bills in the circulation stage at each circulation stage in the circulation process of the electronic bills, and correspondingly generating an electronic bill inquiry code of the electronic bills in the circulation stage; correspondingly recording bill information of the electronic bill in each circulation stage and a corresponding electronic bill query code into a block chain network; receiving a retrospective query instruction about the electronic bill; the tracing inquiry instruction carries an electronic bill inquiry code of the electronic bill at any circulation stage; inquiring bill information of the electronic bill in each passing stage according to the electronic bill inquiry code carried by the tracing inquiry command; and feeding back the inquired bill information.
In one embodiment, the computer program causes the processor when executing the step of receiving a trace back query instruction for an electronic ticket to specifically perform the steps of: and receiving the tracing inquiry instruction forwarded by the electronic bill management server. Wherein, the forwarding step of the tracing inquiry instruction comprises the following steps: the electronic bill management server provides a query page; the electronic bill management server receives a tracing query instruction triggered by the terminal, the tracing query instruction is triggered after the terminal logs in a query page through a user account, and the user account is distributed by the electronic bill management server; and the electronic bill management server forwards the tracing query instruction to the block link point corresponding to the electronic bill management server.
In one embodiment, the computer program causes the processor to further perform the steps of: after receiving the tracing query instruction, acquiring a user account carried by the tracing query instruction; determining a query authority corresponding to a user account; according to the electronic bill inquiry code carried by the tracing inquiry instruction, inquiring the bill information of the electronic bill in each circulation stage comprises the following steps: and inquiring the bill information of the electronic bill in the experienced circulation stage specified by the inquiry authority according to the electronic bill inquiry code carried by the tracing inquiry instruction.
In one embodiment, the tracing query instruction carries a user account; the computer program causes the processor to further perform the steps of: generating a bill query record comprising a user account and an electronic bill query code; recording the bill query in a block chain network for consensus; when the consensus is completed, writing the bill query record into the block chain network; the bill inquiry record is used for inquiring historical inquiry behaviors of the electronic bill.
In one embodiment, the computer program causes the processor to specifically perform the following steps when performing the step of feeding back the queried ticket information: integrating the inquired bill information of each circulation stage into the same electronic bill; feeding back the integrated electronic bill; the fed-back electronic ticket is used for presenting each circulation stage that the electronic ticket goes through.
In one embodiment, when the circulation stage comprises a billing stage, the electronic ticket inquiry code comprises an electronic ticket billing inquiry code, and the ticket information comprises a billing party identifier, an electronic ticket identifier, a receiving party identifier and a resource transfer share.
In one embodiment, when the circulation stage comprises an reimbursement stage, the electronic ticket reimbursement code comprises an electronic ticket reimbursement query code; the computer program enables the processor to obtain the bill information of the electronic bill in the circulation stage when executing each circulation stage in the circulation process of the electronic bill, and the following steps are executed when correspondingly generating the electronic bill inquiry code of the electronic bill in the circulation stage: in the reimbursement stage, receiving a bill information updating request; the bill information updating request carries an electronic bill and a receiver identification; inquiring a resource transfer record corresponding to the receiver identification; checking the electronic bill according to the resource transfer record; and after the electronic bill passes the verification, updating the reimbursed state into the bill information of the electronic bill, and generating an reimbursement inquiry code of the electronic bill according to the updated bill information.
In one embodiment, when the circulation phase comprises a tax return phase, the electronic bill inquiry code comprises an electronic bill tax return inquiry code; the computer program enables the processor to obtain the bill information of the electronic bill in the circulation stage when executing each circulation stage in the circulation process of the electronic bill, and the following steps are executed when correspondingly generating the electronic bill inquiry code of the electronic bill in the circulation stage: in the tax declaring stage, receiving a bill information updating request; the bill information updating request carries an electronic bill and a tax declaring party identifier; inquiring the tax payment record corresponding to the receiver identification; checking the electronic bill according to the tax payment record; and after the electronic bill passes the verification, updating the tax declared state into bill information of the electronic bill, and generating an electronic bill tax declaring query code according to the updated bill information.
The computer readable storage medium acquires the bill information of the electronic bill at each circulation stage in the circulation process of the electronic bill and correspondingly generates the electronic bill inquiry code of the electronic bill at the circulation stage. And correspondingly recording the bill information of the electronic bill in each circulation stage and the corresponding electronic bill query code into the block chain network, wherein the block chain network stores the related information of the electronic bill in each circulation stage. Furthermore, after receiving a tracing inquiry command carrying an electronic bill inquiry code, the method can inquire bill information of the electronic bill in each circulation stage in the block chain network according to the electronic bill inquiry code, so that the information of the electronic bill in each circulation stage is not cracked and unknown. Therefore, the bill information of the electronic bill at the experienced circulation stage can be searched retrospectively by accessing the block chain nodes in the block chain network, and the retrospective query of the electronic bill in the circulation process is realized.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by a computer program, which may be stored in a non-volatile computer readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct Rambus Dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM), among others.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.
Claims (15)
1. A data processing method about electronic bill, apply to the block chain node in the block chain network; the method comprises the following steps:
the method comprises the steps that in each circulation stage of an electronic bill circulation process, bill information of the electronic bill in the circulation stage is obtained, the bill information is encrypted in each circulation stage of the electronic bill respectively to obtain corresponding bill ciphertexts, a bill hash value is obtained according to the bill ciphertexts in each circulation stage, the bill hash value is returned to a source of the bill information, and after signature data comprising a source private key are received and verified, an electronic bill query code of the electronic bill in each circulation stage is generated according to the bill hash value and the signature data comprising a source private key signature;
correspondingly recording the bill ciphertext of the electronic bill in each circulation stage and the corresponding electronic bill query code into a block chain network;
receiving a tracing query instruction forwarded by an electronic bill management server; the tracing query instruction carries an electronic bill query code of the electronic bill at any circulation stage; the tracing query instruction is triggered by a terminal after logging in a query page provided by an electronic bill management server through a user account, and the user account is distributed by the electronic bill management server;
inquiring the bill ciphertext of the electronic bill in each circulation stage according to the electronic bill inquiry code carried by the tracing inquiry instruction, and decrypting the bill ciphertext to obtain the bill information of a plaintext;
and feeding back the inquired bill information.
2. The method of claim 1, further comprising:
after the tracing query instruction is received, acquiring a user account carried by the tracing query instruction;
determining a query authority corresponding to the user account;
the step of querying a bill ciphertext of the electronic bill at each circulation stage experienced by the electronic bill according to the electronic bill query code carried by the tracing query instruction, and obtaining bill information of a plaintext after decrypting the bill ciphertext comprises:
and inquiring the bill ciphertext of the electronic bill in the circulation stage which is experienced and specified by the inquiry authority according to the electronic bill inquiry code carried by the tracing inquiry instruction, and decrypting the bill ciphertext to obtain the bill information of the plaintext.
3. The method according to claim 1, wherein the trace back query instruction carries a user account; the method further comprises the following steps:
generating a bill query record comprising the user account and the electronic bill query code;
the bill inquiry records are identified in the block chain network;
after the consensus is completed, writing the bill query record into a block chain network; the bill inquiry record is used for inquiring historical inquiry behaviors of the electronic bill.
4. The method of claim 1, wherein the feeding back the queried ticket information comprises:
integrating the inquired bill information of each circulation stage into the same electronic bill;
feeding back the integrated electronic bill; the electronic ticket fed back is used for presenting each circulation stage that the electronic ticket goes through.
5. The method according to any one of claims 1 to 4, wherein when the circulation phase comprises a billing phase, the electronic ticket inquiry code comprises an electronic ticket billing inquiry code, and the ticket information comprises a billing party identifier, an electronic ticket identifier, a recipient identifier, and a resource transfer share.
6. The method according to any one of claims 1 to 4, wherein when the circulation phase comprises an reimbursement phase, the electronic ticket enquiry code comprises an electronic ticket reimbursement enquiry code;
the method comprises the steps of acquiring bill information of an electronic bill in each circulation stage in the circulation process, encrypting the bill information in each circulation stage of the electronic bill to obtain corresponding bill ciphertexts, obtaining a bill hash value according to the bill ciphertexts in each circulation stage, returning the bill hash value to a source of the bill information, receiving signature data including a private key of the source and generating an electronic bill inquiry code of the electronic bill in each circulation stage according to the bill hash value and the signature data including a private key signature of the source after verification is passed, and comprises the following steps:
in the reimbursement stage, receiving a bill information updating request; the bill information updating request carries an electronic bill and a receiver identification;
inquiring a resource transfer record corresponding to the receiver identification;
checking the electronic bill according to the resource transfer record;
and after the electronic bill is checked, updating the reimbursed state into the bill information of the electronic bill, encrypting the updated bill information to obtain a corresponding bill ciphertext, obtaining a bill hash value according to the bill ciphertext in the reimbursement stage, returning the bill hash value in the reimbursement stage to a source of the bill information, and after signature data comprising a private key of the source is received and verified, generating an electronic bill reimbursement inquiry code of the electronic bill according to the bill hash value in the reimbursement stage and the signature data comprising the signature of the private key of the source.
7. The method according to any one of claims 1 to 4, wherein when the circulation phase includes a tax return phase, the electronic ticket enquiry code comprises an electronic ticket tax return enquiry code;
the method comprises the steps of acquiring bill information of an electronic bill in each circulation stage in the circulation process, encrypting the bill information in each circulation stage of the electronic bill to obtain corresponding bill ciphertexts, obtaining a bill hash value according to the bill ciphertexts in each circulation stage, returning the bill hash value to a source of the bill information, receiving signature data including a private key of the source and generating an electronic bill inquiry code of the electronic bill in each circulation stage according to the bill hash value and the signature data including a private key signature of the source after verification is passed, and comprises the following steps:
in the tax declaring stage, receiving a bill information updating request; the bill information updating request carries an electronic bill and a tax declaring party identifier;
inquiring tax payment records corresponding to the tax declaring party identifications;
checking the electronic bill according to the tax payment record;
and after the electronic bill is checked, updating the tax declaration state into the bill information of the electronic bill, encrypting the updated bill information to obtain a corresponding bill ciphertext, obtaining a bill hash value according to the bill ciphertext in the tax declaration stage, returning the bill hash value in the tax declaration stage to a source of the bill information, and generating an electronic bill tax declaration inquiry code according to the bill hash value in the tax declaration stage and the signature data including the signature of the source private key after signature data including the source private key is received and the verification is passed.
8. A data processing apparatus relating to electronic tickets, the apparatus comprising:
the electronic bill query code generation system comprises an acquisition module, a verification module and a verification module, wherein the acquisition module is used for acquiring bill information of an electronic bill in each circulation stage in the circulation process of the electronic bill, encrypting the bill information in each circulation stage of the electronic bill to obtain corresponding bill ciphertexts, obtaining a bill hash value according to the bill ciphertexts in each circulation stage, returning the bill hash value to a source of the bill information, and after signature data comprising a source private key is received and verified, generating an electronic bill query code of the electronic bill in each circulation stage according to the bill hash value and the signature data comprising a source private key signature;
the recording module is used for correspondingly recording the bill ciphertext of the electronic bill in each circulation stage and the corresponding electronic bill query code into the block chain network;
the receiving module is used for receiving the tracing inquiry instruction forwarded by the electronic bill management server; the tracing query instruction carries an electronic bill query code of the electronic bill at any circulation stage; the tracing query instruction is triggered by a terminal after logging in a query page provided by an electronic bill management server through a user account, and the user account is distributed by the electronic bill management server;
the query module is used for querying a bill ciphertext of each circulation stage of the electronic bill according to the electronic bill query code carried by the tracing query instruction, and decrypting the bill ciphertext to obtain the bill information of a plaintext;
and the feedback module is used for feeding back the inquired bill information.
9. The apparatus of claim 8, further comprising a determination module to:
the obtaining module is further used for obtaining a user account carried by the tracing query instruction after receiving the tracing query instruction;
the determining module is used for determining the query authority corresponding to the user account;
the query module is further used for querying a bill ciphertext of the electronic bill in a circulation stage which is experienced and specified by the query authority according to the electronic bill query code carried by the tracing query instruction, and decrypting the bill ciphertext to obtain the bill information of a plaintext.
10. The apparatus according to claim 8, wherein the trace back query instruction carries a user account; the device further comprises a generation module and a consensus module:
the generating module is used for generating a bill query record comprising the user account and the electronic bill query code;
the consensus module is used for recording the bill query in the block chain network for consensus;
the recording module is also used for writing the bill query record into a block chain network after the consensus is completed; the bill inquiry record is used for inquiring the historical inquiry behavior of the electronic bill.
11. The apparatus of claim 8, wherein the feedback module is further configured to integrate the queried ticket information for each circulation stage into the same electronic ticket; feeding back the integrated electronic bill; the electronic ticket fed back is used for presenting each circulation stage that the electronic ticket goes through.
12. The apparatus of any one of claims 8 to 11, wherein when the circulation phase comprises an reimbursement phase, the electronic ticket reimbursement code comprises an electronic ticket reimbursement query code; the acquisition module is also used for receiving a bill information updating request in a reimbursement stage; the bill information updating request carries an electronic bill and a receiver identification; inquiring a resource transfer record corresponding to the receiver identification; checking the electronic bill according to the resource transfer record; and after the electronic bill is checked, updating the reimbursed state into the bill information of the electronic bill, encrypting the updated bill information to obtain a corresponding bill ciphertext, obtaining a bill hash value according to the bill ciphertext in the tax declaring stage, returning the bill hash value in the tax declaring stage to a source of the bill information, and generating an electronic bill reimbursement inquiry code according to the bill hash value in the tax declaring stage and the signature data including the signature of the source private key after signature data including the source private key is received and the verification is passed.
13. The apparatus according to any one of claims 8 to 11, wherein when the circulation stage includes a tax return stage, the electronic ticket inquiry code includes an electronic ticket tax return inquiry code; the acquisition module is also used for receiving a bill information updating request in a tax declaring stage; the bill information updating request carries an electronic bill and a tax declaring party identifier; inquiring the tax payment record corresponding to the tax declaring party identification; checking the electronic bill according to the tax payment record; and after the electronic bill is checked, updating the tax declaration state into the bill information of the electronic bill, encrypting the updated bill information to obtain a corresponding bill ciphertext, obtaining a bill hash value according to the bill ciphertext in the tax declaration stage, returning the bill hash value in the tax declaration stage to a source of the bill information, and generating an electronic bill tax declaration inquiry code according to the bill hash value in the tax declaration stage and the signature data including the signature of the source private key after signature data including the source private key is received and the verification is passed.
14. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 7.
15. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810941347.4A CN109191272B (en) | 2018-08-17 | 2018-08-17 | Data processing method, device, storage medium and equipment for electronic bill |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810941347.4A CN109191272B (en) | 2018-08-17 | 2018-08-17 | Data processing method, device, storage medium and equipment for electronic bill |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109191272A CN109191272A (en) | 2019-01-11 |
CN109191272B true CN109191272B (en) | 2023-04-07 |
Family
ID=64918269
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810941347.4A Active CN109191272B (en) | 2018-08-17 | 2018-08-17 | Data processing method, device, storage medium and equipment for electronic bill |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109191272B (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109919745A (en) * | 2019-01-28 | 2019-06-21 | 航天信息股份有限公司 | A kind of electronic invoice transmitting state management-control method and system |
CN111091429B (en) * | 2019-03-06 | 2024-03-22 | 深圳市智税链科技有限公司 | Electronic bill identification distribution method and device and electronic bill generation system |
CN110223127A (en) * | 2019-05-20 | 2019-09-10 | 深圳壹账通智能科技有限公司 | Bill data backing method and system |
CN110177119A (en) * | 2019-06-13 | 2019-08-27 | 朱子腾 | A kind of account and application method of binding IP address |
US10956903B2 (en) | 2019-07-31 | 2021-03-23 | Advanced New Technologies Co., Ltd. | Obtaining a blockchain-based, real-name, electronic bill |
CN110471986B (en) * | 2019-07-31 | 2020-08-04 | 阿里巴巴集团控股有限公司 | Bill real name getting method and device based on block chain and electronic equipment |
CN110599266B (en) * | 2019-09-16 | 2021-07-06 | 腾讯科技(深圳)有限公司 | Electronic bill data processing method and device, computer equipment and storage medium |
CN110599137B (en) * | 2019-09-16 | 2024-06-11 | 腾讯科技(深圳)有限公司 | Electronic bill data processing method and device and computer equipment |
CN110598457B (en) * | 2019-09-24 | 2023-11-24 | 腾讯科技(深圳)有限公司 | Bill processing method, bill processing device, bill processing equipment and computer storage medium |
CN110597886A (en) * | 2019-09-24 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Data processing method and device and computer storage medium |
CN110599176B (en) * | 2019-09-24 | 2024-05-17 | 腾讯科技(深圳)有限公司 | Block chain-based data processing method and device, storage medium and node equipment |
CN110599211A (en) * | 2019-09-27 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Ticket information processing method and device and computer equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6233565B1 (en) * | 1998-02-13 | 2001-05-15 | Saranac Software, Inc. | Methods and apparatus for internet based financial transactions with evidence of payment |
CN107146124A (en) * | 2017-03-14 | 2017-09-08 | 北京中软万维网络技术有限公司 | A kind of implementation method, system and the device of electronics one-way ticket |
CN108076057A (en) * | 2017-12-14 | 2018-05-25 | 北京中星仝创科技有限公司 | A kind of data security system and method based on block chain |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2471282B (en) * | 2009-06-22 | 2015-02-18 | Barclays Bank Plc | Method and system for provision of cryptographic services |
WO2018112945A1 (en) * | 2016-12-23 | 2018-06-28 | 深圳前海达闼云端智能科技有限公司 | Method and device for querying state information about electronic ticket, and block chain node |
CN106952124A (en) * | 2017-03-16 | 2017-07-14 | 北京牛链科技有限公司 | Electronic bill management system and method based on distribution book keeping operation |
-
2018
- 2018-08-17 CN CN201810941347.4A patent/CN109191272B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6233565B1 (en) * | 1998-02-13 | 2001-05-15 | Saranac Software, Inc. | Methods and apparatus for internet based financial transactions with evidence of payment |
CN107146124A (en) * | 2017-03-14 | 2017-09-08 | 北京中软万维网络技术有限公司 | A kind of implementation method, system and the device of electronics one-way ticket |
CN108076057A (en) * | 2017-12-14 | 2018-05-25 | 北京中星仝创科技有限公司 | A kind of data security system and method based on block chain |
Also Published As
Publication number | Publication date |
---|---|
CN109191272A (en) | 2019-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109191272B (en) | Data processing method, device, storage medium and equipment for electronic bill | |
CN109255084B (en) | Electronic bill query method, device, storage medium and computer equipment | |
CN108961030B (en) | Data processing method, apparatus, system, medium, and device for electronic ticket | |
CN109165943B (en) | Data processing method, device, storage medium and equipment for electronic bill | |
CN109325812B (en) | Data processing method, device, storage medium and equipment for electronic bill | |
CN109034924B (en) | Electronic bill generating method, electronic bill generating device, storage medium and computer equipment | |
EP3704620B1 (en) | System and method for blockchain-based notification | |
EP3688634B1 (en) | System and method for implementing a resolver service for decentralized identifiers | |
US11474971B2 (en) | System and method for creating a mutual reference between a blockchain and a private repository | |
CN109191219B (en) | Data processing method, device, storage medium and equipment for electronic bill | |
CN110633963B (en) | Electronic bill processing method, electronic bill processing device, computer readable storage medium and computer readable storage device | |
CN109087024B (en) | Data processing method, device, storage medium and equipment for electronic bill | |
CN110599137B (en) | Electronic bill data processing method and device and computer equipment | |
WO2019179534A2 (en) | System and method for creating decentralized identifiers | |
WO2019179535A2 (en) | System and method for verifying verifiable claims | |
CN111556120B (en) | Data processing method and device based on block chain, storage medium and equipment | |
CN109087078B (en) | Data processing method, device, storage medium and equipment for electronic bill | |
CN110599275A (en) | Data processing method and device based on block chain network and storage medium | |
CN110599270B (en) | Electronic bill generation method and device and computer equipment | |
CN111488372A (en) | Data processing method, device and storage medium | |
CN110011796B (en) | Certificate updating method and device, computer equipment and storage medium | |
CN110597834A (en) | Electronic bill data processing method and device and computer equipment | |
CN109658100B (en) | System and method for determining downlink digital assets | |
Dwivedi et al. | Edge Computing and Blockchain-Based Distributed Audit of Outsourced Dynamic Data | |
CN116228437A (en) | Asset transfer method, device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20190118 Address after: 518000 Tencent Building 2401, Maling Community Science and Technology Center, Yuehai Street, Nanshan District, Shenzhen City, Guangdong Province Applicant after: SHENZHEN ZHISHUILIAN TECHNOLOGY Co.,Ltd. Address before: 518000 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 Floors Applicant before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |