A power grid safety risk assessment method, system, device and medium

By constructing a dynamic power grid graph model and a graph message transmission mechanism, the problems of low computational efficiency and weak early warning capability in existing power grid security risk assessment methods are solved, and high-precision, dynamic assessment and early warning of power grid security risks are realized.

CN122243174APending Publication Date: 2026-06-19GUANGXI POWER GRID CORP

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGXI POWER GRID CORP
Filing Date
2026-02-02
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing power grid security risk assessment methods lack a unified graph computation framework, rely on independent power flow calculations and do not combine graph message passing mechanisms for collaborative iteration, which makes it impossible to efficiently and convergently simulate cascading fault responses and capture the dynamic evolution trend of risks, resulting in low computational efficiency and weak early warning capabilities.

Method used

A dynamic power grid graph model based on topology and multi-source operating states is constructed. The fault flow is efficiently solved by combining the graph message passing mechanism. A joint risk quantification mechanism of limit exceedance severity and time-series propagation trend within the sliding time window is introduced. The phase angle is updated iteratively through the graph message passing mechanism and the power conservation residual convergence criterion, so as to achieve a high-precision, dynamic and visualized assessment of power grid safety risks.

Benefits of technology

It significantly improves the computational efficiency and convergence stability of power grid security risk assessment, enhances the simulation capability and early warning capability for cascading failure response, and achieves accurate assessment of power grid security risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122243174A_ABST
    Figure CN122243174A_ABST
Patent Text Reader

Abstract

This invention discloses a method, system, device, and medium for assessing power grid safety risks, including: acquiring power grid topology data and multi-source operating status data, preprocessing to generate state vectors for each bus node; constructing a graph structure based on the topology, embedding the state vectors into the nodes to form a complete power grid state graph; for each single transmission element fault scenario, removing the corresponding edge, and solving the time-series steady-state power flow distribution of the fault scenario based on a graph message passing mechanism; calculating the severity and propagation trend of each line's exceedance based on the time-series power flow distribution, fusing them to obtain a dynamic risk value, and classifying the line risk level accordingly; and inferring the risk status of associated bus nodes based on the line risk level to generate a risk visualization map. This invention effectively identifies exceedance lines and high-risk nodes, improving the safety and stability of power grid operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power grid risk assessment technology, and in particular to a method, system, equipment and medium for power grid safety risk assessment. Background Technology

[0002] With the continuous development and increasing complexity of power systems, the safety risk assessment of power grids has become particularly important. Graph computing technology, as an emerging mathematical tool, has been widely used in fields such as network topology analysis and data mining. By abstracting the power grid into a graph model, it becomes possible to use graph algorithms for power grid safety risk assessment.

[0003] However, existing technologies still have shortcomings. Existing technologies use independent power flow calculations to verify the over-limit situation of each line after the line is disconnected. They have not established a unified graph calculation task framework, nor have they used the graph message passing mechanism to achieve coordinated iterative updates of phase angle and power flow. This results in low computational efficiency, poor convergence, and difficulty in capturing the chain response caused by the fault. Traditional methods use whether the load rate exceeds the limit at a single moment as the criterion, without introducing joint modeling of the over-limit scale change trend and severity within the sliding time window. This fails to reflect the evolution characteristics of the risk, resulting in lagging assessment results and weak early warning capabilities. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a power grid security risk assessment method, system, device, and medium to address the problems of existing power grid security risk assessment methods lacking a unified graph computing framework, relying on independent power flow calculations without combining graph message passing mechanisms for collaborative iteration, and relying solely on single-moment limit exceedance criteria, which cannot efficiently and convergently simulate cascading fault responses and capture the dynamic evolution trend of risks, resulting in low computational efficiency and weak early warning capabilities.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for assessing power grid security risks, comprising: Acquire the topology data and multi-source operating status data of the power grid, and preprocess the multi-source operating status data to generate the state vector of each bus node; A graph structure is constructed based on topology data, and state vectors are embedded into the corresponding bus nodes. At the same time, each line edge is assigned a dynamic weight based on the ratio of real-time power flow to rated capacity, thus constructing a complete power grid state graph. For each single transmission element fault scenario, the corresponding edge is removed from the power grid state diagram, and based on the graph message passing mechanism, the steady-state power flow distribution of the fault scenario is solved at multiple times within the sliding time window to obtain the multi-time power flow distribution sequence. Based on the multi-moment power flow distribution sequence, the time-series propagation trend of the normalized limit violation severity and the number of limit violations for each line is calculated. The time-series propagation trend of the normalized limit violation severity and the number of limit violations is weighted and fused to obtain the dynamic risk value of the fault scenario. The risk level of each line is then classified according to the dynamic risk value. Based on the risk level of each line, the risk status of the bus nodes associated with each line is inferred, and a visual map containing both line-level and node-level risk attributes is generated.

[0007] As a preferred embodiment of the power grid safety risk assessment method described in this invention, the preprocessing of multi-source operating status data includes: Outlier removal is performed on the raw measurement data; Normalize data with different physical dimensions; Generate a state vector with a unified timestamp by aligning it with time. The corrected multi-source operational data is normalized in each dimension and then spliced ​​together in a preset order to form a node state vector with a unified dimension. Cluster analysis is performed on the state vectors of each bus node to generate category labels that reflect operational characteristics; Embed the category label into the state vector of the corresponding bus node to form the updated node attribute vector; The outlier removal process for the original measurement data includes: The data anomaly is determined based on the node power balance deviation value, which is the sum of the active power flowing into the node minus the sum of the active power flowing out of the node and then minus the node load power. When the absolute value of the power balance deviation is greater than a preset physical threshold, a time-average correction algorithm is used to correct the abnormal data.

[0008] The clustering analysis includes: determining the optimal number of clusters based on the elbow rule, using an unsupervised clustering algorithm to cluster the state vectors to obtain high-fluctuation nodes, steady-state nodes, new energy-dominated nodes, and load-dominated nodes, and assigning category labels to them respectively.

[0009] As a preferred embodiment of the power grid security risk assessment method described in this invention, the step of assigning dynamic weights to each line edge based on the ratio of real-time power flow to rated capacity includes: Obtain the actual active power flow of the line at the current moment; Read the line's capacity limit; Calculate the ratio as the initial dynamic weight of the edge; The dynamic weights are updated hourly within a sliding time window to form a time-varying edge weight sequence, and the dynamic weights are used as edge attributes of the complete power grid state diagram.

[0010] As a preferred embodiment of the power grid security risk assessment method described in this invention, the step of solving the steady-state power flow distribution of fault scenarios based on the graph message passing mechanism includes: Initialize the phase angle of each node to the measured value before the fault; Calculate the power conservation residual and reactance weights of each node based on the current phase angle; Update the phase angle of each node based on the power conservation residual and reactance weight; After each iteration, calculate the maximum absolute value of the power conservation residuals of all nodes; The iteration terminates when the maximum value is less than or equal to the preset maximum power conservation residual threshold, and the actual power flow of each line is calculated based on the node phase angle obtained in the last iteration to obtain the steady-state power flow distribution of the fault scenario.

[0011] The beneficial effects of this preferred technical solution are that, through iterative phase angle updates based on graph message passing mechanism and power conservation residual convergence criteria, the steady-state power flow distribution after a fault can be solved efficiently and stably without relying on reference nodes, significantly improving computational convergence and the ability to simulate cascading responses.

[0012] As a preferred embodiment of the power grid safety risk assessment method described in this invention, the calculation of the time-series propagation trend of the normalized limit violation severity and the number of limit violations for each line includes: The load rate of each line at each time point is determined to exceed the limit, resulting in a set of lines that exceed the limit. The severity of the fault scenario is calculated based on the load rate exceeding the limit of each line in the set of lines exceeding the limit. The severity is mapped to a preset normalization interval to obtain the normalized out-of-limit severity. The time series of the total number of lines exceeding the limit within the sliding time window; The rate of change of the time series is calculated as an indicator of the time series propagation trend.

[0013] The beneficial effects of this preferred technical solution are that by integrating the time-series propagation trends of normalized limit severity and limit quantity, it can dynamically characterize the intensity and spread of power grid risks, overcome the lag of traditional single-moment limit judgment, and significantly improve the early identification and evolution warning capabilities of safety risks.

[0014] As a preferred embodiment of the power grid safety risk assessment method described in this invention, the step of classifying the risk levels of each line based on dynamic risk values ​​includes: When the dynamic risk value is zero, it is marked as safe; When the dynamic risk value is greater than zero but does not exceed the preset fault risk threshold, it is marked as a general risk; When the dynamic risk value exceeds the preset fault risk threshold, it is marked as high risk.

[0015] As a preferred embodiment of the power grid safety risk assessment method described in this invention, the step of inferring the risk status of bus nodes associated with each line includes: Iterate through all the lines connected to each bus node; If there is at least one high-risk line among the connected lines, the corresponding bus node will be marked as a high-risk node. If all connected lines are safe lines, then the corresponding bus node is marked as a safe node; If the connected lines do not contain high-risk lines but contain at least one general-risk line, then the corresponding bus node will be marked as a general-risk node.

[0016] Secondly, the present invention provides a power grid security risk assessment system, comprising: The data acquisition and preprocessing module is used to acquire the topology data and multi-source operating status data of the power grid, and to preprocess the multi-source operating status data to generate the state vector of each bus node. The power grid graph structure construction module is used to construct a graph structure based on topology data, embed state vectors into the corresponding bus nodes, and assign dynamic weights to each line edge based on the ratio of real-time power flow to rated capacity, thereby constructing a complete power grid state graph. The graph-driven fault power flow simulation module is used to remove the corresponding edge in the power grid state graph for each single transmission element fault scenario, and solve the steady-state power flow distribution of the fault scenario at multiple times within the sliding time window based on the graph message passing mechanism, so as to obtain the multi-time power flow distribution sequence. The dynamic risk quantification module is used to calculate the normalized severity of the limit violation and the temporal propagation trend of the number of limit violations for each line based on the multi-time power flow distribution sequence. The normalized severity of the limit violation and the temporal propagation trend of the number of limit violations are weighted and fused to obtain the dynamic risk value of the fault scenario. The risk level of each line is divided according to the dynamic risk value. The visualization module is used to infer the risk status of the bus nodes associated with each line based on the risk level of each line, and generate a visualization map that includes both line-level and node-level risk attributes.

[0017] Thirdly, the present invention provides an electronic device, comprising: Memory, used to store programs; A processor is configured to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the power grid security risk assessment method.

[0018] Fourthly, the present invention provides a computer-readable storage medium, comprising: when the program is executed by a processor, the steps of implementing the power grid security risk assessment method.

[0019] The beneficial effects of this invention are as follows: This invention generates a set of line faults by numbering each edge in the complete power grid state diagram based on the N-1 safety criterion. One fault object is removed from the set of line faults in the complete power grid state diagram to obtain a graph model of the corresponding fault scenario. Based on the graph model, the power conservation residual and reactance weight sum are iteratively calculated, the phase angle is updated, and the actual power flow of the edge is calculated. The line load rate is obtained by combining this with the rated allowable power flow. This enables accurate assessment of power grid safety risks, effectively identifies over-limit lines and high-risk nodes, and improves the safety and stability of power grid operation. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a schematic diagram of the basic process of a power grid security risk assessment method provided in one embodiment of the present invention. Detailed Implementation

[0021] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0022] Example 1, referring to Figure 1 As an embodiment of the present invention, a method for assessing power grid security risks is provided, comprising: S100: Acquire the topology data and multi-source operating status data of the power grid, and preprocess the multi-source operating status data to generate the state vector of each bus node; S200: Construct a graph structure based on topology data, embed state vectors into corresponding bus nodes, and assign dynamic weights to each line edge based on the ratio of real-time power flow to rated capacity to build a complete power grid state diagram. S300: For each single transmission element fault scenario, the corresponding edge is removed from the power grid state diagram, and based on the graph message passing mechanism, the steady-state power flow distribution of the fault scenario is solved at multiple times within the sliding time window to obtain the multi-time power flow distribution sequence. S400: Based on the multi-time power flow distribution sequence, calculate the time-series propagation trend of the normalized limit violation severity and the number of limit violations for each line, and weight and fuse the time-series propagation trend of the normalized limit violation severity and the number of limit violations to obtain the dynamic risk value of the fault scenario, and classify the risk level of each line according to the dynamic risk value. S500: Based on the risk level of each line, it infers the risk status of the bus nodes associated with each line and generates a visual map that includes both line-level and node-level risk attributes.

[0023] It should be noted that existing safety risk assessment methods face multiple challenges during power grid operation: On the one hand, traditional methods rely on independent power flow calculations to verify each line disconnection scenario one by one, lacking a unified graph calculation framework, resulting in low computational efficiency and poor convergence; on the other hand, they do not utilize the inherent topological correlation of the graph structure to perform coordinated iteration of phase angle and power flow, making it difficult to accurately simulate the cascading response process caused by faults; in addition, the assessment criteria are usually based only on whether the load rate exceeds the limit at a single moment, ignoring the evolution characteristics of risks over time, neither considering the quantitative differences in the severity of exceeding the limit nor capturing the diffusion trend of the exceeding limit range, resulting in lagging risk identification and weak early warning capabilities, making it difficult to meet the needs of modern power grids with high proportions of new energy access, strong volatility and high coupling for real-time, dynamic and accurate safety assessment.

[0024] Therefore, existing power grid security risk assessment methods lack a unified graph computation framework, rely on independent power flow calculations without combining graph message passing mechanisms for collaborative iteration, and rely solely on single-moment limit violation criteria, failing to efficiently and convergently simulate cascading fault responses and capture the dynamic evolution trend of risks, resulting in low computational efficiency and weak early warning capabilities. Through steps S100-S500, a dynamic power grid graph model integrating topology and operating status is constructed, and a graph message passing mechanism is used to efficiently solve fault power flow. Furthermore, a joint risk quantification mechanism based on limit violation severity and temporal propagation trend within a sliding time window is introduced, achieving high-precision, dynamic, and visualized assessment of power grid security risks, significantly improving computational efficiency, convergence stability, and early warning capabilities.

[0025] Example 2, this is an embodiment of the present invention, which provides a power grid security risk assessment method based on the previous embodiment, including: In this embodiment of the application, in step S100, the topology bus number or equivalent aggregation point number of the power grid is defined as a graph node; the multi-source operating status data includes voltage amplitude and phase angle, active power and reactive power, load change rate, new energy output fluctuation rate, equipment status (converted into numerical values ​​through unique thermal encoding) and meteorological environmental parameters. In this embodiment of the application, the preprocessing of multi-source operating status data in step S100 includes: Outlier removal is performed on the raw measurement data; Normalize data with different physical dimensions; Generate a state vector with a unified timestamp by aligning it with time. The corrected multi-source operational data is normalized in each dimension and then spliced ​​together in a preset order to form a node state vector with a unified dimension. Cluster analysis is performed on the state vectors of each bus node to generate category labels that reflect operational characteristics; The category label is embedded into the state vector of the corresponding bus node to form the updated node attribute vector.

[0026] In this embodiment of the application, the outlier removal process for the original measurement data in step S100 includes: Data anomalies are determined based on the node power balance deviation value. The power balance deviation value is the sum of the active power flowing into the node minus the sum of the active power flowing out of the node, and then minus the node load power. When the absolute value of the power balance deviation exceeds the preset physical threshold (set based on experience), the time mean correction algorithm is used to correct the abnormal data.

[0027] In an optional implementation, step S100 can also be used to remove outliers from the original measurement data by calculating the Z-score or IQR of the multi-source measurement data of each bus node within a sliding time window, marking outliers that exceed the threshold, and repairing them using linear or time neighborhood interpolation to generate a corrected state vector input.

[0028] In an optional implementation, step S100, which removes outliers from the original measurement data, can also utilize historical normal operation data to train an Isolation Forest or autoencoder model to detect anomalies in real-time multi-source measurement data. Data points whose reconstruction error or anomaly score exceeds a threshold are identified as anomalies and corrected using model predictions or nearby normal samples to generate a repaired state vector.

[0029] In this embodiment of the application, the clustering analysis includes: determining the optimal number of clusters based on the elbow rule, using an unsupervised clustering algorithm to cluster the state vectors to obtain high-fluctuation nodes, steady-state nodes, new energy-dominated nodes, and load-dominated nodes, and assigning category labels to them respectively; In this embodiment, unsupervised clustering algorithm refers to a clustering method that does not require prior category labels and only groups based on the intrinsic similarity of state vectors; unsupervised clustering algorithms include, but are not limited to, K-means clustering, hierarchical clustering, Gaussian mixture model, or spectral clustering; among them, K-means clustering algorithm is preferred because it has high computational efficiency, is suitable for large-scale power grid node scenarios, and can effectively identify typical operating modes with spherical distribution characteristics (such as high-fluctuation nodes, new energy-dominated nodes, etc.); the number of clusters is adaptively determined by the elbow rule to ensure the rationality and stability of the category division.

[0030] In this embodiment of the application, the method for generating the category label of the node state vector in step S100 includes extracting multi-source operating data of each bus node by setting a sliding time window, forming a state vector after anomaly correction and normalization, automatically determining the number of clusters by using the K-means clustering algorithm combined with the elbow rule, dividing the nodes into typical operating modes such as high fluctuation, steady state, new energy-dominated or load-dominated, and embedding the obtained category label into the original state vector in the form of one-hot encoding to generate the updated node attribute vector.

[0031] In an optional implementation, the method for generating category labels for node state vectors in step S100 can also be based on preset operating feature threshold rules to logically judge the state vectors of each bus node, directly assign corresponding semantic category labels, and embed the state vectors in a one-hot encoding form to form updated node attribute vectors.

[0032] In an optional implementation, the method for generating the category label of the node state vector in step S100 can also be to input the preprocessed bus node state vector into a pre-trained Deep Embedded Clustering (DEC) model, and automatically identify operating modes such as high volatility and new energy dominance by jointly optimizing feature representation and clustering target, output soft clustering probability and take the maximum response as the category label, and then embed the original state vector in the form of one-hot encoding to form the updated node attribute vector.

[0033] In this embodiment of the application, the preprocessing of multi-source operational status data further includes: Set the sliding time window length to , indicating that it contains For each bus node, active power observations are extracted using continuous time sampling points to construct a node power time series, represented as: in, For nodes The node power time series, This is the end time of the sliding time window. Indicates the length of the time window. For nodes The active power of the node, and For a point in time; In this embodiment, step S200, which involves constructing a graph structure based on topology data, specifically includes: defining the topology bus number or equivalent convergence point number as a graph node; establishing an undirected edge between the corresponding nodes if there is a transmission line between two nodes; establishing an edge between the high-voltage side and low-voltage side bus nodes of a transformer; and defining an edge between the two nodes connected to a circuit breaker, disconnector, or other controllable electrical equipment when it is in a closed state that allows current to pass through, thereby generating a static graph structure that reflects the actual electrical connectivity of the power grid.

[0034] In this embodiment of the application, step S200 assigns a dynamic weight to each line edge based on the ratio of real-time power flow to rated capacity, including: Obtain the actual active power flow of the line at the current moment; Read the line's capacity limit; Calculate the ratio as the initial dynamic weight of the edge; The dynamic weights are updated hourly within a sliding time window to form a time-varying edge weight sequence, and the dynamic weights are used as edge attributes of the complete power grid state diagram.

[0035] In this embodiment, each edge of the graph structure is assigned an edge weight to obtain a power grid state graph in which nodes have update vectors and edges have operational attributes, which is defined as a complete power grid state graph; the edge weight calculation formula is: in, For connecting nodes With nodes The line at time The edge weights, For this line at time active power, This is the maximum permissible active power of the line, i.e., the capacity limit. For time.

[0036] In this embodiment of the application, the capacity limit of the line refers to the upper limit parameter that reflects the maximum allowable transmission capacity of the line, and its value can be determined according to the power grid operation specifications, equipment physical characteristics or historical dispatch experience. Capacity limits include, but are not limited to, the thermal stability limit of the line, the rated transmission capacity of the equipment, the operating limit issued by the dispatching department, or the rated allowable power flow calculated dynamically based on historical power factor. Among them, the thermal stability limit is determined by the conductor material, cross-sectional area and ambient temperature of the line, and characterizes the short-term overload capacity; the rated transmission capacity is the nominal power of the equipment for long-term safe operation; and the rated allowable power flow, which is dynamically calculated based on historical data, is determined by the three-phase power formula, in which the power factor angle is derived by back-calculating the historical power factor average obtained from the dispatch system API, which is more in line with the actual operating conditions.

[0037] It should be noted that the dynamic weights in S200 It is mainly used for visualizing the running status and prioritizing task scheduling, and does not participate in S300 power flow calculation or S400 limit violation determination; the limit violation determination in S400 is always based on a fixed safety limit (load rate = 1).

[0038] In this embodiment of the application, step S300, which involves solving the steady-state power flow distribution of the fault scenario based on the graph message passing mechanism, includes: Initialize the phase angle of each node to the measured value before the fault; Calculate the power conservation residual and reactance weights of each node based on the current phase angle; Update the phase angle of each node based on the power conservation residual and reactance weight; After each iteration, calculate the maximum absolute value of the power conservation residuals of all nodes; The iteration terminates when the maximum value is less than or equal to the preset maximum power conservation residual threshold, and the actual power flow of each line is calculated based on the node phase angle obtained in the last iteration to obtain the steady-state power flow distribution of the fault scenario.

[0039] In this embodiment of the application, the fault power flow solution mechanism in step S300 includes using the measured phase angle as the initial value in the power grid graph model after removing the fault edge, iteratively calculating the power conservation residual and reactance weight of each node based on the DC power flow model, updating the phase angle using the graph message passing mechanism until the residual converges, and finally calculating the actual power flow and load rate of the line based on the converged phase angle to complete the steady-state power flow solution under the fault scenario.

[0040] In an optional implementation, the fault power flow solution mechanism in step S300 can also establish a set of nonlinear equations containing node voltage magnitude and phase angle based on the AC power flow equations in the power grid topology after removing faulty components. Using measured data as initial values, the Jacobian matrix is ​​solved iteratively and the state variables are corrected until the active / reactive power imbalance meets the convergence threshold, thereby obtaining the accurate AC power flow and load rate of each line.

[0041] In an optional implementation, the fault power flow solution mechanism in step S300 can also take the injected active / reactive power and initial voltage values ​​of each node as node features input to the pre-trained GNN model on the power grid graph structure after removing the fault edge, and directly output the power flow prediction values ​​of each line through message passing, without iterative solution, thereby quickly obtaining the steady-state power flow distribution under the fault scenario.

[0042] Specifically, the iterative aggregation process is achieved by calculating the sum of the power conservation residual and the reactance weights, and includes the following steps: Based on the N-1 safety criterion, all edges in the complete power grid state diagram are traversed to generate a set of line faults, denoted as: in, This represents the set of single-line interruption faults that satisfy the N-1 safety criterion. ( ) is the first The edges of the diagram corresponding to each transmission line; Each fault element in the fault set Each task is defined as an independent graph computation task unit, and subsequent power flow solutions and risk assessments are performed independently based on each task unit.

[0043] It should be noted that the graph message passing mechanism described in this invention is not a general graph neural network, but an iterative solution framework customized based on the physical laws of power systems: each node generates a correction message based on the local power imbalance (i.e., power conservation residual), and aggregates neighbor information through the inverse reactance weighting method to achieve collaborative updating of phase angle. Its essence is the distributed solution process of DC power flow equation.

[0044] It should be noted that the graph model in this invention is the specific mathematical and computational expression of the complete power grid state diagram constructed in step S200. This graph model uses the electrical topology of the power grid as its basic framework, where each bus or equivalent convergence point is abstracted as a node, and each electrical connection formed by an actual transmission line, transformer winding, or closed-loop switching device is abstracted as an edge. Based on this, each node is assigned an attribute vector containing operating status information and category labels, and each edge is dynamically assigned a weight value based on real-time power flow data. This graph model not only fully preserves the physical connections of the power grid but also integrates multi-source operating status data, thus becoming a unified computational carrier for subsequent graph message passing, fault flow calculation, and risk assessment. During graph calculation, the set of neighboring nodes of any node is determined solely by its directly connected edges in the graph model, regardless of the dynamic weight of the edges.

[0045] Based on the graph model, the power conservation residual and reactance weight sum are calculated for each node, using the following formula: , , in, For iteration nodes The power conservation residual, For iteration nodes The phase angle (initial value is the collected phase angle). For iteration nodes phase angle, For nodes and nodes The line reactance, For nodes The set of neighboring nodes is obtained from the graph model. For nodes The reactance weights; Based on the power conservation residual and reactance weights, the phase angles of the nodes in the graph model are updated to obtain the updated phase angles, as shown in the formula: in, For iteration nodes phase angle, The compensation coefficient is set based on engineering experience; The updated phase angle is sent as a message along all edges of the graph model to neighboring nodes to perform the next round of power conservation residual calculation. After each round, the power conservation residuals are sorted in descending order, and the maximum power conservation residual is selected. If the maximum power conservation residual is less than or equal to the maximum power conservation residual threshold (based on an empirical engineering threshold setting method), the iteration stops. It should be noted that in the graph message passing mechanism, this invention uses a DC power flow model for steady-state power flow approximation calculation, neglecting the influence of line resistance and reactive power, and only considering line reactance. The dominant role of the current of merit, among which The equivalent reactance value of the transmission line between nodes i and j can be obtained from the power grid parameter database.

[0046] Based on the updated phase angle from the last iteration, the actual power flow for each edge is calculated using the following formula: , in, For the last iteration nodes and nodes The actual trend and For the last iteration nodes and nodes The phase angle; Define the rated allowable power flow and calculate the line load rate by comparing it with the actual power flow, using the following formula: , , in, For nodes and nodes Rated allowable current flow, Here, represents the three-phase system coefficient, and represents a constant, set based on the three-phase power calculation rules. For nodes and nodes The voltage rating, For nodes and nodes The rated current, For nodes and nodes The fixed value of the normal power factor angle obtained from historical operation statistics is obtained through the API interface from the average line power factor in historical scheduling records, and then obtained through the inverse cosine function. For the last iteration nodes and nodes Line load rate; The line load rate is threshold-determined to obtain a judgment symbol indicating whether the limit is exceeded. The lines that exceed the limit are then identified, and the set of lines that exceed the limit is obtained by horizontal arrangement. The formula is as follows: , in, For the last iteration nodes and nodes The determination flag is 1 for yes and 0 for no.

[0047] In this application embodiment, the N-1 safety criterion refers to the requirement that the remaining components of the power grid can still operate safely after any single transmission component (including transmission lines, main transformer windings, or critical switching equipment) is taken out of operation; the present invention regards each disconnectable electrical connection edge as a potential fault unit, thereby generating a fault set covering typical N-1 scenarios.

[0048] In this embodiment of the application, the line load rate sequence output by S300 at each time moment is directly used as the input of S400 for over-limit determination and severity calculation.

[0049] In the embodiments of this application, for each fault scenario At every moment Calculate its risk value at any given time, denoted as . This is used for subsequent dynamic risk assessment.

[0050] In this embodiment of the application, step S400, which calculates the time-series propagation trend of the normalized limit violation severity and the number of limit violations for each line, includes: The load rate of each line at each time point is determined to exceed the limit, resulting in a set of lines that exceed the limit. The severity of the fault scenario is calculated based on the load rate exceeding the limit of each line in the set of lines exceeding the limit. The severity is mapped to a preset normalization interval to obtain the normalized out-of-limit severity. The time series of the total number of lines exceeding the limit within the sliding time window; The rate of change of the time series is calculated as an indicator of the time series propagation trend.

[0051] In this embodiment of the application, the preset normalization interval is [0,1], and the severity of exceeding the limit is mapped to this interval by the minimum-maximum normalization method within the sliding time window.

[0052] In this embodiment of the application, the rate of change of the time series is used to characterize the growth or decline trend of the number of out-of-limit lines in the time dimension; The methods for calculating the rate of change include, but are not limited to: performing first-order difference operations on the time series to obtain the increment of the number of times exceeding the limit at adjacent time points; or performing linear fitting on the sequence of the number of times exceeding the limit within the sliding time window and using its regression slope as the rate of change. The above methods can quantify the dynamic direction and intensity of risk transmission. When the rate of change is positive, it reflects the trend of risk spread and provides a basis for early warning.

[0053] In this embodiment, the sliding time window is a continuous time interval of fixed length, including... The sampling time is at equal intervals, and the current evaluation time is used as the endpoint to slide backward (or forward); the time window used for data preprocessing in S100 is the same time window used for risk assessment in S300 / S400, to ensure that state vector, power flow calculation and risk quantification are carried out under a unified time reference.

[0054] In this embodiment of the application, the calculation of the risk value at a given time includes: Set the sliding time window for real-time evaluation to K time points. For each scenario, extract the set of over-limit lines and the line load rate within the sliding window. Extract the number of over-limit lines in the set of over-limit lines to obtain the over-limit scale. Calculate the difference between the over-limit scale at time t and time t-1 to obtain the time-series growth. If the time series growth is greater than 0, it is set to over-limit diffusion (propagation enhancement); if the time series growth is less than 0, it is set to over-limit convergence (propagation reduction). The severity is defined based on the line load rate. The maximum value of the severity within the sliding time window is selected and normalized to obtain the normalized severity of exceeding the limit. The formula is as follows: , in, For fault scenarios The severity For fault scenarios The set of lines that exceed the limit; A normalized propagation term is constructed for the time-series growth (constructed when the time-series growth is an out-of-limit diffusion, otherwise it is 0), and the time-series risk value is obtained by combining it with the normalized out-of-limit severity. The formula is as follows: , , , in, For fault scenarios Normalized propagation term, For fault scenarios The time-series growth rate, For fault scenarios The non-negative part of the time-series growth, It is a very small positive number. For fault scenarios The risk value at any given moment. and These are the weighting coefficients. For fault scenarios Normalization severity exceeding the limit; Indicates within the current sliding time window The maximum value; For example, the smallest positive number (e.g.) ), used to avoid the denominator being zero.

[0055] In this embodiment of the application, step S400, which classifies the risk level of each line according to the dynamic risk value, includes: When the dynamic risk value is zero, it is marked as safe; When the dynamic risk value is greater than zero but does not exceed the preset fault risk threshold, it is marked as a general risk; When the dynamic risk value exceeds the preset fault risk threshold, it is marked as high risk.

[0056] In this embodiment, the preset fault risk threshold is not a fixed constant, but a configurable parameter determined comprehensively based on historical power grid operation data and dispatching experience, combined with the power system safety operation regulations. Its setting logic aims to effectively distinguish between general risks and high-risk scenarios, ensuring that high-risk operating conditions are not underestimated. At the same time, this threshold can be dynamically adjusted according to actual operating conditions (such as the output level of new energy sources, peak and valley periods of load, or maintenance methods) to adapt to the risk sensitivity requirements under different operating conditions, thereby improving the practicality of risk assessment and the reliability of decision-making.

[0057] In this embodiment of the application, in order to avoid the risk signal being smoothed or masked in the time dimension, the present invention uses the maximum value of the risk value at any time within the sliding window as the final dynamic risk value, so as to ensure that the most severe risk conditions are given sufficient attention, which is in line with the conservative principle of power system safety assessment.

[0058] In this embodiment of the application, the dynamic risk value fusion strategy in step S400 includes calculating the sum of the severity of each line exceeding the limit within a sliding time window and normalizing it to obtain a normalized severity of exceeding the limit. At the same time, the time series of the number of lines exceeding the limit is statistically analyzed and a normalized propagation trend term is constructed using its non-negative first-order difference. Finally, the two are linearly weighted and fused according to a preset weight to obtain the risk value at any time, and the maximum value within the window is taken as the dynamic risk value of the fault scenario.

[0059] In an optional implementation, the dynamic risk value fusion strategy in step S400 can also calculate the propagation trend of normalized limit violation severity and limit violation quantity within a sliding time window, and combine them in a nonlinear fusion manner to highlight risk scenarios that simultaneously have high limit violation degree and rapid diffusion characteristics. Finally, the maximum value of the fusion result at all times within the window is taken as the dynamic risk value of the fault scenario.

[0060] In an optional implementation, the dynamic risk value fusion strategy in step S400 can also take the normalized severity of exceeding the limit, the propagation trend of the number of exceeding the limit and the duration of the limit within the sliding time window as independent evidence sources or evaluation factors, assign membership degree or basic probability allocation respectively, and then perform hierarchical fusion and confidence synthesis through fuzzy comprehensive evaluation or Dempster-Shafer evidence theory, and finally output the comprehensive risk level of the failure scenario as the dynamic risk value.

[0061] In this embodiment of the application, step S500, which involves deducing the risk status of the bus nodes associated with each line, includes: Iterate through all the lines connected to each bus node; If there is at least one high-risk line among the connected lines, the corresponding bus node will be marked as a high-risk node. If all connected lines are safe lines, then the corresponding bus node is marked as a safe node; If the connected lines do not contain high-risk lines but contain at least one general-risk line, then the corresponding bus node will be marked as a general-risk node.

[0062] In this embodiment, step S500, which involves reverse-engineering the risk status of bus nodes and generating a visual map, specifically includes: based on the static graph structure constructed in S200 (preserving the original topology connections), traversing all lines connected to each bus node; if there is at least one high-risk line among the connected lines, then the bus node is marked as a high-risk node; if there are no high-risk lines but there is at least one general-risk line, then it is marked as a general-risk node; if all connected lines are safe, then it is marked as a safe node; finally, the line risk level and node risk status are embedded as attributes into the static graph structure to form a power grid safety situation map carrying multi-level risk semantics, and are graphically displayed through visual encoding methods such as color, line width, or icons, supporting operators to intuitively identify weak areas and propagation paths.

[0063] In this embodiment, the visualization map is strictly constructed based on a static topology map without dynamic weights, and only the risk level attributes of lines and nodes obtained by S400 assessment are superimposed, thereby ensuring that the displayed content reflects the structural vulnerability of the power grid, rather than short-term operational fluctuations.

[0064] It should be noted that this invention relates to two types of graph models: static graphs and complete power grid state graphs. Static graphs only represent the fixed electrical topology of the power grid, including the node and edge connections defined by buses, transmission lines, transformers, and closed switches. They do not carry any operational status information and are mainly used for subsequent risk visualization and node risk inference. Complete power grid state graphs, on the other hand, are enhanced graph models built upon the topological skeleton of static graphs. They embed the state vectors (including operational characteristics and category labels) of each bus node into the nodes and assign dynamic weights based on real-time power flow to each edge. These models support fault flow calculations and risk assessments under a graph message passing mechanism. While both have the same topological structure, their attribute richness and application scenarios differ and should not be confused.

[0065] Example 3 is an embodiment of the present invention. This embodiment differs from the first embodiment in that it provides a power grid security risk assessment system.

[0066] It should be noted that the technical solution of this power grid security risk assessment system and the technical solution of the aforementioned power grid security risk assessment method belong to the same concept. For details not described in detail in the technical solution of the power grid security risk assessment system in this embodiment, please refer to the description of the technical solution of the aforementioned power grid security risk assessment method.

[0067] This embodiment provides a power grid security risk assessment system, comprising: The data acquisition and preprocessing module is used to acquire the topology data and multi-source operating status data of the power grid, and to preprocess the multi-source operating status data to generate the state vector of each bus node. The power grid graph structure construction module is used to construct a graph structure based on topology data, embed state vectors into the corresponding bus nodes, and assign dynamic weights to each line edge based on the ratio of real-time power flow to rated capacity, thereby constructing a complete power grid state graph. The graph-driven fault power flow simulation module is used to remove the corresponding edge in the power grid state graph for each single transmission element fault scenario, and solve the steady-state power flow distribution of the fault scenario at multiple times within the sliding time window based on the graph message passing mechanism, so as to obtain the multi-time power flow distribution sequence. The dynamic risk quantification module is used to calculate the normalized severity of the limit violation and the temporal propagation trend of the number of limit violations for each line based on the multi-time power flow distribution sequence. The normalized severity of the limit violation and the temporal propagation trend of the number of limit violations are weighted and fused to obtain the dynamic risk value of the fault scenario. The risk level of each line is divided according to the dynamic risk value. The visualization module is used to infer the risk status of the bus nodes associated with each line based on the risk level of each line, and generate a visualization map that includes both line-level and node-level risk attributes.

[0068] This embodiment also provides an electronic device applicable to a power grid security risk assessment method, including: The system includes a memory and a processor. The memory stores computer-executable instructions, and the processor executes these instructions to implement a power grid security risk assessment method as described in the above embodiments.

[0069] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a power grid security risk assessment method as proposed in the above embodiments.

[0070] The storage medium proposed in this embodiment and the method for implementing power grid security risk assessment proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0071] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, 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 a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0072] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for assessing power grid security risks, characterized in that, include: Acquire the topology data and multi-source operating status data of the power grid, and preprocess the multi-source operating status data to generate the state vector of each bus node; A graph structure is constructed based on topology data, and state vectors are embedded into the corresponding bus nodes. At the same time, each line edge is assigned a dynamic weight based on the ratio of real-time power flow to rated capacity, thus constructing a complete power grid state graph. For each single transmission element fault scenario, the corresponding edge is removed from the power grid state diagram, and based on the graph message passing mechanism, the steady-state power flow distribution of the fault scenario is solved at multiple times within the sliding time window to obtain the multi-time power flow distribution sequence. Based on the multi-moment power flow distribution sequence, the time-series propagation trend of the normalized limit violation severity and the number of limit violations for each line is calculated. The time-series propagation trend of the normalized limit violation severity and the number of limit violations is weighted and fused to obtain the dynamic risk value of the fault scenario. The risk level of each line is then classified according to the dynamic risk value. Based on the risk level of each line, the risk status of the bus nodes associated with each line is inferred, and a visual map containing both line-level and node-level risk attributes is generated.

2. The power grid security risk assessment method as described in claim 1, characterized in that: The preprocessing of multi-source operational status data includes: Outlier removal is performed on the raw measurement data; Normalize data with different physical dimensions; Generate a state vector with a unified timestamp by aligning it with time. The corrected multi-source operational data is normalized in each dimension and then spliced ​​together in a preset order to form a node state vector with a unified dimension. Cluster analysis is performed on the state vectors of each bus node to generate category labels that reflect operational characteristics; Embed the category label into the state vector of the corresponding bus node to form the updated node attribute vector; The outlier removal process for the original measurement data includes: The data anomaly is determined based on the node power balance deviation value, which is the sum of the active power flowing into the node minus the sum of the active power flowing out of the node and then minus the node load power. When the absolute value of the power balance deviation is greater than a preset physical threshold, a time-average correction algorithm is used to correct the abnormal data. The clustering analysis includes: determining the optimal number of clusters based on the elbow rule, using an unsupervised clustering algorithm to cluster the state vectors to obtain high-fluctuation nodes, steady-state nodes, new energy-dominated nodes, and load-dominated nodes, and assigning category labels to them respectively.

3. The power grid security risk assessment method as described in claim 1 or 2, characterized in that: The process of assigning dynamic weights to each line edge based on the ratio of real-time power flow to rated capacity includes: Obtain the actual active power flow of the line at the current moment; Read the line's capacity limit; Calculate the ratio as the initial dynamic weight of the edge; The dynamic weights are updated hourly within a sliding time window to form a time-varying edge weight sequence, and the dynamic weights are used as edge attributes of the complete power grid state diagram.

4. The power grid security risk assessment method as described in claim 3, characterized in that: The graph-based message passing mechanism solves for the steady-state power flow distribution of the fault scenario at multiple moments within a sliding time window, including: Initialize the phase angle of each node to the measured value before the fault; Calculate the power conservation residual and reactance weights of each node based on the current phase angle; Update the phase angle of each node based on the power conservation residual and reactance weight; After each iteration, calculate the maximum absolute value of the power conservation residuals of all nodes; The iteration terminates when the maximum value is less than or equal to the preset maximum power conservation residual threshold, and the actual power flow of each line is calculated based on the node phase angle obtained in the last iteration to obtain the steady-state power flow distribution of the fault scenario.

5. The power grid security risk assessment method as described in claim 4, characterized in that: The time-series propagation trend for calculating the normalized severity and number of limits exceeded for each line includes: The load rate of each line at each time point is determined to exceed the limit, resulting in a set of lines that exceed the limit. The severity of the fault scenario is calculated based on the load rate exceeding the limit of each line in the set of lines exceeding the limit. The severity is mapped to a preset normalization interval to obtain the normalized out-of-limit severity. The time series of the total number of lines exceeding the limit within the sliding time window; The rate of change of the time series is calculated as an indicator of the time series propagation trend.

6. The power grid security risk assessment method as described in claim 5, characterized in that: The method of classifying the risk levels of each line based on dynamic risk values ​​includes: When the dynamic risk value is zero, it is marked as safe; When the dynamic risk value is greater than zero but does not exceed the preset fault risk threshold, it is marked as a general risk; When the dynamic risk value exceeds the preset fault risk threshold, it is marked as high risk.

7. The power grid security risk assessment method as described in claim 6, characterized in that: The reverse calculation of the risk status of the bus nodes associated with each line includes: Iterate through all the lines connected to each bus node; If there is at least one high-risk line among the connected lines, the corresponding bus node will be marked as a high-risk node. If all connected lines are safe lines, then the corresponding bus node is marked as a safe node; If the connected lines do not contain high-risk lines but contain at least one general-risk line, then the corresponding bus node will be marked as a general-risk node.

8. A power grid security risk assessment system, using the method described in any one of claims 1-7, characterized in that, include: The data acquisition and preprocessing module is used to acquire the topology data and multi-source operating status data of the power grid, and to preprocess the multi-source operating status data to generate the state vector of each bus node. The power grid graph structure construction module is used to construct a graph structure based on topology data, embed state vectors into the corresponding bus nodes, and assign dynamic weights to each line edge based on the ratio of real-time power flow to rated capacity, thereby constructing a complete power grid state graph. The graph-driven fault power flow simulation module is used to remove the corresponding edge in the power grid state graph for each single transmission element fault scenario, and solve the steady-state power flow distribution of the fault scenario at multiple times within the sliding time window based on the graph message passing mechanism, so as to obtain the multi-time power flow distribution sequence. The dynamic risk quantification module is used to calculate the normalized severity of the limit violation and the temporal propagation trend of the number of limit violations for each line based on the multi-time power flow distribution sequence. The normalized severity of the limit violation and the temporal propagation trend of the number of limit violations are weighted and fused to obtain the dynamic risk value of the fault scenario. The risk level of each line is divided according to the dynamic risk value. The visualization module is used to infer the risk status of the bus nodes associated with each line based on the risk level of each line, and generate a visualization map that includes both line-level and node-level risk attributes.

9. An electronic device, characterized in that, include: Memory, used to store programs; A processor for loading the program to perform the steps of the method as claimed in any one of claims 1-7.

10. A computer-readable storage medium storing a program, characterized in that, When the program is executed by a processor, it implements the steps of the method as described in any one of claims 1-7.