Data processing methods, apparatus, storage media and equipment for electronic invoices

By automatically calculating the tax amount by blockchain nodes in the tax filing network, the problem of low tax filing efficiency caused by manual calculation in existing technologies is solved, and an efficient tax filing process is achieved.

CN110400143BActive Publication Date: 2025-11-14SHENZHEN ZHISHUI CHAIN TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN201910684115.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-08-20
Publication Date
2025-11-14
Estimated Expiration
2038-08-20

AI Technical Summary

Technical Problem

In the current technology, taxpayers need to manually calculate invoice data when filing tax returns, which leads to low tax filing efficiency.

Method used

The system receives tax filing requests through blockchain nodes in the blockchain network, verifies electronic invoices, queries tax filing parameters, automatically calculates the tax amount, and feeds back the results to the requesting party, eliminating the need for manual calculation.

Benefits of technology

It improves tax filing efficiency, reduces the workload of manual statistics, and makes the tax filing process more efficient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110400143B_ABST
    Figure CN110400143B_ABST
Patent Text Reader

Abstract

This application relates to a data processing method, apparatus, storage medium, and device for electronic invoices. The method is applied to a tax filing blockchain node in a blockchain network. The method includes: receiving a tax filing request; the tax filing request carrying a tax filing party identifier; determining the electronic invoice corresponding to the tax filing party identifier; querying tax filing parameters associated with the tax filing party identifier; and calculating the corresponding tax amount based on the electronic invoice and the tax filing parameters. The solution provided by this application can improve tax filing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application filed with the Chinese Patent Office on August 20, 2018, with application number 201810946810.4, entitled "Data Processing Method, Apparatus, Storage Medium and Device for Electronic Tickets", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, storage medium, and computer equipment for electronic tickets. Background Technology

[0003] As a major source of revenue for national and local governments, taxation ensures the normal operation of the country. Therefore, efficient, accurate, and timely tax collection is a crucial task for national tax authorities. Currently, most taxpayers file their taxes manually, based on invoice data from paper invoices, either through their employers' staff calculating the tax amount manually or online at the tax bureau. This manual calculation of tax amounts is extremely labor-intensive, resulting in low tax filing efficiency. Summary of the Invention

[0004] Therefore, it is necessary to provide a data processing method, apparatus, computer-readable storage medium, and computer equipment for electronic invoices to address the technical problem of low tax reporting efficiency caused by existing manual tax reporting.

[0005] A data processing method for electronic invoices, applied to a tax filing blockchain node in a blockchain network, the method comprising:

[0006] Receive a tax filing request; the tax filing request carries the taxpayer identifier;

[0007] Determine the electronic invoice corresponding to the tax filing party identifier;

[0008] Query the tax filing parameters associated with the aforementioned tax filing party identifier;

[0009] The corresponding tax amount is calculated based on the electronic invoice and the tax filing parameters.

[0010] A data processing device for electronic invoices, applied to a tax filing blockchain node in a blockchain network, the device comprising:

[0011] A receiving module is used to receive tax filing requests; the tax filing request carries the identifier of the taxpayer.

[0012] The determination module is used to determine the electronic invoice corresponding to the tax returner's identifier;

[0013] The query module is used to query the tax filing parameters associated with the tax filing party identifier;

[0014] The statistics module is used to calculate the corresponding tax amount based on the electronic invoice and the tax filing parameters.

[0015] A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the above-described data processing method for electronic tickets.

[0016] A computer device includes 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 above-described data processing method for electronic tickets.

[0017] The aforementioned data processing method, apparatus, computer-readable storage medium, and computer equipment for electronic invoices, upon receiving a tax filing request, can determine the corresponding electronic invoice from the local blockchain node based on the taxpayer identifier in the tax filing request, and query the corresponding tax filing parameters. The taxpayer blockchain node in the blockchain network can then automatically calculate the tax amount based on the determined electronic invoice and tax filing parameters, and can also feed back the tax amount to the taxpayer requesting end, eliminating the workload of manual calculation. When the taxpayer requesting end receives the tax amount fed back by the connected blockchain node, it can pay the tax according to the tax amount, without the need for manual calculation of the tax amount, thus improving tax filing efficiency. Attached Figure Description

[0018] Figure 1 This is an application environment diagram of a data processing method for electronic tickets in one embodiment;

[0019] Figure 2 This is a flowchart illustrating a data processing method for electronic tickets in one embodiment;

[0020] Figure 3 This is a schematic diagram of a blockchain network in one embodiment, consisting of blockchain nodes of the tax filing party corresponding to each tax filing request terminal;

[0021] Figure 4 This is a flowchart illustrating the steps for generating tax return parameters in one embodiment;

[0022] Figure 5 This is a schematic diagram of the circulation process of an electronic ticket in one embodiment;

[0023] Figure 6 This is a schematic diagram illustrating the principle of a consensus algorithm in one embodiment;

[0024] Figure 7 This is a schematic diagram of the process for calculating tax amount in one embodiment;

[0025] Figure 8 This is a deployment diagram of an electronic ticket data processing system in one embodiment;

[0026] Figure 9 This is a flowchart illustrating a data processing method for electronic tickets in a specific embodiment.

[0027] Figure 10 This is a structural block diagram of a data processing device for electronic tickets in one embodiment;

[0028] Figure 11 This is a structural block diagram of a computer device in one embodiment. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0030] Figure 1 This is an application environment diagram of a data processing method for electronic tickets in one embodiment. (Refer to...) Figure 1 The application environment includes a tax filing blockchain node 110 and a bill management blockchain node 120 belonging to the same blockchain network as the tax filing blockchain node 110. The tax filing request terminal 130 and the tax filing blockchain node 110 are connected via a network. Optionally, the tax filing request terminal 130 and the tax filing blockchain node 110 can be the same terminal; that is, the tax filing request terminal 130 can act as the tax filing blockchain node 110. The tax filing blockchain node 110 can grant access permissions and access interfaces to the tax filing request terminal 130, allowing the tax filing request terminal 130 to connect to the tax filing blockchain node 110. Specifically, the tax filing request terminal 130 can be a desktop terminal or a mobile terminal; a mobile terminal can be at least one of a mobile phone, tablet computer, or laptop computer. When tax filing is required, the tax filing request terminal 130 initiates a tax filing request to the tax filing party blockchain node 110. The tax filing request carries the tax filing party identifier. After receiving the tax filing request, the tax filing party blockchain node 110 determines the electronic invoice corresponding to the tax filing party identifier locally and queries the tax filing parameters associated with the tax filing party identifier. The tax filing party blockchain node 110 can then calculate the corresponding tax amount based on the determined electronic invoice and the queried tax filing parameters, and feed back the calculated tax amount to the tax filing request terminal 130 that initiated the tax filing request, so that the tax filing request terminal 130 can process the tax filing according to the calculated tax amount.

[0031] It is understandable that a blockchain network can also include other blockchain nodes. For example, the circulation process of electronic invoices includes the application, issuance, storage, reimbursement, and tax reporting of electronic invoices. Therefore, the blockchain network can also include invoice issuance blockchain nodes, invoice storage nodes, and invoice reimbursement blockchain nodes, etc. A blockchain network can include multiple blockchains formed by data blocks from various blockchain nodes.

[0032] Blockchain nodes in a blockchain network can connect to each other for consensus authentication. The tax reporting blockchain node can connect with other blockchain nodes via the network. Each blockchain node can be an independent physical server or terminal, or a server cluster consisting of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud servers, cloud databases, cloud storage, and CDN.

[0033] like Figure 2 As shown, in one embodiment, a data processing method for electronic tickets is provided. This embodiment mainly applies this method to the above-mentioned... Figure 1 Let's take the example of blockchain node 110, the taxpayer's reporting node, to illustrate this. (Refer to...) Figure 2 The data processing method for electronic invoices specifically includes the following steps:

[0034] S202, Receive tax return request; the tax return request carries the taxpayer identification.

[0035] Optionally, the tax filing blockchain node 110 can receive tax filing requests sent by the tax filing request terminal 130 connected to the tax filing blockchain node; here, the tax filing party, also known as the taxpayer, is an organization that is required to pay taxes according to law. The tax filing request terminal is a device connected to the corresponding tax filing blockchain node in the blockchain network. The tax filing party identifier is an identifier used to uniquely identify the identity of the tax filing request terminal (tax filing party) as a party in network communication. The tax filing party identifier can be a string including characters such as numbers, letters, or symbols. When the tax filing party needs to file taxes, it needs to initiate a tax filing request to the corresponding blockchain node in the blockchain network through the tax filing request terminal based on the tax filing party identifier.

[0036] Blockchain is the carrier and organizational method for running blockchain technology. Blockchain technology, abbreviated as BT (Blockchain technology), also known as distributed ledger technology, is an internet database technology characterized by decentralization and transparency, allowing everyone to participate in database recording. Blockchain technology utilizes a block-chain data structure to verify and store data, uses distributed node consensus algorithms to generate and update data, employs cryptography to ensure the security of data transmission and access, and uses smart contracts composed of automated script code to program and manipulate data—a distributed infrastructure and computing method. The blockchain where the tax filer's blockchain node resides is the blockchain linked to invoices associated with the tax filer's identifier.

[0037] like Figure 3 The diagram illustrates a blockchain network comprised of blockchain nodes corresponding to each tax filing requester. For example, when group A issues electronic invoice T1 to consumer B, and consumer B uses electronic invoice T1 to claim reimbursement from group C, electronic invoice T1 flows from group A to group C; when group E issues electronic invoice T2 to consumer B, and consumer B uses electronic invoice T2 to claim reimbursement from group C, electronic invoice T2 flows from group E to group C; when group A issues electronic invoice T3 to consumer B, and consumer B uses electronic invoice T3 to claim reimbursement from group C, electronic invoice T3 flows from group A to group C. (Refer to...) Figure 3 In the blockchain network, groups A, C, and E correspond to blockchain nodes A1, C1, and E1, respectively. Consumer B's blockchain node for storing electronic invoices is B1. Therefore, the blockchain associated with electronic invoice T1 is composed of data blocks from nodes A1, B1, and C1 that store data related to electronic invoice T1. Similarly, the blockchain associated with electronic invoice T2 is composed of data blocks from nodes E1, B1, and C1 that store data related to electronic invoice T2. Likewise, the blockchain associated with electronic invoice T3 is composed of data blocks from nodes A1, B1, and C1 that store data related to electronic invoice T3. Here, groups A, B, and C can all be tax-reporting parties, and the corresponding blockchain nodes in the network can be called tax-reporting party blockchain nodes.

[0038] In one embodiment, the tax filer's blockchain node is the blockchain node in the blockchain network corresponding to the tax filing requester. The correspondence between the tax filer's blockchain node and the tax filing requester can be one-to-one or one-to-many. For example, the tax filer's blockchain node can be its own blockchain node established by the tax filer in the blockchain network, used to record information about electronic invoices associated with that tax filer. Alternatively, the tax filer's blockchain node can be the blockchain node corresponding to a third-party device that the tax filing requester authorizes and connects to the network. This third-party device's blockchain node can be used to record information about electronic invoices associated with multiple tax filers; this blockchain node can also be called a public blockchain node. It is understandable that when the correspondence between the tax filing blockchain node and the tax filing request end is one-to-one, the electronic invoices stored in the tax filing blockchain node are all associated with the tax filing party's identifier. However, when the correspondence is one-to-many, the electronic invoices stored in the tax filing blockchain node are associated with their respective tax filing parties. The tax filing blockchain node can then distinguish the tax filing parties based on the tax filing party identifier in the tax filing request. The information of the electronic invoices of each tax filing party in the blockchain node is not visible to unrelated tax filing parties due to the cryptography used in blockchain technology.

[0039] In one embodiment, the taxpayer identifier can be a digital certificate assigned to the taxpayer by the electronic invoice management server. When it is necessary to record data related to electronic invoices or process processes related to electronic invoices, the taxpayer can initiate a registration request to the electronic invoice management server through the tax filing request client. The registration request can carry the taxpayer's identity information, such as business license information or ID card information corresponding to the taxpayer. After receiving the registration request, the electronic invoice management server can verify the taxpayer's qualifications based on the identity information carried in the registration request or existing taxpayer information associated with that identity information. After the verification is passed, a digital certificate corresponding to the taxpayer can be generated and returned to the tax filing request client.

[0040] In one embodiment, when a taxpayer sends a registration request to the electronic invoice management server via a tax filing request client, the electronic invoice management server can also generate a corresponding public-private key pair for that taxpayer. The public key and private key in the public-private key pair are a key pair obtained through an algorithm; the public key is the publicly disclosed key, while the private key is the private key. The electronic invoice management server can generate a digital certificate based on the public key in the public-private key pair and the enterprise's identity information, and send the public-private key pair to the tax filing request client and the corresponding taxpayer blockchain node. Thus, when sending a tax filing request, the tax filing request client can sign the tax filing request using the private key. After receiving the signed tax filing request, the taxpayer blockchain node can verify the signature using the public key to confirm that the received tax filing request was sent by the taxpayer who was allocated the public-private key pair.

[0041] S204, Identify the electronic invoice corresponding to the tax returner's identifier.

[0042] Electronic invoices, as opposed to paper-based physical invoices, are invoices stored electronically on computer devices. These computer devices can be blockchain nodes in a blockchain network used by the taxpayer (or the requester) or the requesting entity. Electronic invoices are uniquely identified by an electronic invoice identifier. The computer device can record all information related to the electronic invoice, including invoice information, the flow of the electronic invoice, and the time when each piece of information was recorded on the computer device. Specifically, upon receiving a tax request, the taxpayer (or the blockchain node) can extract the taxpayer identifier from the request and read the electronic invoice corresponding to that identifier from its local data block.

[0043] In one embodiment, the tax filing request carries an electronic invoice query code, which is a hash value generated based on the invoice information and status of the corresponding electronic invoice; the method further includes: filtering electronic invoices associated with the electronic invoice query code from the determined electronic invoices; and using the filtered electronic invoices as the electronic invoices corresponding to this tax filing.

[0044] The electronic invoice query code is used to retrieve the invoice information of a corresponding electronic invoice. The electronic invoice query code is a hash value generated based on the invoice information and invoice status. Invoice information includes the electronic invoice identifier, the issuer identifier, the recipient identifier, the invoice amount, the invoice issuance time, etc. Invoice status refers to the current status of the electronic invoice, including at least one of "issued," "reimbursed," and "tax filed." For example, when taxpayer A issues an electronic invoice to consumer B, the corresponding invoice status is "issued." When consumer B initiates reimbursement with taxpayer C based on the electronic invoice, the status of the electronic invoice is added as "reimbursed." When taxpayer C completes tax filing based on the electronic invoice, the status of the electronic invoice is added as "tax filed." It can be understood that only issued electronic invoices can be processed for reimbursement or tax filing. Electronic invoices that have not yet been reimbursed can be processed for tax filing by the issuer first, and electronic invoices that have not yet been filed for tax filing can also be processed for reimbursement by the recipient first.

[0045] Specifically, there are multiple electronic invoices associated with a taxpayer who needs to file a tax return. When only a portion of the electronic invoices are relevant to this tax return, the requesting party can obtain the electronic invoice query codes for the electronic invoices corresponding to this tax return. Based on the taxpayer's identifier and the electronic invoice query codes for the electronic invoices used in this tax return, a tax return request is generated. When the taxpayer's blockchain node receives this request, it can filter the electronic invoices corresponding to this tax return from the identified electronic invoices based on the electronic invoice query codes. The requesting party can determine the electronic invoice query codes for the electronic invoices involved in this tax return through all locally stored electronic invoices associated with the taxpayer's identifier, or it can obtain the electronic invoice query codes manually entered by the taxpayer's staff.

[0046] S206, query the tax filing parameters associated with the tax filer identifier.

[0047] Among them, tax filing parameters are the parameters that the taxpayer applies for when filing taxes. Tax filing parameters are set according to legal regulations. Tax filing parameters include the tax filing ratio for different types of taxes, the threshold for corporate income tax, etc. Different taxpayers may have different tax filing ratios for the same type of tax, such as value-added tax.

[0048] Specifically, the blockchain node of the tax filer can query the tax filing parameters associated with the tax filer identifier stored in the local data block based on the tax filer identifier, so as to automatically calculate the tax amount corresponding to this tax filing based on the tax filing parameters.

[0049] In one embodiment, different tax filers may have different tax filing parameters due to differences in company size, business scope, etc., such as... Figure 4As shown, tax parameters can be generated through the following steps:

[0050] S402, the electronic invoice management server obtains the tax filing parameters corresponding to the tax filing party identifier and initiates a request to the blockchain node of the invoice management party corresponding to the electronic invoice management server to upload the tax filing parameters to the blockchain network.

[0051] The electronic invoice management server is used to manage the circulation process of electronic invoices. This process includes the application, issuance, reimbursement, and tax filing of electronic invoices. The issuance of electronic invoices is also known as the generation of electronic invoices. The electronic invoice management server is also used to allocate and manage the taxpayer's public and private key pairs or digital certificates.

[0052] like Figure 5 The diagram shown illustrates the circulation process of an electronic ticket in one embodiment. (Refer to...) Figure 5 The tax filing client initiates a request for electronic invoices to the electronic invoice management server. The electronic invoice management server binds the invoice identifier of the available electronic invoices with the tax filing client's identifier, and writes this binding relationship to the invoice issuance blockchain node in the blockchain network, thus realizing the flow of electronic invoices from the electronic invoice management server to the tax filing client. When the tax filing client needs to issue an electronic invoice for a user, it can query the invoice identifier of the electronic invoices bound to that taxpayer but not yet issued, obtain the invoice information entered by the user, generate an electronic invoice based on this invoice information and the invoice identifier, and write the generated electronic invoice with the user's identifier to the corresponding invoice storage blockchain node in the blockchain network, thus completing the issuance of electronic invoices for the user and realizing the flow of electronic invoices from the tax filing client to the user. When a user needs to reimburse an electronic invoice, they can initiate a reimbursement request to the invoice receiving end. After completing the reimbursement, the receiving end writes the reimbursed electronic invoice and related data to the corresponding blockchain node in the blockchain network, thus realizing the flow of the electronic invoice from the user to the recipient. Finally, both the invoice issuer and the recipient can process the tax return for the issued and reimbursed electronic invoices, and write the invoice status to their respective blockchain nodes in the blockchain network.

[0053] The blockchain node for the bill management party is the blockchain node in the blockchain network corresponding to the electronic bill management server. Within the blockchain network, the bill management party's blockchain node has higher authority than the tax filing party's blockchain node. For example, the conditions for issuing electronic bills need to be uploaded to the blockchain network through the bill management party's blockchain node, and electronic bills need to be distributed to various tax filing party's blockchain nodes through the bill management party's blockchain node, and so on. In one implementation, data recorded on various blockchain nodes in the blockchain network, including the data blocks of the bill management party's blockchain node, can be synchronized to the electronic bill management server in real time.

[0054] Specifically, the electronic invoice management server can obtain the tax filing parameters entered by the user and corresponding to the tax filer's identifier through the client associated with the electronic invoice management server, and initiate a request to the blockchain node of the invoice management party corresponding to the electronic invoice management server to upload the tax filing parameters to the blockchain network. This request is used to write the tax filing parameters into the blockchain associated with the tax filer's identifier. In one embodiment, the tax filing parameters may be entered after receiving the tax filer's registration request and completing the qualification verification of the tax filer.

[0055] In one embodiment, the electronic invoice management server can be a server set up for an authoritative body to manage electronic invoices. For example, when the electronic invoice is an electronic invoice, the electronic invoice manager can be the tax bureau, and the electronic invoice management server is the server set up for the tax bureau. The blockchain node of the invoice manager is the blockchain node set up for the tax bureau in the blockchain network.

[0056] S404, the blockchain node of the bill management party performs identity verification based on the received request, and after successful verification, triggers consensus on tax reporting parameters in the blockchain network, and after the consensus is passed, triggers the association and recording of tax reporting parameters with the tax reporting party identifier in the blockchain node of the blockchain network; wherein, the blockchain node in the blockchain network includes the blockchain node of the bill management party and the blockchain node of the tax reporting party.

[0057] The electronic invoice management server can connect to the blockchain node of the invoice management party in the blockchain network. As a party communicating with the blockchain node of the invoice management party, the electronic invoice management server also has a public-private key pair for identity verification, and the corresponding blockchain node of the invoice management party stores the public key of this public-private key pair. The request initiated by the electronic invoice management server to upload tax reporting parameters to the blockchain network can be a request signed with the private key in the public-private key pair. In this way, the blockchain node of the invoice management party can verify the signature of the received request according to the stored public key, and trigger consensus on the tax reporting parameters in the blockchain network after successful verification.

[0058] Consensus refers to the process by which multiple blockchain nodes, under preset rules, reach an agreement on certain data, behaviors, or processes through interaction. In this embodiment, when blockchain nodes related to tax parameters, or those authorized to access these parameters, receive a request from the bill management blockchain node to write the tax parameters into the blockchain comprised of these nodes, the request carries the identity information of the bill management blockchain node. Each blockchain node can then compare the received identity information with the pre-stored identity authentication information of the bill management blockchain node locally to confirm whether the received identity information matches the stored identity information. If they match, the received identity information is confirmed to be authentic, and the authentication result for each blockchain node is passed; otherwise, the authentication result is failed.

[0059] Furthermore, consensus can be determined based on the authentication results of each blockchain node. When determining consensus success, at least one of the following can be obtained: a first number of blockchain nodes that passed authentication and a second number of blockchain nodes that failed authentication. The identity authentication result is then determined based on at least one of the first and second numbers. For example, identity authentication is considered successful when at least one of the following conditions is met: the first number is greater than the second number; the first number reaches a first preset threshold; or the ratio of the first number to the number of blockchain nodes participating in the consensus verification reaches a second preset threshold. The specific values ​​corresponding to the first and second preset thresholds can be set as needed. For example, assuming the authentication results for blockchain nodes 1 to 4 are pass, pass, pass, and fail respectively, then the first number is 3, the second number is 1, and if the consensus success condition is that the ratio of the first number to the number of blockchain nodes participating in the consensus verification is greater than or equal to 3 / 4, then consensus is considered successful.

[0060] In one embodiment, the consensus algorithm used for consensus is specifically a consensus algorithm based on a consensus algorithm and a Byzantine fault tolerance algorithm, such as the RAFT algorithm based on BFT (Byzantine Fault Tolerance). Of course, other consensus algorithms can also be used in other embodiments of the present invention, and the present invention does not limit them.

[0061] Figure 6 A schematic diagram illustrating the principle of the consensus algorithm in a specific embodiment is shown. (Reference) Figure 6After initiating a consensus request, the client sends it to the leading blockchain node, i.e., master node A. The leading blockchain node is elected by all blockchain nodes in the network. Moving on to the entity addition phase, master node A broadcasts the consensus content (or intermediate data obtained after processing the consensus content) corresponding to the consensus request to other non-leading blockchain nodes, including follower nodes B, C, D, etc. Moving on to the append response phase, each follower node broadcasts the received consensus content to all other blockchain nodes. When they receive consistent consensus content from a predetermined number (e.g., 2f+1) of other blockchain nodes, they enter the confirmation phase, where each follower node sends its confirmation result back to master node A. When master node A receives confirmation from a predetermined number of other blockchain nodes, it determines that consensus is complete and sends the result back to the client. Here, 3f+1≤N, where N is the number of blockchain nodes in the network, and f is the number of malicious blockchain nodes.

[0062] S208, calculates the corresponding tax amount based on electronic invoices and tax filing parameters.

[0063] Specifically, the declared tax amount is the value of the tax payable for this tax filing. After determining the electronic invoice corresponding to this tax filing and the tax filing requester's identifier, the blockchain node of the tax filing party can calculate the declared tax amount corresponding to this tax filing based on the determined electronic invoice and tax filing parameters.

[0064] In one embodiment, the electronic invoice includes an issuer identifier and a recipient identifier; step S208, calculating the corresponding tax amount based on the electronic invoice and tax filing parameters, includes: selecting a first electronic invoice with an issuer identifier matching the tax filing identifier from the determined electronic invoices, and selecting a second electronic invoice with a recipient identifier matching the tax filing identifier; calculating a first amount for the first electronic invoice and a second amount for the second electronic invoice; and determining the corresponding tax amount for the tax filing request terminal based on the tax filing parameters, the first amount, and the second amount.

[0065] The issuer identifier is the identifier of the organization corresponding to the issuer of the electronic invoice, and the recipient identifier is the identifier of the organization corresponding to the recipient of the electronic invoice. The issuer identifier can be, for example, the name of the issuing company or the taxpayer number of the issuing company. Similarly, the recipient identifier can be the name of the reimbursing company or the taxpayer number of the reimbursing company.

[0066] Specifically, after the tax filing party's blockchain node determines the electronic invoice corresponding to the tax filing party's identifier, it selects the first electronic invoice from the determined electronic invoices that has an invoicing party identifier that matches the tax filing party's identifier. The fact that the first electronic invoice has an invoicing party identifier that matches the tax filing party's identifier indicates that the first electronic invoice can be used to calculate the output tax amount corresponding to the tax filing party in this tax filing process. The second electronic invoice has a recipient identifier that matches the tax filing party's identifier, indicating that the second electronic invoice can be used to calculate the input tax amount corresponding to the tax filing party in this tax filing process. The tax filing party's blockchain node can then determine the tax amount corresponding to the tax filing party's tax filing in this tax filing based on the first amount of the first electronic invoice, the second amount of the second electronic invoice, and the tax filing parameters queried.

[0067] In one embodiment, when the second amount counted by the blockchain node of the tax reporting party is greater than the first amount, it means that the input tax is greater than the output tax. In this case, the corresponding tax amount can be 0. Furthermore, the portion of the input tax that is greater than the output tax can be used as the input tax for the tax reporting party's tax amount in the next tax reporting.

[0068] In one embodiment, the method further includes the following steps:

[0069] In response to a tax filing request, the system sends the tax amount back to the requesting end.

[0070] Specifically, after the blockchain node of the tax filing party calculates the tax amount to be filed by the corresponding tax filing party for this tax filing request, it can feed back the calculated tax amount to the tax filing request party. The tax filing request party can then proceed with the next step of tax filing based on the obtained tax amount.

[0071] In one embodiment, the tax filing requester can authorize the tax authority server to automatically deduct the tax amount from the corporate account. The blockchain node of the filing party can also write the determined tax amount into the blockchain network. When the blockchain node corresponding to the tax authority server in the blockchain network receives the tax amount, it can verify it and, after verification, feed the tax amount back to the tax authority server, which will then automatically deduct the tax amount.

[0072] like Figure 7 The diagram shown illustrates a process for calculating tax amounts in one embodiment. (Refer to...) Figure 7 The electronic invoice management server uploads the tax filing parameters and the corresponding taxpayer identifiers to the blockchain network. The taxpayer can submit a tax filing request through the tax filing request terminal. When the blockchain node corresponding to the taxpayer receives the tax filing request, it automatically calculates the tax amount based on the electronic invoices and tax filing parameters corresponding to the taxpayer identifier and feeds back the tax amount to the tax filing request terminal.

[0073] like Figure 8The diagram shown illustrates the deployment of a data processing system for electronic invoices in a specific embodiment. In applications where the electronic invoice is a blockchain-based electronic invoice, the electronic invoice management server can be a tax bureau server, the tax filing requester can be the invoicing company or the reimbursement company, and the invoice storage server for storing issued electronic invoices can be a blockchain-based electronic invoice storage server, specifically a WeChat server. (Reference) Figure 8 A blockchain network consists of at least four blockchain nodes forming a consortium blockchain: a node corresponding to the tax bureau server, a node corresponding to the invoicing company, a node corresponding to the blockchain electronic invoice storage server, and a node corresponding to the reimbursement company. Typically, each role's device interacts with its corresponding blockchain node.

[0074] refer to Figure 8 On one hand, the tax bureau server provides access interfaces (internal interfaces for tax bureau terminals and external interfaces for enterprise users) to various roles' devices through a reverse proxy service, hosting the identity keys of each role and managing the characteristic data of each role. On the other hand, it uses synchronization tools to synchronize data written to the blockchain network (or data awaiting writing after consensus completion) from the blockchain network modules in the corresponding blockchain nodes in real time, so as to query and statistically analyze the blockchain electronic invoice-related data of each role.

[0075] In a blockchain network, each blockchain node provides access interfaces to external devices through a reverse proxy service (e.g., the device of the invoicing company accesses the blockchain node corresponding to the invoicing company). Simultaneously, it receives data sent by these devices through the reverse proxy service via the blockchain e-invoice application platform (e.g., the device of the invoicing company uploads data to the blockchain node corresponding to the invoicing company, i.e., the data is transmitted to the blockchain e-invoice application platform through the interface provided by the reverse proxy service). The blockchain e-invoice application platform then transmits the data to the blockchain network module. The blockchain network modules of all blockchain nodes collectively constitute a consensus network. After consensus is reached in the consensus network, the data is written to the blockchain network module. Each blockchain node also includes a cache database for caching various data, such as the enterprise public key obtained from the system's central server.

[0076] refer to Figure 8 The deployment diagram may also include a central server for the blockchain network module system, which stores the mapping between each enterprise's corporate identity and public key. This server is isolated from the tax bureau's server and is primarily used for identity authentication (e.g., restricting invoice issuance to only the tax bureau and modifying enterprise-related constraints). Subsequent operations requiring centralization will be executed uniformly on this central server.

[0077] Specifically, the reverse proxy service can be nginx. The blockchain e-invoice application platform implements the main business logic of blockchain e-invoices and exposes its development SDK (Software Development Kit) and API (Application Programming Interface) interfaces for third parties to access and interact through the reverse proxy service. The blockchain network module can be implemented based on Tencent's underlying blockchain technology (TrustSQL). The caching area can be implemented using a MySQL database. It is understood that this embodiment is for illustrative purposes only and does not limit the implementation method used in a specific implementation.

[0078] The aforementioned data processing method for electronic invoices, upon receiving a tax filing request, can determine the corresponding electronic invoice from the local blockchain node based on the taxpayer identifier in the request, and query the relevant tax filing parameters. The taxpayer blockchain node in the blockchain network can then automatically calculate the tax amount based on the determined electronic invoice and tax filing parameters. It can also provide feedback on the tax amount from the taxpayer requesting end, eliminating the workload of manual calculation. When the taxpayer requesting end receives the tax amount from the connected blockchain node, it can pay the tax according to that amount, without the need for manual calculation of the tax amount, thus improving tax filing efficiency.

[0079] In one embodiment, the method further includes: determining the tax filing period corresponding to this tax filing;

[0080] Select the electronic invoices that correspond to the tax filing period from the determined electronic invoices; use the selected electronic invoices as the electronic invoices for this tax filing.

[0081] The tax filing period refers to the time span involved in this tax filing. For example, the tax filing period for this tax filing is from the 15th of last month to the 15th of this month, and so on. The tax filing period for the next tax filing is from the 15th of this month to the 15th of the following month, and so on.

[0082] Specifically, the blockchain node of the tax filing party can select electronic invoices from the determined electronic invoices that correspond to the tax filing period for this tax filing, and use the selected electronic invoices as the electronic invoices corresponding to this tax filing.

[0083] In one embodiment, selecting electronic invoices corresponding to the tax filing period from the determined electronic invoices includes: selecting electronic invoices whose invoice dates belong to the tax filing period corresponding to this tax filing from a first set of electronic invoices with an invoice identifier that matches the tax filing party identifier; selecting electronic invoices whose reimbursement dates belong to the tax filing period corresponding to this tax filing from a second set of electronic invoices with a recipient identifier that matches the tax filing party identifier; and using the selected electronic invoices as the electronic invoices corresponding to this tax filing.

[0084] In this embodiment, after determining the tax filing period corresponding to this tax filing, the electronic invoices involved in this tax filing can be screened based on the invoice issuance time or invoice reimbursement time of the electronic invoices.

[0085] In one embodiment, the determined electronic invoice is an encrypted electronic invoice, and the method further includes: obtaining the invoice key corresponding to the electronic invoice from the local tax returner's blockchain node; and decrypting the encrypted electronic invoice according to the invoice key to obtain the plaintext electronic invoice.

[0086] Specifically, the determined electronic invoice can be obtained by the tax filing party's blockchain node from its local cache database, or it can be read from its local data block. The electronic invoice read from the data block is an encrypted electronic invoice. The tax filing party's blockchain node can obtain the invoice key corresponding to each electronic invoice from its local database, and decrypt the encrypted electronic invoice according to the invoice key to obtain the plaintext electronic invoice.

[0087] In one embodiment, the invoice key is randomly generated by the invoice-issuing blockchain node corresponding to the issuing party when the electronic invoice is issued. The invoice key can be a symmetric key, meaning that the same key must be used to encrypt the plaintext and decrypt the ciphertext. The tax reporting blockchain node can be an invoice-issuing blockchain node or an invoice-reimbursement blockchain node. When the invoice-issuing blockchain node generates an electronic invoice, it encrypts the invoice information associated with the electronic invoice using the randomly generated invoice key to obtain encrypted invoice information. Then, it uses the public key from the public-private key pair corresponding to the invoice storage server in the cache to encrypt the invoice key, obtaining an encrypted invoice key. The encrypted invoice information and the encrypted invoice key are sent to the invoice storage server. The invoice storage server can then decrypt the invoice using the private key from the public-private key pair to obtain the invoice key, and then use the invoice key to decrypt the electronic invoice to obtain the plaintext electronic invoice. The invoice-issuing blockchain node can also use the public key from the public-private key pair corresponding to the invoice issuer in the cache to encrypt the invoice key, obtaining an encrypted invoice key, which can then be decrypted using the private key. A blockchain node for issuing invoices can send an encrypted invoice key to an invoice issuing server. The invoice issuing server can decrypt the invoice key, sign it with its private key, and send it back to the blockchain node. The blockchain node then verifies the signature using its corresponding public key. If the verification is successful, the invoice key can be stored in its cache. Similarly, a blockchain node for invoice reimbursement can also decrypt encrypted electronic invoices to obtain the plaintext invoice information.

[0088] In one embodiment, the information to be encrypted in an electronic invoice includes the issuer's identifier, issuer's address, issuer's phone number, recipient's identifier, recipient's address, recipient's phone number, invoice amount, issuer's account number, recipient's account number, and invoice status. For example, in the application scenario where the electronic invoice is a blockchain electronic invoice, the fields that need to be encrypted include the buyer's name, buyer's taxpayer ID, seller's name, seller's taxpayer ID, buyer's address, buyer's phone number, buyer's bank account number, seller's address, seller's phone number, seller's bank account number, and indicators such as whether the invoice has been reimbursed and taxed.

[0089] In one embodiment, the method further includes: querying the tax record corresponding to the tax amount and the taxpayer identifier; when a tax record is found, updating the tax status corresponding to the taxpayer identifier to "tax paid"; and recording the taxpayer identifier and the updated tax status to a blockchain node in the blockchain network.

[0090] The tax payment status indicates whether the taxpayer has paid the tax amount as reported by the taxpayer's blockchain node in a timely manner. The tax payment status includes either "tax paid" or "tax payment abnormal." Specifically, after paying the tax amount returned by the taxpayer's blockchain node, the taxpayer can request an update to the tax payment status. The taxpayer's blockchain node can then query the blockchain network for the tax payment record corresponding to the paid tax amount and the taxpayer's identifier. This tax payment record is uploaded to the blockchain network through the invoice management blockchain node. When the taxpayer's blockchain node finds the tax payment record, it updates the tax payment status corresponding to the taxpayer's identifier to "tax paid" and records the taxpayer's identifier and the updated tax payment status on the blockchain node, thus tracking the tax payment behavior of the taxpayer identified by the taxpayer's identifier.

[0091] In one embodiment, the method further includes: querying the tax record corresponding to the tax amount and the taxpayer identifier; when the tax record is found, adding a "tax reported" status to the electronic invoice's status; and recording the electronic invoice and the "tax reported" status to a blockchain node in the blockchain network.

[0092] Specifically, when the blockchain node for the tax filing party finds the tax amount and the tax record corresponding to the taxpayer's identifier for this tax filing, it adds a "tax filed" status to the electronic invoices involved in this tax filing and records this tax filing status and the corresponding electronic invoice to the blockchain network. It can be understood that the same electronic invoice can be used by both the issuing party and the reimbursing party for tax filing; therefore, the blockchain node adding the "tax filed" status to the electronic invoice can be both the invoice issuing blockchain node and the invoice reimbursement blockchain node.

[0093] In this embodiment, by recording the status of the electronic invoice and the tax payment status of the taxpayer identified by the taxpayer identifier through the blockchain network, it is possible to ensure that the status of the electronic invoice is authentic, valid, and cannot be tampered with.

[0094] In one embodiment, each blockchain node in the blockchain network stores electronic invoice issuance conditions, which are used to control electronic invoice issuance behavior based on the blockchain network. The steps for updating the electronic invoice issuance conditions include: when the electronic invoice management server finds that the tax status corresponding to the taxpayer identifier is in an abnormal state, it updates the electronic invoice issuance conditions corresponding to the taxpayer identifier; the electronic invoice management server uploads the updated electronic invoice issuance conditions and the taxpayer identifier to the blockchain nodes in the blockchain network.

[0095] Among them, the conditions for issuing electronic invoices are rules that control the issuance of electronic invoices by taxpayers based on the blockchain network. The conditions for issuing electronic invoices include the single invoice limit, the number of invoices issued per month, the total monthly invoice limit, the total monthly limit for red-ink invoices, the number of red-ink invoices issued per month, the invoice type, and the tax payment status.

[0096] In one embodiment, after verifying the group qualifications of the tax filer, the electronic invoice management platform obtains the entered electronic invoice issuance conditions and sends them to the electronic invoice management server. The electronic invoice management server can initiate a request to the invoice management blockchain node to write the electronic invoice issuance conditions to the blockchain node in the blockchain network. After receiving the request, the invoice management server uploads the obtained electronic invoice issuance conditions, corresponding to the tax filer identifier, to the blockchain node in the blockchain network. The tax filer blockchain node corresponding to the tax filer identifier then sends the information to the invoice management server.

[0097] In one embodiment, when an invoice needs to be issued at the tax filing request end, an invoice request can be initiated to the tax filing party's blockchain node. The invoice request carries invoice information, which includes the invoice issuer identifier, electronic invoice identifier, recipient identifier, and resource transfer share. After receiving the invoice request, the tax filing party's blockchain node can query the electronic invoice issuance conditions corresponding to the tax filing party identifier and verify the legality of the invoice information based on the electronic invoice issuance conditions. Once the invoice information is verified, an electronic invoice is generated based on the invoice information.

[0098] Specifically, the conditions for issuing electronic invoices can be updated. When the electronic invoice management server detects that the tax status corresponding to the taxpayer identifier is abnormal, the tax status in the electronic invoice issuance conditions can be updated to an abnormal status. This can also reduce the monthly number of invoices or the total monthly invoice limit, etc., thereby restricting the issuance of electronic invoices by the taxpayer corresponding to the taxpayer identifier based on the blockchain network.

[0099] like Figure 9 As shown, in a specific embodiment, the data processing method for electronic tickets specifically includes the following steps:

[0100] S902 receives a tax filing request sent by the tax filing request terminal connected to the tax filing party's blockchain node; the tax filing request carries the tax filing party's identifier and electronic invoice query code.

[0101] S904, determine the electronic invoice corresponding to the taxpayer's identifier in the taxpayer's blockchain node; the determined electronic invoice is an encrypted electronic invoice.

[0102] S906 obtains the invoice key corresponding to the electronic invoice from the local tax filing party's blockchain node.

[0103] S908, decrypt the encrypted electronic ticket using the ticket key to obtain the plaintext electronic ticket.

[0104] S910: Select electronic tickets associated with the electronic ticket query code from the determined electronic tickets.

[0105] S912 specifies that the selected electronic invoices shall be used as the electronic invoices corresponding to this tax return; the electronic invoices include the invoice issuer identifier and the recipient identifier.

[0106] S914, query the tax filing parameters associated with the tax filer identifier.

[0107] S916, from the determined electronic invoices, select a first electronic invoice with an invoice identifier that matches the taxpayer identifier, and select a second electronic invoice with a recipient identifier that matches the taxpayer identifier.

[0108] S918, calculate the first amount of the first electronic bill and the second amount of the second electronic bill.

[0109] S920 determines the corresponding tax amount for the tax filing request based on the tax filing parameters, the first amount, and the second amount.

[0110] S922, responding to a tax filing request by sending the tax amount back to the requesting end.

[0111] S924, query the tax records corresponding to the tax amount and the taxpayer identifier.

[0112] S926, when a tax record is found, update the tax status corresponding to the tax reporting party identifier to "tax paid".

[0113] S928 records the taxpayer's identifier and updated tax status to the blockchain node in the blockchain network.

[0114] S930: When a tax record is found, add a "tax paid" status to the electronic invoice's status.

[0115] S932 records the electronic invoices and their corresponding tax reporting status to blockchain nodes in the blockchain network.

[0116] The aforementioned data processing method for electronic invoices, upon receiving a tax filing request from the requesting party, can determine the corresponding electronic invoice from the local blockchain node based on the taxpayer identifier in the request, and query the relevant tax filing parameters. The taxpayer blockchain node in the blockchain network can then automatically calculate the tax amount based on the determined electronic invoice and tax filing parameters, and feed back the tax amount to the requesting party, eliminating the workload of manual calculation. When the requesting party receives the tax amount fed back by the connected blockchain node, it can pay the tax according to the tax amount, without the need for manual calculation of the tax amount, thus improving tax filing efficiency.

[0117] In one embodiment, such as Figure 10 As shown, a data processing device 1000 for electronic invoices is provided, applied to a tax-reporting blockchain node in a blockchain network. The device includes a receiving module 1002, a determining module 1004, a querying module 1006, and a statistics module 1008, wherein:

[0118] The receiving module 1002 is used to receive tax filing requests; the tax filing request carries the taxpayer identifier.

[0119] The determination module 1004 is used to determine the electronic invoice corresponding to the tax returner's identifier.

[0120] The query module 1006 is used to query the tax filing parameters associated with the tax filing party identifier.

[0121] The statistics module 1008 is used to calculate the corresponding tax amount based on electronic invoices and tax filing parameters.

[0122] In one embodiment, the apparatus may further include a feedback module, which is used to provide feedback on the tax amount to the tax filing requesting end in response to the tax filing request.

[0123] In one embodiment, the tax filing request carries an electronic invoice query code, which is a hash value generated based on the invoice information and status of the corresponding electronic invoice. The data processing device for electronic invoices also includes an electronic invoice filtering module, which is further used to filter electronic invoices associated with the electronic invoice query code from the determined electronic invoices. The filtered electronic invoices are used as the electronic invoices corresponding to this tax filing.

[0124] In one embodiment, the data processing device for electronic invoices further includes an electronic invoice filtering module, which is used to determine the tax filing period corresponding to this tax filing; filter electronic invoices corresponding to the tax filing period from the determined electronic invoices; and use the filtered electronic invoices as the electronic invoices corresponding to this tax filing.

[0125] In one embodiment, the determined electronic invoice is an encrypted electronic invoice, and the data processing device for the electronic invoice further includes a decryption module. The decryption module is used to obtain the invoice key corresponding to the electronic invoice from the local tax returner's blockchain node; and to decrypt the encrypted electronic invoice according to the invoice key to obtain the plaintext electronic invoice.

[0126] In one embodiment, the electronic invoice includes an issuer identifier and a recipient identifier; the statistics module 1008 is further configured to: filter from the determined electronic invoices a first electronic invoice having an issuer identifier that matches the tax returner identifier, and filter a second electronic invoice having a recipient identifier that matches the tax returner identifier; calculate a first amount of the first electronic invoice and a second amount of the second electronic invoice; and determine the corresponding tax amount based on the tax return parameters, the first amount, and the second amount.

[0127] In one embodiment, tax filing parameters are obtained through an electronic invoice management server. The electronic invoice management server is used to obtain the tax filing parameters entered and corresponding to the taxpayer identifier, and to initiate a request to the invoice management blockchain node corresponding to the electronic invoice management server to upload the tax filing parameters to the blockchain network. The invoice management blockchain node is used to perform identity verification based on the received request, and after successful verification, to trigger consensus on the tax filing parameters in the blockchain network, and after successful consensus, to trigger the association and recording of the tax filing parameters with the taxpayer identifier in the blockchain node in the blockchain network. The blockchain nodes in the blockchain network include the invoice management blockchain node and the taxpayer blockchain node.

[0128] In one embodiment, the data processing device for electronic invoices further includes a tax status update module, which is used to query the tax records corresponding to the tax amount and the taxpayer identifier; when a tax record is found, the tax status corresponding to the taxpayer identifier is updated to "tax paid"; and the taxpayer identifier and the updated tax status are recorded to the blockchain node in the blockchain network.

[0129] In one embodiment, the data processing device for electronic invoices further includes an invoice status update module, which is used to query the tax records corresponding to the tax amount and the taxpayer identifier; when a tax record is found, a "tax reported" status is added to the invoice status of the electronic invoice; and the electronic invoice and the "tax reported" status are recorded to the blockchain node in the blockchain network.

[0130] In one embodiment, each blockchain node in the blockchain network stores electronic invoice issuance conditions, which are used to control electronic invoice issuance behavior based on the blockchain network. The electronic invoice issuance conditions are updated through an electronic management server, which updates the electronic invoice issuance conditions corresponding to the taxpayer identifier when it finds that the tax status corresponding to the taxpayer identifier is in an abnormal state. The updated electronic invoice issuance conditions and the taxpayer identifier are then uploaded to the blockchain nodes in the blockchain network.

[0131] The aforementioned data processing device for electronic invoices, upon receiving a tax filing request, can determine the corresponding electronic invoice from the local blockchain node based on the taxpayer identifier in the request, and query the relevant tax filing parameters. The taxpayer blockchain node in the blockchain network can then automatically calculate the tax amount based on the determined electronic invoice and tax filing parameters, and can also provide feedback on the tax amount to the taxpayer requesting end, eliminating the workload of manual calculation. When the taxpayer requesting end receives the tax amount feedback from the connected blockchain node, it can pay the tax according to that tax amount, without the need for manual calculation of the tax amount, thus improving tax filing efficiency.

[0132] Figure 11 An internal structural diagram of a computer device in one embodiment is shown. Specifically, this computer device may be... Figure 1 The tax reporting blockchain node 110. (For example...) Figure 11 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement a data processing method for electronic documents. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to implement a data processing method for electronic documents.

[0133] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0134] In one embodiment, the data processing apparatus 1000 for electronic tickets provided in this application can be implemented as a computer program, which can be implemented in, for example... Figure 11The computer device shown operates on this device. The computer device's memory can store the various program modules that make up the data processing apparatus 1000 of the electronic ticket, for example, Figure 10 The receiving module 1002, determining module 1004, querying module 1006, and statistics module 1008 are shown. The computer program comprised of these modules causes the processor to execute the steps of the data processing methods for electronic tickets described in the various embodiments of this application.

[0135] For example, Figure 11 The computer device shown can be used as follows Figure 10 The receiving module 1002 in the data processing apparatus 1000 for electronic tickets shown executes step S202. The computer device can execute step S204 via the determining module 1004. The computer device can execute step S206 via the query module 1006. The computer device can execute step S208 via the statistics module 1008.

[0136] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the following steps: receiving a tax filing request; the tax filing request carrying a taxpayer identifier; determining an electronic invoice corresponding to the taxpayer identifier; querying tax filing parameters associated with the taxpayer identifier; and calculating the corresponding tax amount based on the electronic invoice and the tax filing parameters.

[0137] In one embodiment, the tax filing request carries an electronic invoice query code, which is a hash value generated based on the invoice information and status of the corresponding electronic invoice. When the computer program is executed by the processor, the processor performs the following steps: filtering electronic invoices associated with the electronic invoice query code from the determined electronic invoices; and using the filtered electronic invoices as the electronic invoices corresponding to this tax filing.

[0138] In one embodiment, when a computer program is executed by a processor, the processor specifically performs the following steps: determining the tax filing period corresponding to this tax filing; selecting electronic invoices from the determined electronic invoices that correspond to the tax filing period; and using the selected electronic invoices as the electronic invoices corresponding to this tax filing.

[0139] In one embodiment, the determined electronic invoice is an encrypted electronic invoice. When the computer program is executed by the processor, the processor also performs the following steps: obtaining the invoice key corresponding to the electronic invoice from the local tax returner's blockchain node; and decrypting the encrypted electronic invoice using the invoice key to obtain the plaintext electronic invoice.

[0140] In one embodiment, the electronic invoice includes an issuer identifier and a recipient identifier; when a computer program is executed by a processor to calculate the corresponding tax amount based on the electronic invoice and tax filing parameters, the processor performs the following steps: from the determined electronic invoices, filtering out a first electronic invoice with an issuer identifier that matches the tax filing identifier, and filtering out a second electronic invoice with a recipient identifier that matches the tax filing identifier; calculating a first amount for the first electronic invoice and a second amount for the second electronic invoice; and determining the corresponding tax amount based on the tax filing parameters, the first amount, and the second amount.

[0141] In one embodiment, the step of generating tax reporting parameters includes: the electronic invoice management server obtaining the tax reporting parameters corresponding to the tax reporting party identifier, and initiating a request to the invoice management party blockchain node corresponding to the electronic invoice management server to upload the tax reporting parameters to the blockchain network; the invoice management party blockchain node performs identity verification based on the received request, and after successful verification, triggers consensus on the tax reporting parameters in the blockchain network, and after successful consensus, triggers the association and recording of the tax reporting parameters with the tax reporting party identifier in the blockchain node of the blockchain network; wherein, the blockchain node in the blockchain network includes the invoice management party blockchain node and the tax reporting party blockchain node.

[0142] In one embodiment, when the computer program is executed by the processor, the processor specifically performs the following steps: querying the tax record corresponding to the tax amount and the taxpayer identifier; when the tax record is found, updating the tax status corresponding to the taxpayer identifier to "tax paid"; and recording the taxpayer identifier and the updated tax status to the blockchain node in the blockchain network.

[0143] In one embodiment, when a computer program is executed by a processor, the processor specifically performs the following steps: querying the tax record corresponding to the tax amount and the taxpayer identifier; when a tax record is found, adding a "tax reported" status to the electronic invoice's status; and recording the electronic invoice and the "tax reported" status to a blockchain node in the blockchain network.

[0144] In one embodiment, each blockchain node in the blockchain network stores electronic invoice issuance conditions, which are used to control electronic invoice issuance behavior based on the blockchain network. The steps for updating the electronic invoice issuance conditions include: when the electronic invoice management server finds that the tax status corresponding to the taxpayer identifier is in an abnormal state, it updates the electronic invoice issuance conditions corresponding to the taxpayer identifier; the electronic invoice management server uploads the updated electronic invoice issuance conditions and the taxpayer identifier to the blockchain nodes in the blockchain network.

[0145] Upon receiving a tax filing request, the aforementioned computer equipment can determine the corresponding electronic invoice from the local blockchain node based on the taxpayer identifier in the request, and query the relevant tax filing parameters. The taxpayer blockchain node in the blockchain network can then automatically calculate the tax amount based on the determined electronic invoice and tax filing parameters, and can also provide feedback on the tax amount to the taxpayer requesting end, eliminating the workload of manual calculation. When the taxpayer requesting end receives the tax amount fed back by the connected blockchain node, it can pay the tax according to the tax amount, without the need for manual calculation of the tax amount, thus improving tax filing efficiency.

[0146] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon. When executed by a processor, the computer program causes the processor to perform the following steps: receiving a tax filing request; the tax filing request carrying a taxpayer identifier; determining an electronic invoice corresponding to the taxpayer identifier; querying tax filing parameters associated with the taxpayer identifier; and calculating the corresponding tax amount based on the electronic invoice and the tax filing parameters.

[0147] In one embodiment, the tax filing request carries an electronic invoice query code, which is a hash value generated based on the invoice information and status of the corresponding electronic invoice. When the computer program is executed by the processor, the processor performs the following steps: filtering electronic invoices associated with the electronic invoice query code from the determined electronic invoices; and using the filtered electronic invoices as the electronic invoices corresponding to this tax filing.

[0148] In one embodiment, when a computer program is executed by a processor, the processor specifically performs the following steps: determining the tax filing period corresponding to this tax filing; selecting electronic invoices from the determined electronic invoices that correspond to the tax filing period; and using the selected electronic invoices as the electronic invoices corresponding to this tax filing.

[0149] In one embodiment, the determined electronic invoice is an encrypted electronic invoice. When the computer program is executed by the processor, the processor also performs the following steps: obtaining the invoice key corresponding to the electronic invoice from the local tax returner's blockchain node; and decrypting the encrypted electronic invoice using the invoice key to obtain the plaintext electronic invoice.

[0150] In one embodiment, the electronic invoice includes an issuer identifier and a recipient identifier; when a computer program is executed by a processor to calculate the corresponding tax amount based on the electronic invoice and tax filing parameters, the processor performs the following steps: from the determined electronic invoices, filtering out a first electronic invoice with an issuer identifier that matches the tax filing identifier, and filtering out a second electronic invoice with a recipient identifier that matches the tax filing identifier; calculating a first amount for the first electronic invoice and a second amount for the second electronic invoice; and determining the corresponding tax amount based on the tax filing parameters, the first amount, and the second amount.

[0151] In one embodiment, the step of generating tax reporting parameters includes: the electronic invoice management server obtaining the tax reporting parameters corresponding to the tax reporting party identifier, and initiating a request to the invoice management party blockchain node corresponding to the electronic invoice management server to upload the tax reporting parameters to the blockchain network; the invoice management party blockchain node performs identity verification based on the received request, and after successful verification, triggers consensus on the tax reporting parameters in the blockchain network, and after successful consensus, triggers the association and recording of the tax reporting parameters with the tax reporting party identifier in the blockchain node of the blockchain network; wherein, the blockchain node in the blockchain network includes the invoice management party blockchain node and the tax reporting party blockchain node.

[0152] In one embodiment, when the computer program is executed by the processor, the processor specifically performs the following steps: querying the tax record corresponding to the tax amount and the taxpayer identifier; when the tax record is found, updating the tax status corresponding to the taxpayer identifier to "tax paid"; and recording the taxpayer identifier and the updated tax status to the blockchain node in the blockchain network.

[0153] In one embodiment, when a computer program is executed by a processor, the processor specifically performs the following steps: querying the tax record corresponding to the tax amount and the taxpayer identifier; when a tax record is found, adding a "tax reported" status to the electronic invoice's status; and recording the electronic invoice and the "tax reported" status to a blockchain node in the blockchain network.

[0154] In one embodiment, each blockchain node in the blockchain network stores electronic invoice issuance conditions, which are used to control electronic invoice issuance behavior based on the blockchain network; the updated invoice status is used to instruct the electronic invoice management server to update the electronic invoice issuance conditions corresponding to the taxpayer identifier when the electronic invoice management server finds that the tax status corresponding to the taxpayer identifier is in an abnormal state; the electronic invoice management server uploads the updated electronic invoice issuance conditions and the taxpayer identifier to the blockchain nodes in the blockchain network.

[0155] Upon receiving a tax filing request, the aforementioned computer-readable storage medium can determine the corresponding electronic invoice from the local blockchain node based on the taxpayer identifier in the tax filing request, and query the corresponding tax filing parameters. The taxpayer blockchain node in the blockchain network can then automatically calculate the tax amount based on the determined electronic invoice and tax filing parameters, and can also feed back the tax amount to the taxpayer requesting end, eliminating the workload of manual calculation. When the taxpayer requesting end receives the tax amount fed back by the connected blockchain node, it can pay the tax according to the tax amount, without the need for manual calculation of the tax amount, thus improving tax filing efficiency.

[0156] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. 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 various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0157] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0158] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A data processing method for electronic invoices, executed by a tax-reporting blockchain node in a blockchain network, wherein the blockchain network comprises at least four blockchain nodes forming a consortium blockchain: a blockchain node corresponding to an electronic invoice management server, a blockchain node corresponding to an invoicing company, a blockchain node corresponding to a blockchain electronic invoice storage server, and a blockchain node corresponding to a reimbursement company; the electronic invoice management server synchronizes data in real time from the corresponding blockchain node corresponding to the electronic invoice management server using a synchronization tool, for managing the application, issuance, reimbursement, and tax reporting of electronic invoices, wherein the tax-reporting blockchain node is either the blockchain node corresponding to the invoicing company or the blockchain node corresponding to the reimbursement company; the method includes: The system receives a tax filing request sent by a tax filing request client connected to the tax filing party's blockchain node. The tax filing request is signed with the private key in the public-private key pair corresponding to the tax filing party's identifier. The tax filing request carries the tax filing party's identifier and an electronic invoice query code. The tax filing party's identifier is a digital certificate assigned to the tax filing party by the electronic invoice management server. The digital certificate is generated by the electronic invoice management server in response to the tax filing party's registration request through the tax filing request client, after generating a corresponding public-private key pair for the tax filing party, based on the public key in the public-private key pair and the tax filing party's identity information. The electronic invoice query code is a hash value generated based on the electronic invoice's invoice information and invoice status. The invoice status includes at least one of "issued," "reimbursed," and "tax filed." The tax filing request is verified using the public key in the public-private key pair corresponding to the tax filing party identifier. After the signature verification is successful, the electronic invoice corresponding to the taxpayer identifier is read from the local data block. The electronic invoice is issued or received by the tax filing request terminal connected to the taxpayer blockchain node. When issuing the electronic invoice, the tax filing request terminal queries the invoice identifier of the electronic invoice that is bound to the taxpayer identifier but has not been issued. Based on the entered invoice information and the invoice identifier, the electronic invoice is issued and bound to the user information and recorded in the blockchain node corresponding to the blockchain electronic invoice storage server in the blockchain network. The electronic invoice that is bound to the taxpayer identifier but has not been issued is generated by the electronic invoice management server in response to the tax filing request terminal's request for electronic invoices. The server binds the invoice identifier of the available electronic invoices to the taxpayer identifier corresponding to the tax filing request terminal and records it in the blockchain node corresponding to the invoicing enterprise in the blockchain network. Based on the electronic invoice query code carried in the tax filing request, electronic invoices associated with the electronic invoice query code are filtered from the read electronic invoices, and the filtered electronic invoices are used as the electronic invoices corresponding to this tax filing. The process of generating the tax return parameters includes: querying the local data block for the tax return parameters associated with the tax return identifier; the electronic invoice management server obtaining the entered tax return parameters corresponding to the tax return identifier and initiating a request to the invoice management blockchain node corresponding to the electronic invoice management server to upload the tax return parameters to the blockchain network; the invoice management blockchain node performing identity verification based on the received request; and after successful verification, initiating a consensus request for the tax return parameters carrying the identity information of the invoice management blockchain node to the blockchain node related to the tax return parameters; and when the number of blockchain nodes related to the tax return parameters that have successfully verified the identity information is greater than a threshold, the consensus is confirmed to be successful, and the tax return parameters are written into the blockchain network. The corresponding tax amount is calculated based on the electronic invoice and the tax filing parameters. When a tax record corresponding to the declared tax amount and the declared taxpayer identifier is found, then Update the tax status corresponding to the tax filing party identifier to "tax paid", and record the tax filing party identifier and the updated tax status to the blockchain node in the blockchain network; Add a "tax paid" status to the electronic invoice's status, and record the electronic invoice and the corresponding "tax paid" status to the blockchain node in the blockchain network.

2. The method according to claim 1, characterized in that, The method further includes: Determine the tax filing period corresponding to this tax filing; Select electronic invoices from the determined electronic invoices that correspond to the tax filing period; The selected electronic invoices will be used as the electronic invoices for this tax filing.

3. The method according to claim 1, characterized in that, The electronic ticket being read is an encrypted electronic ticket, and the method further includes: Obtain the invoice key corresponding to the electronic invoice from the local tax filing party's blockchain node; The encrypted electronic ticket is decrypted using the ticket key to obtain the plaintext electronic ticket.

4. The method according to claim 1, characterized in that, The electronic invoice includes an issuer identifier and a recipient identifier; The step of calculating the corresponding tax amount based on the electronic invoice and the tax filing parameters includes: From the determined electronic invoices, a first electronic invoice with an invoice identifier that matches the tax returner identifier is selected, and a second electronic invoice with a recipient identifier that matches the tax returner identifier is selected. Calculate the first amount of the first electronic invoice and the second amount of the second electronic invoice; The corresponding tax amount is determined based on the tax parameters, the first amount, and the second amount.

5. The method according to claim 1, characterized in that, The steps for generating the tax returner identifier include: The tax filing request client initiates a registration request to the electronic invoice management server. The electronic invoice management server verifies the taxpayer's qualifications based on the taxpayer's identity information carried in the registration request; when the verification is successful, a taxpayer identifier corresponding to the taxpayer is generated. The electronic invoice management server returns the taxpayer's identifier to the taxpayer requesting end.

6. The method according to claim 1, characterized in that, The method further includes: The tax amount is recorded in the blockchain node of the blockchain network, so that when the bill management blockchain node in the blockchain network receives the tax amount, it feeds back the tax amount to the electronic bill management server connected to the bill management blockchain node, and the electronic bill management server performs tax deduction processing on the tax payer corresponding to the tax payer identifier based on the tax amount.

7. The method according to any one of claims 1 to 6, characterized in that, Each blockchain node in the blockchain network stores electronic invoice issuance conditions, which are used to control electronic invoice issuance behavior based on the blockchain network. The steps for updating the conditions for issuing electronic invoices include: When the electronic invoice management server finds that the tax status corresponding to the tax filing party identifier is in an abnormal state, it updates the electronic invoice issuance conditions corresponding to the tax filing party identifier. The electronic invoice management server uploads the updated electronic invoice issuance conditions and the corresponding tax returner identifier to the blockchain node in the blockchain network.

8. A data processing device for electronic invoices, applied to a tax-reporting blockchain node in a blockchain network, wherein the blockchain network comprises at least the following four blockchain nodes forming a consortium blockchain: a blockchain node for invoice management corresponding to an electronic invoice management server, a blockchain node for invoicing enterprises, a blockchain node for electronic invoice storage server, and a blockchain node for reimbursement enterprises; the electronic invoice management server synchronizes data in real time from the corresponding blockchain node for invoice management using a synchronization tool, for managing the application, issuance, reimbursement, and tax reporting of electronic invoices, wherein the tax-reporting blockchain node is either the blockchain node corresponding to the invoicing enterprise or the blockchain node corresponding to the reimbursement enterprise; the device comprises: The receiving module is used to receive tax filing requests sent by the tax filing request terminal connected to the tax filing party's blockchain node. The tax filing request is signed with the private key in the public-private key pair corresponding to the tax filing party's identifier. The tax filing request carries the tax filing party's identifier and an electronic invoice query code. The tax filing party's identifier is a digital certificate assigned to the tax filing party by the electronic invoice management server. The digital certificate is generated by the electronic invoice management server in response to the tax filing party's registration request through the tax filing request terminal, after generating a corresponding public-private key pair for the tax filing party, based on the public key in the public-private key pair and the tax filing party's identity information. The electronic invoice query code is a hash value generated based on the electronic invoice's invoice information and invoice status. The invoice status includes at least one of "issued," "reimbursed," and "tax filed." The determination module is used to verify the tax filing request using the public key in the public-private key pair corresponding to the tax filing party identifier. After successful verification, it reads the electronic invoice corresponding to the tax filing party identifier from the local data block. This electronic invoice is issued or received by the tax filing request terminal connected to the tax filing party's blockchain node. When issuing the electronic invoice, the tax filing request terminal queries the invoice identifier of the electronic invoice bound to the tax filing party identifier that has not yet been issued. Based on the entered invoice information and the invoice identifier, it issues the electronic invoice, binds it to user information, and records it in the blockchain network as part of the blockchain electronic invoice. The electronic invoices that are stored on the blockchain node corresponding to the server and are bound to the taxpayer identifier but have not yet been issued are generated by the electronic invoice management server in response to the taxpayer's request for electronic invoices. The server binds the invoice identifier of the available electronic invoices to the taxpayer identifier corresponding to the taxpayer's identifier and records it to the blockchain node corresponding to the invoicing company in the blockchain network. Based on the electronic invoice query code carried in the taxpayer request, the server filters out electronic invoices associated with the electronic invoice query code from the read electronic invoices and uses the filtered electronic invoices as the electronic invoices corresponding to this taxpayer filing. The query module is used to query the tax filing parameters associated with the tax filing party identifier from the local data block. The tax filing parameter generation step includes: the electronic invoice management server obtains the tax filing parameters corresponding to the tax filing party identifier that have been entered, and initiates a request to the invoice management party blockchain node corresponding to the electronic invoice management server to upload the tax filing parameters to the blockchain network. The invoice management party blockchain node performs identity verification based on the received request, and after successful verification, initiates a tax filing parameter consensus request carrying the identity information of the invoice management party blockchain node to the blockchain node related to the tax filing parameters. When the number of blockchain nodes related to the tax filing parameters that have successfully verified the identity information is greater than a threshold, the consensus is confirmed to be successful, and the tax filing parameters are written to the blockchain network. The statistics module is used to calculate the corresponding tax amount based on the electronic invoice and the tax filing parameters; The status update module is used to update the tax status corresponding to the tax returner identifier to "tax paid" when a tax record corresponding to the tax returner identifier is found, and to record the tax returner identifier and the updated tax status in the blockchain node of the blockchain network; and to add the "tax paid" status to the electronic invoice status, and to record the electronic invoice and the "tax paid" status in the blockchain node of the blockchain network.

9. The apparatus according to claim 8, characterized in that, The device further includes: an electronic invoice filtering module, used to determine the tax filing period corresponding to this tax filing; and to filter electronic invoices corresponding to the tax filing period from the determined electronic invoices.

10. The apparatus according to claim 8, characterized in that, The electronic invoice being read is an encrypted electronic invoice. The device further includes: a decryption module, used to obtain the invoice key corresponding to the electronic invoice from the local tax returner's blockchain node; and to decrypt the encrypted electronic invoice using the invoice key to obtain the plaintext electronic invoice.

11. The apparatus according to claim 8, characterized in that, The electronic invoice includes an issuer identifier and a recipient identifier; the statistics module is also used to filter from the determined electronic invoices a first electronic invoice with an issuer identifier that matches the tax returner identifier, and to filter a second electronic invoice with a recipient identifier that matches the tax returner identifier. Calculate the first amount of the first electronic invoice and the second amount of the second electronic invoice; The corresponding tax amount is determined based on the tax parameters, the first amount, and the second amount.

12. The apparatus according to claim 8, characterized in that, The device further includes a tax reporting and recording module, used to record the tax reporting and recording amount in the blockchain node of the blockchain network, so that when the bill management blockchain node in the blockchain network receives the tax reporting and recording amount, it feeds back the tax reporting and recording amount to the electronic bill management server connected to the bill management blockchain node, and the electronic bill management server performs tax deduction processing on the taxpayer corresponding to the taxpayer identifier based on the tax reporting and recording amount.

13. A computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the method as claimed in any one of claims 1 to 7.

14. 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 as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • New stock / share / bond innovation using principle mined cryptographic currency / digital mining assets / commodities which secondary mine for stock / share / bond holders on / using the Blockchain / any chain / shared ledger on a cryptographic currency / digital mining assets / commodities exchange.

    AU2016100178A4

  • Management method, apparatus and system used for improving bill trading security

    CN107369008A

  • Tax control method and system based on credit investigation

    CN106355488A

  • Tax processing system based on block chain and method thereof

    CN108288222A