Electronic invoice tax reporting processing method, device, terminal and storage medium
By using SPV nodes in the blockchain system to process electronic invoice tax returns, it solves the problems of merchants' complicated tax return processes and difficulty in ensuring data integrity, and achieves an efficient and reliable tax return process.
Patent Information
- Application Number
- CN201910894713.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-20
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2039-12-29
AI Technical Summary
In the existing technology, merchants need to go to the tax bureau to handle business when filing taxes. The process is complex, the materials are numerous, and the review is cumbersome, and the tax bureau is difficult to ensure data integrity, which makes it difficult to know the situation of tax filings less.
Using the blockchain system, a tax declaration request is sent through the service provider SPV node, and the electronic invoice amount is obtained and verified. If it passes, it is stored in the consensus node and the tax bureau SPV node, and the tax amount is calculated and sent to the service provider SPV node.
It improves the efficiency and reliability of tax filing, reduces the investment in human resources, and ensures the integrity and consistency of data.
Smart Images

Figure CN110597915B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, terminal and storage medium for processing electronic invoice tax declaration. Background Art
[0002] At present, when businesses file tax returns, they need to go to the tax bureau and other departments to handle the business in person. The process is relatively complicated, and a lot of materials need to be submitted. At the same time, the review process is also very cumbersome. In addition, the tax bureau cannot guarantee the integrity of the data during the review process. For example, some businesses underreport taxes, and the tax bureau has no way of knowing. Summary of the invention
[0003] The embodiments of the present application provide a method, device, terminal and storage medium for processing electronic invoice tax declaration, which can improve the efficiency and reliability of tax declaration.
[0004] A first aspect of an embodiment of the present application provides a method for processing electronic invoice tax declaration, which is applied to a blockchain device, including:
[0005] Receiving a tax reporting request sent by a service provider SPV node, the tax reporting request carrying the service provider SPV node identifier, the tax reporting request being used to instruct obtaining a tax amount of an electronic invoice matching the service provider SPV node identifier;
[0006] Obtaining the amount of the electronic invoice issued by the SPV node of the service provider within a preset time according to the SPV node identifier of the service provider;
[0007] Verifying the service provider SPV node identifier and the amount of the electronic invoice;
[0008] If the service provider SPV node identifier and the amount of the electronic invoice are verified, the total amount of the electronic invoice is obtained, and the service provider SPV node identifier and the total amount of the electronic invoice are stored on each consensus node and synchronously stored in the tax bureau SPV node;
[0009] Receive the tax amount of the electronic invoice sent by the tax bureau SPV node, and send the tax amount of the electronic invoice to the service provider SPV node in response to the tax reporting request, wherein the tax amount is calculated by the tax bureau SPV node based on the total amount of the stored electronic invoice.
[0010] The consensus node includes a first consensus node, and obtaining the amount of the electronic invoice issued by the service provider SPV node within a preset time according to the service provider SPV node identifier includes:
[0011] Sending a request to the first consensus node, the request carrying the service provider SPV node identifier, the request being used to instruct obtaining an electronic invoice issued by the service provider SPV node;
[0012] Receive the amount of the electronic invoice issued by the service provider SPV node within the preset time and sent by the first consensus node, wherein the amount of the electronic invoice issued by the service provider SPV node within the preset time and sent by the first consensus node is the amount of the electronic invoice issued by the service provider SPV node within the preset time obtained by the first consensus node in real time, and the first consensus node obtains the identifier of the electronic invoice issued by the service provider SPV node within the preset time, and compares the identifier of the issued electronic invoice with the identifier of the electronic invoice distributed to the service provider SPV node within the preset time one by one, and confirms that the identifier of the issued electronic invoice is completely consistent with the identifier of the distributed electronic invoice.
[0013] Optionally, the verifying the service provider SPV node identifier and the amount of the electronic invoice includes:
[0014] According to the service provider SPV node identifier and the mapping relationship between the preset node identifier and the node level, the node level corresponding to the service provider SPV node identifier is obtained;
[0015] Confirming the invoice grade corresponding to the amount according to the amount of the electronic invoice;
[0016] Obtaining a verification level according to the node level corresponding to the service provider SPV node identifier and the invoice level corresponding to the amount;
[0017] Acquire a consensus mechanism corresponding to the verification level, wherein the verification level corresponds to the consensus mechanism one-to-one;
[0018] The service provider SPV node identifier and the amount of the electronic invoice are verified according to the consensus mechanism.
[0019] Optionally, after verifying the service provider SPV node identifier and the amount of the electronic invoice, and before confirming that the verification of the service provider SPV node identifier and the amount of the electronic invoice has passed, the process includes:
[0020] Obtaining the results of verification by each consensus node on the service provider SPV node identifier and the amount of the electronic invoice;
[0021] The result obtained is the number of consensus nodes that have passed the verification;
[0022] According to the obtained consensus mechanism, confirm whether the number of consensus nodes that have passed the verification meets the requirement;
[0023] If the number of consensus nodes that pass the verification meets the requirement, it triggers confirmation that the service provider's SPV node identifier and the amount of the electronic invoice have passed the verification.
[0024] Optionally, the method further includes:
[0025] Confirm whether the service provider's SPV node has completed tax reporting;
[0026] If completed, a request is sent to each consensus node, the request carries the service provider SPV node identifier, and the request is used to instruct each consensus node to delete the stored information on the amount of electronic invoices issued by the service provider SPV node within a preset time.
[0027] A second aspect of an embodiment of the present application provides a device for processing electronic invoice tax returns, including:
[0028] A request receiving module, used for receiving a tax reporting request sent by a service provider SPV node, wherein the tax reporting request carries the service provider SPV node identifier, and the tax reporting request is used for indicating the tax amount of an electronic invoice matching the service provider SPV node identifier;
[0029] An amount acquisition module, used to acquire the amount of the electronic invoice issued by the service provider SPV node within a preset time according to the service provider SPV node identifier;
[0030] An information verification module, used to verify the service provider SPV node identifier and the amount of the electronic invoice;
[0031] A synchronous storage module is used to obtain the total amount of the electronic invoice if the service provider SPV node identifier and the amount of the electronic invoice are verified, and store the service provider SPV node identifier and the total amount of the electronic invoice on each consensus node, and synchronously store them to the tax bureau SPV node;
[0032] The tax amount sending module is used to receive the tax amount of the electronic invoice sent by the tax bureau SPV node, and send the tax amount of the electronic invoice to the service provider SPV node in response to the tax reporting request, wherein the tax amount is calculated by the tax bureau SPV node based on the total amount of the stored electronic invoice.
[0033] Optionally, the information verification module is used to:
[0034] According to the service provider's SPV node identifier and the mapping relationship between the preset node identifier and the node level, the node level corresponding to the service provider's SPV node identifier is obtained; according to the amount of the electronic invoice, the invoice level corresponding to the amount is confirmed; according to the node level corresponding to the service provider's SPV node identifier and the invoice level corresponding to the amount, the verification level is obtained; the consensus mechanism corresponding to the verification level is obtained, wherein the verification level corresponds to the consensus mechanism one-to-one; and the service provider's SPV node identifier and the amount of the electronic invoice are verified according to the consensus mechanism.
[0035] Optionally, the device further includes a data deletion module, configured to:
[0036] Confirm whether the service provider SPV node has completed the tax declaration; if completed, send a request to each consensus node, the request carries the service provider SPV node identifier, and the request is used to instruct each consensus node to delete the stored information of the amount of the electronic invoice issued by the service provider SPV node within a preset time.
[0037] A third aspect of an embodiment of the present application provides a terminal, comprising a processor, an input device, an output device and a memory, wherein the processor, input device, output device and memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the described method.
[0038] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method described.
[0039] Implementing the embodiments of the present application has at least the following beneficial effects:
[0040] Through the embodiment of the present application, the amount of the electronic invoice issued by the service provider SPV node within the preset time is obtained in the blockchain, and then when the service provider SPV node identifier and the amount of the electronic invoice are verified, the total amount of the electronic invoice is obtained, and the service provider SPV node identifier and the total amount of the electronic invoice are stored on each consensus node, and synchronously stored to the tax bureau SPV node; then the tax amount of the electronic invoice sent by the tax bureau SPV node is received and sent to the service provider SPV node. By adopting this method, by obtaining the electronic invoice information stored in the blockchain, and then obtaining the total amount of the verified electronic invoice, the tax amount is obtained so that the merchant can pay it. This method is highly efficient, the data is reliable, and a lot of manpower is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] in:
[0043] Figure 1 A schematic diagram of a data sharing system provided by an embodiment of the present invention;
[0044] Figure 2 It is an interactive schematic diagram of a method for processing electronic invoice tax declaration provided by an embodiment of the present invention;
[0045] Figure 3 It is a flowchart of a method for processing electronic invoice tax declaration provided by an embodiment of the present invention;
[0046] Figure 4 It is a flowchart of a method for processing electronic invoice tax declaration provided by an embodiment of the present invention;
[0047] Figure 5 is a schematic diagram of the structure of a terminal provided by an embodiment of the present invention;
[0048] Figure 6 It is a structural schematic diagram of an electronic invoice tax reporting processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0051] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0052] The related technology of the embodiment of the present invention mentions: Blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, platform product service layer and application service layer.
[0053] The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operation monitoring. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining public and private key generation (account management), key management, and the maintenance of the correspondence between the user's real identity and the blockchain address (authority management), etc., and, under authorization, supervises and audits the transactions of certain real identities and provides risk control rule configuration (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and records valid requests to storage after consensus is reached. For a new business request, the basic service first adapts the interface for parsing and authentication (interface adaptation), and then encrypts the business information through the consensus algorithm (consensus management). The smart contract module is responsible for the registration and issuance of contracts, as well as contract triggering and contract execution. Developers can define the contract logic in a programming language and publish it to the blockchain (contract registration). According to the logic of the contract terms, the key or other events are called to trigger the execution and complete the contract logic. It also provides the function of contract upgrade and cancellation. The operation monitoring module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation and real-time status visualization output of the product during the product release process, such as alarm, network monitoring, node equipment health monitoring, etc.
[0054] The platform product service layer provides the basic capabilities and implementation framework of typical applications. Developers can superimpose business features based on these basic capabilities to complete the blockchain implementation of business logic. The application service layer provides application services based on blockchain solutions for business participants to use.
[0055] SPV is the abbreviation of “Simplified Payment Verification”. Simplified Payment Verification (SPV) makes full use of the structural information of the block and the powerful search ability of the Merkle tree to quickly locate transaction information.
[0056] See also Figure 1 The data sharing system shown, the data sharing system 100 refers to a system for sharing data between nodes, and the data sharing system may include multiple nodes 101, and the multiple nodes 101 may refer to each client in the data sharing system. Each node 101 can receive input information when performing normal work, and maintain the shared data in the data sharing system based on the received input information. In order to ensure the information intercommunication within the data sharing system, there may be an information connection between each node in the data sharing system, and information can be transmitted between nodes through the above information connection. For example, when any node in the data sharing system receives input information, other nodes in the data sharing system obtain the input information according to the consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes in the data sharing system are consistent.
[0057] Each node in the data sharing system has a corresponding node identifier, and each node in the data sharing system can store the node identifiers of other nodes in the data sharing system, so that the generated blocks can be broadcast to other nodes in the data sharing system according to the node identifiers of other nodes. A node identifier list as shown in the following table can be maintained in each node, and the node name and node identifier are stored in the node identifier list accordingly. Among them, the node identifier can be an IP (Internet Protocol, a protocol for interconnecting networks) address and any other information that can be used to identify the node. Table 1 only takes the IP address as an example for illustration.
[0058] Table 1
[0059] Node Name Node ID Node 1 117.114.151.174 Node 2 117.116.189.145 … … Node N 119.123.789.258
[0060] This solution is to solve the problem that merchants currently need to go to the tax bureau and other departments to handle business in person when filing taxes. The process is relatively complicated, and there are many materials to be submitted. At the same time, the review process is also very cumbersome. In addition, the tax bureau cannot guarantee the integrity of the data during the review process. For example, some merchants underreport taxes, and the tax bureau has no way of knowing about it. A method for processing electronic invoice tax filing based on a blockchain system is proposed and applied to the blockchain system. The blockchain system includes consensus nodes and tax bureau SPV nodes, etc. Among them, the tax bureau SPV nodes can govern the service provider SPV nodes in the corresponding area. The above-mentioned tax bureau SPV nodes can represent tax bureaus in different places, and the above-mentioned service provider SPV nodes can be different merchants.
[0061] See also Figure 2 , Figure 2 The present application embodiment provides an interactive schematic diagram of a method for processing electronic invoice tax returns. Figure 2 As shown, it may include a blockchain management device, which may be a server for tax declaration, etc. The blockchain management device includes a number of consensus nodes 101 and a number of tax bureau SPV nodes 102, and the interaction also includes a service provider SPV node 103. The blockchain management device receives a tax declaration request sent by the service provider SPV node 103, the tax declaration request carries the service provider SPV node identifier, and the tax declaration request is used to indicate the tax amount of the electronic invoice matching the service provider SPV node identifier;
[0062] The blockchain management device obtains the amount of the electronic invoice issued by the service provider SPV node 103 within a preset time according to the service provider SPV node identifier; the blockchain management device verifies the service provider SPV node identifier and the amount of the electronic invoice; if the service provider SPV node identifier and the amount of the electronic invoice are verified, the blockchain management device obtains the total amount of the electronic invoice, and stores the service provider SPV node identifier and the total amount of the electronic invoice on each consensus node 101, and synchronously stores them to the tax bureau SPV node 102; the blockchain management device receives the tax amount of the electronic invoice sent by the tax bureau SPV node 102, and sends the tax amount of the electronic invoice to the service provider SPV node 103 in response to the tax reporting request, wherein the tax amount is calculated by the tax bureau SPV node 102 based on the stored total amount of the electronic invoice. This solution obtains the amount of the electronic invoice issued by the service provider SPV node within a preset time in the blockchain, and then obtains the total amount of the electronic invoice when the service provider SPV node identifier and the amount of the electronic invoice are verified, and stores the service provider SPV node identifier and the total amount of the electronic invoice on each consensus node, and synchronously stores them to the tax bureau SPV node; then receives the tax amount of the electronic invoice sent by the tax bureau SPV node and sends it to the service provider SPV node. This method is used to obtain the electronic invoice information stored in the blockchain, and then obtain the total amount of the verified electronic invoice, and then obtain the tax amount for the merchant to pay. This method is highly efficient, the data is reliable, and a lot of manpower is reduced.
[0063] See also Figure 3 , Figure 3 The present application provides a flowchart of a method for processing electronic invoice tax returns. Figure 3 As shown, it may include steps 301-305, which are specifically as follows:
[0064] 301. Receive a tax reporting request sent by a service provider SPV node, where the tax reporting request carries an identifier of the service provider SPV node and is used to instruct to obtain a tax amount of an electronic invoice matching the identifier of the service provider SPV node;
[0065] The above-mentioned service provider SPV node may include a merchant terminal, etc. For example, the blockchain management device receives a tax return request sent by a merchant terminal. The tax return request carries the service provider SPV node identifier, and the node identifier may be an IP address or any other information that can be used to identify the node.
[0066] The above tax declaration request is used to instruct to obtain the tax amount of the electronic invoice matching the SPV node identifier of the service provider so that the merchant can pay according to the tax amount.
[0067] Among them, the blockchain management device can be a server used for tax filing, etc.
[0068] 302. Obtaining the amount of the electronic invoice issued by the SPV node of the service provider within a preset time according to the SPV node identifier of the service provider;
[0069] Among them, the blockchain management device obtains from the blockchain system the amount of the electronic invoice issued by the service provider SPV node corresponding to the service provider SPV node identifier within a preset time based on the service provider SPV node identifier.
[0070] The preset time may be from the last tax return to the current request time, or in units of years or quarters.
[0071] Among them, the amount of the electronic invoice issued by the above-mentioned service provider SPV node within the preset time is completely consistent with the amount of the electronic invoice issued to consumers by the offline service provider SPV node, and is stored synchronously in the blockchain system. That is, when the merchant issues an invoice to the consumer, the blockchain system will store it in real time to ensure the reliability of the data and avoid the inconsistency between the tax amount and the actual total amount of the electronic invoice issued when the merchant reports the tax.
[0072] There are many electronic invoices as mentioned above, which can be obtained in chronological order, or according to the amount of the electronic invoice, etc.
[0073] 303. Verify the service provider SPV node identifier and the amount of the electronic invoice;
[0074] The above verification of the service provider's SPV node identifier and the amount of the electronic invoice is to further improve the security and reliability of the data and avoid errors in the middle.
[0075] Among them, the verification of the service provider's SPV node identifier can be that the blockchain management device sends verification information to the service provider's SPV node according to the service provider's SPV node identifier, or verifies according to a pre-set key, etc.
[0076] The verification of the amount of the electronic invoice can be done by comparing the invoice number of the currently obtained invoice with the invoice number of the pre-distributed preset time to confirm whether there is any missing. For example, if the numbers of the electronic invoices obtained by the merchant for the current quarter are from 0200 to 0500, the above information will be compared with the numbers of the invoices currently obtained from the blockchain system to confirm whether the currently obtained numbers are continuous and whether there are any missing numbers.
[0077] 304. If the service provider SPV node identifier and the amount of the electronic invoice are verified, the total amount of the electronic invoice is obtained, and the service provider SPV node identifier and the total amount of the electronic invoice are stored on each consensus node, and synchronously stored in the tax bureau SPV node;
[0078] When the authenticity of the service provider's SPV node identifier is confirmed by verifying with the service provider's SPV node, and the number of the electronic invoice is consistent and not missing, it is confirmed that the verification of the service provider's SPV node identifier and the amount of the electronic invoice has passed.
[0079] After passing, the total amount is calculated based on the amount of the electronic invoice obtained above, and the service provider SPV node identifier and the total amount of the electronic invoice are stored on each consensus node and synchronously stored in the tax bureau SPV node.
[0080] Among them, the storage is used to instruct each consensus node and the tax bureau SPV node to know that the service provider SPV node has settled the total amount of electronic invoices within the current preset time. When the service provider SPV node obtains the settlement of the total amount of electronic invoices within the current preset time next time, there is no need to obtain the calculation again, and the result can be sent directly, avoiding repeated operations and wasting node resources.
[0081] Among them, the tax bureau SPV node for the above-mentioned synchronous storage can be any tax bureau. There is a preset relationship between the tax bureau SPV node and the service provider SPV node, such as the merchant is within the jurisdiction of the tax bureau.
[0082] 305. Receive the tax amount of the electronic invoice sent by the tax bureau SPV node, and send the tax amount of the electronic invoice to the service provider SPV node in response to the tax reporting request, wherein the tax amount is calculated by the tax bureau SPV node based on the total amount of the stored electronic invoice.
[0083] Among them, after the tax bureau SPV node obtains the total amount of the electronic invoice, it directly obtains the corresponding tax rate according to the service provider SPV node identifier, and then calculates the tax amount corresponding to the service provider SPV node, and sends the tax amount to the blockchain management device. After the blockchain management device receives it, it directly sends it to the service provider SPV node, or directly displays it on the blockchain management device page.
[0084] Through the embodiment of the present application, the amount of the electronic invoice issued by the service provider SPV node within the preset time is obtained in the blockchain, and then when the service provider SPV node identifier and the amount of the electronic invoice are verified, the total amount of the electronic invoice is obtained, and the service provider SPV node identifier and the total amount of the electronic invoice are stored on each consensus node, and synchronously stored to the tax bureau SPV node; then the tax amount of the electronic invoice sent by the tax bureau SPV node is received and sent to the service provider SPV node. By adopting this method, by obtaining the electronic invoice information stored in the blockchain, and then obtaining the total amount of the verified electronic invoice, the tax amount is obtained so that the merchant can pay it. This method is highly efficient, the data is reliable, and a lot of manpower is reduced.
[0085] See also Figure 4 , Figure 4 The present application provides a flowchart of a method for processing electronic invoice tax returns. Figure 4 As shown, it may include steps 401-410, which are as follows:
[0086] 401. Receive a tax reporting request sent by a service provider SPV node, wherein the tax reporting request carries an identifier of the service provider SPV node, and the tax reporting request is used to instruct to obtain a tax amount of an electronic invoice matching the identifier of the service provider SPV node;
[0087] The above-mentioned service provider SPV node may include a merchant terminal, etc. For example, the blockchain management device receives a tax return request sent by a merchant terminal. The tax return request carries the service provider SPV node identifier, and the node identifier may be an IP address or any other information that can be used to identify the node.
[0088] 402. Send a request to the first consensus node, where the request carries the SPV node identifier of the service provider, and the request is used to instruct to obtain an electronic invoice issued by the SPV node of the service provider;
[0089] After receiving the tax return request sent by the merchant terminal, the blockchain management device may send a request to the first consensus node to obtain the electronic invoice issued by the service provider SPV node. The first consensus node may be any consensus node. The consensus node is a node used for consensus. After consensus is reached through the consensus node, the information can be stored in the blockchain system. The consensus node stores all the electronic invoice information corresponding to the service provider SPV node. The information stored in the consensus node is information obtained in real time.
[0090] The validity and reliability of the invoice information can be guaranteed by obtaining the information of the electronic invoice in real time and then verifying and storing it.
[0091] 403. Receive the amount of the electronic invoice issued by the service provider SPV node within the preset time and sent by the first consensus node, wherein the amount of the electronic invoice issued by the service provider SPV node within the preset time and sent by the first consensus node is the amount of the electronic invoice issued by the service provider SPV node within the preset time and obtained by the first consensus node in real time, and the first consensus node obtains the identifier of the electronic invoice issued by the service provider SPV node within the preset time, and compares the identifier of the issued electronic invoice with the identifier of the electronic invoice distributed to the service provider SPV node within the preset time one by one, and confirms that the identifier of the issued electronic invoice is completely consistent with the identifier of the distributed electronic invoice;
[0092] The above method obtains the identifier of the electronic invoice issued by the service provider SPV node within the preset time, and compares the identifier of the issued electronic invoice with the identifier of the electronic invoice distributed to the service provider SPV node within the preset time. The identifier of the electronic invoice can be the number of the electronic invoice, or the barcode of the electronic invoice, etc., which is not specifically limited here.
[0093] By comparing the identification of the electronic invoice issued by the service provider's SPV node within the preset time with the identification of the electronic invoice distributed to the service provider's SPV node by the tax bureau's SPV node within the preset time, such as comparing the numbers, to confirm whether there is any missing. If there is a missing, a request can be sent to the service provider's SPV node to instruct the service provider's SPV node to send proof information. The above proof information can be the identification of an invoice distributed within the preset time but not yet issued, so as to ensure that the distributed and currently obtained electronic invoices are completely consistent, thereby avoiding tax evasion by merchants.
[0094] 404. Verify the service provider SPV node identifier and the amount of the electronic invoice;
[0095] The above-mentioned verification of the service provider's SPV node identifier may be that the blockchain management device sends verification information to the service provider's SPV node according to the service provider's SPV node identifier, or performs verification according to a pre-set key, etc.
[0096] The verification of the amount of the electronic invoice can be done by comparing the invoice number of the currently obtained invoice with the invoice number of the pre-distributed preset time to confirm whether there is any missing. For example, if the numbers of the electronic invoices obtained by the merchant for the current quarter are from 0200 to 0500, the above information will be compared with the numbers of the invoices currently obtained from the blockchain system to confirm whether the currently obtained numbers are continuous and whether there are any missing numbers.
[0097] Specifically, the above step 404 may include steps A11-A15, which are as follows:
[0098] A11. Obtain the node level corresponding to the service provider SPV node identifier according to the service provider SPV node identifier and the mapping relationship between the preset node identifier and the node level;
[0099] The mapping relationship between the preset node identifier and the node level may be divided according to the IP address, or according to the size of the node storage space, etc.
[0100] A12. According to the amount of the electronic invoice, confirm the invoice grade corresponding to the amount;
[0101] The invoice level of the electronic invoice is obtained through the preset mapping relationship between the amount of the electronic invoice and the invoice level.
[0102] Among them, when there are at least two electronic invoices, the invoice grade can be the average of the invoice grades of each electronic invoice, or different weights are obtained according to different amounts, and then the sum of the products of different amounts and corresponding weights is calculated, and the invoice grade of the amount corresponding to the obtained sum is obtained, and the invoice grade of the amount corresponding to the sum is used as the invoice grade of the electronic invoice.
[0103] A13. Obtain the verification level according to the node level corresponding to the SPV node identifier of the service provider and the invoice level corresponding to the amount;
[0104] By obtaining the node level and invoice level, the verification level is obtained;
[0105] These may include:
[0106] Confirm whether the invoice level corresponding to the amount exceeds the preset invoice level p;
[0107] If yes, the verification level is obtained by using a first preset algorithm, where the first preset algorithm is: the node level*w+the invoice level*(1-w), where w is a positive number less than 0.5;
[0108] If the invoice level corresponding to the amount does not exceed the preset invoice level p, a second preset algorithm is used to obtain the verification level, and the second preset algorithm is: the wth power of the node level + the pth power of the invoice level, where p is a positive integer.
[0109] The above is only a specific example, and this solution does not limit the above algorithm.
[0110] A14. Obtain a consensus mechanism corresponding to the verification level, wherein the verification level corresponds to the consensus mechanism one by one;
[0111] By obtaining the verification level, the corresponding consensus mechanism is obtained according to the correspondence between the preset verification level and the consensus mechanism. For example, if the verification level is 5, the corresponding consensus mechanism is that at least 5 nodes are considered to have passed the verification, or at least 80% of the nodes are considered to have passed the verification, etc.
[0112] A15. Verify the service provider's SPV node identifier and the amount of the electronic invoice according to the consensus mechanism.
[0113] 405. Obtain the result of the verification of the service provider SPV node identifier and the amount of the electronic invoice by each consensus node;
[0114] 406. Obtain the number of consensus nodes whose result is passed verification;
[0115] 407. According to the obtained consensus mechanism, confirm whether the number of consensus nodes that have passed the verification meets the requirement;
[0116] If the above consensus mechanism passes verification for at least 80% of the nodes, it is considered passed. Then, the number of consensus nodes that pass verification and the total number of consensus nodes are obtained, and then confirmation is performed.
[0117] 408. If the number of consensus nodes that have passed the verification meets the requirement, then confirm that the verification of the service provider's SPV node identifier and the amount of the electronic invoice has passed;
[0118] 409. Obtain the total amount of the electronic invoice, and store the service provider SPV node identifier and the total amount of the electronic invoice on each consensus node, and synchronously store them on the tax bureau SPV node;
[0119] After the verification is passed, the total amount of the electronic invoice corresponding to the service provider SPV node identification is obtained according to the amount of the electronic invoice. The total amount is then stored on each consensus node and stored on the tax bureau SPV node corresponding to the service provider SPV node. The above correspondence can be a correspondence of regional location.
[0120] 410. Receive the tax amount of the electronic invoice sent by the tax bureau SPV node, and send the tax amount of the electronic invoice to the service provider SPV node in response to the tax reporting request, wherein the tax amount is calculated by the tax bureau SPV node based on the total amount of the stored electronic invoice.
[0121] Among them, after the tax bureau SPV node obtains the total amount of the electronic invoice, it directly obtains the corresponding tax rate according to the service provider SPV node identifier, or obtains a unified tax rate, and then calculates the tax amount corresponding to the service provider SPV node, and sends the tax amount to the blockchain management device. After the blockchain management device receives it, it directly sends it to the service provider SPV node, or directly displays it on the blockchain management device page.
[0122] The method further includes: confirming whether the service provider SPV node has completed tax reporting;
[0123] If completed, a request is sent to each consensus node, the request carries the service provider SPV node identifier, and the request is used to instruct each consensus node to delete the stored information on the amount of electronic invoices issued by the service provider SPV node within a preset time.
[0124] When it is detected that the service provider SPV node has completed the tax payment for the current preset time, a message is sent to each consensus node to instruct each consensus node to delete the stored information on the amount of the electronic invoice issued by the service provider SPV node within the preset time, so as to save storage space and reduce the occupation of node resources.
[0125] Through the embodiment of the present application, the amount of the electronic invoice issued by the service provider SPV node within the preset time is obtained in the blockchain, and then when the service provider SPV node identifier and the amount of the electronic invoice are verified, the total amount of the electronic invoice is obtained, and the service provider SPV node identifier and the total amount of the electronic invoice are stored on each consensus node, and synchronously stored to the tax bureau SPV node; then the tax amount of the electronic invoice sent by the tax bureau SPV node is received and sent to the service provider SPV node. By adopting this method, by obtaining the electronic invoice information stored in the blockchain, and then obtaining the total amount of the verified electronic invoice, the tax amount is obtained so that the merchant can pay it. This method is highly efficient, the data is reliable, and a lot of manpower is reduced.
[0126] For the above embodiments, please refer to Figure 5 , Figure 5 A schematic diagram of the structure of a terminal provided in an embodiment of the present application, as shown in the figure, includes a processor, an input device, an output device and a memory, the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, the processor is configured to call the program instructions, and the program includes instructions for executing the following steps;
[0127] Receiving a tax reporting request sent by a service provider SPV node, the tax reporting request carrying the service provider SPV node identifier, the tax reporting request being used to instruct obtaining a tax amount of an electronic invoice matching the service provider SPV node identifier;
[0128] Obtaining the amount of the electronic invoice issued by the SPV node of the service provider within a preset time according to the SPV node identifier of the service provider;
[0129] Verifying the service provider SPV node identifier and the amount of the electronic invoice;
[0130] If the service provider SPV node identifier and the amount of the electronic invoice are verified, the total amount of the electronic invoice is obtained, and the service provider SPV node identifier and the total amount of the electronic invoice are stored on each consensus node and synchronously stored in the tax bureau SPV node;
[0131] Receive the tax amount of the electronic invoice sent by the tax bureau SPV node, and send the tax amount of the electronic invoice to the service provider SPV node in response to the tax reporting request, wherein the tax amount is calculated by the tax bureau SPV node based on the total amount of the stored electronic invoice.
[0132] Through the embodiment of the present application, the amount of the electronic invoice issued by the service provider SPV node within the preset time is obtained in the blockchain, and then when the service provider SPV node identifier and the amount of the electronic invoice are verified, the total amount of the electronic invoice is obtained, and the service provider SPV node identifier and the total amount of the electronic invoice are stored on each consensus node, and synchronously stored to the tax bureau SPV node; then the tax amount of the electronic invoice sent by the tax bureau SPV node is received and sent to the service provider SPV node. By adopting this method, by obtaining the electronic invoice information stored in the blockchain, and then obtaining the total amount of the verified electronic invoice, the tax amount is obtained so that the merchant can pay it. This method is highly efficient, the data is reliable, and a lot of manpower is reduced.
[0133] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that in order to realize the above functions, the terminal includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0134] The embodiment of the present application can divide the terminal into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0135] In line with the above, see Figure 6 , Figure 6 The present application embodiment provides a schematic diagram of the structure of an electronic invoice tax reporting processing device, which includes a request receiving module 601, an amount obtaining module 602, an information verification module 603, a synchronous storage module 604 and a tax amount sending module 605, as follows:
[0136] A request receiving module 601 is used to receive a tax reporting request sent by a service provider SPV node, wherein the tax reporting request carries the service provider SPV node identifier, and the tax reporting request is used to instruct to obtain the tax amount of the electronic invoice matching the service provider SPV node identifier;
[0137] An amount acquisition module 602 is used to acquire the amount of the electronic invoice issued by the service provider SPV node within a preset time according to the service provider SPV node identifier;
[0138] An information verification module 603 is used to verify the service provider SPV node identifier and the amount of the electronic invoice;
[0139] The synchronization storage module 604 is used to obtain the total amount of the electronic invoice if the service provider SPV node identifier and the amount of the electronic invoice are verified, and store the service provider SPV node identifier and the total amount of the electronic invoice on each consensus node, and synchronize them to the tax bureau SPV node;
[0140] The tax amount sending module 605 is used to receive the tax amount of the electronic invoice sent by the tax bureau SPV node, and send the tax amount of the electronic invoice to the service provider SPV node in response to the tax reporting request, wherein the tax amount is calculated by the tax bureau SPV node based on the total amount of the stored electronic invoice.
[0141] It can be seen that through the embodiment of the present application, by obtaining the amount of the electronic invoice issued by the service provider SPV node within the preset time in the blockchain, and then when the service provider SPV node identifier and the amount of the electronic invoice are verified, the total amount of the electronic invoice is obtained, and the service provider SPV node identifier and the total amount of the electronic invoice are stored on each consensus node, and synchronously stored to the tax bureau SPV node; then the tax amount of the electronic invoice sent by the tax bureau SPV node is received and sent to the service provider SPV node. By adopting this method, by obtaining the electronic invoice information stored in the blockchain, and then obtaining the total amount of the verified electronic invoice, the tax amount is obtained so that the merchant can pay it. This method is highly efficient, the data is reliable, and a lot of manpower is reduced.
[0142] Furthermore, the information verification module 603 may be used to:
[0143] According to the service provider's SPV node identifier and the mapping relationship between the preset node identifier and the node level, the node level corresponding to the service provider's SPV node identifier is obtained; according to the amount of the electronic invoice, the invoice level corresponding to the amount is confirmed; according to the node level corresponding to the service provider's SPV node identifier and the invoice level corresponding to the amount, the verification level is obtained; the consensus mechanism corresponding to the verification level is obtained, wherein the verification level corresponds to the consensus mechanism one-to-one; and the service provider's SPV node identifier and the amount of the electronic invoice are verified according to the consensus mechanism.
[0144] The device also includes a data deletion module, which is used to:
[0145] Confirm whether the service provider SPV node has completed the tax declaration; if completed, send a request to each consensus node, the request carries the service provider SPV node identifier, and the request is used to instruct each consensus node to delete the stored information of the amount of the electronic invoice issued by the service provider SPV node within a preset time.
[0146] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the electronic invoice tax reporting processing methods recorded in the above method embodiments.
[0147] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program enables a computer to execute part or all of the steps of any one of the electronic invoice tax reporting processing methods recorded in the above method embodiments.
[0148] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0149] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0150] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.
[0151] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0152] In addition, the functional units in the various embodiments of the application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software program modules.
[0153] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program codes.
[0154] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which can include: a flash drive, a read-only memory, a random access memory, a magnetic disk or an optical disk, etc.
[0155] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for processing electronic invoice tax declaration, characterized in that: Applied to blockchain systems, including: Receiving a tax reporting request sent by a service provider SPV node, the tax reporting request carrying the service provider SPV node identifier, the tax reporting request being used to instruct obtaining a tax amount of an electronic invoice matching the service provider SPV node identifier; Obtaining the amount of the electronic invoice issued by the SPV node of the service provider within a preset time according to the SPV node identifier of the service provider; Verifying the service provider SPV node identifier and the amount of the electronic invoice, including: obtaining the node level corresponding to the service provider SPV node identifier according to the service provider SPV node identifier and the mapping relationship between the preset node identifier and the node level, wherein the mapping relationship is divided according to the size of the node storage space; confirming the invoice level corresponding to the amount according to the amount of the electronic invoice; obtaining the verification level according to the node level corresponding to the service provider SPV node identifier and the invoice level corresponding to the amount; obtaining a consensus mechanism corresponding to the verification level, wherein the verification level corresponds to the consensus mechanism one-to-one; verifying the service provider SPV node identifier and the amount of the electronic invoice according to the consensus mechanism; Obtain the result of each consensus node verifying the service provider's SPV node identifier and the amount of the electronic invoice; The result obtained is the number of consensus nodes that have passed the verification; According to the obtained consensus mechanism, confirm whether the number of consensus nodes that have passed the verification meets the requirement; If the number of consensus nodes that pass the verification meets the requirement, it triggers confirmation that the verification of the service provider's SPV node identifier and the amount of the electronic invoice has passed; If the service provider SPV node identifier and the amount of the electronic invoice are verified, the total amount of the electronic invoice is obtained, and the service provider SPV node identifier and the total amount of the electronic invoice are stored on each consensus node and synchronously stored in the tax bureau SPV node; Receive the tax amount of the electronic invoice sent by the tax bureau SPV node, and send the tax amount of the electronic invoice to the service provider SPV node in response to the tax reporting request, wherein the tax amount is calculated by the tax bureau SPV node based on the total amount of the stored electronic invoice.
2. The method according to claim 1, characterized in that The consensus node includes a first consensus node, and obtaining the amount of the electronic invoice issued by the service provider SPV node within a preset time according to the service provider SPV node identifier includes: Sending a request to the first consensus node, the request carrying the service provider SPV node identifier, the request being used to instruct obtaining an electronic invoice issued by the service provider SPV node; Receive the amount of the electronic invoice issued by the service provider SPV node within the preset time and sent by the first consensus node, wherein the amount of the electronic invoice issued by the service provider SPV node within the preset time and sent by the first consensus node is the amount of the electronic invoice issued by the service provider SPV node within the preset time obtained by the first consensus node in real time, and the first consensus node obtains the identifier of the electronic invoice issued by the service provider SPV node within the preset time, and compares the identifier of the issued electronic invoice with the identifier of the electronic invoice distributed to the service provider SPV node within the preset time one by one, and confirms that the identifier of the issued electronic invoice is completely consistent with the identifier of the distributed electronic invoice.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: Confirm whether the service provider's SPV node has completed tax declaration; If completed, a request is sent to each consensus node, the request carries the service provider SPV node identifier, and the request is used to instruct each consensus node to delete the stored information on the amount of electronic invoices issued by the service provider SPV node within a preset time.
4. A device for processing electronic invoice tax returns, characterized in that: include: A request receiving module, used for receiving a tax reporting request sent by a service provider SPV node, wherein the tax reporting request carries the service provider SPV node identifier, and the tax reporting request is used for indicating the tax amount of an electronic invoice matching the service provider SPV node identifier; An amount acquisition module, used to acquire the amount of the electronic invoice issued by the service provider SPV node within a preset time according to the service provider SPV node identifier; An information verification module is used to verify the service provider SPV node identifier and the amount of the electronic invoice, including: obtaining the node level corresponding to the service provider SPV node identifier according to the service provider SPV node identifier and the mapping relationship between the preset node identifier and the node level, wherein the mapping relationship is divided according to the size of the node storage space; confirming the invoice level corresponding to the amount according to the amount of the electronic invoice; obtaining the verification level according to the node level corresponding to the service provider SPV node identifier and the invoice level corresponding to the amount; obtaining a consensus mechanism corresponding to the verification level, wherein the verification level corresponds to the consensus mechanism one-to-one; and verifying the service provider SPV node identifier and the amount of the electronic invoice according to the consensus mechanism; The information verification module is further used to obtain the result of each consensus node verifying the service provider SPV node identifier and the amount of the electronic invoice; the result is the number of consensus nodes that have passed the verification; according to the obtained consensus mechanism, confirm whether the number of consensus nodes that have passed the verification meets the requirement; if the number of consensus nodes that have passed the verification meets the requirement, trigger the synchronization storage module to confirm that the service provider SPV node identifier and the amount of the electronic invoice have passed the verification; A synchronous storage module is used to obtain the total amount of the electronic invoice if the service provider SPV node identifier and the amount of the electronic invoice are verified, and store the service provider SPV node identifier and the total amount of the electronic invoice on each consensus node, and synchronously store them to the tax bureau SPV node; The tax amount sending module is used to receive the tax amount of the electronic invoice sent by the tax bureau SPV node, and send the tax amount of the electronic invoice to the service provider SPV node in response to the tax reporting request, wherein the tax amount is calculated by the tax bureau SPV node based on the total amount of the stored electronic invoice.
5. The device according to claim 4, characterized in that The device also includes a data deletion module, which is used to: Confirm whether the service provider SPV node has completed the tax declaration; if completed, send a request to each consensus node, the request carries the service provider SPV node identifier, and the request is used to instruct each consensus node to delete the stored information of the amount of the electronic invoice issued by the service provider SPV node within a preset time.
6. A terminal, characterized in that: The method comprises a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 3.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Data processing method and apparatus for electronic bill, storage medium and device
CN109165943A