Relay protection strategy generation method, device, electronic equipment and storage medium

By combining graph neural networks and long short-term memory neural networks, a relay protection strategy generation method is constructed, which solves the problem that it is difficult to balance safety and economy in the power grid protection strategy in new power systems. This enables rapid perception and decision-making of power grid transient status and improves the effectiveness and efficiency of emergency control.

CN117131407BActive Publication Date: 2025-10-31ELECTRIC POWER RES INST OF GUANGXI POWER GRID CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311100456.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-29
Publication Date
2025-10-31
Estimated Expiration
2043-08-29

AI Technical Summary

Technical Problem

Existing power grid protection strategies are difficult to balance safety and economy in new power systems, and cannot effectively cope with the complexity and uncertainty of power grid operation, resulting in poor emergency control performance.

Method used

By combining graph neural networks and long short-term memory neural networks, and through spatiotemporal feature extraction and deep reinforcement learning algorithms, a relay protection strategy generation method is constructed to achieve rapid perception and decision-making of the power grid transient situation, predict the power angle change trend in advance, and carry out emergency control.

Benefits of technology

It improves the protective effect of emergency control, ensures the safe and stable operation of the power grid, reduces the data processing dimension and training convergence time of the reinforcement learning agent, and improves the efficiency of emergency control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117131407B_ABST
    Figure CN117131407B_ABST
Patent Text Reader

Abstract

This invention discloses a relay protection strategy generation method, apparatus, electronic device, and storage medium to address the technical problem of ineffective existing power grid emergency protection control methods. The method includes: acquiring real-time power grid data of the power grid under test and constructing a transient response matrix based on the real-time data; inputting the transient response matrix into a relay protection prediction model for spatiotemporal feature extraction to obtain power grid spatiotemporal features; if the spatiotemporal features characterize the predicted operating state of the power grid under test and satisfy the protection action criteria, then inputting the spatiotemporal features into a pre-trained generator tripping decision model for fault decision-making, outputting a power grid control action, which is used to disconnect the predicted faulty generator in the power grid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of emergency control technology for power systems, and in particular to a method, apparatus, electronic device, and storage medium for generating relay protection strategies. Background Technology

[0002] Under the background of the construction of new power systems, the "dual high" characteristics (i.e., high proportion of renewable energy and high proportion of power electronic equipment) of power systems are becoming increasingly prominent, thus posing a severe challenge to the safety and stability of the power grid. Existing power grid protection strategies mainly adopt fault set scanning based on typical system operation modes, construct a relatively conservative operating space, and verify the protection strategy.

[0003] As new power systems are gradually advanced, power grid operation becomes more complex and power flow patterns become more diverse, which continuously squeezes the relatively conservative operating space, making it difficult to construct protection strategies based on typical operating modes while taking into account both safety and economy. Summary of the Invention

[0004] This invention provides a relay protection strategy generation method, apparatus, electronic device, and storage medium to solve or partially solve the technical problem of poor performance of existing power grid emergency protection control methods.

[0005] This invention provides a method for generating relay protection strategies, the method comprising:

[0006] Acquire real-time power grid data of the power grid under test, and construct a transient response matrix based on the real-time power grid data;

[0007] The transient response matrix is ​​input into the relay protection prediction model for spatiotemporal feature extraction to obtain the spatiotemporal features of the power grid.

[0008] If the spatiotemporal characteristics of the power grid indicate that the predicted operating state of the power grid under test meets the protection action criteria, then the spatiotemporal characteristics of the power grid are input into a pre-trained generator tripping decision model for fault decision-making, and the power grid control action is output. The power grid control action is used to disconnect the generators with predicted faults in the power grid.

[0009] Optionally, acquiring real-time power grid data of the power grid under test and constructing a transient response matrix based on the real-time power grid data includes:

[0010] Acquire real-time power grid data of the power grid under test, and extract node feature data at multiple time points from the real-time power grid data. The format of each node feature data is as follows:

[0011]

[0012] Among them, Z tN represents the node feature data at time point t. I N represents the number of generators. J N represents the number of loads. N For the number of substations, The power angle of the generator is a characteristic of the node. For load power, This refers to the substation bus voltage. This refers to the wiring method for substations;

[0013] The transient response matrix is ​​constructed by combining nodal feature data from multiple time points using the following formula, whereby the transient response matrix represents time series data with multiple spatial features:

[0014] s t =(Z t Z t-1 , ..., Z t-C+1 )

[0015] Among them, s t This is the transient response matrix, i.e., time series data, where C represents the number of time points.

[0016] Optionally, the relay protection prediction model includes a graph neural network and a long short-time memory neural network, and the power grid spatiotemporal features include power grid spatial features and power grid temporal features. The step of inputting the transient response matrix into the relay protection prediction model for spatiotemporal feature extraction to obtain the power grid spatiotemporal features includes:

[0017] The transient response matrix is ​​input into a graph neural network for feature extraction to obtain the power grid spatial features, and the power grid temporal features are extracted from the power grid spatial features through a long short-term memory neural network.

[0018] Optionally, the node feature data corresponds to multiple topological nodes in the power grid under test, and the step of inputting the transient response matrix into a graph neural network for feature extraction to obtain the power grid spatial features includes:

[0019] The transient response matrix is ​​input into a graph neural network for multi-level feature extraction to obtain the spatial features of the power grid. The calculation formula is as follows:

[0020]

[0021] Among them, X (l+1) X represents the spatial characteristics of the power grid corresponding to the (l+1)th layer. (l) Let σ represent the spatial characteristics of the power grid corresponding to the l-th layer, σ be a nonlinear activation function, and A represent the adjacency matrix corresponding to the topological node i. This represents the self-circulating matrix formed by adding a diagonal matrix to A. for The corresponding degree matrix, W (l) Let b represent the weight coefficient matrix of the l-th layer. (l) This represents the bias matrix of the l-th layer.

[0022] Optionally, the step of extracting the power grid temporal features from the power grid spatial features using a long short-term memory neural network includes:

[0023] The power grid temporal features are extracted from the power grid spatial features using a long short-term memory neural network, and the calculation formula is as follows:

[0024]

[0025]

[0026] h t =β t ⊙tanh(α t )

[0027] Y t =h t

[0028] in, β represents the amount of hidden state updates. t λ represents the input gate state variable. t μ represents the forget gate state. t Let X represent the output gate state, tanh be the activation function, W be the weight coefficients of the Long Short-Term Memory (LSTM) neural network, B be the bias coefficients of the LSTM neural network, and X be the output gate state. t h represents the input of the Long Short-Term Memory Neural Network at time point t, which is the output of the Graph Neural Network at the same time point. t-1 h represents the hidden node corresponding to time point t-1. t Represents the hidden node corresponding to time point t, ⊙ represents the convolution calculation, and α t-1 Let α represent the hidden state quantity corresponding to time point t-1. t Y represents the hidden state quantity corresponding to time point t. t This represents the output of the Long Short-Term Memory Neural Network at time point t.

[0029] Optionally, the step of inputting the spatiotemporal characteristics of the power grid into a pre-trained generator tripping decision model for fault decision-making and outputting power grid control actions includes:

[0030] The spatiotemporal characteristics of the power grid are input into a pre-trained generator tripping decision model, which outputs the probability values ​​of the generator units to be tripped.

[0031] Based on the probability value of the unit to be disconnected, the power grid under test is sampled, the units that need to be disconnected are identified as the predicted fault units, and the corresponding power grid control actions are output.

[0032] Optionally, the method further includes:

[0033] Construct a relay protection prediction model based on graph neural networks and long short-term memory neural networks;

[0034] Obtain the transient response dataset generated after a power grid fault, and input the transient response dataset into the relay protection prediction model;

[0035] The graph neural network is trained using the transient response dataset to extract spatial features and output a transient response spatial feature set.

[0036] The transient response spatial feature set is used to train the long short-term memory neural network for time-series feature extraction, outputting the transient response time-series feature set, and simultaneously saving the trained relay protection prediction model.

[0037] Construct reinforcement learning agents based on deep reinforcement learning networks;

[0038] Data on the generator units that were disconnected after a power grid fault were obtained, and the disconnected generator unit data were sorted according to the disconnection effect to obtain a disconnection effect dataset;

[0039] The reinforcement learning agent is trained by combining the machine switching effect dataset, the transient response spatial feature set, and the transient response temporal feature set.

[0040] When the number of iterations for policy training reaches the maximum number of iterations, or when the reinforcement learning agent after policy training reaches a convergent state, the training iteration stops and the switching decision model is output.

[0041] The present invention also provides a relay protection strategy generation device, comprising:

[0042] The transient response matrix construction module is used to acquire real-time power grid data of the power grid under test and construct a transient response matrix based on the real-time power grid data.

[0043] The spatiotemporal feature extraction module is used to input the transient response matrix into the relay protection prediction model to extract spatiotemporal features and obtain the spatiotemporal features of the power grid.

[0044] The power grid control action output module is used to input the power grid spatiotemporal characteristics into a pre-trained generator tripping decision model to make fault decisions if the predicted operating state of the power grid under test meets the protection action criteria, and output the power grid control action. The power grid control action is used to disconnect the predicted faulty generator in the power grid.

[0045] The present invention also provides an electronic device, the device comprising a processor and a memory:

[0046] The memory is used to store program code and transmit the program code to the processor;

[0047] The processor is used to execute the relay protection strategy generation method as described above, according to the instructions in the program code.

[0048] The present invention also provides a computer-readable storage medium for storing program code for executing the relay protection strategy generation method as described in any of the preceding claims.

[0049] As can be seen from the above technical solutions, the present invention has the following advantages: It provides a relay protection strategy generation method based on the spatiotemporal feature analysis of transient processes. First, it extracts the spatial features of the power grid through a graph neural network, which can extract features of the spatial propagation of transient faults and the response differences of generator units at different locations. Then, it uses a long short-term memory neural network to extract temporal features, which can effectively perceive the changes in the generator unit power angle curve, predict the power angle change trend in advance, and realize emergency control of generator tripping. Thus, by combining deep neural networks and reinforcement learning algorithms, it extracts the spatiotemporal features of the power grid transient response, realizes rapid perception and decision-making of the power grid transient situation, improves the protection effect of emergency control, ensures the safe and stable operation of the power grid, and at the same time reduces the data dimension that the reinforcement learning agent needs to process and improves the training convergence efficiency. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art 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.

[0051] Figure 1 A flowchart illustrating the steps of a relay protection strategy generation method provided in an embodiment of the present invention;

[0052] Figure 2 A schematic diagram illustrating the training effect of a model combining spatiotemporal feature extraction and deep reinforcement learning, provided in an embodiment of the present invention;

[0053] Figure 3 This is a schematic diagram of the overall process of a relay protection strategy generation method provided in an embodiment of the present invention;

[0054] Figure 4 This is a structural block diagram of a relay protection strategy generation device provided in an embodiment of the present invention. Detailed Implementation

[0055] This invention provides a relay protection strategy generation method, apparatus, electronic device, and storage medium to solve or partially solve the technical problem of poor performance of existing power grid emergency protection control methods.

[0056] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0057] As an example, for power grid protection, existing power grid protection strategies mainly adopt fault set scanning based on typical system operation modes to construct a relatively conservative operating space for protection strategy verification. However, with the gradual advancement of new power systems, power grid operation is becoming more complex, and power flow patterns are becoming more diverse, which leads to a continuous squeeze on the relatively conservative operating space, making it difficult to construct protection strategies based on typical operating modes while taking into account both safety and economy.

[0058] Based on the differences in the generation time and execution method of protection strategies, research on protection strategies mainly includes three types: "offline pre-decision, real-time matching", "online pre-decision, real-time matching", and "real-time decision-making, real-time control".

[0059] The current power grid protection mainly adopts the first mode, which requires offline combination of massive operating modes and fault sets, and manual creation of protection strategy tables. This method has a good effect on the stage where the traditional power grid operating mode is relatively certain and the power grid development changes slowly.

[0060] With the development of power grid measurement and communication systems, complete real-time state-space observation of the power grid has become possible. Furthermore, thanks to the continuous development of simulation technology, real-time simulation platforms based on high-performance simulation and high-precision power grid simulation models have also developed rapidly. Therefore, the combined effect of these two factors makes the "online pre-decision, real-time matching" protection mode possible. "Online pre-decision, real-time matching" refers to formulating protection strategy plans through rolling simulation analysis of the real-time power grid, and executing the latest protection strategy when an actual fault occurs. Compared to the "offline pre-decision, real-time matching" mode, this mode improves the timeliness and accuracy of the strategy. Currently, this mode has been practically applied in Guangdong, Shandong, Shaanxi, and other regions.

[0061] On the other hand, with the gradual increase in the grid-connected capacity of new energy sources, scenarios have emerged in Northwest and Southwest my country where the grid-connected capacity of new energy sources exceeds that of traditional power sources. The uncertainty of new energy output significantly alters the transient fault characteristics of the power grid, becoming an unavoidable aspect in the formulation of protection strategies. In practice, the formulation of protection strategies requires the analysis and calculation of numerous operational scenarios. Offline / online pre-decision-making models are insufficient to meet the timeliness requirements of emergency control. In other words, to meet the operational needs of future new power systems, it is urgent to establish protection strategy generation models suitable for the diversity and uncertainty of power flow, as well as the diversity of stability modes and the complexity of mechanisms.

[0062] In summary, in order to ensure the stable operation of the power grid and enable timely decision-making and emergency control measures in the event of a fault or potential fault, such as isolating and disconnecting faulty generating units in the power grid, the transient fault characteristic analysis and short-circuit current calculation under the "real-time decision-making and real-time control" mode urgently need to be studied.

[0063] Therefore, one of the core inventive points of this invention is to provide a relay protection strategy generation method based on the spatiotemporal feature analysis of transient processes. First, a graph neural network is used to extract the spatial features of the power grid to extract features of the spatial propagation of transient faults and the response differences of generator units at different locations. Then, a long short-time memory neural network is used to extract temporal features to effectively perceive the changes in the generator unit power angle curve, predict the power angle change trend in advance, and realize emergency control of generator tripping. Thus, by combining deep neural networks and reinforcement learning algorithms, the spatiotemporal features of the power grid transient response are extracted, enabling rapid perception and decision-making of the power grid transient situation, improving the protection effect of emergency control, ensuring the safe and stable operation of the power grid, and reducing the data dimension that the reinforcement learning agent needs to process, thereby improving the training convergence efficiency.

[0064] Reference Figure 1 The diagram illustrates a flowchart of a relay protection strategy generation method provided by an embodiment of the present invention, which may specifically include the following steps:

[0065] Step 101: Obtain real-time power grid data of the power grid under test, and construct a transient response matrix based on the real-time power grid data;

[0066] During the operation of the power grid, multiple relevant data of the power grid can be collected in real time, such as the number of generators, the number of generators, the number of substations, as well as the corresponding power angle, power, voltage and other power data that can characterize the current operating status of the power grid. A transient response matrix can be constructed based on the collected data to serve as input data for the subsequent feature extraction process.

[0067] In the specific implementation, obtaining the real-time power grid data of the power grid under test and constructing the transient response matrix based on the real-time power grid data can be as follows:

[0068] First, real-time power grid data of the power grid under test is acquired, and nodal feature data at multiple time points are extracted from the real-time power grid data. The format of each nodal feature data is as follows:

[0069]

[0070] Among them, Z t N represents the node feature data at time point t. I N represents the number of generators. J N represents the number of loads. N For the number of substations, The power angle of the generator is a characteristic of the node. For load power, This refers to the substation bus voltage. This refers to the wiring method for substations.

[0071] From the perspective of time characteristics, node feature data Z t Information from only one time segment is insufficient to analyze the power grid operation trend. The output of power grid control actions by the control agent and the adoption of appropriate measures to avoid power angle instability are inseparable from the analysis and understanding of the trends of generator power angle, node power, bus voltage, etc. Therefore, the characteristic data of power grid nodes at multiple time points (or with time windows as the measurement unit) can be combined to form several time series data with spatial characteristics.

[0072] Furthermore, the nodal feature data from multiple time points can be combined using the following formula to construct a transient response matrix, which represents the time series data of multiple spatial features:

[0073] s t =(Z t Z t-1 , ..., Z t-C+1 )

[0074] Among them, s t This is the transient response matrix, i.e., time series data, where C represents the number of time points.

[0075] Through the above calculation process, it can be seen that the transient response matrix is ​​a characteristic matrix containing multiple time sections and multiple quantities.

[0076] Step 102: Input the transient response matrix into the relay protection prediction model to extract spatiotemporal features and obtain the spatiotemporal features of the power grid;

[0077] After obtaining the transient response matrix through data processing in step 101, the transient response matrix can be input into the relay protection prediction model for spatiotemporal feature extraction to obtain the spatiotemporal features of the power grid.

[0078] Among them, relay protection is an important measure to detect faults or abnormalities in the power system, thereby issuing alarm signals or directly isolating or cutting off the faulty part. The relay protection prediction model is a prediction model that can extract spatiotemporal features from the transient response matrix and predict the stability of the power grid operation state based on the model output.

[0079] Specifically, the relay protection prediction model can mainly include graph neural networks and long short-term memory neural networks. The spatiotemporal characteristics of the power grid include the spatial characteristics and the temporal characteristics of the power grid. Therefore, the step of inputting the transient response matrix into the relay protection prediction model to extract spatiotemporal features and obtain the spatiotemporal characteristics of the power grid can be further described as follows: inputting the transient response matrix into the graph neural network to extract features and obtain the spatial characteristics of the power grid, and extracting the temporal characteristics of the power grid from the spatial characteristics of the power grid through the long short-term memory neural network.

[0080] Graph Neural Networks (GNNs) are a general term for algorithms that use neural networks to learn graph-structured data, extract and discover features and patterns in graph-structured data, and meet the needs of graph learning tasks such as clustering, classification, prediction, segmentation, and generation.

[0081] In related technologies, graph neural networks can be mainly divided into five categories: graph convolutional networks (GCN), graph attention networks (GAN), graph autoencoders (GAE), graph generative networks (GGN), and graph spatial-temporal networks (GSTN).

[0082] In this embodiment of the invention, a graph convolutional network (GCN) is mainly used to extract the power grid spatial features of the transient response matrix. By using a graph convolutional network (GCN) for feature extraction, the influence of the topological connection relationship between power grid nodes on the transient fault features can be considered. Therefore, when performing calculations, the node feature data can be set to correspond to multiple topological nodes in the power grid under test. Multiple topological nodes can be connected to form a power grid node topology network.

[0083] In the specific implementation, the transient response matrix is ​​input into a graph neural network for feature extraction to obtain the power grid spatial features. Alternatively, the transient response matrix can be input into a graph neural network for multi-level feature extraction to obtain the power grid spatial features. The calculation formula is as follows:

[0084]

[0085] Where X( l+1 ) represents the spatial characteristics of the power grid corresponding to the (l+1)th layer, X( l Let σ represent the spatial characteristics of the power grid corresponding to the l-th layer, σ be the nonlinear activation function, and A represent the adjacency matrix corresponding to the topological node i. This represents the self-circulating matrix formed by adding a diagonal matrix to A. for The corresponding degree matrix, W(l) represents the weight coefficient matrix of the l-th layer, and b(l) represents the bias matrix of the l-th layer.

[0086] Based on the above formula, it can be concluded that the principle of training a graph neural network is to construct the node topology features by using the network connection relationships contained in the adjacency matrix corresponding to the topological nodes, thereby training the parameters (weight coefficients w and bias b) of the graph neural network to obtain a neural network that can effectively extract spatial features from time series data.

[0087] In this embodiment of the invention, a Long Short Term Memory (LSTM) neural network is mainly used as a method for extracting time-series features after a large disturbance in the power grid.

[0088] Among them, Long Short-Term Memory Neural Network (LSTM) is a special type of Recurrent Neural Network (RNN), which is an improvement on RNN. LSTM can effectively capture the semantic relationships between long sequences and alleviate the vanishing or exploding gradient phenomenon. At the same time, the structure of LSTM is more complex, and the problem of vanishing or exploding gradient is reduced by adding forget gate, update gate and output gate.

[0089] Therefore, by using this method for time series feature extraction, it is possible to extract the long-term power grid operation features through four internal states simultaneously, and to mine and predict the evolution trend of power grid transient fault features.

[0090] In the specific implementation, the power grid temporal features are extracted from the spatial features of the power grid using a Long Short-Term Memory (LSTM) neural network. The calculation formula for extracting the power grid temporal features from the spatial features of the power grid using an LSM neural network is as follows:

[0091]

[0092] h t =β t ⊙tanh(α t )

[0093] Y t=h t

[0094] in, β represents the amount of hidden state updates. t λ represents the input gate state variable. t μ represents the forget gate state. t Let X represent the output gate state, tanh be the activation function, W be the weight coefficients of the Long Short-Term Memory (LSTM) neural network, B be the bias coefficients of the LSTM neural network, and X be the output gate state. t h represents the input of the Long Short-Term Memory Neural Network at time point t, which is the output of the Graph Neural Network at the same time point. t-1 h represents the hidden node corresponding to time point t-1. t Represents the hidden node corresponding to time point t, ⊙ represents the convolution calculation, and α t-1 Let α represent the hidden state quantity corresponding to time point t-1. t Y represents the hidden state quantity corresponding to time point t. t This represents the output of the Long Short-Term Memory Neural Network at time point t.

[0095] Regarding the selection of activation functions, in the Long Short-Term Memory Neural Network (LSTM), the forget gate, input gate, and output gate use the Sigmoid function as the activation function. The output of the Sigmoid function is between 0 and 1, which conforms to the physical definition of gating. When the input is large or small, its output will be very close to 1 or 0, thus ensuring that the gate is open or closed.

[0096] When generating candidate memories, the hyperbolic tangent function tanh is used as the activation function. The output of the tanh function is between -1 and 1, which coincides with the feature distribution centered at 0 in most scenarios. In addition, the tanh function has a larger gradient than the sigmoid function near the input of 0, which usually makes the model converge faster.

[0097] It's worth noting that both of these activation functions are saturating, meaning that the output won't change significantly once the input reaches a certain value. If a non-saturating activation function, such as ReLU, is used, achieving the gating effect will be difficult.

[0098] In this embodiment of the invention, for the power grid feature extraction process, spatial features are first extracted through a graph convolutional network, and then temporal features are extracted through a long short-term memory network. This ensures that spatial correlation characteristics are effectively utilized, while effectively preventing the temporal features in the power grid data from being covered.

[0099] Step 103: If the spatiotemporal characteristics of the power grid represent the predicted operating state of the power grid under test and meet the protection action criteria, then the spatiotemporal characteristics of the power grid are input into the pre-trained generator tripping decision model for fault decision-making, and the power grid control action is output. The power grid control action is used to disconnect the predicted faulty generator in the power grid.

[0100] Once the spatiotemporal characteristics of the power grid output after feature extraction through the relay protection prediction model indicate that the predicted operating state of the power grid under test is stable, the power grid under test can continue to be monitored, and the real-time data acquisition and analysis steps can be repeated.

[0101] When the spatiotemporal characteristics of the power grid represent the predicted operating state of the power grid under test, which satisfies the protection action criteria, i.e., the protection action conditions provided in the embodiments of the present invention, it indicates that after analyzing and predicting the real-time data of the power grid under test, it can be determined that the current operating state is unstable or that an unstable situation may occur. That is, a certain topological node in the power grid is experiencing a problem and it is necessary to take corresponding emergency control measures as soon as possible. At this time, the spatiotemporal characteristics of the power grid can be input into the pre-trained generator tripping decision model for fault decision-making and output the power grid control action. According to the power grid control action, the relay protection strategy is adopted for the predicted faulty generator in the power grid under test, i.e., timely disconnection, isolating the faulty generator from other generators, and ensuring that it does not affect the operation of other lines.

[0102] Furthermore, inputting the spatiotemporal characteristics of the power grid into a pre-trained generator tripping decision model for fault decision-making and outputting power grid control actions can be done as follows: First, input the spatiotemporal characteristics of the power grid into the pre-trained generator tripping decision model and output the probability values ​​of the generator tripping units; then, based on the probability values ​​of the generator tripping units, sample the generator units in the power grid under test, identify the generator units that need to be tripped as the predicted fault generator units, and output the corresponding power grid control actions.

[0103] Sampling, also known as sampling, is the process of converting continuous quantities in the time or space domain into discrete quantities. After the grid spatiotemporal characteristics are processed for fault decision through the tripping decision model, the tripping probability value of each unit in the grid can be output according to the decision result. Then, based on the tripping probability value, the corresponding units are checked for discrete faults. Units with larger tripping probability values ​​or greater than the preset probability value are identified as predicted fault units. At the same time, the unit number and node location corresponding to the predicted fault unit can be quickly located according to the grid topology, and the corresponding unit number can be cut off in a timely manner to achieve relay protection for the grid.

[0104] As an optional implementation, before the relay protection prediction model and the tripping decision model are formally put into the emergency control of the power grid, relevant models can be constructed, and the constructed models can be trained based on simulation data or actual collected historical power grid datasets to improve the prediction accuracy of the models.

[0105] In a concrete implementation, the model building and training process can include the following steps:

[0106] Step S1: Construct a relay protection prediction model based on graph neural networks and long short-term memory neural networks;

[0107] As mentioned above, the relay protection prediction model is mainly used for extracting the spatiotemporal features of the power grid. In the feature extraction process, a graph neural network is used to extract the spatial features of the power grid, and then a long short-term memory neural network is used to extract the temporal features of the power grid. Therefore, a relay protection prediction model based on graph neural networks and long short-term memory neural networks can be constructed. Since graph neural networks and long short-term memory neural networks have been explained in the previous content, they will not be repeated here.

[0108] Step S2: Obtain the transient response dataset generated after the power grid fault, and input the transient response dataset into the relay protection prediction model;

[0109] In practice, a regional power grid can be used as the analysis object to carry out emergency control, collect transient response data generated after a power grid fault as a transient response dataset, and divide the transient response dataset into a training dataset and a test dataset to train the relay protection prediction model.

[0110] When constructing a dataset, all data can be hidden by removing geographical location information and represented by numerical indices to construct the corresponding transient response matrix.

[0111] Step S3: Use the transient response dataset to train the graph neural network for spatial feature extraction and output the transient response spatial feature set;

[0112] Next, the graph neural network can be trained to extract spatial features using the transient response dataset, and the transient response spatial feature set can be output. The spatial feature extraction training process can refer to the power grid spatial feature extraction process in the previous embodiment, which will not be repeated here.

[0113] Step S4: Use the transient response spatial feature set to train the long short-term memory neural network for time series feature extraction, output the transient response time series feature set, and save the trained relay protection prediction model at the same time.

[0114] The time-series feature extraction training process can refer to the time-series spatial feature extraction process in the aforementioned embodiment, and will not be repeated here. After the constructed model is trained, the model can be saved for use in subsequent online decision-making processes for power grid protection.

[0115] Step S5: Construct a reinforcement learning agent based on a deep reinforcement learning network;

[0116] In this embodiment of the invention, Deep Q-learning Networks (DQN) are used as reinforcement learning algorithms to construct reinforcement learning agents. It is understood that the deep reinforcement learning algorithms used in this step include, but are not limited to, Deep Q-learning Networks (DQN).

[0117] Among them, the Deep Q-Network algorithm is a classic reinforcement learning algorithm for solving tasks with discrete action spaces and continuous state spaces. The training process of the DQN reinforcement learning agent can be represented as:

[0118]

[0119] Where Q(*) is the Q function of reinforcement learning, A represents the action vector set, s and s′ represent the current and next state vectors, a and a′ represent the current and next action vectors, r is the reward value, γ is the discount factor, max represents taking the maximum value of Q, and α represents the reinforcement learning parameters.

[0120] Therefore, the loss function of the Q-network can be constructed in the form of mean squared error:

[0121]

[0122] ω* represents the loss function of the Q-network, argmin represents the variable value that minimizes the loss function, and s i Let s' represent the current state vector at time i. i Let a represent the next state vector corresponding to time i. i Let a' represent the current action vector at time i. i Let r represent the next action vector corresponding to time i. i Let Q represent the reward value at time i, ω represent the network parameters, and Q represent the reward value at time i. ω (*) represents the Q function with network parameters, N represents the number of training samples, and j represents the j-th sample.

[0123] Step S6: Obtain the data of the generator units that were disconnected after the power grid fault, and sort the data of the generator units according to the disconnection effect to obtain the disconnection effect dataset;

[0124] When training the generator tripping decision model based on reinforcement learning agents, training can be combined with generator tripping data. Therefore, it is possible to obtain generator tripping data that has been used to clear faults after a power grid fault, and sort the generator tripping data according to the tripping effect to obtain a generator tripping effect dataset.

[0125] Step S7: Combine the machine switching effect dataset, transient response spatial feature set, and transient response temporal feature set to train the reinforcement learning agent's policy;

[0126] Then, by combining the generator switching effect dataset, the transient response spatial feature set, and the transient response temporal feature set, the reinforcement learning agent can be trained on the basis of deep reinforcement learning. The transient response temporal feature set is input into the agent, and the probability value of the generator switching unit number is output and sampled to obtain the power grid control action.

[0127] Step S8: When the number of iterations for policy training reaches the maximum number of iterations, or when the reinforcement learning agent after policy training reaches a convergent state, stop the training iteration and output the switching decision model.

[0128] When the number of iterations for policy training reaches the maximum number of iterations, or when the reinforcement learning agent after policy training reaches a convergent state, the training iteration stops, and an online protection policy generation agent is output as the switching decision model.

[0129] In this embodiment of the invention, by using the spatiotemporal characteristics of the power grid transient response as the observations of the agent for training, the training efficiency of the agent and the quality of decision-making can be improved.

[0130] For better illustration, refer to, by way of example, Figure 2 The diagram illustrates the training effect of a model combining spatiotemporal feature extraction and deep reinforcement learning, as provided in an embodiment of the present invention.

[0131] from Figure 2 It can be seen that during model training, the test accuracy increases with the number of training rounds and eventually stabilizes at nearly 100%, while the loss function decreases with the number of training rounds and eventually stabilizes at around 25%. Both the test accuracy and the loss function can quickly stabilize without going through a large number of training rounds, thus greatly reducing the time cost. Therefore, the method proposed in this embodiment of the invention can quickly converge reinforcement learning training to a stable power grid operation state, which has good application prospects.

[0132] Furthermore, under different ratios of positive and negative samples, the method proposed in this embodiment of the invention is compared with the test accuracy when trained using SVM (Support Vector Machine) or CNN (Convolutional Neural Network). The comparison results are shown in Table 1 below:

[0133] Detection Algorithm 60% positive samples 80% positive samples 90% positive samples 95% positive samples SVM 96.6% 94.2% 91.5% 88.5% CNN 100% 100% 98.5% 97.7% Method of the present invention 100% 100% 100% 100%

[0134] Table 1: Test accuracy when using different algorithms for model training

[0135] As can be clearly seen from Table 1, regardless of the ratio of positive to negative samples, the model training method proposed in this invention has stronger robustness compared to other artificial intelligence algorithms. In other words, the spatiotemporal feature extraction combined with deep reinforcement learning method proposed in this embodiment does not depend on the sample ratio during the model training process.

[0136] In this embodiment of the invention, a relay protection strategy generation method based on the spatiotemporal feature analysis of transient processes is provided. First, a graph neural network is used to extract the spatial features of the power grid, which can extract features of the spatial propagation of transient faults and the response differences of generator units at different locations. Then, a long short-time memory neural network is used to extract the temporal features, which can effectively perceive the changes in the generator unit power angle curve, predict the power angle change trend in advance, and realize emergency control of generator tripping. Thus, by combining deep neural networks and reinforcement learning algorithms, the spatiotemporal features of the power grid transient response are extracted, realizing rapid perception and decision-making of the power grid transient situation, improving the protection effect of emergency control, ensuring the safe and stable operation of the power grid, and reducing the data dimension that the reinforcement learning agent needs to process, thereby improving the training convergence efficiency.

[0137] For better illustration, refer to Figure 3 This illustration shows an overall flowchart of a relay protection strategy generation method provided by an embodiment of the present invention. It should be noted that this example only briefly describes the general flow of the relay protection strategy generation method. For details of the relevant steps, please refer to the relevant content in the foregoing embodiments. It is understood that the present invention does not limit this.

[0138] The relay protection strategy generation method in this embodiment of the invention can be mainly divided into two modules: a model transfer module and an online decision-making module.

[0139] For the model transfer module, a simulation method can be used to obtain the dataset for network training. Specifically, the operating mode data and fault duration data can be used as the input samples for training. At the same time, the switching units are determined by the fault location, and the switching units are sorted (numbered) based on the switching effect. The sorted switching units are used as the output samples for training. The input samples and output samples are used to train the constructed reinforcement learning agent (in this invention, VGG-16 (Visual Geometry Group Network-16, a deep learning model) network is used as a deep Q network).

[0140] Meanwhile, for the construction and training of the relay protection prediction model (not shown in the figure), a relay protection prediction model based on graph convolutional network combined with long short-term memory neural network is constructed. Real-time transient response data after power grid faults are read, and a power grid state vector (i.e., transient response matrix) is constructed based on the real-time transient response data. Then, a spatial feature extraction algorithm (graph convolutional network GCN) is applied to extract the spatial distribution features of the power grid transient response, i.e., the power grid spatial features. Then, a temporal feature extraction algorithm (long short-term memory neural network LSTM) is applied to extract the temporal features of the power grid transient response from the power grid spatial features, i.e., the power grid temporal features. Through multiple feature extraction processes, the relay protection prediction model is trained and saved for use in online decision-making.

[0141] After the power grid spatial characteristics and power grid temporal characteristics are processed and output by the relay protection prediction model, they are used as spatiotemporal state characteristics. Then, the spatiotemporal state characteristics representing the power grid operation status are input into the reinforcement learning agent. Combined with the input and output samples of the network training samples, the reinforcement learning agent is trained to make emergency control generator tripping decisions to obtain the generator tripping decision model. Then, the generator tripping decision model is deployed to the actual power grid to collect power grid data in real time and generate online protection strategies.

[0142] For the online decision-making module, real-time power grid data is collected and input into the relay protection prediction model for feature extraction processing. The prediction results are output. If the prediction results indicate that the power grid is operating stably, monitoring continues. If the prediction results indicate that the power grid operation meets the protection action criteria, the extracted spatiotemporal features of the power grid are input into the tripping decision model for fault decision-making. The unit number of the predicted faulty unit is determined, and the corresponding power grid control action is output to disconnect the predicted faulty unit corresponding to the unit number, thus completing the online decision-making for relay protection of the power grid.

[0143] Reference Figure 4 The diagram illustrates a structural block diagram of a relay protection strategy generation device provided in an embodiment of the present invention, which may specifically include:

[0144] The transient response matrix construction module 401 is used to acquire real-time power grid data of the power grid under test and construct a transient response matrix based on the real-time power grid data.

[0145] The spatiotemporal feature extraction module 402 is used to input the transient response matrix into the relay protection prediction model to extract spatiotemporal features and obtain the spatiotemporal features of the power grid.

[0146] The power grid control action output module 403 is used to input the power grid spatiotemporal characteristics into a pre-trained generator tripping decision model to make fault decisions if the predicted operating state of the power grid under test meets the protection action criteria, and output the power grid control action. The power grid control action is used to disconnect the predicted faulty generator in the power grid.

[0147] In one optional embodiment, the transient response matrix construction module 401 includes:

[0148] The node feature data extraction module is used to acquire real-time power grid data of the power grid under test, and extract node feature data at multiple time points from the real-time power grid data. The format of each node feature data is as follows:

[0149]

[0150] Among them, Z t N represents the node feature data at time point t. I N represents the number of generators. J N represents the number of loads. N For the number of substations, The power angle of the generator is a characteristic of the node. For load power, This refers to the substation bus voltage. This refers to the wiring method for substations;

[0151] The time series data construction module is used to combine nodal feature data from multiple time points using the following formula to construct a transient response matrix, wherein the transient response matrix represents time series data with multiple spatial features:

[0152] s t =(Z t Z t-1 , ..., Z t-C+1 )

[0153] Among them, s t This is the transient response matrix, i.e., time series data, where C represents the number of time points.

[0154] In one optional embodiment, the relay protection prediction model includes a graph neural network and a long short-term memory neural network, the power grid spatiotemporal features include power grid spatial features and power grid time-series features, and the spatiotemporal feature extraction module 402 is specifically used for:

[0155] The transient response matrix is ​​input into a graph neural network for feature extraction to obtain the power grid spatial features, and the power grid temporal features are extracted from the power grid spatial features through a long short-term memory neural network.

[0156] In one optional embodiment, the node feature data corresponds to multiple topological nodes in the power grid under test, and the spatiotemporal feature extraction module 402 includes a power grid spatial feature extraction module, which is specifically used for:

[0157] The transient response matrix is ​​input into a graph neural network for multi-level feature extraction to obtain the spatial features of the power grid. The calculation formula is as follows:

[0158]

[0159] Among them, X (l+1) X represents the spatial characteristics of the power grid corresponding to the (l+1)th layer. (l) Let σ represent the spatial characteristics of the power grid corresponding to the l-th layer, σ be a nonlinear activation function, and A represent the adjacency matrix corresponding to the topological node i. This represents the self-circulating matrix formed by adding a diagonal matrix to A. for The corresponding degree matrix, W (l) Let b represent the weight coefficient matrix of the l-th layer. (l) This represents the bias matrix of the l-th layer.

[0160] In one optional embodiment, the spatiotemporal feature extraction module 402 includes a power grid time series feature extraction module, which is specifically used for:

[0161] The power grid temporal features are extracted from the power grid spatial features using a long short-term memory neural network, and the calculation formula is as follows:

[0162]

[0163] h t =β t ⊙tanh(α t )

[0164] Y t =h t

[0165] in, β represents the amount of hidden state updates. t λ represents the input gate state variable.t μ represents the forget gate state. t Let X represent the output gate state, tanh be the activation function, W be the weight coefficients of the Long Short-Term Memory (LSTM) neural network, B be the bias coefficients of the LSTM neural network, and X be the output gate state. t h represents the input of the Long Short-Term Memory Neural Network at time point t, which is the output of the Graph Neural Network at the same time point. t-1 h represents the hidden node corresponding to time point t-1. t Represents the hidden node corresponding to time point t, ⊙ represents the convolution calculation, and α t-1 Let α represent the hidden state quantity corresponding to time point t-1. t Y represents the hidden state quantity corresponding to time point t. t This represents the output of the Long Short-Term Memory Neural Network at time point t.

[0166] In one optional embodiment, the power grid control action output module 403 includes:

[0167] The generator tripping probability value output module is used to input the spatiotemporal characteristics of the power grid into the pre-trained generator tripping decision model and output the generator tripping probability value.

[0168] The unit sampling module is used to sample the grid under test based on the probability value of the unit to be cut off, identify the units that need to be cut off as the predicted fault units, and output the corresponding grid control actions.

[0169] In one alternative embodiment, the device further includes:

[0170] The relay protection prediction model construction module is used to build relay protection prediction models based on graph neural networks and long short-time memory neural networks.

[0171] The transient response dataset acquisition module is used to acquire the transient response dataset generated after a power grid fault and input the transient response dataset into the relay protection prediction model.

[0172] The spatial feature extraction training module is used to train the graph neural network to extract spatial features using the transient response dataset, and output a transient response spatial feature set.

[0173] The timing feature extraction training module is used to train the long short-term memory neural network by using the transient response spatial feature set, output the transient response timing feature set, and save the trained relay protection prediction model.

[0174] The reinforcement learning agent building module is used to build reinforcement learning agents based on deep reinforcement learning networks.

[0175] The generator tripping effect dataset construction module is used to acquire data on generator tripping units that have been tripped after a power grid fault, and sort the generator tripping unit data according to the tripping effect to obtain the generator tripping effect dataset.

[0176] The policy training module is used to train the reinforcement learning agent by combining the machine switching effect dataset, the transient response space feature set, and the transient response temporal feature set.

[0177] The switching decision model output module is used to stop training iteration and output the switching decision model when the number of iterations of policy training reaches the maximum number of iterations, or when the reinforcement learning agent after policy training reaches the convergence state.

[0178] As the device embodiment is basically similar to the method embodiment, it is described in a relatively simple way. For relevant details, please refer to the description of the method embodiment above.

[0179] This invention also provides an electronic device, which includes a processor and a memory:

[0180] The memory is used to store program code and transfer the program code to the processor;

[0181] The processor is used to execute the relay protection strategy generation method of any embodiment of the present invention according to the instructions in the program code.

[0182] This invention also provides a computer-readable storage medium for storing program code for executing the relay protection strategy generation method of any embodiment of this invention.

[0183] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0184] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0185] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0186] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0187] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0188] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating relay protection strategies for power grids, characterized in that, include: Acquire real-time power grid data of the power grid under test, and construct a transient response matrix based on the real-time power grid data; The transient response matrix is ​​input into the relay protection prediction model for spatiotemporal feature extraction to obtain the spatiotemporal features of the power grid. If the spatiotemporal characteristics of the power grid indicate that the predicted operating state of the power grid under test meets the protection action criteria, then the spatiotemporal characteristics of the power grid are input into the pre-trained generator tripping decision model for fault decision-making, and the power grid control action is output. The power grid control action is used to disconnect the predicted faulty generator in the power grid. The step of acquiring real-time power grid data of the power grid under test and constructing a transient response matrix based on the real-time power grid data includes: Acquire real-time power grid data of the power grid under test, and extract node feature data at multiple time points from the real-time power grid data. The format of each node feature data is as follows: ; in, This represents the node feature data corresponding to time point t. For the number of generators, For the number of loads, For the number of substations, The power angle of the generator is a characteristic of the node. For load power, This refers to the substation bus voltage. This refers to the wiring method for substations; The transient response matrix is ​​constructed by combining nodal feature data from multiple time points using the following formula, whereby the transient response matrix represents time series data with multiple spatial features: ; in, This is the transient response matrix, i.e., time series data. Indicates the number of time points; The step of inputting the spatiotemporal characteristics of the power grid into a pre-trained tripping decision model for fault decision-making and outputting power grid regulation actions includes: The spatiotemporal characteristics of the power grid are input into a pre-trained generator tripping decision model, which outputs the probability values ​​of the generator units to be tripped. Based on the probability value of the unit to be disconnected, the power grid under test is sampled, the units that need to be disconnected are identified as the predicted fault units, and the corresponding power grid control actions are output.

2. The relay protection strategy generation method according to claim 1, characterized in that, The relay protection prediction model includes a graph neural network and a long short-time memory neural network. The power grid spatiotemporal features include power grid spatial features and power grid temporal features. The step of inputting the transient response matrix into the relay protection prediction model for spatiotemporal feature extraction to obtain the power grid spatiotemporal features includes: The transient response matrix is ​​input into a graph neural network for feature extraction to obtain the power grid spatial features, and the power grid temporal features are extracted from the power grid spatial features through a long short-term memory neural network.

3. The relay protection strategy generation method according to claim 2, characterized in that, The node feature data corresponds to multiple topological nodes in the power grid under test. The step of inputting the transient response matrix into a graph neural network for feature extraction to obtain the power grid spatial features includes: The transient response matrix is ​​input into a graph neural network for multi-level feature extraction to obtain the spatial features of the power grid. The calculation formula is as follows: ; in, This represents the spatial characteristics of the power grid corresponding to the (l+1)th layer. This represents the spatial characteristics of the power grid corresponding to the l-th layer. It is a non-linear activation function. This represents the adjacency matrix corresponding to topological node i. express The self-circulating matrix after adding the diagonal matrix, for The corresponding degree matrix, This represents the weight coefficient matrix of the l-th layer. This represents the bias matrix of the l-th layer.

4. The relay protection strategy generation method according to claim 3, characterized in that, The step of extracting power grid temporal features from the power grid spatial features using a long short-term memory neural network includes: The power grid temporal features are extracted from the power grid spatial features using a long short-term memory neural network, and the calculation formula is as follows: ; in, This indicates the amount of hidden state updates. Indicates the input gate state quantity. Represents the forget gate state quantity. Indicates the output gate state quantity. Let W be the activation function, W be the weight coefficients of the Long Short-Term Memory (LSTM) neural network, and B be the bias coefficients of the LSTM neural network. This represents the input of the Long Short-Term Memory Neural Network at time point t, which corresponds to the output of the Graph Neural Network at the same time point. This represents the hidden node corresponding to time point t-1. This represents the hidden node corresponding to time point t. This represents convolution calculation. This represents the hidden state quantity corresponding to time point t-1. This represents the hidden state quantity corresponding to time point t. This represents the output of the Long Short-Term Memory neural network at time point t.

5. The relay protection strategy generation method according to any one of claims 1 to 4, characterized in that, Also includes: Construct a relay protection prediction model based on graph neural networks and long short-term memory neural networks; Obtain the transient response dataset generated after a power grid fault, and input the transient response dataset into the relay protection prediction model; The graph neural network is trained using the transient response dataset to extract spatial features and output a transient response spatial feature set. The transient response spatial feature set is used to train the long short-term memory neural network for time-series feature extraction, outputting the transient response time-series feature set, and simultaneously saving the trained relay protection prediction model. Construct reinforcement learning agents based on deep reinforcement learning networks; Data on the generator units that were disconnected after a power grid fault were obtained, and the disconnected generator unit data were sorted according to the disconnection effect to obtain a disconnection effect dataset; The reinforcement learning agent is trained by combining the machine switching effect dataset, the transient response spatial feature set, and the transient response temporal feature set. When the number of iterations for policy training reaches the maximum number of iterations, or when the reinforcement learning agent after policy training reaches a convergent state, the training iteration stops and the switching decision model is output.

6. A relay protection strategy generation device, characterized in that, include: The transient response matrix construction module is used to acquire real-time power grid data of the power grid under test and construct a transient response matrix based on the real-time power grid data. The spatiotemporal feature extraction module is used to input the transient response matrix into the relay protection prediction model to extract spatiotemporal features and obtain the spatiotemporal features of the power grid. The power grid control action output module is used to input the power grid spatiotemporal characteristics into a pre-trained generator tripping decision model to make fault decisions and output power grid control actions if the predicted operating state of the power grid under test meets the protection action criteria. The power grid control actions are used to disconnect the generators with predicted faults in the power grid. The transient response matrix construction module includes: The node feature data extraction module is used to acquire real-time power grid data of the power grid under test, and extract node feature data at multiple time points from the real-time power grid data. The format of each node feature data is as follows: ; in, This represents the node feature data corresponding to time point t. For the number of generators, For the number of loads, For the number of substations, The power angle of the generator is a characteristic of the node. For load power, This refers to the substation bus voltage. This refers to the wiring method for substations; The time series data construction module is used to combine nodal feature data from multiple time points using the following formula to construct a transient response matrix, wherein the transient response matrix represents time series data with multiple spatial features: ; in, This is the transient response matrix, i.e., time series data. Indicates the number of time points; The power grid control action output module includes: The generator tripping probability value output module is used to input the spatiotemporal characteristics of the power grid into the pre-trained generator tripping decision model and output the generator tripping probability value. The unit sampling module is used to sample the grid under test based on the probability value of the unit to be cut off, identify the units that need to be cut off as the predicted fault units, and output the corresponding grid control actions.

7. An electronic device, characterized in that, The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the relay protection strategy generation method according to any one of claims 1-5 according to the instructions in the program code.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code for executing the relay protection strategy generation method according to any one of claims 1-5.