Data auditing methods, equipment, media and program products in federated learning

By conducting basic and content characteristics audits on the communication data flow of federated learning devices, the problem of malicious data making it difficult for federated learning models to converge is solved, and the effect of improving federated learning efficiency is achieved.

CN113780571BActive Publication Date: 2025-03-04CLUSTAR TECH LO LTD

Patent Information

Application Number
CN202110915841.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-10
Publication Date
2025-03-04
Estimated Expiration
2041-08-10

AI Technical Summary

Technical Problem

In federated learning, the existence of malicious data makes it difficult for the model to converge and affects efficiency.

Method used

By obtaining the communication data flow information of federated learning devices, conducting basic feature audits of plain text data and dense data, and after passing, content feature audits are conducted to generate audit results to identify and prevent malicious data participation.

Benefits of technology

Effectively prevent malicious data from participating in federated learning, preventing the problem that the model is difficult to converge, and improving the efficiency of federated learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113780571B_ABST
    Figure CN113780571B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, medium and program product for data auditing in federated learning, wherein the method for data auditing in federated learning comprises: obtaining communication data flow information of a federated learning device, wherein the communication data flow information comprises at least one of plaintext data and secret data; if the communication data flow information comprises plaintext data, performing a basic feature audit on the plaintext data, and when the basic feature audit of the plaintext data passes, performing a content feature audit on the plaintext data; if the communication data flow information comprises secret data, performing a basic feature audit on the secret data, and when the basic feature audit of the secret data passes, selectively performing a content feature audit on the secret data based on whether the secret data has the decryption authority; when the audit is completed or an abnormal state is found during the audit process, an audit result is generated. The present application solves the technical problem of low efficiency of federated learning due to the presence of malicious data in the communication of federated devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to a data auditing method, device, medium and program product in federated learning. Background Art

[0002] With the continuous development of artificial intelligence technology, researchers have proposed a machine learning solution called federated learning. Federated learning is a machine learning technology that trains models on multiple decentralized edge devices or servers. It allows multiple data parties to jointly establish a common and powerful machine learning model without sharing the original data, thereby solving key issues such as data privacy, data security, data access rights, and heterogeneous data access. At present, when conducting federated learning, confidential data usually needs to be transmitted between each federated learning device, such as encrypted gradients, encrypted losses, or encrypted model network parameters themselves. Once a malicious device sends malicious data to the federated server to participate in federated learning, it will make it difficult for the model built based on federated learning to converge, thereby affecting the efficiency of federated learning. Summary of the invention

[0003] The main purpose of this application is to provide a data auditing method, device, medium and program product in federated learning, aiming to solve the technical problem in the prior art that the efficiency of federated learning is low due to the presence of malicious data in the federated learning communication process.

[0004] To achieve the above-mentioned purpose, the present application provides a method for auditing data in federated learning, which is applied to a data auditing device in federated learning. The method for auditing data in federated learning includes:

[0005] Acquire communication data flow information of a federated learning device, wherein the communication data flow information includes at least one of plaintext data and encrypted data;

[0006] If the communication data flow information includes the plaintext data, a basic feature audit is performed on the plaintext data, and if the basic feature audit of the plaintext data passes, a content feature audit is performed on the plaintext data;

[0007] If the communication data flow information includes the confidential data, a basic feature audit is performed on the confidential data, and if the basic feature audit of the confidential data passes, a content feature audit is selectively performed on the confidential data based on whether the decryption authority for the confidential data is possessed;

[0008] When the audit is completed or an abnormal situation is found during the audit process, the audit results are generated.

[0009] Optionally, the audit result includes a plaintext data audit result.

[0010] When the audit is completed or an abnormal state is found during the audit, the step of generating the audit result includes:

[0011] If an abnormal state is found during the basic feature audit or content feature audit of the plaintext data, a plaintext data audit result is generated according to the abnormal state;

[0012] If no abnormal state is found during the basic feature audit and content feature audit of the plaintext data, and when the basic feature audit and content feature audit of the plaintext data are completed, the generated result is a plaintext data audit result that passes both the basic feature audit and the content feature audit.

[0013] Optionally, the audit result includes a ciphertext data audit result.

[0014] When the audit is completed or an abnormal state is found during the audit, the step of generating the audit result includes:

[0015] If an abnormal state is found during the basic feature audit or content feature audit of the ciphertext data, a ciphertext data audit result is generated based on the abnormal state;

[0016] In the case where the basic feature audit of the confidential data passes, if the decryption authority for the confidential data is not possessed, a confidential data audit result is generated as a result of passing the basic feature audit;

[0017] If no abnormal state is found during the basic feature audit and content feature audit of the confidential data, and when the basic feature audit and content feature audit of the confidential data are completed, a result is generated as a confidential data audit result that passes both the basic feature audit and the content feature audit.

[0018] Optionally, the secret data includes a secret tensor.

[0019] The step of selectively auditing the content characteristics of the confidential data according to whether the decryption authority of the confidential data is possessed comprises:

[0020] If the user has the decryption authority for the secret data, the secret tensor is decrypted to obtain the tensor to be audited;

[0021] Obtaining the rule table index information corresponding to the tensor to be audited, and querying the target rule table corresponding to the tensor to be audited in the preset rule model according to the rule table index information;

[0022] Based on the audit rules in the target rule table, audit the content features of the tensor to be audited until the audit is completed or an abnormal state is found during the audit process;

[0023] If the user does not have the authority to decrypt the confidential data, the content feature audit of the confidential data will not be performed and the audit will end.

[0024] Optionally, the audit rule includes data location information and audit sub-rules.

[0025] The step of auditing the content features of the tensor to be audited based on the audit rules in the target rule table includes:

[0026] Based on the data location information, locate the content to be audited in the tensor to be audited;

[0027] Based on the audit sub-rule, the value range of the numerical value in the content to be audited and whether the numerical value in the content to be audited can be empty are audited.

[0028] Optionally, the step of obtaining the rule table index information corresponding to the tensor to be audited includes:

[0029] Obtaining the federated learning task identification information, the corresponding federated device identity information, the corresponding federated iteration number information, and the corresponding intermediate result data type information corresponding to the tensor to be audited;

[0030] The federated learning task identification information, the federated device identity information, the federated iteration number information and the intermediate result data type information are aggregated to obtain the rule table index information.

[0031] Optionally, the rule table index information consists of at least one of federated learning task identification information, federated device identity information, federated iteration number information, and intermediate result data type information.

[0032] Optionally, before the step of querying the target rule table corresponding to the tensor to be audited in the preset rule model according to the rule table index information, the data audit method in federated learning further includes:

[0033] Obtaining a feature value range of each sample feature corresponding to a preset federated task, and constructing a test sample set according to the feature value range of each sample feature;

[0034] Based on the test sample set, perform federated learning modeling with other federated learning devices to calculate several intermediate result tensors corresponding to the test sample set;

[0035] Construct rule table index information corresponding to the several intermediate result tensors, and construct the preset rule model according to the data distribution of the several intermediate result tensors and the rule table index information corresponding to the several intermediate result tensors.

[0036] Optionally, before the step of querying the target rule table corresponding to the tensor to be audited in the preset rule model according to the rule table index information, the data audit method in federated learning further includes:

[0037] Obtaining a feature value range of each sample feature corresponding to a preset federated task, and an intermediate result calculation expression corresponding to a federated learning model corresponding to the preset federated task;

[0038] Calculate the data distribution of several intermediate result tensors corresponding to the federated learning model according to the feature value range of each sample feature and the intermediate result calculation expression;

[0039] Construct rule table index information corresponding to the several intermediate result tensors, and construct the preset rule model according to the data distribution of the several intermediate result tensors and the rule table index information corresponding to the several intermediate result tensors.

[0040] The present application also provides a data auditing device in federated learning, wherein the data auditing device in federated learning is a virtual device, and the data auditing device in federated learning is applied to a data auditing device in federated learning, and the data auditing device in federated learning includes:

[0041] An acquisition module, configured to acquire communication data flow information of a federated learning device, wherein the communication data flow information includes at least one of plaintext data and encrypted data;

[0042] A plaintext data audit module, configured to perform a basic feature audit on the plaintext data if the communication data flow information includes the plaintext data, and to perform a content feature audit on the plaintext data if the basic feature audit of the plaintext data passes;

[0043] A secret data audit module, configured to perform a basic feature audit on the secret data if the communication data flow information includes the secret data, and to selectively perform a content feature audit on the secret data based on whether the secret data has the decryption authority if the basic feature audit on the secret data passes;

[0044] The generation module is used to generate audit results when the audit is completed or an abnormal state is found during the audit process.

[0045] Optionally, the audit result includes a plaintext data audit result, and the generating module is further used to:

[0046] If an abnormal state is found during the basic feature audit or content feature audit of the plaintext data, a plaintext data audit result is generated according to the abnormal state;

[0047] If no abnormal state is found during the basic feature audit and content feature audit of the plaintext data, and when the basic feature audit and content feature audit of the plaintext data are completed, the generated result is a plaintext data audit result that passes both the basic feature audit and the content feature audit.

[0048] Optionally, the audit result includes a ciphertext data audit result, and the generating module is further used to:

[0049] If an abnormal state is found during the basic feature audit or content feature audit of the ciphertext data, a ciphertext data audit result is generated based on the abnormal state;

[0050] In the case where the basic feature audit of the confidential data passes, if the decryption authority for the confidential data is not possessed, a confidential data audit result is generated as a result of passing the basic feature audit;

[0051] If no abnormal state is found during the basic feature audit and content feature audit of the confidential data, and the basic feature audit and content feature audit of the confidential data are completed, the generated result is a passed confidential data audit result.

[0052] Optionally, the secret data includes a secret tensor, and the secret data audit module is further used to:

[0053] If the user has the decryption authority for the secret data, the secret tensor is decrypted to obtain the tensor to be audited;

[0054] Obtaining the rule table index information corresponding to the tensor to be audited, and querying the target rule table corresponding to the tensor to be audited in the preset rule model according to the rule table index information;

[0055] Based on the audit rules in the target rule table, audit the content features of the tensor to be audited until the audit is completed or an abnormal state is found during the audit process;

[0056] If the user does not have the authority to decrypt the confidential data, the content feature audit of the confidential data will not be performed and the audit will end.

[0057] Optionally, the audit rule includes data location information and audit sub-rules, and the confidential data audit module is further used to:

[0058] Based on the data location information, locate the content to be audited in the tensor to be audited;

[0059] Based on the audit sub-rule, the value range of the numerical value in the content to be audited and whether the numerical value in the content to be audited can be empty are audited.

[0060] Optionally, the confidential data audit module is further used to:

[0061] Obtaining the federated learning task identification information, the corresponding federated device identity information, the corresponding federated iteration number information, and the corresponding intermediate result data type information corresponding to the tensor to be audited;

[0062] The federated learning task identification information, the federated device identity information, the federated iteration number information and the intermediate result data type information are aggregated to obtain the rule table index information.

[0063] Optionally, in the confidential data audit module, the rule table index information consists of at least one of federated learning task identification information, federated device identity information, federated iteration number information and intermediate result data type information.

[0064] Optionally, the data auditing device in the federated learning is also used for:

[0065] Obtaining a feature value range of each sample feature corresponding to a preset federated task, and constructing a test sample set according to the feature value range of each sample feature;

[0066] Based on the test sample set, perform federated learning modeling with other federated learning devices to calculate several intermediate result tensors corresponding to the test sample set;

[0067] Construct rule table index information corresponding to the several intermediate result tensors, and construct the preset rule model according to the data distribution of the several intermediate result tensors and the rule table index information corresponding to the several intermediate result tensors.

[0068] Optionally, the data auditing device in the federated learning is also used for:

[0069] Obtaining a feature value range of each sample feature corresponding to a preset federated task, and an intermediate result calculation expression corresponding to a federated learning model corresponding to the preset federated task;

[0070] Calculate the data distribution of several intermediate result tensors corresponding to the federated learning model according to the feature value ranges and the intermediate result calculation expressions;

[0071] Construct rule table index information corresponding to the several intermediate result tensors, and construct the preset rule model according to the data distribution of the several intermediate result tensors and the rule table index information corresponding to the several intermediate result tensors.

[0072] The present application also provides a data auditing device in federated learning, which is a physical device. The data auditing device in federated learning includes: a memory, a processor, and a program of the data auditing method in federated learning stored in the memory and executable on the processor. When the program of the data auditing method in federated learning is executed by the processor, the steps of the data auditing method in federated learning as described above can be implemented.

[0073] The present application also provides a medium, which is a readable storage medium, on which is stored a program for implementing a data auditing method in federated learning, and when the program for the data auditing method in federated learning is executed by a processor, the steps of the data auditing method in federated learning as described above are implemented.

[0074] The present application also provides a program product, which is a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the data auditing method in federated learning as described above are implemented.

[0075] The present application provides a data audit method, device, medium and program product in federated learning, that is, obtaining communication data flow information of a federated learning device, wherein the communication data flow information includes at least one of plaintext data and secret data; if the communication data flow information includes the plaintext data, performing a basic feature audit on the plaintext data, and if the basic feature audit of the plaintext data passes, performing a content feature audit on the plaintext data; if the communication data flow information includes the secret data, performing a basic feature audit on the secret data, and if the basic feature audit of the secret data passes, selectively performing a content feature audit on the secret data based on whether the decryption authority for the secret data is possessed. Levy an audit; generate an audit result when the audit is completed or an abnormal state is found during the audit process. It should be noted that when a malicious party generates malicious data, the basic characteristics and content characteristics of the malicious data are likely to change compared to non-malicious standard data. This application audits the basic characteristics and content characteristics of the communication data flow information of the federated learning device, and can identify malicious data in the federated learning communication process before the malicious data actually participates in the calculation of federated learning, thereby preventing malicious data from participating in federated learning. This can overcome the technical defect that once a malicious device sends malicious data to the federal server to participate in federated learning, it will make it difficult for the model built based on federated learning to converge, thereby improving the efficiency of federated learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0077] In order to more clearly illustrate the embodiments of the present application 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0078] Figure 1 This is a flowchart of the first embodiment of the data audit method in federated learning in this application;

[0079] Figure 2 This is a flowchart of the data auditing method in federated learning in this application;

[0080] Figure 3 This is a flow chart of the second embodiment of the data auditing method in federated learning of this application;

[0081] Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the data auditing method in federated learning in the embodiment of the present application.

[0082] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0083] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0084] The present application embodiment provides a method for data auditing in federated learning. In the first embodiment of the method for data auditing in federated learning of the present application, refer to Figure 1 , the data auditing method in the federated learning includes:

[0085] Step S10, obtaining communication data flow information of the federated learning device, wherein the communication data flow information includes at least one of plaintext data and encrypted data;

[0086] In this embodiment, it should be noted that the federated learning device can be a federated server or a participant device in federated learning. Specifically, since in federated learning, there is data transmission between the participant device and the federated server, and there is also data transmission between the participant devices, the data auditing method in federated learning of the present application can be used to perform data auditing at the federal server or the participant device. The communication data flow information is data communicated and transmitted between the federated learning device and other federated learning devices, and can be a communication data flow received by the federated learning device from the outside world, or can be a communication data flow sent by the federated learning device to the outside world.

[0087] It should be understood that the method provided in this embodiment is applied to a data audit device in federated learning, which can be a plug-in on the gateway of a federated learning device so as not to affect the operation of federated learning related software or services on the federated learning device, or can be a plug-in or integrated into a part of the hardware platform of a specific federated learning device, or can be an audit device independent of the federated learning device. These can be adjusted according to actual application scenarios and requirements, and are not specifically limited here.

[0088] In addition, it should be noted that the confidential data is encrypted communication data, which can be encrypted model loss, encrypted model gradient, encrypted label-assisted calculation data, and encrypted model network parameters themselves, etc., wherein the label-assisted calculation data can be sent by a participant device with sample labels to a participant device without sample labels, so that the participant device can use the label-assisted calculation data to calculate its own model gradient, and the plaintext data is unencrypted communication data, which can be the location of tree splitting nodes and tree model training results, etc.

[0089] In addition, it should be noted that if the communication data flow information only includes plaintext data, then only the plaintext data needs to be audited; if the communication data flow information only includes confidential data, then only the confidential data needs to be audited; if the communication data flow information includes plaintext data and confidential data, then both the plaintext data and the confidential data need to be audited, wherein the specific process of auditing the plaintext data can refer to the content in the following step S20, and the specific process of auditing the confidential data can refer to the content in the following step S30.

[0090] Step S20: if the communication data flow information includes the plaintext data, a basic feature audit is performed on the plaintext data, and if the basic feature audit of the plaintext data passes, a content feature audit is performed on the plaintext data;

[0091] In this embodiment, it should be noted that the plaintext data has basic features and content features, wherein the basic features are data characteristic features that are independent of the content of the data, such as data size, data format, data type, and hash value corresponding to the data, etc., and the content features are data distribution features of numerical values ​​in the data content, such as the value range of numerical values ​​in the data content and whether the value can be empty, etc.

[0092] Specifically, if the communication data flow information includes the plaintext data, the basic characteristics of the plaintext data are audited to determine whether the basic characteristics of the plaintext data are consistent with the preset plaintext basic characteristics. If they are consistent, it is determined that the basic characteristics audit of the plaintext data has passed. Further, the plaintext data is audited for content characteristics until an abnormal state is found during the audit process or the audit is terminated; if they are inconsistent, it is determined that an abnormal state is found during the audit process of the basic characteristics of the plaintext data, the audit process is terminated, and the feature data audit of the plaintext data is no longer performed, so as to shorten the data audit process and improve the efficiency of data audit.

[0093] The step of determining whether the basic features of the plaintext data are consistent with the preset plaintext basic features may specifically be:

[0094] Determine whether the data size corresponding to the plaintext data is consistent with the preset data size; and / or determine whether the data type corresponding to the plaintext data is consistent with the preset data type; and / or determine whether the data format corresponding to the plaintext data is consistent with the preset data format; and determine whether the hash value corresponding to the plaintext data is consistent with the hash value corresponding to the plaintext data before data transmission, etc.

[0095] The step of performing basic feature audit on the plaintext data and, if the basic feature audit on the plaintext data passes, performing content feature audit on the plaintext data includes:

[0096] Step C10, auditing the basic characteristics of the plaintext data;

[0097] Step C20, if the basic feature audit of the plaintext data fails, it is determined that an abnormal state is found in the audit process;

[0098] Step C30: If the basic feature audit of the plaintext data passes, a content feature audit is performed on the plaintext data until an abnormal state is found during the audit process or the audit ends.

[0099] In this embodiment, specifically, if the communication data flow information includes the plaintext data, the basic features of the plaintext data are audited to determine whether the basic features of the plaintext data are consistent with the preset plaintext basic features. If they are consistent, the basic features of the plaintext data are audited, and then the number of federated learning iterations and the corresponding federated learning task identifier corresponding to the plaintext data are determined, and then the number of federated learning iterations and the federated learning task identifier are aggregated to obtain the rule table index information corresponding to the plaintext data, and then according to the rule table index information, the target rule table corresponding to the plaintext data is searched in the preset rule model, and then according to the audit rules in the target rule table, the plaintext data is audited for content features until an abnormal state is found during the audit process or the audit ends; if they are inconsistent, it is determined that an abnormal state is found during the audit process, wherein the plaintext data includes a plaintext tensor to be audited, and the step of performing content feature audit on the plaintext data includes:

[0100] Obtain the rule table index information corresponding to the plaintext tensor to be audited, and query the target rule table corresponding to the plaintext tensor to be audited in the preset rule model based on the rule table index information; based on the audit rules in the target rule table, audit the content characteristics of the plaintext tensor to be audited until the audit is completed or an abnormal state is found during the audit process, wherein the specific process of obtaining the rule table index information corresponding to the plaintext tensor to be audited can refer to the specific contents of steps S221 to S222, which will not be repeated here; based on the audit rules in the target rule table, the specific process of auditing the content characteristics of the plaintext tensor to be audited can refer to steps S231 to S232, which will not be repeated here.

[0101] Step S30: If the communication data flow information includes the confidential data, a basic feature audit is performed on the confidential data, and if the basic feature audit of the confidential data passes, a content feature audit is selectively performed on the confidential data according to whether the decryption authority for the confidential data is possessed;

[0102] In this embodiment, it should be noted that the basic characteristics of the secret data include data size, data format, data type and hash value, etc. For example, the secret data can be a secret tensor, and the data size can be calculated by the size of the tensor and the key bit width corresponding to the secret data. The data type needs to be a type compatible with the federated learning software, for example, the public key, private key and secret number need to be a large integer type, etc. The data format needs to be a format compatible with the federated learning software, for example, the data format needs to be stored in a legal csv format, etc. The hash value needs to be consistent before and after data transmission, etc. The content characteristics of the secret data are the data distribution characteristics of the numerical value in the plaintext content corresponding to the secret data, such as the value range of the numerical value in the plaintext content and whether the value can be empty, etc.

[0103] Specifically, if the communication data flow information includes the confidential data, the basic characteristics of the confidential data are audited to determine whether the basic characteristics of the confidential data are consistent with the preset ciphertext basic characteristics. If they are consistent, it is determined that the audit of the basic characteristics of the confidential data has passed. If the decryption authority for the confidential data is possessed, the confidential data is decrypted, and the content characteristics of the decrypted confidential data are audited until an abnormal state is found during the audit or the audit is terminated. If the decryption authority for the confidential data is not possessed, the audit is terminated. If they are inconsistent, it is determined that an abnormal state is found during the audit.

[0104] Step S40: When the audit is completed or an abnormal state is found during the audit, an audit result is generated.

[0105] In this embodiment, it should be noted that if it is determined that the basic feature audit or the content feature audit of the plaintext data fails, it is determined that an abnormal state is found in the audit process; if the basic feature audit of the plaintext data passes and the content feature audit of the plaintext data passes, it is determined that the audit ends.

[0106] When the audit is completed or an abnormal state is found during the audit process, an audit result is generated. Specifically, if the audit is completed, an audit result indicating that the audit has passed is generated. If an abnormal state is found during the audit process, an audit result indicating that the audit has failed is generated.

[0107] The audit results include plaintext data audit results.

[0108] When the audit is completed or an abnormal state is found during the audit, the step of generating the audit result includes:

[0109] Step A10, if an abnormal state is found during the basic feature audit or content feature audit of the plaintext data, a plaintext data audit result is generated according to the abnormal state;

[0110] Step A20, if no abnormal state is found during the basic feature audit and content feature audit of the plaintext data, and when the basic feature audit and content feature audit of the plaintext data are completed, a plaintext data audit result is generated that passes both the basic feature audit and the content feature audit.

[0111] In this embodiment, if an abnormal state is found during the basic feature audit of the plaintext data, a plaintext data audit result that fails the basic feature audit is generated; if the basic feature audit of the plaintext data passes but the content feature audit of the plaintext data fails, a plaintext data audit result that fails the content feature audit is generated; if no abnormal state is found during the basic feature audit and content feature audit of the plaintext data, and when the basic feature audit and content feature audit of the plaintext data are completed, a plaintext data audit result that passes both the basic feature audit and the content feature audit is generated.

[0112] The audit results include ciphertext data audit results.

[0113] When the audit is completed or an abnormal state is found during the audit, the step of generating the audit result includes:

[0114] Step B10: if an abnormal state is found during the basic feature audit or content feature audit of the ciphertext data, a ciphertext data audit result is generated according to the abnormal state;

[0115] In this embodiment, specifically, if an abnormal state is found during the basic feature audit of the confidential data, a ciphertext data audit result that fails the basic feature audit is generated; if an abnormal state is found during the content feature audit of the confidential data, a ciphertext data audit result that fails the content feature audit is generated.

[0116] Step B20, when the basic feature audit of the confidential data passes, if the decryption authority for the confidential data is not possessed, generating a confidential data audit result indicating that the basic feature audit has passed;

[0117] In this embodiment, specifically, when the basic feature audit of the confidential data passes, if the decryption authority for the confidential data is not possessed, the audit ends directly, and a confidential data audit result is generated as a result of the basic feature audit passing, so as to shorten the data audit process and improve the efficiency of the data audit.

[0118] Step B30, if no abnormal state is found during the basic feature audit and content feature audit of the confidential data, and when the basic feature audit and content feature audit of the confidential data are completed, a confidential data audit result is generated that passes both the basic feature audit and the content feature audit.

[0119] In addition, if necessary, the audit results include plaintext data audit results and ciphertext data audit results, wherein the generation process of the plaintext data audit results can refer to the contents of steps A10 to A20, and the generation process of the ciphertext data audit results can refer to the contents of steps B10 to B30, which will not be repeated here.

[0120] In one embodiment, if Figure 2 The figure shows a flow chart of data auditing in an embodiment of the present application, wherein the federated learning communication data is the federated communication data stream, the process of data feature auditing is the process of basic feature auditing, the key management system is the key management module, the participants are federated learning participants, and the process of comparing the rule table is the process of content feature auditing.

[0121] It should be noted that the above audit end may mean that the communication data flow information exchange between the federated learning devices is terminated / suspended; or it may mean that the communication data flow information exchange between the federated learning devices is not terminated / suspended, but the audit permission of the communication data flow information is closed in advance based on the audit requirements of the federated learning devices, and the corresponding audit results correspond to the audited communication data flow information.

[0122] The embodiment of the present application provides a data auditing method in federated learning, that is, obtaining communication data flow information of a federated learning device, wherein the communication data flow information includes at least one of plaintext data and confidential data; if the communication data flow information includes the plaintext data, performing a basic feature audit on the plaintext data, and if the basic feature audit of the plaintext data passes, performing a content feature audit on the plaintext data; if the communication data flow information includes the confidential data, performing a basic feature audit on the confidential data, and if the basic feature audit of the confidential data passes, selectively performing a content feature audit on the confidential data based on whether the decryption authority for the confidential data is possessed; in the audit When the audit is completed or an abnormal state is found during the audit process, an audit result is generated. It should be noted that when a malicious party generates malicious data, the basic characteristics and content characteristics of the malicious data are likely to change compared to non-malicious standard data. The embodiment of the present application audits the basic characteristics and content characteristics of the communication data flow information of the federated learning device, and can identify malicious data in the federated learning communication process before the malicious data actually participates in the calculation of federated learning, thereby preventing malicious data from participating in federated learning. This can overcome the technical defect that once a malicious device sends malicious data to the federal server to participate in federated learning, it will make it difficult to converge the model built based on federated learning, thereby improving the efficiency of federated learning.

[0123] Further, refer to Figure 3 , based on the first embodiment of the present application, in another embodiment of the present application, the secret data includes a secret tensor,

[0124] The step of selectively auditing the content characteristics of the confidential data according to whether the decryption authority of the confidential data is possessed comprises:

[0125] Step S21, if the decryption authority for the secret data is available, the secret tensor is decrypted to obtain the tensor to be audited;

[0126] In this embodiment, specifically, if the decryption authority for the confidential data is possessed, a decryption key is requested to be called through the key management module to decrypt the confidential tensor to obtain the tensor to be audited.

[0127] Step S22, obtaining the rule table index information corresponding to the tensor to be audited, and querying the target rule table corresponding to the tensor to be audited in the preset rule model according to the rule table index information;

[0128] In this embodiment, it should be noted that the preset rule model is a model for content feature auditing, and the preset rule model includes at least a target rule table, and the target rule table corresponds to a rule table index information, and the rule table index information corresponds to at least one tensor to be audited, so as to find the target rule table corresponding to the tensor to be audited in the preset rule model, and the rule table index information can be composed of at least one of federated learning task identification information, federated device identity information, federated iteration number information and intermediate result data type information. Further, the target rule table includes audit rules for content feature auditing and data location information for locating the audited data corresponding to the audit rules in the tensor to be audited. For example, when the tensor to be audited is a two-dimensional matrix, the data location information can be column information or row information, and when the tensor to be audited is a three-dimensional tensor, the data location information can be three-dimensional coordinate information. The audit rule includes at least one audit sub-rule, and the audit sub-rule can be a rule for determining the range of numerical values, or a rule for determining whether data can be empty.

[0129] Obtain the rule table index information corresponding to the tensor to be audited, and query the target rule table corresponding to the tensor to be audited in the preset rule model based on the rule table index information. Specifically, obtain the rule table index information corresponding to the tensor to be audited, and then compare the rule table index information with the index information of each preset rule table in the preset rule model to find the target rule table index information that is consistent with the rule table index information, and then use the rule table corresponding to the target rule table index information in the preset rule model as the target rule table corresponding to the tensor to be audited.

[0130] The step of obtaining the rule table index information corresponding to the tensor to be audited includes:

[0131] Step S221, obtaining the federated learning task identification information, the corresponding federated device identity information, the corresponding federated iteration number information, and the corresponding intermediate result data type information corresponding to the tensor to be audited;

[0132] In this embodiment, it should be noted that the federated learning task identification information can be the ID identification of the federated learning task, or the type identification of the federated learning task, etc. The federated device identity information is the identity information of the federated learning device, which can be the device serial number or the device name. The federated iteration number information is the federated iteration number corresponding to the tensor to be audited. For example, if the tensor to be audited is generated at the 5th federated iteration, then the federated iteration number information corresponding to the tensor to be audited is 5. The intermediate result data type information is the label information representing the data type of the dense tensor. The data type of the dense tensor includes the model loss type, the model gradient type, and the model network parameter type, etc.

[0133] Step S222: Aggregate the federated learning task identification information, the federated device identity information, the federated iteration number information, and the intermediate result data type information to obtain the rule table index information.

[0134] In this embodiment, the federated learning task identification information, the federated device identity information, the federated iteration number information and the intermediate result data type information are aggregated to obtain the rule table index information. Specifically, the federated learning task identification information, the federated device identity information, the federated iteration number information and the intermediate result data type information are concatenated into a vector of preset bits to obtain the rule table index information. For example, assuming that the federated learning task identification information is A, the federated device identity information is B, the federated iteration number information is C, and the intermediate result data type information is D, then the rule table index information is The information can be a vector ABCD, thereby achieving the purpose of constructing rule table index information based on the federated modeling information of the tensor to be audited in the federated learning process, so that the tensors to be audited with the same or similar federated modeling information will correspond to the same target rule table, and the tensors to be audited with the same or similar federated modeling information usually have the same or similar data distribution, which can ensure the accuracy of auditing multiple tensors to be audited using the target rule table, and then achieve the purpose of accurately auditing multiple tensors to be audited using one rule table, indirectly realizing the classified audit of each tensor to be audited and improving the efficiency of data auditing.

[0135] Additionally, step S222 further includes:

[0136] The federated learning task identification information, the federated device identity information, the federated iteration number information and the intermediate result data type information are concatenated into a character string to obtain the rule table index information.

[0137] Among them, it should be noted that the rule table index information is composed of at least one of the federated learning task identification information, the federated device identity information, the federated iteration number information and the intermediate result data type information, that is, the rule table index information can be obtained by aggregating one or more of the federated learning task identification information, the federated device identity information, the federated iteration number information and the intermediate result data type information.

[0138] Step S23: Based on the audit rules in the target rule table, the content features of the tensor to be audited are audited until the audit is completed or an abnormal state is found during the audit process.

[0139] In this embodiment, the target rule table includes at least one audit rule and data location information corresponding to the audit rule.

[0140] Based on the audit rules in the target rule table, the content features of the tensor to be audited are audited until the audit is completed or an abnormal state is found in the audit process. Specifically, based on the data location information corresponding to each audit rule, the content to be audited corresponding to each audit rule is located in the tensor to be audited, and then based on each audit rule, the content features of the content to be audited corresponding to each audit rule are audited respectively until the audit is completed or an abnormal state is found in the audit process. When the content features of the content to be audited do not conform to the corresponding audit rules, it is determined that the audit process has found an abnormal state.

[0141] Optionally, it can be set that when the audit results corresponding to each audit rule are all audit passed, the audit is determined to be completed; when the audit results corresponding to each audit rule are not all audit passed, it is determined that an abnormal state is found in the audit process.

[0142] The audit rules include data location information and audit sub-rules.

[0143] The step of auditing the content features of the tensor to be audited based on the audit rules in the target rule table includes:

[0144] Step S231, locating the content to be audited in the tensor to be audited based on the data location information;

[0145] In this embodiment, it should be noted that the data location information is information used to locate the tensor to be audited corresponding to the audit rule in the tensor to be audited. For example, if the tensor to be audited is a two-dimensional matrix, the data location information can be the column information or row information of the two-dimensional matrix, etc. If the tensor to be audited is a three-dimensional tensor, the data location information can be three-dimensional coordinate information, and the three-dimensional coordinate information can be the value range of the coordinates of the point, or the value range of the coordinates of the surface, etc.

[0146] Step S232: Based on the audit sub-rule, audit the value range of the numerical value in the content to be audited and whether the numerical value in the content to be audited can be empty.

[0147] In this embodiment, it should be noted that the audit rule includes at least one audit sub-rule, which is used to audit the content characteristics of the content to be audited, wherein the content characteristics of the content to be audited can be a value range of the numerical value in the content to be audited, or the numerical value in the content to be audited can be empty or non-empty.

[0148] Based on the audit sub-rule, the value range of the numerical value in the content to be audited and whether the numerical value in the content to be audited can be empty are audited. Specifically, it is determined whether the value range of the data in the content to be audited is within the preset value range corresponding to the audit sub-rule, and whether there is a reasonable null value in the content to be audited. If the value range of the data in the content to be audited is within the preset value range corresponding to the audit sub-rule and it is determined that there is a reasonable null value in the content to be audited, the audit is determined to be over, otherwise, it is determined that an abnormal state is found during the audit process. For example, if audit sub-rule A stipulates that the preset value range is (1,100), and audit sub-rule B stipulates that there cannot be null values, and if the corresponding value range of the numerical value in the content to be audited is (2,80), and there is a null value in the content to be audited, it is determined that an abnormal state is found when auditing according to audit sub-rule B, which realizes the audit at the numerical level of the tensor to be audited, and then realizes the purpose of conducting a deeper data audit of the corresponding tensor to be audited, which can improve the accuracy of data auditing.

[0149] Wherein, before the step of searching the target rule table corresponding to the tensor to be audited in the preset rule model according to the rule table index information, the data audit method in federated learning further includes:

[0150] Step A10, obtaining a feature value range of each sample feature corresponding to a preset federated task, and constructing a test sample set according to the feature value range of each sample feature;

[0151] In this embodiment, it should be noted that the federated learning device is a participant device.

[0152] Specifically, the feature value range of each sample feature corresponding to the preset federal task is obtained, and feature values ​​are randomly selected in each feature value range to form a number of test samples to obtain a test sample set.

[0153] Step A20, based on the test sample set, performing federated learning modeling with other federated learning devices to calculate a number of intermediate result tensors corresponding to the test sample set;

[0154] In this embodiment, it should be noted that based on the test sample set, federated learning modeling is performed with other federated learning devices to calculate a number of intermediate result tensors corresponding to the test sample set. Specifically, based on the test sample set, federated learning modeling is performed with other federated learning devices, and the intermediate result tensors corresponding to each test sample in the test sample set in the federated learning modeling process are collected, wherein the intermediate result tensors include model loss, model gradient, and model parameters generated in the federated learning modeling process.

[0155] Step A30, constructing rule table index information corresponding to the several intermediate result tensors, and constructing the preset rule model according to the data distribution of the several intermediate result tensors and the rule table index information corresponding to the several intermediate result tensors.

[0156] In this embodiment, rule table index information corresponding to the several intermediate result tensors is constructed, and the preset rule model is constructed based on the data distribution of the several intermediate result tensors and the rule table index information corresponding to the several intermediate result tensors. Specifically, at least one index information of the federated learning task identification information, the corresponding federated device identity information, the corresponding federated iteration count information and the corresponding intermediate result data type information corresponding to the several intermediate result tensors is obtained, and then the rule table index information corresponding to each intermediate result tensor is constructed based on the index information corresponding to each intermediate result tensor, and then the rule table index information corresponding to each intermediate result tensor is constructed based on the index information corresponding to each intermediate result tensor. According to the data distribution, a target rule table corresponding to each rule index information is constructed, and then the preset rule model is constructed according to the index information of each rule table, each target rule table and the one-to-one correspondence between the index information of each rule table and the target rule table, wherein the data distribution includes the value range of each region in several intermediate result tensors and whether there is a null value in each region. When the complexity of the federated learning model to be constructed by federated learning is high, it is impossible to directly deduce the content characteristics that the audit rules need to specify. The preset rule model can be obtained by analyzing the data distribution of several intermediate result tensors corresponding to the test sample set, thereby achieving the purpose of constructing the preset rule model.

[0157] Wherein, before the step of searching the target rule table corresponding to the tensor to be audited in the preset rule model according to the rule table index information, the data audit method in federated learning further includes:

[0158] Step B10, obtaining a feature value range of each sample feature corresponding to a preset federated task, and an intermediate result calculation expression corresponding to a federated learning model corresponding to the preset federated task;

[0159] In this embodiment, it should be noted that the intermediate result calculation expression is a mapping relationship from samples to intermediate result tensors. By substituting the samples into the intermediate result expression, the corresponding intermediate result tensor can be calculated, wherein the intermediate result tensor is the intermediate result generated by the federated learning modeling process, and the intermediate result tensor can be the model loss, model gradient, and model parameters generated in the federated learning modeling process.

[0160] Step B20, calculating the data distribution of several intermediate result tensors corresponding to the federated learning model according to the feature value ranges and the intermediate result calculation expressions;

[0161] In this embodiment, it should be noted that when the complexity of the federated learning model is low, for example, when the federated learning model is a linear regression model or a logistic regression model, the data distribution of several intermediate result tensors corresponding to the federated learning model can be directly derived based on the feature extraction range and the intermediate result calculation expression.

[0162] Step B30, constructing rule table index information corresponding to the several intermediate result tensors, and constructing the preset rule model according to the data distribution of the several intermediate result tensors and the rule table index information corresponding to the several intermediate result tensors.

[0163] In this embodiment, rule table index information corresponding to the several intermediate result tensors is constructed, and the preset rule model is constructed based on the data distribution of the several intermediate result tensors and the rule table index information corresponding to the several intermediate result tensors. Specifically, at least one index information of the federated learning task identification information, the corresponding federated device identity information, the corresponding federated iteration count information and the corresponding intermediate result data type information corresponding to the several intermediate result tensors is obtained, and then the rule table index information corresponding to each intermediate result tensor is constructed based on the index information corresponding to each intermediate result tensor, and then the target rule table corresponding to each rule index information is constructed based on the data distribution of each intermediate result tensor corresponding to each rule table index information, and then the preset rule model is constructed based on the rule table index information, each target rule table and the one-to-one correspondence between each rule table index information and the target rule table. The data distribution includes the value range of each region in the several intermediate result tensors and whether there is a null value in each region, thereby achieving the purpose of constructing the preset rule model.

[0164] Step S24: If the decryption authority for the confidential data is not available, the content feature audit of the confidential data is not performed, and the audit ends.

[0165] In this embodiment, specifically, if the decryption authority for the confidential data is not possessed, the content feature audit of the confidential data cannot be performed, and the audit ends directly at this time, with the generated result being the audit result of the confidential data that has passed the basic feature audit.

[0166] The embodiment of the present application provides a data auditing method for the content characteristics of confidential data, that is, if the decryption authority for the confidential data is possessed, the confidential tensor is decrypted to obtain the tensor to be audited, and then the rule table index information corresponding to the tensor to be audited is obtained, and based on the rule table index information, the target rule table corresponding to the tensor to be audited is queried in the preset rule model, thereby realizing the purpose of using the target rule table to perform data audit on the tensor to be audited, and the target rule table is determined by the rule table index information corresponding to the tensor to be audited, and then for the tensors to be audited with the same or similar rule table index information, the same target rule table can be used for data auditing, thereby indirectly realizing It is present that based on the category of the tensor to be audited, the content characteristics of the tensor to be audited are audited, which improves the efficiency of data auditing. Then, based on the audit rules in the target rule table, the content characteristics of the tensor to be audited are audited until the audit is completed or an abnormal state is found in the audit process. Based on the audit rules in the target rule table, the content characteristics of the tensor to be audited are audited until the audit is completed or an abnormal state is found in the audit process; if the decryption authority for the confidential data is not possessed, the content characteristics of the confidential data are not audited and the audit is completed. Compared with the basic characteristics of the data, the purpose of data auditing on deeper content characteristics is achieved, and the accuracy of data auditing is improved.

[0167] Reference Figure 4 , Figure 4 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0168] like Figure 4 As shown, the data audit device in the federated learning may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005. The memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.

[0169] Those skilled in the art will understand that Figure 4 The structure of the data auditing device in federated learning shown in the figure does not constitute a limitation of the data auditing device in federated learning, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0170] like Figure 4As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, and a data audit program in federated learning. The operating system is a program that manages and controls the hardware and software resources of the data audit device in federated learning, and supports the operation of the data audit program in federated learning and other software and / or programs. The network communication module is used to realize the communication between the components inside the memory 1005, and the communication with other hardware and software in the data audit system in federated learning.

[0171] exist Figure 4 In the data auditing device in federated learning shown, the processor 1001 is used to execute the data auditing program in federated learning stored in the memory 1005 to implement the steps of any of the above-mentioned data auditing methods in federated learning.

[0172] The specific implementation methods and beneficial effects of the data auditing device in federated learning of the present application are basically the same as those of the above-mentioned embodiments of the data auditing method in federated learning, and will not be repeated here.

[0173] The embodiment of the present application further provides a data auditing device in federated learning, wherein the data auditing device in federated learning is applied to a data auditing device in federated learning, and the data auditing device in federated learning includes:

[0174] An acquisition module, configured to acquire communication data flow information of a federated learning device, wherein the communication data flow information includes at least one of plaintext data and encrypted data;

[0175] A plaintext data audit module, configured to perform a basic feature audit on the plaintext data if the communication data flow information includes the plaintext data, and to perform a content feature audit on the plaintext data if the basic feature audit of the plaintext data passes;

[0176] A secret data audit module, configured to perform a basic feature audit on the secret data if the communication data flow information includes the secret data, and to selectively perform a content feature audit on the secret data based on whether the secret data has the decryption authority if the basic feature audit on the secret data passes;

[0177] The generation module is used to generate audit results when the audit is completed or an abnormal state is found during the audit process.

[0178] Optionally, the audit result includes a plaintext data audit result, and the generating module is further used to:

[0179] If an abnormal state is found during the basic feature audit or content feature audit of the plaintext data, a plaintext data audit result is generated according to the abnormal state;

[0180] If no abnormal state is found during the basic feature audit and content feature audit of the plaintext data, and when the basic feature audit and content feature audit of the plaintext data are completed, the generated result is a plaintext data audit result that passes both the basic feature audit and the content feature audit.

[0181] Optionally, the audit result includes a ciphertext data audit result, and the generating module is further used to:

[0182] If an abnormal state is found during the basic feature audit or content feature audit of the ciphertext data, a ciphertext data audit result is generated based on the abnormal state;

[0183] In the case where the basic feature audit of the confidential data passes, if the decryption authority for the confidential data is not possessed, a confidential data audit result is generated as a result of passing the basic feature audit;

[0184] If no abnormal state is found during the basic feature audit and content feature audit of the confidential data, and when the basic feature audit and content feature audit of the confidential data are completed, a result is generated as a confidential data audit result that passes both the basic feature audit and the content feature audit.

[0185] Optionally, the secret data includes a secret tensor, and the secret data audit module is further used to:

[0186] If the user has the decryption authority for the secret data, the secret tensor is decrypted to obtain the tensor to be audited;

[0187] Obtaining the rule table index information corresponding to the tensor to be audited, and querying the target rule table corresponding to the tensor to be audited in the preset rule model according to the rule table index information;

[0188] Based on the audit rules in the target rule table, audit the content features of the tensor to be audited until the audit is completed or an abnormal state is found during the audit process;

[0189] If the user does not have the authority to decrypt the confidential data, the content feature audit of the confidential data will not be performed and the audit will end.

[0190] Optionally, the audit rule includes data location information and audit sub-rules, and the confidential data audit module is further used to:

[0191] Based on the data location information, locate the content to be audited in the tensor to be audited;

[0192] Based on the audit sub-rule, the value range of the numerical value in the content to be audited and whether the numerical value in the content to be audited can be empty are audited.

[0193] Optionally, the confidential data audit module is further used to:

[0194] Obtaining the federated learning task identification information, the corresponding federated device identity information, the corresponding federated iteration number information, and the corresponding intermediate result data type information corresponding to the tensor to be audited;

[0195] The federated learning task identification information, the federated device identity information, the federated iteration number information and the intermediate result data type information are aggregated to obtain the rule table index information.

[0196] Optionally, in the confidential data audit module, the rule table index information consists of at least one of federated learning task identification information, federated device identity information, federated iteration number information and intermediate result data type information.

[0197] Optionally, the data auditing device in the federated learning is also used for:

[0198] Obtaining a feature value range of each sample feature corresponding to a preset federated task, and constructing a test sample set according to the feature value range of each sample feature;

[0199] Based on the test sample set, perform federated learning modeling with other federated learning devices to calculate several intermediate result tensors corresponding to the test sample set;

[0200] Construct rule table index information corresponding to the several intermediate result tensors, and construct the preset rule model according to the data distribution of the several intermediate result tensors and the rule table index information corresponding to the several intermediate result tensors.

[0201] Optionally, the data auditing device in the federated learning is also used for:

[0202] Obtaining a feature value range of each sample feature corresponding to a preset federated task, and an intermediate result calculation expression corresponding to a federated learning model corresponding to the preset federated task;

[0203] Calculate the data distribution of several intermediate result tensors corresponding to the federated learning model according to the feature value range of each sample feature and the intermediate result calculation expression;

[0204] Construct rule table index information corresponding to the several intermediate result tensors, and construct the preset rule model according to the data distribution of the several intermediate result tensors and the rule table index information corresponding to the several intermediate result tensors.

[0205] Optionally, the plaintext data audit module is further used to:

[0206] Auditing the basic characteristics of the plaintext data;

[0207] If the basic feature audit of the plaintext data fails, it is determined that an abnormal state is found in the audit process;

[0208] If the basic feature audit of the plaintext data passes, a content feature audit of the plaintext data is performed until an abnormal state is found during the audit process or the audit ends.

[0209] It should be understood that the data audit device in federated learning can be a plug-in on the gateway of the federated learning device so as not to affect the operation of the federated learning related software or services on the federated learning device, or it can be a plug-in or integrated into the hardware platform of a specific federated learning device, or it can be an audit device independent of the federated learning device. These can be adjusted according to the actual application scenarios and needs, and are not specifically limited here.

[0210] The specific implementation methods and beneficial effects of the data auditing device in federated learning of the present application are basically the same as those of the above-mentioned embodiments of the data auditing method in federated learning, and will not be repeated here.

[0211] An embodiment of the present application provides a medium, which is a readable storage medium, and the readable storage medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement the steps of the data auditing method in federated learning described in any one of the above items.

[0212] The specific implementation methods and beneficial effects of the readable storage medium of the present application are basically the same as those of the above-mentioned embodiments of the data audit method in federated learning, and will not be repeated here.

[0213] The present application also provides a program product, which is a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the data auditing method in federated learning as described above are implemented.

[0214] The specific implementation methods and beneficial effects of the computer program product of the present application are basically the same as those of the above-mentioned embodiments of the data auditing method in federated learning, and will not be repeated here.

[0215] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.

Claims

1. A data auditing method in federated learning, characterized in that: The data auditing method in the federated learning includes: Acquire communication data flow information of a federated learning device, wherein the communication data flow information includes at least one of plaintext data and encrypted data; If the communication data flow information includes the plaintext data, a basic feature audit is performed on the plaintext data, and if the basic feature audit of the plaintext data passes, a content feature audit is performed on the plaintext data; If the communication data flow information includes the confidential data, a basic feature audit is performed on the confidential data, and if the basic feature audit of the confidential data passes, a content feature audit is selectively performed on the confidential data based on whether the decryption authority for the confidential data is possessed; Generate audit results when the audit is completed or an abnormal state is found during the audit process; The secret data includes a secret tensor, and the step of selectively auditing the content characteristics of the secret data according to whether the user has the decryption authority for the secret data includes: If the user has the decryption authority for the secret data, the secret tensor is decrypted to obtain the tensor to be audited; Obtaining the rule table index information corresponding to the tensor to be audited, and querying the target rule table corresponding to the tensor to be audited in the preset rule model according to the rule table index information, wherein the preset rule model includes at least one target rule table, one target rule table corresponds to one rule table index information, one rule table index information corresponds to at least one tensor to be audited, the rule table index information is composed of at least one of federated learning task identification information, federated device identity information, federated iteration number information and intermediate result data type information, the target rule table includes audit rules for content feature auditing and data location information for locating the audited data corresponding to the audit rules in the tensor to be audited; Based on the audit rules in the target rule table, the content characteristics of the tensor to be audited are audited until the audit is completed or an abnormal state is found during the audit process; If the decryption authority for the confidential data is not possessed, the content feature audit of the confidential data will not be performed and the audit ends.

2. The data auditing method in federated learning as claimed in claim 1, characterized in that: The audit results include plaintext data audit results, When the audit is completed or an abnormal state is found during the audit, the step of generating the audit result includes: If an abnormal state is found during the basic feature audit or content feature audit of the plaintext data, a plaintext data audit result is generated according to the abnormal state; If no abnormal state is found during the basic feature audit and content feature audit of the plaintext data, and when the basic feature audit and content feature audit of the plaintext data are completed, the generated result is a plaintext data audit result that passes both the basic feature audit and the content feature audit.

3. The data auditing method in federated learning as claimed in claim 1, characterized in that: The audit results include ciphertext data audit results, When the audit is completed or an abnormal state is found during the audit, the step of generating the audit result includes: If an abnormal state is found during the basic feature audit or content feature audit of the ciphertext data, a ciphertext data audit result is generated based on the abnormal state; In the case where the basic feature audit of the confidential data passes, if the decryption authority for the confidential data is not possessed, a confidential data audit result is generated as a result of passing the basic feature audit; If no abnormal state is found during the basic feature audit and content feature audit of the confidential data, and when the basic feature audit and content feature audit of the confidential data are completed, a result is generated as a confidential data audit result that passes both the basic feature audit and the content feature audit.

4. The data auditing method in federated learning as claimed in claim 1, characterized in that: The audit rules include data location information and audit sub-rules, The step of auditing the content features of the tensor to be audited based on the audit rules in the target rule table includes: Based on the data location information, locate the content to be audited in the tensor to be audited; Based on the audit sub-rule, the value range of the numerical value in the content to be audited and whether the numerical value in the content to be audited can be empty are audited.

5. The data auditing method in federated learning as claimed in claim 1, characterized in that: The step of obtaining the rule table index information corresponding to the tensor to be audited includes: Obtaining the federated learning task identification information, the corresponding federated device identity information, the corresponding federated iteration count information, and the corresponding intermediate result data type information corresponding to the tensor to be audited; The federated learning task identification information, the federated device identity information, the federated iteration number information and the intermediate result data type information are aggregated to obtain the rule table index information.

6. The data auditing method in federated learning as claimed in claim 1, characterized in that: Before the step of searching the target rule table corresponding to the tensor to be audited in the preset rule model according to the rule table index information, the data audit method in federated learning further includes: Obtaining a feature value range of each sample feature corresponding to a preset federated task, and constructing a test sample set according to the feature value range of each sample feature; Based on the test sample set, perform federated learning modeling with other federated learning devices to calculate several intermediate result tensors corresponding to the test sample set; Construct rule table index information corresponding to the several intermediate result tensors, and construct the preset rule model according to the data distribution of the several intermediate result tensors and the rule table index information corresponding to the several intermediate result tensors.

7. The data auditing method in federated learning as claimed in claim 1, characterized in that: Before the step of searching the target rule table corresponding to the tensor to be audited in the preset rule model according to the rule table index information, the data audit method in federated learning further includes: Obtaining a feature value range of each sample feature corresponding to a preset federated task, and an intermediate result calculation expression corresponding to a federated learning model corresponding to the preset federated task; Calculate the data distribution of several intermediate result tensors corresponding to the federated learning model according to the feature value range of each sample feature and the intermediate result calculation expression; Construct rule table index information corresponding to the several intermediate result tensors, and construct the preset rule model according to the data distribution of the several intermediate result tensors and the rule table index information corresponding to the several intermediate result tensors.

8. A data audit device in federated learning, characterized in that: The data auditing device in federated learning includes: a memory, a processor, and a program stored in the memory for implementing the data auditing method in federated learning. The memory is used to store a program for implementing a data auditing method in federated learning; The processor is used to execute a program for implementing the data auditing method in federated learning, so as to implement the steps of the data auditing method in federated learning as described in any one of claims 1 to 7.

9. A medium, the medium being a readable storage medium, characterized in that: The readable storage medium stores a program for implementing a data auditing method in federated learning, and the program for implementing a data auditing method in federated learning is executed by a processor to implement the steps of the data auditing method in federated learning as described in any one of claims 1 to 7.

10. A program product, the program product being a computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, the steps of the data auditing method in federated learning as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Ciphertext data auditing method and system based on HTTPS, and related apparatus

    CN108965307A

  • Malicious data analysis method and device based on artificial intelligence and electronic device

    CN112199671A

  • Medical disease analysis method based on migration federation learning

    CN112420187A

  • XAI-based normal learning data generation method and device for unsupervised learning of abnormal behavior detection model

    KR102247179B1

Cited By

  • Federated data query methods and apparatuses based on privacy preserving

    US12585797B2

  • Federated data query methods and apparatuses based on privacy preserving

    US20240370578A1