Edge calculation security optimization method, system and device for smart power grid and medium

By deploying LSTM models at the edge layer of the grid for real-time prediction and local incremental training, combining compression encryption and federal aggregation, resource constrained and privacy leakage problems are solved, the efficiency and security of grid fault detection are optimized, and fast and accurate fault response is achieved.

CN120541592AActive Publication Date: 2025-08-26SHANDONG INSPUR SCI RES INST CO LTD

Patent Information

Application Number
CN202510558126.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-26
Estimated Expiration
2045-04-29

AI Technical Summary

Technical Problem

In traditional power grid fault detection methods, edge layer terminal monitoring equipment resources are limited, and it is difficult to support the real-time operation of complex models. The prediction accuracy of lightweight models is insufficient, data transmission has the risk of privacy leakage, fixed training strategies cannot adapt to the dynamic fluctuations in equipment resources, large communication overhead, low aggregation efficiency, which affects the real-time and reliability of fault responses.

Method used

The LSTM model is used for real-time prediction and local incremental training, and data transmission is transmitted through compressed encryption gradient changes. Combined with federal aggregation and hierarchical model updates, training strategies are dynamically adjusted, and privacy is protected by differential privacy and homomorphic encryption, model structure is optimized, data transmission is reduced, and aggregation efficiency is improved.

Benefits of technology

It realizes effective model training under resource constraints, protects grid data privacy, improves the accuracy and response efficiency of fault detection, and ensures the safety and real-timeness of the grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120541592A_ABST
    Figure CN120541592A_ABST
Patent Text Reader

Abstract

The invention provides an edge computing security optimization method, system and device for a smart power grid and a medium, and belongs to the technical field of power grid security, and the method comprises the steps that a terminal monitoring device carries out the real-time prediction of collected power grid data through an LSTM model, judges whether there is a terminal abnormality, triggers the incremental training of a local model when there is the terminal abnormality, and carries out the optimization of the edge computing security of the smart power grid; the gradient change in the training is compressed and encrypted and then reported; the substation server responds to the terminal abnormity, the compressed and encrypted gradient change reported by each terminal monitoring device is issued to the terminal monitoring device under the substation server, and is reported to the power grid data center at the same time; and the power grid data center responds to the received aggregation parameters, identifies the fault type through the main fault analysis model, determines a model needing to be updated and an issuing path, and executes layered issuing according to the issuing path and the model level. According to the invention, the fault detection and response efficiency and safety of the smart grid are improved through dynamic sensing, encryption protection, lightweight architecture and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of power grid security technology, and specifically relates to an edge computing security optimization method, system, equipment and medium for smart grids. Background Art

[0002] Grid fault detection plays an important role in ensuring power supply. Traditional grid fault detection methods mainly rely on centralized fault analysis models, which have the following problems: First, edge-layer terminal monitoring devices are often limited by hardware computing power and power supply capabilities, making it difficult to support the real-time operation of complex models. In existing solutions, directly deploying full-scale deep learning models can easily lead to excessive device power consumption or response delays, while lightweight models suffer from insufficient prediction accuracy. Furthermore, the power grid data collected by edge devices contains sensitive information about grid operations. Traditional data reporting methods do not encrypt intermediate results such as gradient updates, posing privacy risks. For example, unencrypted gradient changes could allow attackers to reverse-infer grid topology or fault modes, threatening system security. Second, traditional fault analysis models use fixed training strategies that cannot adapt to dynamic fluctuations in device resources. For example, insufficient device power or bandwidth can lead to reduced training focus or model performance. Furthermore, they cannot fully utilize the computing power of edge devices and cannot perform limited model training under resource constraints. In power grid anomaly detection scenarios, traditional federated learning frameworks require transmitting raw data from terminal devices to a central node, resulting in high communication overhead and low aggregation efficiency. Especially when multiple terminals report anomalies simultaneously, the massive amount of unprocessed data can cause computational congestion in the fog layer server, delaying fault response. Summary of the Invention

[0003] In a first aspect, an embodiment of the present application provides an edge computing security optimization method for a smart grid, wherein the smart grid includes a terminal monitoring device deployed at the edge layer of the grid, a substation server deployed at the fog computing layer of the grid, and a grid data center deployed at the cloud layer of the grid; The method comprises the following steps: S1. The terminal monitoring device is deployed with an LSTM model, which performs real-time predictions on collected power grid data. The prediction results determine whether there are any terminal anomalies. If an anomaly is detected, incremental training of the local model is triggered, and the gradient changes during training are compressed and encrypted before being reported. S2. The substation server responds to the terminal anomaly by performing federated aggregation on the compressed and encrypted gradient changes reported by each terminal monitoring device and reporting the aggregated gradient changes to the power grid data center. S3. The power grid data center responds to the received aggregated parameters, identifies the fault type through the main fault analysis model, determines the model that needs to be updated and the distribution path, and performs hierarchical distribution based on the distribution path and model level.

[0004] Furthermore, the specific steps of step S1 are as follows: S11. Initialize the LSTM model of the terminal monitoring device; S12. The terminal monitoring device collects grid data sets and the device's own status in real time, and inputs the grid data into the LSTM model to predict grid parameters for a set time period; S13. The terminal monitoring device analyzes the predicted value of the grid parameter to determine whether the fluctuation range exceeds the set threshold; If so, locate the grid fault according to the type of fluctuating grid parameters and proceed to step S14; If not, return to step S12; S14. Start local incremental training of the LSTM model, encrypt and compress the gradient changes during the training process, and then report them to the corresponding substation server.

[0005] Furthermore, the specific steps of step S11 are as follows: S111. The LSTM model terminal monitoring device registers hardware parameters with the substation server; S112. The power grid data center receives the hardware parameters of the terminal monitoring device reported by the substation server; If the hardware parameters do not meet the computing power threshold, a lightweight LSTM model is sent to the corresponding terminal monitoring device; If the hardware parameters meet the computing power threshold, the full LSTM model is sent to the corresponding terminal monitoring device; The specific steps for starting local incremental training of the LSTM model in step S14 are as follows: Determine whether an emergency response needs to be triggered based on the type and magnitude of fluctuating grid parameters; If so, only the weights of the last layer are updated during LSTM model training; If not, only the last two layers are updated during LSTM model training; The specific steps of encrypting and compressing the gradient changes during the training process in step S14 are as follows: The terminal monitoring device determines the compression rate based on its own status; Determine encryption strategies for different parameter parts in the gradient change, and encrypt the gradient changes of each parameter part according to the determined encryption strategy, and then merge them to obtain the encrypted gradient changes; Compress the encrypted gradient changes using a determined compression ratio.

[0006] Furthermore, the specific steps of step S2 are as follows: S21. The substation server receives the encrypted and compressed gradient changes reported by each terminal monitoring device, responds to the terminal abnormality, and locates the grid fault according to the terminal monitoring device to which the gradient change belongs; S22. The substation server determines whether the number of abnormal response terminals exceeds the set threshold within the set time period; If yes, go to step S23; If not, return to step S21; S23. The substation server performs spatiotemporal alignment and exception processing on the encrypted and compressed gradient changes reported by each terminal monitoring device, and then aggregates them using a homomorphic summation method; S24. The substation server adds the substation code to the aggregated gradient change and reports it to the power grid data center.

[0007] Furthermore, the specific steps of step S3 are as follows: S31. Pre-build and train a fault analysis model in the power grid data center; S32. The grid data will be aggregated after the gradient change input fault analysis model to obtain a fault feature vector; the fault feature vector includes the fault type, fault probability, fault corresponding strain station code; S33. The power grid data center generates a fault probability distribution heat map based on the fault feature vector and the power grid GIS topology data. S34. The grid data center selects the model that needs to be updated from the pre-set fault model library and determines the delivery path according to the substation code; the model that needs to be updated includes fog layer-specific components and edge general components; S35. The grid data center will need to update the model verification and distribution path to the corresponding power station server; S36. The substation server uses fog layer-specific components for local updates, and sends edge general components to each terminal monitoring device.

[0008] Furthermore, the specific steps of fault analysis model training in step S31 are as follows: Collect the gradient change data of each terminal monitoring device within a set time period before and after the historical fault event, mark the fault type and occurrence time, and form a collection of gradient samples; Use 3D convolutional neural networks to process the spatiotemporal features of gradient samples; The fault analysis model is trained with the goal of minimizing the fault classification loss and the fault localization loss.

[0009] Furthermore, the following steps are included between step S34 and step S35: The power grid data center determines whether the following emergency update conditions are met: The model that needs to be updated includes only marginally common components; The size of the model to be updated is smaller than the set threshold; The fault type is emergency; If not, proceed to step S35; If so, the power grid data center directly sends the model that needs to be updated to all terminal monitoring devices under the substation server according to the sending path.

[0010] In a second aspect, an embodiment of the present application further provides an edge computing security optimization system for a smart grid, wherein the smart grid includes terminal monitoring equipment deployed at the edge layer of the grid, a substation server deployed at the fog computing layer of the grid, and a grid data center deployed at the cloud layer of the grid; The terminal anomaly identification module uses the LSTM model to perform real-time predictions on collected power grid data and determines whether there are terminal anomalies based on the prediction results. When a terminal anomaly occurs, it triggers incremental training of the local model and compresses and encrypts the gradient changes during training before reporting them. The fog layer anomaly recognition module responds to terminal anomalies, performs federated aggregation on the compressed and encrypted gradient changes reported by each terminal monitoring device, and reports the aggregated gradient changes to the power grid data center; The cloud layer global model update module responds to the received aggregation parameters, identifies the fault type through the main fault analysis model, determines the model that needs to be updated and the distribution path, and performs hierarchical distribution according to the distribution path and model level.

[0011] In a third aspect, an embodiment of the present application further provides an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the edge computing security optimization method for the smart grid as described in the first aspect are implemented.

[0012] In a fourth aspect, an embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the edge computing security optimization method for the smart grid as described in the first aspect are implemented.

[0013] It can be seen from the above technical solutions that this application has the following advantages: In the edge computing security optimization method, system, device and medium for smart grids provided in this application, through the dynamic resource perception mechanism, the edge device can dynamically adjust the training strategy according to its own status, ensuring that effective model training can still be carried out under resource constraints, and fully utilizing the computing power of the edge device; by adopting differential privacy and homomorphic encryption to encrypt intermediate results such as gradient changes, effectively preventing privacy leakage and protecting sensitive information of power grid operation; through lightweight architecture search and multi-level privacy security, the model structure is optimized, the inference speed and accuracy of the model on different devices are improved, and it can quickly adapt to new failure modes and enhance the adaptability of the system; by adopting federal aggregation and spatiotemporal alignment processing, the amount of data transmission from the edge layer to the cloud is reduced, the aggregation efficiency is improved, the computing congestion of the fog layer server is avoided, and the real-time fault response is ensured; through the main fault analysis model and the fault probability distribution heat map, the fault type and location are quickly and accurately identified, combined with layered distribution, the model is updated in time, and the overall efficiency and accuracy of power grid fault detection and response are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for the description. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0015] Figure 1 Schematic diagram of the process of the edge computing security optimization method for the smart grid of the present invention.

[0016] Figure 2 Schematic diagram of the edge computing security optimization system for the smart grid of the present invention. DETAILED DESCRIPTION

[0017] In the following detailed description of the specific steps of the edge computing security optimization method for the smart grid, various embodiments of the present disclosure will be described more fully. The present disclosure can have various embodiments, and adjustments and changes can be made therein. However, it should be understood that there is no intention to limit the various embodiments of the present disclosure to the specific embodiments disclosed herein, but rather that the present disclosure should be understood to cover all adjustments, equivalents and / or alternatives that fall within the spirit and scope of the various embodiments of the present disclosure.

[0018] For example, power grid fault detection is a critical component in ensuring the stable operation of power systems. Traditional power grid fault detection methods primarily rely on centralized fault analysis models, but these methods have numerous limitations in practical applications. First, resource constraints exist on edge-layer terminal monitoring devices. These devices are often limited by hardware computing power and power supply capabilities, making it difficult to support the real-time execution of complex models. Directly deploying full-scale deep learning models results in excessive power consumption or response delays. While lightweight models can reduce power consumption, they often lack predictive accuracy. Furthermore, power grid data collected by edge devices contains sensitive information about grid operations. Traditional data reporting methods fail to encrypt intermediate results, such as gradient updates, posing privacy risks. For example, unencrypted gradient changes could allow attackers to reverse engineer grid topology or fault modes, threatening system security. Second, the limitations of fixed training strategies. Traditional fault analysis models employ fixed training strategies that cannot adapt to dynamic fluctuations in device resources. For example, insufficient device power or bandwidth can lead to training interruptions or degraded model performance. This static configuration fails to fully utilize the computing power of edge devices and prevents effective model training under resource constraints. Third, there are issues with communication overhead and aggregation efficiency. In power grid anomaly detection scenarios, traditional federated learning frameworks require uploading raw data from terminal devices to a central node, resulting in high communication overhead and low aggregation efficiency. Especially when multiple terminals report anomalies simultaneously, the massive amount of unprocessed data can cause computational congestion in the fog layer servers, delaying fault response and impacting the real-time and reliability of the power grid.

[0019] To address the above problems, the present invention proposes a method and system for edge computing security optimization of smart grids. Through a dynamic resource perception mechanism, a multi-level privacy protection architecture, and lightweight model optimization technology, it solves the problems of insufficient dynamic resource adaptation, conflict between privacy protection and model accuracy, poor compatibility of heterogeneous devices, and excessive communication overhead in the existing technology, significantly improving the efficiency and security of smart grid fault detection.

[0020] To address the above issues, this embodiment provides an edge computing security optimization method for smart grids. Through a dynamic resource perception mechanism, a multi-level privacy protection architecture, and lightweight model optimization technology, it solves the problems of insufficient dynamic resource adaptation, conflict between privacy protection and model accuracy, poor compatibility of heterogeneous devices, and excessive communication overhead in existing technologies.

[0021] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0022] See also Figure 1 FIG2 is a flow chart of a method for optimizing edge computing security for a smart grid in a specific embodiment, wherein the smart grid includes terminal monitoring equipment deployed at the edge layer of the grid, a substation server deployed at the fog computing layer of the grid, and a grid data center deployed at the cloud layer of the grid; The method comprises the steps of: S1. The terminal monitoring device is deployed with an LSTM model, which performs real-time predictions on collected power grid data. The prediction results determine whether there are any terminal anomalies. If an anomaly is detected, incremental training of the local model is triggered, and the gradient changes during training are compressed and encrypted before being reported. It should be noted that by deploying the LSTM model at the edge layer, it is possible to predict power grid data in real time, quickly detect terminal anomalies, and provide a preliminary basis for fault detection. It also enables real-time monitoring of the power grid's operating status, promptly discovering potential faults and improving the reliability of power grid operation. By analyzing the prediction results, it can quickly locate anomalies and provide data support for subsequent fault handling. When an anomaly is detected, local incremental training is promptly initiated to update the model to adapt to the new fault mode, enhancing the model's adaptability and accuracy. Compression and encryption algorithms are used to reduce data transmission volume, protect privacy, and ensure data security and integrity. S2. The substation server responds to the terminal anomaly by performing federated aggregation on the compressed and encrypted gradient changes reported by each terminal monitoring device and reporting the aggregated gradient changes to the power grid data center. It should be noted that the system responds promptly to abnormal conditions reported by terminal monitoring devices to ensure timely troubleshooting. Through federated aggregation, the gradient changes of multiple terminals are integrated to reduce data transmission volume and improve aggregation efficiency. The aggregated gradient changes are reported to the cloud to provide data support for updating the global model and optimize the data transmission process. S3. The power grid data center responds to the received aggregated parameters, identifies the fault type through the main fault analysis model, determines the model that needs to be updated and the distribution path, and performs hierarchical distribution based on the distribution path and model level; It should be noted that the pre-trained fault analysis model can quickly and accurately identify the fault type and provide data support for fault handling; the global model is used to analyze the aggregated gradient changes, accurately identify the fault type and location, and improve the accuracy of fault detection; according to the fault type and substation code, the appropriate model is selected for update, and the distribution path is determined to optimize the model update process; a layered distribution mechanism is adopted to ensure the efficiency and accuracy of model updates and improve overall performance.

[0023] This embodiment implements local intelligent preprocessing of power grid data, reducing the communication load caused by uploading raw data; through gradient encryption and federated aggregation, distributed model collaboration is completed while protecting data privacy, meeting power grid security requirements; layered distribution avoids the use of a single model update, reducing the computing pressure on edge devices and fog layer servers.

[0024] Furthermore, as a refinement and expansion of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another edge computing security optimization method for a smart grid is provided. The smart grid includes terminal monitoring equipment deployed at the edge layer of the grid, substation servers deployed at the fog computing layer of the grid, and a grid data center deployed at the cloud layer of the grid. The method comprises the following steps: S1. The terminal monitoring device is deployed with an LSTM model, which performs real-time predictions on the collected power grid data. The prediction results are used to determine whether there are any terminal anomalies. If there are any terminal anomalies, local model incremental training is triggered, and the gradient changes during training are compressed and encrypted before being reported. The specific steps of step S1 are as follows: S11. The terminal monitoring device initializes the LSTM model; the specific steps of step S11 are as follows: S111. The LSTM model terminal monitoring device registers hardware parameters with the substation server; the hardware parameters may include CPU performance, internal capacity, or power consumption; S112. The power grid data center receives the hardware parameters of the terminal monitoring device reported by the substation server; If the hardware parameters do not meet the computing power threshold, a lightweight LSTM model is sent to the corresponding terminal monitoring device; If the hardware parameters meet the computing power threshold, the full LSTM model is sent to the corresponding terminal monitoring device; It should be noted that the full / light LSTM model is delivered based on hardware parameters. The lightweight model is adapted to low-computing power devices, and the full model is used for high-performance terminals, enabling flexible model deployment. For example, if the hardware parameters of a terminal monitoring device are a 1.5GHz CPU, 512MB of memory, and 80% battery life, the power grid data center determines that the device does not meet the operating conditions of the full model based on preset computing power thresholds, such as a 2GHz CPU and 1GB of memory. Therefore, the lightweight LSTM model is deployed. For example, a terminal monitoring device for a smart meter (CPU 800 MHz / Memory 128 MB) receives a lightweight LSTM model (0.8 MB parameters), while a terminal monitoring device for a substation RTU (CPU 2.4 GHz / Memory 2 GB) receives a full model (3.2 MB parameters). S12. The terminal monitoring device collects grid data sets and the device's own status in real time, and inputs the grid data into the LSTM model to predict grid parameters for a set time period; S13. The terminal monitoring device analyzes the predicted value of the grid parameter to determine whether the fluctuation range exceeds the set threshold; If so, locate the grid fault according to the type of fluctuating grid parameters and proceed to step S14; If not, return to step S12; S14. Start local incremental training of the LSTM model, encrypt and compress the gradient changes during the training process, and then report them to the substation server to which it belongs; It should be noted that the fault type is determined by the predicted value fluctuation threshold, and local incremental training is triggered to predict power grid parameters in real time, achieving early warning and rapid fault location, shortening the fault discovery time. Model training is triggered only when an anomaly is detected, avoiding the surge in device power consumption caused by full-time training and extending the battery life of edge devices. The specific steps for starting local incremental training of the LSTM model in step S14 are as follows: Determine whether an emergency response needs to be triggered based on the type and magnitude of fluctuating grid parameters; If so, only the weights of the last layer are updated during LSTM model training; If not, only the last two layers are updated during LSTM model training; It should be noted that through hierarchical training, only the weights of the last layer are updated for emergency failures, while the last two layers are updated for routine failures. This reduces the amount of parameter updates in emergency scenarios, shortens training time, and meets real-time response requirements. For example, if the voltage fluctuation is greater than 15% or the frequency fluctuation is greater than 1 Hz, it is identified as an emergency response, and only the output layer is updated and trained for one iteration cycle. If the voltage fluctuation is less than or equal to 5% and less than 15%, it is identified as a normal response, and the last two layers are updated and trained for three iteration cycles. The specific steps of encrypting and compressing the gradient changes during the training process in step S14 are as follows: The terminal monitoring device determines the compression rate based on its own status; Determine encryption strategies for different parameter parts in the gradient change, and encrypt the gradient changes of each parameter part according to the determined encryption strategy, and then merge them to obtain the encrypted gradient changes; For example, the gradient changes of the core parameters are encrypted using Paillier encryption, while the gradient changes of the parameters of the LSTM hidden layer are encrypted using an adaptive noise function in a differential noise injection manner, and the gradient changes of the auxiliary parameters are encrypted in a grouped XOR manner; Compress the encrypted gradient changes using a determined compression ratio; For example, if the device has sufficient power, a low compression rate is used to preserve as many complete gradient change features as possible, while if the device has insufficient power, a high compression rate is used to meet the requirements of short transmission time and low power consumption; It should be noted that by encrypting parameters at different levels according to their importance and adjusting the compression rate according to the device status, we can achieve high-strength encryption of core parameters to prevent privacy leaks, and lightweight encryption of non-sensitive parameters to reduce computing overhead. When the battery is low, the high compression rate reduces transmission time and avoids device power outages. S2. The substation server responds to the terminal abnormality and performs federation aggregation on the compressed and encrypted gradient changes reported by each terminal monitoring device, and reports the aggregated gradient changes to the power grid data center; the specific steps of step S2 are as follows: S21. The substation server receives the encrypted and compressed gradient changes reported by each terminal monitoring device, responds to the terminal abnormality, and locates the grid fault according to the terminal monitoring device to which the gradient change belongs; S22. The substation server determines whether the number of abnormal response terminals exceeds the set threshold within the set time period; If yes, go to step S23; If not, return to step S21; S23. The substation server performs spatiotemporal alignment and exception processing on the encrypted and compressed gradient changes reported by each terminal monitoring device, and then aggregates them using a homomorphic summation method; The gradient change data reported by the terminal monitoring device is ΔW i , timestamp is t i , the device position is p i For example, through spatiotemporal alignment, data from different devices are aligned to the same time window and spatial location, and then aggregated using homomorphic summation:

[0025] S24. The substation server adds the substation code to the aggregated gradient change and reports it to the grid data center; It should be noted that by introducing spatiotemporal alignment, the timestamp deviation and spatial topology differences of data from different terminals are eliminated, improving the accuracy of the aggregation results. By directly aggregating gradients in an encrypted state through homomorphic summation, the security risks brought by data decryption are avoided. The batch processing process is triggered by the abnormal number threshold to prevent the fog layer server from resource preemption due to single terminal abnormalities. S3. The power grid data center responds to the received aggregated parameters, identifies the fault type through the main fault analysis model, determines the model that needs to be updated and the distribution path, and performs hierarchical distribution based on the distribution path and model level; the specific steps of step S3 are as follows: S31. Pre-build and train the fault analysis model in the power grid data center; the specific steps of the fault analysis model training in step S31 are as follows: Collect the gradient change data of each terminal monitoring device within a set time period before and after the historical fault event, mark the fault type and occurrence time, and form a collection of gradient samples;

[0026] in, is the gradient tensor, is the fault category label, is the timestamp; Use 3D convolutional neural networks to process the spatiotemporal features of gradient samples; In the spatial dimension, the gradient channels are arranged according to the topological relationship of the devices; In the time dimension, the gradient change trend is extracted through a sliding window, for example, the window size T = 10 sampling periods; In the parameter dimension, distinguish the gradient patterns of different network layers; The fault analysis model is trained with the goal of minimizing the fault classification loss and the fault localization loss;

[0027] in, L cls is the cross entropy loss for fault classification, L loc is the mean square error of fault location; It should be noted that by arranging gradient channels according to device topology in the spatial dimension, capturing trends through sliding windows in the temporal dimension, and distinguishing network layer patterns in the parameter dimension, comprehensive capture of fault characteristics is achieved. By simultaneously minimizing classification loss and localization loss, the model limitations caused by single-metric optimization are avoided. S32. The grid data will be aggregated after the gradient change input fault analysis model to obtain a fault feature vector; the fault feature vector includes the fault type, fault probability, fault corresponding strain station code; S33. The power grid data center generates a fault probability distribution heat map based on the fault feature vector and the power grid GIS topology data. S34. The grid data center selects the model that needs to be updated from the pre-set fault model library and determines the delivery path according to the substation code; the model that needs to be updated includes fog layer-specific components and edge general components; S35. The grid data center will need to update the model verification and distribution path to the corresponding power station server; S36. The substation server uses fog layer-specific components for local updates, while sending edge-specific components to each terminal monitoring device. It should be noted that 3D-CNN is used to capture the spatiotemporal characteristics of gradient data to improve fault classification and positioning accuracy; heat maps are used to intuitively display the fault probability distribution, assisting operation and maintenance personnel in quickly formulating maintenance plans; fog layer dedicated components are used to optimize local aggregation logic, and edge general components are used to unify basic detection capabilities and improve compatibility.

[0028] In an embodiment of the present invention, based on step S34 and step S35, a possible embodiment will be given below to illustrate its specific implementation scheme in a non-limiting manner.

[0029] The following steps are also included between step S34 and step S35: The power grid data center determines whether the following emergency update conditions are met: The model that needs to be updated includes only marginally common components; The size of the model to be updated is smaller than the set threshold; The fault type is emergency; If not, proceed to step S35; If so, the power grid data center directly sends the model that needs to be updated to all terminal monitoring devices under the substation server according to the sending path; It should be noted that by setting emergency update conditions, the model can be directly sent to the terminal device, so that in an emergency failure scenario, the fog layer transfer can be skipped and the terminal model can be directly updated, shortening the response time. Only lightweight edge components can be transmitted to avoid the impact of large model transmission on the power grid communication network.

[0030] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0031] like Figure 2 As shown, the following is an embodiment of the edge computing security optimization system for the smart grid provided by the embodiment of the present disclosure. This system and the edge computing security optimization method for the smart grid in the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiment of the edge computing security optimization system for the smart grid, please refer to the embodiment of the edge computing security optimization method for the smart grid mentioned above.

[0032] Smart grids include terminal monitoring devices deployed at the grid edge layer, substation servers deployed at the grid fog computing layer, and grid data centers deployed at the grid cloud layer. The terminal anomaly identification module uses the LSTM model to perform real-time predictions on collected power grid data and determines whether there are terminal anomalies based on the prediction results. When a terminal anomaly occurs, it triggers incremental training of the local model and compresses and encrypts the gradient changes during training before reporting them. The fog layer anomaly recognition module responds to terminal anomalies and performs federated aggregation on the compressed and encrypted gradient changes reported by each terminal monitoring device. It then sends the aggregated gradient changes to the terminal monitoring devices under the substation server and reports them to the power grid data center. The cloud layer global model update module responds to the received aggregation parameters, identifies the fault type through the main fault analysis model, determines the model that needs to be updated and the distribution path, and performs hierarchical distribution according to the distribution path and model level.

[0033] This embodiment achieves the decoupling of physical deployment and logical functions through the interactive collaboration of the terminal anomaly identification module, the fog layer anomaly identification module, and the cloud layer global model update module. Each module can be upgraded independently, reducing the system iteration cost. The layered architecture limits the scope of anomaly impact and prevents the spread of single node failures to the global system.

[0034] The edge computing security optimization method for the smart grid provided in the embodiment of the present application can be applied to electronic devices. Those skilled in the art will understand that the electronic device structure involved in the embodiment of the present invention does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange components differently. In the embodiment of the present invention, the electronic device includes but is not limited to a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described and / or required herein.

[0035] The electronic device may include a processor, an external memory interface, an internal memory, a universal serial bus (USB) interface, a charging management module, a power management module, a battery, a wireless communication module, an audio module, a speaker, a microphone, a sensor module, a button, a camera, a display, and a SIM card interface, etc.

[0036] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0037] A processor may include one or more processing units, such as a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0038] The processor can be the nerve center and command center of the electronic device. The controller can generate operation control signals based on the instruction opcode and timing signal to complete the control of instruction fetching and execution.

[0039] The processor may also include a memory for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory can store instructions or data that the processor has just used or is reusing. If the processor needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces processor latency, and thus improves system efficiency.

[0040] The above-mentioned electronic device implements the terminal monitoring device of the edge computing security optimization method of the smart grid of the present application, which is deployed with an LSTM model. The LSTM model is used to make real-time predictions on the collected power grid data, and the prediction results are used to determine whether there is a terminal abnormality. When a terminal abnormality exists, the local model incremental training is triggered, and the gradient changes in the training are compressed and encrypted and then reported; the substation server responds to the terminal abnormality, performs federal aggregation on the compressed and encrypted gradient changes reported by each terminal monitoring device, and sends the aggregated gradient changes to the terminal monitoring device under the substation server, and reports to the power grid data center at the same time; the power grid data center responds to the received aggregation parameters and sends them to the main fault analysis module through the main fault analysis module. The system can identify the fault type, determine the model that needs to be updated and the delivery path, and execute the hierarchical delivery technical solution according to the delivery path and model level, so as to achieve the goal of enabling edge devices to efficiently train models under resource constraints through a dynamic resource perception mechanism, and use differential privacy and homomorphic encryption to ensure the privacy security of data such as gradients. With the help of lightweight architecture search and multi-level privacy security, the model reasoning speed, accuracy and adaptability are improved. Federated aggregation and spatiotemporal alignment are used to reduce the amount of data transmission and improve aggregation efficiency to ensure the real-time response to faults. The main fault analysis model and heat map are used to quickly locate faults and combine with the hierarchical delivery to update the model, which comprehensively improves the efficiency and accuracy of power grid fault detection and response.

[0041] The storage medium provided in this application stores a program product that can implement an edge computing security optimization method for a smart grid.

[0042] The edge computing security optimization method for smart grids includes: the terminal monitoring equipment is deployed with an LSTM model, which uses the LSTM model to make real-time predictions on the collected power grid data, and uses the prediction results to determine whether there is a terminal abnormality. When a terminal abnormality exists, local model incremental training is triggered, and the gradient changes in the training are compressed and encrypted before being reported; the substation server responds to the terminal abnormality, performs federal aggregation on the compressed and encrypted gradient changes reported by each terminal monitoring device, and sends the aggregated gradient changes to the terminal monitoring device under the substation server, and reports to the power grid data center at the same time; the power grid data center responds to the received aggregation parameters, identifies the fault type through the main fault analysis model, determines the model that needs to be updated and the sending path, and performs hierarchical sending according to the sending path and model level.

[0043] In some possible embodiments, the edge computing security optimization method for the smart grid disclosed herein can be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps described in the above "Exemplary Method" section of this specification according to various exemplary embodiments of the present disclosure.

[0044] The storage medium of the present disclosure can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0045] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for optimizing edge computing security in a smart grid, characterized in that: The smart grid includes terminal monitoring equipment deployed in the grid edge layer, substation servers deployed in the grid fog computing layer, and grid data centers deployed in the grid cloud layer; The method comprises the following steps: S1. The terminal monitoring device is deployed with an LSTM model, which performs real-time predictions on collected power grid data. The prediction results determine whether there are any terminal anomalies. If an anomaly is detected, incremental training of the local model is triggered, and the gradient changes during training are compressed and encrypted before being reported. S2. The substation server responds to the terminal anomaly by performing federated aggregation on the compressed and encrypted gradient changes reported by each terminal monitoring device and reporting the aggregated gradient changes to the power grid data center. S3. The power grid data center responds to the received aggregated parameters, identifies the fault type through the main fault analysis model, determines the model that needs to be updated and the distribution path, and performs hierarchical distribution based on the distribution path and model level.

2. The edge computing security optimization method for smart grid according to claim 1, characterized in that: The specific steps of step S1 are as follows: S11. Initialize the LSTM model of the terminal monitoring device; S12. The terminal monitoring device collects grid data sets and the device's own status in real time, and inputs the grid data into the LSTM model to predict grid parameters for a set time period; S13. The terminal monitoring device analyzes the predicted value of the grid parameter to determine whether the fluctuation range exceeds the set threshold; If so, locate the grid fault according to the type of fluctuating grid parameters and proceed to step S14; If not, return to step S12; S14. Start local incremental training of the LSTM model, encrypt and compress the gradient changes during the training process, and then report them to the corresponding substation server.

3. The edge computing security optimization method for smart grid according to claim 2, characterized in that: The specific steps of step S11 are as follows: S111. The LSTM model terminal monitoring device registers hardware parameters with the substation server; S112. The power grid data center receives the hardware parameters of the terminal monitoring device reported by the substation server; If the hardware parameters do not meet the computing power threshold, a lightweight LSTM model is sent to the corresponding terminal monitoring device; If the hardware parameters meet the computing power threshold, the full LSTM model is sent to the corresponding terminal monitoring device; The specific steps for starting local incremental training of the LSTM model in step S14 are as follows: Determine whether an emergency response needs to be triggered based on the type and amplitude of fluctuating grid parameters; If so, only the weights of the last layer are updated during LSTM model training; If not, only the last two layers are updated during LSTM model training; The specific steps of encrypting and compressing the gradient changes during the training process in step S14 are as follows: The terminal monitoring device determines the compression rate based on its own status; Determine encryption strategies for different parameter parts in the gradient change, and encrypt the gradient changes of each parameter part according to the determined encryption strategy, and then merge them to obtain the encrypted gradient changes; Compress the encrypted gradient changes using a determined compression ratio.

4. The edge computing security optimization method for smart grid according to claim 2, characterized in that: The specific steps of step S2 are as follows: S21. The substation server receives the encrypted and compressed gradient changes reported by each terminal monitoring device, responds to the terminal abnormality, and locates the grid fault according to the terminal monitoring device to which the gradient change belongs; S22. The substation server determines whether the number of abnormal response terminals exceeds the set threshold within the set time period; If yes, go to step S23; If not, return to step S21; S23. The substation server performs spatiotemporal alignment and exception processing on the encrypted and compressed gradient changes reported by each terminal monitoring device, and then aggregates them using a homomorphic summation method; S24. The substation server adds the substation code to the aggregated gradient change and reports it to the power grid data center.

5. The edge computing security optimization method for smart grid according to claim 4, characterized in that: The specific steps of step S3 are as follows: S31. Pre-build and train a fault analysis model in the power grid data center; S32. The grid data will be aggregated after the gradient change input fault analysis model to obtain a fault feature vector; the fault feature vector includes the fault type, fault probability, fault corresponding strain station code; S33. The power grid data center generates a fault probability distribution heat map based on the fault feature vector and the power grid GIS topology data. S34. The grid data center selects the model that needs to be updated from the pre-set fault model library and determines the delivery path according to the substation code; the model that needs to be updated includes fog layer-specific components and edge general components; S35. The grid data center will need to update the model verification and distribution path to the corresponding power station server; S36. The substation server uses fog layer-specific components for local updates, and sends edge general components to each terminal monitoring device.

6. The edge computing security optimization method for smart grid according to claim 5, characterized in that: The specific steps of fault analysis model training in step S31 are as follows: Collect the gradient change data of each terminal monitoring device within a set time period before and after the historical fault event, mark the fault type and occurrence time, and form a collection of gradient samples; Use 3D convolutional neural networks to process the spatiotemporal features of gradient samples; The fault analysis model is trained with the goal of minimizing the fault classification loss and the fault localization loss.

7. The edge computing security optimization method for smart grid according to claim 5, characterized in that: The following steps are also included between step S34 and step S35: The power grid data center determines whether the following emergency update conditions are met: The model that needs to be updated includes only marginally common components; The size of the model to be updated is smaller than the set threshold; The fault type is emergency; If not, proceed to step S35; If so, the power grid data center directly sends the model that needs to be updated to all terminal monitoring devices under the substation server according to the sending path.

8. An edge computing security optimization system for a smart grid, characterized in that: Smart grids include terminal monitoring devices deployed at the grid edge layer, substation servers deployed at the grid fog computing layer, and grid data centers deployed at the grid cloud layer. The terminal anomaly identification module uses the LSTM model to perform real-time predictions on collected power grid data and determines whether there are terminal anomalies based on the prediction results. When a terminal anomaly occurs, it triggers incremental training of the local model and compresses and encrypts the gradient changes during training before reporting them. The fog layer anomaly recognition module responds to terminal anomalies, performs federated aggregation on the compressed and encrypted gradient changes reported by each terminal monitoring device, and reports the aggregated gradient changes to the power grid data center; The cloud layer global model update module responds to the received aggregation parameters, identifies the fault type through the main fault analysis model, determines the model that needs to be updated and the distribution path, and performs hierarchical distribution according to the distribution path and model level.

9. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the edge computing security optimization method for the smart grid as claimed in any one of claims 1 to 7 are implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the edge computing security optimization method for the smart grid as claimed in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Power grid data processing method and system based on edge calculation

    CN117932505A

  • Power distribution network fault processing equipment

    CN119398106A

  • Station area intelligent fusion terminal data processing system based on edge calculation

    CN119440800A

  • Satellite measurement and control data anomaly detection and intelligent diagnosis early warning method and system

    CN119646586A

  • Incremental training of machine learning tools

    WO2020167490A1

Cited By

  • Equipment state prediction method and device, equipment and readable storage medium

    CN121125463A