Illegal device detection method and system based on optimal dynamic differential privacy budget
By adopting an illegal device detection method based on the optimal dynamic differential privacy budget in the power system, the problems of large data traffic and low model training efficiency in the prior art are solved, and the optimal balance between privacy protection and model performance is achieved.
Patent Information
- Application Number
- CN202411733234.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-21
AI Technical Summary
The prior art has problems in the detection of illegal equipment in power systems with large data traffic, low model training efficiency, and slow model convergence speed. Unreasonable differential privacy budget settings will affect model performance and privacy protection.
An illegal device detection method based on the optimal dynamic differential privacy budget is adopted. By collecting device identification and network data, integrating characteristics, using federated learning to obtain an illegal device detection model, and dynamically adjusting the differential privacy budget based on performance accuracy and inferred accuracy.
It achieves the maximum protection of participants' privacy and security in the power system, while minimizing the impact of differential privacy on model performance to the minimum, achieving the optimal balance between privacy protection and model performance optimization.
Smart Images

Figure CN119669969A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of illegal device detection in power systems, and in particular to an illegal device detection method and system based on optimal dynamic differential privacy budget, electronic equipment, and a computer-readable storage medium. Background Art
[0002] With the vigorous development of new power systems, the rapid expansion of the scale of power networks, the wide expansion of their scope, and the increasing diversification of control objects have posed more severe challenges to the security of power systems. This increase in scale not only exposes power systems to more complex and serious risks of cybersecurity attacks, but also increases the need for supervision of their huge information assets. With the rapid rise of distributed photovoltaic, integrated energy, and energy storage businesses, as well as the significant enhancement of the perception and control capabilities of substations and control stations in the main grid, data interaction within the power system has become more frequent. However, this development trend is also accompanied by the potential risk of information assets causing large-scale impacts on the main grid after being attacked. In order to effectively respond to escalating cyber threats, power systems must strengthen the detection and monitoring of illegal equipment, and it is urgent to establish an accurate and effective network security monitoring system, which will become the core of the system's safe operation and the sensitive "eyes".
[0003] At present, the existing technology usually combines network data packet information with device identification information to effectively detect illegal devices, especially in the power Internet of Things environment, where each device has a specific purpose and behavior pattern. If the network communication behavior of a device is abnormal or exceeds its expected range, it means that the device has been compromised. For example, patent CN116318934A discloses a security warning method based on Internet of Things device behavior modeling, which obtains the device type of the Internet of Things device through a gateway device, and collects the behavior data corresponding to the device type. The warning service end models the device type and the behavior data corresponding to the device type, establishes the business-behavior baseline model data of the corresponding device type, synthesizes the business-behavior baseline model data corresponding to various device types into a behavior information library and sends it to each gateway device in the Internet of Things, so that the gateway device can identify the behavior of the Internet of Things device connected to it according to the behavior information library, and uploads the identification result to the warning service end. The warning service end obtains the behavior identification result of the gateway device on the Internet of Things device and sends a control instruction to the corresponding gateway device. However, in the prior art, a server is used to uniformly collect data to train the detection model. However, there are a large number of devices in the power system and a huge amount of data is collected, resulting in disadvantages such as excessive data communication volume, low model training efficiency, and slow model convergence speed. Therefore, the prior art introduces a federated learning mechanism into the training of the detection model, which can effectively reduce the data communication volume and improve the model training efficiency and convergence speed.
[0004] In the federated learning mechanism, differential privacy technology is widely used. It can prevent malicious servers or other clients from obtaining private data of other individual clients through the training process, and ensure that personal data will not be leaked during data transmission and model updates. Therefore, it is very important to choose a reasonable differential privacy budget. Too high a privacy budget will cause excessive noise and affect the convergence and performance of the model. Too low a privacy budget will increase the risk of privacy leakage. At present, there are three commonly used methods for setting differential privacy budgets. The first is static privacy budget, that is, in the entire federated learning process, all participants use a fixed privacy budget in all rounds of training, which will lead to insufficient or excessive privacy protection for some operations; the second is user preference-driven privacy budget setting, which sets different privacy budgets according to the user's privacy preference or data sensitivity. Although it can better meet the user's privacy needs, it is more complex, especially when it involves a large number of users or a large amount of data. It is difficult to achieve; the third is dynamic privacy budget adjustment. According to the increasingly accurate characteristics of the model in reflecting data features in the federated learning process, a relatively low privacy budget is set in the early stage of training, and a relatively high privacy budget is set in the later stage of training, or the privacy budget is dynamically adjusted when the impact of differential privacy on performance meets certain conditions. Although this method is highly flexible and can be dynamically adjusted according to actual needs, it increases the computational and management overhead of the system, and the resulting privacy budget is not the value that achieves the optimal balance between data privacy protection and practicality. Summary of the invention
[0005] The present invention provides an illegal device detection method and system based on an optimal dynamic differential privacy budget, an electronic device, and a computer-readable storage medium, which can protect the privacy security of participants to the greatest extent in the federated learning process, while minimizing the impact of differential privacy on model performance, thereby achieving an optimal balance between privacy protection and model performance optimization.
[0006] According to one aspect of the present invention, a method for detecting illegal devices based on an optimal dynamic differential privacy budget is provided, comprising the following contents:
[0007] Collect device identification and network data of each device in the power Internet of Things;
[0008] The device identification and network data of each device are integrated to obtain the integrated features;
[0009] The illegal device detection model obtained by federated learning based on the optimal dynamic differential privacy budget determination algorithm is used to detect illegal devices based on fusion features. The optimal dynamic differential privacy budget determination algorithm uses the performance accuracy change caused by the privacy budget as the data practicality indicator and the inference accuracy change of the model under member reasoning attack as the data privacy protection indicator.
[0010] Execute corresponding security policies on the device based on the detection results.
[0011] Furthermore, the process of obtaining the illegal device detection model through federated learning based on the optimal dynamic differential privacy budget determination algorithm includes the following:
[0012] Set the illegal device detection model used by federated learning, and initialize the model parameters by the central server;
[0013] The central server randomly selects a device that has not participated in this round of federated learning as a federated participant, and sends the model and model parameters to the device;
[0014] After receiving the model and model parameters, the federated participants set the differential privacy budget based on the optimal dynamic differential privacy budget determination algorithm, and perform local training of model gradient differential perturbations. After the local training is completed, the local model parameters are uploaded to the central server.
[0015] Repeat the above process and iterate the training serially among all federated participants until the model converges.
[0016] Furthermore, the process of setting the differential privacy budget based on the optimal dynamic differential privacy budget determination algorithm includes the following contents:
[0017] After setting the initial value of the privacy budget, perform multiple rounds of local training with gradient differential perturbations to obtain the performance accuracy of the model in the test set and the inference accuracy of the model under member inference attacks;
[0018] The privacy score of the privacy budget is calculated based on the performance accuracy and inference accuracy of the model;
[0019] Iteratively update the set value of the privacy budget to obtain several privacy scores, and select the privacy budget set value corresponding to the maximum privacy score as the optimal privacy budget.
[0020] Furthermore, the privacy score is calculated based on the following formula:
[0021] f(ε)=α×Acc ε -(1-α)×Ack ε
[0022] Where f(ε) represents the privacy score corresponding to the privacy budget ε, Acc ε and Ack ε They represent the performance accuracy and inference accuracy respectively, and α represents the balance coefficient.
[0023] Further, the balance coefficient is determined based on the following formula:
[0024] α=1-Accinit
[0025] Among them, Acc init Represents the performance accuracy of the model in the test set of the current federated participants when no privacy budget is added.
[0026] Furthermore, when the training is iterated serially among all federated participants, the optimal privacy budget of the next round of federated participants is in the range of [ε g -x,ε g +x],ε g represents the global privacy budget and x is a constant.
[0027] Furthermore, the process of fusing the device identification and network data of each device to obtain the fusion feature includes the following:
[0028] The device identification information of the device is feature encoded, and the encoded device identification information is spliced with the extracted network data features to obtain fused features.
[0029] In addition, the present invention also provides an illegal device detection system based on optimal dynamic differential privacy budget, comprising:
[0030] Data collection module, used to collect device identification and network data of each device in the power Internet of Things;
[0031] A data fusion module is used to fuse the device identification and network data of each device to obtain fusion features;
[0032] The device detection module is used to detect illegal devices based on fusion features using an illegal device detection model obtained through federated learning based on an optimal dynamic differential privacy budget determination algorithm. The optimal dynamic differential privacy budget determination algorithm uses the performance accuracy change caused by the privacy budget as a data practicality indicator and the inference accuracy change of the model under member reasoning attacks as a data privacy protection indicator.
[0033] The security policy module is used to execute corresponding security policies on the device according to the detection results.
[0034] In addition, the present invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the above method by calling the computer program stored in the memory.
[0035] In addition, the present invention also provides a computer-readable storage medium for storing a computer program for detecting illegal devices based on an optimal dynamic differential privacy budget, wherein the computer program executes the steps of the method described above when running on a computer.
[0036] The present invention has the following beneficial effects:
[0037] The illegal device detection method based on the optimal dynamic differential privacy budget of the present invention first collects the device identification and network data of each device, then fuses the device identification and network data of each device to obtain the fusion feature, and then uses the illegal device detection model obtained by federated learning based on the optimal dynamic differential privacy budget determination algorithm to perform illegal device detection, and finally executes the corresponding security policy on the device according to the detection result. Among them, the optimal dynamic differential privacy budget determination algorithm uses the performance accuracy change caused by the privacy budget as the data practicality indicator and the inference accuracy change of the model under the member reasoning attack as the data privacy protection indicator, which can accurately evaluate the impact of the privacy budget value on data practicality and privacy protection, and can select the optimal differential privacy budget for different federation participants in each round of federation local learning, so as to protect the privacy security of the participants to the greatest extent, and at the same time minimize the impact of differential privacy on model performance, so as to achieve the optimal balance between privacy protection and model performance optimization.
[0038] In addition, the illegal device detection system based on optimal dynamic differential privacy budget of the present invention also has the above advantages.
[0039] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0041] Figure 1 It is a flowchart of an illegal device detection method based on an optimal dynamic differential privacy budget according to a preferred embodiment of the present application;
[0042] Figure 2 yes Figure 1 Schematic diagram of the sub-process of step S3;
[0043] Figure 3 yes Figure 2 Schematic diagram of the sub-process of step S33;
[0044] Figure 4 It is a schematic diagram of the module structure of an illegal device detection system based on optimal dynamic differential privacy budget according to another embodiment of the present application. DETAILED DESCRIPTION
[0045] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0046] Reference Figure 1 The preferred embodiment of the present application provides an illegal device detection method based on an optimal dynamic differential privacy budget, comprising the following contents:
[0047] Step S1: Collect the device identification and network data of each device in the power Internet of Things;
[0048] Step S2: Fusing the device identification and network data of each device to obtain a fusion feature;
[0049] Step S3: Using the illegal device detection model obtained by federated learning based on the optimal dynamic differential privacy budget determination algorithm, illegal device detection is performed based on fusion features, wherein the optimal dynamic differential privacy budget determination algorithm uses the performance accuracy change caused by the privacy budget as the data practicality indicator and uses the inference accuracy change of the model under member reasoning attack as the data privacy protection indicator;
[0050] Step S4: Execute corresponding security policies on the device according to the detection results.
[0051] It can be understood that the illegal device detection method based on the optimal dynamic differential privacy budget of this embodiment first collects the device identification and network data of each device, then fuses the device identification and network data of each device to obtain the fusion feature, and then uses the illegal device detection model obtained by federated learning based on the optimal dynamic differential privacy budget determination algorithm to perform illegal device detection, and finally executes the corresponding security policy on the device according to the detection result. Among them, the optimal dynamic differential privacy budget determination algorithm uses the performance accuracy change caused by the privacy budget as the data practicality indicator and the inference accuracy change of the model under the member reasoning attack as the data privacy protection indicator, which can accurately evaluate the impact of the privacy budget value on data practicality and privacy protection, and can select the optimal differential privacy budget for different federation participants in each round of federation local learning, so as to protect the privacy security of the participants to the greatest extent, while minimizing the impact of differential privacy on model performance, and can achieve the optimal balance between privacy protection and model performance optimization.
[0052] It can be understood that in step S1, the device identification information and network data packets of each device of the power Internet of Things are collected, wherein the device identification information includes information such as device type, product model, and device unique ID.
[0053] It can be understood that in step S2, the process of fusing the device identification and network data of each device to obtain the fusion feature includes the following:
[0054] The device identification information of the device is feature encoded, and the encoded device identification information is spliced with the extracted network data features to obtain fused features.
[0055] Specifically, feature encoding is performed on the device type, product model, device unique ID and other information of the device, and network data features, such as data volume, data type and other features, are extracted from the network data packet, and then the encoded device identification information is spliced with the extracted network data features to obtain fusion features. The specific feature encoding process and network data feature extraction process belong to the prior art and will not be described in detail here.
[0056] It can be understood that in step S3, the illegal device detection model obtained by federated learning based on the optimal dynamic differential privacy budget determination algorithm is used to detect illegal devices based on fusion features, and the illegal devices are classified into levels, specifically including urgent, important, minor, general and normal. Figure 2 As shown in the figure, the process of obtaining the illegal device detection model through federated learning based on the optimal dynamic differential privacy budget determination algorithm includes the following:
[0057] Step S31: setting the illegal device detection model used by federated learning, and initializing the model parameters by the central server;
[0058] Step S32: The central server randomly selects a device that has not participated in this round of federated learning as a federated participant, and sends the model and model parameters to the device;
[0059] Step S33: After receiving the model and model parameters, the federated participant sets the differential privacy budget based on the optimal dynamic differential privacy budget determination algorithm, and performs local training of model gradient differential perturbation. After the local training is completed, the local model parameters are uploaded to the central server;
[0060] Step S34: Repeat the above process and perform serial iterative training among all federation participants until the model converges.
[0061] Specifically, the illegal device detection model used in federated learning is first determined, for example, the existing commonly used multi-classification model is adopted. The federated learning mechanism includes a central server and several edge devices, wherein the edge devices serve as federated participants, and several edge devices perform federated learning through serial knowledge sharing. Among them, the specific principle of federated learning belongs to the prior art and will not be repeated here. Then, the central server randomly selects a device that has not yet participated in this round of federated learning as a federated participant, and sends the model and model parameters to the device for local learning. After receiving the model and model parameters, the federated participant sets the optimal differential privacy budget based on the optimal dynamic differential privacy budget determination algorithm, and performs local training of model gradient differential perturbation. After the local training is completed, the local model parameters are uploaded to the central server. Then, the above steps S32 to S34 are repeated, and serial iterative training is performed among all federated participants until the model converges. At this point, the federated learning process ends.
[0062] Among them, Figure 3 As shown, the process of setting the differential privacy budget based on the optimal dynamic differential privacy budget determination algorithm includes the following contents:
[0063] Step S331: After setting the initial value of the privacy budget, perform multiple rounds of local training with gradient differential perturbation to obtain the performance accuracy of the model in the test set and the inference accuracy of the model under member reasoning attack;
[0064] Step S332: Calculate the privacy score of the privacy budget based on the performance accuracy and inference accuracy of the model;
[0065] Step S333: Iteratively update the set value of the privacy budget to obtain a number of privacy scores, and select the privacy budget set value corresponding to the maximum privacy score as the optimal privacy budget.
[0066] Specifically, we first set the initial value of the privacy budget ε, where the initial value can be set based on experience or randomly. Then, we perform n rounds of local training with gradient differential perturbations with a privacy budget of ε, and obtain the performance accuracy Acc of the model in the test set. ε , that is, the accuracy of the model in identifying illegal devices in the test set, and the inference accuracy of the model under the member reasoning attack Ack ε, which is the inference accuracy of the training data under the member reasoning attack. The process of obtaining the inference accuracy of the model under the member reasoning attack is as follows: first design multiple shadow models to simulate the behavior of the target model, each shadow model is trained using the business-related data set of the target model collected from the Internet, collect the output confidence score vector, and mark the confidence score vector output by the shadow model into two categories, the original data output is 1, and the non-original data output is 0. Then use the above labeled data to train the attack model (i.e., a binary classifier), the input is the confidence score vector of the shadow model, and the output is a label (0 or 1), indicating whether the input data belongs to the training data set of the shadow model. Then, randomly select part of the training set to input the target model, and record the output confidence score vector. The confidence score vector is input into the trained attacker to infer whether the sample is its training data, and the inference accuracy of the attack model Ack is obtained by statistics. ε .
[0067] Next, the privacy score is calculated based on the following formula:
[0068] f(ε)=α×Acc ε -(1-α)×Ack ε
[0069] Where f(ε) represents the privacy score corresponding to the privacy budget ε, Acc ε and Ack ε They represent the performance accuracy and inference accuracy respectively, and α represents the balance coefficient. Since the privacy budget is proportional to the performance accuracy and inversely proportional to the privacy protection effect, the larger the privacy budget, the higher the performance accuracy and the higher the inference accuracy of the attack. Therefore, the present invention adopts the performance accuracy Acc ε And the inference accuracy Ack ε The balance weight difference between them is used as the privacy score, which can select the optimal differential privacy budget for different federated participants in each round of federated local learning, maximize the privacy security of participants, and minimize the impact of differential privacy on model performance, thus achieving the optimal balance between privacy protection and model performance optimization.
[0070] Then, the set value of the privacy budget is iteratively updated to obtain several privacy scores, and then the privacy budget set value corresponding to the maximum privacy score is selected as the optimal privacy budget, which can be expressed as: g =max(f(ε)),ε g represents the optimal privacy budget.
[0071] In addition, the balance coefficient α can be set as a fixed value based on experience. Optionally, the present invention determines the balance coefficient based on the following formula:
[0072] α=1-Acc init
[0073] Among them, Acc init Represents the performance accuracy of the model in the test set of the current federated participants when no privacy budget is added.
[0074] It can be understood that in the present invention, the balance coefficient α is determined by the model received by the federation participants from the central server. Different models are set, and the corresponding balance coefficient α is also different. When the performance of the model itself is high, the balance coefficient α takes a smaller value, so that the privacy score focuses on privacy protection. When the performance of the model itself is low, the balance coefficient α takes a larger value, so that the privacy score focuses on improving the model performance. In this way, the optimal privacy budget can be adaptively adjusted according to the selected different types of models, thereby improving the robustness and versatility of the algorithm.
[0075] In addition, during the serial iterative training among all federated participants, since the optimal privacy budget is globally shared, the optimal privacy budget of the next round of federated participants can be set to [ε g -x,ε g +x],ε g represents the global privacy budget, that is, the optimal privacy budget of the federation participants in the previous round. x is a constant that can be set as needed, for example, x = 1, 2, 3, .... In this interval, the value is selected again to iterate and calculate the optimal privacy budget. After obtaining the optimal privacy budget ε s After that, update the global privacy budget ε g =ε s , which can speed up the calculation of the optimal differential privacy budget, save computational overhead, and further improve the efficiency of federated learning. In addition, when iteratively updating the privacy budget, the change Δε of the iterative update can be 0.1, 0.2, or 0.3, etc., which can be set according to the value of x and the accuracy requirements.
[0076] It can be understood that in step S4, different security policies are adopted according to the illegal device detection and identification classification results in step S3. For example, if the level classification results of illegal devices are urgent, important, minor and general, the corresponding security policies can be set to isolate devices, disable some important ports, terminate the current call and record alarm logs.
[0077] In addition, if Figure 4 As shown, another embodiment of the present invention further provides an illegal device detection system based on an optimal dynamic differential privacy budget, preferably using the illegal device detection method based on an optimal dynamic differential privacy budget as described above, the system comprising:
[0078] Data collection module, used to collect device identification and network data of each device in the power Internet of Things;
[0079] A data fusion module is used to fuse the device identification and network data of each device to obtain fusion features;
[0080] The device detection module is used to detect illegal devices based on fusion features using an illegal device detection model obtained through federated learning based on an optimal dynamic differential privacy budget determination algorithm. The optimal dynamic differential privacy budget determination algorithm uses the performance accuracy change caused by the privacy budget as a data practicality indicator and the inference accuracy change of the model under member reasoning attacks as a data privacy protection indicator.
[0081] The security policy module is used to execute corresponding security policies on the device according to the detection results.
[0082] It can be understood that the illegal device detection system based on the optimal dynamic differential privacy budget of this embodiment first collects the device identification and network data of each device, then fuses the device identification and network data of each device to obtain the fusion feature, and then uses the illegal device detection model obtained by federated learning based on the optimal dynamic differential privacy budget determination algorithm to perform illegal device detection, and finally executes the corresponding security policy on the device according to the detection result. Among them, the optimal dynamic differential privacy budget determination algorithm uses the performance accuracy change caused by the privacy budget as the data practicality indicator and the inference accuracy change of the model under the member reasoning attack as the data privacy protection indicator, which can accurately evaluate the impact of the privacy budget value on data practicality and privacy protection, and can select the optimal differential privacy budget for different federation participants in each round of federation local learning, so as to protect the privacy security of the participants to the greatest extent, while minimizing the impact of differential privacy on model performance, and can achieve the optimal balance between privacy protection and model performance optimization.
[0083] It can be understood that the various modules of the system embodiment correspond to the various steps of the above method embodiment, so the specific principles of each module will not be repeated here, and the corresponding references can be made to the various steps of the above method embodiment.
[0084] In addition, another embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the above method by calling the computer program stored in the memory.
[0085] In addition, another embodiment of the present invention further provides a computer-readable storage medium for storing a computer program for detecting illegal devices based on an optimal dynamic differential privacy budget, wherein the computer program executes the steps of the method described above when running on a computer.
[0086] The general form of computer readable storage media includes: floppy disk, flexible disk, hard disk, magnetic tape, any other magnetic medium, CD-ROM, any other optical medium, punch cards, paper tape, any other physical medium with a pattern of holes, random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), flash erasable programmable read-only memory (FLASH-EPROM), any other memory chip or cartridge, or any other medium that can be read by a computer. The instructions can further be transmitted or received by a transmission medium. The term transmission medium can include any tangible or intangible medium that can be used to store, encode or carry instructions for execution by a machine, and includes digital or analog communication signals or other intangible media that facilitate the communication of the above instructions. Transmission media include coaxial cables, copper wires and optical fibers, which include the wires of a bus used to transmit a computer data signal.
[0087] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0088] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0089] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0090] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0091] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0092] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
[0093] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for detecting illegal devices based on optimal dynamic differential privacy budget, characterized in that: Includes the following: Collect device identification and network data of each device in the power Internet of Things; The device identification and network data of each device are integrated to obtain the integrated features; The illegal device detection model obtained by federated learning based on the optimal dynamic differential privacy budget determination algorithm is used to detect illegal devices based on fusion features. The optimal dynamic differential privacy budget determination algorithm uses the performance accuracy change caused by the privacy budget as the data practicality indicator and the inference accuracy change of the model under member reasoning attack as the data privacy protection indicator. Execute corresponding security policies on the device based on the detection results.
2. The method for detecting illegal devices based on optimal dynamic differential privacy budget according to claim 1, characterized in that: The process of obtaining the illegal device detection model through federated learning based on the optimal dynamic differential privacy budget determination algorithm includes the following: Set the illegal device detection model used by federated learning, and initialize the model parameters by the central server; The central server randomly selects a device that has not participated in this round of federated learning as a federated participant, and sends the model and model parameters to the device; After receiving the model and model parameters, the federated participants set the differential privacy budget based on the optimal dynamic differential privacy budget determination algorithm, and perform local training of model gradient differential perturbations. After the local training is completed, the local model parameters are uploaded to the central server. Repeat the above process and iterate the training serially among all federated participants until the model converges.
3. The method for detecting illegal devices based on optimal dynamic differential privacy budget according to claim 2, characterized in that: The process of setting the differential privacy budget based on the optimal dynamic differential privacy budget determination algorithm includes the following contents: After setting the initial value of the privacy budget, perform multiple rounds of local training with gradient differential perturbations to obtain the performance accuracy of the model in the test set and the inference accuracy of the model under member inference attacks; The privacy score of the privacy budget is calculated based on the performance accuracy and inference accuracy of the model; Iteratively update the set value of the privacy budget to obtain several privacy scores, and select the privacy budget set value corresponding to the maximum privacy score as the optimal privacy budget.
4. The method for detecting illegal devices based on optimal dynamic differential privacy budget according to claim 3, characterized in that: The privacy score is calculated based on the following formula: f(ε)=α×Acc ε -(1-a)×Ack ε Where f(ε) represents the privacy score corresponding to the privacy budget ε, Acc ε and Ack ε They represent the performance accuracy and inference accuracy respectively, and α represents the balance coefficient.
5. The illegal device detection method based on optimal dynamic differential privacy budget according to claim 4, characterized in that: The balance coefficient is determined based on the following formula: α=1-Acc init Among them, Acc init Represents the performance accuracy of the model in the test set of the current federated participants when no privacy budget is added.
6. The method for detecting illegal devices based on optimal dynamic differential privacy budget according to claim 2, characterized in that: When training is performed serially among all federated participants, the optimal privacy budget of the next round of federated participants is in the range of [ε g -x,ε g +x],ε g represents the global privacy budget and x is a constant.
7. The method for detecting illegal devices based on optimal dynamic differential privacy budget according to claim 1, characterized in that: The process of fusing the device identification and network data of each device to obtain the fusion feature includes the following: The device identification information of the device is feature encoded, and the encoded device identification information is spliced with the extracted network data features to obtain fused features.
8. An illegal device detection system based on optimal dynamic differential privacy budget, characterized in that: include: Data collection module, used to collect device identification and network data of each device in the power Internet of Things; A data fusion module is used to fuse the device identification and network data of each device to obtain fusion features; The device detection module is used to detect illegal devices based on fusion features using an illegal device detection model obtained through federated learning based on an optimal dynamic differential privacy budget determination algorithm. The optimal dynamic differential privacy budget determination algorithm uses the performance accuracy change caused by the privacy budget as a data practicality indicator and the inference accuracy change of the model under member reasoning attacks as a data privacy protection indicator. The security policy module is used to execute corresponding security policies on the device according to the detection results.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method according to any one of claims 1 to 7 by calling the computer program stored in the memory.
10. A computer-readable storage medium for storing a computer program for detecting illegal devices based on an optimal dynamic differential privacy budget, characterized in that: When the computer program is run on a computer, the steps of the method according to any one of claims 1 to 7 are executed.