Spatiotemporal graph node classification method and device based on temporal aggregation

Through a spatiotemporal graph node classification method based on temporal aggregation, using a hybrid filtered graph convolutional neural network and a self-attention mechanism, the accuracy and efficiency issues of node disturbance classification under power grid faults are solved, and fast and accurate classification of power grid fault responses is achieved.

CN116310567BActive Publication Date: 2025-10-03INST OF SOFTWARE - CHINESE ACAD OF SCI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310289877.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-23
Publication Date
2025-10-03
Estimated Expiration
2043-03-23

AI Technical Summary

Technical Problem

Existing model-driven algorithms are difficult to accurately reflect the actual situation of node disturbances under power grid faults, and lack methods for node classification in spatiotemporal graphs, resulting in inaccurate fault classification and untimely response.

Method used

A spatiotemporal graph node classification method based on temporal aggregation is adopted. Through a hybrid filtered graph convolutional neural network combined with a self-attention mechanism, the grid node data is spatiotemporally fused and classified to generate an accurate representation of the degree of node impact.

Benefits of technology

It enables rapid and accurate classification of the degree of impact on nodes after a power grid failure, and guides control personnel to formulate effective measures to reduce failure losses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116310567B_ABST
    Figure CN116310567B_ABST
Patent Text Reader

Abstract

The present invention relates to a spatiotemporal graph node classification method and device based on temporal aggregation. The method comprises: for a power grid where a fault occurs, collecting power grid node data generated at several moments after the fault occurs; generating a static graph at each moment based on the power grid node data; sending the static graph to a graph convolutional neural network based on hybrid filtering, and using two fully connected layers for the interaction of nodes in the power grid to obtain a vector representation of the power grid node at that moment; wherein each layer in the graph convolutional neural network based on hybrid filtering includes a low-pass filter, a high-pass filter, and a self-aggregation filter; fusing and classifying the vector representations of the power grid nodes at each moment to obtain the degree of influence of the power grid nodes after the fault occurs. The present invention can quickly and accurately classify the nodes in the power grid according to the degree of influence of the nodes, thereby assisting relevant personnel to formulate measures in a timely manner to reduce the impact of the fault.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of graph data mining, and specifically relates to a spatiotemporal graph node classification method and device based on temporal aggregation. Background Art

[0002] When a fault occurs somewhere in the power grid, nodes can be divided into four categories based on the degree to which they are affected by the disturbance: severely disturbed, relatively severely disturbed, generally disturbed, and slightly disturbed. This allows control personnel to prioritize areas with relatively severe impact after each fault. Due to the complex spatial distribution of parameters in actual power grids and the presence of numerous uncertain interferences, it is difficult to obtain an analytical solution to the power grid fault propagation equation. Existing model-driven algorithms mostly make simplifications and assumptions, making it difficult for model analysis results to accurately reflect the actual situation of power grid nodes affected by the fault. However, with the development of artificial intelligence technology, data-driven methods are being effectively used to classify the degree to which power grid nodes are affected by the disturbance under fault conditions, guiding relevant personnel to more efficiently respond to power grid faults.

[0003] In recent years, with the continuous maturity of graph neural network technology, it has achieved excellent performance in various scenarios. Because the power grid itself is a natural graph, its connections implicitly contain a large number of inter-node dependencies. At the same time, data over a period of time is often more representative of the state of grid nodes than a single moment. Therefore, this is abstracted into a spatiotemporal graph. Through graph data mining and comprehensive analysis from both temporal and spatial dimensions, the mapping relationship between sample features and node disturbance severity categories is learned. This allows for rapid classification of disturbance severity across the entire network when a fault occurs, guiding control personnel to implement timely measures to minimize the losses caused by the fault.

[0004] Compared to general networks, the problem of classifying the degree of disturbance of power grid nodes under fault conditions presents three key characteristics: 1) Node attributes change over time, exhibiting strong correlations due to mechanisms, and connections rarely change; 2) Node categories change steadily over time; and 3) The task is time-sensitive, requiring algorithms to execute as quickly as possible. This poses significant challenges to graph node classification methods. Current work on graph node classification has primarily focused on static and dynamic graphs. Static graphs focus on studying graph convolution mechanisms, while dynamic graphs focus on modeling the temporal evolution of graphs. Currently, there are no methods specifically designed for node classification in spatiotemporal graphs. Summary of the Invention

[0005] To address the problem of classifying the degree of node disturbance in power grid failure scenarios, the present invention provides a spatiotemporal graph node classification method based on temporal aggregation. This method can quickly and accurately classify nodes in the power grid according to the degree of impact based on data over a period of time after a failure occurs during power grid operation, thereby assisting relevant personnel in formulating measures in a timely manner to reduce the impact of the failure.

[0006] The technical contents of the present invention include:

[0007] A spatiotemporal graph node classification method based on temporal aggregation, the method comprising:

[0008] For a faulty power grid, collect the grid node data generated at several moments after the fault occurs;

[0009] generating a static graph at each moment according to the grid node data;

[0010] The static graph is fed into a graph convolutional neural network based on hybrid filtering, and is used for the interaction of nodes in the power grid through two fully connected layers to obtain a vector representation of the power grid node at that moment; wherein each layer of the graph convolutional neural network based on hybrid filtering includes a low-pass filter, a high-pass filter, and a self-aggregation filter;

[0011] The vector representations of the power grid nodes at each moment are fused and classified to obtain the degree of impact on the power grid nodes after the fault occurs.

[0012] Furthermore, before generating the static graph at each moment according to the grid node data, the method further includes:

[0013] The node voltage vector trajectory corresponding to the grid node data is rotated so that the initial phase angle mean values ​​of all grid nodes are consistent.

[0014] Furthermore, the static graph is fed into a graph convolutional neural network based on hybrid filtering, and two fully connected layers are used to interact with the node information in the power grid to obtain the vector representation of each power grid node at that moment, including:

[0015] The MLP layer is used to map the characteristics of the grid node data of node i to the high-dimensional space to obtain

[0016] Adopting the idea of ​​hybrid filtering, using and the node representation of node i at layer l-1 Update the node representation to get

[0017] The node representation output by the last layer of the graph neural network is mapped to the target dimensional space through the MLP layer;

[0018] The representations of all nodes are passed through two n×n fully connected layers to exchange information between nodes; where n represents the number of nodes in the power grid.

[0019] Furthermore, the characteristics of the power grid node data include: voltage amplitude, phase angle, real part, imaginary part; generator active and reactive power; load active and reactive power; the change in voltage amplitude, phase angle, real part, imaginary part relative to the previous moment and the Euclidean distance of the voltage trajectory at the current moment relative to the previous moment.

[0020] Furthermore, the idea of ​​adopting hybrid filtering is to use and the node representation of node i at layer l-1 Update the node representation to get include:

[0021] Based on the low-pass filter F low The weight assigned to the neighbor node j of the central node i Get the updated representation of node i Among them, the structural weight λ Ak =1-λ k ,λ k is the normalized adjacency matrix D -1 / 2 AD -1 / 2 The kth eigenvalue of ki and u kj Respectively represent the corresponding k-th eigenvector u k The i-th and j-th components of , D and A are the degree matrix and adjacency matrix of the static graph respectively, γ is a hyperparameter, ⊙ represents element-wise operation, attribute weight a is the learnable parameter vector;

[0022] Based on the high-pass filter F high The weight assigned to the neighbor node j of the central node i Get the updated representation of node i Among them, the structural weight

[0023] Based on the self-aggregation filter F self The weight assigned by the central node i to itself Get the updated representation of node i Among them, the structural weight The values ​​are taken from the normalized adjacency matrix The value of the corresponding position, where For the adjacency matrix with self-loops added, is the corresponding degree matrix, attribute weight The construction is similar to that of low-pass / high-pass filters, that is,

[0024] Connect the nodes represented by X (0) ,express express and express Get node representation

[0025] Furthermore, the vector representations are fused and classified to obtain the degree of impact of the grid nodes after the fault occurs, including:

[0026] Load the model trained in the static graph, freeze the parameters of the previous layers and retrain the last layer;

[0027] For the vector representation of the power grid node at each moment, the updated representation X of the power grid node is obtained through the self-attention mechanism new ;

[0028] Will update representation X new The final representation of the grid node is obtained by mapping it to B dimensions through linear transformation and mapping the time dimension to one dimension through linear transformation; wherein B represents the number of levels in the degree of impact;

[0029] The final representation is classified to obtain the degree of influence of the grid node after the fault occurs.

[0030] A spatiotemporal graph node classification device based on temporal aggregation, the device comprising:

[0031] A collection module is used to collect grid node data generated at several moments after the fault occurs in the faulty grid;

[0032] A construction module, configured to generate a static graph at each moment based on the grid node data;

[0033] a computing module, configured to feed the static graph into a graph convolutional neural network based on hybrid filtering, and to interact with node information in the power grid through two fully connected layers to obtain a vector representation of the power grid node at that moment; wherein each layer of the graph convolutional neural network based on hybrid filtering includes a low-pass filter, a high-pass filter, and a self-aggregation filter;

[0034] The classification module is used to fuse and classify the vector representations of the power grid nodes at each moment to obtain the degree of impact on the power grid nodes after a fault occurs.

[0035] Furthermore, the device further comprises: a training module;

[0036] The training module is used to train a node classification pre-training model under a static graph based on cross entropy loss, intra-class distance loss and inter-class distance loss.

[0037] An electronic device, characterized in that the electronic device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, any of the above methods is implemented.

[0038] A computer-readable storage medium, characterized in that computer program instructions are stored on the computer-readable storage medium, and when the computer program instructions are executed by a processor, any of the above methods is implemented.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] This paper first presents principles for data set collection and annotation, dividing it into training, validation, and test sets for model training. It then proposes preprocessing measures to reduce sample variance. Furthermore, a scheme for abstracting the power grid into a graph is presented, including node feature extraction and node connectivity extraction. To ensure algorithm execution efficiency and achieve high classification accuracy while minimizing the number of training samples, the paper proposes splitting the spatiotemporal graph into multiple temporally corresponding static graphs for fusion, targeting the characteristics of the grid node disturbance level classification problem. A hybrid filtering-based graph convolutional neural network (HFGCN) is proposed to address the problem of mixed homogeneity and heterogeneity of nodes in the graph. Based on this, a pretraining model for a single time slice is proposed, and finally, a temporal aggregation mechanism is proposed for fusion. This paper balances accuracy and execution efficiency when classifying the disturbance level of grid nodes under fault conditions, meeting the practical engineering needs of grid fault scenarios. The results obtained can help guide power system operators in formulating timely emergency response strategies. This spatiotemporal graph node classification method based on temporal aggregation is simple and practical, and can effectively and quickly classify the impact of nodes in real time after a grid fault occurs, which is of great significance for rapid post-fault response and preventing further losses. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 This is a flow chart of a spatiotemporal graph node classification algorithm based on temporal aggregation of the present invention.

[0042] Figure 2 It is the IEEE 39-node standard system topology diagram.

[0043] Figure 3 It is the overall framework of the graph convolutional neural network based on hybrid filtering in this invention.

[0044] Figure 4 It is the overall framework of the pre-training model under a single time slice of the present invention.

[0045] Figure 5 It is the overall framework of the temporal aggregation mechanism of the present invention. DETAILED DESCRIPTION

[0046] The following will clearly and completely describe the technical solutions of the present invention in conjunction with the embodiments and drawings. It will be understood that the embodiments described are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.

[0047] The present invention is a spatiotemporal graph node classification method based on temporal aggregation, such as Figure 1 As shown, the following steps are included:

[0048] Step 1. Collect the dataset for neural network training.

[0049] Collect multiple sets of data over a period of time (e.g., 10 time steps) following a fault. Have power system professionals label all nodes in each sample set according to their degree of impact into one of four categories: severely disturbed, moderately disturbed, moderately disturbed, and slightly disturbed, using one-hot encoding. To ensure model effectiveness, the collected samples should cover as many fault scenarios as possible across all areas of the power grid. Divide the samples into training, validation, and test sets in a 60% / 20% / 20% ratio.

[0050] In one example, the IEEE 39-node standard system is used as an example, and its topology is as follows: Figure 2 As shown in the figure, a node short-circuit fault is used as an example. In the IEEE 39-node system standard calculation example, since the resistance between nodes 2 and 30 is zero, only inductance exists. A sudden short circuit between these two points will cause severe power grid anomalies. Therefore, node short-circuit faults are introduced to the remaining 37 nodes, generating 37 sets of fault data. For each fault set, 10 segments of post-fault data are captured at different times, each containing 10 time slices, resulting in 370 sets of fault samples. Under the guidance of power system professionals, the 39 nodes in each set are labeled according to their degree of impact into four categories: severely disturbed, moderately disturbed, moderately disturbed, and slightly disturbed, and represented using one-hot encoding. The 370 sets of fault samples are divided into training, validation, and test sets with a 60% (230 sets), 20% (70 sets), and 20% (70 sets) split. To ensure that the model covers samples in various situations, the training set, validation set, and test set are selected as evenly as possible. At the same time, to ensure the effectiveness of the algorithm in real scenarios, the 10 groups of samples under each group of faults only appear in one of the sets at the same time.

[0051] Step 2. Rotate the node voltage vector trajectories corresponding to all samples so that the average phase angle of all nodes at the initial moment is 0, so as to eliminate the differences between different samples as much as possible.

[0052] Step 3. For each sample and each node at each moment, 13 relevant features are extracted: voltage amplitude, phase angle, real part, and imaginary part; generator active and reactive power; load active and reactive power; change in voltage amplitude, phase angle, real part, and imaginary part relative to the previous moment; and the Euclidean distance of the voltage trajectory between the current moment and the previous moment. All features are normalized to eliminate the effects of dimension. For node connections, only connections are extracted: if they are connected, the corresponding position in the adjacency matrix is ​​set to 1, otherwise it is set to 0. Using this method, the power grid is abstracted into an undirected, unweighted graph. The input dimension for each fault sample is time step × number of nodes × 13, and the target dimension is number of nodes × 4. The second dimension represents the probability of the node belonging to each category.

[0053] That is, in the above example, the input dimension of each fault sample is 10×39×13, the target dimension is 39×4, and the second dimension represents the probability that the node belongs to each category.

[0054] Step 4. Split the spatiotemporal graph into a fusion of static graphs corresponding to multiple moments, first extracting structural information, and then aggregating from the time dimension. For the static graph corresponding to each moment, first assume that the sequence label is the label of a single moment, that is, the label of each node at each moment is annotated with the label of the node over a period of time. In this way, we can obtain a sample number × time step group sample to build a pre-trained model for a single time slice to extract as much structural information as possible. The specific steps are as follows:

[0055] Step 4.1. To address the problem of mixed homogeneous and heterogeneous nodes in the power grid, a graph convolutional neural network HFGCN based on hybrid filtering is constructed. Its overall framework is as follows: Figure 3 As shown. In each HFGCN layer, there are three filters, namely low-pass filter, high-pass filter and self-aggregation filter. Each filter contains two parts: structure weight distribution matrix and attribute structure distribution matrix. The structure weight distribution matrix is ​​defined from the graph domain, and the attribute structure distribution matrix is ​​defined in a similar way to attention. Finally, the outputs of the three parts are summed to achieve the purpose of adaptively assigning weights to the three filters by the nodes. In order to ensure the robustness and stability of the model, a jump connection mechanism is introduced. The input of each layer not only contains the output of the previous layer, but also the original representation of the node, which is controlled by the hyperparameter ε. The overall architecture of HFGCN is:

[0056] X (l) =εX (0) +(F low +F high +F self )X (l-1) ,l=1,…,L

[0057] Where L is the total number of hidden layers.

[0058] Specifically, in the low-pass filter and high-pass filter, the structure weight distribution matrix S and the attribute weight distribution matrix C are defined respectively, and the two are fused to obtain the final weight distribution matrix under each filter.

[0059] a) Structural weight distribution matrix S

[0060] For a graph with n nodes, the normalized graph Laplacian matrix L is decomposed to obtain n eigenvalues ​​u1,u2,…,u n and n eigenvectors λ1,λ2,…,λ n , and the eigenvectors corresponding to different eigenvalues ​​are orthogonal to each other, so the spectral decomposition of L can be recorded as L = UΛU T , where U=(u1,u2,…,u n ) contains n orthogonal eigenvectors, Is a diagonal matrix. For the signal x∈R n , given the spectral filter g θ =diag(θ), the spectral convolution on the graph can be defined as:

[0061] g θ *x=Ug θ U T x

[0062] In the graph Fourier transform, since U is an orthogonal matrix, and g θ It is usually a diagonal matrix. The spectral convolution on the graph can be further expressed as:

[0063]

[0064] in, It can be regarded as a set of basis filters, α i is the corresponding coefficient.

[0065] In the graph spectral domain, eigenvalues ​​describe the smoothness of a graph signal and can be understood as frequencies. Basis filters corresponding to smaller eigenvalues ​​can be considered low-pass filters, resulting in smoother node representations; basis filters corresponding to larger eigenvalues ​​can be considered high-pass filters, resulting in less smooth node representations.

[0066] According to the properties of Fourier transform of graph, Where I is the identity matrix, A is the adjacency matrix, and D is the degree matrix, which is a diagonal matrix and satisfies We can further obtain D -1 / 2 AD -1 / 2 =I-UΛU T=U(I-Λ)U T Let λ A =1-λ,λ A is the normalized adjacency matrix D -1 / 2 AD -1 / 2 The eigenvector of A The frequency response function of is used to adjust the weights of filters in different frequency bands, and the structural weight distribution matrix S in the corresponding low-pass filter and high-pass filter is obtained respectively.

[0067] For low-pass filters, increase the weight of the low-pass base filter and decrease the weight of the high-pass base filter. The corresponding frequency response function is defined as:

[0068]

[0069] Similarly, for the high-pass filter, increase the weight of the high-pass base filter and decrease the weight of the low-pass base filter. The corresponding frequency response function is defined as:

[0070]

[0071] In both filters, γ is a hyperparameter and has the same value.

[0072] b) Attribute weight distribution matrix C

[0073] The present invention further defines an attribute weight distribution matrix C from the perspective of node attributes, which is used in combination with the structure weight distribution matrix S.

[0074] Here, the present invention adopts a method similar to the Attention mechanism to learn the relative importance of all neighboring nodes of a node. Specifically, for the central node i, the attention coefficient assigned to its neighbor node j is defined as:

[0075] C ij =sigmoid <a,X i ||X j >

[0076] Among them, a is the learnable parameter vector, X i and X j are the representations of the central node i and the neighbor node j respectively.

[0077] In order to avoid introducing too much noise, the neighbor nodes of a node are constrained to be within the third order or less. Here, the present invention only constrains the value range of each attention coefficient to (0, 1), but does not perform normalization, that is, the sum of the attention coefficients of all neighbor nodes is not constrained to 1.

[0078] c) Fusion

[0079] Finally, each corresponding filter F is obtained by fusing the node weight assignment matrix S and the attribute weight assignment matrix C. Specifically, element-wise operations are performed on these two matrices, that is, F = S⊙C.

[0080] In this way, the differences within the attribute weight distribution matrix of each filter reflect the differences in the processing of different nodes; and the differences in the attribute weight distribution matrices of different filters reflect the importance of different filters, which also explains why no normalization operation is performed on C.

[0081] In addition, the present invention adds a self-aggregation filter to preserve the original representation of the corresponding central node in the previous layer. Similar to the low-pass / high-pass filter, it also contains two parts: the structural weight distribution matrix and the attribute weight distribution matrix. The difference is that in the self-aggregation filter, both matrices are diagonal matrices. Specifically, the elements of each position in the structural weight distribution matrix come from the normalized adjacency matrix in For the adjacency matrix with self-loops added, is the corresponding degree matrix; the construction process of the attribute weight assignment matrix is ​​similar to that in the low-pass / high-pass filter. Since each node only considers itself, each node actually only calculates the attention coefficient with itself.

[0082] In each convolutional layer, the sum of the three filter outputs is used as the node representation of the next layer to achieve the purpose of adaptively assigning weights to filters for different types of nodes. At the same time, a skip connection mechanism is introduced. The input of each layer contains not only the output of the previous layer, but also the original representation of the node, which is controlled by the hyperparameter ε. The overall architecture of HFGCN is shown in the following formula. First, the node representation is mapped to a low-dimensional space through the MLP layer (usually nodes in graph data often contain a large number of features); then, the node representation is updated in each hidden layer using the idea of ​​hybrid filtering; finally, it is mapped to a k-dimensional space through the MLP layer, where k is the total number of node categories in the graph, and the softmax activation function is used to output the probability of the node belonging to each category.

[0083] X (l) =εX (0) +(F low +F high +F self )X (l-1) ,l=1,…,L

[0084] Where L is the total number of hidden layers.

[0085] Step 4.2. The overall framework of the pre-training model is as follows Figure 4As shown in Figure 1. The network input includes the connectivity between nodes and the features of each node, totaling 13 dimensions. First, a fully connected layer maps the node feature dimensions to h dimensions. Multiple HFGCN layers extract the spatial features of the topological graph. Finally, a fully connected layer maps the node feature dimensions to the target 4 dimensions. Furthermore, two fully connected layers are added for inter-node interaction, with a dimension of node × node. This allows nodes to perceive the information of other nodes and determine their category. Finally, a softmax layer determines the probability of a node belonging to each category for final classification.

[0086] The design of the loss function consists of three parts. In addition to using the cross entropy method to constrain the node classification results, the intra_loss and inter_loss parts are added to measure the intra-class distance and inter-class distance respectively. Their specific definitions are:

[0087]

[0088]

[0089] The final loss function is the sum of three parts:

[0090] loss=nll_loss(output,label)+α*intra_loss+β / inter_loss

[0091] Where α and β are hyperparameters.

[0092] To avoid the significant training overhead associated with calculating the loss during each gradient propagation, only a subset of faulty samples is randomly selected to represent the overall distribution. Furthermore, l2 regularization is introduced to prevent model overfitting, and the Adam optimizer is used to backpropagate gradients to update the network parameters. Ultimately, the model with the best performance on the validation set is selected to support subsequent temporal aggregation to determine the final node category.

[0093] In the example used in this paper, the model was trained for 100 epochs, with a learning rate of 0.01, weight_decay of 1e-3, a hidden layer dimension of h = 24, and a loss function of α = 0.05 and β = 0.1. The HFGCN parameters were: layer = 2, dropout = 0.6, ε = 0.3, and γ = 0.3.

[0094] The classification accuracy of all nodes in the test set was used as the evaluation criterion. Without the introduction of intra_loss and inter_loss, the model's classification accuracy was 87.19%. After introducing them, the model's classification accuracy increased to 87.43%.

[0095] Step 5. Based on the pre-trained model, the temporal aggregation mechanism is used to fuse multiple time slices. The overall framework is as follows: Figure 5 First, load the pre-trained model and its parameters, and select the second-to-last layer of the pre-trained model as input, that is, Figure 4 The dotted box in the figure is used to retrain the last fully connected layer in the pre-trained model. Based on this, the learned representations of each node at different time slices are updated by taking into account the contextual information through self-attention. For each node, the representations of T time slices are included, and the representation of each time slice is a 4-dimensional vector, which can be recorded as X∈R T×4 ,First, perform a linear transformation to obtain the corresponding Query, Key, and Value vectors:

[0096] Query=XW Q

[0097] Key=XW K

[0098] Value = XW V

[0099] Where W Q 、W K 、W V are all learnable matrices.

[0100] Then calculate the attention coefficient and calculate the updated representation by weighted average:

[0101] X new =softmax(Query·Key T )·Value

[0102] Among them, softmax(Query·Key T ) is the calculated attention coefficient, which is a T×T dimensional vector, where the i-th row and j-th column represent the degree of dependence of the i-th moment on the j-th moment.

[0103] On this basis, X new The final representation of each node is obtained by linearly transforming the representation to 4D and the time dimension to 1D. Finally, a softmax layer is used to determine the probability of the node belonging to each category. The loss function also includes the three components of the pretrained model, and the Adam optimizer is used to update the network parameters.

[0104] In the example used in the present invention, the model is trained for 100 epochs, with a learning rate of learning_rate = 0.05, weight_decay = 1e-3, dropout = 0.6, and a loss function of α = 0.02 and β = 0.02.

[0105] Without integrating the temporal dimension, the model trained on a single time slice was used to evaluate the samples in the test set. For each of the 10 moments, 10 corresponding classification results were obtained. Assuming that the number of correctly classified time slices is greater than 5, the entire sequence is considered correctly classified. To verify the effectiveness of the temporal aggregation mechanism proposed in this invention, the classification accuracy under this assumption was first statistically analyzed, resulting in a value of 87.33%. However, after adopting the temporal aggregation mechanism provided by this invention, the accuracy increased to 89.27%, and the training process exhibited excellent stability.

[0106] At the same time, since the solution proposed in the present invention does not introduce too many parameters and does not require iterative operations, the classification results of all power grid nodes in the sample can be quickly obtained in a very short time.

[0107] It will be apparent to those skilled in the art that the present invention is not limited to the details of the illustrative examples set forth above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the examples should be considered in all respects as illustrative and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. It is intended that all variations within the meaning and range of equivalents of the claims be embraced herein, and any reference signs in the claims should not be construed as limiting the claims to which they relate.

Claims

1. A spatiotemporal graph node classification method based on temporal aggregation, characterized in that: The method comprises: For a faulty power grid, collect the grid node data generated at several moments after the fault occurs; generating a static graph at each moment according to the grid node data; The static graph is fed into a graph convolutional neural network based on hybrid filtering, and is used for the interaction of nodes in the power grid through two fully connected layers to obtain a vector representation of the power grid node at that moment; wherein each layer of the graph convolutional neural network based on hybrid filtering includes a low-pass filter, a high-pass filter, and a self-aggregation filter; The vector representations of the power grid nodes at each moment are fused and classified to obtain the degree of impact of the power grid nodes after the fault occurs; The static graph is fed into a graph convolutional neural network based on hybrid filtering, and two fully connected layers are used to interact with node information in the power grid to obtain a vector representation of each power grid node at that moment, including: The MLP layer is used to map the characteristics of the grid node data of node i to the high-dimensional space to obtain Adopting the idea of ​​hybrid filtering, using and the node representation of node i at layer l-1 Update the node representation to get The node representation output by the last layer of the graph neural network is mapped to the target dimensional space through the MLP layer; The representations of all nodes are passed through two n×n fully connected layers to exchange information between nodes; where n represents the number of nodes in the power grid; The idea of ​​adopting hybrid filtering is to use and the node representation of node i at layer l-1 Update the node representation to get include: Based on the low-pass filter F low The weight assigned to the neighbor node j of the central node i Get the updated representation of node i Among them, the structural weight λ Ak =1-λ k ,λ k is the normalized adjacency matrix D -1 / 2 AD -1 / 2 The kth eigenvalue of ki and u kj Respectively represent the corresponding k-th eigenvector u k The i-th and j-th components of , D and A are the degree matrix and adjacency matrix of the static graph respectively, γ is a hyperparameter, ⊙ represents element-wise operation, attribute weight a is the learnable parameter vector; Based on the high-pass filter F high The weight assigned to the neighbor node j of the central node i Get the updated representation of node i Among them, the structural weight Based on the self-aggregation filter F self The weight assigned by the central node i to itself Get the updated representation of node i Among them, the structural weight The values ​​are taken from the normalized adjacency matrix The value of the corresponding position, where For the adjacency matrix with self-loops added, is the corresponding degree matrix, attribute weight The construction is similar to that of low-pass / high-pass filters, that is, Connect the nodes represented by X (0) ,express express and express Get node representation 2. The method according to claim 1, wherein Before generating a static graph at each moment based on the grid node data, the method further includes: The node voltage vector trajectory corresponding to the grid node data is rotated so that the initial phase angle mean values ​​of all grid nodes are consistent.

3. The method according to claim 1, wherein The characteristics of the grid node data include: voltage amplitude, phase angle, real part, imaginary part; generator active and reactive power; load active and reactive power; the change in voltage amplitude, phase angle, real part, imaginary part relative to the previous moment and the Euclidean distance of the voltage trajectory from the current moment to the previous moment.

4. The method according to claim 1, wherein The vector representations are fused and classified to obtain the degree of impact of the grid nodes after the fault occurs, including: Load the model trained in the static graph, freeze the parameters of the previous layers and retrain the last layer; For the vector representation of the power grid node at each moment, the updated representation X of the power grid node is obtained through the self-attention mechanism new ; Will update representation X new The final representation of the grid node is obtained by mapping it to B dimensions through linear transformation and mapping the time dimension to one dimension through linear transformation; wherein B represents the number of levels in the degree of impact; The final representation is classified to obtain the degree of influence of the power grid node after the fault occurs.

5. A spatiotemporal graph node classification device based on temporal aggregation, characterized in that: The device comprises: A collection module is used to collect grid node data generated at several moments after the fault occurs in the faulty grid; A construction module, configured to generate a static graph at each moment based on the grid node data; a computing module, configured to feed the static graph into a graph convolutional neural network based on hybrid filtering, and to interact with node information in the power grid through two fully connected layers to obtain a vector representation of the power grid node at that moment; wherein each layer of the graph convolutional neural network based on hybrid filtering includes a low-pass filter, a high-pass filter, and a self-aggregation filter; The classification module is used to fuse and classify the vector representations of the power grid nodes at each moment to obtain the degree of impact of the power grid nodes after the fault occurs; The static graph is fed into a graph convolutional neural network based on hybrid filtering, and two fully connected layers are used to interact with node information in the power grid to obtain a vector representation of each power grid node at that moment, including: The MLP layer is used to map the characteristics of the grid node data of node i to the high-dimensional space to obtain Adopting the idea of ​​hybrid filtering, using and the node representation of node i at layer l-1 Update the node representation to get The node representation output by the last layer of the graph neural network is mapped to the target dimensional space through the MLP layer; The representations of all nodes are passed through two n×n fully connected layers to exchange information between nodes; where n represents the number of nodes in the power grid; The idea of ​​adopting hybrid filtering is to use and the node representation of node i at layer l-1 Update the node representation to get include: Based on the low-pass filter F low The weight assigned to the neighbor node j of the central node i Get the updated representation of node i Among them, the structural weight λ Ak =1-λ k ,λ k is the normalized adjacency matrix D -1 / 2 AD -1 / 2 The kth eigenvalue of ki and u kj Respectively represent the corresponding k-th eigenvector u k The i-th and j-th components of , D and A are the degree matrix and adjacency matrix of the static graph respectively, γ is a hyperparameter, ⊙ represents element-wise operation, attribute weight a is the learnable parameter vector; Based on the high-pass filter F high The weight assigned to the neighbor node j of the central node i Get the updated representation of node i Among them, the structural weight Based on the self-aggregation filter F self The weight assigned by the central node i to itself Get the updated representation of node i Among them, the structural weight The values ​​are taken from the normalized adjacency matrix The value of the corresponding position, where For the adjacency matrix with self-loops added, is the corresponding degree matrix, attribute weight The construction is similar to that of low-pass / high-pass filters, that is, Connect the nodes represented by X (0) ,express express and express Get node representation 6. The device according to claim 5, characterized in that The device further comprises: a training module; The training module is used to train a node classification pre-training model under a static graph based on cross entropy loss, intra-class distance loss and inter-class distance loss.

7. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method according to any one of claims 1 to 4 is implemented.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Node classification system and method based on fusion multi-order feature propagation

    CN115130558A

  • Node classification in dynamic networks using graph factorization

    US20210067558A1