A data classification and grading method, system, device and computer storage medium
By using public key and target secret in the data classification and classification method for encryption processing, and negotiating and determining noise on the intermediate computing node, the problem of poor security in the data classification and classification in the prior art is solved, and the data model gradient value is realized Efficient security classification and grading of secure transmission and data.
Patent Information
- Application Number
- CN202211150148.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-09-21
AI Technical Summary
The existing data classification and grading methods are poor in security and it is difficult to effectively protect the security of data.
By receiving the public key and target secret sent by the central node on the target intermediate computing node, transmitting the public key to the training node, negotiating with other intermediate computing nodes to determine the target noise, obtaining the gradient value of the encryption model, calculating the hidden average gradient value, and transmitting it to The central node calculates the target model gradient value and finally transmits it to the training node for data classification and grading.
The secure transmission of gradient values of the data classification grading model is realized, which enhances the security of data, avoids data leakage, and improves the overall security of data classification grading.
Smart Images

Figure CN115514557B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data classification and grading, and more specifically, to a data classification and grading method, system, device and computer storage medium. Background Art
[0002] Data is a production factor like land, capital, labor, and technology, and will play an increasingly important role in the process of the continuous development of the digital economy. Reasonable allocation of data jurisdiction, transaction rights, ownership, use rights, and property distribution rights can effectively promote the transformation of data resources into data assets, which is conducive to protecting the rights and interests of data subjects and maintaining data security.
[0003] Data classification and grading are crucial in the process of data security governance. Data classification and grading are intuitive displays of the importance of data, the basis for the compilation of internal management systems of organizations, the basis for the implementation of technical support systems, and the basis for the rational allocation of energy and efforts during operation and maintenance. Data classification and grading play a role in connecting the upper (management) and the lower (technology). Connecting the upper: The management systems in multiple aspects such as operation and maintenance systems, safeguards, and job responsibilities all need to be compiled based on data classification and grading (the combination of management systems and classification and grading can enhance the implementation of the system). Connecting the lower: Different security protections are implemented according to different data levels. For example, high-level data requires fine-grained rule control and data encryption, while low-level data only requires one-way auditing. However, the security of data classification and grading methods is poor.
[0004] In summary, how to improve the security of data classification and grading methods is an urgent problem to be solved by technical personnel in this field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a data classification and grading method, which can solve the technical problem of how to improve the security of data classification and grading to a certain extent. The present disclosure also provides a data classification and grading device, an electronic device and a computer-readable storage medium.
[0006] In order to achieve the above objectives, the present disclosure provides the following technical solutions:
[0007] According to a first aspect of an embodiment of the present disclosure, a data classification and grading method is provided, which is applied to a target intermediate computing node, and includes:
[0008] Receive a public key and a corresponding target secret sent by a connected central node, wherein the target secret includes a sub-secret corresponding to the target intermediate computing node obtained by splitting the main secret by the central node;
[0009] Transmit the public key to each training node connected to it;
[0010] Negotiate with other intermediate computing nodes to determine the target noise;
[0011] Obtaining the encrypted model gradient values sent by all the training nodes, wherein the encrypted model gradient values include gradient values obtained by encrypting the initial model gradient values trained by the training nodes based on the public key, and the initial model gradient values are used to construct a data classification and grading model;
[0012] Calculating an encrypted average gradient value corresponding to the encrypted model gradient value, and performing an operation on the encrypted average gradient value based on the target secret and the target noise to obtain a hidden average gradient value;
[0013] Transmitting the hidden average gradient value to the central node so that the central node calculates the target model gradient value based on the private key, the master secret and the hidden average gradient value;
[0014] The target model gradient value sent by the central node is obtained, and the target model gradient value is transmitted to the training node, so that the training node performs data classification and grading based on the target model gradient value.
[0015] Preferably, the public key and the corresponding target secret sent by the central node receiving the connection include:
[0016] Receive the public key and the corresponding target secret sent by the connected central node, where the public key includes the homomorphic encryption public key generated by the central node, and the value of the master secret is 0.
[0017] Preferably, the determining the target noise through negotiation with other intermediate computing nodes includes:
[0018] Perform key negotiation with the other intermediate computing nodes in pairs to generate a symmetric encryption key;
[0019] The target noise is determined by negotiation with the other intermediate computing nodes based on the symmetric encryption key.
[0020] Preferably, determining the target noise by negotiation with the other intermediate computing nodes based on the symmetric encryption key includes:
[0021] generating the target noise;
[0022] Encrypting the target noise based on the symmetric encryption key to obtain encrypted matrix noise;
[0023] The encrypted matrix noise is transmitted to the central node, so that the central node transmits the encrypted matrix noise to the other intermediate computing nodes, and then the other intermediate computing nodes decrypt the encrypted matrix noise based on the symmetric encryption key to obtain the target noise.
[0024] Preferably, determining the target noise by negotiation with the other intermediate computing nodes based on the symmetric encryption key includes:
[0025] Receiving the encrypted matrix noise transmitted by the central node, the encrypted matrix noise comprising the noise obtained by encrypting the target noise generated by the other intermediate nodes based on the symmetric encryption key;
[0026] The encrypted matrix noise is decrypted based on the symmetric encryption key to obtain the target noise.
[0027] Preferably, the operating the encrypted average gradient value based on the target secret and the target noise to obtain the hidden average gradient value includes:
[0028] According to a calculation formula, the encrypted average gradient value is calculated based on the target secret and the target noise to obtain the hidden average gradient value;
[0029] The calculation formula includes:
[0030] m=a+b*n;
[0031] Among them, m represents the hidden average gradient value; a represents the encrypted average gradient value; b represents the target secret; and n represents the target noise.
[0032] According to a second aspect of an embodiment of the present disclosure, a data classification and grading method is provided, which is applied to a central node and includes:
[0033] Generate a public key, and send the public key to each connected intermediate computing node, so that the intermediate computing node transmits the public key to each connected training node;
[0034] Obtaining a master secret, splitting the master secret into target secrets corresponding to each of the intermediate computing nodes, and sending the target secrets to the corresponding intermediate computing nodes;
[0035] Receiving the hidden average gradient value sent by each of the intermediate computing nodes;
[0036] Calculate the target model gradient value based on the private key, the master secret and the hidden average gradient value;
[0037] Transmitting the target model gradient value to each of the intermediate computing nodes, so that the intermediate computing nodes transmit the target model gradient value to the training nodes, and then the training nodes perform data classification and grading based on the target model gradient value;
[0038] Among them, the hidden average gradient value includes the encrypted average gradient value corresponding to the encrypted model gradient value calculated by the intermediate computing node, and the gradient value obtained after operating the encrypted average gradient value based on the target secret and the target noise; the encrypted model gradient value includes the gradient value obtained after the training node corresponding to the intermediate computing node encrypts the trained initial model gradient value based on the public key, and the initial model gradient value is used to construct a data classification and grading model; the target noise includes the noise determined by negotiation among all the intermediate computing nodes.
[0039] Preferably, the value of the master secret is 0;
[0040] The calculating the target model gradient value based on the private key, the master secret and the hidden average gradient value includes:
[0041] Calculate the average of all the hidden average gradient values;
[0042] The average value is decrypted based on the private key to obtain the target model gradient value.
[0043] According to a third aspect of an embodiment of the present disclosure, a data classification and grading device is provided, which is applied to a target intermediate computing node, including:
[0044] A first receiving module, configured to receive a public key and a corresponding target secret sent by a connected central node, wherein the target secret includes a sub-secret corresponding to the target intermediate computing node obtained by splitting a main secret by the central node;
[0045] A first transmission module, used to transmit the public key to each training node connected to it;
[0046] A first negotiation module, used for negotiating with other intermediate computing nodes to determine the target noise;
[0047] A first acquisition module is used to acquire the encrypted model gradient values sent by all the training nodes, wherein the encrypted model gradient values include gradient values obtained by encrypting the initial model gradient values trained by the training nodes based on the public key, and the initial model gradient values are used to construct a data classification and grading model;
[0048] A first calculation module, configured to calculate an encrypted average gradient value corresponding to the encrypted model gradient value, and to operate the encrypted average gradient value based on the target secret and the target noise to obtain a hidden average gradient value;
[0049] A second transmission module, used for transmitting the hidden average gradient value to the central node, so that the central node calculates the target model gradient value based on the private key, the master secret and the hidden average gradient value;
[0050] The second acquisition module is used to acquire the target model gradient value sent by the central node, and transmit the target model gradient value to the training node, so that the training node performs data classification and grading based on the target model gradient value.
[0051] According to a fourth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0052] Memory for storing computer programs;
[0053] A processor is used to execute the computer program in the memory to implement the steps of any of the methods described above.
[0054] According to a fifth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0055] The present disclosure provides a data classification and grading method, which is applied to a target intermediate computing node, receives a public key and a corresponding target secret sent by a connected central node, wherein the target secret includes a sub-secret corresponding to the target intermediate computing node obtained by splitting a main secret by the central node; transmits the public key to each training node connected to itself; negotiates with other intermediate computing nodes to determine a target noise; obtains encrypted model gradient values sent by all training nodes, wherein the encrypted model gradient values include gradient values obtained by encrypting an initial model gradient value trained by the training node based on the public key, and the initial model gradient value is used to construct a data classification and grading model; calculates an encrypted average gradient value corresponding to the encrypted model gradient value, and operates the encrypted average gradient value based on the target secret and the target noise to obtain a hidden average gradient value; transmits the hidden average gradient value to the central node, so that the central node calculates the target model gradient value based on the private key, the main secret and the hidden average gradient value; obtains the target model gradient value sent by the central node, and transmits the target model gradient value to the training node, so that the training node performs data classification and grading based on the target model gradient value. In the present disclosure, the training node encrypts the initial model gradient value based on the public key, and the target intermediate computing node calculates the encrypted average gradient value based on the target secret and the target noise to obtain the hidden average gradient value, and transmits the hidden average gradient value to the central node, thereby realizing the secure transmission of the initial model gradient value, so that the central node can determine the final target model gradient value based on the secure initial model gradient value, so that the training node can securely classify and grade data based on the target model gradient value. The data classification and grading device, electronic device and computer-readable storage medium provided by the present disclosure also solve the corresponding technical problems.
[0056] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present disclosure 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 embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0058] Figure 1 A system framework diagram for the data classification and grading scheme disclosed in the present invention;
[0059] Figure 2 The first flow chart of a data classification and grading method according to an exemplary embodiment is shown;
[0060] Figure 3 is a second flow chart of a data classification and grading method according to an exemplary embodiment;
[0061] Figure 4 It is a first structural schematic diagram of a data classification and grading device according to an exemplary embodiment;
[0062] Figure 5 is a second structural schematic diagram of a data classification and grading device according to an exemplary embodiment;
[0063] Figure 6 It is a block diagram of an electronic device 900 according to an exemplary embodiment. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0065] The system framework used in the data classification and grading scheme disclosed in this disclosure can be specifically found in Figure 1 As shown, it may specifically include: a central node, multiple intermediate computing nodes (ie, mechanism nodes) connected to the central node, and multiple training nodes connected to each intermediate computing node.
[0066] In the present application, the intermediate computing node is used to execute the steps of the data classification and grading method, including receiving the public key and the corresponding target secret sent by the connected central node, the target secret includes the sub-secret corresponding to the target intermediate computing node obtained after the central node splits the main secret; transmitting the public key to each training node connected to itself; negotiating with other intermediate computing nodes to determine the target noise; obtaining the encrypted model gradient values sent by all training nodes, the encrypted model gradient values include the gradient values obtained by encrypting the initial model gradient values trained by the training node based on the public key, and the initial model gradient values are used to build a data classification and grading model; calculating the encrypted average gradient value corresponding to the encrypted model gradient value, and operating the encrypted average gradient value based on the target secret and the target noise to obtain the hidden average gradient value; transmitting the hidden average gradient value to the central node, so that the central node calculates the target model gradient value based on the private key, the master secret and the hidden average gradient value; obtaining the target model gradient value sent by the central node, and transmitting the target model gradient value to the training node, so that the training node performs data classification and grading based on the target model gradient value.
[0067] See also Figure 2 , Figure 2 The first flowchart of a data classification and grading method is shown according to an exemplary embodiment.
[0068] The present disclosure relates to a data classification and grading method, which is applied to a target intermediate computing node and may include the following steps:
[0069] Step S101: receiving a public key and a corresponding target secret sent by a connected central node, where the target secret includes a sub-secret corresponding to a target intermediate computing node obtained by splitting a main secret by the central node.
[0070] It can be understood that the central node needs to generate a public key and split the main secret into multiple sub-secrets, and needs to transmit the public key and the sub-secret corresponding to the target intermediate computing node to the target intermediate computing node. It is not difficult to understand that when the target intermediate computing node is different, the sub-secrets obtained will be different, and the sub-secrets obtained by the central node split can correspond one-to-one to the intermediate computing node.
[0071] It should be noted that the composition of the intermediate computing nodes can be determined according to the application scenario. For example, the corresponding institutional nodes can be constructed according to the organization or region as the intermediate computing nodes to reduce the computing pressure of the central node. And the way the central node generates the public key and splits the master secret can be determined according to the application scenario. For example, the central node can generate a homomorphic encryption public key by generating a homomorphic encryption public and private key, and can split the master secret 0 into corresponding sub-keys. For example, if the number of sub-secrets is m, it can be split into 0=d1+d2+...+d m The present disclosure is not specifically limited herein.
[0072] Step S102: Transmit the public key to each training node connected to it.
[0073] It is understandable that after obtaining the public key, the target intermediate computing node needs to transmit the public key to each training node connected to it, so that the training node can encrypt the corresponding data based on the public key, and then transmit the corresponding data securely.
[0074] Step S103: Negotiate with other intermediate computing nodes to determine the target noise.
[0075] It is understandable that after transmitting the public key to each training node connected to it, the target intermediate computing node can also negotiate with other intermediate computing nodes to determine the target noise, so as to securely transmit the corresponding data with the help of the target noise. For example, in the process of negotiating with other intermediate computing nodes to determine the target noise, the target intermediate computing node can first negotiate keys with other intermediate computing nodes in pairs to generate a symmetric encryption key; then negotiate with other intermediate computing nodes based on the symmetric encryption key to determine the target noise. Because the central node does not have a symmetric encryption key, the central node cannot decrypt the target noise, and cannot crack the data obtained after processing with the target noise, thus ensuring data security.
[0076] In some application scenarios, the target intermediate computing node can actively generate target noise and transmit it to other intermediate computing nodes in the process of negotiating with other intermediate computing nodes to determine the target noise based on a symmetric encryption key, that is, it can generate target noise; encrypt the target noise based on the symmetric encryption key to obtain encrypted matrix noise; transmit the encrypted matrix noise to the central node, so that the central node transmits the encrypted matrix noise to other intermediate computing nodes, and then the other intermediate computing nodes decrypt the encrypted matrix noise based on the symmetric encryption key to obtain the target noise.
[0077] It should be noted that the type of target noise generated can be determined according to the application scenario. For example, if the training node needs to perform t data classification and grading model training, the target noise can include t noise values. Correspondingly, the target intermediate computing node can generate a random array [k 1 ,k 2 ,...k t 】, and take the random number corresponding to the current training iteration number as the noise of the encrypted model gradient value during the current round of iterative training; then, the target intermediate computing node encrypts the target noise based on the symmetric encryption key negotiated with other intermediate computing nodes to obtain the encrypted matrix noise. For ease of understanding, assume that the number of intermediate computing nodes is m and the symmetric encryption key is M 12 ,M 13 ,...M 1m , and use represents the noise k of the t-th model training iteration t UsedM 1m The result of symmetric encryption key encryption is:
[0078]
[0079] In some application scenarios, the target intermediate computing node can receive the encrypted matrix noise transmitted by the central node in the process of negotiating with other intermediate computing nodes to determine the target noise based on the symmetric encryption key, and the encrypted matrix noise includes the noise obtained by encrypting the generated target noise by other intermediate nodes based on the symmetric encryption key; and decrypt the encrypted matrix noise based on the symmetric encryption key to obtain the target noise. This disclosure is not specifically limited here.
[0080] Step S104: Obtain the encrypted model gradient values sent by all training nodes, where the encrypted model gradient values include gradient values obtained by encrypting the initial model gradient values trained by the training nodes based on the public key, and the initial model gradient values are used to construct a data classification and grading model.
[0081] It is understandable that the training node is used to build a data classification and grading model, and the data classification and grading model is trained to obtain an initial model gradient value, and then the initial model gradient value is encrypted based on the public key to obtain an encrypted model gradient value, and transmitted to the corresponding target intermediate computing node, so that the target intermediate computing node processes the encrypted model gradient value. It is not difficult to understand that a training node will generate an encrypted model gradient value, so the target intermediate computing node will receive as many encrypted model gradient values as the number of training nodes it is connected to.
[0082] Step S105: Calculate the encrypted average gradient value corresponding to the encrypted model gradient value, and operate the encrypted average gradient value based on the target secret and the target noise to obtain the hidden average gradient value.
[0083] It can be understood that after the target intermediate computing node obtains the encrypted model gradient values sent by all training nodes, it can calculate the encrypted average gradient value corresponding to the encrypted model gradient value, so as to use the encrypted average gradient value to reflect the data classification and grading performance of the data classification and grading model constructed by the training nodes connected to itself, and operate the encrypted average gradient value based on the target secret and target noise to obtain the hidden average gradient value, so as to hide and protect the encrypted average gradient value with the help of the target secret and target noise.
[0084] In some application scenarios, when the target intermediate computing node calculates the encrypted average gradient value based on the target secret and the target noise to obtain the hidden average gradient value, the target intermediate computing node can calculate the encrypted average gradient value based on the target secret and the target noise according to the calculation formula to obtain the hidden average gradient value;
[0085] The calculation formula includes:
[0086] m=a+b*n;
[0087] Among them, m represents the hidden average gradient value; a represents the encrypted average gradient value; b represents the target secret; and n represents the target noise.
[0088] Correspondingly, in the process of calculating the target model gradient value based on the private key, the master secret and the hidden average gradient value, the central node can calculate the average value of all the hidden average gradient values; decrypt the average value based on the private key to obtain the target model gradient value. For ease of understanding, assuming that the number of target intermediate computing nodes is 3, the master secret 0 is split into 0=b1+b2+b3, and m1=a1+b1*n, m2=a2+b2*n, m3=a3+b3*n, then the central node calculates (m1+m2+m3) / 3=[a1+a2+a3+(b1+b2+b3)*n] / 3= (a1+a2+a3) / 3, and then the central node decrypts the average value based on the private key to obtain the target model gradient value, which is equivalent to obtaining the target model gradient value based on the average value of the initial model gradient value. It can be seen that this application uses the target secret and public key to achieve the secure transmission of the model gradient value generated by the training node to the central node for processing, avoiding privacy leakage and ensuring data security.
[0089] Step S106: Transmit the hidden average gradient value to the central node, so that the central node calculates the target model gradient value based on the private key, the master secret and the hidden average gradient value.
[0090] It is understandable that after obtaining the hidden average gradient value, the target intermediate computing node can transmit the hidden average gradient value to the central node, so that the central node can calculate the hidden average gradient value based on the private key and the master secret to obtain the target model gradient value. It is not difficult to understand that when multiple target intermediate computing nodes transmit the corresponding hidden average gradient values to the central node, the central node is equivalent to determining the target model gradient value based on multiple hidden average gradient values, that is, it is equivalent to combining the initial model gradient values of multiple training nodes to determine the target model gradient value, which is equivalent to determining the data classification and grading performance of the final data classification and grading model based on the data classification and grading performance of multiple data classification and grading models.
[0091] Step S107: Obtain the target model gradient value sent by the central node, and transmit the target model gradient value to the training node, so that the training node performs data classification and grading based on the target model gradient value.
[0092] It is understandable that after transmitting the hidden average gradient value to the central node, the target intermediate computing node also needs to obtain the target model gradient value sent by the central node, and transmit the target model gradient value to the training node, so that the training node can classify and grade the data based on the target model gradient value. It should be noted that in the process of data classification and grading based on the target model gradient value by the training node, if the next round of training is required, the next round of iteration is performed based on the target model gradient value until the data classification and grading model training is completed, and the final data classification and grading model is used for data classification and grading; if the next round of training is not required, the final data classification and grading model can be directly determined based on the target model gradient value, and the final data classification and grading model is used for data classification and grading.
[0093] The present disclosure provides a data classification and grading method, which is applied to a target intermediate computing node, receives a public key and a corresponding target secret sent by a connected central node, wherein the target secret includes a sub-secret corresponding to the target intermediate computing node obtained by splitting a main secret by the central node; transmits the public key to each training node connected to itself; negotiates with other intermediate computing nodes to determine a target noise; obtains encrypted model gradient values sent by all training nodes, wherein the encrypted model gradient values include gradient values obtained by encrypting an initial model gradient value trained by the training node based on the public key, and the initial model gradient value is used to construct a data classification and grading model; calculates an encrypted average gradient value corresponding to the encrypted model gradient value, and operates the encrypted average gradient value based on the target secret and the target noise to obtain a hidden average gradient value; transmits the hidden average gradient value to the central node, so that the central node calculates the target model gradient value based on the private key, the main secret and the hidden average gradient value; obtains the target model gradient value sent by the central node, and transmits the target model gradient value to the training node, so that the training node performs data classification and grading based on the target model gradient value. In the present disclosure, the training node encrypts the initial model gradient value based on the public key, and the target intermediate computing node calculates the encrypted average gradient value based on the target secret and the target noise to obtain the hidden average gradient value, and transmits the hidden average gradient value to the central node, thereby realizing the secure transmission of the initial model gradient value. In this way, the central node can determine the final target model gradient value based on the secure initial model gradient value, so that the training node can securely classify and grade data based on the target model gradient value.
[0094] See also Figure 3 , Figure 3 The second flowchart of a data classification and grading method is shown according to an exemplary embodiment.
[0095] The present disclosure relates to a data classification and grading method, which is applied to a central node and may include the following steps:
[0096] Step S201: Generate a public key and send the public key to each connected intermediate computing node, so that the intermediate computing node transmits the public key to each connected training node.
[0097] Step S202: Obtain a master secret, split the master secret into target secrets corresponding to each intermediate computing node, and send the target secrets to the corresponding intermediate computing nodes.
[0098] Step S203: receiving the hidden average gradient value sent by each intermediate computing node.
[0099] Step S204: Calculate the target model gradient value based on the private key, the master secret and the hidden average gradient value.
[0100] Step S205: Transmit the target model gradient value to each intermediate computing node, so that the intermediate computing node transmits the target model gradient value to the training node, and then the training node performs data classification and grading based on the target model gradient value; wherein the hidden average gradient value includes the encrypted average gradient value corresponding to the encrypted model gradient value calculated by the intermediate computing node, and the gradient value obtained after the encrypted average gradient value is operated based on the target secret and the target noise; the encrypted model gradient value includes the gradient value obtained after the training node corresponding to the intermediate computing node encrypts the trained initial model gradient value based on the public key, and the initial model gradient value is used to construct a data classification and grading model; the target noise includes the noise determined by negotiation among all the intermediate computing nodes.
[0101] In some application scenarios, the value of the master secret can be 0; accordingly, the central node can calculate the average value of all hidden average gradient values in the process of calculating the target model gradient value based on the private key, the master secret and the hidden average gradient value; decrypt the average value based on the private key to obtain the target model gradient value.
[0102] The description of the corresponding steps in the data classification and grading method provided by the present disclosure can be found in the above embodiments and will not be repeated here.
[0103] See also Figure 4 , Figure 4 It is a first structural schematic diagram of a data classification and grading device according to an exemplary embodiment.
[0104] The present disclosure relates to a data classification and grading device 400, which is applied to a target intermediate computing node and may include:
[0105] The first receiving module 410 is used to receive the public key and the corresponding target secret sent by the connected central node, where the target secret includes the sub-secret corresponding to the target intermediate computing node obtained by splitting the main secret by the central node;
[0106] A first transmission module 420, configured to transmit a public key to each training node connected to the first training node;
[0107] A first negotiation module 430, configured to negotiate with other intermediate computing nodes to determine a target noise;
[0108] A first acquisition module 440 is used to acquire the encrypted model gradient values sent by all training nodes, where the encrypted model gradient values include gradient values obtained by encrypting the initial model gradient values trained by the training nodes based on the public key, and the initial model gradient values are used to construct a data classification and grading model;
[0109] A first calculation module 450 is used to calculate an encrypted average gradient value corresponding to the encrypted model gradient value, and to operate the encrypted average gradient value based on the target secret and the target noise to obtain a hidden average gradient value;
[0110] A second transmission module 460 is used to transmit the hidden average gradient value to the central node, so that the central node calculates the target model gradient value based on the private key, the master secret and the hidden average gradient value;
[0111] The second acquisition module 470 is used to acquire the target model gradient value sent by the central node, and transmit the target model gradient value to the training node, so that the training node can perform data classification and grading based on the target model gradient value.
[0112] The present disclosure relates to a data classification and grading device, which is applied to a target intermediate computing node, wherein a first receiving module comprises:
[0113] The first receiving unit is used to receive the public key and the corresponding target secret sent by the connected central node, where the public key includes the homomorphic encryption public key generated by the central node, and the value of the master secret is 0.
[0114] The present disclosure relates to a data classification and grading device, which is applied to a target intermediate computing node. The first negotiation module may include:
[0115] A first negotiation unit, used to perform key negotiation with other intermediate computing nodes in pairs to generate a symmetric encryption key;
[0116] The second negotiation unit is used to negotiate with other intermediate computing nodes to determine the target noise based on the symmetric encryption key.
[0117] The present disclosure relates to a data classification and grading device, which is applied to a target intermediate computing node, and the second negotiation unit can be specifically used to: generate target noise; encrypt the target noise based on a symmetric encryption key to obtain encrypted matrix noise; transmit the encrypted matrix noise to a central node, so that the central node transmits the encrypted matrix noise to other intermediate computing nodes, and then the other intermediate computing nodes decrypt the encrypted matrix noise based on the symmetric encryption key to obtain the target noise.
[0118] The present disclosure relates to a data classification and grading device, which is applied to a target intermediate computing node. The second negotiation unit can be specifically used to receive encrypted matrix noise transmitted by a central node, wherein the encrypted matrix noise includes noise obtained by encrypting the target noise generated by other intermediate nodes based on a symmetric encryption key; and the encrypted matrix noise is decrypted based on the symmetric encryption key to obtain the target noise.
[0119] The present disclosure relates to a data classification and grading device, which is applied to a target intermediate computing node. The first computing module may include:
[0120] A first calculation unit is used to calculate the encrypted average gradient value based on the target secret and the target noise according to the calculation formula to obtain the hidden average gradient value;
[0121] The calculation formula includes:
[0122] m=a+b*n;
[0123] Among them, m represents the hidden average gradient value; a represents the encrypted average gradient value; b represents the target secret; and n represents the target noise.
[0124] See also Figure 5 , Figure 5 It is a second structural schematic diagram of a data classification and grading device according to an exemplary embodiment.
[0125] The present disclosure relates to a data classification and grading device 500, which is applied to a central node and may include:
[0126] A first generating module 510 is used to generate a public key and send the public key to each connected intermediate computing node, so that the intermediate computing node transmits the public key to each connected training node;
[0127] The third acquisition module 520 is used to obtain the main secret, split the main secret into target secrets corresponding to each intermediate computing node, and send the target secrets to the corresponding intermediate computing nodes;
[0128] The second receiving module 530 is used to receive the hidden average gradient value sent by each intermediate computing node;
[0129] A second calculation module 540, used to calculate the target model gradient value based on the private key, the master secret and the hidden average gradient value;
[0130] The third transmission module 550 is used to transmit the target model gradient value to each intermediate computing node, so that the intermediate computing node transmits the target model gradient value to the training node, and then the training node performs data classification based on the target model gradient value;
[0131] Among them, the hidden average gradient value includes the encrypted average gradient value corresponding to the encrypted model gradient value calculated by the intermediate computing node, and the gradient value obtained after the encrypted average gradient value is operated based on the target secret and the target noise; the encrypted model gradient value includes the gradient value obtained after the training node corresponding to the intermediate computing node encrypts the trained initial model gradient value based on the public key, and the initial model gradient value is used to construct a data classification and grading model; the target noise includes the noise determined by negotiation among all the intermediate computing nodes.
[0132] The present disclosure relates to a data classification and grading device 500, which is applied to a central node, and the value of the master secret is 0;
[0133] The second calculation module may include:
[0134] The second calculation unit is used to calculate the average value of all hidden average gradient values;
[0135] The first decryption unit is used to decrypt the average value based on the private key to obtain the target model gradient value.
[0136] Figure 6 FIG. 9 is a block diagram of an electronic device 900 according to an exemplary embodiment. Figure 6 As shown, the electronic device 900 may include: a processor 901 and a memory 902. The electronic device 900 may also include one or more of a multimedia component 903, an input / output (I / O) interface 904, and a communication component 905.
[0137] The processor 901 is used to control the overall operation of the electronic device 900 to complete all or part of the steps in the above-mentioned data classification and grading method. The memory 902 is used to store various types of data to support the operation of the electronic device 900. For example, these data may include instructions for any application or method used to operate on the electronic device 900, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 902 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 903 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone, which is used to receive external audio signals. The received audio signal may be further stored in the memory 902 or sent through the communication component 905. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 904 provides an interface between the processor 901 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 905 is used for wired or wireless communication between the electronic device 900 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 905 may include: Wi-Fi module, Bluetooth module, NFC module.
[0138] In an exemplary embodiment, the electronic device 900 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned message encryption and decryption methods.
[0139] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned data classification and grading method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 902 including program instructions, and the above-mentioned program instructions can be executed by the processor 901 of the electronic device 900 to complete the above-mentioned message encryption and decryption method.
[0140] For the description of the relevant parts of a data classification and grading device, an electronic device, and a computer-readable storage medium provided by the embodiments of the present disclosure, please refer to the detailed description of the corresponding parts in a data classification and grading method provided by the embodiments of the present disclosure, which will not be repeated here. In addition, the parts of the above technical solutions provided by the embodiments of the present disclosure that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.
[0141] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0142] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data classification and grading method, characterized in that: Applied to the target intermediate computing node, including: Receive a public key and a corresponding target secret sent by a connected central node, wherein the target secret includes a sub-secret corresponding to the target intermediate computing node obtained by splitting the main secret by the central node; Transmit the public key to each training node connected to it; Negotiate with other intermediate computing nodes to determine the target noise; Obtaining the encrypted model gradient values sent by all the training nodes, wherein the encrypted model gradient values include gradient values obtained by encrypting the initial model gradient values trained by the training nodes based on the public key, and the initial model gradient values are used to construct a data classification and grading model; Calculating an encrypted average gradient value corresponding to the encrypted model gradient value, and performing an operation on the encrypted average gradient value based on the target secret and the target noise to obtain a hidden average gradient value; Transmitting the hidden average gradient value to the central node so that the central node calculates the target model gradient value based on the private key, the master secret and the hidden average gradient value; The target model gradient value sent by the central node is obtained, and the target model gradient value is transmitted to the training node, so that the training node performs data classification and grading based on the target model gradient value.
2. The method according to claim 1, characterized in that: The public key and the corresponding target secret sent by the central node receiving the connection include: Receive the public key and the corresponding target secret sent by the connected central node, where the public key includes the homomorphic encryption public key generated by the central node, and the value of the master secret is 0.
3. The method according to claim 2, characterized in that The determining of the target noise through consultation with other intermediate computing nodes comprises: Perform key negotiation with the other intermediate computing nodes in pairs to generate a symmetric encryption key; The target noise is determined by negotiation with the other intermediate computing nodes based on the symmetric encryption key.
4. The method according to claim 3, characterized in that The determining the target noise through negotiation with the other intermediate computing nodes based on the symmetric encryption key includes: generating the target noise; Encrypting the target noise based on the symmetric encryption key to obtain encrypted matrix noise; The encrypted matrix noise is transmitted to the central node, so that the central node transmits the encrypted matrix noise to the other intermediate computing nodes, and then the other intermediate computing nodes decrypt the encrypted matrix noise based on the symmetric encryption key to obtain the target noise.
5. The method according to claim 3, characterized in that: The determining the target noise through negotiation with the other intermediate computing nodes based on the symmetric encryption key includes: Receiving the encrypted matrix noise transmitted by the central node, the encrypted matrix noise comprising the noise obtained by encrypting the target noise generated by the other intermediate nodes based on the symmetric encryption key; The encrypted matrix noise is decrypted based on the symmetric encryption key to obtain the target noise.
6. The method according to claim 3, characterized in that The step of operating the encrypted average gradient value based on the target secret and the target noise to obtain a hidden average gradient value includes: According to a calculation formula, the encrypted average gradient value is calculated based on the target secret and the target noise to obtain the hidden average gradient value; The calculation formula includes: m=a+b*n; Among them, m represents the hidden average gradient value; a represents the encrypted average gradient value; b represents the target secret; and n represents the target noise.
7. A data classification and grading method, characterized in that: Applied to the central node, including: Generate a public key, and send the public key to each connected intermediate computing node, so that the intermediate computing node transmits the public key to each connected training node; Obtaining a master secret, splitting the master secret into target secrets corresponding to each of the intermediate computing nodes, and sending the target secrets to the corresponding intermediate computing nodes; Receiving the hidden average gradient value sent by each of the intermediate computing nodes; Calculate the target model gradient value based on the private key, the master secret and the hidden average gradient value; Transmitting the target model gradient value to each of the intermediate computing nodes, so that the intermediate computing nodes transmit the target model gradient value to the training nodes, and then the training nodes perform data classification and grading based on the target model gradient value; Among them, the hidden average gradient value includes the encrypted average gradient value corresponding to the encrypted model gradient value calculated by the intermediate computing node, and the gradient value obtained after operating the encrypted average gradient value based on the target secret and the target noise; the encrypted model gradient value includes the gradient value obtained after the training node corresponding to the intermediate computing node encrypts the trained initial model gradient value based on the public key, and the initial model gradient value is used to construct a data classification and grading model; the target noise includes the noise determined by negotiation among all the intermediate computing nodes.
8. The method according to claim 7, characterized in that The value of the master secret is 0; The calculating the target model gradient value based on the private key, the master secret and the hidden average gradient value includes: Calculate the average of all the hidden average gradient values; The average value is decrypted based on the private key to obtain the target model gradient value.
9. A data classification and grading device, characterized in that: Applied to the target intermediate computing node, including: A first receiving module, configured to receive a public key and a corresponding target secret sent by a connected central node, wherein the target secret includes a sub-secret corresponding to the target intermediate computing node obtained by splitting a main secret by the central node; A first transmission module, used to transmit the public key to each training node connected to it; A first negotiation module, used for negotiating with other intermediate computing nodes to determine the target noise; A first acquisition module is used to acquire the encrypted model gradient values sent by all the training nodes, wherein the encrypted model gradient values include gradient values obtained by encrypting the initial model gradient values trained by the training nodes based on the public key, and the initial model gradient values are used to construct a data classification and grading model; A first calculation module, configured to calculate an encrypted average gradient value corresponding to the encrypted model gradient value, and to operate the encrypted average gradient value based on the target secret and the target noise to obtain a hidden average gradient value; A second transmission module, used for transmitting the hidden average gradient value to the central node, so that the central node calculates the target model gradient value based on the private key, the master secret and the hidden average gradient value; The second acquisition module is used to acquire the target model gradient value sent by the central node, and transmit the target model gradient value to the training node, so that the training node performs data classification and grading based on the target model gradient value.
10. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Privacy protection multi-mechanism data classification method based on homomorphic encryption
CN110190946A
Model training control method, device and system based on multiple computing nodes
CN111428887A