Explanatable power system blocking risk perception method based on topology robust features

By constructing an interpretable prediction model based on topological robust features, the problem of insufficient applicability of power system congestion risk perception methods when topology changes is solved. It achieves good prediction results and model interpretability under unseen topology changes, thereby improving the trust of dispatchers.

CN122048003APending Publication Date: 2026-05-15WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN UNIV
Filing Date
2026-01-21
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing data-driven methods for sensing power system congestion risks are not well-suited to changes in grid topology and lack interpretability, leading to decreased model prediction performance and low trust among dispatchers.

Method used

By constructing an interpretable prediction model based on topologically robust features, an information-assisted feature combination optimization method is used to select a topologically robust feature set. The binary locust optimization algorithm and k-nearest neighbor classifier are combined to generate feature combinations. A tensorized long short-term memory network is designed and time and variable attention mechanisms are applied to construct an interpretable prediction model with topological adaptability.

Benefits of technology

It achieves good prediction results even under unseen topology changes, improves the model's topology adaptability and interpretability, and enhances schedulers' confidence in the prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122048003A_ABST
    Figure CN122048003A_ABST
Patent Text Reader

Abstract

The invention provides an interpretable power system blocking risk perception method based on topology robust features, and the method comprises the steps: constructing a feature variable alternative set based on a power grid operation mechanism and blocking event features, and carrying out the screening through employing an information-assisted feature combination optimization method, and obtaining a topology robust feature set; constructing an interpretable prediction model based on the topological robust feature set; obtaining a historical blocking event case, constructing a data set covering a plurality of topology scenes and operation conditions, and training the interpretable prediction model through the data set; and obtaining to-be-tested data, and performing risk perception on the to-be-tested data through the trained interpretable prediction model to obtain a prediction result. According to the method and the device, various topology scenes can be adapted without notification of topology change in advance, and the problem of poor applicability in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system operation safety technology, and in particular to an interpretable power system congestion risk perception method based on topological robust features. Background Technology

[0002] In recent years, driven by the urgent need for deep decarbonization and mitigating global warming, both domestic and international efforts have been vigorously developing renewable energy and promoting the electrification of end-use energy demand, leading to profound changes in the operating characteristics of modern power systems. On the one hand, the intermittency and volatility of renewable energy, coupled with the high proportion of power electronic equipment integration, have significantly increased the uncertainty of grid operation. On the other hand, the lag in grid infrastructure construction behind the pace of energy transition has resulted in the system frequently operating in a tight balance state, leading to a sharp increase in the frequency of network congestion events (NCEs), which seriously threaten the safe, stable, and economical operation of the power system. Typically, congestion management is carried out during routine day-ahead and intraday dispatching. However, due to insufficient forecasting accuracy and a lack of flexibility in intraday dispatching, dispatchers may still face real-time network congestion events. In such cases, due to the lack of early warning procedures, dispatchers often can only address the issue after the congestion event occurs, resulting in insufficient time for strategy formulation and resource allocation. Therefore, congestion event prognosis (CEP) is crucial for early warning of potential risks.

[0003] With the rapid development of data acquisition systems and data science, data-driven methods are showing great promise in the field of high-performance real-time event prediction. These methods typically leverage machine learning to uncover potential data correlations between input features and event states. Subsequently, using the learned patterns, online measurement data can be quickly transformed into predictions of the target event. Furthermore, since dispatchers often only process data in real-time after a congestion event occurs, NCEs data recorded before countermeasures are taken may exhibit certain temporal evolution trends. Measurement sequences (time series) fully record the development process of events, and the valuable temporal data patterns they contain can be fully learned, thus helping to identify network congestion events at an early stage. To directly learn multivariate time series (MTS) from measurement sequences, deep learning models such as convolutional neural networks (CNNs), gated recurrent units (GRUs), and recurrent networks based on long short-term memory (LSTM) have been widely used. However, existing data-driven power system congestion risk perception methods still suffer from two key shortcomings in practical applications, severely hindering their engineering implementation: First, there is insufficient adaptability to changes in power grid topology. In actual power system operation, the power grid topology frequently changes due to factors such as equipment maintenance, network reconfiguration, and switching operations. Existing data-driven models are mostly trained based on historical data under a baseline topology. When the power grid topology changes, the feature patterns learned from the original training data may no longer be applicable, leading to a significant decrease in model prediction performance. Training a dedicated model for each type of topology change would not only incur extremely high computational costs, but also be problematic because topology change information is not always timely or accurate. Especially in distribution networks, many topology changes are not reported, making it impossible for dispatchers to determine when the model should be updated. Real-time training of new models is not feasible in engineering.

[0004] Secondly, the models lack interpretability. Most existing deep learning models are "black box" models, making it impossible to clearly trace the contribution of individual input variables to the prediction results. Power grid dispatching decisions are directly related to system safety, and dispatchers need to understand the logic behind the generation of prediction results to build trust and make reasonable decisions. However, the decision-making process of "black box" models is opaque, making it difficult to explain the role of key features and the patterns of data correlation. This makes it difficult to gain the trust of dispatchers and limits their application in actual dispatching scenarios.

[0005] There is currently no effective solution to the problem of poor applicability of existing related technologies. Summary of the Invention

[0006] This invention provides an interpretable power system congestion risk perception method based on topological robust features, in order to address the shortcomings of existing related technologies in terms of poor applicability.

[0007] In a first aspect, the present invention provides an interpretable power system congestion risk perception method based on topological robust features, comprising: Based on the power grid operation mechanism and the characteristics of congestion events, a candidate set of feature variables is constructed, and an information-assisted feature combination optimization method is used to screen and obtain a topologically robust feature set. An interpretable prediction model is constructed based on the aforementioned topologically robust feature set; Obtain historical blocking event cases, construct a dataset covering various topological scenarios and operating conditions, and train the interpretable prediction model using the dataset; The test data is acquired, and the risk perception of the test data is performed on the test data through a trained interpretable prediction model to obtain the prediction result.

[0008] According to the present invention, an interpretable power system congestion risk perception method based on topological robust features is provided, which uses an information-assisted feature combination optimization method to screen and obtain a topological robust feature set, including: The feature priority score for each candidate variable in the candidate feature variable set is calculated using the maximum information coefficient. A feature combination optimization framework with an embedded k-nearest neighbor classifier is constructed; the k-nearest neighbor classifier calculates relative distances based on a multidimensional dynamic event regularization method. Multiple feature combinations are generated iteratively by combining the binary locust optimization algorithm, and the topologically robust feature set is obtained by evaluating and evolving based on the k-nearest neighbor classifier.

[0009] According to the present invention, an interpretable power system congestion risk perception method based on topological robust features is provided. This method iteratively generates multiple feature combinations using a binary locust optimization algorithm, and evaluates and evolves these combinations based on the k-nearest neighbor classifier to obtain a topological robust feature set, including: The binary locust optimization algorithm is executed, which guides the search direction based on the feature priority score with the maximum information coefficient and iteratively generates multiple feature combinations. The prediction performance was evaluated in parallel using the k-nearest neighbor classifier. The fitness of each feature combination is calculated using a preset evaluation function, and a topologically robust feature set that can provide a stable contribution to the perception of blocking events under different topologies is output.

[0010] According to the present invention, an interpretable power system congestion risk perception method based on topological robust features is provided, which constructs an interpretable prediction model based on the topological robust feature set, including: Design tensor-quantized long short-term memory network units to generate hidden state matrices corresponding to the feature variables in the topological robust feature set; A temporal attention mechanism is applied to the hidden state matrix to quantify the importance of different time steps and form a historical information aggregation context tensor. By incorporating knowledge of time-static covariates and combining it with historical information to aggregate context tensors, a comprehensive context tensor is generated. A variable attention mechanism is applied to the integrated context tensor to generate an interpretable prediction model.

[0011] According to the present invention, an interpretable power system congestion risk perception method based on topological robust features incorporates time static covariate knowledge and combines the historical information to aggregate a context tensor to generate a comprehensive context tensor, including: In long short-term memory networks, knowledge of time-static covariates is incorporated through trigonometric transformation encoding. A tensor quantization feedforward network is used to form a static fusion context matrix, maintaining a one-to-one correspondence with the static covariates; The static fusion context matrix and the historical information aggregation context tensor are concatenated to form a comprehensive context tensor.

[0012] According to the present invention, an interpretable power system congestion risk perception method based on topological robust features is provided, which applies a variable attention mechanism to the comprehensive context tensor to generate an interpretable prediction model, including: A variable attention mechanism is applied to the integrated context tensor to quantify the contribution of each feature to the prediction result; Data representations are mapped to the classification space using variable-specific fully connected networks; By combining the softmax activation function, the classification results of the blocking events are output, resulting in an interpretable prediction model.

[0013] According to the present invention, an interpretable power system congestion risk perception method based on topological robust features is provided, which acquires historical congestion event cases, constructs a dataset covering multiple topological scenarios and operating conditions, and trains the interpretable prediction model using the dataset, including: Acquire historical actual load and renewable energy time-series data to generate multiple historical blocking event cases; Adjust the branch switches to generate a dataset covering various topological scenarios and operating conditions; The interpretable prediction model is trained and tested using the dataset, and its predictive performance and topology adaptability are verified under different topological scenarios using preset test metrics.

[0014] According to the present invention, an interpretable power system congestion risk perception method based on topological robust features is provided, wherein the topological scenarios include seen topological scenarios, unseen topological scenarios, and mixed topological scenarios.

[0015] Secondly, the present invention also provides an interpretable power system congestion risk sensing device based on topological robust features, comprising: The screening module is used to construct a candidate set of feature variables based on the power grid operation mechanism and the characteristics of congestion events, and to screen the topology robust feature set using an information-assisted feature combination optimization method. A building module is used to construct an interpretable prediction model based on the topologically robust feature set; The training module is used to acquire historical blocking event cases, construct a dataset covering various topological scenarios and operating conditions, and train the interpretable prediction model using the dataset. The perception module is used to acquire the data to be tested and to perform risk perception on the data to be tested through a trained interpretable prediction model to obtain prediction results.

[0016] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the interpretable power system congestion risk perception method based on topological robust features as described in the first aspect above.

[0017] In a fourth aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the interpretable power system congestion risk perception method based on topological robust features as described in the first aspect above.

[0018] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the interpretable power system congestion risk perception method based on topological robust features as described in the first aspect above.

[0019] Compared with the prior art, the present invention has the following beneficial effects: This invention provides an interpretable power system congestion risk perception method based on topology robust features. It uses a feature combination optimization method to select key input variables that are both helpful in identifying early data patterns of congestion events and possess topology adaptability. Variables with low contribution to prediction or that would impair model performance during topology changes are removed. This constructs a topology robust congestion event perception model, i.e., an interpretable prediction model, which can still achieve good prediction results when faced with unseen topology changes. Compared to existing technologies, this method can adapt to various topology scenarios without prior notification of topology changes, solving the problem of poor applicability in existing related technologies. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in this 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 some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0021] Figure 1 This is a flowchart of the interpretable power system congestion risk perception method based on topological robust features provided by the present invention; Figure 2 This is an embodiment of the invention based on the tensor dot product operation method. Value derivation graph; Figure 3 This is a structural diagram of the interpretable blocking event prediction model in an embodiment of the present invention; Figure 4 This is an improved IEEE-33 node system topology diagram in an embodiment of the present invention; Figure 5 This is an average learning curve of AL-LSTMs using different variable sets in the embodiments of the present invention; Figure 6 The static covariates selected based on the FCO method in this embodiment of the invention are and Histogram of attention weights for sample-level variables extracted by trained AT-LSTMs models; Figure 7 This is a sample-level variable attention weight histogram extracted by the AT-LSTMs model trained based on different variables selected by the FCO method in this embodiment of the invention. Figure 8 This is a histogram of attention weights of sample-level variables extracted from AT-LSTMs models trained with different expert experience variables in this embodiment of the invention. Figure 9These are sample-level variables extracted from AT-LSTMs models trained using different expert experience variables in embodiments of the present invention. and Attention weight histogram; Figure 10 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

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

[0023] This invention provides an interpretable power system congestion risk perception method based on topological robust features. Figure 1 This is a flowchart of the interpretable power system congestion risk perception method based on topological robust features provided by the present invention, such as... Figure 1 As shown, the method includes the following steps: Step S101: Based on the power grid operation mechanism and the characteristics of congestion events, construct a candidate set of feature variables, and use an information-assisted feature combination optimization method to screen and obtain a topological robust feature set; Step S102: Construct an interpretable prediction model based on the topologically robust feature set; Step S103: Obtain historical blocking event cases, construct a dataset covering various topological scenarios and operating conditions, and train the interpretable prediction model using the dataset; Step S104: Obtain the test data and use the trained interpretable prediction model to perform risk perception on the test data to obtain the prediction result.

[0024] For example, firstly, based on the power grid operation mechanism and the characteristics of congestion events, a candidate set of feature variables is constructed, containing all variables that may be related to congestion events. Information-assisted Feature Combinatorial Optimization (FCO) is then used to screen topology-robust features. Next, based on the selected topology-robust feature set, an interpretable prediction model is constructed. Using IEEE 33-bus system simulation data as an example, two years of actual load and renewable energy time-series data are injected to generate large-scale congestion event cases, constructing a dataset covering various topology scenarios and operating conditions to train and validate the interpretable prediction model. Finally, the test data is obtained, and the trained interpretable prediction model is used to perform risk perception on the test data to obtain prediction results.

[0025] In the above process, a feature combination optimization method is used to select key input variables that are both helpful in identifying early data patterns of congestion events and possess topological adaptability. Variables with low contribution to prediction or that would impair model performance when topology changes occur are eliminated. This allows for the construction of a topology-robust congestion event awareness model, which can also be interpreted as a prediction model. This model can still achieve good prediction results when faced with unseen topological changes. Compared to existing technologies, this method can adapt to various topological scenarios without prior notification of topological changes, thus solving the problem of poor applicability in existing related technologies.

[0026] Power grid data acquisition systems typically measure a large number of parameters, such as renewable energy output, node voltage, load power, and external meteorological data. Among these variables, some may undergo significant changes in data characteristics after topological changes, rendering previously learned data patterns inapplicable and negatively impacting prediction performance. However, for other variables, even if their data characteristics change, the learned data patterns can still be used to predict the target, contributing to the CEP (Consumer Estimation Program).

[0027] Therefore, in some embodiments, step S101, which uses an information-assisted feature combination optimization method to screen and obtain a topologically robust feature set, includes: calculating the feature priority score (FPS) of each candidate variable in the feature variable candidate set using the maximum information coefficient (MIC); constructing a feature combination optimization framework with an embedded k-nearest neighbor (k-NN) classifier; calculating the relative distance using the k-nearest neighbor classifier based on the multidimensional dynamic event regularization method; iteratively generating multiple feature combinations using the binary grasshopper optimization algorithm (BGOA), and evaluating and evolving them based on the k-nearest neighbor classifier to obtain the topologically robust feature set.

[0028] Specifically, multiple feature combinations are iteratively generated using the binary locust optimization algorithm, and evaluated and evolved based on the k-nearest neighbor classifier to obtain a topologically robust feature set. This includes: executing the binary locust optimization algorithm, guiding the search direction based on the feature priority score with the maximum information coefficient, and iteratively generating multiple feature combinations; using the k-nearest neighbor classifier to evaluate the prediction performance in parallel; calculating the fitness of each feature combination through a preset evaluation function, and outputting a topologically robust feature set that can provide a stable contribution to the perception of obstruction events under different topological structures.

[0029] In this embodiment, the feature priority score of each candidate variable is first calculated using the maximum information coefficient. This process considers both the correlation between the candidate variable and the blocking event, as well as the redundancy between variables. Then, a feature combination optimization framework with an embedded k-nearest neighbor classifier is constructed. The k-nearest neighbor classifier calculates relative distances based on a multidimensional dynamic time warping method, thus taking into account the temporal data patterns of candidate variables during classification and supporting direct input of temporal data without compression. The aforementioned feature combination optimization is driven by the binary locust optimization algorithm. The evolutionary algorithm iteratively generates multiple feature combinations, uses the embedded k-nearest neighbor classifier to evaluate prediction performance in parallel, and calculates the fitness of each feature combination through an evaluation function that balances prediction accuracy and combination dimensions, thereby supporting iterative optimization of feature combinations. In the initialization and evolutionary stages of the evolutionary computation, the feature priority score based on the maximum information coefficient guides the search direction, enhancing search efficiency and result quality. Through iterative generation, evaluation, and evolution of feature combinations, a topologically robust feature set that can provide a stable contribution to blocking event perception under different topological structures is finally output.

[0030] Through the above process, variables that help identify early patterns of network congestion events and improve topology adaptability are selected, while variables that may threaten model performance after topology changes are removed. Furthermore, some features may be ineffective in perceiving congestion events or are redundant; the presence of these features may interfere with the model's learning process, and therefore they also need to be removed during feature combination optimization.

[0031] set up Let FCO represent the candidate feature set in the power grid. The goal of FCO is to select a subset of variables to optimize a given evaluation function. This embodiment uses an evolutionary computation algorithm as the basis for combinatorial optimization, and mines an approximately optimal subset through a global search agent. Indicates the first k The search agent in the 1st v The solution vector at the nth iteration , K For the total number of search agents, , V The maximum number of iterations, ,like Then it means the first n One variable is selected; otherwise, it is not selected.

[0032] For example, feature combination optimization first initializes the solution population. To obtain better initial solutions while ensuring the diversity of search agents, a feature priority score based on the maximum information coefficient is used to assist the initialization process, as shown in the following formula:

[0033] In the formula, Indicates the first [number] after initialization k The first search agent's n This variable indicates whether it is selected; a value of 1 means it is selected, and a value of 0 means it is not selected. Indicates the first n The candidate variables are based on the normalized feature scores of MIC. For weighting coefficients, and , For the floor function, This represents a random number that is uniformly distributed in the interval [0,1]. The formula is obtained by calculating the MIC for all candidate variables and performing a sequential forward search, as follows:

[0034] in, Indicates feature priority score, Indicates the first The set of candidate variables in the next iteration. Indicates the first There are 10 candidate variables. Indicates the first The set of variables selected in the next iteration, and satisfying , , Initially ; Representation of features With event label variables Y The maximum information coefficient between them Candidate variables With selected variables ( The maximum information coefficient between ) Indicates the first The optimal variable that maximizes the above expression in each iteration. The optimal variable is identified during each iteration. Add it to the selected variable set. ,Right now At the same time from the candidate variable set Remove the variable from the list, i.e. .Will Substituting back into the above formula, we obtain the maximum value. This is the score for that variable.

[0035] As iterations continue, until By including all candidate variables, a score can be obtained for each candidate variable. By performing Min-Max normalization, we can obtain the MIC-based normalized feature priority score. ,in , A higher value indicates a higher priority for the variable in the blocking event prediction task. In the above formula, the feature priority score can play a semi-guiding role in the initial search direction, effectively alleviating the problem of slow convergence speed in high-dimensional search spaces.

[0036] After each iteration generates the solution population, a subset of features is extracted from the solution vectors, denoted as . ,in For the solution vector The corresponding feature subset, and Based on feature subsets With dataset S Parallel training K Several multivariate time series learning models were used to test the blocking event awareness performance for each feature subset. Let... Represents the group of variables To assess the performance of the associated multivariate time series learning models, this paper employs a comprehensive fitness evaluation function that considers both prediction accuracy and data dimensionality. The formula is as follows:

[0037] in, This represents the comprehensive fitness evaluation function. For feature subset Dimensions The total number of candidate variables. These are the weighting coefficients. To consider the multi-class blocking event perception performance across the three stages of blocking events (normal, early warning, and blocking), a weighted multi-class classification method is adopted. Fraction Construction The formula is as follows:

[0038] in, Represents a subset of variables Related models Fraction, , The larger the value, the better the blocking event detection performance; For event tag set, h Indexed by category; For the test set, the labels are h The proportion of samples in the total test samples; and They represent respectively with When inputting features into a multivariate time series learning model, the first... h Precision and recall for each category. For balance considerations. and ,Will Set it to 1.

[0039] Furthermore, in the FCO process, a k-NN classifier based on multidimensional dynamic time warping similarity is used as the multivariate time series learning model. The k-NN classifier has the advantages of strong parallelism and the ability to capture similar temporal dynamic features. After evaluating each solution vector, the first solution can be found. v The solution vector with the best fitness value in the next iteration This will be used to update the optimal solution found so far. This provides support for the evolutionary process.

[0040] Using the optimal solution With the current solution vector For each search agent, perform positional evolution to obtain the solution vector for the next iteration. The algorithm is then evaluated. Because the binary locust optimization algorithm possesses a unique anti-local optimum mechanism (i.e., social force rule), this embodiment uses this algorithm as the basic evolutionary structure. The information-assisted evolutionary rules are as follows:

[0041] in, Represents the optimal solution The first in n One element, This represents the mutation rate, which decreases linearly from 0.6 to 0 with the number of iterations. and The formula for calculating the two combined values ​​is as follows:

[0042]

[0043] in, , Two weight parameters are used, which decrease linearly from 0.5 to 0.2 with the number of iterations, thereby gradually reducing the variable scores based on the MIC. The impact; For the Sigmoid function, ; BGOA step vector The first in n The formula for calculating the step vector is as follows: (Number of elements)

[0044] in, For the first k The search agent in the 1st v The step vector at the next iteration; This is a decreasing factor used to gradually reduce the step size. ,in and Set them to 50 and 0.00005 respectively; For the first k The and the first j The distance between search agents; To define the function of social force intensity, ,when When social forces are present, they manifest as repulsion; otherwise, they manifest as attraction.

[0045] The design logic of this rule mainly consists of two points: 1. When the distance is small, increase the repulsive force to avoid the search agents being too dense and prevent getting stuck in a local stagnation; 2. As distance increases, attraction is enhanced, preventing search agents from becoming too dispersed and promoting convergence. To apply social forces effectively, the distance value needs to be scaled to the interval [1,4]. .

[0046] The iterative feature subset evolution and evaluation process continues until the stopping criterion is met, ultimately outputting the optimal solution. with the optimal feature subset .

[0047] In some embodiments, step S102, constructing an interpretable prediction model based on a topologically robust feature set, includes: designing tensorized long short-term memory (LSTM) network units to generate hidden state matrices corresponding to feature variables in the topologically robust feature set; applying a temporal attention mechanism to the hidden state matrix to quantify the importance of different time steps and form a historical information aggregation context tensor; incorporating temporal static covariate knowledge and combining it with the historical information aggregation context tensor to generate a comprehensive context tensor; and applying a variable attention mechanism to the comprehensive context tensor to generate an interpretable prediction model.

[0048] Specifically, by incorporating knowledge of time-static covariates and combining it with historical information to aggregate context tensors, a comprehensive context tensor is generated. This includes: incorporating knowledge of time-static covariates into a long short-term memory network through triangular transformation encoding; using a tensorized feedforward network to form a static fusion context matrix, maintaining a one-to-one correspondence with the static covariates; and concatenating the static fusion context matrix with the historical information aggregated context tensor to form a comprehensive context tensor.

[0049] An interpretable prediction model is generated by applying a variable attention mechanism to the comprehensive context tensor, including: applying a variable attention mechanism to the comprehensive context tensor to quantify the contribution of each feature to the prediction result; mapping the data representation to the classification space through a variable-specific fully connected network; and combining the softmax activation function to output the classification result of the blocking event (normal, early warning, blocking), thus obtaining an interpretable prediction model.

[0050] In this embodiment, based on the topologically robust variables output by the FCO, an interpretable prediction model is constructed using a tensorized long short-term memory network and a hybrid attention mechanism. Subsequently, static covariate encoding is incorporated into the network to improve prediction performance.

[0051] For example, suppose the optimal feature subset Include One variable, namely ,and Original MTS dataset S You can keep only Time series reconstruction of variables in the middle ,Right now ,in , Indicates the first l Multivariate inputs at each time step. For simplicity, sample indices are omitted in subsequent content. m .

[0052] The first l The tensorized hidden state matrix at each time step is denoted as . , , , . d This is the overall size of the layer. elements It corresponds to the first n The hidden state vector of each input variable, i.e. ( The n (Line) Only encodes from variables n This information. This can be accessed through... Figure 2 To further explain, Figure 2 This is an embodiment of the invention based on the tensor dot product operation method. The value derivation graph, where different colors represent the correspondence with different input variables. Therefore, the hidden state matrix... Having a one-to-one correspondence with the input variables (becoming a variable-level or variable-specific characteristic) is beneficial for the accurate interpretation of individual variables.

[0053] Similar to standard LSTM, tensor LSTM also includes input gates. Forgotten Gate Output gate and memory unit Given the first l Input at each time step Compared to the previous hidden state Update element definition when hidden:

[0054] In the formula, , , Indicates the first n Update the hidden state values ​​of each input variable. d The hidden layer size for each variable, This represents the input to the hidden transformation tensor. , , ; This represents the transformation tensor from hidden to hidden. , , ; For bias terms; Indicates along Dimension performs a tensor dot product operation on two tensors:

[0055]

[0056] The derivation process is as follows Figure 2 As shown, based on The cell updates of the tensor LSTM include:

[0057]

[0058]

[0059] In the formula, and For input gate Forgotten Gate Output gate The transformation tensor, whose shape is similar to... and Consistent, This represents element-wise multiplication. It is performed using the tensor dot product operation. , and It is also in matrix form, with its elements corresponding to the input variables and the hidden state matrix. Consistent, therefore in Throughout all time steps, the variable-specific data organization structure is maintained. For example... Figure 3 As shown, Figure 3 This is a structural diagram of the interpretable blocking event prediction model in this embodiment of the invention. Each row of the hidden state matrix corresponds to a specific input variable.

[0060] In this embodiment, static covariates refer to variables that change relatively little within the observation time window (OTW) time scale, such as weekdays, months, holidays, and geographical locations. m During the sliding process, from time... Beginning, until the moment End. (Time) Adding static covariate information to the model can enrich the network's knowledge base. Let... Indicates the relationship with the first m Static covariate information corresponding to each OTW , ,in This represents the total number of static covariates. Since time-based variables (such as seasons) are readily available, this embodiment primarily utilizes these variables to enhance static information. To help the model better understand the static covariates, trigonometric function transformations are used to encode periodic time information into numerical vectors:

[0061] in, For the first n static covariates The period. Through trigonometric function encoding, it can be... k Convert to , More generally, the original static covariate vector can be transformed into an arbitrary dimension through input encoding. Therefore, using... This represents the dimension of a single covariate after input encoding. Based on the encoded data, a static augmented context vector is constructed:

[0062] in, For static augmentation context vectors, Set the dimension of a single context vector to... This facilitates subsequent fusion of information from variable attention and tensorized LSTM units; for The transformation tensor, This is a bias term.

[0063] Multivariate time series samples Inputting the data into a tensor-quantized LSTM network yields a set of hidden state matrices. The first one can be extracted from it. n The unique hidden state sequence of each variable The workflow of the hybrid attention mechanism is as follows: First, temporal attention is applied individually to the hidden state sequence of each variable to summarize the variable-specific dynamic historical information; then, this variable-specific aggregated information is fused with the static augmented context vector through variable attention. ,like Figure 3 As shown. Specifically, temporal attention weights. The calculation method is as follows:

[0064] in, For the first n Each variable has its own feedforward neural network, with time attention weights. Reflects the first n The variable in the first... l The importance of each time step to the prediction results Based on temporal attention weights, the first... n The context vector of each variable is used to summarize its sequential hidden state, i.e. Next, an intermediate context tensor is constructed by concatenating information from multiple sources. ,in , This indicates a vertical splicing operation. Indicates the first n The dynamic historical information of each variable is concatenated with the current hidden state. This is based on the intermediate context tensor. Calculate the attention weights of the variables :

[0065] in, for The i row vectors , .when hour, ;when hour, ; This is a feedforward neural network shared by all variables. To maintain the correspondence with the input variables, variable attention is applied to the variable-level network log-odds calculated by the fully connected layers. For the ... The network log-odds of the variables is ,in It is an FC network that converts data representation to label space. The total number of categories in the target classification problem (e.g., the number of event labels). These network log-odds are fused using variable attention, i.e.: Finally, the synthesized network log-odds is activated by a softmax layer, thus forming an interpretable model:

[0066] in, This is the softmax activation function, and its internal value is the log-odds ratio of the fused network (including...). (number of elements) For the first h Softmax score of the category; Labels for predicted events.

[0067] like Figure 3 As shown, the CEP model proposed in this embodiment adopts a data flow organization method with a one-to-one correspondence between the input variables throughout the network, thus enabling more accurate identification of the contribution of individual variables to the prediction results. The attention mechanism provides an intuitive way to understand the model's decision-making process, and the model's behavior can be analyzed by visualizing the attention weights.

[0068] In some embodiments, step S103 involves acquiring historical congestion event cases, constructing a dataset covering multiple topological scenarios and operating conditions, and training the interpretable prediction model using the dataset. This includes: acquiring historical actual load and renewable energy time-series data to generate multiple historical congestion event cases; adjusting branch switches to generate a dataset covering multiple topological scenarios and operating conditions; training and testing the interpretable prediction model using the dataset; and verifying the predictive performance and topology adaptability of the interpretable prediction model under different topological scenarios using preset test indicators.

[0069] In this embodiment, using IEEE 33-node system simulation data as an example, two years of actual load and renewable energy time-series data are injected to generate large-scale congestion event cases. Simultaneously, branch switches are adjusted to form a dataset covering various topology scenarios and operating conditions. The trained model is then applied to the test set data, utilizing accuracy, The model's predictive performance and topology adaptability are validated using metrics such as scores in scenarios with known topologies, unseen topologies, and mixed topologies. Temporal attention weights and variable attention weights are derived to enable interpretability analysis of the prediction results. The effectiveness of the proposed method and the interpretable model is verified by comparing the performance of different feature sets and prediction models.

[0070] For example, firstly, for a period of 24 months (January 2017 to December 2018, sampling intervals) Load and renewable energy field time-series data were scaled and processed, and power flow simulation was performed to generate congestion scenarios. Nine nodes (nodes 5, 9, 13, 18, 22, 25, 28, 31, and 33) were adjusted to connect to renewable energy, with each node having a renewable energy installed capacity of 0.6 MW. Load time-series data was configured for all nodes, and the maximum allowable line current was set to 0.243 kA. Simultaneously, five disconnectable branches were adjusted to simulate different topologies, such as... Figure 4 As shown, Figure 4 This is an improved IEEE-33 node system topology diagram in this embodiment of the invention. By opening and closing each switch line, 32 topology scenarios can be generated. The topology changes every half month, covering a total of 32 different topologies in the first 16 months of the 24-month period; in the last 8 months, 16 topologies are randomly selected from those that appeared in the first year, and data is generated by combining them with power flow simulation. Finally, 24 months of continuous operating data covering 48 mixed topologies and different operating conditions are obtained.

[0071] A total of 5736 paired samples were obtained through data sliding extraction and category labeling. Data from months 1 to 12 were used for model training and validation (using random sampling without replacement), covering 24 topology scenarios. Data from months 13 to 16 were used to construct test set 1, evaluating the model's performance under "unseen topologies," covering 8 unseen topologies. Data from months 17 to 24 were used to construct test set 2, evaluating the model's performance under "seen topologies," covering 16 seen topologies. Considering that actual power system operation may encounter both seen and unseen topologies simultaneously, test set 1 and test set 2 were merged to construct test set 3, containing 24 mixed topologies, as shown in Tables 1 and 2.

[0072] Table 1. Candidate variable set corresponding to the synthetic dataset

[0073] Table 2 Summary of sample distribution of the synthetic dataset

[0074] This section tests the performance of interpretable predictive models built using topologically robust variables, based on test sets 1-3, to evaluate their effectiveness in the face of topological changes. It also compares these models with three other commonly used feature sets. 1. Full set of variables: All available variables; 2. Expert experience feature set: power generation, load power, and active power transmitted through lines; 3. ReliefF feature set.

[0075] The experiment used the AT-LSTMs model, where the hidden layer size of the AT-LSTMs model was... d The learning rate is set to 0.001, with a step decay strategy, decreasing by 10% every 40 training epochs. Other settings are as follows: batch size is 20, dropout rate is 20%, maximum number of training epochs is 200, and the optimizer is Adam. Figure 5 As shown, Figure 5 Table 3 shows the average learning curves of AL-LSTMs using different variable sets in this embodiment of the invention. It shows the average learning curve (cross-entropy loss) of the AT-LSTMs model in 20 repeated runs. Table 3 shows the average CEP performance of the model in different topological scenarios.

[0076] Table 3 Overall average CEP performance under different input variables in various topological scenarios

[0077] like Figure 5 As shown in (a), the model built based on the variables selected by the proposed FCO method exhibits highly consistent loss across different datasets, and the four learning curves show similar trends, indicating extremely low overfitting. In contrast, the model using expert experience variables shows significant overfitting, such as... Figure 5 As shown in (b). In Figure 5 In (a), the loss difference between test set 1 and test set 2 at the labeled points is only 0.0245, which indicates that the model trained by the proposed FCO method is less affected by topological changes and has better generalization ability for unseen topologies.

[0078] As shown in Table 3, in test set 1 containing 8 unseen topologies, the AT-LSTMs model using the proposed method to select variables achieved an average accuracy of 94.980%; in test set 2 containing 16 seen topologies, the model achieved an average accuracy of 96.290%. However, the AT-LSTMs model using expert experience variables achieved an average accuracy of 94.198% in test set 2, but only 91.915% in test set 1. This difference is because the proposed FCO method can discover the subset of variables that maximizes CEP performance on datasets covering multiple topologies, while reducing feature dimensionality and parameter complexity, mitigating overfitting of the model to topological scenes in the training data, and improving the model's adaptability to unseen topological structures.

[0079] As shown in Table 3, based on the feature set optimized by the proposed FCO method, the CEP model achieves superior statistical prediction performance in various topological scenarios, with higher average accuracy and... The proposed FCO method achieves the best performance. Compared to the second-ranked ReliefF method, which suffers a 1.915% decrease in accuracy, the FCO method reduces the performance degradation of CEP due to topology changes by at least 31.593%. The test results validate the effectiveness of the proposed FCO method in improving the topology adaptability of CEP models.

[0080] This embodiment also compares the proposed AT-LSTM model with other learning networks, including Spacetime Attention Long Short-Term Memory Network (STA-LSTM), Time Series Classification Transformer (TSCT), Gated Recurrent Unit (GRU), eXtreme Gradient Boosting (XGBoost), Convolutional Neural Network-LSTM (CNN-LSTM), and traditional long short-term memory networks. It also compares the original attention tensorized long short-term memory network (denoted as AT-LSTM) without incorporating static covariates. Since the hybrid topology test set 3 more closely reflects the actual operation of the power grid, this experiment uses this test set for performance evaluation.

[0081] The parameter settings for each comparison model are as follows: TSCT contains 3 Transformer blocks with a head size of 128 and 4 attention heads; CNN-LSTM contains one 1D convolutional layer (16 filters, kernel size of 3, stride of 1), followed by a max pooling layer (pooling kernel size of 2, stride of 2); for XGBoost, the MTS needs to be flattened into tabular data to meet its input requirements. Table 4 shows the comparison results of 20 runs, including average training time, average... Value, early state The average precision and recall, and the average accuracy.

[0082] Table 4 Overall CEP Performance Test of Different Learning Models

[0083] As shown in Table 4, the proposed AT-LSTM models achieved superior CEP statistical performance on test set 3, which included 24 mixed topologies. A detailed analysis of the comparative models reveals that: TSCT itself does not encode the inductive bias of structured data (such as MTS), thus requiring a larger model size and more training samples; STA-LSTM computes spatial attention separately for each time step, without considering the temporal dependencies between time steps, which may interfere with temporal feature extraction; compared to AT-LSTM, the proposed method effectively improves CEP performance by fusing static covariates. On test set 1, which included 8 unseen topologies, the performance improvement is more significant, with the average accuracy increasing from 94.244% to 94.980%. This is because static covariates are typically external (non-electrical) features, less affected by topological changes. Incorporating them into the model provides additional knowledge and improves the model's adaptability to topological changes. Furthermore, fusing static covariates does not significantly increase computational complexity; the average training time only slightly increases from 623.806 seconds to 664.287 seconds.

[0084] This method also provides interpretability analysis based on attention patterns. First, the interpretability of AT-LSTMs models is analyzed from a holistic perspective. Table 5 lists a set of variables optimized using the proposed FCO method, along with the corresponding MIC-based FPS.

[0085] Table 5 shows a set of variables obtained by optimization using the FCO method.

[0086] Based on the AT-LSTMs model built using these variables, the attention weights of test sets 1-3 are extracted. Figure 6 The static covariates selected based on the FCO method in this embodiment of the invention are and The histogram of attention weights for sample-level variables extracted by the trained AT-LSTMs model, such as... Figure 6 As shown, static covariates are illustrated. and The sample-level attention weight histograms reflect the changes in attention weights across samples representing different topologies and operating conditions. Figure 7 This is a histogram of attention weights of sample-level variables extracted from AT-LSTMs models trained using different variables selected based on the FCO method in this embodiment of the invention, such as... Figure 7 As shown, a targeted analysis was conducted on the active power transmitted by line s1 and the load power of node 19 in Table 5. The vertical dashed line in the figure represents the average value of the attention weight.

[0087] like Figure 6As shown, the average attention weight of the variable corresponding to different time periods within a day is significantly greater than the weight corresponding to different weeks within a month, which is consistent with the general human understanding of the time patterns of NCEs. Human circadian rhythms lead to peak loads in the morning and evening, while photovoltaic output is typically lower at these times, requiring more power support from external systems. Under these circumstances, transmission lines are more prone to congestion. Therefore, the hourly characteristic of a day is significant for CEP (Congestion Prevention and Control). However, the probability of congestion is not significantly correlated with the week of the month; the relationship between the two is weak.

[0088] Similarly, the active power transmitted by line s1 It is a more direct indicator of target NCEs, and its importance is higher than the load power of node 19. .like Figure 7 As shown, the AT-LSTMs model can identify the characteristic differences between the active power transmitted by line s1 and the load power of node 19, and accurately assign higher and more stable attention weights to the active power transmitted by line s1. This demonstrates that the interpretable CEP model can effectively identify the contributions of input variables, and its attention pattern is consistent with expert experience.

[0089] This method also provides an analysis of topologically robust feature attention patterns, comparing the data behavior of topologically robust variables with other methods for feature selection. From the AT-LSTMs network trained with expert-experienced variables, two attention weights not included in Table 5 but belonging to expert-experienced variables are extracted: the transmitted active power of line s8. Wind power output at node 5 The result is as follows Figure 8 As shown, Figure 8 This is a histogram of attention weights, a sample-level variable, extracted from an AT-LSTMs model trained using different expert experience variables in this embodiment of the invention; simultaneously, it extracts the attention weights from the model... and Attention weights are presented in histogram form. Figure 9 middle, Figure 9 These are sample-level variables extracted from AT-LSTMs models trained using different expert experience variables in embodiments of the present invention. and Attention weight histogram.

[0090] contrast Figure 6 and Figure 8 It can be observed that the attention weight distribution of the variables selected by the FCO method is more concentrated across different samples, indicating that the contribution of these variables to the CEP objective is more stable. Even in test set 1, The average attention weight was 0.1214, with a coefficient of variation of only 14.06%; while the expert experience variable... and The attention weight distribution is more dispersed, with variation coefficients as high as 76.12% and 54.83%, respectively. Figure 8 As shown. Furthermore, Figure 6 middle and The small difference in attention weights between test set 1 and test set 2 indicates that the contributions of these variables are not significantly affected by topological changes. Therefore, the model using this method to screen variables has stronger robustness to topological changes, as shown in Table 4.

[0091] contrast Figure 6 and Figure 9 It can be observed that, and The attention weight distribution changed significantly. This is mainly because irrelevant or redundant variables can interfere with the model learning the correct data relationships, leading to a dispersion and shift in the model's attention. Therefore, the FCO method not only helps improve the model's topology adaptability but also eliminates variables that interfere with the model's learning process.

[0092] In summary, this method proposes an information-assisted feature combination optimization approach from a novel perspective to uncover topologically robust variables that remain applicable across different topologies, thereby supporting stable predictive performance of the CEP model in multi-topology environments. Based on the selected variables, an interpretable CEP model is further constructed, integrating tensorized LSTM and a hybrid attention mechanism, allowing the influence of different variables on the prediction results to be explicitly presented through variable attention. Based on these components, the constructed CEP model possesses both good topological robustness and interpretability. This method focuses on the task of power system congestion risk perception, aiming to address the technical pain points of existing methods, such as poor topological adaptability and lack of model interpretability.

[0093] This method proposes an FCO (Focused Congestion Optimization) approach to select key input variables that are both helpful in identifying early data patterns of congestion events and possess topology adaptability. Variables with low predictive value or those that would impair model performance under topology changes are removed, thus constructing a topology-robust CEP (Congestion Event Prediction) model that still achieves good predictive performance even with unseen topology changes. Compared to existing methods, the proposed technique can adapt to various topology scenarios without prior notification of topology changes, significantly improving the model's practical applicability. This method also proposes an interpretable CEP model based on tensorized LSTM units and a hybrid attention mechanism. By using variable-specific hidden states, the encoded information of each input variable can be explicitly tracked. The hybrid attention mechanism automatically identifies key parts in multidimensional time series, intuitively presenting the data behavior patterns of each input variable under different network topology conditions, thereby improving the model's interpretability and reliability. The interpretable model constructed by this method is used for rapid online congestion event prediction in power systems. This model maintains good performance even with topology changes without requiring network topology change notification or model retraining, thus more directly improving the topology adaptability of data-driven models compared to existing methods.

[0094] This invention also provides an interpretable power system congestion risk sensing device based on topological robust features. The following describes the interpretable power system congestion risk sensing device based on topological robust features provided by this invention. The topological robust feature-based interpretable power system congestion risk sensing device described below corresponds to the topological robust feature-based interpretable power system congestion risk sensing method described above. The device includes: The screening module is used to construct a candidate set of feature variables based on the power grid operation mechanism and the characteristics of congestion events, and to screen the topology robust feature set using an information-assisted feature combination optimization method. Build modules are used to construct interpretable prediction models based on topologically robust feature sets; The training module is used to acquire historical blocking event cases, build a dataset covering various topological scenarios and operating conditions, and train the interpretable prediction model using the dataset. The perception module is used to acquire the data to be tested and to perform risk perception on the data to be tested through a trained interpretable prediction model to obtain prediction results.

[0095] In operation, this device first employs a screening module to construct a candidate set of feature variables based on the power grid's operating mechanism and the characteristics of congestion events. This set includes all variables potentially related to congestion events, and an information-assisted feature combination optimization method is used to screen topology-robust features. Next, the construction module builds an interpretable prediction model based on the selected topology-robust feature set. Then, the training module uses IEEE 33-bus system simulation data as an example, injecting two years of actual load and renewable energy time-series data to generate large-scale congestion event cases, constructing a dataset covering various topology scenarios and operating conditions for training and validating the interpretable prediction model. Finally, the perception module acquires the data to be tested and uses the trained interpretable prediction model to perceive the risks in the tested data, obtaining prediction results.

[0096] In the aforementioned process, a feature combination optimization method is used to select key input variables that are both helpful in identifying early data patterns of congestion events and possess topological adaptability. Variables with low contribution to prediction or that would impair model performance during topological changes are eliminated. This allows for the construction of a topologically robust congestion event perception model, which can also be interpreted as a prediction model. This model can still achieve good prediction results when faced with unseen topological changes. Compared to existing technologies, this device can adapt to various topological scenarios without prior notification of topological changes, solving the problem of poor applicability in existing related technologies.

[0097] Figure 10 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 10 As shown, the electronic device may include: a processor 1001, a communication interface 1002, a memory 1003, and a communication bus 1004, wherein the processor 1001, the communication interface 1002, and the memory 1003 communicate with each other via the communication bus 1004. The processor 1001 can call logical instructions in the memory 1003 to execute an interpretable power system congestion risk perception method based on topology robust features, the method including: Based on the power grid operation mechanism and the characteristics of congestion events, a candidate set of feature variables is constructed, and an information-assisted feature combination optimization method is used to screen and obtain a topologically robust feature set. Construct interpretable prediction models based on topologically robust feature sets; Collect historical blocking event cases, construct a dataset covering various topological scenarios and operating conditions, and train an interpretable prediction model using the dataset; The test data is acquired, and the risk perception of the test data is performed on the test data through a trained interpretable prediction model to obtain the prediction results.

[0098] Furthermore, the logical instructions in the aforementioned memory 1003 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a 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 of 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.

[0099] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the interpretable power system congestion risk perception method based on topological robust features provided by the above methods, the method comprising: Based on the power grid operation mechanism and the characteristics of congestion events, a candidate set of feature variables is constructed, and an information-assisted feature combination optimization method is used to screen and obtain a topologically robust feature set. Construct interpretable prediction models based on topologically robust feature sets; Collect historical blocking event cases, construct a dataset covering various topological scenarios and operating conditions, and train an interpretable prediction model using the dataset; The test data is acquired, and the risk perception of the test data is performed on the test data through a trained interpretable prediction model to obtain the prediction results.

[0100] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the interpretable power system congestion risk perception method based on topological robust features provided by the methods described above, the method comprising: Based on the power grid operation mechanism and the characteristics of congestion events, a candidate set of feature variables is constructed, and an information-assisted feature combination optimization method is used to screen and obtain a topologically robust feature set. Construct interpretable prediction models based on topologically robust feature sets; Collect historical blocking event cases, construct a dataset covering various topological scenarios and operating conditions, and train an interpretable prediction model using the dataset; The test data is acquired, and the risk perception of the test data is performed on the test data through a trained interpretable prediction model to obtain the prediction results.

[0101] The device embodiments described above are merely illustrative. 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0102] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; 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; and these 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 interpretable power system congestion risk perception based on topological robust features, characterized in that, include: Based on the power grid operation mechanism and the characteristics of congestion events, a candidate set of feature variables is constructed, and an information-assisted feature combination optimization method is used to screen and obtain a topologically robust feature set. An interpretable prediction model is constructed based on the aforementioned topologically robust feature set; Obtain historical blocking event cases, construct a dataset covering various topological scenarios and operating conditions, and train the interpretable prediction model using the dataset; The test data is acquired, and the risk perception of the test data is performed on the test data through a trained interpretable prediction model to obtain the prediction result.

2. The method for interpretable power system congestion risk perception based on topological robust features according to claim 1, characterized in that, A topologically robust feature set was obtained by using an information-assisted feature combination optimization method, including: The feature priority score for each candidate variable in the candidate feature variable set is calculated using the maximum information coefficient. A feature combination optimization framework with an embedded k-nearest neighbor classifier is constructed; the k-nearest neighbor classifier calculates relative distances based on a multidimensional dynamic event regularization method. Multiple feature combinations are generated iteratively by combining the binary locust optimization algorithm, and the topologically robust feature set is obtained by evaluating and evolving based on the k-nearest neighbor classifier.

3. The interpretable power system congestion risk perception method based on topological robust features according to claim 2, characterized in that, Multiple feature combinations are iteratively generated using the binary locust optimization algorithm, and evaluated and evolved based on the k-nearest neighbor classifier to obtain a topologically robust feature set, including: The binary locust optimization algorithm is executed, which guides the search direction based on the feature priority score with the maximum information coefficient and iteratively generates multiple feature combinations. The prediction performance was evaluated in parallel using the k-nearest neighbor classifier. The fitness of each feature combination is calculated using a preset evaluation function, and a topologically robust feature set that can provide a stable contribution to the perception of blocking events under different topologies is output.

4. The interpretable power system congestion risk perception method based on topological robust features according to claim 1, characterized in that, Constructing an interpretable prediction model based on the aforementioned topologically robust feature set includes: Design tensor-quantized long short-term memory network units to generate hidden state matrices corresponding to the feature variables in the topological robust feature set; A temporal attention mechanism is applied to the hidden state matrix to quantify the importance of different time steps and form a historical information aggregation context tensor. By incorporating knowledge of time-static covariates and combining it with historical information to aggregate context tensors, a comprehensive context tensor is generated. A variable attention mechanism is applied to the integrated context tensor to generate an interpretable prediction model.

5. The interpretable power system congestion risk perception method based on topological robust features according to claim 4, characterized in that, By incorporating knowledge of time-static covariates and combining it with historical information to aggregate the context tensor, a comprehensive context tensor is generated, including: In long short-term memory networks, knowledge of time-static covariates is incorporated through trigonometric transformation encoding. A tensor quantization feedforward network is used to form a static fusion context matrix, maintaining a one-to-one correspondence with the static covariates; The static fusion context matrix and the historical information aggregation context tensor are concatenated to form a comprehensive context tensor.

6. The interpretable power system congestion risk perception method based on topological robust features according to claim 4, characterized in that, Applying a variable attention mechanism to the comprehensive context tensor generates an interpretable prediction model, including: A variable attention mechanism is applied to the integrated context tensor to quantify the contribution of each feature to the prediction result; Data representations are mapped to the classification space using variable-specific fully connected networks; By combining the softmax activation function, the classification results of the blocking events are output, resulting in an interpretable prediction model.

7. The method for interpretable power system congestion risk perception based on topological robust features according to claim 1, characterized in that, Acquire historical blocking event cases, construct a dataset covering various topological scenarios and operating conditions, and train the interpretable prediction model using the dataset, including: Acquire historical actual load and renewable energy time-series data to generate multiple historical blocking event cases; Adjust the branch switches to generate a dataset covering various topological scenarios and operating conditions; The interpretable prediction model is trained and tested using the dataset, and its predictive performance and topology adaptability are verified under different topological scenarios using preset test metrics.

8. The interpretable power system congestion risk perception method based on topological robust features according to claim 1, characterized in that, The topology scenarios include seen topology scenarios, unseen topology scenarios, and mixed topology scenarios.

9. A topologically robust, interpretable power system congestion risk sensing device, characterized in that, include: The screening module is used to construct a candidate set of feature variables based on the power grid operation mechanism and the characteristics of congestion events, and to screen the topology robust feature set using an information-assisted feature combination optimization method. A building module is used to construct an interpretable prediction model based on the topologically robust feature set; The training module is used to acquire historical blocking event cases, construct a dataset covering various topological scenarios and operating conditions, and train the interpretable prediction model using the dataset. The perception module is used to acquire the data to be tested and to perform risk perception on the data to be tested through a trained interpretable prediction model to obtain prediction results.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the interpretable power system congestion risk perception method based on topological robust features as described in any one of claims 1 to 8.