Privacy leakage detection method and system based on terminal adaptive federated learning
By adopting terminal adaptive federated learning methods in IoT terminals, dynamically adjusting the training method according to terminal performance, generating a privacy leakage detection model, solving the problem of privacy data leakage detection at IoT terminals and improving detection accuracy and security.
Patent Information
- Application Number
- CN202411252167.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-09-06
AI Technical Summary
It is difficult to effectively implement privacy data leakage detection of IoT terminals, and the existing technology has failed to effectively protect user privacy and security.
Adopt terminal adaptive federated learning to detect privacy leaks, connect to distributed IoT terminals through a central server, determine appropriate federated learning training methods based on the terminal's current performance attributes (such as bandwidth and computing resources) to generate privacy leaks Model to detect privacy leaks in business data.
It improves the accuracy and efficiency of privacy leakage detection, can promptly detect privacy leakage and intervene, and ensures the privacy and security of IoT terminals.
Smart Images

Figure CN118761100B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet of Things, and in particular to a privacy leakage detection method and system based on terminal adaptive federated learning. Background Art
[0002] In IoT applications, all terminals in the IoT can be called IoT terminals, such as smart speakers, smart sweeping robots, smart home gateways, etc. The data generated by these IoT terminals contains a lot of private data such as user privacy, device information, etc. Once these IoT private data are obtained by attackers, it will seriously threaten user security.
[0003] Therefore, the detection of privacy data leakage in IoT terminals is an urgent problem to be solved. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a privacy leakage detection method and system based on terminal adaptive federated learning to achieve the detection of privacy data leakage of IoT terminals.
[0005] The embodiment of the present application provides a privacy leakage detection method based on terminal adaptive federated learning. The method is applied to a central server, and the central server is connected to multiple IoT terminals deployed in a distributed manner. The method includes:
[0006] Receive the current performance of the IoT terminal where the client is located reported by the client carried on each IoT terminal; the current performance of any IoT terminal is characterized by a current attribute value corresponding to at least one performance attribute; at least one performance attribute is a performance attribute required for the IoT terminal to perform federated learning; the current performance includes at least: currently available bandwidth resources and currently available computing resources;
[0007] Determine the federated learning training method of each IoT terminal according to the current performance of each IoT terminal; the federated learning training method includes a federated group learning training method, a federated integrated learning training method and a federated group integrated learning training method;
[0008] Wherein, when the current performance of the IoT terminals under N1 device categories all meet the performance requirements of the federated group learning training method, the federated learning training method of each IoT terminal is determined to be the federated group learning training method; N1 is greater than or equal to 1;
[0009] When the current performance of the IoT terminals under N2 device categories all meet the performance requirements of the federated ensemble learning training method, the federated learning training method of each IoT terminal is determined to be the federated ensemble learning training method; N2 is greater than or equal to 1;
[0010] When the current performance of the IoT terminals under N3 device categories all meet the performance requirements of the federated group ensemble learning training method, the federated learning training method of each IoT terminal is determined to be the federated group ensemble learning training method; N3 is greater than or equal to 1;
[0011] N1, N2, and N3 are the same or different;
[0012] Sending the federated learning training method of each IoT terminal to each IoT terminal, so that each IoT terminal performs model training according to the received federated learning training method;
[0013] Based on the model trained by each IoT terminal according to the federated learning training method, a privacy leakage detection model is determined; the privacy leakage detection model is used to perform privacy leakage detection on the business data of the IoT terminal.
[0014] The embodiment of the present application also provides a privacy leakage detection system based on terminal adaptive federated learning, which includes: multiple Internet of Things terminals, and a central server connected to the multiple distributedly deployed Internet of Things terminals:
[0015] A central server, used to execute the steps of implementing the above method;
[0016] Any IoT terminal is used to collect the current performance of the IoT terminal by using the client installed on the IoT terminal, and report the current performance of the IoT terminal to the central server, so that the central server can determine the federated learning training mode of each IoT terminal according to the current performance of each IoT terminal; the current performance of any IoT terminal is characterized by a current attribute value corresponding to at least one performance attribute; at least one performance attribute is a performance attribute required for the IoT terminal to perform federated learning; the current performance at least includes: currently available bandwidth resources, and currently available computing resources;
[0017] Receive the federated learning training method issued by the central server, perform model training according to the federated learning training method, so that the central server determines the privacy leakage detection model based on the model trained by each IoT terminal according to the federated learning training method; the privacy leakage detection model is used to perform privacy leakage detection on the business data of the IoT terminal.
[0018] The embodiment of the present application also provides a privacy leakage detection device based on terminal adaptive federated learning, which is applied to a central server, and the central server is connected to multiple IoT terminals deployed in a distributed manner, and the device includes:
[0019] An acquisition module is used to receive the current performance of the IoT terminal where the client is located, reported by the client carried on each IoT terminal; the current performance of any IoT terminal is characterized by a current attribute value corresponding to at least one performance attribute; at least one performance attribute is a performance attribute required for the IoT terminal to perform federated learning; the current performance includes at least: currently available bandwidth resources and currently available computing resources;
[0020] The first determination module is used to determine the federated learning training mode of each IoT terminal according to the current performance of each IoT terminal; the federated learning training mode includes a federated group learning training mode, a federated integrated learning training mode and a federated group integrated learning training mode;
[0021] Wherein, when the current performance of the IoT terminals under N1 device categories all meet the performance requirements of the federated group learning training method, the federated learning training method of each IoT terminal is determined to be the federated group learning training method; N1 is greater than or equal to 1;
[0022] When the current performance of the IoT terminals under N2 device categories all meet the performance requirements of the federated ensemble learning training method, the federated learning training method of each IoT terminal is determined to be the federated ensemble learning training method; N2 is greater than or equal to 1;
[0023] When the current performance of the IoT terminals under N3 device categories all meet the performance requirements of the federated group ensemble learning training method, the federated learning training method of each IoT terminal is determined to be the federated group ensemble learning training method; N3 is greater than or equal to 1;
[0024] N1, N2, and N3 are the same or different;
[0025] A sending module, used to send the federated learning training method of each IoT terminal to each IoT terminal, so that each IoT terminal performs model training according to the received federated learning training method;
[0026] The second determination module is used to determine a privacy leakage detection model based on a model trained by each IoT terminal according to a federated learning training method; the privacy leakage detection model is used to perform privacy leakage detection on the business data of the IoT terminal.
[0027] An embodiment of the present application also provides an electronic device, including: a processor and a memory for storing computer program instructions, and when the computer program instructions are executed by the processor, the processor executes the steps of the above method.
[0028] An embodiment of the present application also provides a machine-readable storage medium, which stores computer program instructions. When the computer program instructions are executed, the steps of the above method can be implemented.
[0029] It can be seen from the above technical scheme that in this embodiment, the central server determines the federated learning training method of each Internet of Things terminal from the federated group learning training method, the federated ensemble learning training method and the federated group ensemble learning training method based on the currently available bandwidth resources and currently available computing resources of each Internet of Things terminal obtained, and sends the federated learning training method of each Internet of Things terminal to each Internet of Things terminal, so that each Internet of Things terminal performs model training according to the received federated learning training method, so that each Internet of Things terminal obtains a privacy leakage detection model. In this way, each Internet of Things terminal can use the privacy leakage detection model to perform privacy leakage detection on the business data of the Internet of Things terminal, so as to timely discover privacy leakage and take effective intervention, thereby ensuring the privacy security of the Internet of Things terminal.
[0030] Furthermore, in this embodiment, a matching federated learning training method is adaptively selected based on the current performance of each IoT terminal, which enables the IoT terminal to train the privacy leakage detection model in the most suitable manner, which can effectively improve the detection accuracy of the privacy leakage detection model, thereby improving the accuracy of privacy data leakage detection of the IoT terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A network architecture diagram of the system provided in the embodiment of the present application;
[0032] Figure 2 A flow chart of the method provided in the embodiment of the present application;
[0033] Figure 3 A flowchart of federated group learning training provided for an embodiment of the present application;
[0034] Figure 4 A flowchart of federated ensemble learning training provided for an embodiment of the present application;
[0035] Figure 5 A flowchart of federated group ensemble learning training provided for an embodiment of the present application;
[0036] Figure 6 A schematic diagram of the structure of the device provided in the embodiment of the present application;
[0037] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.
[0039] To facilitate understanding of the present method, before describing the present method, the system provided by the embodiment of the present application is described first:
[0040] Figure 1 This is a network architecture diagram of the system provided in the embodiment of the present application. Figure 1 As shown, the system includes: a central server and multiple distributedly deployed IoT terminals, and the central server is connected to the multiple distributedly deployed IoT terminals.
[0041] The central server and multiple IoT terminals cooperate with each other for training through the method provided in the following embodiments, so that the central server and multiple IoT terminals finally obtain the trained privacy leakage detection model. After that, each IoT terminal can use the obtained privacy leakage detection model to perform privacy leakage detection on the business data of the IoT terminal.
[0042] In this embodiment, the IoT terminal may be, for example, a network video recorder (NVR), an IP camera (IPC), a digital video recorder (DVR), a sensor, an RFID card reader, etc., which is not specifically limited in the embodiments of the present application.
[0043] It should be noted that the methods provided in the embodiments of the present application are Figure 1 It is implemented based on the networking architecture shown.
[0044] Combine the following Figure 1 The networking architecture shown here describes the method provided in the embodiment of the present application:
[0045] See also Figure 2 , Figure 2 This is a flow chart of the method provided in the embodiment of the present application. Figure 2 As shown, the process may include the following steps:
[0046] S201, receiving the current performance of the IoT terminal where the client is located as reported by the client carried on each IoT terminal; the current performance of any IoT terminal is characterized by a current attribute value corresponding to at least one performance attribute; at least one performance attribute is a performance attribute required for the IoT terminal to perform federated learning; the current performance includes at least: currently available bandwidth resources, and currently available computing resources.
[0047] In this embodiment, the current performance of any IoT terminal is used to describe the current operating status of the IoT terminal. The above current performance can be characterized by a current attribute value corresponding to at least one performance attribute. The current attribute value of any performance attribute reflects the operating status of the IoT terminal in one dimension.
[0048] As an embodiment, the performance attributes include bandwidth attributes and computing resource attributes. Accordingly, the current performance of any IoT terminal is characterized by the currently available bandwidth resources and currently available computing resources of the IoT terminal.
[0049] As an embodiment, in order to monitor the current performance of the IoT terminal, each IoT terminal is equipped with a client, which monitors the currently available bandwidth resources and currently available computing resources of the IoT terminal. Here, the client monitors the allocated network bandwidth, network delay time, and packet loss rate of the IoT terminal to achieve the purpose of monitoring the currently available bandwidth resources. The client monitors the CPU usage rate, memory usage rate, GPU usage rate, and disk read and write I / O rate of the IoT terminal to achieve the purpose of monitoring the currently available computing resources.
[0050] S202, determining a federated learning training method for each IoT terminal based on the current performance of each IoT terminal. The federated learning training methods include: a federated group learning training method, a federated integrated learning training method, and a federated group integrated learning training method.
[0051] In this embodiment, the federated learning training method includes a federated group learning training method, a federated ensemble learning training method, and a federated ensemble group learning training method. The central server selects a matching federated learning training method from the above three federated learning training methods based on the current performance of each IoT terminal. How to determine the federated learning training method of each IoT terminal will be described in detail in the following text in the form of a specific embodiment, which will not be repeated here.
[0052] S203: Send the federated learning training method of each IoT terminal to each IoT terminal, so that each IoT terminal performs model training according to the received federated learning training method.
[0053] S204, determining a privacy leakage detection model based on the model trained by each IoT terminal according to the federated learning training method; the privacy leakage detection model is used to perform privacy leakage detection on the business data of the IoT terminal.
[0054] In this embodiment, the federated learning training method selected by the central server is different, and the specific training method of each IoT terminal is also different, which will be explained in the form of specific embodiments later and will not be repeated here.
[0055] So far, completed Figure 2 The process shown.
[0056] pass Figure 2 It can be seen from the process shown that the central server determines the federated learning training method of each IoT terminal based on the current performance of each IoT terminal, and sends the federated learning training method of each IoT terminal to each IoT terminal, so that each IoT terminal performs model training according to the received federated learning training method, so that each IoT terminal obtains a privacy leakage detection model. In this way, each IoT terminal can use the privacy leakage detection model to perform privacy leakage detection on the business data of the IoT terminal, so as to timely discover privacy leakage and take effective intervention, thereby ensuring the privacy security of the IoT terminal.
[0057] Furthermore, in this embodiment, a matching federated learning training method is adaptively selected based on the current performance of each IoT terminal, which enables the IoT terminal to train the privacy leakage detection model in the most suitable manner, which can effectively improve the detection accuracy of the privacy leakage detection model, thereby improving the accuracy of privacy data leakage detection of the IoT terminal.
[0058] The following is a detailed description of the above-mentioned federated learning training method for determining each IoT terminal:
[0059] Considering that the federated group learning training method has relatively high bandwidth resource requirements and relatively low computing resource requirements, the performance requirements required by the federated group learning training method are set as follows: the IoT terminals under each device category in the N1 device categories meet the set bandwidth resource requirements, and there is at least one IoT terminal under the N1 device category that does not meet the set computing resource requirements.
[0060] Considering that the federated ensemble learning training method has relatively high requirements for computing resources and relatively low requirements for bandwidth resources, the performance requirements required for the federated ensemble learning training method are set as follows: the IoT terminals under each device category of the N2 device categories meet the set computing resource requirements, and there is at least one IoT terminal under the N2 device categories that does not meet the set bandwidth resource requirements.
[0061] Considering that the federated group ensemble learning training method has relatively high requirements for computing resources and bandwidth resources, the performance requirements required by the federated group ensemble learning training method are set as follows: the IoT terminals under each of the N3 device categories meet the set bandwidth resource requirements, and the IoT terminals under each of the N3 device categories meet the set computing resource requirements.
[0062] Specifically, for any device category, among the IoT terminals under this device category, if the ratio of the number of IoT terminals whose current available bandwidth resources is greater than the set bandwidth threshold to the total number of IoT terminals under this device category is greater than or equal to a first threshold, such as 0.6, then it is considered that the IoT terminals under this device category meet the set bandwidth resource requirements; otherwise, it is considered that the IoT terminals under this device category do not meet the set bandwidth resource requirements.
[0063] For example, suppose that the IoT terminals are classified into four categories: cameras, switches, routers, and sweeping robots, with 10 cameras, 10 switches, 30 routers, and 50 sweeping robots. Set the bandwidth threshold to 20M / s, and set the first threshold to 0.6. If the current available bandwidth resources of 6 of the 10 cameras are greater than 20M / s, it is determined that the IoT terminals under this device category meet the set bandwidth resource requirements. Similarly, it can be determined whether the IoT terminals under the above 4 categories all meet the set bandwidth resource requirements.
[0064] For any device category, among the IoT terminals under this device category, if the ratio of the number of IoT terminals whose currently available computing resources meet the set computing resource threshold to the total number of IoT terminals under this device category is greater than or equal to a second threshold, such as 0.8, then the IoT terminals under this device category are considered to meet the set computing resource requirements; otherwise, the IoT terminals under this device category are considered to not meet the set computing resource requirements. The computing resource threshold is determined based on the sum of the minimum computing costs of the specified model. The specified model refers to the neural network model configured for each IoT terminal when performing the federated ensemble learning training method, such as KNN, decision tree, naive Bayes, etc.
[0065] For example, suppose that the IoT terminals are classified into four categories: cameras, switches, routers, and sweeping robots, with 10 cameras, 10 switches, 30 routers, and 50 sweeping robots. The computing resource thresholds are set to 60% GPU surplus rate, 75% memory surplus rate, and the second threshold is 0.7. If the GPU surplus rate of the currently available computing resources of 7 of the 10 cameras is greater than or equal to 60%, and the memory surplus rate is greater than or equal to 75%, it is determined that the IoT terminals under this device category meet the set computing resource requirements. By analogy, it can be determined whether the IoT terminals under the above 4 categories all meet the set computing resource requirements.
[0066] From the above description, it can be seen that the IoT terminals under each device category of N1 device categories meet the set bandwidth resource requirements, and there is at least one IoT terminal under the device category of N1 device categories that does not meet the set computing resource requirements. In other words, the current performance of the IoT terminals under the N1 device categories all meet the performance requirements required by the federated group learning training method. At this time, the federated group learning training method is selected.
[0067] The IoT terminals under each of the N2 device categories meet the set computing resource requirements, and at least one of the N2 device categories does not meet the set bandwidth resource requirements. In other words, the current performance of the IoT terminals under the N2 device categories meets the performance requirements of the federated ensemble learning training method. At this time, the federated ensemble learning training method is selected.
[0068] The IoT terminals in each of the N3 device categories meet the set bandwidth resource requirements, and the IoT terminals in each of the N3 device categories meet the set computing resource requirements. In other words, the current performance of the IoT terminals in the N3 device categories meets the performance requirements of the federated group ensemble learning training method. At this time, the federated group ensemble learning training method is selected.
[0069] It should be noted that N1, N2, and N3 may be the same or different, which is determined by the specific application scenario and is not specifically limited in the embodiments of the present application.
[0070] The above describes in detail how to determine the federated learning training method for each IoT terminal. The following describes in detail how to determine the privacy leakage detection model:
[0071] Reference Figure 3 , Figure 3 A flowchart of federated group learning training provided for an embodiment of the present application. In this embodiment, the central server determines that the federated learning training mode of each IoT terminal is the federated group learning training mode. The central server selects the model required for training (such as the KNN model) and sends it to each IoT terminal. Each IoT terminal obtains the model, which is the initial local model of each IoT terminal.
[0072] like Figure 3 As shown, the process includes the following steps:
[0073] S301, receiving model parameters reported by each IoT terminal in different terminal groups, where the different terminal groups are obtained by grouping all IoT terminals currently performing federated learning.
[0074] In this embodiment, the model parameters reported by any IoT terminal are the latest model parameters determined after the IoT terminal completes a round of training for the local model. The local model on the IoT terminal can determine the optimization direction after completing a round of training, and then adjust the parameters according to the optimization direction. At this time, the adjusted model parameters (that is, the latest model parameters determined after completing a round of training) and the local model after parameter adjustment (that is, the trained local model, that is, the current local model) are obtained.
[0075] In this embodiment, optionally, as an embodiment, the terminal group is divided according to the device type of all IoT terminals currently performing federated learning, that is, an IoT terminal under one device type is a terminal group.
[0076] S302, perform a first aggregation process on the model parameters reported by each IoT terminal in each terminal group to obtain a model parameter result corresponding to the terminal group; the first aggregation process is used to aggregate the model parameters in the terminal group to obtain a model parameter result that represents the average level of the model parameters reported by each IoT terminal in the terminal group; and perform a weighted operation on the model parameter results corresponding to each terminal group and the weight coefficient of each terminal group to obtain a model correction parameter; the weight coefficient of any terminal group can be verified first or 1 / t1, where t1 is the number of terminal groups.
[0077] In this embodiment, the first aggregation processing of the model parameters reported by each IoT terminal in each terminal group may be to calculate the average value of the model parameters reported by each IoT terminal in the terminal group. Of course, the model parameters reported by each IoT terminal may also be substituted into a preset function to obtain the model parameter result.
[0078] S303, the model correction parameters are sent to the IoT terminals in each terminal group, so that when the IoT terminals determine that the training is finished, they update the local model based on the model correction parameters to obtain a local privacy leakage detection model, or when it is determined to continue the training, they update the local model based on the model correction parameters to perform the next round of training based on the updated local model.
[0079] In this embodiment, after completing the current round of training, any IoT terminal not only needs to adjust the parameters to obtain the latest model parameter report, but also needs to determine whether the training is completed. Any IoT terminal determines that the training is completed when: when the current local model is tested based on the local test set, if the test result meets the set requirements, the training is determined to be completed, otherwise, the training is determined to be not completed. The test result refers to: the detection accuracy value of the current local model in at least one dimension obtained by testing the current local model based on the local test set.
[0080] In the federated group learning training, the above dimension can be a single dimension of the privacy leakage data type, where the privacy leakage data type includes identity information, biometrics, device keys, etc. In other words, the current local model performs on the test sample: detecting which type of privacy leakage data in the test sample is identity information, biometrics, or device keys.
[0081] For example, the specific implementation method of the above-mentioned determination of whether the training of any IoT terminal has been completed may be: for any test sample in the local test set, the test sample is input into the current local model to obtain the detection result of the test sample. If the privacy leakage data type indicated by the detection result matches the privacy leakage data type indicated in the setting result of the test sample, the detection accuracy value of the test sample is a first value, such as 1; if the privacy leakage data type indicated by the detection result does not match the privacy leakage data type indicated in the setting result of the test sample, the detection accuracy value of the test sample is a second value, such as 0. Similarly, the detection accuracy value of each test sample in the test set is obtained, and the average value of the detection accuracy values of each test sample in the detection set is obtained. If the above average value is greater than or equal to the set detection accuracy threshold, it is determined that the set requirements are met; otherwise, it is determined that the set requirements are not met.
[0082] In this embodiment, any IoT terminal can determine whether its training is completed in the above manner. If it is determined that the training of the IoT terminal is completed this time, no training will be performed from the next round and no model parameters will be reported.
[0083] In this embodiment, after completing the current round of training, any IoT terminal not only needs to adjust the parameters to obtain the latest model parameter reporting, but also needs to determine whether the training is completed. Optionally, as an embodiment, each IoT terminal determines whether the training of each IoT terminal is completed before reporting the model parameters. Specifically, for any IoT terminal, after the IoT terminal determines that its own training is completed, the model parameters reported by the IoT terminal carry a tag for expressing the completion of the training of the IoT terminal, so that the central server determines whether the training of the IoT terminal is completed based on the tag. When the central server receives the model parameters in each round, it extracts and records the tags from them. The central server determines whether all IoT terminals have completed training based on the recorded tags.
[0084] It should be noted that after any IoT terminal completes training and updates the local model based on the model correction parameters, it does not directly use the currently updated local model as the privacy leakage detection model. Instead, after the central server determines that all IoT terminals have completed training, it uses the latest model correction parameters issued by the central server when all IoT terminals have completed training to update the updated local model again to obtain a re-updated local model. At this time, the re-updated local model is the privacy leakage detection model.
[0085] The above completes the explanation of federated group learning training.
[0086] It is known that in traditional federated learning training, the central server averages the model parameters reported by each IoT terminal, but the IoT terminals are unequally distributed among groups of different device types, that is, the number of IoT terminals of a certain device type is very small, and the number of IoT terminals of a certain device type is very large. This causes a very small number of model parameters (that is, the update differences in training) to be submerged during aggregation. As a result, the final privacy leakage detection model has good overall detection accuracy for all IoT terminals, but when it acts alone on the above-mentioned very small number of IoT terminals, the detection accuracy is not accurate.
[0087] Compared with traditional federated learning model training, the federated group learning model training method provided in the embodiment of the present application no longer performs a one-size-fits-all average calculation of the model parameters reported by each IoT terminal, but instead performs aggregation on the basis of grouping. This can effectively avoid the decrease in the accuracy of privacy data leakage detection of individual IoT terminals due to the difference in the number of IoT terminals of each device type, which can improve the detection accuracy of the privacy leakage detection model, thereby accurately detecting the leakage of IoT privacy data.
[0088] Reference Figure 4 , Figure 4 A flowchart of federated ensemble learning training provided for an embodiment of the present application. In this embodiment, the central server determines that the federated learning training method of each IoT terminal is a federated ensemble learning training method. The central server selects the K models required for training (such as KNN, decision tree, naive Bayes, etc.) and sends them to each IoT terminal. Each IoT terminal obtains K models, which are the initial K local models of each IoT terminal.
[0089] like Figure 4 As shown, the process includes the following steps:
[0090] S401, receiving model parameters reported by each IoT terminal; any IoT terminal reports model parameters after K local models have completed a round of training.
[0091] In this embodiment, the model parameters reported by any IoT terminal include the latest model parameters determined by any local model among the K local models after completing a round of training, where K is greater than 1. In other words, the model parameters reported by any IoT terminal include K model parameters, and these K model parameters correspond to the K local models deployed on the IoT terminal.
[0092] S402: For any local model, perform a second aggregation process on the model parameters of the local model reported by each IoT terminal to obtain a model correction parameter corresponding to the local model. The second aggregation process is used to aggregate the model parameters of the local model on different IoT terminals to obtain a model parameter result representing an average level of the model parameters of the local model on different IoT terminals.
[0093] In this embodiment, as an embodiment, for any local model among the K local models, the model parameters of the local model reported by each IoT terminal are averaged, and the calculation result is the model correction parameter corresponding to the local model. Similarly, K model correction parameters corresponding to the K local models are obtained.
[0094] S403, the obtained K model correction parameters are sent to each IoT terminal, so that when the IoT terminal determines that the training is finished, the K local models are updated based on the K model correction parameters to obtain a local privacy leakage detection model, or when it is determined to continue the training, the K local models are updated based on the K model correction parameters to perform the next round of training based on the K updated local models.
[0095] In this embodiment, the K model correction parameters correspond one-to-one to the K local models, and any local model is updated using the model correction parameter corresponding thereto.
[0096] In this embodiment, in the federated group integration training, K local models on any IoT terminal are detected from M dimensions; the M dimensions include at least: a privacy leakage method dimension, a privacy leakage data type dimension, a privacy leakage threat level dimension, and a privacy leakage network layer dimension.
[0097] Privacy leakage methods include plain text transmission, weak encryption, etc. The detection results indicate whether the privacy leakage is caused by plain text transmission or weak encryption, etc.
[0098] The types of privacy leakage data include identity information, biometrics, device keys, etc. The detection results indicate which category the leaked data of the test sample belongs to: identity information, biometrics, or device keys.
[0099] The threat levels of privacy leakage include: high risk, medium risk, and low risk. The detection result indicates the threat level of privacy leakage.
[0100] The privacy leakage network layer refers to the network layer where the privacy data leakage occurs, including L2D (local to device), L2D2L (local to device to local), L2D2W (local to device to Internet), etc. The detection result indicates the network layer where the privacy data leakage occurs.
[0101] For example, the specific implementation method of the above-mentioned judgment on whether the training of any IoT terminal has been completed may be: input the test sample into the current K local models to obtain the test results of the test sample in M detection dimensions, and according to the matching of the test results of each test sample in each dimension with the set results of the test sample in the dimension, the greater the number of dimensions in which the test results of the test sample match the set results of the test sample, the greater the detection accuracy value of the test sample. Among them, for the detection results of any test sample in M detection dimensions, if the detection result of the test sample in one dimension matches the set result of the test sample in the dimension, the detection accuracy value of the test sample in the dimension is 1 / M, otherwise, the detection accuracy value of the test sample in the dimension is 0. The detection accuracy values of the test sample in M dimensions are summed, and the summation result is determined as the detection accuracy value of the test sample.
[0102] For example, if a test sample matches in all four detection dimensions, the detection accuracy value of the test sample is 1; if the test sample matches in all three detection dimensions, the detection accuracy value of the test sample is 0.75, and so on, to obtain the detection accuracy value of each test sample in the test set.
[0103] After obtaining the detection accuracy value of each test sample in the test set, the average detection accuracy value of each test sample in the test set is obtained. If the above average value is greater than or equal to the set detection accuracy threshold, it is determined that the training is completed, otherwise, it is determined that the training is not completed.
[0104] It should be noted that after the training of any IoT terminal is completed, after updating the K local models based on K model correction parameters, the K updated local models are not directly used as privacy leakage detection models. Instead, after the central server determines that all IoT terminals have completed training, the K latest model correction parameters issued by the central server when all IoT terminals have completed training are used to update the above K updated local models again to obtain K updated local models. At this time, the K updated local models are the privacy leakage detection models.
[0105] How the central server determines that all IoT terminals have completed training is described in step S303 and will not be repeated here.
[0106] The above completes the explanation of federated ensemble learning training.
[0107] The privacy leakage detection model trained by the federated ensemble learning model training method provided in the embodiment of the present application can take into account the detection of multiple detection dimensions, improve the detection dimension, and thus improve the detection accuracy. When the privacy leakage detection model is subsequently used to perform privacy data detection on the business data of the Internet of Things terminal, the optimal detection result on the detection dimension can be selected from the detection results of K models on the same detection dimension (for example, the optimal detection result is selected by voting), so that each detection dimension is the optimal solution, which can further improve the accuracy of privacy leakage detection.
[0108] Reference Figure 5 , Figure 5 A flowchart of federated group ensemble learning training provided for an embodiment of the present application. In this embodiment, the central server determines that the federated learning training method of each IoT terminal is a group ensemble learning training method. The central server selects the K models required for training (such as KNN, decision tree, naive Bayes, etc.) and sends them to each IoT terminal. Each IoT terminal obtains K models, which are the initial K local models of each IoT terminal.
[0109] like Figure 5 As shown, the process includes the following steps:
[0110] S501, receiving model parameters reported by each IoT terminal; different terminal groups are obtained by grouping all IoT terminals currently performing federated learning, and any IoT terminal reports model parameters after K local models have completed a round of training.
[0111] In this embodiment, the model parameters reported by any IoT terminal include the latest model parameters determined by any local model among K local models after completing a round of training, where K is greater than 1;
[0112] S502, for any local model, perform a third aggregation process on the model parameters corresponding to the local model reported by each IoT terminal in each terminal group to obtain the model parameter results corresponding to the local model under the terminal group; the third aggregation process is used to aggregate the model parameters of the local model on different IoT terminals in the terminal group to obtain the model parameter results that characterize the average level of the model parameters of the local model on different IoT terminals in the terminal group; and perform a weighted operation on the model parameter results corresponding to the local model under each terminal group and the weight coefficient of each terminal group to obtain the model correction parameters; wherein the weight coefficient of any terminal group can be verified in advance or 1 / t2, t2 is the number of terminal groups.
[0113] In this embodiment, the third aggregation processing of the model parameters corresponding to the local model reported by each IoT terminal in each terminal group may be: calculating the average value of the model parameters corresponding to the local model reported by each IoT terminal.
[0114] S503, the obtained K model correction parameters are sent to each IoT terminal, so that when the IoT terminal determines that the training is finished, the K local models are updated based on the K model correction parameters to obtain a local privacy leakage detection model, or when it is determined to continue the training, the K local models are updated based on the K model correction parameters to perform the next round of training based on the K updated local models.
[0115] In this embodiment, the specific implementation of step S503 is similar to that of the above step S403, which will not be repeated here.
[0116] The above completes the explanation of federated group ensemble learning training.
[0117] The federated group ensemble learning model training method provided in the embodiment of the present application can effectively avoid the decrease in the privacy data leakage detection accuracy of individual IoT terminals due to the difference in the number of IoT terminals under each device type, so as to improve the detection accuracy of the privacy leakage detection model, and obtain the optimal solution in each detection dimension, so as to further improve the accuracy of privacy leakage detection.
[0118] The above describes the method provided in the embodiment of the present application. The following describes the specific working process of the system provided in the embodiment of the present application in detail.
[0119] exist Figure 1In the networking architecture shown, the central server is used to execute the steps of the method provided in the above embodiment; any IoT terminal is used to report the current performance of the IoT terminal to the central server, so that the central server determines the federated learning training mode of each IoT terminal according to the current performance of each IoT terminal; the current performance of any IoT terminal is characterized by a current attribute value corresponding to at least one performance attribute; at least one performance attribute is a performance attribute required for the IoT terminal to perform federated learning;
[0120] Receive the federated learning training method issued by the central server, perform model training according to the federated learning training method, so that the central server determines the privacy leakage detection model based on the model trained by each IoT terminal according to the federated learning training method; the privacy leakage detection model is used to perform privacy leakage detection on the business data of the IoT terminal.
[0121] Since the federated learning training methods sent by the central server are different, the specific training methods of each IoT terminal are also different according to the received federated learning training methods. The following three embodiments are combined to explain how each IoT terminal performs training.
[0122] Embodiment 1:
[0123] In this embodiment, the federated learning training method of each IoT terminal is a federated group learning training method, and each IoT terminal is trained in the following manner:
[0124] Any IoT terminal, when the training of the IoT terminal has not been completed, performs the current round of training on the deployed local model; after the local model completes the current round of training, it reports the latest model parameters determined after the local model completes the current round of training to the central server, so that the central server performs the first aggregation processing on the model parameters reported by each IoT terminal in each terminal group in different terminal groups, and obtains the model parameter results corresponding to the terminal group; based on the model parameter results corresponding to each terminal group and the weight coefficient of each terminal group, the model correction parameters are determined and issued. Among them, different terminal groups are obtained by grouping all IoT terminals currently performing federated learning.
[0125] Each IoT terminal receives the model correction parameters sent by the central server. When it is determined that the training is finished, it updates the local model based on the model correction parameters to obtain a local privacy leakage detection model, or when it is determined to continue training, it updates the local model based on the model correction parameters to perform the next round of training based on the updated local model.
[0126] Here, the specific details of the Internet of Things terminal determining whether the training of the Internet of Things terminal is completed refer to step S303, which will not be repeated here.
[0127] Embodiment 2:
[0128] In this embodiment, the federated learning training method of each IoT terminal is a federated integrated learning training method, and each IoT terminal is trained in the following manner:
[0129] Any IoT terminal, when the training of the IoT terminal has not been completed, performs the current round of training on the K local models deployed locally; after the K local models have completed one round of training, they report the model parameters, and report the K model parameters updated after the K local models complete the current round of training to the central server, so that the central server can perform a second aggregation processing on the model parameters of the local model reported by each IoT terminal for any local model, and obtain the model correction parameters corresponding to the local model.
[0130] Receive K model correction parameters sent by the central server, and when it is determined that the training is finished, update the K local models based on the K model correction parameters to obtain a local privacy leakage detection model, or when it is determined to continue training, update the K local models based on the K model correction parameters to perform the next round of training based on the K updated local models.
[0131] Here, the specific details of the Internet of Things terminal determining whether the training of the Internet of Things terminal is completed refer to step S403, which will not be repeated here.
[0132] Embodiment 3:
[0133] In this embodiment, the federated learning training mode of each IoT terminal is a federated group integrated learning training mode, and each IoT terminal is trained in the following manner:
[0134] Any IoT terminal, when the training of the IoT terminal is not completed, performs the current round of training on the K local models deployed locally; after the K local models have completed one round of training, they report the model parameters, and report the K model parameters updated after the K local models complete the current round of training to the central server, so that the central server, for any local model, performs a third aggregation processing on the model parameters corresponding to the local model reported by each IoT terminal in each terminal group in different terminal groups, and obtains the model parameter results corresponding to the local model under the terminal group; based on the model parameter results corresponding to the local model under each terminal group and the weight coefficient of each terminal group, the model correction parameters corresponding to the local model are determined and issued; wherein the different terminal groups are obtained by grouping all IoT terminals currently performing federated learning.
[0135] Receive K model correction parameters sent by the central server, and when it is determined that the training is finished, update the K local models based on the K model correction parameters to obtain a local privacy leakage detection model, or when it is determined to continue training, update the K local models based on the K model correction parameters to perform the next round of training based on the K updated local models.
[0136] Here, the specific details of the Internet of Things terminal determining whether the training of the Internet of Things terminal is completed refer to step S403, which will not be repeated here.
[0137] The above describes in detail the specific work of the system provided by the embodiment of the present application. The following describes the device provided by the embodiment of the present application:
[0138] See also Figure 6 , Figure 6 This is a structural diagram of the device provided in the embodiment of the present application. The device is applied to a central server, which is connected to multiple IoT terminals deployed in a distributed manner, such as Figure 6 As shown, the device may include: an obtaining module 601 , a first determining module 602 , a sending module 603 and a second determining module 604 .
[0139] The obtaining module 601 is used to receive the current performance of the IoT terminal where the client is located, reported by the client carried on each IoT terminal; the current performance of any IoT terminal is represented by a current attribute value corresponding to at least one performance attribute; at least one performance attribute is a performance attribute required for the IoT terminal to perform federated learning; the current performance at least includes: currently available bandwidth resources, and currently available computing resources;
[0140] The first determination module 602 is used to determine the federated learning training mode of each IoT terminal according to the current performance of each IoT terminal; the federated learning training mode includes: a federated group learning training mode, a federated integrated learning training mode and a federated group integrated learning training mode;
[0141] Wherein, when the current performance of the IoT terminals under N1 device categories all meet the performance requirements of the federated group learning training method, the federated learning training method of each IoT terminal is determined to be the federated group learning training method; N1 is greater than or equal to 1;
[0142] When the current performance of the IoT terminals under N2 device categories all meet the performance requirements of the federated ensemble learning training method, the federated learning training method of each IoT terminal is determined to be the federated ensemble learning training method; N2 is greater than or equal to 1;
[0143] When the current performance of the IoT terminals under N3 device categories all meet the performance requirements of the federated group ensemble learning training method, the federated learning training method of each IoT terminal is determined to be the federated group ensemble learning training method; N3 is greater than or equal to 1;
[0144] N1, N2, and N3 are the same or different;
[0145] The sending module 603 is used to send the federated learning training mode of each IoT terminal to each IoT terminal, so that each IoT terminal performs model training according to the received federated learning training mode;
[0146] The second determination module 604 is used to determine a privacy leakage detection model based on the model trained by each IoT terminal according to the federated learning training method; the privacy leakage detection model is used to perform privacy leakage detection on the business data of the IoT terminal.
[0147] As an embodiment, if the IoT terminals under each device category in the N1 device categories meet the set bandwidth resource requirements, and there is at least one IoT terminal under the N1 device categories that does not meet the set computing resource requirements, it is determined that the current performance of the IoT terminals under the N1 device categories all meet the performance requirements required by the federated group learning training method;
[0148] If the IoT terminals under each device category of the N2 device categories meet the set computing resource requirements, and there is at least one IoT terminal under the N2 device categories that does not meet the set bandwidth resource requirements, then it is determined that the current performance of the IoT terminals under the N2 device categories meets the performance requirements required by the federated ensemble learning training method;
[0149] If the IoT terminals under each of the N3 device categories meet the set bandwidth resource requirements, and the IoT terminals under each of the N3 device categories meet the set computing resource requirements, then the current performance of the IoT terminals under the N3 device categories meets the performance requirements required by the federated group ensemble learning training method.
[0150] As an example,
[0151] If, for any device category, among the IoT terminals under the device category, the ratio of the number of IoT terminals whose current available bandwidth resources are greater than the set bandwidth threshold to the total number of IoT terminals under the device category is greater than or equal to the first threshold, then it is considered that the IoT terminals under the device category meet the set bandwidth resource requirements; otherwise, it is considered that the IoT terminals under the device category do not meet the set bandwidth resource requirements;
[0152] If for any device category, among the IoT terminals under this device category, the ratio of the number of IoT terminals whose currently available computing resources meet the set computing resource threshold to the total number of IoT terminals under this device category is greater than or equal to a second threshold, then it is considered that the IoT terminals under this device category meet the set computing resource requirements; otherwise, it is considered that the IoT terminals under this device category do not meet the set computing resource requirements; wherein, the set computing resource threshold is determined based on the sum of the minimum computing overheads of the specified model.
[0153] As an embodiment, when the federated learning training mode of each IoT terminal is a federated group learning training mode, determining the privacy leakage detection model based on the model trained by each IoT terminal according to the federated learning training mode includes:
[0154] Receive model parameters reported by each IoT terminal in different terminal groups; different terminal groups are obtained by grouping all IoT terminals currently performing federated learning, and the model parameters reported by any IoT terminal are the latest model parameters determined after the IoT terminal completes a round of training for the local model;
[0155] Perform a first aggregation process on the model parameters reported by each IoT terminal in each terminal group to obtain a model parameter result corresponding to the terminal group; the first aggregation process is used to aggregate the model parameters in the terminal group to obtain a model parameter result that characterizes the average level of the model parameters reported by each IoT terminal in the terminal group; and perform a weighted operation on the model parameter results corresponding to each terminal group and the weight coefficient of each terminal group to obtain a model correction parameter; the weight coefficient of any terminal group can be verified first or 1 / t1, where t1 is the number of terminal groups;
[0156] The model correction parameters are sent to the IoT terminals in each terminal group, so that when the IoT terminals determine that the training is finished, they update the local model based on the model correction parameters to obtain a local privacy leakage detection model, or when it is determined to continue training, they update the local model based on the model correction parameters to perform the next round of training based on the updated local model.
[0157] As an embodiment, when the federated learning training mode of each IoT terminal is a federated integrated learning training mode, determining the privacy leakage detection model based on the model trained by each IoT terminal according to the federated learning training mode includes:
[0158] Receive model parameters reported by each IoT terminal; any IoT terminal reports model parameters after all K local models complete a round of training; the model parameters reported by any IoT terminal include the latest model parameters determined by any local model among the K local models after completing a round of training, where K is greater than 1;
[0159] For any local model, a second aggregation process is performed on the model parameters of the local model reported by each IoT terminal to obtain a model correction parameter corresponding to the local model; the second aggregation process is used to aggregate the model parameters of the local model on different IoT terminals to obtain a model parameter result representing an average level of the model parameters of the local model on different IoT terminals;
[0160] The obtained K model correction parameters are sent to each IoT terminal, so that the IoT terminal can update the K local models based on the K model correction parameters to obtain the local privacy leakage detection model when determining that the training is finished, or update the K local models based on the K model correction parameters when determining to continue the training, so as to perform the next round of training based on the K updated local models.
[0161] As an embodiment, when the federated learning training mode of each IoT terminal is a federated group integrated learning training mode, determining the privacy leakage detection model based on the model trained by each IoT terminal according to the federated learning training mode includes:
[0162] Receive model parameters reported by each IoT terminal in different terminal groups; different terminal groups are obtained by grouping all IoT terminals currently performing federated learning, and any IoT terminal reports model parameters after K local models have completed one round of training; the model parameters reported by any IoT terminal include the latest model parameters determined by any local model among the K local models after completing one round of training, where K is greater than 1;
[0163] For any local model, a third aggregation process is performed on the model parameters corresponding to the local model reported by each IoT terminal in each terminal group to obtain the model parameter results corresponding to the local model under the terminal group; the third aggregation process is used to aggregate the model parameters of the local model on different IoT terminals in the terminal group to obtain the model parameter results that characterize the average level of the model parameters of the local model on different IoT terminals in the terminal group; and a weighted operation is performed on the model parameter results corresponding to the local model under each terminal group and the weight coefficient of each terminal group to obtain the model correction parameters; wherein the weight coefficient of any terminal group can be verified in advance or 1 / t2, where t2 is the number of terminal groups;
[0164] The obtained K model correction parameters are sent to each IoT terminal, so that the IoT terminal can update the K local models based on the K model correction parameters to obtain the local privacy leakage detection model when determining that the training is finished, or update the K local models based on the K model correction parameters when determining to continue the training, so as to perform the next round of training based on the K updated local models.
[0165] As an embodiment, a local model on any IoT terminal performs detection from the dimension of privacy leakage data type;
[0166] Whether the training of any IoT terminal is completed is determined by the following steps:
[0167] For any test sample in the local test set, the test sample is input into the current local model to obtain the detection result of the test sample;
[0168] If the type of privacy leakage data indicated by the detection result matches the type of privacy leakage data indicated in the setting result of the test sample, the detection accuracy value of the test sample is a first value; if the type of privacy leakage data indicated by the detection result does not match the type of privacy leakage data indicated in the setting result of the test sample, the detection accuracy value of the test sample is a second value;
[0169] The average value of the detection accuracy value of each test sample in the detection set is obtained. If the average value is greater than or equal to the set detection accuracy threshold, the training is determined to be completed; otherwise, the training is determined not to be completed.
[0170] As an embodiment, K local models perform detection from M dimensions; the M dimensions at least include: a privacy leakage method dimension, a privacy leakage data type dimension, a privacy leakage threat level dimension, and a privacy leakage network layer dimension;
[0171] Among them, whether any IoT terminal has completed training is determined by the following steps:
[0172] For any test sample in the local test set, input the test sample into the current K local models to obtain the test results of the test sample in M detection dimensions;
[0173] Determine the detection accuracy value of the test sample according to the matching of the detection result of each test sample in each dimension with the setting result of the test sample in the dimension; wherein, the more dimensions the detection result of the test sample matches the setting result of the test sample, the greater the detection accuracy value of the test sample;
[0174] The average value of the detection accuracy value of each test sample in the detection set is obtained. If the average value is greater than or equal to the set detection accuracy threshold, the training is determined to be completed; otherwise, the training is determined not to be completed.
[0175] As an embodiment, determining the detection accuracy value of the test sample according to the matching condition between the detection result of each test sample in each dimension and the set result of the test sample in the dimension includes:
[0176] If the detection result of the test sample in one dimension matches the set result of the test sample in the dimension, the detection accuracy value of the test sample in the dimension is 1 / M, otherwise, the detection accuracy value of the test sample in the dimension is 0;
[0177] The detection accuracy values of the test sample in M dimensions are summed, and the sum result is determined as the detection accuracy value of the test sample.
[0178] So far, completed Figure 6 Structural description of the device shown.
[0179] See also Figure 7 , Figure 7 This is a structural diagram of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the hardware structure may include: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method disclosed in the above example of this application.
[0180] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the method disclosed in the above example of the present application can be implemented.
[0181] Exemplarily, the above-mentioned machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device, which can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof.
[0182] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A privacy leakage detection method based on terminal adaptive federated learning, characterized in that: The method is applied to a central server, the central server is connected to a plurality of distributedly deployed IoT terminals, and the method comprises: Receiving the current performance of the IoT terminal where the client is located as reported by the client carried on each IoT terminal; the current performance of any IoT terminal is characterized by a current attribute value corresponding to at least one performance attribute; the at least one performance attribute is a performance attribute required for the IoT terminal to perform federated learning; the current performance includes at least: currently available bandwidth resources and currently available computing resources; Determine the federated learning training mode of each IoT terminal according to the current performance of each IoT terminal; the federated learning training mode includes: a federated group learning training mode, a federated integrated learning training mode and a federated group integrated learning training mode; If all IoT terminals in each of the N1 device categories meet the set bandwidth resource requirements, and at least one IoT terminal in the N1 device categories does not meet the set computing resource requirements, then it is determined that the current performance of the IoT terminals in the N1 device categories meets the performance requirements required by the federated group learning training method, and the federated learning training method of each IoT terminal is determined to be the federated group learning training method; N1 is greater than or equal to 1; If the IoT terminals under each device category in the N2 device categories meet the set computing resource requirements, and there is at least one IoT terminal under the N2 device categories that does not meet the set bandwidth resource requirements, then it is determined that the current performance of the IoT terminals under the N2 device categories meets the performance requirements required by the federated ensemble learning training method, and the federated learning training method of each IoT terminal is determined to be the federated ensemble learning training method; N2 is greater than or equal to 1; If the IoT terminals under each of the N3 device categories meet the set bandwidth resource requirements, and the IoT terminals under each of the N3 device categories meet the set computing resource requirements; then it is determined that the current performance of the IoT terminals under the N3 device categories meets the performance requirements required by the federated group ensemble learning training method, and the federated learning training method of each IoT terminal is determined to be the federated group ensemble learning training method; N3 is greater than or equal to 1; The N1, the N2, and the N3 are the same or different; Sending the federated learning training method of each IoT terminal to each IoT terminal, so that each IoT terminal performs model training according to the received federated learning training method; Based on the model trained by each IoT terminal according to the federated learning training method, a privacy leakage detection model is determined; the privacy leakage detection model is used to perform privacy leakage detection on the business data of the IoT terminal.
2. The method according to claim 1, characterized in that If, for any device category, among the IoT terminals under the device category, the ratio of the number of IoT terminals whose current available bandwidth resources are greater than the set bandwidth threshold to the total number of IoT terminals under the device category is greater than or equal to the first threshold, then it is considered that the IoT terminals under the device category meet the set bandwidth resource requirements; otherwise, it is considered that the IoT terminals under the device category do not meet the set bandwidth resource requirements; If for any device category, among the IoT terminals under this device category, the ratio of the number of IoT terminals whose currently available computing resources meet the set computing resource threshold to the total number of IoT terminals under this device category is greater than or equal to a second threshold, then it is considered that the IoT terminals under this device category meet the set computing resource requirements; otherwise, it is considered that the IoT terminals under this device category do not meet the set computing resource requirements; wherein, the set computing resource threshold is determined based on the sum of the minimum computing overheads of the specified model.
3. The method according to claim 1, characterized in that: When the federated learning training mode of each IoT terminal is a federated group learning training mode, determining the privacy leakage detection model based on the model trained by each IoT terminal according to the federated learning training mode includes: Receive model parameters reported by each IoT terminal in different terminal groups; the different terminal groups are obtained by grouping all IoT terminals currently performing federated learning, and the model parameters reported by any IoT terminal are the latest model parameters determined after the IoT terminal completes a round of training for the local model; Performing a first aggregation process on the model parameters reported by each IoT terminal in each terminal group to obtain a model parameter result corresponding to the terminal group; the first aggregation process is used to aggregate the model parameters in the terminal group to obtain a model parameter result that characterizes the average level of the model parameters reported by each IoT terminal in the terminal group; and performing a weighted operation on the model parameter results corresponding to each terminal group and the weight coefficient of each terminal group to obtain a model correction parameter; the weight coefficient of any terminal group can be verified first or 1 / t1, where t1 is the number of terminal groups; The model correction parameters are sent to the IoT terminals in each terminal group, so that when the IoT terminals determine that the training is finished, they update the local model based on the model correction parameters to obtain a local privacy leakage detection model, or when it is determined to continue training, they update the local model based on the model correction parameters to perform the next round of training based on the updated local model.
4. The method according to claim 1, characterized in that: When the federated learning training mode of each IoT terminal is a federated integrated learning training mode, determining the privacy leakage detection model based on the model trained by each IoT terminal according to the federated learning training mode includes: Receive model parameters reported by each IoT terminal; any IoT terminal reports model parameters after all K local models complete a round of training; the model parameters reported by any IoT terminal include the latest model parameters determined by any local model among the K local models after completing a round of training, where K is greater than 1; For any local model, a second aggregation process is performed on the model parameters of the local model reported by each IoT terminal to obtain a model correction parameter corresponding to the local model; the second aggregation process is used to aggregate the model parameters of the local model on different IoT terminals to obtain a model parameter result representing an average level of the model parameters of the local model on different IoT terminals; The obtained K model correction parameters are sent to each IoT terminal, so that when the IoT terminal determines that the training is finished, it updates the K local models based on the K model correction parameters to obtain the local privacy leakage detection model, or when it is determined to continue the training, it updates the K local models based on the K model correction parameters to perform the next round of training based on the K updated local models.
5. The method according to claim 1, characterized in that When the federated learning training mode of each IoT terminal is a federated group integrated learning training mode, determining the privacy leakage detection model based on the model trained by each IoT terminal according to the federated learning training mode includes: Receive model parameters reported by each IoT terminal in different terminal groups; the different terminal groups are obtained by grouping all IoT terminals currently performing federated learning, and any IoT terminal reports model parameters after K local models have completed one round of training; the model parameters reported by any IoT terminal include the latest model parameters determined by any local model among the K local models after completing one round of training, where K is greater than 1; For any local model, a third aggregation process is performed on the model parameters corresponding to the local model reported by each IoT terminal in each terminal group to obtain the model parameter results corresponding to the local model under the terminal group; the third aggregation process is used to aggregate the model parameters of the local model on different IoT terminals in the terminal group to obtain the model parameter results that characterize the average level of the model parameters of the local model on different IoT terminals in the terminal group; and a weighted operation is performed on the model parameter results corresponding to the local model under each terminal group and the weight coefficient of each terminal group to obtain the model correction parameters; wherein the weight coefficient of any terminal group can be verified in advance or 1 / t2, t2 is the number of terminal groups; The obtained K model correction parameters are sent to each IoT terminal, so that when the IoT terminal determines that the training is finished, it updates the K local models based on the K model correction parameters to obtain the local privacy leakage detection model, or when it is determined to continue the training, it updates the K local models based on the K model correction parameters to perform the next round of training based on the K updated local models.
6. The method according to claim 3, characterized in that: The local model on any IoT terminal is detected from the dimension of privacy leakage data type; Whether the training of any IoT terminal is completed is determined by the following steps: For any test sample in the local test set, the test sample is input into the current local model to obtain the detection result of the test sample; If the type of privacy leakage data indicated by the detection result matches the type of privacy leakage data indicated in the setting result of the test sample, the detection accuracy value of the test sample is a first value; if the type of privacy leakage data indicated by the detection result does not match the type of privacy leakage data indicated in the setting result of the test sample, the detection accuracy value of the test sample is a second value; The average value of the detection accuracy value of each test sample in the detection set is obtained. If the average value is greater than or equal to the set detection accuracy threshold, it is determined that the training is completed; otherwise, it is determined that the training is not completed.
7. The method according to claim 4 or 5, characterized in that: The K local models are detected from M dimensions; the M dimensions at least include: a privacy leakage method dimension, a privacy leakage data type dimension, a privacy leakage threat level dimension, and a privacy leakage network layer dimension; Among them, whether any IoT terminal has completed training is determined by the following steps: For any test sample in the local test set, input the test sample into the current K local models to obtain the test results of the test sample in M detection dimensions; Determine the detection accuracy value of the test sample according to the matching of the detection result of each test sample in each dimension with the setting result of the test sample in the dimension; wherein, the more dimensions the detection result of the test sample matches the setting result of the test sample, the greater the detection accuracy value of the test sample; The average value of the detection accuracy value of each test sample in the detection set is obtained. If the average value is greater than or equal to the set detection accuracy threshold, it is determined that the training is completed; otherwise, it is determined that the training is not completed.
8. The method according to claim 7, characterized in that Determining the detection accuracy value of the test sample according to the matching of the detection result of each test sample in each dimension with the setting result of the test sample in the dimension includes: If the detection result of the test sample in one dimension matches the set result of the test sample in the dimension, the detection accuracy value of the test sample in the dimension is 1 / M, otherwise, the detection accuracy value of the test sample in the dimension is 0; The detection accuracy values of the test sample in M dimensions are summed, and the sum result is determined as the detection accuracy value of the test sample.
9. A privacy leakage detection system based on terminal adaptive federated learning, characterized in that: The system includes: multiple IoT terminals and a central server connecting multiple IoT terminals in distributed deployment: The central server is used to perform the steps of the method described in any one of claims 1 to 8; Any IoT terminal is used to collect the current performance of the IoT terminal by using the client installed on the IoT terminal, and report the current performance of the IoT terminal to the central server, so that the central server determines the federated learning training mode of each IoT terminal according to the current performance of each IoT terminal; the current performance of any IoT terminal is characterized by a current attribute value corresponding to at least one performance attribute; the at least one performance attribute is a performance attribute required for the IoT terminal to perform federated learning; the current performance includes at least: currently available bandwidth resources and currently available computing resources; Receive the federated learning training method issued by the central server, perform model training according to the federated learning training method, so that the central server determines the privacy leakage detection model based on the model trained by each Internet of Things terminal according to the federated learning training method; the privacy leakage detection model is used to perform privacy leakage detection on the business data of the Internet of Things terminal.
Citation Information
Patent Citations
Combined service evaluation method and system based on federated machine learning algorithm and cloud feedback
CN112884163A
Federal ensemble learning method and device, equipment and storage medium
CN114330756A
Federal learning implementation method, device and system, medium, equipment and product
CN115146786A
Group integrated distillation federated learning method in edge network
CN115526342A
Personalized federal learning method and system based on adaptive clustering layering
CN115840900A
