A power network spatial risk assessment method based on a graph neural network

By performing graphical modeling and graph neural network analysis on the power system, combined with spectral clustering and machine learning, a comprehensive risk assessment of the power system cyberspace was achieved. This solved the problem of inaccurate predictions under dynamic and real-time changes by traditional methods, and improved the safety and stability of the power system.

CN118378881BActive Publication Date: 2025-11-21STATE GRID FUJIAN ELECTRIC POWER RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410417341.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-09
Publication Date
2025-11-21
Estimated Expiration
2044-04-09

AI Technical Summary

Technical Problem

Traditional power system risk identification and management methods are limited in their effectiveness when dealing with new or abnormal risk scenarios. They cannot fully consider the dynamics and real-time changes of the power system, resulting in inaccurate predictions and making it difficult to ensure the security and stability of cyberspace.

Method used

A graph neural network-based approach is used to perform graphical modeling of the power system network, decompose it into subgraphs using a spectral clustering algorithm, aggregate information through a graph neural network, and combine it with a machine learning model to predict risk levels, thereby achieving a comprehensive risk assessment of the power system network space.

Benefits of technology

It improves the operating efficiency and stability of power systems in complex environments, provides a comprehensive and efficient risk identification and control scheme, enhances the safety and stability of the system, and supports the intelligent management and optimization of modern power systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118378881B_ABST
    Figure CN118378881B_ABST
Patent Text Reader

Abstract

The application discloses a kind of power network space risk assessment methods based on graph neural network, steps include: first, power system network is modeled graphically, and it is decomposed into each subgraph using spectral clustering algorithm;Using graph neural network, the integrated graph representation is obtained by the depth information integration of subgraph;This graph representation is further used to assess the power system risk level of each subgraph, so as to identify and control the risk condition of the whole network in real time.The core innovation of the application is to combine graph model and graph neural network for power system data processing, which can comprehensively evaluate system risk and accurately locate the risk of specific area, provide strong decision support for system dispatch, and solve the limitations of traditional methods in capturing potential risks and complex network dynamics.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power network space service risk identification, and particularly relates to a power network space risk assessment method based on a graph neural network. BACKGROUND

[0002] The stability and security of the power system, which is composed of numerous electrical devices and connected through a complex interconnection structure, is crucial for the country's economic development and normal operation. It plays a core role in the transmission and distribution of electrical energy. Over time and with technological advancements, modern power systems have evolved into a high-dimensional, nonlinear, time-varying super-large system. This complexity increases the likelihood of various risks and failures faced by the power system.

[0003] Traditional power system risk identification and management methods are mostly based on experience rules and fixed algorithms. These methods are generally relatively reliable in handling common and predefined risk scenarios. However, since they are mostly based on historical data and inherent assumptions, their effectiveness is often limited when faced with new or abnormal risk situations. In addition, traditional methods often fail to adequately consider the dynamic nature and real-time changes of the power system, resulting in inaccurate predictions.

[0004] In modern complex power systems, ensuring the security and stability of the network space has become a core challenge, therefore, a new risk assessment method is needed to address the limitations of traditional methods in capturing potential risks and complex network dynamics, to improve the security and reliability of the power grid. SUMMARY

[0005] To solve the problems in the prior art, the present application provides a power network space risk assessment method based on a graph neural network, which solves the problems mentioned in the background.

[0006] To achieve the above-mentioned purpose, the present application provides the following technical solution: a power network space risk assessment method based on a graph neural network, comprising the following steps:

[0007] S1, graphically modeling the power system network to form a power system weight graph;

[0008] S2, decomposing the power system weight graph into individual subgraphs using a spectral clustering algorithm;

[0009] S3, information aggregation of the subgraphs based on a graph neural network to obtain a comprehensive representation of each subgraph;

[0010] S4, using the comprehensive representation of each subgraph to predict the risk level, thereby achieving comprehensive risk assessment of the power system network space.

[0011] Preferably, in step S1, specifically comprising the following steps:

[0012] S11, defining the attributes of nodes and edges;

[0013] S12, constructing a power system weight graph based on the attribute information of nodes and edges, the power system weight graph is represented as G=(V, E), wherein V is a node set, E is an edge set, and in the power system weight graph, each node represents a power device or region, and each edge represents an electrical connection relationship between power devices.

[0014] Preferably, in step S11, the attributes of the nodes include the type and capacity of the device, the production date, the maintenance record, the physical location coordinates, the rated capacity, the manufacturer name, the factory date, and the rated voltage; and the edge attributes include the line type, the current capacity, the impedance, the line length, and the connected nodes.

[0015] Preferably, in step S2, specifically comprising the following steps:

[0016] S21, calculating a Laplacian matrix: the Laplacian matrix L is a symmetric matrix, defined as: L=D-A; wherein D is a degree matrix, A is an adjacency matrix, the diagonal elements of the degree matrix D represent the degree of each node, i.e. the number of edges connected thereto; and the adjacency matrix A reflects the connection relationship between nodes, if node i is connected to node j, then A(i,j)=1, otherwise 0;

[0017] S22, obtaining the eigenvectors and eigenvalues of the Laplacian matrix by performing eigenvalue decomposition on the Laplacian matrix, and the eigenvalue decomposition formula is as follows:

[0018]

[0019] wherein λ represents an eigenvalue, n is the number of eigenvalues, is a matrix with unit eigenvectors as columns, because U is an orthogonal matrix, the eigenvalue decomposition formula is expressed as:

[0020]

[0021] wherein T represents the transpose of a matrix;

[0022] S23, applying a spectral clustering algorithm K-Means to divide the nodes into k clusters, selecting the first k eigenvalues corresponding to the eigenvectors as the input data of spectral clustering, the eigenvectors correspond to the k largest eigenvalues of the graph, and the clustering result is to divide the power system weight graph into k subgraphs.

[0023] Preferably, in step S3, specifically comprising the following steps:

[0024] S31, selecting a graph neural network model, the graph neural network model comprising GCN, GraphSAGE, GAT or GIN;

[0025] S32, learning node representation information: inputting each subgraph in the power system weight graph into the selected graph neural network model, on each subgraph, the graph neural network model learns the representation of each node and aggregates information of the graph;

[0026] S33, subgraph representation: by aggregating the node representations in the subgraph, calculating the average value of all node representations in the subgraph as the representation of the subgraph, obtaining the comprehensive representation of each subgraph.

[0027] Preferably, in step S32, specifically comprising the following:

[0028] S321, when the selected graph neural network model is a GCN model, the following formula is used to update the representation of node v:

[0029]

[0030] wherein, represents the representation of the kth convolution of node v, W represents the weight matrix, ReLU represents the activation function, MEAN represents the average, N(v) is the set of neighbor nodes of node v, and u is the possible neighbor node of node v;

[0031] S322, when the selected graph neural network model is a GraphSAGE model, the following formula is used to update the representation of node v:

[0032]

[0033]

[0034] wherein, represents the aggregated neighbor node information when the kth convolution of node v is performed, MAX represents the maximum value, and COMBINE is a linear mapping after connection

[0035] S323, when the selected graph neural network model is a GAT model, the following formula is used to update the representation of node v:

[0036]

[0037] wherein, α vu represents the attention weight from node v to node u, and the formula is expressed as:

[0038] α vu = softmax u(LeakyReLU(a T [Wh v ;Wh u ]));

[0039] Here, softmax is performed on all neighboring nodes of node v to ensure that the sum of all attention weights is 1, LeakyReLU is the activation function, and a is the weight vector of the attention mechanism;

[0040] S324. When the selected graph neural network model is a GIN model, use the following formula to update the representation of node v:

[0041]

[0042] Among them, W k is the weight matrix for the k-th round, and ∈ is a learnable parameter.

[0043] Preferably, step S4 specifically includes the following steps:

[0044] S41. Extract subgraph features: Extract risk-related features from the comprehensive representation of each subgraph; the risk-related features include the average degree of nodes in the subgraph, the connection strength between nodes, the clustering coefficient of nodes in the subgraph, and the centrality of nodes;

[0045] S42. Training the model: Build and train a machine learning model. During the model training process, use a labeled risk level dataset. The goal of the model is to learn how to associate features with the corresponding risk level labels.

[0046] S43. Predict risk level: The risk-related features extracted from the comprehensive representation of each subgraph are input into the trained model to predict its risk level. The output of the model is the risk assessment of each subgraph, represented as a discrete level.

[0047] Preferably, in step S42, the machine learning model is a multilayer perceptron (MLP) or a support vector machine (SVM).

[0048] Preferably, in step S42, the label is marked based on historical risk data or domain expert knowledge.

[0049] Preferably, in step S43, the discrete levels are low, medium, and high.

[0050] The present application provides a cutting-edge solution to the deficiencies of the prior art, ensuring that the power system can operate efficiently and stably in various complex environments. The present application provides a comprehensive, efficient and adaptive risk identification and control scheme for the power system, aiming to more effectively manage and reduce these risks. It not only improves the safety and stability of the system, but also provides a powerful tool and support for the intelligent management and optimization of modern power systems, ensuring that the power network remains solid in the face of future challenges, providing continuous and stable power supply to society. BRIEF DESCRIPTION OF DRAWINGS

[0051] Figure 1 The step flowchart of the power network spatial risk assessment method based on the graph neural network of the present application. DETAILED DESCRIPTION

[0052] The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0053] In order to more accurately capture the structure and dynamics of the power system, the present application considers using graph theory to model the power system. This method allows experts to more intuitively analyze and understand the topology of the system. However, using graph theory alone may not be able to fully exploit the depth information of the power system. On the other hand, neural networks, especially deep learning models, have shown great performance in various data-intensive tasks in recent years, including monitoring and diagnosis of power systems. Therefore, the present application combines graph theory with neural networks, bringing great potential to power system risk assessment.

[0054] The present application proposes a power network spatial risk assessment method based on graph neural network, as shown in Figure 1 The method comprises the following steps:

[0055] S1, graphically modeling the power system network to form a power system weight graph;

[0056] S2, decomposing the power system weight graph into each subgraph using a spectral clustering algorithm;

[0057] S3, information aggregation of the subgraph based on graph neural network, to obtain the comprehensive representation of each subgraph;

[0058] S4, using the comprehensive representation of each subgraph to predict the risk level, and then realizing the comprehensive risk assessment of the power system network space.

[0059] 1. Power system network modeling

[0060] The present invention innovatively proposes to model the power system as a weighted graph, where each node represents a power device or region, and the edges represent the connection relationship between them. These connections not only include physical connections, but also may represent data flow or other types of logical associations. The weight of each edge may be based on the communication frequency, power flow or other related indicators between devices. The deep modeling of the power system network is not just a simple mapping of the existing structure, but through learning and analysis, it extracts the key characteristics and internal relations in the power system. When a component of the power system has a problem or is threatened externally, this deep modeling can help us quickly locate the problem and predict its possible impact on the entire system.

[0061] Further, in the process of graph modeling of the power system network to form the power system weighted graph, the following is specifically included:

[0062] 1.1 Define the attributes of nodes and edges

[0063] In the process of power system network modeling, it is crucial to accurately define the attributes of nodes and edges, as these attributes will serve as basic information for subsequent analysis and evaluation. The attributes of nodes can not only include the type and capacity of the device, but also detailed information such as manufacturer, production date, maintenance record, physical location coordinates, etc. For example, for a transformer node, the attributes can include rated capacity (MVA), manufacturer name, date of manufacture, rated voltage, etc. These detailed attributes can be used to establish a more accurate power system model.

[0064] In addition, the attributes of the edges also need to be defined in detail. Edge attributes may include line type (transmission line, inter-substation line, etc.), current capacity, impedance, line length, connected nodes, etc. These attributes are crucial for calculating the current distribution, power flow analysis and load distribution of the power system.

[0065] 1.2 Based on the attribute information of nodes and edges, construct the power system weighted graph

[0066] The power system weighted graph is represented as G = (V, E), where V is the set of nodes and E is the set of edges. In the power system weighted graph, each node represents a power device (such as a transformer, generator, switching device) or a region (such as a power grid partition), and each edge represents the electrical connection relationship between power devices.

[0067] The edge weights in the graph can reflect physical characteristics such as current capacity, loss coefficient, line impedance, etc. For example, for a power transmission line, its edge weight can represent its current capacity, while for a generator node, the edge weight can reflect its power generation capacity. Such a graph will provide a detailed, physically meaningful power system model, providing a solid foundation for subsequent risk assessment.

[0068] 2. Spectral clustering analysis

[0069] Through spectral clustering, we can decompose the weight graph into several subgraphs, each representing a tightly connected subset in the power system. The advantage of spectral clustering is that it can automatically discover these structures in the graph without additional prior knowledge. Therefore, the introduction of spectral clustering and graph neural network technology further improves the accuracy of the scheme, and we can go deep into every corner of the power network to ensure that every detail is fully considered and analyzed.

[0070] Further, in the process of decomposing the power system weight graph into subgraphs using the spectral clustering algorithm, the following steps are included:

[0071] 2.1 Calculate the Laplacian matrix

[0072] The core of the spectral clustering algorithm is the calculation of the Laplacian matrix. The Laplacian matrix is an important feature of the graph, which can be calculated as follows:

[0073] The Laplacian matrix L is a symmetric matrix, defined as: L = D - A; where D is the degree matrix, and A is the adjacency matrix. The diagonal elements of the degree matrix D represent the degree of each node, i.e. the number of edges connected to it; the adjacency matrix A reflects the connection between nodes, if node i is connected to node j, then A(i,j) = 1, otherwise 0;

[0074] 2.2 Obtain the eigenvectors and eigenvalues of the Laplacian matrix by eigenvalue decomposition

[0075] In graph theory, eigenvalue decomposition of the Laplacian matrix can be used to study the spectral properties of the graph. By performing eigenvalue decomposition on the Laplacian matrix, we can obtain its eigenvectors and eigenvalues. In particular, the smallest eigenvalue of the Laplacian matrix is called the algebraic connectivity of the graph, which represents the smallest cut set size in the graph. The eigenvectors of the Laplacian matrix can be used to characterize the structure and properties of the graph.

[0076] The original data may contain noise or redundant data due to human or environmental factors during acquisition. This noise or redundancy is not conducive to direct clustering analysis. A feasible method is to remove noise and redundancy, that is, to reduce the number of features, which is essentially a dimensionality reduction. Dimensionality reduction is to project the original data onto a subspace whose basis is spanned by some eigenvectors of the original matrix.

[0077] Since the Laplacian matrix is a positive semi-definite symmetric matrix, we know that it has n eigenvalues, and the eigenvalues are non-negative. Therefore, the eigenvalue decomposition formula is as follows:

[0078]

[0079] where λ represents the eigenvalue, n is the number of eigenvalues, and the number of eigenvalues λ is usually the same as the number of nodes in the graph, and the number of eigenvectors v is also the same, is the matrix whose column vectors are unit eigenvectors, and since U is an orthogonal matrix, the eigenvalue decomposition formula can be expressed as:

[0080]

[0081] where T represents the transpose of the matrix;

[0082] 2.3 Decompose subgraph

[0083] Apply the spectral clustering algorithm K-Means to divide the nodes into k clusters, and select the top k eigenvalues corresponding to the eigenvectors as the input data for spectral clustering. These eigenvectors correspond to the k largest eigenvalues of the graph. The result of clustering is to divide the power system weight graph into k subgraphs.

[0084] Select the top k eigenvalues corresponding to the eigenvectors as the input for spectral clustering. These eigenvectors correspond to the k largest eigenvalues of the graph. Such a selection can ensure that nodes with high similarity remain close in low-dimensional space.

[0085] Specifically, after obtaining the eigenvectors, a clustering algorithm can be applied to divide the nodes into k clusters. Spectral clustering usually uses K-Means clustering to implement, taking the eigenvectors as input data. The result of clustering is to divide the power system graph into k subgraphs, each representing a group of highly correlated power devices and regions.

[0086] The advantage of spectral clustering is that it can fully consider the topological structure of the graph and aggregate nodes with high similarity in low-dimensional space. This helps to accurately capture the potential correlation in the power system.

[0087] 3. Information aggregation of graph neural network

[0088] The application further adopts a graph neural network. The graph neural network module adopts a convolutional neural network (CNN) or a graph attention network (GAT), so as to effectively capture key features in a subgraph and perform deep feature learning on each subgraph. Compared with traditional graph algorithms, the graph neural network can better capture nonlinear patterns and complex relationships in a graph.

[0089] Further, in the comprehensive representation of each subgraph obtained by information aggregation based on the graph neural network, the following is specifically included:

[0090] 3.1 Selecting a graph neural network model

[0091] Selecting an appropriate graph neural network model is crucial for information aggregation. Commonly used graph neural network models include Graph Convolutional Network (GCN), GraphSAGE, Graph Attention Network (GAT), Graph Isomorphism Network (GIN), etc. These models have different architectures and characteristics, and can be selected according to the specific task and the nature of the data.

[0092] 3.2 Learning node representation information

[0093] Each subgraph in the power system weight graph is input into the selected graph neural network model. In each subgraph, the graph neural network model learns the representation of each node and aggregates information on the graph.

[0094] 3.2.1 When the selected graph neural network model is a GCN model, the following formula is used to update the representation of node v:

[0095]

[0096] wherein, represents the kth convolution representation of node v, W represents the weight matrix, ReLU represents the activation function, MEAN represents the average, N(v) is the set of neighbor nodes of node v, and u is a possible neighbor node of node v. This formula describes how to update the representation of node v by using the representations of its neighbor nodes.

[0097] The multi-round convolution mechanism can be iteratively executed to continuously improve the representation of the nodes. In this way, each node will contain the information of its neighbor nodes in the representation, thereby obtaining richer features.

[0098] 3.2.2 When the selected graph neural network model is a GraphSAGE model, the following formula is used to update the representation of node v:

[0099]

[0100]

[0101] where, denotes the aggregated neighbor node information of node v at the k-th convolution, MAX denotes the maximum value, W denotes the weight matrix, N(v) is the neighbor node set of node v, and u is a possible neighbor node of node v, denotes the representation of node v at the k-th convolution, and the COMBINE step is a concatenated linear mapping

[0102] The multi-round sampling and aggregation mechanism can be iteratively executed, so that the representation of each node integrates more neighbor information, thereby obtaining a richer feature representation.

[0103] 3.2.3 When the selected graph neural network model is the GAT model, the following formula is used to update the representation of node v:

[0104]

[0105] where, denotes the representation of node v at the k-th convolution, u is a possible neighbor node of node v, N(v) is the neighbor node set of node v, W is the weight matrix, and a vu denotes the attention weight from node v to node u, and the formula is expressed as:

[0106] a vu = softmax u (LeakyReLU(a T [Wh v ; Wh u ]) )

[0107] where, softmax is performed on all neighbor nodes of node v, ensuring that the sum of all attention weights is 1, u is a possible neighbor node of node v, LeakyReLU is an activation function, a is a weight vector of the attention mechanism, W is a weight matrix, and T denotes the transpose of the matrix;

[0108] The core idea of GAT is to introduce an attention mechanism to assign different importance to each neighbor of each node. This allows the model to more flexibly capture heterogeneous relationships between different neighbors.

[0109] 3.2.4 When the selected graph neural network model is the GIN model, the following formula is used to update the representation of node v:

[0110]

[0111] where, where denotes the representation of node v at the k-th convolution, ReLU denotes the activation function, N(v) is the set of neighboring nodes of node v, u is a possible neighbor of node v, W k is the weight matrix at the k-th round, ∈ is a learnable parameter that allows the model to decide more flexibly the importance between the current node and its neighbors.

[0112] The core idea of GIN is to capture the isomorphism of graphs, ensuring that only when two graphs are indeed different, their representations will be different. This is achieved by using a learnable weight ∈, which provides a weight for the current node's representation combined with the aggregated representation of its neighbors.

[0113] Through the multi-round update mechanism, GIN can continuously integrate more adjacent information, providing a rich representation for each node.

[0114] 3.3 Subgraph Representation

[0115] By aggregating the node representations in the subgraph, the average pooling operation is used to calculate the average of all node representations in the subgraph as the representation of the subgraph, obtaining the comprehensive representation of each subgraph.

[0116] Such subgraph representation will contain information about all nodes in the subgraph, not just the average information of the nodes. This helps to maintain the context and structure information in the subgraph, so as to more accurately assess the risk.

[0117] 4. Risk Level Classification

[0118] Further, in the use of the comprehensive representation of each subgraph to predict the risk level, and then realize the comprehensive risk assessment of the power system network space, specifically including the following:

[0119] 4.1 Extracting Subgraph Features

[0120] Extracting risk-related features from the comprehensive representation of each subgraph; the risk-related features include the average degree of nodes in the subgraph, the connection strength between nodes, the clustering coefficient of nodes in the subgraph, and the centrality of nodes, etc.

[0121] For power system risk assessment, the selection of features needs to consider factors related to the safety of the power system, such as node load, current distribution, node voltage, etc.

[0122] 4.2 Training Model

[0123] Establish and train a machine learning model, in the model training process, use a risk level dataset with labeled tags, the goal of the model is to learn how to associate features with corresponding risk level labels.

[0124] A machine learning model (e.g. multi-layer perceptron MLP, support vector machine SVM) is established to perform risk level classification. The model will be trained to map the extracted features to risk level labels. During the training process, a labeled risk level dataset is required, and these labels can be obtained from historical risk data or domain expert knowledge. The goal of the model is to learn how to associate features with corresponding risk levels for subsequent predictions.

[0125] 4.3 Predicting risk level

[0126] The risk-related features extracted from the integrated representation of each subgraph are input into the already trained model to predict their risk level, and the output of the model is the risk assessment of each subgraph, represented in discrete levels (e.g. low, medium, high).

[0127] These risk level predictions will help power system operators better understand the current security status of the system and take appropriate control measures to reduce the potential risk of power failure. The invention can also provide a real-time feedback mechanism to allow operators to adjust control strategies or take emergency measures based on risk assessment results.

[0128] To improve the robustness and adaptability of the system, the invention can also introduce an adaptive learning module that can continuously optimize and adjust the above technical steps based on actual operation data, ensuring that the system remains efficient and accurate when facing new challenges.

[0129] The invention provides a power network spatial risk assessment method based on graph neural networks, which realizes comprehensive risk identification and control of power system network space through detailed steps and technical details, including power system network modeling, spectral clustering, graph neural network aggregation, and risk level classification, as well as detailed collection of risk factors, device security information, protocol security information, and policy security information, improving the safety and reliability of the power grid and providing more reliable decision support for the power industry.

[0130] Although the invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for part of the technical features, and any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the invention shall be included within the scope of protection of the invention.

Claims

1. A method for assessing spatial risk in power networks based on graph neural networks, characterized in that, Includes the following steps: S1. Perform graphical modeling of the power system network to form a power system weight diagram; S2. Use the spectral clustering algorithm to decompose the power system weight graph into subgraphs; S3. Aggregate information from the subgraphs based on graph neural networks to obtain a comprehensive representation of each subgraph; specifically, this includes the following steps: S31. Select a graph neural network model, wherein the graph neural network model includes GCN, GraphSAGE, GAT or GIN; S32. Learning node representation information: Input each subgraph in the power system weight graph into the selected graph neural network model. On each subgraph, the graph neural network model will learn the representation of each node and aggregate information in the graph. S33. Subgraph Representation: By aggregating the node representations in the subgraph, the average value of all node representations in the subgraph is calculated as the representation of the subgraph, thus obtaining the comprehensive representation of each subgraph; S4. Utilize the comprehensive representation of each subgraph to predict the risk level, thereby achieving a comprehensive risk assessment of the power system network space; specifically, this includes the following steps: S41. Extract subgraph features: Extract risk-related features from the comprehensive representation of each subgraph; the risk-related features include the average degree of nodes in the subgraph, the connection strength between nodes, the clustering coefficient of nodes in the subgraph, and the centrality of nodes; S42. Training the model: Build and train a machine learning model. During the model training process, use a labeled risk level dataset. The goal of the model is to learn how to associate features with the corresponding risk level labels. S43. Predict risk level: The risk-related features extracted from the comprehensive representation of each subgraph are input into the trained model to predict its risk level. The output of the model is the risk assessment of each subgraph, represented as a discrete level.

2. The power network spatial risk assessment method based on graph neural networks according to claim 1, characterized in that: Step S1 specifically includes the following steps: S11. Define the attributes of nodes and edges; S12. Based on the attribute information of nodes and edges, construct a power system weight graph. The power system weight graph is represented as G = (V, E), where V is the set of nodes and E is the set of edges. In the power system weight graph, each node represents a power device or region, and each edge represents the electrical connection relationship between power devices.

3. The power network spatial risk assessment method based on graph neural networks according to claim 2, characterized in that: In step S11, the attributes of the node include the type and capacity of the device, production date, maintenance record, physical location coordinates, rated capacity, manufacturer name, manufacturing date, and rated voltage; the attributes of the edge include line type, current capacity, impedance, line length, and connected nodes.

4. The power network spatial risk assessment method based on graph neural networks according to claim 1, characterized in that: Step S2 specifically includes the following steps: S21. Calculate the Laplace matrix: The Laplace matrix L is a symmetric matrix, defined as: L = DA; where D is the degree matrix and A is the adjacency matrix. The diagonal elements of the degree matrix D represent the degree of each node, that is, the number of edges connected to it; the adjacency matrix A reflects the connection relationship between nodes. If node i is connected to node j, then A(i,j) = 1, otherwise it is 0. S22. By performing eigenvalue decomposition on the Laplacian matrix, its eigenvectors and eigenvalues ​​are obtained. The eigenvalue decomposition formula is as follows: Where λ represents the eigenvalue, and n is the number of eigenvalues. It is a matrix whose column vectors are unit eigenvectors. Since U is an orthogonal matrix, the eigendecomposition formula can be expressed as: Where T represents the transpose of the matrix; S23. Apply the K-Means spectral clustering algorithm to divide the nodes into k clusters. Select the eigenvalues ​​corresponding to the top k eigenvectors as the input data for spectral clustering. These eigenvectors correspond to the k largest eigenvalues ​​of the graph. The result of clustering is to divide the power system weight graph into k subgraphs.

5. The power network spatial risk assessment method based on graph neural networks according to claim 1, characterized in that: Step S32 specifically includes the following: S321. When the selected graph neural network model is a GCN model, use the following formula to update the representation of node v: in, Let W represent the k-th convolution of node v, W represent the weight matrix, ReLU represent the activation function, MEAN represent averaging, N(v) is the set of neighboring nodes of node v, and u is the possible neighboring nodes of node v. S322. When the selected graph neural network model is the GraphSAGE model, use the following formula to update the representation of node v: in, This represents the neighbor node information aggregated during the k-th convolution of node v. MAX indicates taking the maximum value, and the COMBINE step is a linear mapping after connection. S323. When the selected graph neural network model is a GAT model, use the following formula to update the representation of node v: Where, α vu The attention weight from node v to node u is expressed by the formula: α vu =softmax u (LeakyReLU(a T [Wh v ;Wh u ])); Here, softmax is performed on all neighboring nodes of node v to ensure that the sum of all attention weights is 1, LeakyReLU is the activation function, and a is the weight vector of the attention mechanism; S324. When the selected graph neural network model is a GIN model, use the following formula to update the representation of node v: Among them, W k is the weight matrix for the k-th round, and ∈ is a learnable parameter.

6. The power network spatial risk assessment method based on graph neural networks according to claim 1, characterized in that: In step S42, the machine learning model is a multilayer perceptron (MLP) or a support vector machine (SVM).

7. The power network spatial risk assessment method based on graph neural networks according to claim 1, characterized in that: In step S42, the label is made based on historical risk data or domain expert knowledge.

8. The power network spatial risk assessment method based on graph neural networks according to claim 1, characterized in that: In step S43, the discrete levels are low, medium, and high.

Citation Information

Patent Citations

  • High-performance graph clustering method based on attention graph neural network

    CN115456093A

  • Training method and device of graph neural network

    CN116090535A