Power collaborative early warning method, system and device based on federal map space-time neural network and medium
The power collaborative early warning method based on federated graph spatiotemporal neural networks, which combines graph attention networks and long short-term memory networks, solves the spatiotemporal coupling problem of power grid risk monitoring in traditional power systems, and achieves high-precision cross-domain collaborative early warning and real-time fault detection.
Patent Information
- Application Number
- CN202511916608.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-05-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional power system risk monitoring methods cannot effectively characterize the spatiotemporal coupling characteristics of power grid risks, resulting in high false alarm rates and low recall rates. Furthermore, centralized training faces issues of data privacy protection and high communication costs, making it difficult to adapt to the heterogeneity of power grid topologies.
A power collaborative early warning method based on federated graph spatiotemporal neural network is adopted. The global model parameters are initialized by the federated coordinator, each participating domain performs local training and uploads encrypted model parameters, and the federated coordinator aggregates and updates the global model. By combining graph attention network and long short-term memory network, cross-domain collaborative early warning can be achieved.
It significantly improves the early warning accuracy of power systems, solves the problems of data privacy protection and topological heterogeneity, realizes cross-domain collaborative modeling and real-time fault early warning, and has good scalability and response speed.
Smart Images

Figure CN121961205A_ABST
Abstract
Description
A power collaborative early warning method, system, device and medium based on federated graph spatiotemporal neural network Technical Field
[0001] This invention relates to the field of power system monitoring and safety control technology, and in particular to a power collaborative early warning method, system, device and medium based on federated graph spatiotemporal neural network. Background Technology
[0002] Traditional power system risk monitoring relies on single models (such as independent LSTM or GNN), which struggle to characterize the spatiotemporal coupling characteristics of grid risks. Centralized training requires integrating multi-source data (dispatch, power plants, distribution networks, and users), facing privacy regulations (GDPR, Level 3 power monitoring security protection regulations), trade secret protection, and high communication costs, resulting in "data silos." This data fragmentation is particularly pronounced in new power systems—voltage fluctuations (±10% of rated voltage) caused by fluctuating output from renewable energy plants have a strong coupling effect with the inertial response (response time > 5s) of traditional thermal power units, making it impossible for a single data source to construct a complete risk propagation path. While federated learning ensures data privacy, traditional solutions cannot adapt to the heterogeneity of grid topologies, leading to limited early warning accuracy (recall rate < 75%, false alarm rate > 25%). This technology proposes a federated spatiotemporal modeling framework that integrates Graph Attention Network (GAT) and Long Short-Term Memory Network (LSTM). It innovatively introduces an electrical distance weighting factor to transform the physical connection strength of adjacent nodes into the edge weights of the graph neural network, thereby achieving cross-domain collaborative early warning under privacy protection and providing full lifecycle safety management support for power grid companies. Summary of the Invention
[0003] In view of the aforementioned existing problems, the present invention is proposed.
[0004] Therefore, this invention provides a power collaborative early warning method based on federated graph spatiotemporal neural network, which can solve the problems that traditional methods cannot detect the differences in urban and rural power grid structures, and have a high false alarm rate and low recall rate in testing, which may lead to missed fault detection and large-scale power outages.
[0005] To address the aforementioned technical problems, this invention provides the following technical solution: a power collaborative early warning method based on a federated graph spatiotemporal neural network, comprising: a federated coordinator initializing global graph attention long short-term memory network model parameters and distributing them to different participating domains; each participating domain performing local training on its local dataset, updating local model parameters by optimizing the loss function, and securely uploading encrypted model parameters and model update amounts to the federated coordinator; the federated coordinator aggregating the model parameters and model update amounts of all participating domains, updating the global model parameters, and iteratively executing the steps of model distribution, local training, information uploading, and aggregation update until the global model converges; deploying the trained global model to each participating domain, each participating domain collecting local real-time power data, using the global model for local inference, and obtaining local prediction results; uploading the local prediction results to the early warning decision center, which, based on the prediction results of all participating domains and global topology information, performs cross-domain risk fusion and situational awareness, generates early warning information, and issues it.
[0006] As a preferred embodiment of the power collaborative early warning method based on federated graph spatiotemporal neural network described in this invention, the local training includes: using gradient descent to iteratively adjust model parameters, minimizing the mean square error and L2 regularization term between the predicted value and the true value, and obtaining local model parameters and model update amount.
[0007] As a preferred embodiment of the power collaborative early warning method based on federated graph spatiotemporal neural network described in this invention, the following steps are taken: updating the global model parameters includes: after each participating domain completes model training locally, it encrypts the calculated model parameters and model update amounts, and uploads them to the federated coordinator through a secure communication channel; the federated coordinator receives and verifies the encrypted information uploaded by each participating domain; the federated coordinator uses a weighted average algorithm to aggregate the verified model update amounts and calculate the next generation of global model parameters.
[0008] As a preferred embodiment of the power collaborative early warning method based on federated graph spatiotemporal neural network described in this invention, the aggregation update includes: calculating a weighted average based on the number of local samples and contribution weights of the participating domains, wherein the contribution weights are dynamically determined through local model performance evaluation, Shapley value approximation, or reputation system, and updating the global model parameters.
[0009] As a preferred embodiment of the power collaborative early warning method based on federated graph spatiotemporal neural network described in this invention, the global model includes: constructing a graph spatiotemporal neural network model by coupling a graph attention network and a long short-term memory network; extracting temporal features from the time-series data of each power monitoring node through the long short-term memory network; aggregating information of adjacent nodes based on the power grid topology through the graph attention network to generate spatial features; fusing the temporal and spatial features and inputting them into a fully connected network to obtain the final prediction output.
[0010] As a preferred embodiment of the power collaborative early warning method based on federated graph spatiotemporal neural network described in this invention, the fusion of temporal and spatial features includes: using the hidden state of the final moment of the long short-term memory network as the temporal feature representation of the node; using the spatial embedding calculated by the graph attention network based on the attention mechanism as the spatial feature representation of the node; performing a weighted summation of the temporal and spatial feature representations, and inputting the fused feature vector into the fully connected layer.
[0011] As a preferred embodiment of the power collaborative early warning method based on federated graph spatiotemporal neural network described in this invention, the cross-domain risk fusion and situational awareness include: based on the weight matrix of the graph attention module in the trained global model, inferring the propagation path and intensity of risk along the power grid topology; integrating the time-series prediction results from different participating domains to construct a future-oriented global input; using the global model for forward reasoning to evaluate the superposition effect of multiple factors.
[0012] This invention provides a power collaborative early warning system based on federated graph spatiotemporal neural networks.
[0013] As a preferred embodiment of the power collaborative early warning system based on federated graph spatiotemporal neural networks described in this invention, the system comprises: a federated coordination module, a local computing module, a spatiotemporal modeling core module, and a collaborative early warning decision module. The federated coordination module, as the system's central hub, manages the registration and communication of participating domains and is responsible for the initialization, distribution, secure aggregation, and version control of the global model. The local computing module, deployed in each power participating domain, securely stores and manages local private data, executes local model updates in federated training tasks, and performs real-time data acquisition, preprocessing, and local inference based on the deployed global model. The spatiotemporal modeling core module, as the system's computing engine, integrates graph attention networks and long short-term memory networks to extract and fuse spatiotemporal features from distributed power data. The collaborative early warning decision module receives prediction results uploaded from each domain, combines global topology information for cross-domain risk fusion and situational awareness, generates tiered early warning information according to preset rules or dynamic evaluation models, and completes the distribution and visualization of early warnings.
[0014] The present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of a power collaborative early warning method based on a federated graph spatiotemporal neural network.
[0015] The present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of a power collaborative early warning method based on a federated graph spatiotemporal neural network.
[0016] The beneficial effects of this invention are as follows: Data remains within its local domain; only encrypted model parameters / intermediate features are exchanged, fundamentally solving privacy and compliance challenges and promoting cross-agency collaboration. Each local model absorbs and integrates the potential patterns inherent in data from other participating parties (domains), learning a more comprehensive spatiotemporal evolution pattern of the power system beyond a single domain, significantly improving early warning accuracy, especially for cross-domain propagating faults. GAT is integrated to explicitly model the spatial dependencies of the power grid topology, combined with LSTM to accurately learn the long-term dependencies and dynamic evolution of time series, achieving integrated capture of the spatiotemporal dynamics of complex power systems. Local nodes can perform real-time inference; cross-domain analysis at the early warning decision center can be based on lightweight feature / prediction result fusion. The hierarchical architecture facilitates horizontal expansion, accommodating more participating domains. The federated model can continuously adapt to changes in power grid structure, the introduction of new equipment, adjustments in operating modes, and constantly evolving fault modes. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 is an overall architecture diagram of a power collaborative early warning method based on federated graph spatiotemporal neural network provided by an embodiment of the present invention. Detailed Implementation
[0019] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0020] Example 1, referring to Figure 1, is the first embodiment of the present invention. This embodiment provides a power collaborative early warning method based on federated graph spatiotemporal neural network, including: S1: The federated coordinator initializes the parameters of the global graph attention long short-term memory network model and distributes them to different participating domains.
[0021] S2: Each participating domain performs local training on its local dataset, updates local model parameters by optimizing the loss function, and securely uploads encrypted model parameters and model update data to the federated coordinator.
[0022] S3: The federated coordinator aggregates the model parameters and model update amounts of all participating domains, updates the global model parameters, and iteratively executes the steps of model distribution, local training, information uploading, and aggregation update until the global model converges.
[0023] S4: Deploy the trained global model to each participating domain. Each participating domain collects local real-time power data, uses the global model to perform local inference, and obtains local prediction results.
[0024] S5: Upload the local prediction results to the early warning decision center. Based on the prediction results of all participating domains and global topology information, the early warning decision center performs cross-domain risk fusion and situational awareness, generates early warning information, and issues it.
[0025] It should be noted that this embodiment utilizes a federated learning framework to achieve cross-domain collaborative modeling without requiring data to leave the local machine, thus breaking down information barriers. It innovatively integrates graph attention networks and long short-term memory networks to accurately capture the spatiotemporal propagation characteristics of power grid risks, significantly improving the accuracy of cross-domain fault early warning. The system adopts a layered architecture, supporting both local real-time inference and global risk fusion decision-making, ensuring both response speed and good scalability. This solution provides a complete technical path for power grid-wide collaborative early warning, greatly enhancing the power grid's security protection capabilities.
[0026] Example 2 is an embodiment of the present invention. Based on the above embodiment, a power collaborative early warning method based on federated graph spatiotemporal neural network is provided.
[0027] Furthermore, in the embodiments of this application, step S1, the federated coordinator initializes the parameters of the global graph attention long short-term memory network model and distributes them to different participating domains. The specific steps include S101-S104: S101: Perform participant registration and management, manage the power domains authorized to join the federated learning (power company A, company B, wind farm C, photovoltaic power station D, etc.), assign unique identifiers, and maintain their reputation.
[0028] The global model is initialized, with the coordinator responsible for initializing the first-generation global federated spatiotemporal model based on the initial structure of GAT-LSTM. A stochastic initialization strategy is employed, specifically: for the weight matrices of the linear layers (fully connected layers) in the model... Xavier uniform initialization is used. This method samples weights from a uniform distribution U(−a,a). : in and These represent the number of input and output units for this layer, respectively. This method aims to maintain consistent signal variance during forward and backward propagation, accelerating convergence in the early stages of training.
[0029] S102: For the bias terms of linear layers, initialize them to a constant of 0. For various gating weights in Long Short-Term Memory (LSTM) networks, use orthogonal initialization and initialize the Forget Gate bias in their bias terms to a positive number of 1 or greater (such as 1.0 or 2.0). This helps to better remember historical information in the early stages of training and alleviate the gradient vanishing problem.
[0030] Attention weight vectors in Graph Attention Networks (GAT) Initialization is also performed using Xavier uniform initialization. After initialization, the coordinator will generate the initial global model parameters. Securely distribute to all participating domains.
[0031] Establish encrypted communication links based on technologies such as TLS to ensure the confidentiality, integrity, and tamper-proof nature of parameter transmission.
[0032] In an alternative embodiment, the establishment of an encrypted communication link can also be achieved based on a VPN's dedicated communication channel. Specifically, the inherent encryption and tunnel encapsulation features of VPN technology are utilized to ensure the confidentiality and integrity of parameters when transmitted over public networks, preventing data from being stolen or tampered with during transmission.
[0033] In one alternative embodiment, the encrypted communication link can also be established based on an SSL communication channel. Specifically, an SSL (Secure Sockets Layer) connection is established to transmit the encrypted ciphertext data to the federated coordinator. Upon receiving the data, the coordinator uses SSL to ensure channel security and decrypts the ciphertext using the same pre-shared key to obtain the original model parameters.
[0034] S103: After the local model update is complete, execute an efficient and safe model parameter aggregation algorithm. This solution uses a sample size-based weighted average algorithm as the core aggregation strategy, and can be extended to a contribution-based weighted method as needed.
[0035] Based on sample size weighting, the weight of each participating domain is determined by the size of its local dataset, aiming to allow domains with more data to have a greater impact on the global model. The aggregation formula is as follows: in, For participating domains The number of local samples used in this training round The total number of samples in this training round for all selected participating domains, i.e. ; For participating domains Uploaded local model parameters.
[0036] In an optional embodiment, the core aggregation strategy can also be implemented using a uniform average aggregation algorithm. Specifically, after receiving the encrypted local model parameters uploaded by all selected participating domains, the federated coordinator first decrypts and verifies their integrity. Ignoring the size differences of the local datasets of each participating domain, the coordinator calculates an arithmetic mean of all verified local model parameters. The calculated average is used as the next generation of global model parameters. The coordinator then uses the new global model parameters to overwrite the previous generation of parameters, completing this global model update.
[0037] In an optional embodiment, the core aggregation strategy can also be implemented using a weighted aggregation algorithm based on device reliability. Specifically, the federated coordinator maintains a device reliability score for each registered participating domain. This score is dynamically calculated and updated based on factors such as the stability of historical data uploads, communication outage rate, and the reliability of local computing resources for that domain. During the aggregation phase, after verifying the model parameters uploaded by each domain, the coordinator queries its latest device reliability score. The coordinator normalizes the reliability scores of each participating domain, making their sum equal to 1, and uses this normalized score as the aggregation weight for the domain's model parameters. Based on this weight, the coordinator performs a weighted summation of all local model parameters to obtain the next-generation global model parameters and completes the update.
[0038] S104: To more fairly reward high-quality data contributions and defend against malicious nodes, a contribution evaluation mechanism can be introduced. Contribution weight. It can be computed in one or more of the following ways: The coordinator holds a public set of validations. Before aggregation, the coordinator uses the models uploaded by each domain. The evaluation was performed on the validation set to obtain performance metrics (such as accuracy). F1 score or loss value Weights are directly proportional to performance, for example: or The contribution of each participating domain to the global model performance is evaluated by calculating its marginal contribution. This method is the fairest but has a high computational cost.
[0039] Maintain a dynamic reputation score for each domain Adjustments are made based on historical behavior (such as upload timeliness, model quality, and data stability), with weights... .
[0040] The contribution-weighted aggregation formula is as follows: in .
[0041] Manage different versions of the global model and securely distribute them to participating domains after aggregation.
[0042] Furthermore, in this embodiment, in step S2, each participating domain performs local training on its local dataset, updates local model parameters by optimizing the loss function, and securely uploads the encrypted model parameters and model update amount to the federated coordinator. Specific steps include S201-S202: S201: The coordinator uploads the current global model parameters... Broadcast / push to selected subset of participating domains (Optional subset to reduce communication load).
[0043] Each participating domain In local dataset Above, using global model parameters To initialize the starting point, execute Local training is performed. Local training minimizes the prediction error by optimizing the following objective function: in, Participating domain The local loss function, These are model parameters. It is a local GAT-LSTM model for the input samples The predicted output, Is with The corresponding real labels (such as equipment status, fault signs, etc.). It is the mean squared error (MSE) between the predicted and actual values, used to quantify the prediction error. It is an L2 regularization term (weight decay), used to prevent the model from overfitting. This is the hyperparameter for regularization strength. It is a local dataset The number of samples.
[0044] S202: Securely store and manage domain-specific power timing data (voltage). Current Active power reactive power ,temperature (etc.) and equipment / topology relationship information (regional power grid structure diagram), each node holds a localized GAT-LSTM federated spatiotemporal model instance.
[0045] In federated training rounds (t), nodes are based on global model parameters. Using its own local private data, perform K-step gradient descent updates to generate local model parameters. (k is the node identifier), the training process strictly adheres to the principle of "original data not leaving the domain". The encrypted local model is then updated: Or send the encrypted version directly. Uploaded to the Federal Coordinator.
[0046] Furthermore, in this embodiment, step S3, the federated coordinator, aggregates the model parameters and model update amounts from all participating domains, updates the global model parameters, and iteratively executes the steps of model distribution, local training, information uploading, and aggregation update until the global model converges. Specifically, this includes the following: the coordinator verifies all received local updates (ensuring integrity and preventing malicious nodes). The coordinator performs the aggregation operation: Among them, FedAvg core, At this point, the information fusion in the parameter space is complete, and the original data is no longer required; the updated global data... The model is then iterated through the above steps until the global model's performance on a certain validation set (either a public dataset held by the coordinator or by trusted nodes) converges and stabilizes or reaches the predetermined number of rounds. This process fully leverages the spatiotemporal knowledge inherent in distributed data.
[0047] Furthermore, in the embodiments of this application, step S4 deploys the trained global model to each participating domain, each participating domain collects local real-time power data, uses the global model to perform local inference, and obtains local prediction results. The specific steps include S401-S403: S401: In the deployment stage, the locally updated model or the latest downloaded global model is used to perform real-time or near-real-time spatiotemporal prediction.
[0048] Real-time acquisition of local multi-source power time-series data (such as voltage) Current Active power Reactive power , temperature (etc.) and device topology status. The data undergoes the same standardization process as in the training phase and is constructed into the input format required by the model, i.e., a time period of... Feature dimension is sequence matrix ( (Number of local monitoring points) and the corresponding topological adjacency matrix .
[0049] Preprocessed data and The input is fed into the deployed GAT-LSTM model, and a forward propagation computation is performed to obtain the predicted output. The model first calculates the prediction based on the adjacency matrix. The model aggregates information from the neighboring nodes of each monitoring point through an attention mechanism to generate a feature representation containing spatial dependencies. The spatial feature sequence output from the G module is then input into the LSTM unit to capture the dynamic evolution of each monitoring point over time. Finally, the model fuses the spatiotemporal features and generates the final prediction result through the output layer. .
[0050] S402: Generate prediction results based on the task type, with the output being continuous values, such as the load rate at future times. Equipment temperature The output is a probability distribution vector. ,in Number of categories (e.g., normal, warning, fault). Indicates belonging to the first The probability of a class.
[0051] S402: Based on the above prediction results, conduct a preliminary health status assessment and risk perception of key equipment or areas in this domain.
[0052] Based on power industry safety regulations and equipment operation standards, preset safety thresholds or decision rules are established for various local monitoring indicators. These rules constitute a local knowledge base: Absolute threshold rule: IF predicted load rate > 95% THEN risk level = "dangerous".
[0053] Relative rate of change rule: IF Temperature forecast rise rate in the last 5 minutes > 10℃ / min THEN Risk level = "Attention".
[0054] Probability threshold rule: IF failure probability >0.6 THEN is determined to be "faulty".
[0055] Perform automated evaluation: Analyze the predictions generated by the model. The model matches the data against the aforementioned rule base to automatically generate preliminary evaluation conclusions. For example: Input: The model predicts the top oil temperature of transformer A. .
[0056] Rule matching: According to the rule base, the oil temperature warning threshold for this type of transformer is 85℃ and the danger threshold is 95℃.
[0057] Output: Generate evaluation results {Equipment ID: Transformer A, Evaluation index: Oil temperature, Index value: 92℃, Risk level: "Warning", Recommendation: Strengthen monitoring}.
[0058] S403: Encapsulate the assessment results into a structured warning message. The message content should include at least the following fields: timestamp, device or area identifier, risk type, risk level, predicted value / probability, and confidence level.
[0059] The warning information is visualized on the local monitoring interface (e.g., marked in red on a map or highlighted in a device list). At the same time, the structured message is used as preliminary warning information and uploaded to the Federal Collaborative Warning Decision Center through a secure channel for higher-dimensional cross-domain risk fusion and decision-making.
[0060] Furthermore, in this embodiment, step S5 uploads the local prediction results to the early warning decision center. Based on the prediction results from all participating domains and global topology information, the early warning decision center performs cross-domain risk fusion and situational awareness, generates early warning information, and issues it. Specific steps include S501-S506: S501: The high-performance global Fed-GAT-LSTM model, after multiple rounds of federated training and convergence, is deployed back to each participating domain. Each local node uses the deployed global model to predict local data. ,Will (Or the early warning indicators extracted from them, such as voltage over-limit probability and overload risk value) are uploaded to the early warning decision center (which can be deployed on the federal coordinator or a reliable participant).
[0061] The early warning decision center integrates prediction results from various domains (such as the overload probability of each line and the voltage over-limit probability of each node), and combines them with global topology information of the coverage area. ,in For the global node set, For the edge set, we perform cross-domain spatiotemporal risk propagation path deduction and superposition effect analysis. This process specifically relies on the spatiotemporal knowledge base inherent in the pre-trained global Fed-GAT-LSTM model and the following algorithm: S502: The converged attention weight matrix obtained after training using the graph attention module of the global Fed-GAT-LSTM model. This serves as the weighting basis for risk propagation. The elements in this matrix... The spatial influence of node u on its neighbor node v was quantified, and its value was obtained from multi-party data through federated training to reflect the real physical coupling relationship of the power grid.
[0062] When determining the risk value of a certain node u (such as the transformer in area A). When the elevation increases, its effect on adjacent nodes in the topology graph can be derived using the following formula. Risk impact: in, It is the initial predicted risk value of node v. These are the attention weights from node u to node v. It is a configurable risk propagation attenuation factor. By traversing the edges of the graph, the propagation path and intensity of risk along the network topology can be simulated.
[0063] In an optional embodiment, the risk impact can also be simulated based on a weighted propagation of physical topology and electrical distance. Specifically, the physical topology connections of the power grid and the electrical parameters (such as impedance values) of critical lines are pre-stored in the early warning decision center. The electrical distance between nodes is calculated based on these electrical parameters; the closer the electrical distance, the stronger the mutual influence is considered. When the risk value of a node u is determined to increase, the impact weight is determined based on the reciprocal (or inverse proportional function) of its electrical distance to its neighboring node v; the closer the electrical distance, the higher the weight. This weight based on electrical distance replaces the attention weight in the original scheme, and the risk impact value on adjacent nodes is calculated according to the same deductive logic, thereby simulating the propagation of risk along the physical connection path.
[0064] In another optional embodiment, the projection of risk impact can also be propagated through fixed weights in an expert rule base. Specifically, a rule base defined by domain expert knowledge is pre-established in the early warning decision center. This rule base specifies the impact weights on various adjacent devices when different types of nodes experience risks. For example, the rule base can define the impact weight of "main transformer overload" on "directly connected transmission lines" as 0.8, and its impact weight on "other transformers on the same busbar" as 0.5. When the risk value of a node u is determined to increase, the system queries the expert rule base based on the node's device type and risk type to obtain its fixed impact weights on each adjacent node v.
[0065] S503: For stability assessments that depend on time-series changes, the time-series prediction results from multiple domains are integrated and used as input. The global Fed-GAT-LSTM model deployed in the early warning decision center is then invoked for forward inference to calculate the superposition effect. Taking the assessment of the impact of wind farm output fluctuations on tie line stability as an example: the predicted output fluctuation sequence of wind farm C is integrated. and the predicted load change sequence for region D It also populates other nodes with historical or predicted data to construct a complete global spatiotemporal input data set for the future. .Will and global topology graph The data is input into a pre-trained global Fed-GAT-LSTM model for a single forward propagation computation. The model's output is the prediction of the future system state under the combined influence of data from all domains. The focus is on the load factor and stability indicators of the tie lines to assess the combined impact risk. This method can capture the nonlinear effects caused by the interplay of multiple spatiotemporal factors.
[0066] In an optional embodiment, the superposition effect can also be calculated based on the superposition analysis of a physical simulation model. Specifically, a lightweight power system physical simulation model is deployed. Future time-based predicted data uploaded by each participating domain (such as the predicted output of wind farm C and the predicted load of region D) are used as the input boundary conditions for this simulation model. The physical simulation model is run to calculate the power flow distribution of the entire system under this scenario where multi-domain data interact. Stability indicators such as load rate and voltage of key tie lines in the simulation results are directly read to assess the impact risk generated by the superposition of multi-domain data.
[0067] In an optional embodiment, the calculation of the superposition effect can also be based on superposition analysis of historical similar scenarios. Specifically, a historical operational scenario database is maintained in the early warning decision center, which records the correspondence between data from each domain and key system indicators (such as tie-line load) under various historical operational states. After obtaining the future moment prediction data uploaded by each participating domain, the system searches the historical database for the historical scenario most similar to the current multi-domain data combination. The actual recorded load rate and stability indicators of the system's key tie-lines under these similar historical scenarios are retrieved. By performing statistical analysis on these historical indicators (such as taking the maximum value or average value), the potential impact risk on tie-line stability caused by the current multi-domain data superposition can be estimated.
[0068] S504: The early warning decision-making center calculates the comprehensive risk index based on preset rules. (Its value range is typically [0, 1] or [0, 100]) Quantitative evaluation and grading are performed. The rules include the following three strategies that can be used individually or in combination: defining a static rule base; the safety threshold is derived from national and industry standards, equipment manufacturer technical specifications, and expert experience from power grid operation departments, and is a predefined, multi-level threshold vector. .
[0069] The risk level is determined by comparing the comprehensive risk index RR with the threshold vector: Normal. (For example: )focus on: (For example: Warning: (For example: )serious: (For example: To quantify dynamic risk and address the lack of flexibility of static thresholds, this system integrates a lightweight Bayesian Network model as a dynamic risk assessor. The network's nodes include a comprehensive risk index. Real-time operation mode (such as power grid topology) ), environmental factors (such as temperature) ), Historical Fault Statistics ( )wait.
[0070] All kinds of information at the current moment ( The evidence is input into the Bayesian network, and the posterior probability of the current system being at each risk level is calculated through probabilistic reasoning. The final risk level is determined by the maximum a posteriori probability (MAP): This enables risk assessment to dynamically adapt to changes in system status, making it more accurate.
[0071] Logical reasoning is based on an expert rule base, which contains a series of IF-THEN rules defined by domain expert knowledge to handle complex logical relationships. For example: IF (Comprehensive Risk Index). AND Currently, due to the special period of ensuring power supply, THEN the risk level is raised by one level. IF Transformer A issues an early warning AND its only backup transformer B is out of service. THEN the risk level is set to "Severe". S505: The system first uses safety thresholds or dynamic risk assessment models to determine the basic level, then uses an expert rule base for correction, and finally obtains the quantitatively assessed risk level. Based on the final determined risk level, the system automatically triggers preset, hierarchical early warning signals and response plans as shown in Table 1: Table 1 Risk Level Determination and Corresponding Measures
[0072] S506: Through web interfaces, mobile apps, and other means, clearly display the location of the alert (highlighted on the global or local topology map), type, level, potential impact range, and handling suggestions to domain operators and dispatchers. Actual alert events and their handling effects are recorded and used as valuable samples for fine-tuning the next round of the federated model, continuously improving alert accuracy.
[0073] Example 3, the third embodiment of the present invention, differs from the previous two embodiments in that it also provides a power collaborative early warning system based on a federated graph spatiotemporal neural network, comprising: a federated coordination module, a local computing module, a spatiotemporal modeling core module, and a collaborative early warning decision module; the federated coordination module, as the system's central hub, manages the registration and communication of participating domains, and is responsible for the initialization, distribution, secure aggregation, and version control of the global model; the local computing module, deployed in each power participating domain, securely stores and manages local private data, executes local model updates in federated training tasks, and performs real-time data acquisition, preprocessing, and local inference based on the deployed global model; the spatiotemporal modeling core module, as the system's computing engine, integrates a graph attention network and a long short-term memory network, and is used to extract and fuse spatiotemporal features from distributed power data; the collaborative early warning decision module receives prediction results uploaded from each domain, combines global topology information for cross-domain risk fusion and situational awareness, generates hierarchical early warning information according to preset rules or dynamic evaluation models, and completes the distribution and visualization of early warnings.
[0074] This embodiment also provides an electronic device, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize a power collaborative early warning method based on federated graph spatiotemporal neural network proposed in the above embodiment.
[0075] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a power collaborative early warning method based on a federated graph spatiotemporal neural network as proposed in the above embodiment.
[0076] The storage medium proposed in this embodiment belongs to the same inventive concept as the power collaborative early warning method based on federated graph spatiotemporal neural network proposed in the above embodiment. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0077] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0078] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A power collaborative early warning method based on federated graph spatiotemporal neural network, characterized in that: This includes the federal coordinator initializing the parameters of the global graph attention long short-term memory network model and distributing them to different participating domains; Each participating domain performs local training on its local dataset, updates its local model parameters by optimizing the loss function, and securely uploads the encrypted model parameters and model update data to the federated coordinator. The federated coordinator aggregates model parameters and model update amounts from all participating domains, updates global model parameters, and iteratively executes model distribution, local training, information uploading, and aggregation update steps until the global model converges. The trained global model is then deployed to each participating domain, where each domain collects local real-time power data, uses the global model for local inference, and obtains local prediction results. These local prediction results are then uploaded to the early warning decision center. Based on the prediction results from all participating domains and global topology information, the early warning decision center performs cross-domain risk fusion and situational awareness, generates early warning information, and issues it.
2. The power collaborative early warning method based on federated graph spatiotemporal neural network as described in claim 1, characterized in that: The local training process includes iteratively adjusting model parameters using gradient descent, minimizing the mean squared error and L2 regularization term between the predicted and actual values, and obtaining local model parameters and model update amounts.
3. The power collaborative early warning method based on federated graph spatiotemporal neural network as described in claim 2, characterized in that: The update of global model parameters includes encrypting the calculated model parameters and model update amount after each participating domain completes model training locally, and uploading them to the federated coordinator through a secure communication channel. The federated coordinator receives and verifies the encrypted information uploaded by each participating domain; the federated coordinator uses a weighted average algorithm to aggregate the verified model updates and calculate the next generation of global model parameters.
4. The power collaborative early warning method based on federated graph spatiotemporal neural network as described in claim 3, characterized in that: The aggregation update includes calculating a weighted average based on the number of local samples in the participating domain and the contribution weight, wherein the contribution weight is dynamically determined through local model performance evaluation, Shapley value approximation, or reputation system, and updating the global model parameters.
5. The power collaborative early warning method based on federated graph spatiotemporal neural network as described in claim 4, characterized in that: The global model includes constructing a graph spatiotemporal neural network model by coupling a graph attention network and a long short-term memory network; and extracting time features from the time-series data of each power monitoring node by using the long short-term memory network. Spatial features are generated by aggregating information from neighboring nodes based on the power grid topology using a graph attention network. By fusing temporal and spatial features and inputting them into a fully connected network, the final prediction output is obtained.
6. The power collaborative early warning method based on federated graph spatiotemporal neural network as described in claim 5, characterized in that: The fusion of temporal and spatial features includes using the hidden state of the Long Short-Term Memory network at the final moment as the temporal feature representation of the node; using the spatial embedding calculated by the graph attention network based on the attention mechanism as the spatial feature representation of the node; performing a weighted summation of the temporal and spatial feature representations; and inputting the fused feature vector into the fully connected layer.
7. The power collaborative early warning method based on federated graph spatiotemporal neural network as described in claim 6, characterized in that: The cross-domain risk fusion and situational awareness process includes: based on the weight matrix of the graph attention module in the trained global model, inferring the propagation path and intensity of risks along the power grid topology; integrating time-series prediction results from different participating domains to construct a future-oriented global input; using the global model for forward reasoning to evaluate the superposition effect of multiple factors.
8. A power collaborative early warning system based on federated graph spatiotemporal neural network, employing the power collaborative early warning method based on federated graph spatiotemporal neural network as described in any one of claims 1 to 7, characterized in that, include: The system comprises a federated coordination module, a local computing module, a spatiotemporal modeling core module, and a collaborative early warning decision-making module. The federated coordination module, as the system's central hub, manages the registration and communication of participating domains and is responsible for the initialization, distribution, secure aggregation, and version control of the global model. The local computing module, deployed in each power participating domain, securely stores and manages local private data, executes local model updates in federated training tasks, and performs real-time data acquisition, preprocessing, and local inference based on the deployed global model. The spatiotemporal modeling core module, as the system's computing engine, integrates graph attention networks and long short-term memory networks to extract and fuse spatiotemporal features from distributed power data. The collaborative early warning decision-making module is used to receive prediction results uploaded from each domain, combine global topology information to perform cross-domain risk fusion and situational awareness, generate hierarchical early warning information according to preset rules or dynamic evaluation models, and complete the distribution and visualization of early warnings.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the power collaborative early warning method based on a federated graph spatiotemporal neural network according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the power collaborative early warning method based on a federated graph spatiotemporal neural network as described in any one of claims 1 to 7.
