Power missing data spatial-temporal correlation complementation method based on deep neural network

By constructing graph-structured data and combining it with deep neural networks, and by using a multi-head graph attention mechanism and a physical residual loss function to optimize the model, the problem that the power data completion results do not conform to physical constraints in the existing technology is solved, and high-precision and reliable power missing data completion is achieved.

CN122020001APending Publication Date: 2026-05-12XI ANDRO JUN CONSTR ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XI ANDRO JUN CONSTR ENG CO LTD
Filing Date
2026-02-05
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing spatiotemporal graph neural network models cannot effectively incorporate prior knowledge of power grid physics in power data completion, which may lead to completion results that violate power flow equations and fail to dynamically capture spatial correlations under power grid operating conditions, affecting completion accuracy and reliability.

Method used

Graph-structured data is constructed, and deep neural networks are used to initially fill in missing data using a spatiotemporal local weighted average method. Multi-head graph attention mechanism and gated recurrent units are used to capture spatiotemporal dependencies. The model is optimized by combining physical residual loss function to ensure that the completion result conforms to the physical constraints of the power grid.

Benefits of technology

It improves the physical consistency and reliability of power missing data completion, enhances the spatial modeling accuracy and generalization ability under complex operating conditions, and ensures that the completion results conform to the physical laws of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122020001A_ABST
    Figure CN122020001A_ABST
Patent Text Reader

Abstract

The invention discloses a deep neural network-based power missing data spatio-temporal correlation completion method, which comprises the following steps of: constructing graph structured data according to a power system topology, and performing preliminary filling on missing data by adopting a spatio-temporal local weighted average method; the processed data are input into a deep neural network formed by stacking a plurality of space-time processing modules, a graph attention network is embedded in each module, gating circulation units are connected in series, and a prediction data matrix containing complementation values is output; the neural network is subjected to end-to-end training by constructing a composite loss function composed of data fidelity loss and physical residual loss. According to the method, the problem that the completion result possibly violates the physical law in the prior art is effectively solved through the data and physical dual-drive optimization normal form, meanwhile, the modeling precision of the dynamic characteristics of the power grid is improved by utilizing a graph attention mechanism, and the accuracy and physical consistency of power missing data completion are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power data processing technology, and in particular to a method for completing the spatiotemporal correlation of missing power data based on deep neural networks. Background Technology

[0002] With the rapid development of smart grids, monitoring equipment such as Wide Area Measurement Systems (WAMS) and Advanced Measurement Systems (AMIs) have been widely deployed in power systems, generating massive amounts of high-dimensional power time-series data. This data is fundamental for accurate power grid state estimation, dynamic security assessment, and optimized control decisions, and its integrity is crucial. To address the widespread data gaps caused by communication failures, sensor malfunctions, and other factors, data completion techniques have emerged. Early completion methods primarily relied on statistical models, such as mean imputation and regression interpolation, but these methods struggle to capture the complex nonlinear relationships inherent in power data. In recent years, artificial intelligence technologies, represented by deep neural networks, have been introduced into this field. Recurrent Neural Networks (RNNs) can effectively handle the temporal dependencies of data, while Graph Neural Networks (GNNs) excel at utilizing the topology of the power grid to uncover spatial correlations between nodes. Combining these two methods in a spatiotemporal graph neural network model has enabled comprehensive modeling of the spatiotemporal coupling characteristics of power data, achieving significant progress in completion accuracy.

[0003] However, the aforementioned neural network model architecture still has significant limitations. First, existing spatiotemporal graph neural network models primarily treat completion as a purely statistical fitting task, essentially acting as a "black box" model, unaware of the underlying physical laws of the power grid. This leads to completion results that, while statistically excellent, may be physically inconsistent. For example, the completed voltage and power values ​​may severely violate fundamental physical constraints such as power flow equations, generating physically inconsistent pseudo-data, posing significant risks to subsequent power grid safety analysis and decision-making. Second, graph neural network-based methods typically use static adjacency matrices based on physical topology to define spatial relationships between nodes, ignoring the objective fact that the electrical coupling strength of the power grid dynamically changes with operating conditions. Since traditional fixed graph structures cannot adaptively capture such dynamically changing correlations, this also limits the spatial modeling accuracy under complex operating conditions. Therefore, how to integrate prior knowledge of power grid physics into deep learning models and accurately capture dynamic spatiotemporal correlations to ensure the physical consistency of completion results is a pressing technical challenge. Summary of the Invention

[0004] The purpose of this section is to outline some aspects of embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.

[0005] In view of the aforementioned existing problems, this invention is proposed. Therefore, this invention provides a method for completing the spatiotemporal correlation of missing power data based on deep neural networks to solve the problems mentioned in the background art.

[0006] To address the aforementioned technical problems, this invention provides the following technical solution: a method for completing spatiotemporal correlations of missing power data based on deep neural networks, comprising:

[0007] Graph structured data is constructed based on the topology of the power system, and the graph structured data includes node features extracted from the time series data of the power system;

[0008] The graph-structured data is input into a deep neural network, which is configured to fuse spatial information in the graph structure with temporal information in the time series data, and output a prediction data matrix containing missing data completion values.

[0009] A data fidelity loss and a physical residual loss are constructed and jointly optimized to train the parameters of the deep neural network, wherein the physical residual loss is used to quantify the degree of deviation of the predicted data matrix from the preset power grid physical laws.

[0010] As a preferred embodiment of the spatiotemporal correlation completion method for missing power data based on deep neural networks described in this invention, wherein: the construction of graph-structured data includes:

[0011] The missing positions in the original time series data are initially filled to form a complete input matrix. The initial filling adopts the spatiotemporal local weighted average method.

[0012] As a preferred embodiment of the spatiotemporal correlation completion method for missing power data based on deep neural networks described in this invention, the spatiotemporal local weighted average method includes:

[0013] The missing data point is calculated by weighting the values ​​of its nearest known data points in both the time and spatial dimensions.

[0014] As a preferred embodiment of the spatiotemporal correlation completion method for missing power data based on deep neural networks described in this invention, the deep neural network is composed of multiple spatiotemporal processing modules stacked together. Each spatiotemporal processing module includes a graph neural network layer for spatial dimension information fusion and a recurrent neural network layer for temporal dimension information fusion, and residual connections are used within and between modules.

[0015] As a preferred embodiment of the spatiotemporal correlation completion method for missing power data based on deep neural networks described in this invention, the method includes: fusing spatial information in the graph structure with temporal information in the time-series data, comprising:

[0016] The spatial correlation weights between nodes are dynamically calculated using a graph attention mechanism, and the node representation is updated by aggregating neighbor node information.

[0017] The updated node representation is input into the gated loop unit to capture the evolution of the node state over time.

[0018] As a preferred embodiment of the spatiotemporal correlation completion method for missing power data based on deep neural networks described in this invention, the graph attention mechanism is a multi-head graph attention mechanism. The multi-head graph attention mechanism learns the dynamic spatial correlation between nodes from different representation subspaces by setting multiple independent attention heads in parallel, and integrates the outputs of each head.

[0019] As a preferred embodiment of the spatiotemporal correlation completion method for missing power data based on deep neural networks described in this invention, the physical residual loss is constructed by:

[0020] Node voltage and phase angle information are extracted from the prediction data matrix output by the deep neural network;

[0021] The theoretical power injection value of each node is calculated by combining the preset grid node admittance matrix and the power flow equation of the power system.

[0022] The physical residual loss is obtained by comparing the theoretical power injection value with the node power injection value in the predicted data matrix.

[0023] As a preferred embodiment of the spatiotemporal correlation completion method for missing power data based on deep neural networks described in this invention, the method further includes, when constructing the physical residual loss, differential constraints based on a preset type of bus in the power system.

[0024] The physical residuals of active and reactive power of the PQ bus are constrained simultaneously.

[0025] Only the physical residual of the active power of the PV bus is constrained;

[0026] No power injection constraint is applied to the balancing bus.

[0027] As a preferred embodiment of the spatiotemporal correlation completion method for missing power data based on deep neural networks described in this invention, in the joint optimization process, the weight of the physical residual loss is a variable that is dynamically adjusted with the training process of the deep neural network, and the variable gradually increases as the training of the deep neural network proceeds.

[0028] As a preferred embodiment of the spatiotemporal correlation completion method for missing power data based on deep neural networks described in this invention, the data fidelity loss is obtained by calculating the average absolute error between the predicted data matrix and the known observations in the power system time series data.

[0029] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0030] 1. By constructing and optimizing a composite loss function that includes physical residual loss, the power flow equations of the power system are integrated as strong prior knowledge into the training process of the deep neural network. This forces the model to ensure that its output state variables such as voltage and power tend to meet the physical constraints of the power grid while learning the statistical laws of the data. This fundamentally solves the problem that traditional "black box" models may generate physically inconsistent pseudo-data, and improves the reliability and credibility of the supplementary data.

[0031] 2. In the spatiotemporal processing module, a multi-head graph attention mechanism is adopted to replace the adjacency matrix based on fixed topology in traditional methods. This mechanism can dynamically and adaptively calculate the electrical coupling strength weights between nodes according to the real-time state characteristics of the nodes themselves, thereby accurately capturing the spatial correlation of the power grid under different operating conditions and improving the model's spatial information fusion accuracy and generalization ability in complex scenarios.

[0032] 3. In the joint optimization, a dynamic adjustment strategy is adopted for the weight of the physical residual loss, realizing a smooth training paradigm of "learning the statistical laws of data first and then aligning the physical constraints". This effectively avoids gradient conflicts and instability in the early stage of training, and ultimately helps the model converge to a better solution, thereby obtaining higher data fidelity and physical fidelity. Attached Figure Description

[0033] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. 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. Wherein:

[0034] Figure 1 This is a flowchart illustrating the overall process of a method for completing spatiotemporal correlations of missing power data based on deep neural networks, as described in one embodiment of the present invention. Detailed Implementation

[0035] 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.

[0036] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0037] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0038] This invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of this invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not adhering to the usual scale. Furthermore, the schematic diagrams are merely examples and should not be construed as limiting the scope of protection of this invention. In actual fabrication, the three-dimensional spatial dimensions of length, width, and depth should be included.

[0039] Furthermore, in the description of this invention, it should be noted that the terms "upper," "lower," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used solely for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In addition, the terms "first," "second," or "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0040] Unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" in this invention should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; similarly, they can refer to mechanical connections, electrical connections, or direct connections, or indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0041] Example 1

[0042] Reference Figure 1 This is the first embodiment of the present invention, which provides a method for completing the spatiotemporal correlation of missing power data based on deep neural networks, including:

[0043] S1. Construct graph-structured data based on the topology of the power system. The graph-structured data includes node features extracted from the time-series data of the power system.

[0044] It should be noted that this step mainly involves converting the raw time-series data, which is usually in tabular form, obtained from power system monitoring equipment (such as Wide Area Measurement System (WAMS) or Advanced Measurement System (AMI), into a graph-structured data format that can be effectively processed by deep neural networks.

[0045] Furthermore, the physical network of the power system is abstracted as an undirected graph. Where V represents the set of nodes in the undirected graph, and each node... Each corresponds to a bus in the power system. Assuming there are N buses in the power system, the size of the node set is represented as... N represents the number of nodes. Based on the role of each bus in the power flow calculation, they can be pre-classified as PQ buses (injected active and reactive power are known), PV buses (injected active power and voltage amplitude are known), or slack buses. E is the set of edges in the undirected graph, representing the physical connections between buses, such as transmission lines or transformers. If the bus... With busbar If there is a direct physical connection between the nodes in the graph, then the corresponding nodes in the graph... and There is an edge between them. .

[0046] Furthermore, the structure of this undirected graph can be represented by an adjacency matrix. Let it be represented as, where if the node and If connected, then ,otherwise .

[0047] Furthermore, after constructing the graph structure, it is necessary to define the feature vector for each node in the graph at each time step. Since raw power system time-series data typically contains measurements across multiple dimensions, in this embodiment, for each node... At time step Its eigenvectors It consists of two parts: basic electrical force characteristics and time-coded characteristics.

[0048] Basic electrical force characteristics: In this embodiment, for each node At time step Extract its four basic electrical power measurements to form the core part of the feature vector: [voltage amplitude, voltage phase angle, active power injection, reactive power injection].

[0049] Time-based encoding features: To enable neural network models to perceive and learn the periodic patterns of data (such as daily load curves and weekly load patterns), discrete timestamp information is transformed into continuous and periodic feature vectors. In this embodiment, we employ sine and cosine encoding techniques for hourly information throughout the day. , transformed Two features; information about the days of the week. , transformed Two characteristics.

[0050] It should be noted that by using this time encoding technique, the periodicity of time (e.g., the 23rd hour and the 0th hour are adjacent) can be smoothly understood by the neural network model.

[0051] Furthermore, by concatenating the above four basic electrical force characteristics with four time-coded characteristics, a time-step representation can be formed. ,node 8-dimensional complete feature vector ,Right now .

[0052] Furthermore, since the original time-series data contains missing values, while the input to a deep neural network requires a complete matrix, this embodiment employs a spatiotemporal weighted average method to initially fill in the missing positions in order to provide the neural network model with an initial state that is more informative than zero-padding or global mean padding. The idea behind this method is that the most probable value for a missing point should be determined by the known points that are its temporal and spatial neighbors.

[0053] Furthermore, for a missing feature value (node In time The (features), its initial completion value Calculated in the following way:

[0054] S101. Calculate its local average value over the time dimension. That is, using the known values ​​before and after the same node:

[0055]

[0056] in, It is in time Set of nearby time points (e.g.) The effective time points in which the characteristic values ​​are known.

[0057] S102. Calculate the local average value in its spatial dimension. That is, using the known values ​​of adjacent nodes at the same time:

[0058]

[0059] in, It is at the node The set of neighboring nodes ( In time A set of nodes whose eigenvalues ​​are known.

[0060] S103. Weighted fusion of temporal and spatial local averages yields the final initial fill value:

[0061]

[0062] in, This is a preset hyperparameter, used as a balancing factor to adjust the relative importance of time and space dimensions in the initial filling. For example, a larger value can be set for physical quantities with relatively gradual changes. Emphasis is placed on temporal continuity; for physical quantities that are significantly affected by neighboring nodes, a smaller value can be set. Emphasis is placed on spatial correlation. In this embodiment, A value of 0.5 indicates that time and space information are given equal importance.

[0063] It should be noted that by calculating the initial completion value as described above, an initial guess can be provided for the neural network model. Compared with the traditional filling method without an initial guess, this can accelerate the convergence of the iterative completion process and improve the final accuracy.

[0064] Furthermore, through the above steps, a raw two-dimensional time-series data table containing missing values ​​can be transformed into a three-dimensional initial data tensor without missing values. ,in It is the length of the time series.

[0065] Furthermore, to improve the stability and convergence speed of deep neural network model training, we performed a normalization process on this tensor. In this embodiment, the normalization process mainly adopts Z-score normalization, applying it to each feature dimension. Performed separately:

[0066]

[0067] in, and They are the first The mean and standard deviation of each feature dimension are calculated. It is important to note that these two statistics (mean and standard deviation) are calculated using only known observations from the original data to avoid bias from initial imputation values ​​that could obscure the overall statistical characteristics of the data distribution. Furthermore, the calculated... and It will be saved so that it can be denormalized after the model outputs the final result, restoring it to the original data scale.

[0068] It should be noted that after step S1 is completed, its output is a standardized complete data tensor. And graph adjacency matrix This will be used as the input to the deep neural network in the subsequent step S2.

[0069] S2. Input the graph-structured data into a deep neural network, which is configured to fuse spatial information in the graph structure with temporal information in the time series data, and output a prediction data matrix containing missing data completion values.

[0070] It should be noted that this step primarily utilizes a deep neural network model architecture. This architecture can receive the graph-structured data generated in step S1 and effectively learn the complex spatiotemporal dependencies embedded within it, thereby estimating and completing missing data points. This deep neural network model architecture is composed of multiple stacked spatiotemporal processing modules to achieve in-depth mining of spatiotemporal correlations.

[0071] Furthermore, this deep neural network model is composed of It consists of stacked identical spatiotemporal processing modules. This stacked structure allows the model to learn spatiotemporal patterns from local to global and from simple to complex at different levels. Each spatiotemporal processing module is composed of a graph neural network layer for spatial dimensional information fusion and a recurrent neural network layer for temporal dimensional information fusion, all connected in series.

[0072] Specifically, in this embodiment, the deep neural network is composed of... It consists of stacked identical spatiotemporal processing modules. The dimension of the network hidden layer. The value is set to 64. The graph neural network layer uses a multi-head graph attention network (GAT), which has a certain number of attention heads. The recurrent neural network layer uses gated recurrent units (GRUs).

[0073] Furthermore, to alleviate the vanishing gradient problem during the training process of deep neural networks and to promote cross-layer information flow, this invention employs residual connections both within each spatiotemporal processing module and between modules. That is, the output of a module is the sum of its input and the result after spatiotemporal transformation.

[0074] Specifically, let the first The input to each spatiotemporal processing module is (in, That is, the output of step S1. ), its output The calculation process can be summarized as follows:

[0075]

[0076] in, It is the dimension of the network's hidden layer.

[0077] In addition, unlike traditional GNNs which use a fixed adjacency matrix, this invention also employs a graph attention mechanism to dynamically learn the spatial correlation weights between nodes, in order to solve the problem that static graph structures cannot adapt to the dynamic operating conditions of the power grid.

[0078] Furthermore, for each node in the graph Its attention mechanism aims to compute all its neighbor nodes. Its importance. The process is as follows:

[0079] S201. First, through a shared linear transformation (the weight matrix is...) This maps the features of all nodes to a new representation space. Then, for node pairs... Its attention coefficient Through an attention function calculate:

[0080]

[0081] in, and These are nodes and At time step The input feature vector. In this embodiment, the attention function It is a single-layer feedforward neural network that uses LeakyReLU as the activation function.

[0082] S202. To make the attention coefficients between different nodes comparable, this invention uses the Softmax function to evaluate the attention coefficients of the nodes. Normalize the attention coefficients of all neighbors:

[0083]

[0084] in, That is, at the time step ,node For nodes The dynamic attention weights of the node. These weights reflect the node's attention level at the current moment. The state of the node The degree of influence is determined, and it should be noted that this weight is dynamically calculated based on the node's own characteristics, rather than being fixed.

[0085] S203, Node The updated feature representation is a weighted sum of the features of all its neighboring nodes:

[0086]

[0087] in, It is a non-linear activation function (e.g., ReLU).

[0088] Furthermore, to make the attention learning process more stable and capture richer features, this embodiment employs a multi-head attention mechanism. This mechanism executes in parallel. Each independent attention operation (i.e., possessing) Different weight matrices and attention function Then, they integrate their outputs. This is equivalent to letting the model... The process of learning spatial correlation in different "representation subspaces" can be represented as follows:

[0089]

[0090] Alternatively, at the output layer, an averaging approach is typically used for integration:

[0091]

[0092] It should be noted that by adopting a multi-head attention mechanism, the GAT layer can adaptively assign different neighbor weights to each node, thereby accurately capturing the electrical coupling strength of the power system as the operating conditions change, which greatly enhances the effectiveness and expressive power of spatial information fusion.

[0093] Furthermore, after the GAT layer extracts spatial features, the resulting feature tensor is input into the GRU layer to capture the evolution of each node's state over time. It's important to note that GRU is a variant of RNN, primarily using a gating mechanism to address the vanishing gradient problem in long training sequences. For each node... Its time step The GRU calculation process is as follows:

[0094] Update Gate : Determines the extent to which past information should be presented ( Retain the current state:

[0095]

[0096] Reset door This determines the extent to which past information should be ignored.

[0097]

[0098] Candidate hidden state Calculate the candidate information at the current time step:

[0099]

[0100] Final output hidden state Combine the update gates, integrating historical information and current candidate information:

[0101]

[0102] in, and They are all learnable parameter matrices. They are all bias vectors. It is the Sigmoid function. This represents element-wise product.

[0103] It should be noted that, through the GRU layer, the neural network model can effectively learn and memorize the long-term dependencies and dynamic patterns of power data over time.

[0104] Furthermore, after After stacking and processing by the spatiotemporal processing modules, the final hidden representation tensor can be obtained. At the same time, in order to obtain the final completed prediction value, this high-dimensional hidden representation needs to be mapped back to the original data feature space.

[0105] Specifically, this mapping process is implemented through two fully connected layers. The first fully connected layer maps the dimensions from... The first layer maps the dimension to an intermediate dimension (e.g., 128) and uses the ReLU activation function; the second fully connected layer then maps the dimension back from 128 to the original feature dimension. :

[0106]

[0107] in, This is the predicted data matrix that includes the imputed values ​​for missing data. It is important to emphasize that this matrix is ​​standardized, and it needs to be destandardized using the mean and standard deviation saved in step S1 before application.

[0108] S3. Construct and jointly optimize a data fidelity loss and a physical residual loss to train the parameters of the deep neural network. The physical residual loss is used to quantify the degree of deviation of the predicted data matrix from the preset power grid physical laws.

[0109] It should be noted that the task of this step is to guide the parameter optimization process of the deep neural network in step S2 using a composite loss function. The design of this composite loss function must not only ensure that the output of the neural network model is accurate on known data points, but also use the physical laws of the power grid as strong prior knowledge to constrain the model's prediction of unknown (missing) data points, so that the final completion result is consistent in both data and physical dimensions.

[0110] Furthermore, in each training iteration of the model, we set the total loss of the model. Loss due to data fidelity and physical residual loss Weighted composition. The advantage of this "data + physics" dual-driven optimization paradigm is its compatibility with Physics-Informed Neural Networks (PINN). The overall loss function is defined as follows:

[0111]

[0112] in, It is the data fidelity loss term, used to measure the difference between the model's predicted values ​​and the actual observed values. It is the physical residual loss term, used to quantify the degree to which the power grid state variables predicted by the model violate physical laws (i.e., power flow equations). It is a hyperparameter that serves as a weight for the physical residual loss, used to balance the relative importance of the two loss terms during model training.

[0113] Furthermore, since the data fidelity loss term ensures that the model can learn from existing, reliable observation data, its calculation only applies to those points in the original data whose values ​​are known to exist, ignoring the locations of missing data. Therefore, in this embodiment, the data fidelity loss term is calculated using Mean Absolute Error (MAE).

[0114]

[0115] in, It is the predicted data matrix output by the neural network in step S2 (assuming it has been denormalized). It is the raw power system time series data containing missing values. It is a with A mask matrix of the same dimension is used to indicate the location of known data. If the original data... If it exists (not missing), then If missing, then . This represents the total number of elements that are 1 in the mask matrix, i.e., the total number of known data points.

[0116] It should be noted that the choice of MAE instead of the traditional Mean Squared Error (MSE) is based on considerations of actual power system data. Power monitoring data often contains outliers due to measurement noise, transient disturbances, and other factors. MSE, by squaring the error, amplifies the impact of outliers, causing the model to overemphasize these anomalies and impair overall fitting performance. MAE, on the other hand, assigns equal weights to all errors, thus exhibiting greater robustness to outliers, resulting in a more stable model training process and the learning of more universally applicable data distribution patterns.

[0117] Furthermore, the physical residual loss term is crucial for achieving physical self-consistency in the completion result of this invention. This term primarily treats the neural network output as a power grid state solution to be verified and calculates the extent to which this solution satisfies the power flow equations. The process is as follows:

[0118] S301. Extract state variables from the prediction data matrix.

[0119] Specifically, for the predicted data matrix output in step S2... Each time step in Extract all nodes voltage amplitude prediction and voltage phase angle prediction value .

[0120] S302. Calculate the theoretical power injection value based on the power flow equation.

[0121] Specifically, this involves combining the pre-known node admittance matrices that characterize the fixed topology and line parameters of the power grid. Based on the power flow equations in power system steady-state analysis, the voltage state predicted by the neural network is calculated. Below, each node Theoretical active power injection and reactive power injection Let the elements of the nodal admittance matrix be... ,in It is mutual conductance. It is mutual susceptance. The formula for calculating the theoretical power injection value is as follows:

[0122]

[0123]

[0124] S303, Calculate the physical residuals and construct the loss function. Then, use the theoretical power injection values ​​obtained from the above calculations. Power injection value directly predicted by neural network (same from) The results are compared (extracted from the original data). The difference between the two is the physical residual, which represents the degree to which the predicted result deviates from the physical laws.

[0125] Furthermore, the present invention applies differentiated constraints on physical residual losses based on the preset type of bus in the power system (PQ, PV, balancing bus), thereby making the physical constraints more targeted and in line with the actual operating rules of the power grid.

[0126] Specifically, for the PQ bus (assuming the set is...) For this type of bus, both the active power P and reactive power Q are known control variables. Therefore, for this type of bus, it is necessary to simultaneously constrain the physical residuals of its active and reactive power. For PV buses (assuming the set is...), For this type of bus, the active power P and voltage amplitude |V| are known control variables, while its reactive power Q is the output variable that varies to maintain the voltage. Therefore, only the physical residual of its active power is constrained. For the balancing bus, which serves as the power balance point of the system, both P and Q are unknown, and power injection constraints should not be imposed on it. Considering the above, we define the physical residual loss as... Defined as the mean square error of the relevant physical residuals across all time steps and all unbalanced buses, it is expressed as:

[0127]

[0128] It should be noted that through this physical residual loss term, the model is forced to find a solution that not only fits the observed data but also satisfies the power flow equation during the optimization process. This makes the neural network model's "inference" about missing data no longer a guess but a reasonable extrapolation guided by physical laws.

[0129] Furthermore, by combining the two loss terms mentioned above, the backpropagation algorithm and gradient descent optimizer (Adam in this embodiment) can be used to optimize all learnable parameters (denoted as ) of the neural network in step S2. End-to-end training was performed, and the following results were obtained:

[0130]

[0131] Furthermore, in this embodiment, the training process of the neural network model is as follows:

[0132] The time-series data with missing values ​​were divided chronologically into a training set (first 70%), a validation set (middle 10%), and a test set (last 20%). The mask matrix was then... Perform the same partitioning operation.

[0133] Using the Adam optimizer to optimize model parameters Optimize by setting the learning rate to 0.001. , .

[0134] Training is performed in batches; in this embodiment, the batch size is set to 32. The neural network model is trained on the training set, and after each round, the total loss is calculated on the validation set. .

[0135] In addition, an early stopping strategy is employed to prevent overfitting. If the loss on the validation set no longer decreases after 10 consecutive epochs, training is stopped, and the model parameters with the minimum validation set loss are saved as the final model. The total number of training epochs is capped at 200.

[0136] It should be noted that, in this invention, the weight of the physical residual loss... It is not a fixed value, but a variable that is dynamically adjusted as the training process progresses.

[0137] Specifically, this variable gradually increases as the model training progresses. In the early stages of training, the neural network parameters are randomly initialized, and its output completely disregards physical laws. The values ​​are huge and their gradient directions may be filled with noise; if excessive weights are given... This will severely interfere with the model's learning of basic data patterns, leading to training instability. Therefore, in the early stages of training, a relatively small [target value] should be set. (It can even be set to 0), allowing the model to pass preferentially. The model learns the statistical distribution of the data so that its output initially approximates the true observations numerically. As training progresses, the model's output gradually becomes more reasonable, at which point the value is gradually increased. This will introduce stronger physical constraints into the optimization objective, guiding the model to further fine-tune its parameters based on the learned data patterns, so that the entire prediction result (including missing parts) tends to satisfy the power flow equation. Specifically, in this embodiment, the... The adjustment process can be achieved using linear preheating:

[0138]

[0139] in, It is the first The weights of the physical residual loss for each training round. It is the maximum weight of the preset physical residual loss. This is the current training round. This is the preset number of preheating cycles. In this embodiment, the preset maximum weight of the physical residual is... The value is 0.1, and the number of preheating cycles is [missing value]. It consists of 50 rounds.

[0140] It should be noted that by adopting the strategy of "learning data first and then aligning physics" as described above, the stability of the model during training and the physical fidelity of the power data completion results can be greatly improved.

[0141] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0142] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0143] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0144] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0145] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0146] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for completing spatiotemporal correlation of missing power data based on deep neural networks, characterized in that, include: Graph structured data is constructed based on the topology of the power system, and the graph structured data includes node features extracted from the time series data of the power system; The graph-structured data is input into a deep neural network, which is configured to fuse spatial information in the graph structure with temporal information in the time series data, and output a prediction data matrix containing missing data completion values. A data fidelity loss and a physical residual loss are constructed and jointly optimized to train the parameters of the deep neural network, wherein the physical residual loss is used to quantify the degree of deviation of the predicted data matrix from the preset power grid physical laws.

2. The method for completing spatiotemporal correlation of missing power data based on deep neural networks as described in claim 1, characterized in that, The constructed graph structured data includes: The missing positions in the original time series data are initially filled to form a complete input matrix. The initial filling adopts the spatiotemporal local weighted average method.

3. The method for completing spatiotemporal correlation of missing power data based on deep neural networks as described in claim 2, characterized in that, The spatiotemporal local weighted average method includes: The missing data point is calculated by weighting the values ​​of its nearest known data points in both the time and spatial dimensions.

4. The method for completing spatiotemporal correlation of missing power data based on deep neural networks as described in claim 1, characterized in that, The deep neural network is composed of multiple spatiotemporal processing modules stacked together. Each spatiotemporal processing module includes a graph neural network layer for spatial dimension information fusion and a recurrent neural network layer for temporal dimension information fusion, and residual connections are used within and between modules.

5. The method for completing spatiotemporal correlation of missing power data based on deep neural networks as described in claim 1, characterized in that, The fusion of spatial information in the graph structure and temporal information in the time series data includes: The spatial correlation weights between nodes are dynamically calculated using a graph attention mechanism, and the node representation is updated by aggregating neighbor node information. The updated node representation is input into the gated loop unit to capture the evolution of the node state over time.

6. The method for completing spatiotemporal correlation of missing power data based on deep neural networks as described in claim 5, characterized in that, The graph attention mechanism is a multi-head graph attention mechanism, which learns the dynamic spatial correlation between nodes from different representation subspaces by setting up multiple independent attention heads in parallel, and integrates the outputs of each head.

7. The method for completing spatiotemporal correlation of missing power data based on deep neural networks as described in claim 1, characterized in that, Constructing the physical residual loss includes: Node voltage and phase angle information are extracted from the prediction data matrix output by the deep neural network; The theoretical power injection value of each node is calculated by combining the preset grid node admittance matrix and the power flow equation of the power system. The physical residual loss is obtained by comparing the theoretical power injection value with the node power injection value in the predicted data matrix.

8. The method for completing spatiotemporal correlation of missing power data based on deep neural networks as described in claim 7, characterized in that, The construction of the physical residual loss also includes differential constraints based on preset bus types in the power system: The physical residuals of active and reactive power of the PQ bus are constrained simultaneously. Only the physical residual of the active power of the PV bus is constrained; No power injection constraint is applied to the balancing bus.

9. The method for completing spatiotemporal correlation of missing power data based on deep neural networks as described in claim 1, characterized in that, In the joint optimization process, the weight of the physical residual loss is a variable that is dynamically adjusted as the deep neural network training progresses, and the variable gradually increases as the deep neural network training proceeds.

10. The method for completing spatiotemporal correlation of missing power data based on deep neural networks as described in claim 1, characterized in that, The data fidelity loss is obtained by calculating the average absolute error between the predicted data matrix and the known observations in the power system time series data.