A method and device for calculating tax electricity index
Through the federally learned tax electricity calculation model, the problems of data obsolete and sharing difficulties in traditional tax electricity indicator calculation methods are solved, and the secure sharing and accurate calculation of data are realized, ensuring data privacy and security.
Patent Information
- Application Number
- CN202111489327.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2041-12-07
AI Technical Summary
The traditional tax electricity index calculation method has problems such as outdated data and low data quality, which leads to inaccurate calculations and difficulties in data sharing, affecting data security and privacy protection.
The tax and electricity calculation model of federal learning is adopted, and the tax identification code and power identification code are received through the central server, the tax and electricity identification sequence is generated, and the federal calculation model parameters are sent to the tax and power terminals for federal learning until the learning stop conditions are met, and the accurate tax and electricity indicators are obtained.
It realizes the secure sharing and accurate calculation of multi-party data, solves the problem of data splitting, improves the rationality of resource planning, and ensures data privacy and security.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method and device for calculating tax and electricity indicators. Background Art
[0002] With the rapid development of artificial intelligence technology, various information services have entered the intelligent era of Internet+. However, in the current "Data Security Law", clear provisions and strict regulatory requirements are put forward for the responsibilities of all parties for data security. In view of this, when the data of all parties involve corporate or personal privacy, the data of all parties can hardly be fully shared.
[0003] In the scenario of joint tax and electricity analysis, the traditional tax and electricity indicator calculation method has problems with outdated data and low data quality, which leads to inaccurate calculation of tax and electricity indicators. In addition, there are many problems and difficulties in data sharing and exchange, and some joint analysis processes of tax-related data have not been opened. Furthermore, the large-scale use of data will also raise the issue of how to ensure the privacy and security of data. Therefore, it is urgent to explore a new way of cooperation to accurately calculate tax and electricity indicators while ensuring data security. Summary of the invention
[0004] The purpose of the present invention is to provide a method and device for calculating tax electricity index in view of the defects of the prior art.
[0005] In order to achieve the above-mentioned object, in a first aspect, an embodiment of the present invention provides a tax and electricity index method, which is applied to a central server and includes:
[0006] Receive a tax identification number and an electricity identification number;
[0007] Obtaining a tax-electricity identification sequence according to the tax identification code and the electricity identification code;
[0008] Send the federation calculation model parameters to the tax end and the electricity end respectively;
[0009] Receiving tax training data and electricity training data obtained by the tax end and the electricity end according to the federation calculation model parameters respectively;
[0010] Performing federated learning on the tax-electricity identification sequence, the tax training data, and the electricity training data to obtain new federated calculation model parameters, and sending them to the tax end and the electricity end until a learning stop condition is met;
[0011] The tax and electricity indicators are obtained based on the tax training data and electricity training data that meet the conditions.
[0012] Preferably, the receiving tax identification code and electricity identification code are specifically:
[0013] Receive the tax identification code sent by the tax terminal and the electricity identification code sent by the electricity terminal.
[0014] Further preferably, before receiving the tax identification code sent by the tax terminal and the power identification code sent by the power terminal, the method further includes:
[0015] The public key is sent to the tax end and the electricity end.
[0016] Preferably, the tax-electricity identification sequence obtained according to the tax identification code and the electricity identification code is specifically:
[0017] The enterprise name information and time information in the tax identification code and the electricity identification code are extracted, and data alignment is performed on the tax identification code and the electricity identification code according to the enterprise name information and the time information to obtain a tax and electricity identification sequence.
[0018] Preferably: the tax training data includes tax model gradient parameters and tax sample data, and the power training data includes power model gradient parameters and power sample data;
[0019] The tax end performs KNN model training on the local data to be trained at the tax end according to the first parameter in the federal computing model parameters, and obtains corresponding tax model gradient parameters and tax sample data; the power end performs KNN model training on the local data to be trained at the power end according to the second parameter in the federal computing model parameters, and obtains corresponding power model gradient parameters and power sample data.
[0020] Further preferably, the tax model gradient parameter includes a tax end private key; the power model gradient parameter includes a power end private key; before the tax-electricity identification sequence, the tax training data and the power training data are federatedly learned, the method further includes:
[0021] The tax-side private key and the electricity-side private key are decrypted.
[0022] In a second aspect, an embodiment of the present invention further provides a tax and electricity index calculation device, which is applied to a central server and includes:
[0023] a receiving unit, receiving a tax identification code and an electricity identification code;
[0024] A first processing unit obtains a tax-electricity identification sequence according to the tax identification code and the electricity identification code;
[0025] An output unit sends the federation calculation model parameters to the tax end and the power end respectively;
[0026] The receiving unit is further used to respectively receive the tax training data and the electricity training data obtained by the tax end and the electricity end according to the federation calculation model parameters;
[0027] The second processing unit performs federated learning on the tax-electricity identification sequence, the tax training data and the electricity training data to obtain new federated calculation model parameters, and sends the parameters to the tax terminal and the electricity terminal until a learning stop condition is met;
[0028] The third processing unit obtains the tax and electricity index according to the tax training data and electricity training data that meet the conditions.
[0029] Preferably, the receiving unit is further used for:
[0030] Receive the tax identification code sent by the tax terminal and the electricity identification code sent by the electricity terminal.
[0031] Further preferably, the output unit is also used for:
[0032] The public key is sent to the tax end and the electricity end.
[0033] Preferably, the first processing unit is further used for:
[0034] The enterprise name information and time information in the tax identification code and the electricity identification code are extracted, and data alignment is performed on the tax identification code and the electricity identification code according to the enterprise name information and the time information to obtain a tax and electricity identification sequence.
[0035] Preferably: the tax training data includes tax model gradient parameters and tax sample data, and the power training data includes power model gradient parameters and power sample data;
[0036] The tax end performs KNN model training on the local data to be trained at the tax end according to the first parameter in the federal computing model parameters, and obtains corresponding tax model gradient parameters and tax sample data; the power end performs KNN model training on the local data to be trained at the power end according to the second parameter in the federal computing model parameters, and obtains corresponding power model gradient parameters and power sample data.
[0037] Further preferably, the tax model gradient parameter includes a tax end private key; the power model gradient parameter includes a power end private key; and the second processing unit is further used for:
[0038] The tax-side private key and the electricity-side private key are decrypted.
[0039] An embodiment of the present disclosure also provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the tax electricity index calculation method disclosed in the first aspect above.
[0040] The embodiment of the present disclosure also provides a computer-readable storage medium, which stores a computer program, and the computer program is used to execute the tax electricity index calculation method disclosed in the first aspect above.
[0041] The embodiment of the present invention provides a tax and electricity index calculation method, which relies on the tax and electricity calculation model of federated learning, so that the tax and electricity parties are unaware of the data and rules of the other party during the entire training process. While ensuring that the data of multiple parties are available but invisible, it realizes the secure sharing of data of multiple parties, thereby solving the problem of data splitting among the parties, making resource planning more reasonable, and ultimately obtaining real tax and electricity indicators. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0043] Figure 1 A method flow chart of a method for calculating a tax and electricity index provided by an embodiment of the present invention;
[0044] Figure 2 A schematic diagram of the structure of a tax and electricity index calculation device provided by an embodiment of the present invention;
[0045] Figure 3 A structural schematic diagram of the electronic device is provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0046] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.
[0047] The tax-electricity index can be understood as the ratio of sales revenue of a specific scope of objects in a certain period to the electricity consumption of the same scope in the same period, that is, it reflects the VAT invoicing and electricity consumption of enterprises in a certain period. Changes in the tax-electricity index can reflect the production and operation of enterprises, and can also more directly reflect the overall situation of the resumption of work, production and sales of enterprises.
[0048] Calculating tax and electricity indicators requires data from both the tax and electricity parties.
[0049] First, a tax and electricity index calculation method proposed in this application is applied to a central server, and the central server can understand a third-party server. The method flow chart is as follows: Figure 1 As shown, the following steps are included:
[0050] Step 101, receiving a tax identification code and an electricity identification code;
[0051] Specifically, the central server is used for model training and data calculation scheduling, and does not store any data received. In a specific example, the central server can be deployed on the power side, but its operations are independent of the power side.
[0052] The tax identification code can be understood as the corporate data identification of the tax payer, such as the taxpayer identification number, company name and data generation time. The tax identification code is transmitted by the tax terminal representing the tax payer to the central server, that is, the central server receives the tax identification code sent by the tax terminal.
[0053] The power identification code can be understood as the unique identification mark of the power party's corporate data, such as taxpayer account number, company name and data generation time. The power identification code is transmitted from the power end representing the power party to the central server, that is, the central server receives the power identification code sent by the power end.
[0054] In some preferred embodiments, before the central server receives the tax identification code sent by the tax end and the electricity identification code sent by the electricity end, the central server also sends a public key to the tax end and the electricity end to encrypt data transmission between the parties.
[0055] Step 102, obtaining a tax-electricity identification sequence according to the tax identification code and the electricity identification code;
[0056] Specifically, in tax and electricity application scenarios, the unique identification numbers of both parties are often inconsistent. Therefore, a third party, namely the central server, needs to be deployed to maintain the enterprise comparison table of both parties and generate a unique identification mark recognized by both parties, which is the tax and electricity identification sequence.
[0057] In a specific example, the tax identification code and the electricity identification code include enterprise name information and time information. The central server extracts the enterprise name information and time information from the tax identification code and the electricity identification code, performs data alignment on the tax identification code and the electricity identification code according to the enterprise name information and time information, and obtains a tax and electricity identification sequence.
[0058] Step 103, sending the federation calculation model parameters to the tax end and the power end respectively;
[0059] Specifically, according to the characteristics of the tax-electricity joint application scenario, this application uses the neighbor algorithm (KNN, K-NearestNeighbo) to complete the federated learning process.
[0060] The central server sends the initial federated computing model parameters to the tax and electricity ends so that the tax and electricity ends can perform calculations at their respective locations.
[0061] In a specific example, the KNN algorithm is used to calculate the similarity between the test sample to be classified and the trained sample, find the K nearest neighbors, and determine the category to which the test sample belongs based on the weighted distance. Taking the linear regression training method as an example, the tax end sample is defined as {x ι A}, i∈D A , where A represents the tax side, D A represents the tax data sample set, and the electricity sample is defined as {x j B ,y j B}, j∈D B , where B represents the power end, D B Represents the power end data sample set.
[0062] The data sample set {x ι A}, i∈D A ,{x j B ,y j B}, j∈D B , the federated computing model parameters are defined as Θ A and θ B The initial federated computing model parameter value range can be 0-1, randomly selected, and the central server sets the first parameter Θ in the federated computing model A Sent to the tax side, the second parameter Θ in the federated calculation model B Send to the power end.
[0063] Step 104, receiving tax training data and electricity training data obtained by the tax end and the electricity end according to the federated calculation model parameters respectively;
[0064] Specifically, the tax training data includes tax model gradient parameters and tax sample data, and the electricity training data includes electricity model gradient parameters and electricity sample data.
[0065] When the tax side and the electricity side are calculating, the tax side performs KNN model training on the local data to be trained on the tax side based on the first parameter in the federal calculation model parameters, that is, the model calculation parameters used for the tax side, and obtains the corresponding tax model gradient parameters and tax sample data.
[0066] The power end performs KNN model training on the local data to be trained on the power end according to the second parameter in the federated computing model parameters, namely, the model computing parameters for the power side, and obtains the corresponding power model gradient parameters and power sample data.
[0067] The central server receives the tax model gradient parameters and tax sample data sent by the tax end, and the electricity model gradient parameters and electricity sample data sent by the electricity end.
[0068] In some preferred embodiments, the tax model gradient parameters include a tax side private key, and the electricity model gradient parameters include a electricity side private key, and the private keys at both ends are used to encrypt data on the central server.
[0069] In a specific example, after receiving the federated calculation model parameters, the power and taxation ends combine their local data, that is, the training data, to train the model and calculate the Euclidean distance in KNN. Given two samples, the taxation end sample X = (x1, x2, ..., x n ) and power end sample Y=(y1,y2,...,y n ), where n represents the number of features, and the Euclidean distance between two vectors X and Y is expressed as:
[0070]
[0071] Formula (1)
[0072] Therefore, the objective function in the federated computing model is defined as:
[0073]
[0074] The electricity and taxation departments encrypt and upload the calculated results to the central server. The calculation process is as follows:
[0075] To simplify the formula, let:
[0076] And the target function is expressed as follows after homomorphic encryption:
[0077]
[0078] Where [[*]] represents homomorphic encryption and λ represents the linear algebraic eigenvalue.
[0079] Then it is convenient to simplify the formula, so define:
[0080]
[0081]
[0082]
[0083] Therefore:
[0084] [[K]]=[[K A ]]+[[K B ]]+[[K AB ]] Formula (8)
[0085] Similarly, the following command applies:
[0086]
[0087] The gradient is expressed as follows:
[0088]
[0089] Step 105, performing federated learning on the tax-electricity identification sequence, the tax training data, and the electricity training data to obtain new federated calculation model parameters, and sending the new federated calculation model parameters to the tax terminal and the electricity terminal until a learning stop condition is met;
[0090] Specifically, after the central server receives the calculation results from both tax and electricity ends, it merges the tax training data and electricity training data according to the tax and electricity identification sequence, and performs federated learning to obtain new federated calculation model parameters.
[0091] The tax and electricity ends obtain new tax training data and electricity training data based on the new federated computing model parameters and send them to the central server again, so that the central server conducts the next round of federated learning based on the new tax training data and electricity training data until the learning stop conditions are met, that is, the joint analysis of the tax and electricity joint computing model is completed.
[0092] The specific process of the tax end and the electricity end obtaining new tax training data and electricity training data according to the new federated calculation model parameters is as in step 104 and will not be described in detail.
[0093] In some preferred embodiments, before the central server performs fusion and federated learning, the tax-side private key and the electricity-side private key also need to be decrypted.
[0094] It can be understood that in steps 104-106, each end of the tax and electricity system is unaware of the other party's data and rules during the entire training process. After the training is completed, each end of the tax and electricity system only obtains the model parameters on its own side.
[0095] In addition, the learning stop condition in this step can be set by the user as needed, and this application does not limit it here.
[0096] Step 107, obtaining tax and electricity indicators according to the tax training data and electricity training data that meet the conditions.
[0097] Specifically, after completing the joint analysis of the tax-electricity joint calculation model, the central server obtains the tax based on the tax training data and electricity training data that meet the conditions.
[0098] It is understandable that the satisfying condition in this step can also be set by the user as needed, and this application does not limit this.
[0099] The tax and electricity index calculation method provided in the embodiment of the present application relies on the tax and electricity calculation model of federated learning, so that the tax and electricity parties are unaware of the data and rules of the other party during the entire training process. While ensuring that the data of multiple parties are available but invisible, it realizes the secure sharing of data of multiple parties, thereby solving the problem of data splitting among the parties, making resource planning more reasonable, and ultimately obtaining real tax and electricity indicators.
[0100] Correspondingly, the embodiment of the present invention also provides a tax and electricity index calculation device for implementing the above tax and electricity index calculation method, and the device is applied to a central server, such as Figure 2 As shown, the device includes: a receiving unit 201, a first processing unit 202, a second processing unit 203, a third processing unit 204 and an output unit 205.
[0101] A receiving unit 201 receives a tax identification code and an electricity identification code;
[0102] The first processing unit 202 obtains a tax and electricity identification sequence according to the tax identification code and the electricity identification code;
[0103] The output unit 205 sends the federation calculation model parameters to the tax terminal and the power terminal respectively;
[0104] The receiving unit 201 is also used to receive the tax training data and the electricity training data obtained by the tax end and the electricity end according to the federation calculation model parameters respectively;
[0105] The second processing unit 203 is used to perform federated learning on the tax-electricity identification sequence, the tax training data and the electricity training data to obtain new federated calculation model parameters, which are sent to the tax terminal and the electricity terminal by the output unit 205 until the learning stop condition is met;
[0106] The third processing unit 204 is used to obtain a tax-electricity index according to the tax training data and electricity training data that meet the conditions.
[0107] Preferably, the receiving unit 201 is further used to receive a tax identification code sent by the tax end and a power identification code sent by the power end.
[0108] Further preferably, the output unit 205 is also used to: send the public key to the tax end and the power end.
[0109] Preferably, the first processing unit 202 is further used to: extract the enterprise name information and time information in the tax identification code and the electricity identification code, align the tax identification code and the electricity identification code according to the enterprise name information and the time information, and obtain a tax and electricity identification sequence.
[0110] Preferably, the tax training data includes tax model gradient parameters and tax sample data, and the electricity training data includes electricity model gradient parameters and electricity sample data;
[0111] The tax side performs KNN model training on the local data to be trained on the tax side according to the first parameter in the federal computing model parameters, and obtains the corresponding tax model gradient parameters and tax sample data; the power side performs KNN model training on the local data to be trained on the power side according to the second parameter in the federal computing model parameters, and obtains the corresponding power model gradient parameters and power sample data.
[0112] Further preferably, the tax model gradient parameter includes a tax side private key; the power model gradient parameter includes a power side private key; and the second processing unit 203 is further used to: decrypt the tax side private key and the power side private key.
[0113] The tax and electricity index calculation device provided in the embodiment of the present application relies on the tax and electricity calculation model of federated learning, so that all tax and electricity parties are unaware of the data and rules of the other party during the entire training process. While ensuring that the data of multiple parties are available but invisible, it realizes the secure sharing of data of multiple parties, thereby solving the problem of data splitting among the parties, making resource planning more reasonable, and ultimately obtaining real tax and electricity indicators.
[0114] Below, reference Figure 3 3 illustrates a block diagram of an electronic device according to an embodiment of the present application.
[0115] like Figure 3 As shown, the electronic device 11 includes one or more processors 111 and a memory 112 .
[0116] The processor 111 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 11 to perform desired functions.
[0117] The memory 112 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 111 may run the program instructions to implement the test methods of the various embodiments of the present application described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.
[0118] In one example, the electronic device 11 may further include: an input device 113 and an output device 114 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0119] The input device 113 may include, for example, a keyboard, a mouse, etc.
[0120] The output device 114 can output various information to the outside, including determined distance information, direction information, etc. The output device 114 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0121] Of course, to simplify, Figure 3 Only some of the components related to the present application in the electronic device 11 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 11 may also include any other appropriate components.
[0122] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the testing method according to various embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.
[0123] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0124] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the testing method according to various embodiments of the present application described in the above “Exemplary Method” section of this specification.
[0125] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0126] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.
[0127] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.
[0128] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.
[0129] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0130] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for calculating tax and electricity index, characterized in that: Applied to a central server, the method comprises: Receive a tax identification number and an electricity identification number; Obtaining a tax-electricity identification sequence according to the tax identification code and the electricity identification code; Send the federation calculation model parameters to the tax end and the electricity end respectively; Respectively receiving the tax training data and the electricity training data obtained and encrypted and uploaded by the tax end and the electricity end according to the federated computing model parameters; wherein the tax training data includes the corresponding tax model gradient parameters and tax sample data obtained by the tax end performing KNN model training on the local data to be trained at the tax end according to the first parameter in the federated computing model parameters; the electricity training data includes the corresponding electricity model gradient parameters and electricity sample data obtained by the electricity end performing KNN model training on the local data to be trained at the electricity end according to the second parameter in the federated computing model parameters; Performing federated learning on the tax-electricity identification sequence, the tax training data, and the electricity training data to obtain new federated calculation model parameters, and sending them to the tax end and the electricity end until a learning stop condition is met; The tax and electricity indicators are obtained based on the tax training data and electricity training data that meet the conditions.
2. The method according to claim 1, characterized in that The specific received tax identification code and electricity identification code are: Receive the tax identification code sent by the tax terminal and the electricity identification code sent by the electricity terminal.
3. The method according to claim 2, characterized in that Before receiving the tax identification code sent by the tax terminal and the power identification code sent by the power terminal, the method further includes: The public key is sent to the tax end and the electricity end.
4. The method according to claim 1, characterized in that: The tax and electricity identification sequence obtained according to the tax identification code and the electricity identification code is specifically: The enterprise name information and time information in the tax identification code and the electricity identification code are extracted, and data alignment is performed on the tax identification code and the electricity identification code according to the enterprise name information and the time information to obtain a tax and electricity identification sequence.
5. The method according to claim 1, characterized in that The tax model gradient parameter includes a tax end private key; the power model gradient parameter includes a power end private key; before the tax-electricity identification sequence, the tax training data and the power training data are federatedly learned, the method further includes: The tax-side private key and the electricity-side private key are decrypted.
6. A tax and electricity index calculation device, characterized in that: The device is applied to a central server, and comprises: a receiving unit, receiving a tax identification code and an electricity identification code; A first processing unit obtains a tax-electricity identification sequence according to the tax identification code and the electricity identification code; An output unit sends the federation calculation model parameters to the tax end and the power end respectively; The receiving unit is also used to respectively receive the tax training data and the electricity training data obtained and encrypted and uploaded by the tax end and the electricity end according to the federated computing model parameters; wherein the tax training data includes the corresponding tax model gradient parameters and tax sample data obtained by the tax end performing KNN model training on the local data to be trained at the tax end according to the first parameter in the federated computing model parameters; the electricity training data includes the corresponding electricity model gradient parameters and electricity sample data obtained by the electricity end performing KNN model training on the local data to be trained at the electricity end according to the second parameter in the federated computing model parameters; The second processing unit performs federated learning on the tax-electricity identification sequence, the tax training data and the electricity training data to obtain new federated calculation model parameters, and sends the parameters to the tax terminal and the electricity terminal until a learning stop condition is met; The third processing unit obtains the tax and electricity index according to the tax training data and electricity training data that meet the conditions.
7. The device according to claim 6, characterized in that The receiving unit is also used for: Receive the tax identification code sent by the tax terminal and the electricity identification code sent by the electricity terminal.
8. The device according to claim 7, characterized in that The output unit is also used for: The public key is sent to the tax end and the electricity end.
9. The device according to claim 6, characterized in that The first processing unit is further configured to: The enterprise name information and time information in the tax identification code and the electricity identification code are extracted, and data alignment is performed on the tax identification code and the electricity identification code according to the enterprise name information and the time information to obtain a tax-electricity sequence.
Citation Information
Patent Citations
Method for establishing data analysis model
CN111190487A
Federation learning method and device, equipment and storage medium
CN112580821A