A power distribution network virtual power plant multi-scenario safety checking method based on machine learning

By constructing graph-structured data and physical limit tensors based on machine learning methods, the problem of identifying the risk of cross-coupling between voltage and thermal stability constraints in multiple scenarios of virtual power plants in distribution networks is solved, achieving efficient and reliable safety verification and supporting the large-scale application of virtual power plants.

CN123050933APending Publication Date: 2026-11-06ELECTRIC POWER OF HENAN LUOYANG POWER SUPPLY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611200649.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-10
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

There is a disconnect between traditional distribution network operation optimization technology and virtual power plant aggregation control. The response characteristics of distributed resources under different aggregation control scenarios are not fully understood. Existing safety verification methods cannot effectively identify the cross-coupling risks of voltage and thermal stability constraints, which leads to an increase in risks such as distribution network equipment overload and voltage exceeding limits under the large-scale application of virtual power plants. Furthermore, existing data-driven models lack physical constraints and cannot provide reliable verification under extreme operating conditions.

Method used

Based on machine learning, this method constructs graph structure data that integrates topological adjacency matrices, extracts spatial topological coupling features between nodes using graph convolutional networks and temporal convolutional networks, and combines a multilayer perceptron decoder and a meta-learning engine to construct a physical limit tensor. This is used for electrical state decoding and initial pre-estimation of branch power flow distribution, quantifies safety margins, and maps them to a multi-scenario risk warning rule base, thereby achieving end-to-end nonlinear mapping and physical constraint verification.

Benefits of technology

It improves the computational efficiency and physical feasibility of multi-scenario safety verification of virtual power plants in distribution networks, and can quickly identify the cross-coupling risks of voltage and thermal stability constraints under frequent switching of virtual power plants, providing rigorous safety verification results and supporting dispatching decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This application relates to the field of machine learning technology, specifically disclosing a multi-scenario safety verification method for a virtual power plant in a distribution network based on machine learning. It maps the power sequences of each node to graph-structured data using the distribution network topology adjacency matrix and constructs a physical limit tensor that integrates topological coupling information. Then, it extracts joint features of spatial topological coupling and multi-scale temporal dependence from the spatiotemporal graph of the operating state through a graph convolutional network and a temporal convolutional network, and decodes these features into electrical state predictions via a multilayer perceptron, replacing traditional iterative power flow calculations with an end-to-end nonlinear mapping. Next, it embeds the power flow balance equation and equipment physical limit constraints into a loss function to construct a physical information penalty mechanism, and uses a meta-learning engine to adaptively calibrate and reconstruct the network weights, forcing the model output to strictly converge to the physical feasible region. Finally, it quantifies the safety margin of the verified state and maps it to a multi-scenario risk rule base to complete discretized judgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine learning technology, and more specifically, to a machine learning-based method for multi-scenario safety verification of virtual power plants in power distribution networks. Background Technology

[0002] With the deepening of the "dual carbon" goals and the accelerated implementation of new power system construction, distributed energy resources are being integrated into distribution networks on a large scale. Virtual power plants (VPS), as a new type of control platform aggregating flexible resources such as distributed power sources, energy storage, and controllable loads, are playing an increasingly important role in peak shaving, frequency regulation, and ancillary services. However, there is a significant disconnect between traditional distribution network operation optimization technologies and VPS aggregation control. The response characteristics of distributed resources under different aggregation control scenarios have not been fully understood, and the impact mechanism of their output fluctuations and collaborative control behavior on distribution network power flow distribution and voltage stability lacks in-depth analysis. Safety verification methods adapted to the dynamic interaction of multiple scenarios in VPS are severely lacking, leading to a continuous increase in risks such as distribution network equipment overload and voltage exceeding limits under the large-scale application of VPS. Existing safety verification methods mainly rely on deterministic power flow calculations. When faced with the massive combinations of operating conditions resulting from frequent switching between multiple scenarios in VPS, the computational complexity increases exponentially, making it difficult to meet the real-time requirements of online rapid verification.

[0003] In recent years, some studies have attempted to introduce data-driven methods such as deep neural networks into the field of distribution network safety assessment. By establishing an end-to-end mapping from operating status to safety determination through statistical learning, this has alleviated computational bottlenecks to some extent. However, the loss function of such purely data-driven models is optimized only based on the statistical difference between predicted values ​​and labels. The network itself does not embed electrical physical equations such as Kirchhoff's laws, nor does it include rigid constraints such as line thermal stability limits or voltage safety thresholds. When sudden power changes in virtual power plants cause the distribution network operating status to enter a boundary region not fully covered by training data, the model is prone to inferring statistically reasonable but physically infeasible verification results. This black-box output, lacking physical constraints, cannot be directly adopted by industrial field dispatch systems. The root cause lies in the fact that the purely data-driven paradigm ignores hard physical constraints such as node power balance equations and branch transmission capacity, causing the model to lose its physical feasibility guarantee under extreme operating conditions. Furthermore, even when physical constraint information such as voltage threshold and thermal stability limit is introduced, existing solutions typically treat node-level voltage constraints and branch-level thermal stability constraints as independent subspaces and simply splice them together, ignoring the spatial cross-coupling relationship between the two determined by the network topology. This results in the inability to effectively identify composite cascaded risk areas where voltage and thermal stability constraints tighten simultaneously.

[0004] Therefore, an optimized machine learning-based multi-scenario safety verification scheme for virtual power plants in power distribution networks is desired. Summary of the Invention

[0005] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide a machine learning-based method for multi-scenario safety verification of a virtual power plant in a power distribution network.

[0006] According to one aspect of this application, a multi-scenario safety verification method for a virtual power plant in a power distribution network based on machine learning is provided, comprising: Step 1: Based on the topological adjacency matrix of the distribution network, the active power sequence and reactive power sequence collected by each node are time-series spliced ​​and normalized and mapped to the graph structure node to obtain the operating spatiotemporal graph. At the same time, the thermal stability limit matrix and voltage threshold vector are dimension-aligned to obtain the physical limit tensor. Step 2: Based on graph convolutional networks and temporal convolutional networks, perform spatial topological coupling feature extraction between nodes and multi-scale time series dependency capture on the running spatiotemporal graph to obtain the spatiotemporal embedding matrix. Step 3: Based on the multilayer perceptron decoder, perform electrical state decoding and initial pre-estimation of branch power flow distribution on the spatiotemporal embedding matrix to obtain the predicted state matrix. Step 4: Based on the physical limit tensor, perform physical rule penalty calculation and meta-learning adaptive calibration on the predicted state matrix to obtain the verification state matrix; Step 5: Quantify the safety margin between the electrical state quantities of each node and branch in the verification state matrix and the theoretical collapse boundary, and map the obtained safety margin index to the multi-scenario risk warning rule base for discretization risk level judgment to obtain the safety verification result vector.

[0007] Compared with existing technologies, this application provides a multi-scenario safety verification method for virtual power plants in distribution networks based on machine learning. It maps the power sequences of each node into graph-structured data based on the distribution network topology adjacency matrix and constructs a physical limit tensor that integrates topological coupling information, solving the problem of neglecting the spatial cross-coupling relationship between voltage constraints and thermal stability constraints. Then, it extracts joint features of spatial topological coupling and multi-scale temporal dependence from the spatiotemporal graph of the operating state through graph convolutional networks and temporal convolutional networks, and decodes them into electrical state prediction quantities through a multilayer perceptron. This end-to-end nonlinear mapping replaces traditional iterative power flow calculations, improving computational efficiency. Next, it embeds the power flow balance equation and equipment physical limit constraints into the loss function to construct a physical information penalty mechanism, and uses a meta-learning engine to adaptively calibrate and reconstruct the network weights, forcing the model output to strictly converge to the physical feasible region. Finally, it quantifies the safety margin of the verified state and maps it to a multi-scenario risk rule base to complete discretized judgment. Attached Figure Description

[0008] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0009] Figure 1 This is a flowchart of a machine learning-based multi-scenario safety verification method for virtual power plants in power distribution networks, according to an embodiment of this application. Figure 2 This is a data flow diagram illustrating the multi-scenario safety verification method for virtual power plants in power distribution networks based on machine learning, according to an embodiment of this application. Figure 3 This is a flowchart of step one of the machine learning-based multi-scenario safety verification method for virtual power plants in power distribution networks according to an embodiment of this application; Figure 4 This is a flowchart of step two of the machine learning-based multi-scenario safety verification method for virtual power plants in power distribution networks according to an embodiment of this application; Figure 5 This is a flowchart of step four of the artificial intelligence-based power system fault analysis and diagnosis method according to an embodiment of this application. Detailed Implementation

[0010] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.

[0011] Given the disconnect between multi-scenario aggregated control of virtual power plants and safe operation of distribution networks, the difficulty of adapting traditional deterministic power flow calculations to the online real-time verification requirements under frequent switching of multiple scenarios, the lack of physical constraints in pure data-driven models leading to physically infeasible verification outputs, and the neglect of the topological cross-coupling relationship between voltage constraints and thermal stability constraints, this application proposes a machine learning-based method for multi-scenario safety verification of virtual power plants in distribution networks. In the implementation process, firstly, active and reactive power time-series data of each node in the distribution network are collected. Based on the topological adjacency matrix, the normalized power features are bound to graph structure nodes to construct an operational spatiotemporal graph. Simultaneously, the voltage threshold vector and thermal stability limit matrix are dimensionally aligned, and an exponential decay coupling proximity calculation and cross-attention modulation mechanism based on topological hop count are introduced to fuse and encapsulate independent constraint information and coupled constraint information into an enhanced physical limit tensor. Subsequently, a graph convolutional network is used to extract spatial topological coupling features between nodes, and a dilated causal temporal convolutional network is used to capture multi-scale temporal dependencies. After dimensionality reduction encoding, a spatiotemporal embedding matrix is ​​generated. Then, a multilayer perceptron decoder restores the high-dimensional latent features to the voltage amplitude and phase angle of each node and calculates the branch power flow distribution, forming a predicted state matrix. Based on this, the predicted state is substituted into the power flow balance equation to calculate the mismatch residual. Combining the voltage and thermal stability thresholds in the enhanced physical limit tensor, the out-of-bounds penalty is quantified using a linear rectification function to construct a physical information loss function. A meta-learning engine is then used to rapidly and adaptively update the network weights and perform closed-loop re-inference, generating a verification state matrix that strictly satisfies the physical hard constraints. Finally, the boundary distance normalized margin is calculated for the electrical state variables of each node and branch after verification. Based on the graded decision thresholds corresponding to the current virtual power plant operation scenario, a piecewise step indicator function maps the continuous margin to a discretized risk level, outputting a safety verification result vector that can directly serve scheduling decisions.

[0012] Figure 1 This is a flowchart of a machine learning-based multi-scenario safety verification method for virtual power plants in power distribution networks, according to an embodiment of this application. Figure 2 A data flow diagram illustrating the multi-scenario safety verification method for virtual power plants in distribution networks based on machine learning, according to embodiments of this application, is shown below. Figure 1 and Figure 2As shown, the machine learning-based multi-scenario safety verification method for a virtual power plant in a power distribution network according to an embodiment of this application includes: Step 1, based on the topological adjacency matrix of the power distribution network, performing time-series splicing and normalization on the active power sequence and reactive power sequence collected from each node and mapping them to graph structure nodes to obtain an operational spatiotemporal graph, while simultaneously aligning the thermal stability limit matrix and voltage threshold vector in dimensions to obtain a physical limit tensor; Step 2, based on a graph convolutional network and a temporal convolutional network, performing spatial topological coupling feature extraction between nodes and multi-scale time series dependency capture on the operational spatiotemporal graph to obtain... Step 3: Based on the multilayer perceptron decoder, perform electrical state decoding and initial pre-estimation of branch power flow distribution on the spatiotemporal embedding matrix to obtain the predicted state matrix; Step 4: Based on the physical limit tensor, perform physical rule penalty calculation and meta-learning adaptive calibration on the predicted state matrix to obtain the verification state matrix; Step 5: Perform safety margin quantification calculation between the electrical state quantities of each node and branch in the verification state matrix and the theoretical collapse boundary, and map the obtained safety margin index to the multi-scenario risk warning rule base for discretization risk level judgment to obtain the safety verification result vector.

[0013] Specifically, in step one, based on the topological adjacency matrix of the distribution network, the active power sequence and reactive power sequence collected from each node are time-series spliced ​​and normalized, and mapped to graph structure nodes to obtain the operating spatiotemporal graph. Simultaneously, the thermal stability limit matrix and voltage threshold vector are dimensionally aligned to obtain the physical limit tensor. It should be understood that, due to the frequent fluctuations in active and reactive power of each node in the distribution network with dispatch commands during the aggregation and control of virtual power plants in multiple scenarios such as peak shaving and frequency regulation, and the significant differences in the power dimensions and numerical ranges of different types of distributed resources, directly inputting the raw sampled data into the subsequent network model would lead to gradient calculation imbalance and feature overload. Furthermore, the electrical coupling relationship between distribution network nodes is determined by the physical topology, and traditional vectorized data organization methods cannot express the spatial connectivity between nodes and the propagation path of neighborhood influence. In addition, node voltage safety constraints and branch thermal stability constraints belong to different physical dimensions and have inconsistent data forms, requiring unified encapsulation into a structured tensor that can be called as a whole by the downstream loss function. Therefore, in the technical solution of this application, the active power sequence and reactive power sequence collected from each node are time-series spliced ​​and normalized based on the topological adjacency matrix of the distribution network, and mapped to graph structure nodes to obtain the operating spatiotemporal graph. Simultaneously, the thermal stability limit matrix and voltage threshold vector are dimensionally aligned to obtain the physical limit tensor. This transforms the multi-source heterogeneous operating data and physical constraint information of the distribution network into a structured input representation with topology awareness. This enables subsequent graph convolutional networks to propagate and aggregate features along the real electrical topology path, ensuring that the spatiotemporal feature extraction process strictly corresponds to the physical connectivity of the distribution network, and providing a rigid constraint reference surface with unified dimensions for the physical information loss function, fundamentally supporting the physical feasibility guarantee of the model output.

[0014] Figure 3 This is a flowchart of step one of the multi-scenario safety verification method for a virtual power plant in a power distribution network based on machine learning, according to an embodiment of this application. Figure 3 As shown, step one includes: Step 1.1, based on the mean and standard deviation statistics, the active power sequence and reactive power sequence are vector-concatenated and normalized along the feature dimension to obtain the normalized power feature matrix; Step 1.2, based on the non-zero connectivity in the topological adjacency matrix, a node set and an edge set are constructed, and the normalized power feature matrix is ​​subjected to node-level attribute binding and graph structure instantiation mapping to obtain the operating spatiotemporal graph; Step 1.3, after the voltage threshold vector is expanded by tensor dimensionality increase along the branch topology dimension, it is jointly concatenated with the thermal stability limit matrix along the feature channel dimension to obtain the physical limit tensor.

[0015] Accordingly, in step 1.1, based on the mean and standard deviation statistics, the active power sequence and reactive power sequence are vector-concatenated and standardized along the feature dimensions to obtain a normalized power feature matrix. It should be understood that in the virtual power plant aggregation and control scenario of the distribution network, each node simultaneously possesses two types of electrical state quantities: active power and reactive power. These reflect the active power supply-demand balance state and reactive power voltage support state of the node, respectively. Furthermore, the power output range of different types of distributed resources has significant dimensional differences; for example, the active power sequence of a photovoltaic power generation node can reach the megawatt level, while the charging and discharging power sequence of an energy storage node is only at the hundred kilowatt level. If the original power data is directly input into the subsequent neural network model, the feature dimensions with larger numerical magnitudes will dominate during gradient backpropagation, causing the effective information carried by the feature dimensions with smaller numerical magnitudes to be submerged, severely affecting the model's ability to learn the balanced operation state of multiple types of resources. Therefore, in the technical solution of this application, the active power sequence and reactive power sequence are further processed by vector concatenation and standardization along the feature dimension based on the mean and standard deviation statistics to obtain a normalized power feature matrix. This eliminates the bias between different physical dimensions and numerical scales and unifies the multi-source heterogeneous power data into a standardized feature space with zero mean and unit variance. This ensures that when the graph convolutional network performs node feature aggregation and gradient updates, the power fluctuation features of each type of distributed resource receive equal learning weights, avoiding feature overload and gradient skew caused by numerical scale imbalance.

[0016] In a specific example of this application, the distribution network operation monitoring system continuously collects the active and reactive power of each node at a fixed sampling period, forming an active power sequence and a reactive power sequence covering the current time window. First, for each controlled node in the distribution network, the active power sequence and reactive power sequence of that node within the current time window are extracted. These two sequences are then concatenated along a feature dimension to form a joint power feature vector for that node. This concatenation operation merges the two types of electrical state variables—active and reactive power—into a unified multi-dimensional feature representation, enabling subsequent processing to simultaneously perceive changes in active power supply and demand and changes in reactive power voltage support within the same feature space. Next, the joint power feature vectors of all nodes within the current time window are traversed, and the mean and standard deviation statistics are calculated along each feature dimension. The mean reflects the baseline level of that feature dimension under the current operating conditions, and the standard deviation reflects the fluctuation amplitude of that feature dimension. Then, the joint power feature vector of each node is standardized and normalized, i.e., the vector is subtracted from the mean vector and then divided by the standard deviation vector to obtain the normalized power feature matrix. The calculation process is expressed as follows:

[0017] in, This is the normalized eigenvector corresponding to the i-th node in the normalized power eigenvector matrix; The active power sequence collected by the i-th node within the current time window; The reactive power sequence collected by the i-th node within the current time window; This represents a vector concatenation operation performed along the feature dimension between the active power sequence and the reactive power sequence; This is the mean vector of each dimension of the joint power feature of all nodes within the current time window; This represents the standard deviation vector of each dimension of the joint power characteristics of all nodes within the current time window. In the above calculation process, the subtraction of the mean vector in the numerator eliminates the systematic offset of the power baseline level of each node, making the normalized feature values ​​distributed with zero as the center. The division by the standard deviation vector in the denominator normalizes the absolute amplitude of power fluctuations of different resource types to a unit variance scale, so that the megawatt-level active power fluctuations of photovoltaic power generation nodes and the kilowatt-level charging and discharging power fluctuations of energy storage nodes have equivalent numerical expression strength in the normalized feature space. This ensures that the subsequent network model can perform unbiased balanced feature learning of the operating status changes of various types of distributed resources in the distribution network.

[0018] Accordingly, in step 1.2, a node set and an edge set are constructed based on the non-zero connectivity relationships in the topological adjacency matrix. The normalized power feature matrix is ​​then subjected to node-level attribute binding and graph structure instantiation mapping to obtain the operational spatiotemporal graph. It should be understood that, since the physical topology of the distribution network determines the electrical coupling relationships and power propagation paths between nodes, when a virtual power plant executes peak-shaving or frequency-regulation commands, changes in power injection at a certain node will propagate along the distribution lines to adjacent nodes in the topology, triggering a chain reaction of power flow redistribution and voltage fluctuations. This propagation of influence between nodes is strictly limited by the physical connectivity of the distribution network rather than the simple data sequence arrangement. If the normalized power feature matrix is ​​directly input into the fully connected network in the traditional flat vector or matrix form, the network will perform indiscriminate global interactive calculations on all node features. This fails to distinguish the essential differences in influence intensity between topologically adjacent nodes and topologically distant nodes, and also fails to perform directional feature propagation and aggregation along the real electrical connectivity paths, resulting in the extracted features losing spatial topological semantics. Therefore, in the technical solution of this application, a node set and an edge set are further constructed based on the non-zero connectivity relationships in the topological adjacency matrix. The normalized power feature matrix is ​​then subjected to node-level attribute binding and graph structure instantiation mapping to obtain an operational spatiotemporal graph. This allows the physical connectivity structure of the distribution network and the dynamic operational characteristics of each node to be fused and encoded into a unified graph data object. This enables the subsequent graph convolutional network to strictly perform neighborhood message passing and feature aggregation operations along the actual topological path of the distribution network, ensuring that the feature extraction process accurately reflects the spatial coupling effect between nodes caused by electrical connectivity, rather than performing an indiscriminate global mixing of all network nodes.

[0019] In a specific example of this application, the distribution network dispatching system maintains a topological adjacency matrix reflecting the current switch status and line connection relationships. The rows and columns of this matrix correspond to the nodes in the distribution network, and non-zero values ​​of matrix elements indicate a direct electrical connection between two corresponding nodes. First, all elements in the topological adjacency matrix are traversed, and the row and column indices corresponding to all non-zero elements are extracted. The unique node numbers involved in all row and column indices are aggregated to form a node set, and the node indices corresponding to each pair of non-zero elements are paired to form an edge set, thereby establishing the complete spatial connectivity skeleton under the current operating topology of the distribution network. Next, based on the one-to-one correspondence of node numbers, the feature vectors of each row in the normalized power feature matrix obtained in the previous steps are bound one by one to the graph vertices with corresponding numbers in the node set, serving as the dynamic time series attributes of that vertex. This completes the node-level attribute binding operation, so that each graph vertex not only carries its topological location information in the distribution network but also carries the normalized active and reactive power time series characteristics of that node. Then, the node set carrying dynamic node attributes and the edge set representing physical connectivity are uniformly encapsulated and instantiated into a graph structure to obtain the running spatiotemporal graph. This running spatiotemporal graph uses the real topological connection relationship of the distribution network as the spatial skeleton and the normalized time-series power characteristics of each node as dynamic attributes. This ensures that when the subsequent graph convolutional network performs neighborhood message passing on the running spatiotemporal graph, the power fluctuation characteristics of the photovoltaic power generation node are only propagated and aggregated along the distribution lines it is connected to to the topologically adjacent energy storage nodes or load nodes, and will not generate false feature interactions with remote nodes that are not directly electrically connected to the topology.

[0020] Accordingly, in step 1.3, after the voltage threshold vector is expanded by tensor dimensionality increase in the branch topology dimension, it is jointly concatenated with the thermal stability limit matrix along the feature channel dimension to obtain the physical limit tensor. It should be understood that since the physical hard constraints involved in the distribution network safety verification belong to two different physical dimensions and data levels—the voltage threshold vector being the node-level scalar safety boundary and the thermal stability limit matrix being the branch-level capacity safety boundary—there is a dimensional inconsistency in their tensor forms. Without unified dimensional alignment and structured encapsulation, the physical information loss function in the downstream step four cannot perform overall indexing and joint calculation of node voltage overload penalties and branch thermal overload penalties within the same computational graph. This results in the physical constraint penalty gradient not being able to synchronously apply to network weight updates in a single backpropagation. Therefore, in the technical solution of this application, the voltage threshold vector is further expanded by tensor dimensionality increase in the branch topology dimension and then jointly concatenated with the thermal stability limit matrix along the feature channel dimension to obtain the physical limit tensor. This encapsulates the node-level voltage safety constraints and branch-level thermal stability constraints into a structured data entity with unified dimensions. In this way, when the downstream physical information loss function performs out-of-bounds penalty quantization, it can simultaneously obtain the voltage threshold reference surface and the thermal stability limit reference surface with a single tensor index operation, ensuring the integrity and computational efficiency of the physical constraint penalty calculation.

[0021] In a specific example of this application, the safe operation procedure for the distribution network pre-sets the allowable voltage amplitude safety threshold for each node and the maximum apparent power thermal stability limit allowed for each branch. First, a voltage threshold vector is extracted. The dimension of this vector is the number of nodes, and each element corresponds to the upper limit of the voltage safety value for a distribution network node. Since this vector only has a node dimension and not a branch dimension, it cannot be directly calculated in the same tensor space as the branch-level thermal stability limit matrix. Therefore, a broadcast mechanism is used to perform a tensor dimension-up expansion operation along the branch topology dimension of the voltage threshold vector, copying and filling the voltage threshold of each node along the branch direction, expanding its data form from a one-dimensional node vector to a two-dimensional tensor with the same row and column structure as the thermal stability limit matrix. Next, the thermal stability limit matrix is ​​obtained, where each element corresponds to the upper limit of the maximum apparent power capacity allowed for a distribution line. Then, the dimension-up expanded voltage threshold data is used as the first feature channel, and the thermal stability limit matrix is ​​used as the second feature channel. A joint splicing and encapsulation operation is performed along the feature channel dimension to obtain the physical limit tensor. In this physical limit tensor, the first channel carries the rigid safety boundary information of the node voltage, and the second channel carries the rigid capacity boundary information of the branch thermal stability. The two are arranged in parallel in a dual-channel manner to form a unified data entity that can be called as a whole by the downstream physical information loss function.

[0022] In particular, in the actual operation scenario of multi-scenario safety verification of virtual power plants in distribution networks, the quality of the construction of physical constraint features directly determines the accuracy of the downstream physical information loss function in perceiving the risk of exceeding limits. In sub-step 1.3 of the first embodiment above, the processing method of physical constraint features is as follows: the voltage threshold vector is tensor-upped along the branch topology dimension through a broadcast mechanism, and then parallel concatenation operation is performed with the thermal stability limit matrix in the feature channel dimension to encapsulate and generate a physical limit tensor. This processing method is mathematically equivalent to treating the node-level voltage safety constraints and the branch-level thermal stability constraints as two completely orthogonal and unrelated independent subspaces, which are sent to the subsequent penalty calculation module in a dual-channel parallel arrangement.

[0023] However, in the physical operating environment of a real distribution network, the node voltage safety state and the branch thermal stability state are not independent of each other; they are spatially cross-coupled, determined by the network topology. This coupling is particularly prominent in the multi-scenario aggregated control of virtual power plants in distribution networks. When a virtual power plant executes a deep peak-shaving command, injecting a large amount of power into a region's distributed resources, the transmission power of the distribution lines in that region will rapidly approach their thermal stability limit. The resulting impedance voltage drop increases sharply, causing a significant drop in the voltage of downstream nodes adjacent to the line topology. This makes these nodes more likely to reach their voltage safety lower limit, leading to branch thermal overload and a positive cascading effect that causes voltage collapse in neighboring nodes. At the same time, when the voltage of a node approaches its safety threshold boundary, the injectable active and reactive power margin at that node is severely compressed, which in turn limits the transmission capacity of its directly connected branches, constituting a reverse constraint transmission where the node voltage tightens, leading to a contraction in the capacity of connected branches. Furthermore, the strength of the aforementioned positive and negative coupling effects is not uniformly distributed, but is closely related to the topological electrical distance between nodes and branches—the closer the topologies are, the stronger the coupling, and the farther the topologies are, the weaker the coupling, exhibiting significant spatial distance attenuation characteristics.

[0024] The simple channel splicing strategy adopted in the first embodiment completely discards the spatial structural information of this topological cross-coupling. When the generated physical limit tensor is called by the physical information loss function in the downstream step four to calculate the penalty gradient, the loss function can only independently evaluate the voltage limit violation penalty and the thermal stability limit violation penalty on a channel-by-channel basis, and cannot identify the composite high-risk areas in the network where voltage constraints and thermal stability constraints are simultaneously tightening and topologically close. This directly leads to two engineering problems: first, it systematically underestimates the severity of the risk of composite limit violation cascade regions, making the conservatism of the safety verification results insufficient; second, the physical penalty gradient cannot be directed to the concentrated topological coupling region, resulting in a significant reduction in the learning efficiency of cascade failure modes when updating model weights, ultimately weakening the perception sensitivity of the entire safety verification system to the risk of distribution network cascade limit violations under frequent switching of multiple scenarios in virtual power plants.

[0025] To address the aforementioned technical problems, a second embodiment is proposed. Specifically, in the second embodiment of this application, step 1.3 includes: step 1.3a, performing a continuous coupling proximity transformation on the shortest path hop count from each node to the nearest endpoint of each branch in the topological adjacency matrix to obtain a coupling proximity matrix; step 1.3b, based on row-normalized coupling attention weights, performing cross-modulation on the coupling proximity matrix, the per-unit voltage threshold vector, and the thermal stability limit matrix to obtain a cross-constraint interaction feature matrix; step 1.3c, using a broadcast mechanism to perform tensor dimension expansion on the voltage threshold vector, and then encapsulating the expansion result with the thermal stability limit matrix and the cross-constraint interaction feature matrix along the feature channel dimension in a three-channel concatenation to obtain a physical limit tensor.

[0026] More specifically, in step 1.3a, the shortest path hop count from each node to the nearest endpoint of each branch in the topological adjacency matrix is ​​transformed into a continuous coupling proximity matrix. It should be understood that, since the voltage threshold vector and the thermal stability limit matrix in the aforementioned first embodiment are only constructed by parallel concatenation of two channels to form the physical limit tensor, this concatenation process completely fails to introduce topological connectivity information of the distribution network and lacks the ability to quantify the spatial correlation between any node and any branch. However, in the physical operating environment of a real power distribution network, the coupling strength between the safe voltage state of a node and the thermal stability state of a branch is determined by the topological electrical distance between them. When a virtual power plant executes a deep peak-shaving command, injecting a large amount of power into a certain area's distributed resources, the transmission power of the distribution lines in that area will rapidly approach their thermal stability limit. The resulting sharp increase in impedance voltage drop will cause a significant drop in the voltage of downstream nodes adjacent to this line's topology, forming a positive cascading effect of branch thermal overload leading to voltage collapse of neighboring nodes. Moreover, the strength of the above coupling effect decreases non-linearly with the increase of topological distance; the closer the topologies, the stronger the coupling, and the farther the topologies, the weaker the coupling. To compensate for this information gap, it is necessary to first establish a node-branch coupling proximity map covering the entire network as the topological foundation for subsequent cross-constraint feature calculations. Therefore, in the technical solution of this application, the shortest path hop count from each node to the nearest endpoint of each branch in the topological adjacency matrix is ​​further transformed into a continuous coupling proximity matrix to obtain a coupling proximity matrix. This matrix is ​​used to assign continuous spatial association weights to each node-branch pair, compressing and encoding the global topological coupling structure of the distribution network into a two-dimensional weight matrix. This enables subsequent steps to accurately allocate the constraint interaction strength between different node-branch pairs based on the actual network spatial layout when cross-modulating voltage constraints and thermal stability constraints, rather than uniformly processing all constraints. This injects topology-aware prior structural information into the physical limit tensor.

[0027] In a specific example of this application, the distribution network dispatching system maintains a topology adjacency matrix reflecting the current switch status and line connection relationships. First, the entire set of nodes and branches in the topology adjacency matrix are extracted, where each branch connects its corresponding start and end nodes. Next, based on a breadth-first search algorithm, each node in the distribution network is used as the starting point for the search. The shortest topology path hop count from that node to the nearest endpoint of any branch is calculated sequentially. That is, for any node and any branch, the shortest path length from that node to the start node of that branch and the shortest path length from that node to the end node of that branch are calculated respectively, and the smaller of the two is taken as the shortest topology path hop count from that node to that branch. Then, in the physical operating environment of the distribution network, the electrical coupling effect decays exponentially with the propagation path length. Therefore, an exponential decay kernel function is introduced to convert the discretized topology hop count into continuous coupling proximity weight values, resulting in a coupling proximity matrix. The calculation process is expressed as follows:

[0028]

[0029] In the formula, For nodes in the coupling proximity matrix and branch road The coupling proximity weight value between them takes a value in the range of (0,1]. For nodes to the side road The shortest topological path hop count to the nearest endpoint; and They are nodes To the side road First node and end nodes The shortest path length; This is the exponential decay temperature coefficient, used to control the decay rate of coupling proximity as topological distance increases. The larger the value, the wider the remote coupling sensing range. In the above calculation process, the sub-formula... By retrieving nodes To the side road The smaller of the shortest path lengths between the two endpoints determines the closest topological connection distance between the node and the branch. The physical meaning of this minimum value operation is that electrical coupling effects in the distribution network have the strongest impact along the shortest propagation path; therefore, the path length of the nearest endpoint is used as the measure of coupling distance. The exponentially decaying kernel function in the main formula... The discretized topology hop count is mapped to a continuous coupling proximity weight, when the topology hop count... When it is zero, that is, the node Located directly on the side road At the endpoints, the coupling proximity weight approaches 1, indicating the strongest direct electrical coupling between the voltage state of the node and the thermal stability state of the branch; when the topology hop count As the distance increases, the coupling proximity weight rapidly approaches zero, indicating that the impact of node voltage fluctuations on the thermal stability of distant branches decreases rapidly with increasing topological distance. Temperature coefficient By controlling the steepness of the aforementioned attenuation curve, in a virtual power plant peak-shaving scenario, when the distribution network topology is relatively compact and the line impedance is high, a smaller attenuation curve can be set. This value aims to concentrate the coupling proximity in the topological nearest neighbor region. When the distribution network topology is relatively dispersed, a larger value can be set. This expands the range of remote coupling sensing. The above calculation process is essentially based on the physical intuition of distribution network topology connectivity, namely, that the electrical coupling effect decays exponentially with the propagation path length, assigning continuous spatial correlation weights to each node-branch pair. After this calculation step, the global topological coupling structure of the distribution network is compressed and encoded into a two-dimensional weight matrix. This allows subsequent steps to accurately allocate the constraint interaction strength between different node-branch pairs according to the actual network spatial layout when cross-modulating voltage constraints and thermal stability constraints, rather than treating all constraints uniformly. This injects topologically aware prior structural information into the physical limit tensor.

[0030] More specifically, in step 1.3b, based on row-normalized coupling attention weights, the coupling proximity matrix, the per-unit voltage threshold vector, and the thermal stability limit matrix are cross-modulated to obtain the cross-constraint interaction feature matrix. It should be understood that after obtaining the coupling proximity matrix, this matrix only encodes the topological spatial association strength information between nodes and branches, and has not yet been integrated with the actual physical constraint values. Therefore, it cannot directly express the composite safety risk semantics of a node's voltage constraint and a branch's thermal stability constraint being highly coupled topologically and simultaneously tightening. Furthermore, the first embodiment only arranges them in parallel along the channel dimension, and there is no information interaction path between the voltage constraint channel and the thermal stability constraint channel, thus failing to generate cross-constraint interaction features that can simultaneously encode spatial coupling strength and constraint tightening degree. Therefore, in the technical solution of this application, the coupling proximity matrix, the per-unit voltage threshold vector, and the thermal stability limit matrix are further cross-modulated based on row-by-row normalized coupling attention weights to obtain a cross-constraint interaction feature matrix. This allows for deep fusion of topological proximity information and actual physical constraint values, generating cross-constraint interaction features that can simultaneously encode spatial coupling strength and constraint tightness. This enables accurate identification of composite high-risk areas in the distribution network where voltage constraints and thermal stability constraints are simultaneously tight and topologically highly proximate, providing a topologically oriented composite risk prior distribution for calculating the penalty gradient of the downstream physical information loss function.

[0031] In a specific example of this application, based on the coupling proximity matrix obtained in the previous steps, it is necessary to further fuse the topological proximity information with the actual physical constraint values. First, a normalization operation is performed row by row on the coupling proximity matrix, transforming the absolute coupling proximity weight of each node to all branches into a probability distribution of coupling attention weights. This ensures that the sum of the branch coupling weights from the perspective of each node is normalized, thereby eliminating scale bias caused by differences in the number of adjacent branches between different nodes. The normalization process is expressed as follows:

[0032] In the formula, The nodes obtained after row-by-row normalization of the coupling proximity matrix For branch roads Coupled attention weights; These are the original weights in the coupling proximity matrix; This represents the total number of distribution network branch sets. To prevent extremely small positive constants with a denominator of zero, the denominator part is... The coupling proximity weights of all branches associated with node i are summed to transform the absolute coupling strength from the perspective of each node into a relative probability distribution. The physical meaning is that different nodes in the distribution network have different numbers of adjacent branches due to differences in their topological locations. Nodes located at the end of feeders have fewer adjacent branches, while nodes located at branch convergence points have more adjacent branches. If row-by-row normalization is not performed, the sum of the absolute values ​​of the coupling weights of nodes with more adjacent branches will be significantly greater than that of nodes with fewer adjacent branches. This will cause the constraint interaction characteristic values ​​of different nodes to lose comparability due to scale bias in subsequent cross-modulation operations.

[0033] Subsequently, the voltage threshold vector was normalized to the system's rated voltage, and the thermal stability limit matrix was normalized to the system's baseline capacity, unifying the two types of heterogeneous physical constraints into a dimensionless, same-scale space. Based on this, the normalized coupling attention weights were multiplied point-by-point by ternary multiplication with the normalized voltage and thermal stability constraint values ​​to generate a cross-constraint interaction feature matrix, expressed as:

[0034] In the formula, For nodes in the cross-constraint interaction feature matrix and branch road The characteristic value of the cross-coupling constraint compactness formed by it; The first in the voltage threshold vector The voltage safety threshold of each node; This is the rated nominal voltage of the distribution network system, used for per-unit standardization. The first in the thermal stability limit matrix The apparent power limit of the thermal stability of the branch circuit; This serves as the baseline apparent power capacity for the distribution network system, used for per-unit scaling. The core of the aforementioned ternary product operation lies in using topological coupling proximity as an attention weight, cross-modulating voltage and thermal stability constraints. In peak shaving or frequency regulation scenarios of virtual power plants in distribution networks, when a node is topologically adjacent to a branch, the coupling attention weight is considered... The per-unit voltage threshold of this node is relatively high. A larger value indicates a narrow voltage constraint space, and thus a lower per-unit thermal stability limit for that branch. This also indicates that when the transmission capacity margin is small, the product of the three factors will produce a significantly amplified eigenvalue, accurately identifying composite high-risk areas in the network where voltage and thermal stability constraints are simultaneously tightening and spatially highly coupled. Conversely, for node-branch pairs with far-reaching topologies or regions with ample constraint space, this eigenvalue will naturally decay to a minimum, avoiding the generation of false coupling risk signals. Thus, the cross-constraint interaction feature matrix provides a topology-oriented composite risk prior distribution for calculating the penalty gradient of the downstream physical information loss function.

[0035] More specifically, in step 1.3c, the voltage threshold vector is expanded using a broadcast mechanism, and the expanded result is then encapsulated along the feature channel dimension using a three-channel concatenation with the thermal stability limit matrix and the cross-constraint interaction feature matrix to obtain the physical limit tensor. It should be understood that after obtaining the cross-constraint interaction feature matrix encoded with cross-coupling information, this matrix only carries the voltage-thermal stability composite constraint compactness information weighted by topological distance. The independent rigid constraint boundary information carried by the original voltage threshold vector and thermal stability limit matrix has not yet been integrated with it. If the cross-constraint interaction feature matrix is ​​sent separately to the downstream step, the downstream physical information loss function will lose its ability to independently calculate channel-by-channel penalties for voltage and thermal overload exceedances. Therefore, the cross-coupling constraint information and the original independent constraint data need to be uniformly encapsulated so that the final output physical limit tensor can simultaneously carry both independent and coupled constraint information for overall use by the downstream step. Therefore, in the technical solution of this application, a broadcast mechanism is further used to perform tensor dimensionality expansion on the voltage threshold vector, and the expansion result is encapsulated along the feature channel dimension by three-channel splicing with the thermal stability limit matrix and the cross-constraint interaction feature matrix to obtain the physical limit tensor. This encapsulates the rigid reference surface of independent constraints and the topology-aware features of cross-coupling constraints into a structured data entity that can be indexed and called by the downstream physical information loss function. In this way, when the physical information loss function in the downstream step four performs out-of-bounds penalty quantization, the first two channels ensure the independent channel-by-channel penalty calculation capability for voltage and thermal overload out-of-bounds, and the third channel guides the penalty gradient to prioritize the allocation of computing resources to the composite high-risk region where topological coupling is concentrated and constraints are simultaneously tightening. This enables the model weight update process to perform targeted learning and optimization of cascaded out-of-bounds failure modes.

[0036] In a specific example of this application, based on the cross-constraint interaction feature matrix obtained in the previous steps, it needs to be uniformly encapsulated with the original independent constraint data. First, the voltage threshold vector is extracted. The dimension of this vector is the number of nodes, and each element corresponds to the voltage safety threshold of a distribution network node. Since this vector only has a node dimension and not a branch dimension, a tensor dimension-up expansion operation is performed on the voltage threshold vector along the branch topology dimension using a broadcast mechanism to align its data form with the branch-level data structure. Next, the dimension-up expanded voltage threshold data is used as the first channel, the thermal stability limit matrix as the second channel, and the cross-constraint interaction feature matrix as the third channel. The three are jointly concatenated and encapsulated along the feature channel dimensions to obtain the physical limit tensor, represented as:

[0037] In the formula, This is the final encapsulated output of the enhanced physical limit tensor; For along the feature channel dimension The tensor splicing operator executed; A dimension expansion function for performing broadcast dimensionality increase along the branch topology dimension; This is the voltage threshold vector; This is the thermal stability limit matrix; This is the cross-constraint interaction feature matrix. Compared to the first embodiment, which only contains two independent channels for the physical limit tensor (voltage and thermal stability), the enhanced physical limit tensor generated by the above three-channel fusion encapsulation retains the original rigid reference surfaces for voltage hard constraints and thermal stability hard constraints in the first two channels, ensuring compatibility with the basic functions of the first embodiment. The downstream physical information loss function can still perform independent penalty quantification calculations for node voltage over-limit and branch thermal overload over-limit based on the first and second channels, respectively. The newly added third channel injects additional voltage-thermal stability cross-constraint structure information after topological coupling weighting. The value of each element in this channel directly reflects the composite measure of the coupling tightness and constraint compression degree of the corresponding node-branch pair in the topological space. When this enhanced physical limit tensor is called by the physical information loss function in the downstream step four, the composite high-risk region distribution information encoded in the third channel will guide the penalty gradient to preferentially allocate computing resources to regions where topological coupling is concentrated and constraints are simultaneously tightening, enabling the model weight update process to perform targeted key learning and optimization of cascade over-limit failure modes.

[0038] By introducing exponentially decaying coupling proximity calculation based on the topological adjacency matrix, cross-constraint interaction feature generation based on coupling attention weights, and three-channel constraint feature fusion encapsulation, the improved physical constraint feature construction mechanism can effectively compensate for the deficiency of the original dual-channel parallel splicing strategy in losing the node-branch voltage thermal stability topological cross-coupling relationship. The enhanced physical limit tensor, while preserving the integrity of independent hard constraint information, additionally encodes the spatial coupling structure between voltage constraints and thermal stability constraints in the distribution network through topological distance weighting. This allows the downstream physical information loss function to no longer treat voltage over-limit and thermal overload over-limit as isolated events with equal weighting when calculating the penalty gradient. Instead, it can identify and focus on the composite cascaded risk region where both are simultaneously tight and topologically highly adjacent, significantly improving the spatial orientation and risk discrimination of the penalty gradient. In the actual operation environment of multi-scenario aggregation and control of virtual power plants in distribution networks, the above improvements directly enhance the sensitivity of the safety verification model to the risk of local cascading over-limit caused by frequent scene switching of virtual power plants, effectively reduce the probability of systematically underestimating the risk of complex high-risk areas, and thus improve the reliability and conservatism of the verification conclusions output by the entire safety verification system when facing the aggregation and interaction of multiple resources across time and space.

[0039] Specifically, in step two, based on graph convolutional networks and temporal convolutional networks, the spatiotemporal graph of the operating state is subjected to inter-node spatial topological coupling feature extraction and multi-scale time series dependency capture to obtain the spatiotemporal embedding matrix. It should be understood that although the spatiotemporal graph of the operating state constructed in the previous steps has fused and encoded the normalized power time series features and physical topological connectivity of each node in the distribution network into a unified graph data object, the features of each node in this graph data object are still independent local observations. They have not yet incorporated the spatial coupling effects between nodes caused by the topological connectivity of the distribution network, nor have they captured the multi-scale delay dependencies of distributed resources with different response speeds in the virtual power plant in the time dimension. If the local features of each node are directly fed into the downstream decoder for electrical state prediction, the model will be unable to perceive the spatial propagation effect of power disturbances along the distribution lines and the misalignment characteristics of the response time series of different resource types, resulting in a lack of global representation capability of the system-level spatiotemporal coupling dynamics in the prediction results. Therefore, in the technical solution of this application, spatial topological coupling features between nodes and multi-scale time-series dependencies are further extracted from the spatiotemporal graph based on graph convolutional networks and temporal convolutional networks to obtain a spatiotemporal embedding matrix. This matrix is ​​used to deeply fuse and encode the spatial coupling information between distribution network nodes caused by topological connectivity and the multi-scale response dependency information of heterogeneous resources in the virtual power plant in the time dimension. In this way, the feature representation received by the downstream decoder can simultaneously carry the spatial topological propagation effect and the temporal dynamic evolution trend, providing a high-quality input with system-level global perception capability for accurate prediction of electrical state.

[0040] Figure 4 This is a flowchart of step two of the machine learning-based multi-scenario safety verification method for virtual power plants in power distribution networks according to an embodiment of this application. Figure 4 As shown, step two includes: Step 2.1, based on the learnable spatial weight matrix, performing neighborhood message passing and aggregation on the node features in the running spatiotemporal graph to obtain a spatial aggregation feature tensor; Step 2.2, based on the causal convolution kernel with exponentially increasing expansion coefficient and the residual jump connection structure, performing multi-scale temporal dependency capture on the spatial aggregation feature tensor along the time step dimension to obtain a spatiotemporal high-dimensional feature tensor; Step 2.3, performing feature fusion and dimensionality reduction encoding on the spatiotemporal high-dimensional feature tensor to obtain a spatiotemporal embedding matrix.

[0041] Accordingly, in step 2.1, based on the learnable spatial weight matrix, neighborhood message passing and aggregation are performed on the node features in the operational spatiotemporal graph to obtain a spatial aggregation feature tensor. It should be understood that, since the normalized power features of each node in the operational spatiotemporal graph constructed in the preceding steps are still independent local observations, each node only carries its own active and reactive power time-series information and has not yet incorporated the spatial coupling effects between nodes caused by the topological connectivity of the distribution network. However, in the peak-shaving scenario of a virtual power plant in the distribution network, when the active power output of a photovoltaic power generation node fluctuates drastically, this fluctuation will propagate along the distribution line to topologically adjacent energy storage nodes and load nodes, triggering a chain reaction of power flow redistribution. If the topological neighborhood features between nodes are not aggregated, the downstream network will not be able to perceive this spatial propagation effect of power disturbance along the electrical connectivity path. Therefore, in the technical solution of this application, neighborhood message passing and aggregation are further performed on the node features in the operating spatiotemporal graph based on a learnable spatial weight matrix to obtain a spatial aggregation feature tensor. This ensures that the output features of each node not only include its own power time-series information but also incorporate the power fluctuation states of its topological neighbors. In this way, the feature vector of each node in the spatial aggregation feature tensor encodes its spatial coupling information within the distribution network topology neighborhood, providing a spatially context-aware input for subsequent temporal convolutional networks to capture multi-scale dependencies in the time dimension.

[0042] In a specific example of this application, based on the previously constructed spatiotemporal graph of the operating state, it is necessary to extract the topological coupling features in the spatial dimension. First, the topological connection structure and node feature matrix are extracted from the spatiotemporal graph of the operating state. A unit self-loop is added to the topological adjacency matrix to retain the original feature information of the nodes themselves, and the diagonal matrix of the adjacency matrix after adding the self-loop is calculated, thereby constructing a symmetric normalized Laplace transform kernel. The physical meaning of this normalization operation is to correct the aggregation scale deviation caused by the difference in the number of adjacent branches of different nodes, so that photovoltaic power generation nodes with only a few adjacent nodes at the end of the feeder and load nodes with multiple adjacent nodes at the branch convergence point have equivalent numerical stability in the feature aggregation process. Next, using a graph convolutional network module, the node feature matrix is ​​multiplied by the above-mentioned normalized transform kernel and the learnable spatial weight matrix to complete the feature message passing and aggregation operation of the distribution network nodes in the spatial topological neighborhood. The calculation process is expressed as follows:

[0043] in, The output is the spatial aggregation feature tensor; It is a linear rectified activation function, used to enhance the ability to express nonlinear features; The adjacency matrix of the distribution network diagram structure with added unit self-loops; To and The corresponding diagonal matrix, each diagonal element is The sum of the elements in the corresponding row; The graph Laplace operator after symmetric normalization; This refers to the node dynamic feature matrix extracted from the runtime spatiotemporal graph; Let be the weight matrix of the learnable spatial feature mapping for the graph convolutional network layer. In the above calculation process, Partially implemented neighborhood message passing and weighted aggregation of node features along the actual topology path of the distribution network. That is, for any node, its aggregated features are equal to the normalized weighted sum of its own features and the features of all topologically adjacent nodes. This allows power fluctuation information from photovoltaic power generation nodes to be transmitted along the distribution lines to the feature representations of topologically adjacent energy storage nodes and load nodes; right-multiplying by the learnable space weight matrix... The linear transformation and dimensional mapping of the aggregated features are partially implemented. During model training, this weight matrix adaptively learns the optimal feature mapping parameters for the spatial coupling relationships between nodes at different topological locations in the distribution network through backpropagation. The outermost linear rectifier activation function... A nonlinear transformation is applied to the aggregated and mapped features to enhance the model's ability to express complex nonlinear electrical coupling relationships between nodes in the distribution network. Then, after the above graph convolution operation, a spatial aggregated feature tensor is obtained. In this tensor, the feature vector of each node has been transformed from an independent local observation into a globally perceptual feature that integrates topological neighborhood spatial coupling information. This provides a spatially contextualized input basis for the subsequent temporal convolutional network to capture multi-scale dependencies in the temporal dimension.

[0044] Accordingly, in step 2.2, based on the causal convolution kernel with an exponentially increasing expansion coefficient and the residual jump connection structure, the spatial aggregation feature tensor is subjected to multi-scale temporal dependency capture along the time step dimension to obtain a spatiotemporal high-dimensional feature tensor. It should be understood that although the spatial aggregation feature tensor obtained in the previous step has incorporated the coupling information between nodes due to topological connectivity in the spatial dimension, the features of each time step in the temporal dimension are still independent static snapshots, and the sequential dependency relationship between different time steps has not yet been established. In the peak-shaving scenario of the virtual power plant in the distribution network, the heterogeneous distributed resources aggregated by the virtual power plant have significantly different response time characteristics. The charging and discharging power of the energy storage system can be switched in milliseconds, while the power adjustment of the controllable air conditioning load requires a response delay of minutes. The output of photovoltaic power generation is affected by cloud shading and exhibits random fluctuations from seconds to minutes. The above-mentioned response characteristics at different time scales form multi-scale delay dependencies in the time series. If the standard convolution operation with a fixed receptive field is used, it will not be able to simultaneously cover the temporal span of short-term fast response and medium-to-long-term slow adjustment. Therefore, in the technical solution of this application, multi-scale temporal dependencies are captured along the time step dimension of the spatial aggregation feature tensor based on causal convolution kernels with exponentially increasing expansion coefficients and residual skip connection structures to obtain a spatiotemporal high-dimensional feature tensor. This exponentially expands the temporal receptive field without increasing the number of network parameters, while capturing the multi-scale temporal delay dependency characteristics of resources with different response speeds in the virtual power plant. In this way, the spatiotemporal high-dimensional feature tensor can carry the topological coupling information between nodes in the spatial dimension, while encoding the complete multi-scale temporal dynamics from millisecond-level fast response to minute-level slow adjustment in the temporal dimension, providing a high-dimensional feature representation with deep spatiotemporal fusion for subsequent dimensionality reduction encoding.

[0045] In a specific example of this application, based on the spatial aggregation feature tensor obtained in the preceding steps, it is necessary to capture its multi-scale temporal dependencies along the time step dimension. First, the spatial aggregation feature tensor is input into a temporal convolutional network module, which consists of multiple stacked dilated causal convolutional layers. Each convolutional layer is configured with a one-dimensional causal convolutional kernel of the same length, but the dilation coefficient of each layer is set exponentially: the first layer has a dilation coefficient of 1, the second layer has a dilation coefficient of 2, the third layer has a dilation coefficient of 4, and so on. This allows shallow convolutions to focus on capturing short-term, rapid power switching features of the energy storage system at the millisecond to second level, while deep convolutions capture medium- to long-term, slow adjustment features of controllable loads at the minute level by spanning larger time intervals, achieving an exponential expansion of the temporal receptive field without increasing the number of convolutional kernel parameters. Next, a residual skip connection structure is introduced between the input and output of each dilated causal convolutional layer. The input features of this layer are directly added to the convolutional output of that layer through an identity mapping. The calculation process is expressed as follows:

[0046] in, The spatiotemporal high-dimensional feature tensor slice generated at the current time step t; K is the length of the one-dimensional temporal convolution kernel; i is the position index variable within the convolution kernel; These are the learnable one-dimensional filter weight parameters for a temporal convolutional network. d is the spatial aggregation feature tensor of the input; d is the dilation coefficient of the current convolutional layer, which controls the sampling interval across time steps; The input data at the current time step t is directly added here as the identity mapping terms of the residual jump connection. In the above calculation, the summation part implements the core operation of dilated causal convolution, and the weight parameters of the convolution kernel... With spatial aggregation feature tensor at historical expansion time step The eigenvalues ​​are summed by a sliding dot product, where the expansion coefficient d determines the sampling interval of the convolution kernel on the time axis. When d=1, the convolution kernel samples continuously at adjacent time steps to capture the short-term rapid response characteristics of the energy storage system. When d increases exponentially to 4 or 8, the convolution kernel samples across larger time intervals to capture the medium- and long-term slow adjustment characteristics of controllable loads. Causality constraints ensure that the convolution kernel only accesses historical data up to the current time step and does not use future information, guaranteeing causal rationality in online safety verification scenarios; after the plus sign... A partial implementation of residual skip connections directly superimposes the original input features of the current time step onto the convolutional output. Its physical significance lies in providing a direct propagation channel for the gradient without passing through convolutional layers when gradient decay occurs during backpropagation in deep dilated convolutional networks. This prevents deep networks from losing their ability to learn shallow, short-term temporal features due to gradient vanishing. Then, through layer-by-layer stacking of multiple dilated causal convolutions and residual skip connections, a high-dimensional spatiotemporal feature tensor is obtained. This tensor inherits the topological coupling information between nodes in the spatial aggregation feature tensor and encodes complete multi-scale temporal dependencies ranging from millisecond-level rapid energy storage response to minute-level controllable load slow adjustment in the temporal dimension.

[0047] Accordingly, in step 2.3, the spatiotemporal high-dimensional feature tensor undergoes feature fusion and dimensionality reduction encoding of spatial and temporal information to obtain a spatiotemporal embedding matrix. It should be understood that although the spatiotemporal high-dimensional feature tensor obtained in the previous steps encodes the topological coupling information between nodes in the spatial dimension and the multi-scale temporal dependencies in the temporal dimension, the feature dimension of this tensor is high, and the spatial and temporal features are still arranged in parallel as independent channels, without deep cross-dimensional interaction computation. Furthermore, redundant information and noise components inevitably exist in the high-dimensional features. If this high-dimensional tensor is directly fed into the downstream multilayer perceptron decoder for electrical state prediction, on the one hand, the excessively large input dimension of the decoder will significantly increase computational overhead and the risk of overfitting; on the other hand, the lack of sufficient interaction between spatial and temporal features will prevent the decoder from effectively utilizing the joint spatiotemporal information for accurate state reconstruction. Therefore, in the technical solution of this application, the spatial and temporal information of the high-dimensional spatiotemporal feature tensor is further fused and dimensionality-reduced to obtain a spatiotemporal embedding matrix. This allows for deep cross-dimensional interaction and fusion of spatial topological coupling information and multi-scale temporal dependency information while compressing redundant dimensions. This enables the spatiotemporal embedding matrix to highly characterize the potential evolution trends of distribution network and virtual power plant resources in future time segments in a dense and compact low-dimensional encoding form, ensuring the complete transmission of spatiotemporal joint information while reducing the computational complexity and overfitting risk of the downstream decoder.

[0048] In a specific example of this application, based on the high-dimensional spatiotemporal feature tensor obtained in the preceding steps, feature fusion and dimensionality compression are required. First, the high-dimensional spatiotemporal feature tensor is input into a fully connected projection layer. By right-multiplying the dimensionality reduction mapping weight matrix, a linear transformation and cross-computation of the feature channels are performed on the high-dimensional spatiotemporal feature tensor. This linear transformation operation weights and mixes the topologically coupled feature channels of the spatial dimension with the multi-scale temporally dependent feature channels of the temporal dimension, enabling deep interactive fusion of spatial and temporal information that originally belonged to different channels in the projected low-dimensional space. At the same time, by setting the number of columns of the dimensionality reduction mapping weight matrix, the feature dimension is compressed from the high-dimensional space to the preset low-dimensional target dimension, eliminating redundant feature components and noise interference. Next, the results of the linear transformation and dimensionality reduction are given a corresponding bias vector to introduce translational degrees of freedom. The entire result is then fed into a smooth nonlinear activation function for boundary constraints and feature enhancement, resulting in a spatiotemporal embedding matrix. This nonlinear activation function applies a nonlinear mapping to the fused features, enhancing the model's ability to express the complex nonlinear electrical coupling relationships between nodes in the distribution network and the dynamic response behavior of virtual power plant resources. The final output spatiotemporal embedding matrix is ​​a dense and compact low-dimensional encoding representation. The embedding vector corresponding to each node simultaneously carries the spatial coupling state of the node in the distribution network topology neighborhood and the dynamic evolution trend of its associated distributed resources at multiple time scales, providing the downstream multilayer perceptron decoder with input features of moderate dimensionality and high information density.

[0049] Specifically, in step three, based on the multilayer perceptron decoder, the spatiotemporal embedding matrix is ​​used to perform electrical state decoding and initial pre-estimation of branch power flow distribution to obtain the predicted state matrix. It should be understood that since the spatiotemporal embedding matrix obtained in the preceding steps is an abstract implicit feature representation after dimensionality reduction encoding, its values ​​lack direct physical interpretability and cannot be directly used by the distribution network dispatching system for safety verification and judgment. Therefore, it is necessary to reverse-map and restore the implicit encoding in this abstract feature space to electrical state quantities with clear physical meaning, including the voltage amplitude and phase angle of each node, as well as the power flow distribution of each branch, in order to provide an operable electrical state data foundation for the physical rule penalty calculation and safety margin quantification in the downstream steps. Therefore, in the technical solution of this application, the electrical state decoding of the spatiotemporal embedding matrix and the initial estimation of branch power flow distribution are further performed based on the multilayer perceptron decoder to obtain the predicted state matrix. This allows the abstract high-dimensional implicit features to be restored layer by layer to the voltage amplitude and phase angle of each node in the distribution network. Based on the laws of electrical physics, the power flow distribution of each branch is derived and calculated, integrating them into a unified data entity that comprehensively reflects the system-level predicted operating state of the distribution network. In this way, end-to-end nonlinear mapping can replace traditional iterative power flow calculation, providing a complete electrical state prediction result that can be physically verified for the downstream physical information loss function while ensuring computational efficiency.

[0050] More specifically, in the embodiments of this application, step three includes: step 3.1, based on a multilayer perceptron, performing feature amplification and layer-by-layer reverse mapping decoding on the spatiotemporal embedding matrix to restore the high-dimensional latent features to the voltage amplitude and phase angle of each node, thereby obtaining the node voltage feature tensor; step 3.2, performing branch power flow calculation on the complex voltage in the node voltage feature tensor, and concatenating the calculation result with the node voltage feature tensor along the feature dimension to obtain the predicted state matrix.

[0051] Specifically, in a particular example of this application, based on the spatiotemporal embedding matrix obtained in the preceding steps, it needs to be reverse-mapped back to physically meaningful electrical state quantities. First, the spatiotemporal embedding matrix is ​​fed into a decoder network composed of multilayer sensing mechanisms. Through layer-by-layer fully connected operations, the pre-trained network weight matrix and bias vector are used to amplify features and perform reverse spatial mapping, gradually restoring the compressed low-dimensional latent features to continuous real values ​​corresponding to the physical dimension. Then, the restored features are separated and decoded using a linear output layer to obtain the voltage amplitude and voltage phase angle of each node in the distribution network in future time segments, resulting in a node voltage feature tensor. This tensor is composed of voltage amplitude components and phase angle components in the feature dimension. The voltage amplitude component reflects the predicted voltage level of each node in the virtual power plant peak-shaving scenario, and the phase angle component reflects the predicted power transmission direction and relative phase relationship between each node. Next, voltage magnitude and phase angle components are extracted from the node voltage characteristic tensor. These are then reconstructed into a node complex voltage vector using complex number operations. Based on Kirchhoff's current law and voltage law, the predicted complex power passing through each connected branch in the distribution network topology is calculated using the complex voltage difference between the first and last nodes and the branch's inherent admittance parameters. The calculation process is as follows:

[0052] in, The branch complex power flowing from node i to node j in the distribution network includes active power flow and reactive power flow. These are the predicted complex voltages of node i and node j, reconstructed from the node voltage feature tensor, respectively. The known complex admittance parameters are those of the branch connecting node i and node j. This is to take the conjugate operation on the result of the calculation of the complex number inside the parentheses. In the above calculation process, the complex number inside the parentheses... The complex current flowing through the branch is calculated based on the branch admittance parameters and the complex voltage difference between the first and last nodes. Its physical meaning lies in the fact that the current in a distribution line is determined by both the voltage difference across the line and the line admittance; external The product operation conjugate with the complex current transforms the complex current into complex power injected into the branch from node i, where the real part corresponds to the active power flow component and the imaginary part corresponds to the reactive power flow component. This achieves a physical deduction from the node voltage state to the branch power flow distribution. Then, the node voltage characteristic tensor representing the node state and the branch power flow distribution matrix, which is formed by aggregating all the branch complex power obtained above, are spliced ​​along the characteristic dimension to form a prediction state matrix. This prediction state matrix comprehensively covers the predicted voltage amplitude, predicted voltage phase angle, and predicted active and reactive power flow distribution of each node in the distribution network, providing a complete electrical state prediction data foundation for the physical rule penalty calculation based on the power flow balance equation and physical limit tensor in the downstream step four.

[0053] Specifically, in step four, based on the physical limit tensor, the predicted state matrix is ​​subjected to physical rule penalty calculation and meta-learning adaptive calibration to obtain the verification state matrix. It should be understood that since the predicted state matrix obtained in the preceding steps is the initial output of the neural network's forward inference, this result is generated solely based on statistical learning data fitting logic. The network itself does not embed electrical physical equations such as Kirchhoff's current law and voltage law, nor does it contain rigid physical constraints such as line thermal stability limits or node voltage safety thresholds. When the virtual power plant experiences a power surge due to dispatch instructions, causing the distribution network's operating state to enter a boundary region not fully covered by the model training data, the predicted state matrix may contain power flow non-conservation predictions that violate the node power balance equations, as well as non-physically feasible predictions that exceed equipment safety thresholds. If such physically non-compliant predictions are directly used for safety margin quantification and risk judgment, it will lead to systematic misjudgments in the safety verification conclusions. Therefore, in the technical solution of this application, a physical rule penalty calculation and meta-learning adaptive calibration are further performed on the predicted state matrix based on the physical limit tensor to obtain the verification state matrix. This embeds the underlying power flow balance equation of the distribution network and the physical hard constraints of the equipment into the optimization objective of the neural network, forcing the model output to strictly converge to the physical feasible region. In this way, the risk of false verification due to the violation of physical laws by the purely data-driven model can be completely eliminated, ensuring that the voltage amplitude of each node and the power flow distribution of each branch in the verification state matrix strictly meet the physical operation law of the distribution network and the safety boundary constraints of the equipment, providing a physically compliant electrical state data foundation for the quantification of downstream safety margins.

[0054] Figure 5 This is a flowchart of step four of the machine learning-based multi-scenario safety verification method for virtual power plants in power distribution networks according to an embodiment of this application. Figure 5As shown, step four includes: Step 4.1, based on the global complex admittance matrix of the distribution network, comparing the forward and reverse complex power deviations of the node complex voltages in the predicted state matrix and calculating the residuals to obtain the power flow mismatch residual matrix; Step 4.2, using a linear rectification function, penalizing the out-of-bounds amount of the predicted state matrix exceeding the physical limit tensor, and determining the physical information loss scalar based on the penalty amount and the power flow mismatch residual matrix; Step 4.3, rapidly and adaptively updating the network weights based on the gradient of the physical information loss scalar, and performing closed-loop re-inference and physical compliance reconstruction on the predicted state matrix to generate a verification state matrix.

[0055] Accordingly, in step 4.1, based on the global complex admittance matrix of the distribution network, the forward and reverse complex power deviations of the node complex voltages in the predicted state matrix are compared and residuals are calculated to obtain the power flow mismatch residual matrix. It should be understood that since the node injected complex power and node complex voltages in the predicted state matrix obtained in the previous steps are both independently predicted by the neural network based on statistical learning, and the consistency between them has not been verified by the underlying power flow balance equations of the distribution network, in the physical operating environment of the distribution network, the injected complex power and the complex voltage of any node must strictly satisfy the Kirchhoff node power balance relationship, that is, the node injected complex power equals the product of the node's complex voltage and the complex current flowing through all connected branches. However, the purely data-driven neural network does not embed this physical conservation constraint during the forward inference process. Therefore, there may be deviations between the node injected power and node voltages in the predicted state matrix that do not satisfy the power conservation condition. Explicit quantification of this physical inconsistency is needed as the basis for subsequent penalty calculations. Therefore, in the technical solution of this application, the forward and reverse complex power deviations of the node complex voltages in the predicted state matrix are further compared and residuals are calculated based on the global complex admittance matrix of the distribution network to obtain the power flow mismatch residual matrix. This explicitly quantifies the degree to which the electrical states of each node in the predicted state matrix deviate from Kirchhoff's power balance equations. This provides an accurate power conservation deviation metric for the subsequent construction of the physical information loss function, enabling the network weight update process to specifically eliminate components in the prediction results that violate physical conservation conditions.

[0056] In a specific example of this application, based on the predicted state matrix obtained in the preceding steps, power conservation deviation quantification based on physical equations is required. First, the predicted injected complex power vector and predicted complex voltage vector for each node are separated from the predicted state matrix. The predicted injected complex power vector is the predicted active and reactive power values ​​of each node directly output by the neural network, and the predicted complex voltage vector is a complex form reconstructed from the voltage magnitude and phase angle components in the node voltage feature tensor. Next, based on the global complex admittance matrix of the distribution network, the predicted complex voltage vector is substituted into the Kirchhoff node complex power balance equations for theoretical back-calculation. That is, the predicted complex voltage diagonal matrix is ​​multiplied by the product of the conjugate of the system complex admittance matrix and the conjugate of the predicted complex voltage vector to obtain the estimated injected complex power obtained from the node voltage theoretical back-calculation. Then, the predicted injected complex power vector and the estimated injected complex power vector are subtracted to obtain the power flow mismatch residual matrix, the calculation process of which is expressed as follows:

[0057] in, To calculate the generated power flow mismatch residual matrix; Inject complex power vectors into the node predictions separated from the prediction state matrix; This is a diagonal matrix constructed from the predicted node complex voltage vectors; It is the conjugate matrix of the complex admittance matrix of the global distribution network system; This is the conjugate vector of the predicted node complex voltage vector. In the above calculation process, the right side of the minus sign... Partially implemented the theoretical complex power back-calculation based on Kirchhoff's nodal power balance equations. Its physical significance lies in rigorously calculating the theoretical complex power value that should be injected into each node under the given voltage condition, according to the predicted nodal complex voltages and the known admittance parameters of the distribution network, in accordance with the laws of circuit physics. (The left side of the minus sign...) The complex power value is injected into the node directly predicted by the neural network; the difference between the two is the power flow mismatch residual matrix. The absolute value of each element in this matrix reflects the degree of deviation between the predicted injected power of the corresponding node under the current network parameters and the theoretical injected power required by the physical laws. The larger the deviation, the more the predicted electrical state of the node deviates from Kirchhoff's power balance condition. In the peak shaving scenario of a virtual power plant, when the distributed resources inject a large amount of power, causing the distribution network operation state to enter the boundary area not fully covered by the model training data, the residual value will increase significantly, accurately identifying the node position with the most serious violation of physical conservation in the prediction result, and providing a node-by-node quantitative deviation measure for the construction of the mismatch residual penalty term in the subsequent physical information loss function.

[0058] Accordingly, in step 4.2, the out-of-bounds amount of the predicted state matrix exceeding the physical limit tensor is penalized and quantified using a linear rectification function, and the physical information loss scalar is determined based on the penalty amount and the power flow mismatch residual matrix. It should be understood that the power flow mismatch residual matrix obtained in the preceding steps only quantifies the degree to which the electrical state of each node in the predicted state matrix deviates from the Kirchhoff power balance equation, and has not yet quantitatively evaluated the out-of-bounds situations where the node voltage amplitude exceeds the voltage safety threshold or the branch power flow amplitude exceeds the thermal stability limit. In the peak-shaving scenario of a virtual power plant in a distribution network, physical conservation deviation and equipment safety out-of-bounds violations are two different types of physical violations. The former reflects the internal self-consistency defects of the prediction results, while the latter reflects the infringement of external rigid safety boundaries by the prediction results. Both need to be jointly quantified within a unified loss function framework to drive the network weights to update simultaneously in the direction that satisfies power conservation conditions and equipment safety constraints. Therefore, in the technical solution of this application, the out-of-bounds amount of the predicted state matrix exceeding the physical limit tensor is further penalized and quantified using a linear rectification function. A physical information loss scalar is then determined based on the penalty amount and the power flow mismatch residual matrix. This integrates the power conservation deviation penalty and the equipment safety out-of-bounds penalty into a unified scalar optimization objective. This enables the subsequent meta-learning engine to eliminate the two types of physical defects—power conservation violations and equipment safety out-of-bounds violations—by synchronously driving the model with a single loss scalar gradient during adaptive network weight updates. This ensures that the verified electrical state meets the distribution network operation requirements in all three physical dimensions: power conservation, voltage safety, and thermal stability.

[0059] In a specific example of this application, based on the power flow mismatch residual matrix, predicted state matrix, and physical limit tensor obtained in the previous steps, it is necessary to integrate the multi-dimensional physical violation information into a unified loss scalar. First, the safe threshold of node voltage and the apparent power limit of branch thermal stability are deconstructed from the physical limit tensor. The difference between the predicted voltage amplitude of each node in the predicted state matrix and the safe voltage threshold is calculated. The difference results are filtered by a linear rectification function, and only the positive difference portion where the predicted voltage amplitude is greater than the safe voltage threshold is retained as the voltage overrun. The difference of nodes that have not exceeded the limit is negative and automatically set to zero after linear rectification. The retained voltage overruns are squared and summed to quantify the overall severity of voltage overruns of all nodes in the network. Next, using the same processing logic, the predicted power flow amplitude of each branch in the predicted state matrix is ​​calculated to differ from the thermally stable apparent power limit. Positive differences exceeding the thermal stability limit are selected as power flow overloads using a linear rectification function. The retained overloads are then summed by squares to quantify the overall severity of thermal overload across the entire network. Then, the squared values ​​of the L2 norm of the power flow mismatch residual matrix, the sum of squares of the node voltage overload penalty, and the sum of squares of the branch power flow overload penalty are multiplied by their respective preset weighting coefficients and linearly weighted to determine the physical information loss scalar. The calculation process is as follows:

[0060] in, For the residual matrix of the current mismatch; The square of the L2 norm is obtained for the residual matrix of power flow mismatch; It is a linear rectified activation function. To predict the voltage magnitude in the state matrix, This represents the physical voltage threshold in the physical limit tensor. To measure the predicted branch power flow amplitude in the state matrix, This represents the upper limit of the thermal stability of the circuit in the physical limit tensor. , and These are the preset weighting coefficients for mismatch residual penalties, voltage over-limit penalties, and branch thermal stability over-limit penalties. In the above calculation process, the first term... A global quantitative penalty is applied to the degree of violation of the node power balance equation in the predicted state matrix. The larger the squared value of the L2 norm of the power flow mismatch residual matrix, the more severe the deviation of the prediction result from Kirchhoff's laws. This penalty term drives the network weights to be updated in the direction that satisfies the power conservation condition; the second term Medium linear rectifier function Its function is to achieve selective penalty when the predicted voltage amplitude is... Voltage safety threshold not exceeded When the difference within the brackets is negative, the output is zero after linear rectification, meaning no penalty is applied. Penalties are only applied to the square of the out-of-bounds value when the predicted voltage amplitude exceeds the safety threshold. This selective mechanism ensures that the network only applies corrective pressure to predicted values ​​that violate the voltage safety boundary without interfering with normal predictions within the safety range; (Third item) The same selective penalty logic is used to quantify and penalize the portion of the predicted branch power flow amplitude that exceeds the thermal stability limit; the three penalties are weighted by coefficients. , , By performing weighted balancing, the physical information loss scalar can comprehensively reflect the degree of violation of the predicted state matrix in the three physical dimensions of power conservation, voltage safety and thermal stability, providing a unified scalar optimization target for the subsequent meta-learning engine.

[0061] Accordingly, in step 4.3, the network weights are rapidly and adaptively updated based on the gradient of the physical information loss scalar, and the predicted state matrix is ​​re-inferred in a closed loop and reconstructed for physical compliance to generate a verification state matrix. It should be understood that since the physical information loss scalar determined in the previous steps has quantified the degree of violation of the predicted state matrix in the three physical dimensions of power conservation, voltage safety and thermal stability into a unified scalar value, but this loss scalar itself is only a metric and has not yet substantially corrected the network weight parameters that cause physical violations, the non-physically feasible predicted values ​​in the predicted state matrix are still retained in the original output. If the uncorrected predicted state matrix is ​​directly passed to the downstream safety margin quantification step, the safety verification conclusion will be based on data that violates physical laws. In the actual operation environment of the distribution network virtual power plant with frequent switching between multiple scenarios, the scheduling instructions of the virtual power plant may cause the distribution network operation state to quickly enter a new operating condition area that is not fully covered by the model training data. The network needs to have the adaptive ability to quickly adapt to the new scenario and eliminate physical violations within a very small number of update iterations. Therefore, in the technical solution of this application, the network weights are further updated rapidly and adaptively based on the gradient of the physical information loss scalar, and the predicted state matrix is ​​re-inferred in a closed loop and reconstructed for physical compliance to generate a verification state matrix. This allows the rigid constraints of physical laws to be integrated into the network weights through gradient backpropagation. Based on the updated weight system, a second closed-loop inference of the electrical state is performed, forcing the output to strictly converge to the physical feasible region. In this way, the voltage amplitude of each node and the power flow distribution of each branch in the verification state matrix can strictly satisfy the power flow balance equation of the distribution network and the physical safety boundary constraints of the equipment, completely eliminating the risk of misverification due to the violation of physical laws by the pure data-driven model.

[0062] In a specific example of this application, based on the physical information loss scalar determined in the preceding steps, this loss scalar needs to be used to drive the network weight correction and reconstruct the physically compliant electrical state. First, based on the inner loop adaptive mechanism of the meta-learning engine, the partial derivative gradient of the physical information loss scalar with respect to all learnable weight parameters responsible for state mapping in the neural network is calculated through backpropagation along the computation graph via an automatic differentiation mechanism. This gradient vector indicates the direction in which the physical information loss scalar grows fastest under the current weight parameter configuration, and the absolute value of each component reflects the contribution of the corresponding weight parameter to the degree of physical violation. Next, along the inverse direction of the gradient, a small number of fast adaptive updates are performed on the weight parameters using an internal fast learning rate. This results in the updated weight parameters leading to a smaller physical violation output in the network mapping function, measured by the physical information loss scalar. The physical significance of this update process lies in internalizing the rigid requirements of the power flow balance equations and equipment safety constraints of the distribution network into the network weights through gradient signal fusion. This shifts the network's mapping behavior from purely statistical fitting to a physical constraint-aware direction. The step size of the internal fast learning rate controls the magnitude of each update step to avoid excessive weight correction that could degrade the model's performance on other learned operating conditions. Then, the newly updated set of weight parameters after meta-learning calibration is frozen. Based on the updated network forward inference path, closed-loop re-inference and physical compliance reconstruction are performed on the predicted state matrix. Since the updated weight parameters have internalized the power conservation constraints and equipment safety boundary constraints encoded in the physical information loss scalar, the reconstructed output will automatically converge towards the direction that satisfies physical laws, forcibly covering unreasonable predictions in the original predicted state matrix and generating a verification state matrix. Furthermore, after the aforementioned closed-loop re-inference and physical compliance reconstruction, the voltage amplitude of each node and the power flow distribution of each branch in the verification state matrix are significantly compressed in three physical dimensions compared with the original predicted state matrix: power conservation deviation, voltage over-limit, and thermal overload over-limit. This provides a strict electrical state data foundation that meets the physical operation law of the distribution network for the quantification of safety margins in downstream steps and the determination of risk levels in multiple scenarios.

[0063] Specifically, in step five, the electrical state quantities of each node and branch in the verification state matrix are quantitatively calculated to correlate with the theoretical collapse boundary. The resulting safety margin index is then mapped to a multi-scenario risk warning rule base for discretized risk level judgment to obtain a safety verification result vector. It should be understood that although the verification state matrix obtained in the preceding steps has undergone physical rule penalties and meta-learning adaptive calibration, and the voltage amplitude of each node and the power flow distribution of each branch strictly satisfy the underlying physical equations of the distribution network and the equipment safety boundary constraints, the electrical state quantities in this matrix still exist in the form of continuous physical values. The distribution network dispatching system cannot directly make executable dispatching decisions based on the original voltage amplitude or power flow amplitude values. These continuous physical quantities need to be transformed into safety margin indices with clear engineering semantics and further mapped into discretized risk level judgment conclusions before they can be directly adopted and issued for execution by the virtual power plant dispatching center. Therefore, in the technical solution of this application, the electrical state quantities of each node and branch in the verification state matrix are further quantitatively calculated to determine the safety margin between the theoretical collapse boundary and the obtained safety margin index. The resulting safety margin index is then mapped to a multi-scenario risk warning rule base for discretized risk level judgment to obtain a safety verification result vector. This transforms physically compliant continuous electrical state quantities into discretized risk judgment instructions that can be directly executed by the distribution network dispatching system. In this way, the safety verification result vector can directly serve the automated decision-making process of the virtual power plant dispatching center in the form of structured discrete risk labels, realizing a complete closed loop from physical state perception to engineering decision output.

[0064] More specifically, in the embodiments of this application, step five includes: step 5.1, based on the node voltage safety threshold and the branch thermal stability limit, calculating the boundary distance normalization margin of each node voltage amplitude and each branch power flow amplitude in the verification state matrix to obtain a continuous safety margin index matrix; step 5.2, based on the graded safety decision threshold corresponding to the current virtual power plant operation scenario, performing interval comparison of the piecewise step indicator function and discretization risk level mapping on each element in the continuous safety margin index matrix to obtain a safety verification result vector.

[0065] Specifically, in a particular example of this application, based on the verification state matrix obtained in the previous steps, it needs to be transformed into an executable safety verification decision. First, the set of verification voltage amplitudes for each node of the distribution network and the set of verification apparent power flow for each branch are separated from the verification state matrix. For node characteristics, the relative distance between the current verification voltage amplitude and the upper and lower voltage limits is calculated based on the node voltage safety threshold, and the minimum value of the two is normalized to form a continuous margin value characterizing the node's ability to prevent voltage collapse. For branch characteristics, the ratio of the current verification apparent power to the line's inherent thermal stability limit is calculated based on the branch's thermal stability limit to form a continuous margin value characterizing the line's ability to prevent thermal overload. The voltage continuous margin values ​​of all network nodes in the system and the power flow continuous margin values ​​of all transmission branches are aggregated and spliced ​​to obtain a continuous safety margin index matrix. The value of each element in this matrix ranges from zero to one. The closer the value is to zero, the closer the corresponding component is to its physical collapse boundary. The closer the value is to one, the more abundant the safety margin of the corresponding component. Next, the system matches the current operating scenario of the virtual power plant and calls the corresponding graded safety judgment threshold from the multi-scenario risk warning rule library. This rule library presets differentiated safety critical thresholds and dangerous circuit breaker thresholds for different operating scenarios. In peak shaving scenarios, the safety critical threshold is set relatively conservatively due to the drastic fluctuations in the output of distributed resources, while in regular scheduling scenarios, the safety critical threshold is set relatively leniently. Then, using a segmented step indicator function, each element in the continuous safety margin index matrix is ​​compared and mapped to the called hierarchical judgment threshold element by element. When the continuous margin value of an element is greater than or equal to the safety critical threshold, it is mapped as a safe pass label. When the continuous margin value is between the dangerous circuit breaker threshold and the safety critical threshold, it is mapped as a critical alarm label. When the continuous margin value is less than the dangerous circuit breaker threshold, it is mapped as a dangerous rejection label. The discrete risk labels of all spatial components are arranged and structured according to the physical topology of nodes and branches to obtain a safety verification result vector. Each element in this vector corresponds to a specific node or branch in the distribution network. Its discrete label value directly indicates the safety status level of the component in the current virtual power plant operation scenario. It can be directly adopted by the virtual power plant dispatch center for the safety judgment and execution control of dispatch instructions.

[0066] In summary, the machine learning-based multi-scenario safety verification method for virtual power plants in distribution networks according to the embodiments of this application is explained. It maps the power sequences of each node to graph-structured data based on the distribution network topology adjacency matrix and constructs a physical limit tensor that integrates topological coupling information, solving the problem of neglecting the spatial cross-coupling relationship between voltage constraints and thermal stability constraints. Then, it extracts joint features of spatial topological coupling and multi-scale temporal dependence from the spatiotemporal graph of the operating state through graph convolutional networks and temporal convolutional networks, and decodes them into electrical state prediction quantities through a multilayer perceptron. This end-to-end nonlinear mapping replaces traditional iterative power flow calculation, improving computational efficiency. Next, it embeds the power flow balance equation and equipment physical limit constraints into the loss function to construct a physical information penalty mechanism, and uses a meta-learning engine to adaptively calibrate and reconstruct the network weights, forcing the model output to strictly converge to the physical feasible region. Finally, it quantifies the safety margin of the verified state and maps it to a multi-scenario risk rule base to complete discretization judgment.

[0067] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A multi-scenario safety verification method for a virtual power plant in a power distribution network based on machine learning, characterized in that, include: Step 1: Based on the topological adjacency matrix of the distribution network, the active power sequence and reactive power sequence collected by each node are time-series spliced ​​and normalized and mapped to the graph structure node to obtain the operating spatiotemporal graph. At the same time, the thermal stability limit matrix and voltage threshold vector are dimension-aligned to obtain the physical limit tensor. Step 2: Based on graph convolutional networks and temporal convolutional networks, perform spatial topological coupling feature extraction between nodes and multi-scale time series dependency capture on the running spatiotemporal graph to obtain the spatiotemporal embedding matrix. Step 3: Based on the multilayer perceptron decoder, perform electrical state decoding and initial pre-estimation of branch power flow distribution on the spatiotemporal embedding matrix to obtain the predicted state matrix. Step 4: Based on the physical limit tensor, perform physical rule penalty calculation and meta-learning adaptive calibration on the predicted state matrix to obtain the verification state matrix; Step 5: Quantify the safety margin between the electrical state quantities of each node and branch in the verification state matrix and the theoretical collapse boundary, and map the obtained safety margin index to the multi-scenario risk warning rule base for discretization risk level judgment to obtain the safety verification result vector.

2. The multi-scenario safety verification method for virtual power plants in power distribution networks based on machine learning according to claim 1, characterized in that, Step one includes: Step 1.1: Based on the mean and standard deviation statistics, the active power sequence and reactive power sequence are vector-concatenated and standardized along the feature dimension to obtain the normalized power feature matrix. Step 1.2: Construct a node set and an edge set based on the non-zero connectivity in the topological adjacency matrix, and perform node-level attribute binding and graph structure instantiation mapping on the normalized power feature matrix to obtain the running spatiotemporal graph; Step 1.3: After performing tensor dimension upscaling on the voltage threshold vector along the branch topology dimension, it is jointly concatenated with the thermal stability limit matrix along the feature channel dimension to obtain the physical limit tensor.

3. The multi-scenario safety verification method for virtual power plants in power distribution networks based on machine learning according to claim 1, characterized in that, Step two includes: Step 2.1: Based on the learnable spatial weight matrix, perform neighborhood message passing and aggregation on the node features in the running spatiotemporal graph to obtain the spatial aggregation feature tensor; Step 2.2: Based on the causal convolution kernel with exponentially increasing inflation coefficient and the residual jump connection structure, multi-scale temporal dependency of the spatial aggregated feature tensor along the time step dimension is captured to obtain the spatiotemporal high-dimensional feature tensor. Step 2.3: Perform feature fusion and dimensionality reduction encoding of spatial and temporal information on the spatiotemporal high-dimensional feature tensor to obtain the spatiotemporal embedding matrix.

4. The multi-scenario safety verification method for virtual power plants in power distribution networks based on machine learning according to claim 1, characterized in that, Step three includes: Step 3.1: Based on the multilayer perceptron, the spatiotemporal embedding matrix is ​​amplified and decoded layer by layer by layer to restore the high-dimensional hidden features to the voltage amplitude and phase angle of each node, thus obtaining the node voltage feature tensor. Step 3.2: Perform branch power flow calculation on the complex voltages in the node voltage feature tensor, and concatenate the calculation results with the node voltage feature tensor along the feature dimension to obtain the predicted state matrix.

5. The multi-scenario safety verification method for virtual power plants in power distribution networks based on machine learning according to claim 1, characterized in that, Step four includes: Step 4.1: Based on the global complex admittance matrix of the distribution network, compare the forward and reverse complex power deviations of the node complex voltages in the predicted state matrix and calculate the residuals to obtain the power flow mismatch residual matrix. Step 4.2: The out-of-bounds amount of the predicted state matrix exceeding the physical limit tensor is penalized and quantized using a linear rectification function, and the physical information loss scalar is determined based on the penalty amount and the power flow mismatch residual matrix. Step 4.3: The network weights are updated quickly and adaptively based on the gradient of the physical information loss scalar, and the predicted state matrix is ​​re-inferred in a closed loop and reconstructed for physical compliance to generate a verification state matrix.

6. The multi-scenario safety verification method for virtual power plants in distribution networks based on machine learning according to claim 5, characterized in that, Step 4.2 includes: determining the physical information loss scalar based on the penalty amount and the power flow mismatch residual matrix using the following formula: in, For the residual matrix of the current mismatch; The square of the L2 norm is obtained for the residual matrix of power flow mismatch; It is a linear rectified activation function. To predict the voltage magnitude in the state matrix, This represents the physical voltage threshold in the physical limit tensor. To measure the predicted branch power flow amplitude in the state matrix, This represents the upper limit of the thermal stability of the circuit in the physical limit tensor. , and These are the preset weighting coefficients for mismatch residual penalty, voltage over-limit penalty, and branch thermal stability over-limit penalty.

7. The multi-scenario safety verification method for virtual power plants in distribution networks based on machine learning according to claim 1, characterized in that, Step five includes: Step 5.1: Based on the node voltage safety threshold and the branch thermal stability limit, perform boundary distance normalization margin calculations on the voltage amplitude of each node and the power flow amplitude of each branch in the verification state matrix to obtain the continuous safety margin index matrix. Step 5.2: Based on the graded safety decision threshold corresponding to the current virtual power plant operation scenario, perform interval comparison of the segmented step indicator function and discretization risk level mapping on each element in the continuous safety margin index matrix to obtain the safety verification result vector.

8. The multi-scenario safety verification method for virtual power plants in distribution networks based on machine learning according to claim 2, characterized in that, Step 1.3 includes: Step 1.3a: Perform a continuous coupling proximity transformation on the shortest path hop count from each node to the nearest endpoint of each branch in the topological adjacency matrix to obtain the coupling proximity matrix; Step 1.3b: Based on the row-by-row normalized coupling attention weights, the coupling proximity matrix, the per-unit voltage threshold vector, and the thermal stability limit matrix are cross-modulated to obtain the cross-constraint interaction feature matrix. Step 1.3c: The voltage threshold vector is expanded by tensor dimension increase using the broadcast mechanism, and the expanded result is encapsulated by three-channel splicing along the feature channel dimension with the thermal stability limit matrix and the cross-constraint interaction feature matrix to obtain the physical limit tensor.