Power grid stability control resource aggregation and strategy verification method based on multi-level topological mapping
By constructing a multi-level topology mapping graph and a state-aware recursive aggregation algorithm, the hierarchical fragmentation and policy matching problems of resource management in the power grid stability control system are solved, realizing real-time dynamic updates of power grid resources and accurate policy verification, thereby improving the reliability and transparency of power grid security and stability control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-06
- Publication Date
- 2026-03-31
AI Technical Summary
Existing power grid stability control systems suffer from problems such as fragmented hierarchical relationships in resource management, lagging statistics on scalable quantities, and lack of logic verification for strategy matching, resulting in insufficient accuracy and reliability of power grid safety and stability control.
A multi-level topology mapping-based approach to power grid stability control resource aggregation and strategy verification is adopted. By constructing a multi-dimensional topology mapping graph of the entire network's physical resources, a state-aware recursive aggregation algorithm is used to dynamically update resource capacity. A graph traversal algorithm is combined to verify the connectivity and capacity threshold of the strategy execution path. A priority-based resource allocation model is established to resolve multi-strategy conflicts.
It achieves millisecond-level real-time synchronization of power grid resource data, avoids the risks of 'idle switching' and 'erroneous switching' in strategy execution, improves the accuracy and reliability of power grid safety and stability control, and ensures real-time data consistency and high system robustness.
Smart Images

Figure CN121765321A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system automation control and information management technology, and in particular to a method for power grid stability control resource aggregation and strategy verification based on multi-level topology mapping. Background Technology
[0002] With the continuous expansion of the power grid and the increasing proportion of new energy sources, the safety and stability control of the power grid (hereinafter referred to as "stability control") faces unprecedented challenges. The stability control system is the second line of defense for ensuring the safe operation of the power grid. Its core lies in formulating scientific stability control strategies and ensuring that these strategies can be accurately applied to specific controlled resources (such as thermal power units, hydropower units, photovoltaic / wind power plants, etc.). In actual operation, the physical topology of the power grid is complex, containing master stations, substations, and execution stations of different voltage levels, and the line connections between these stations are intricate. At the same time, the status of the underlying controlled resources (such as generator units) is dynamically changing and may be taken out of operation at any time due to maintenance, faults, or dispatching reasons.
[0003] Existing power grid stability management primarily relies on manual maintenance of strategy and resource tables, a discrete management model with significant drawbacks. First, resource and strategy data often suffer from "island effects," making it difficult for manual verification of whether the associated lines or substations have sufficient execution capacity. For example, when a lower-level photovoltaic power station is shut down for maintenance, the upper-level stability control strategy may still include it in the "switching capacity," leading to "no-switching" or insufficient disconnection during strategy execution, seriously threatening grid security. Second, the statistics of switchable capacity at different sections are usually compiled manually on a periodic basis, resulting in significant data lag and an inability to reflect millisecond-level changes in the grid's state. Furthermore, when multiple strategies operate simultaneously, the lack of effective algorithms to detect resource contention conflicts easily leads to confusion in control commands.
[0004] Therefore, there is an urgent need for a technical solution that can transform the physical resources of the power grid into a digital topology model, dynamically aggregate available capacity in real time based on changes in the underlying resource status, and automatically verify the consistency of strategy logic, in order to solve the technical problems existing in the current stable control resource management, such as matching errors, statistical lags and inability to identify conflicts. Summary of the Invention
[0005] The technical problem this invention aims to solve is to address the shortcomings of existing power grid stability control systems in resource management, such as fragmented hierarchical relationships, delayed scalability statistics, and lack of policy matching logic verification. This invention provides a method for power grid stability control resource aggregation and policy verification based on multi-level topology mapping. This method constructs a multi-dimensional topology mapping graph of the entire network's physical resources in memory, utilizes a state-aware recursive aggregation algorithm to achieve millisecond-level dynamic updates of resource capacity, and combines a graph traversal algorithm to verify the connectivity and capacity thresholds of policy execution paths. This significantly improves the accuracy and reliability of power grid safety and stability control strategies.
[0006] The technical solution adopted in this invention is as follows: a method for power grid stability control resource aggregation and strategy verification based on multi-level topology mapping. This method is executed by a computer processing system and specifically includes the following steps.
[0007] S1: Construct a multi-level power grid topology mapping diagram.
[0008] The processor first reads the basic configuration data of the power grid through the data interface. This basic configuration data includes the entity attributes of power plants and substations, the connection relationships of transmission lines, and the operating parameters of resource mapping nodes. The system then initializes a directed graph structure in memory space. ,in Represents a set of nodes. The set of edges. The set of nodes. Further divided into four hierarchical subsets, namely the main station node set Substation node set Execution station node set and leaf resource node set The system establishes vertical hierarchical relationships between nodes at each level based on the topology association pointers in the substation data, forming several multi-branch tree structures rooted at the master station. Simultaneously, the system establishes horizontal connecting edges between nodes in different tree structures based on the starting and ending substation identifiers in the line data. This results in a complex topology combining tree and network elements. For each leaf resource node... The system assigns a dynamic state vector to it. This vector contains the rated capacity, current operating status, and control / switching priority attributes.
[0009] S2: Establish a state-aware dynamic resource aggregation model.
[0010] To address the issue of lag in manual statistics, this invention introduces an event-driven dynamic aggregation mechanism. The system deployment status listener monitors the running status enumeration values of all leaf resource nodes in real time. When any... leaf nodes When the state changes, the system does not perform a full scan, but instead triggers a bottom-up recursive aggregation algorithm. First, the real-time effective capacity of the leaf nodes is defined. The calculation formula is as follows: in, This indicates the rated control capacity of the resource mapping node. This is the status mask coefficient, which takes a value of 1 when the unit is in the "normal" state and a value of 0 when it is in the "maintenance" or "disabled" state. This is the power factor correction factor, used to correct the actual output capacity of active power.
[0011] Furthermore, for any non-leaf node Its polymerization capacity The update follows the recursive accumulation formula: in, This represents the set of direct child nodes of the given node in the topology tree. If a child node is a leaf node, then... equal to its If a child node is an intermediate node, its already calculated aggregate value is used. This algorithm ensures that changes in the underlying state can be instantly propagated to the top-level master node, achieving real-time synchronization of network-wide resource data.
[0012] S3: Analyze the stability control strategy and construct verification constraints.
[0013] The system receives a stability control strategy command to be verified, which includes the target line identifier. Strategy type and demand control of cutting volume The system first performs syntax parsing on the strategy, extracting key index keys that match the topology graph. Then, based on the requirements of power grid security and stability control, the system constructs a constraint model for strategy consistency verification. These constraints include at least topology connectivity constraints, capacity threshold constraints, and voltage level matching constraints. The inequality expression for the capacity threshold constraint is as follows: in, This represents the set of all valid leaf resource nodes covered by the strategy in the topology graph. This is a safety margin factor, typically set to a value greater than 1.0, to ensure sufficient resource reserves even in extreme circumstances.
[0014] S4: Execute strategy path search and consistency verification.
[0015] The target line identifier in the strategy instruction As an index, in the topology map Locate the corresponding edge object in the middle. And identify the plant nodes connected to both ends of the edge object. and The system uses these two nodes as starting anchors and executes either a depth-first search or a breadth-first search algorithm to traverse all nodes in their respective subnets. During the traversal, the system checks the connectivity of the path in real time. If a node is found to be offline or the path is interrupted, it is marked as an unreachable node and removed from the set. Remove all resources belonging to the current node. After traversal, the system will collect the data. The real-time capacity of the remaining effective resources is substituted into the above constraint formula for calculation. If the calculation result does not meet the constraint conditions, or if the voltage level attribute and strategy type are found to be mismatched during the traversal, the system will determine that the strategy has a logical defect, generate a blocking instruction containing specific mismatch reasons and suggested correction values, and feed it back to the front-end interactive interface.
[0016] S5: Priority-based multi-strategy conflict resolution.
[0017] In actual operation, multiple strategies may be triggered simultaneously and compete for the same set of control resources. To resolve this conflict, this invention establishes a priority-based resource allocation model. Let there be at the current moment... Each strategy requests resources simultaneously. The priority is (The smaller the value, the higher the priority), the required quantity is The system first... Each strategy according to Sort in ascending order. For the sorted... Each strategy has its available resource reserves. The calculation formula is as follows: in, This represents the total capacity of all available resources within the current topology range. For high-priority strategies in the order of priority The actual amount of resources locked. If calculated... Then determine the first If a strategy fails to execute due to insufficient resources, the system will automatically suspend the strategy and issue a resource preemption alarm.
[0018] S6: Data consistency verification and self-healing.
[0019] To prevent discrepancies between the topology state in memory and the persistent data in the database, the system introduces a periodic consistency check mechanism. The system uses a hash algorithm to calculate the hash checksum of the resource state characteristic values of each level of node in memory. Hash check code corresponding to the record in the database The comparison logic is as follows: like If this occurs, it indicates a data inconsistency anomaly. At this point, the system triggers a self-healing process, forcibly reloading all basic data from the database, rebuilding the multi-level topology mapping, and re-executing a complete bottom-up aggregation calculation to ensure the absolute accuracy of the stability control decision-making basis.
[0020] Beneficial effects This invention employs a state-aware, bottom-up recursive aggregation algorithm, changing the traditional resource statistics model that relies on manual periodic summarization or full table scanning. When the state of the underlying units changes, incremental updates are performed only on the affected topology paths, significantly reducing computational complexity from full scan to the tree depth level. This mechanism ensures that power grid resource data can achieve millisecond-level real-time synchronization, effectively solving the problem of control strategy failure caused by data statistics lag.
[0021] Furthermore, this invention introduces a rigorous logical verification mechanism before strategy execution by constructing a "physical-topology" mapping model, including topology connectivity analysis, capacity threshold comparison, and voltage level matching. This mechanism can automatically identify and block invalid strategies caused by equipment maintenance, line disconnection, or insufficient resources, thereby avoiding the risks of "unnecessary disconnection," "mistaken disconnection," or insufficient disconnection at the source, and building a rigid logical defense line for power grid security.
[0022] To address the issue of policy conflicts during power grid emergencies, this invention establishes a priority-based resource allocation and conflict resolution model. For complex scenarios where multiple policies may operate simultaneously, a priority queue sorting and resource pre-allocation locking mechanism ensures that high-priority core stability control services receive execution resources first. This mechanism avoids control command chaos caused by resource contention and improves the system's scheduling orderliness under extreme conditions.
[0023] To ensure the reliability and consistency of system data, this invention introduces a periodic memory and database hash fingerprint comparison mechanism, guaranteeing strong consistency and high robustness of system data. Once a data deviation caused by memory leaks or concurrent writes is detected, the system can automatically trigger a self-healing process of full reconstruction, greatly improving the long-term stability of the system and ensuring that stability control decisions are always based on an accurate data foundation.
[0024] Furthermore, this invention achieves end-to-end digitalization and visualization of physical resources, transforming the complex physical power grid into a multi-level, multi-branch tree topology in memory. This not only facilitates algorithm processing but also enables real-time penetration from the underlying device status to the top-level visualization interface via WebSocket, breaking the "island effect" of policy data and resource data in traditional systems and improving the transparency and interaction efficiency of power grid automation management. Attached Figure Description
[0025] Figure 1 This is an overall flowchart of the present invention; Figure 2 This is a diagram of the multi-level topology mapping structure of the present invention; Figure 3 This is a flowchart of the closed-loop strategy verification process of the present invention. Detailed Implementation
[0026] This embodiment provides a method for power grid stability control resource aggregation and strategy verification based on multi-level topology mapping. This method relies on a data processing system deployed on a high-performance computing server. This system uses a relational database to store persistent data at its core, runs a graph-based dynamic topology engine in memory, and interacts with external power grid dispatching terminals via a standardized data interface.
[0027] In the specific application scenario of this embodiment, taking the Shaanxi North Power Grid Stability Control System as an example, the power grid structure includes a 750kV main station, a 330kV substation, and numerous photovoltaic and wind power execution stations, with hundreds or thousands of generator units (i.e., control and switching resources) connected at the bottom layer. To achieve precise management and strategy matching for these massive, heterogeneous resources with real-time changing states, the method adopted in this embodiment first performs memory mapping and topology construction of all data during the system initialization phase. Specifically, the processor reads basic configuration data tables from persistent storage media via JDBC or other database connection protocols. These data tables include, but are not limited to, the "Station" table defining station attributes, the "Line" table defining line connection relationships, and the "VirtualUnit" table defining generator unit parameters. After reading the above data, the processor does not directly store it in table form, but instead instantiates a series of object nodes in the heap area of computer memory to construct a multi-level directed graph structure. Among them, the vertex set Representing all plant nodes and unit nodes, edge set It represents physical power transmission lines and logical hierarchical relationships.
[0028] In constructing the multi-level topology mapping, the system first establishes a vertical tree-like hierarchy based on the "Type" and "ParentID" fields in the substation data. The system instantiates a root node object, such as "750kV Shuofang Substation," and marks it as a master station. Then, it instantiates several child node objects, such as "330kV Wenchang Substation" and "330kV Dabaodang Substation," pointing the parent pointers of these child nodes to the root node, forming the first-level branch. Next, the system continues to instantiate the leaf parent nodes of the next level, such as "Yixing Photovoltaic" and "Fuhua Photovoltaic," attaching them to the corresponding 330kV substation nodes, forming the second-level branch. After completing the vertical skeleton construction, the system reads the line data, parses the "Starting Substation ID" and "Ending Substation ID" of each line record, and establishes horizontal connection edge objects between the corresponding nodes in the tree structure. These edge objects not only contain topological connection relationships but also encapsulate attributes such as line voltage levels, impedance parameters, and thermal stability limits. Finally, the system reads the generator set data, uses it as the smallest granularity leaf resource node, and attaches it to the end of the corresponding execution station node. Each leaf resource node maintains a dynamic state vector in memory. This vector contains key characteristic parameters such as rated capacity, current operating status (e.g., normal, maintenance, out of service), power factor, and regulation rate. Through the above process, the physical world's power grid structure is completely mapped into a complex "tree-network" combined topology model in computer memory, providing a data foundation for subsequent algorithm calculations.
[0029] It is important to note that the leaf resource nodes in memory are not abstract software objects, but rather digital twins of generator sets or inverters in the physical power grid. The 'capacity attribute value' stored in these nodes directly corresponds to the upper limit of active power output (in MW) of the physical unit under the current operating conditions. The real-time update of this value is closely coupled with subsequent strategy verification steps, directly determining the accurate amount of load shelved by the power grid stability control device in the event of a fault, thereby preventing power grid frequency collapse accidents caused by false or lagging data.
[0030] After completing the topology initialization, the core of this embodiment lies in establishing a state-aware dynamic resource aggregation mechanism to solve the time lag problem inherent in traditional manual statistics. The system deploys a global state listener in memory to monitor the operational status enumeration values of all leaf resource nodes in real time. When the power grid operating environment changes, for example, when maintenance personnel change the status of "Yixing Photovoltaic #1 Unit" from "Normal" to "Maintenance" via a terminal, the listener immediately captures the status change event and triggers a bottom-up recursive aggregation algorithm. This algorithm abandons the traditional full-table scan mode and instead adopts an incremental update strategy. The algorithm first locates the leaf node that has undergone the change and reads its rated capacity attribute. and the changed state mask coefficients In this embodiment, when the unit status is "normal", The value is 1; when the status is "maintenance", "fault", or "disabled", The value is 0. The system uses the formula... Calculate the real-time effective capacity of this node, where This is the power correction factor. After calculation, the algorithm calculates the difference in node capacity before and after the change. And pass that difference up.
[0031] The specific recursive propagation process is as follows: The system first accesses the parent node of the leaf node, namely the "Yixing Photovoltaic" execution station node, and adds its currently stored aggregate capacity attribute value. The first-level update is completed; then, the system accesses the parent node of the execution station node, namely the "330kV Wenchang Substation" substation node, and similarly adds its aggregate capacity attribute value. The second-level update is then completed; finally, the system accesses the root node "750kV Shuofang Transformer" and performs the same addition operation. Throughout the recursive process, if there are multiple branches on the path, the algorithm only backtracks upwards along the unique path of state change, and its time complexity is only the depth of the tree. Far lower than the full calculation This means that regardless of the size of the power grid, every tiny fluctuation in the underlying resources can be accurately reflected in the available controllable data of the top-level master station within milliseconds, thus ensuring that the data on which the stability control strategy is based is absolutely real-time and accurate. To intuitively demonstrate this dynamic process, the system's front-end visualization interface receives updated memory topology data in real time via a WebSocket long connection, refreshing the current available controllable controllable values of each master station and substation in real time in the form of dynamic bar charts or digital dashboards, realizing real-time end-to-end data connectivity from the underlying physical devices to the top-level visualization interface.
[0032] Based on the aforementioned real-time updated resource topology, this embodiment further implements a highly reliable stability control strategy consistency verification method, aiming to eliminate the risk of strategy and resource mismatch from the source. When a dispatcher attempts to create or issue a new stability control strategy in the system, such as the "330kV Wendang line overload tripping strategy," the strategy verification module in the system background will immediately start. First, the module performs syntax parsing on the strategy instruction, extracting key feature triples: target line identifier (TargetLineID), associated station set (StationSet), and demand control tripping quantity (DemandCapacity). Next, the algorithm uses the "target line identifier" as the index key to quickly locate the corresponding edge object in the memory topology graph and identify the topology nodes connected to both ends of the edge object, such as "750kV Shuofang substation" and "330kV Wenchang substation." These two nodes are marked as "topology anchor points" for strategy execution.
[0033] Subsequently, the system uses these topological anchor points as starting points and executes a depth-first search (DFS) or breadth-first search (BFS) algorithm to traverse all nodes in their respective subnets. During the traversal, the algorithm checks the connectivity of each path in real time. If an intermediate node (such as a substation) is found to be "offline" or "under maintenance," the algorithm determines that the path is broken and automatically removes all leaf resources belonging to that node, no longer counting it in the effective resource pool. This dynamic pruning mechanism based on graph traversal can accurately identify the risk of topological link breakage caused by changes in the power grid operation mode. For each effective leaf resource node traversed, the algorithm sets its current real-time effective capacity... Accumulated to a temporary variable After the traversal is complete, the system will summarize the results. Demand control quantity in strategy instructions Perform a logical comparison. The verification logic follows strict inequality constraints: ,in The safety margin factor is typically set between 1.05 and 1.2 to ensure sufficient resource reserves even under extreme operating conditions. If the above inequality does not hold, meaning the effective resources within the current topology are insufficient to support the strategy's execution, or if the voltage level attributes of associated substations are found to be mismatched with the strategy type during the traversal (e.g., the strategy requires the disconnection of 330kV side loads, but it involves 110kV side substations), the system will determine that the strategy has a logical flaw. In this case, the system will generate a blocking command containing the specific mismatch reason (e.g., "resource gap 50MW" or "path unreachable"), prohibiting the saving or issuance of the strategy, and highlighting the abnormal node in the topology diagram on the interactive interface to assist the dispatcher in quickly correcting the strategy parameters.
[0034] Furthermore, considering the complexity of industrial field network environments, this embodiment also incorporates a 'dirty data' self-healing mechanism. The system maintains a 'Last Update Time' in memory. If the status listener detects a timeout in the heartbeat packet of a link, it will automatically mark the node on that path as 'untrusted' and trigger a local full verification thread to reload data from the underlying database for overwriting and repair. This mechanism ensures that even under extreme conditions of network jitter or concurrent conflicts, the in-memory topology data can still maintain eventual consistency, meeting the high reliability requirements of power grid safety and stability control.
[0035] Furthermore, considering the complex scenario where multiple stabilization strategies may be triggered simultaneously and compete for the same set of control and switching resources in actual power grid operation, this embodiment also includes a priority-based multi-strategy conflict resolution algorithm. Assume the system simultaneously detects that strategy A and strategy B are triggered, and both are associated with the execution station "Yixing Photovoltaic". Strategy A is "Emergency Trip for Line Overload", with a priority set to 1 (highest); strategy B is "Temporary Trip for Regional Stabilization", with a priority set to 5 (lower). The algorithm first reads the priority fields of these two strategy objects and constructs a priority queue for sorting. The processing engine prioritizes responding to strategy A at the head of the queue, locking its required resource capacity. Assume strategy A requires 100MW, while the current total available capacity of "Yixing Photovoltaic" is 200MW. The system marks this 100MW resource as "pre-occupied" in memory and calculates the remaining available capacity: .
[0036] Next, the algorithm processes strategy B in the queue. Assume strategy B requires 150MW. The system compares the demand of strategy B with the remaining available capacity and finds... In the event of insufficient resources, the system can perform two operations based on preset conflict handling rules: first, completely block the execution of strategy B and issue a high-level alarm for "resource preemption conflict"; second, perform a degradation operation, only cutting off the remaining 100MW of resources and recording the shortfall in the log. Through this priority-based dynamic calculation and resource locking mechanism, this embodiment ensures that core and high-level power grid security services are given priority protection in emergency situations with limited resources, avoiding control command chaos or execution failure caused by resource contention.
[0037] To ensure the accuracy of the aforementioned memory topology calculations and the consistency of persistent data, this embodiment also designs a periodic data consistency verification and self-healing mechanism. A daemon thread runs in the system background, performing a "heartbeat check" every set time period (e.g., 5 minutes). The verification process employs hash fingerprint comparison technology. The processor calculates the hash checksum of the resource status feature values of each level of nodes in memory. And the hash checksum of the corresponding record in the database. If the comparison results show that the two are inconsistent ( This typically indicates an anomaly such as a memory leak, message queue loss, or concurrent write conflicts. Upon detecting such anomalies, the system immediately triggers a self-healing process: first, it suspends all current write operation requests; then, it releases the current memory topology object, reloads the basic configuration and status data from the database, rebuilds the multi-level topology mapping, and re-executes a complete bottom-up aggregation calculation. This process is completed silently in the background, usually taking only a few hundred milliseconds. Once the memory data and database are consistent, the system automatically resumes service. This mechanism greatly improves the system's robustness and fault tolerance during long-term operation, ensuring the uniqueness and reliability of the stability control decision-making basis.
[0038] Furthermore, this embodiment details the processing flow for abnormal data. During the data entry phase, the system performs uniqueness verification and character cleansing on the input plant names, line names, etc., to prevent the injection of illegal characters; it performs enumerated value matching verification on the voltage level field to ensure it conforms to the preset standard voltage sequence (e.g., 750kV, 330kV, 110kV); and it performs precision formatting on the capacity values, uniformly retaining two decimal places, and replacing illegal or null values with default safe values (e.g., 0). After a policy verification failure, the system not only generates a blocking command but also encapsulates the specific type of the abnormal event (e.g., topology circuit breaker, insufficient capacity, voltage mismatch) and the identifier of the node causing the abnormality into structured log data, which is sent to the log recording module for persistent storage via an asynchronous message queue. Maintenance personnel can retrieve these abnormal logs through the log management interface using conditions such as time range and operation type for fault review and accountability.
[0039] In summary, this embodiment constructs a digital, multi-level power grid topology model in computer memory, mapping physical power grid resources as object nodes with dynamic attributes. It successfully solves technical challenges inherent in traditional manual management models, such as resource statistics lag, policy matching errors, and the inability to identify multi-policy conflicts, by utilizing state-aware recursive aggregation algorithms, graph traversal-based pathfinding algorithms, and priority-based conflict resolution algorithms. This method not only achieves millisecond-level dynamic monitoring and accurate statistics of power grid stability control resources but also constructs a rigid logical security defense for the formulation and execution of stability control strategies, significantly improving the intelligence level and operational reliability of the power grid safety and stability control system.
[0040] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0041] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A power grid stability control resource aggregation and strategy verification method based on memory multi-level topology dynamic mapping, characterized in that, The method is run in a server in which a power grid control system is deployed, The method comprises the following steps: S1: topology initialization step: obtaining basic configuration data of the power grid, dividing a storage area in a memory space of the server, constructing a multi-level topology mapping diagram comprising a master station node, a substation node, an execution station node and a leaf resource node, and establishing a logical connection edge between a power transmission line and each level of station node through a pointer index; S2: dynamic aggregation step: deploying a state listener to connect a telemetry signal of a SCADA system, generating a state change event when a displacement signal of any leaf resource node is captured; locking the leaf resource node to a logical aggregation path of the root node determined according to a current power grid operation topology, calculating a difference value of node capacity change, and performing incremental cascading update along the topology path, and accumulating the difference value to the available resource record of the parent node step by step until the root node, completing local refresh of the resource state matrix; S3: strategy verification step: receiving a stability control strategy instruction to be verified, analyzing the target line identification and demand capacity threshold in the instruction; based on the target line identification, locating the associated node in the topology mapping diagram, extracting the updated multi-dimensional resource state data set for topology connectivity analysis and capacity threshold comparison, and generating a blocking instruction when it is determined that the resource is insufficient or the path is unreachable.
2. The power grid stability control resource aggregation and strategy verification method based on multi-level topology mapping according to claim 1, characterized in that, The specific steps of constructing the multi-level topology mapping diagram comprise: configuring a tree-shaped storage structure in the in-memory database, taking the master station node as the root, and associating the substation node and the execution station node through a bidirectional linked list or a hash index; analyzing the connection relationship data of the power transmission line, establishing a horizontal logical connection pointer between the corresponding nodes of the tree-shaped storage structure, and forming a mesh topology layer; mapping the static parameters of the physical machine group to the leaf resource node, and mounting the address pointer of the leaf resource node to the corresponding execution station node storage unit, initializing the capacity attribute and the control weight, and forming a digital mirror image of the physical power grid.
3. The method of claim 1, wherein, The specific steps of performing bottom-up recursive traversal based on the multi-level topology mapping diagram comprise: establishing a state-aware listener, reading a state enumeration value of the leaf resource node in real time, the state enumeration value comprising a normal operation state, a maintenance state and a disabled state; when the state enumeration value is the normal operation state, setting the real-time calculation capacity of the leaf resource node as a preset control cut amount rating; when the state enumeration value is the maintenance state or the disabled state, forcibly setting the real-time calculation capacity of the leaf resource node to zero; triggering a bottom-up cascading update mechanism, accumulating the updated leaf resource node capacity to the current available capacity attribute of the parent execution station node, and sequentially passing the changed capacity difference to the upper layer substation node and the master station node until the root node is updated.
4. The method of claim 1, wherein, The specific steps of logically comparing the demand capacity threshold with the resource state matrix and topology connectivity analysis include: taking the target line identification as an index, locating the starting node and the terminating node connected by the line in the topology mapping diagram; based on the depth-first search algorithm, traversing all connected sub-nodes under the starting node and the terminating node, identifying a set of valid execution station nodes with reachable paths; summing up the real-time calculation capacities of all leaf resource nodes with a current state of availability in the set of valid execution station nodes to obtain a maximum controllable capacity of the current topology path; comparing the maximum controllable capacity with the demand capacity threshold, if the maximum controllable capacity is less than the demand capacity threshold, determining that it is a resource deficiency type mismatch.
5. The method of claim 4, wherein, The method further includes a conflict resolution step based on policy priority: when detecting that multiple stable control policy instructions simultaneously point to the same set of leaf resource nodes, reading the priority field in each policy instruction; sorting the policy instructions according to the priority values, setting a memory pre-occupancy mark (concurrent control mark) for the leaf resource nodes locked by the high-priority policy; when calculating the available resource aggregation value of the low-priority policy, skipping the nodes with the pre-occupancy mark and only counting the aggregation value of the remaining idle nodes; if the remaining value is insufficient, executing a suspension waiting or a rejection for the low-priority policy.
6. The method for power grid stability control resource aggregation and strategy verification based on multi-level topology mapping according to claim 1, characterized in that, The real-time updating of the resource state matrix of the topology mapping diagram further includes a data consistency check mechanism: periodically starting a full-scan task to traverse the persistent storage records in the database and the topology mapping diagram node data in the memory; comparing the total capacity of the unit in the persistent record with the aggregation value of the root node of the topology mapping diagram; if there is a deviation in the comparison result, triggering a full topology reconstruction instruction to reload the basic configuration data from the database and perform a complete bottom-up aggregation calculation to eliminate the inconsistency between the memory data and the disk data.
7. The method of claim 1, wherein, The generation of the blocking instruction further includes an abnormal feedback processing step: capturing the specific type of policy matching exception, including topology circuit abnormality, resource capacity deficiency abnormality and voltage level mismatch abnormality; encapsulating the abnormal type and the node identification causing the abnormality into structured log data and sending it to the log recording module through an asynchronous message queue; highlighting the position of the abnormal node in the topology mapping diagram in the visual interactive interface and displaying the missing resource capacity value.
8. The method of claim 1, wherein, The obtaining of the basic configuration data of the power grid further includes a preprocessing step of the data source: performing uniqueness verification and character cleaning on the input plant station name and line name; performing enumeration value matching verification on the input voltage level field to ensure that the voltage level conforms to the preset standard voltage sequence; performing precision formatting processing on the input capacity value, uniformly retaining two decimal places, and replacing illegal values or null values with a default safe value.
9. A power grid stability control resource aggregation and strategy verification system based on multi-level topology dynamic mapping, characterized in that, It includes: a topology construction module for obtaining power grid basic data and constructing a topology mapping diagram containing multiple levels of plants and lines in memory; a dynamic aggregation module for monitoring leaf resource node states and performing bottom-up capacity recursive calculation; A policy checking module is configured to parse the steady control policy instruction and perform consistency verification based on the topology connectivity and the resource state matrix. A conflict management module is configured to solve resource contention conflicts among multiple policies according to policy priorities.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method of any one of claims 1 to 8.