Energy power safety dynamic early warning method and system and storage medium

By constructing a market-physical coupled feature space and a cross-modal Transformer model, the physical security risks of the power grid caused by large-scale commercial orders in virtual power plants are addressed, enabling advanced early warning and closed-loop adaptive control, thereby improving the safety and stability of the power grid.

CN121684646APending Publication Date: 2026-03-17XIAN XINGZHOU YUANJING VISION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511904068.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing technologies cannot effectively identify and provide early warning of physical security risks to the power grid caused by large-scale concurrent commercial commands, especially in virtual power plant systems. Traditional security monitoring methods are reactive and cannot predict potential physical system instability risks before commands are executed.

Method used

We construct a multidimensional heterogeneous market-physical coupled feature space data pool, generate concurrent impact feature vectors of business instructions, and use graph neural networks and cross-modal Transformer models to perform cross-domain decision-making-physical risk inference and early warning. Combining graph deep learning and physical constraints, we achieve advanced early warning and closed-loop adaptive regulation.

Benefits of technology

It enables precise early warning of potential grid impact risks during the quiet period before the execution of commercial instructions, prevents grid safety accidents caused by commercial decisions, and improves the safe and stable operation capability of the new power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121684646A_ABST
    Figure CN121684646A_ABST
Patent Text Reader

Abstract

The invention discloses an energy power safety dynamic early warning method and system, and a storage medium. The method comprises the steps of constructing a market and physical coupling data pool including a commercial decision instruction, a power grid physical state and a terminal response feature; generating a business instruction concurrency impact feature vector for quantifying the business instruction space aggregation degree and the time synchronization; constructing a physical vulnerability embedding model based on the graph neural network, and dynamically generating a physical embedding vector representing power grid node vulnerability; and inputting the impact characteristic vector and the physical embedding vector into a cross-modal prediction model, and deducing and early warning a power grid physical risk caused by a commercial instruction in a silent period before instruction execution. By establishing the novel mapping relation between market behaviors and physical safety, advanced early warning of cross-domain risks caused by large-scale concurrent commercial behaviors in the silent period is achieved, power grid safety accidents caused by pursuit of short-term economic benefits can be effectively prevented, and the safe and stable operation capacity of a novel power system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power system safety management technology, specifically to an artificial intelligence-based dynamic early warning method, system, and storage medium for energy and power safety. Background Technology

[0002] With the transformation of the energy structure, a new power system based on distributed renewable energy is being rapidly constructed. Against this backdrop, Virtual Power Plants (VPPs), as a crucial technology for aggregating distributed energy resources to participate in the electricity market, are profoundly changing traditional power dispatching models. Through software and communication technologies, VPPs integrate geographically dispersed and heterogeneous distributed power sources, energy storage systems, and controllable loads into a unified market entity, participating in electricity trading and ancillary services within the electricity market.

[0003] However, the deep integration of virtual power plants with the physical power grid also brings a new type of "information-physical" coupling risk. The operational decisions of virtual power plants are primarily driven by electricity market price signals and economic benefit objectives. Under certain specific conditions, such as when high summer temperatures cause grid supply and demand imbalances, the locational marginal price (LMP) in the electricity spot market may rise sharply. Incentivized by this, the virtual power plant management system, based on economic optimization algorithms, issues highly concurrent, synchronous, and homogeneous business instructions, such as "full power discharge" or "maximum load reduction," to its aggregated tens of thousands of terminal devices. These instructions cause a large number of physically dispersed devices to make highly consistent power regulation behaviors in response to the same price signal within a very short time window.

[0004] Existing power safety management systems typically employ a layered and decoupled architecture, managing the market transaction layer focused on economic dispatch separately from the physical operation layer focused on electrical safety. The market layer is primarily responsible for transaction matching and settlement, while the physical layer relies on traditional Supervisory Control and Data Acquisition (SCADA) systems and relay protection devices to handle issues such as steady-state power flow exceeding limits or short-circuit faults. This fragmented management model makes it difficult for existing technologies to effectively identify and warn of hidden safety risks arising from the spatiotemporal mismatch between large-scale concurrent commercial decision-making and the local power grid's physical carrying capacity. Especially at the end of the distribution network or in areas with weak grid structures, when a massive number of terminal devices instantaneously execute synchronous power regulation based on commercial instructions, drastic power flow abrupt changes can occur. These abrupt changes may exceed the dynamic adjustment capabilities or thermal stability limits of local physical nodes (such as transformers and lines), leading to problems such as voltage instability, equipment overheating, frequency oscillations, and even malfunctions of protection devices, potentially causing widespread power outages in severe cases.

[0005] Furthermore, traditional security monitoring methods are mostly passive responses triggered by physical parameter thresholds, which are post-event alarms. Existing technologies cannot predict the potential physical system instability risks induced by compliant market transactions during the silent period (i.e., the communication and response delay window) before commercial instructions are issued but before terminal devices have completed physical execution. Therefore, the current technological field needs a dynamic early warning technology that can transcend the boundaries between commercial logic and physical operation, using the concurrent characteristics of commercial management intentions as prior information to accurately assess the impact risk on the physical power grid before the instructions are actually executed. Summary of the Invention

[0006] One aspect of this invention is to provide a dynamic early warning method for energy and power security, which solves the technical problem in the prior art that the physical security risks of the power grid caused by large-scale concurrent commercial orders cannot be warned due to the decoupling of market transactions and physical operation.

[0007] This invention provides a dynamic early warning method for energy and power security, which includes the following steps: Step S1: Construct a multi-dimensional heterogeneous market-physical coupled feature space data pool. To provide a comprehensive and high-quality information foundation for subsequent artificial intelligence models, this step acquires, cleans, and aligns multi-source heterogeneous data reflecting market transaction intentions and power grid physical states in real time through distributed data acquisition interfaces deployed in the cloud and edge computing gateways. Specifically, the collected data is mainly divided into three categories: The first category is business decision instruction data, including the types of dispatch instructions issued by virtual power plant aggregators, instruction issuance timestamps accurate to milliseconds, a list of target response terminal identifiers, market price signals associated with the instructions (such as nodal marginal electricity price, ancillary service clearing price), the expected total regulation power of the instructions, the expected power ramp-up rate curve, and instruction priority, etc.; The second category is power grid physical status data, including the real-time topology of the distribution network, the real-time electrical quantities of key physical nodes (such as distribution transformers, tie switches) (such as three-phase voltage, active power, reactive power), the rated capacity of equipment, short-time overload capacity curves, thermal stability limits, and equipment aging and depreciation coefficients calculated based on historical records, etc.; The third category is distributed terminal response characteristic data, including the Geographic Information System (GIS) coordinates of each response terminal, electrical access points, real-time State of Charge (SOC), maximum adjustable power range, State of Health (SOH), and response delay distribution characteristics derived from historical behavior analysis. Furthermore, using the time sliding window technique, with the time T_0 when the business instruction is issued as the benchmark, the above multi-source data is time-synchronized and aligned. Then, a denoising autoencoder is used to clean and interpolate missing or outlier values ​​in the data, ultimately forming a standardized multidimensional input tensor, providing structured data for subsequent analysis.

[0008] Step S2 generates a concurrent impact feature vector for business instructions. This step aims to transform abstract business decision-making behavior into a quantifiable indicator of physical impact potential, addressing the challenge of directly representing business intent in a physical model. Specifically, firstly, based on the target response terminal list and power grid topology information collected from business decision instructions, a density-based spatial clustering algorithm (e.g., DBSCAN algorithm) is used to cluster the physical locations of the response terminals, identifying terminal clusters that physically belong to the same power supply area (e.g., the same substation or the same feeder), thereby establishing a mapping relationship between business instructions and physical nodes. Secondly, this invention also quantifies the temporal concentration of instructions by calculating the instruction synchronization entropy within each terminal cluster. This indicator measures the synchronicity of the response behavior of each terminal within the cluster by constructing a probability density function of the expected execution time of the instruction. If all terminals are required to act simultaneously within a very short time, the probability distribution is sharp, the entropy value is extremely low, indicating a strong instantaneous power impact. Simultaneously, by combining a user behavior prediction model based on Long Short-Term Memory (LSTM) networks, high-order fluctuation features of market price signals are extracted to derive the Response Aggressiveness Index (RAI), which reflects the probability that users will execute full-power, high-rate adjustments under the current price incentive. Finally, spatial clustering results, instruction synchronization entropy, RAI, expected total power change, and power change direction are fused using high-dimensional features to generate a commercial instruction concurrent impact feature vector for each affected key physical node. This vector not only contains the magnitude of the power change but also its temporal steepness and spatial clustering. Preferably, when calculating instruction synchronization entropy, a communication network latency distribution factor is further introduced. A Gaussian Mixture Model (GMM) is used to fit the instruction reception latency probability density function of the terminal under different communication environments, and this is superimposed with the expected instruction execution time to construct an equivalent concurrent power curve that more closely approximates physical reality, thereby improving the accuracy of early warning.

[0009] Step S3: Construct a dynamic embedding model of power grid physical vulnerability based on graph neural networks. This step utilizes graph deep learning technology to dynamically characterize the vulnerability, carrying capacity, and inter-node interactions of the power grid's physical topology under the current operating state. Specifically, the distribution network is modeled as a heterogeneous graph structure, where physical devices such as distribution transformers, switching stations, and load points are treated as nodes, and transmission lines are treated as edges. A physical vulnerability embedding model is constructed using a Multi-Head Graph Attention Network (GAT), with the power grid physical state data obtained in Step S1 serving as the input features. During the forward propagation of the model, the influence weights between adjacent nodes are dynamically calculated through the multi-head attention mechanism, enabling the model to automatically focus on nodes in states such as overload or voltage limit exceedance, thereby capturing local vulnerabilities in the power grid. Specifically, this step introduces a physical constraint masking mechanism, transforming Kirchhoff's Current Law (KCL), Voltage Law (KVL), and equipment thermal stability limits into regularization penalty terms in the model's loss function. This ensures that the generated node embedding vectors not only conform to the data distribution but also strictly adhere to the physical constraints of the power system. Finally, the model outputs a physical vulnerability embedding vector for each node, representing its current ability to withstand power surges in a high-dimensional space. Preferably, the graph neural network can be combined with domain knowledge graph technology. By constructing a heterogeneous knowledge graph containing multiple relationships such as "market entities-geographical location-physical equipment-electrical attributes," the TransE algorithm (a translation-based knowledge graph representation learning algorithm) is used to map entities and relationships in the knowledge graph into vectors, which are then embedded into the initial weights of the graph neural network. This allows the model to understand implicit business logic connections, thereby adding an analytical dimension for risk transmission paths beyond the physical topology.

[0010] Step S4: Perform cross-domain decision-making – physical risk simulation and quiet period early warning. This invention constructs a cross-modal physical sensing Transformer prediction model and utilizes the quiet period between the issuance of commercial instructions and the execution of physical terminals to achieve advanced simulation and early warning of transient impact risks to the power grid. The model consists of an encoder and a decoder. The encoder adopts a dual-stream heterogeneous architecture. One input is the sequence of concurrent impact feature vectors of commercial instructions generated in step S2, and its temporal features are extracted using a one-dimensional temporal convolutional network. The other input is the physical vulnerability embedding vector generated in step S3 to preserve the spatial structural features of the power grid topology. In the feature fusion layer, a market-physical interaction attention module is designed to identify the potential impact of specific commercial instruction patterns on specific vulnerable physical nodes by calculating the correlation matrix between commercial instruction vectors and physical node vectors. The decoder part performs advanced time-domain simulation based on physical mechanisms based on the fused features, and regresses and predicts the voltage trajectory, frequency change rate, and line power flow change curve of key nodes within a short time window after instruction execution. During the simulation, a quiet period risk assessment logic is set up: if the simulation model predicts that during the quiet period after the instruction is issued but before the actual action of the terminal, the voltage of any critical node will deviate from the safe operating threshold or the line power flow will exceed the thermal stability limit, a dynamic risk warning signal is immediately generated. This signal includes the specific location of the risk, the risk type, the severity level, the associated business instruction, and the suggested instruction correction strategy. Preferably, the cross-modal physical sensing Transformer prediction model adopts a Residual Physical Network (Res-PINN) architecture, explicitly adding a physical residual term based on the differential algebraic equations of the power system to the loss function. This forces the model output to satisfy data fitting while adhering to physical laws such as power balance, thereby improving the robustness and interpretability of the model in simulations under unseen new scenarios.

[0011] Step S5 involves implementing closed-loop adaptive control based on risk feedback. This step transforms the early warning results into actual control actions, forming a closed-loop management system to proactively mitigate risks. Specifically, the dynamic risk early warning signal generated in step S4 is fed back in real time to the virtual power plant management platform or the power grid dispatch automation system. For commercial instructions deemed high-risk, the system automatically activates the instruction circuit breaker and reshaping mechanism. This mechanism first intercepts the original commercial instruction at the communication layer, preventing it from being sent to the terminal equipment. Second, it reshapes the original instruction according to the correction strategy suggested in the early warning signal. Furthermore, to preserve the economic benefits of market participants while ensuring grid security, the instruction reshaping process employs an instruction reconstruction method that minimizes market losses based on differentiable risk sensitivity. Utilizing the differentiable properties of the cross-modal physical sensing Transformer model constructed in step S4, the gradient of the risk prediction value relative to the commercial instruction input vector is calculated using the backpropagation algorithm, yielding the risk sensitivity matrix. This matrix quantifies the contribution of adjusting instruction parameters (such as power or delay time) of different terminals to reducing physical risks. Based on this gradient information, a constrained convex optimization problem is constructed. The objective function is to minimize the economic loss caused by instruction modification, with the constraint that the predicted risk value of the reshaped instruction must be lower than a safety threshold. By solving this optimization problem, the system can generate a correction strategy for specific nodes, such as fine-tuning only a few terminal instructions located at the most vulnerable nodes, rather than uniformly reducing all instructions indiscriminately. Finally, the system issues the reshaped safety instructions and continuously monitors the actual response of the power grid. It compares the actual operating data with the predicted data, calculates the residuals, and uses these residuals as new samples for online incremental learning of the model, achieving self-evolution of the early warning model.

[0012] Another aspect of the present invention is to provide a dynamic early warning system for energy and power security, the system comprising: The global data perception module is used to execute step S1, and is responsible for real-time collection, cleaning and integration of business decision instruction data, power grid physical status data and distributed terminal response characteristic data.

[0013] The instruction impact characterization module is used to execute step S2 and is responsible for transforming abstract business instructions into a "business instruction concurrent impact" feature vector that includes spatial clustering, temporal synchronization and response aggressiveness.

[0014] The physical vulnerability embedding module is used to execute step S3. It is responsible for dynamically generating physical embedding vectors that characterize the vulnerability of each node in the power grid based on a multi-head graph attention network and physical constraints.

[0015] The cross-domain risk simulation module is used to execute step S4. It is responsible for using the cross-modal Transformer model to predict the dynamic trajectory of key power grid indicators during the silent period before the instruction is executed, and generating risk warning signals according to preset logic.

[0016] The closed-loop active defense module is used to execute step S5. It is responsible for intercepting and reshaping high-risk instructions based on the early warning signal, generating the optimal correction strategy that balances safety and economy through an optimization algorithm based on model gradient, and realizing online updating of the model.

[0017] This invention establishes a novel mapping relationship between market behavior and physical security by treating business decision-making behavior characteristics as quantifiable prior variables and deeply integrating them into the physical security assessment system of the power system. Through the organic combination of graph neural networks and the Transformer model of physical perception, this invention can accurately capture cross-domain risks between the market and the physical system, achieving proactive early warning during the "quiet period" before instruction execution. Compared to existing technologies, this invention achieves proactive early warning in addressing the impact of large-scale concurrent business activities on the physical power grid security, effectively preventing power grid safety accidents caused by the pursuit of short-term economic benefits, and improving the safe and stable operation capability of the new power system. Attached Figure Description

[0018] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0019] Figure 1 This is a flowchart of a dynamic early warning method for energy and power security provided by an embodiment of the present invention.

[0020] Figure 2 This is a schematic diagram of the functional module structure of an energy and power security dynamic early warning system provided in an embodiment of the present invention.

[0021] Figure 3 This is a schematic diagram used in this embodiment of the invention to illustrate the concepts of "market-physical" coupling risk and "quiet period" early warning.

[0022] Figure 4 This is a schematic diagram of the closed-loop adaptive control process in an embodiment of the present invention.

[0023] Figure 5 This is a schematic diagram of the physical deployment of the distributed terminal of the virtual power plant in an embodiment of the present invention.

[0024] Figure 6 This is a schematic diagram of the edge computing gateway and cloud platform data acquisition architecture of the present invention.

[0025] Figure 7 This is a schematic diagram of DBSCAN spatial clustering and instruction synchronization entropy calculation in an embodiment of the present invention.

[0026] Figure 8 This is a comparison diagram of the early warning performance between the method of the present invention and the traditional method in the embodiments of the present invention. Detailed Implementation

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

[0028] Example 1

[0029] This embodiment provides a dynamic early warning method for energy and power security. (Refer to...) Figure 1 This method is primarily applied to virtual power plant management platforms or power grid dispatch automation systems. It aims to use artificial intelligence technology to accurately predict and mitigate the potential security impacts on the physical power grid before the execution of large-scale distributed resource regulation commands driven by market behavior. For example... Figure 5 As shown, the virtual power plant management platform implements unified scheduling and management of geographically dispersed heterogeneous distributed energy resources through a communication network. In urban commercial areas, charging pile clusters 1001 and controllable loads 1002 from commercial buildings are deployed to respond to peak-valley electricity price arbitrage commands. In industrial areas, industrial energy storage stations 2001 and adjustable industrial loads 2002 are configured to quickly adjust power output in response to grid demand events. In residential areas, rooftop photovoltaic arrays 3001, user-side energy storage 3002, and home charging piles 3003 are installed to achieve coordinated optimization of distributed photovoltaic power generation and flexible load-side adjustment. In suburban areas, centralized energy storage stations 4001 and small wind farms 4002 are constructed to provide large-capacity energy buffering and renewable energy grid connection services. These physically dispersed but logically unified terminal devices are connected to the virtual power plant management platform through the communication network shown by the dotted line. When the platform issues commercial commands, each terminal responds differently based on GIS coordinates and device attributes, realizing a virtual power plant operation mode of "distributed resources, centralized scheduling." The method specifically includes the following steps:

[0030] Step S1: Construct a multi-dimensional, heterogeneous "market-physical" coupled feature space data pool. This step provides comprehensive and high-quality input data for subsequent risk assessment models. Specifically, information is acquired in real time from multiple data sources through distributed data acquisition interfaces deployed on cloud platform servers and edge computing gateways. For example... Figure 6As shown, this invention adopts a three-layer distributed data acquisition architecture of cloud-edge-device. The cloud platform layer includes a cloud server 101, which deploys core AI models (including Graph Attention Network GAT, Transformer, etc.) and performs global risk inference calculations. The edge computing layer includes edge gateways 201 deployed in different geographical locations such as substation A, substation B, transformer area C, and transformer area D. Each edge gateway has local data preprocessing, time alignment, and feature extraction functions, and communicates wirelessly with terminal devices through device antennas. The terminal device layer includes various types of data acquisition terminal devices such as energy storage BMS 301, charging piles 302, smart meters 303, SCADA terminals 304, and RTUs 305. The cloud platform layer and the edge computing layer communicate via 5G or fiber optic networks for high-bandwidth, low-latency communication, while the edge computing layer and the terminal device layer transmit data via industrial Ethernet, RS485 bus, or wireless communication protocols (LoRa, NB-IoT). This architecture enables layered acquisition and processing of multi-source heterogeneous data, reduces cloud computing pressure, and improves data acquisition real-time performance and system reliability. The acquired data can be specifically divided into three categories. The first category is business decision-making instruction data, which includes, for example, the instruction ID, the type of instruction issued by the virtual power plant aggregator at time T_0 (e.g., "full power discharge", "load reduction by 50%)", the instruction issuance timestamp (accurate to milliseconds), a list of unique identifiers for the target response terminals, market price signals closely related to the instruction (e.g., the node marginal price (LMP) of a specific node reaching a certain high level), the expected total regulation power change of the instruction (e.g., -50 MW), the expected power ramp-up rate curve (e.g., linear ramp, 10 MW / min), and the business priority of the instruction (e.g., a first-level supply guarantee instruction). The second category is power grid physical status data, for example, real-time distribution network topology information obtained through the power grid SCADA system, real-time electrical quantity measurements of key physical nodes (e.g., 10 kV distribution transformers, feeder tie switches) (e.g., three-phase voltage amplitudes of A, B, and C, active and reactive power flow), static parameters of equipment (e.g., rated capacity of transformers, thermal stability limit current of lines), and dynamic parameters (e.g., equipment aging and depreciation coefficients calculated based on historical operating data and ambient temperature, short-time overload capacity curves). The third category is distributed terminal response characteristic data, such as the GIS geographic coordinates of each responding terminal uploaded by the terminal monitoring unit, its detailed electrical connection point in the power grid topology, real-time state of charge (SOC) (for energy storage or electric vehicles), current maximum adjustable power range, SOH index for assessing equipment health status, and the probability distribution characteristics of the terminal's response delay time to commands derived from historical data statistical analysis. To ensure data consistency, a time sliding window technique is further adopted, using the commercial command issuance time T_0 as the base time point, and extracting all data within a preset time period before and after that time (e.g., 5 minutes before and after).Subsequently, a denoising autoencoder neural network is used to process the acquired data stream. This network can learn the inherent distribution patterns of the data, thereby effectively filtering out random noise and interpolating missing or obvious outliers caused by communication interruptions. Finally, all the cleaned and aligned data is constructed into a standardized multidimensional input tensor, forming a structured "market-physical" coupled feature space data pool.

[0031] Step S2: Generate a "Concurrent Impact of Business Instructions" feature vector. The core of this step is to transform abstract business intentions into quantifiable numerical features that characterize their potential impact on the physical power grid. Specifically, firstly, based on the list of target response terminals and their GIS coordinates obtained in Step S1 from the business decision instructions, spatial clustering analysis is performed using a density-based spatial clustering algorithm (e.g., the DBSCAN algorithm). This algorithm can automatically identify highly concentrated terminal clusters in physical space, such as hundreds of charging piles belonging to the same residential community and powered by the same transformer substation. Through this clustering, a mapping relationship is established from macro-level business instructions to specific physical bearer nodes. Figure 7As shown, the upper part illustrates the application effect of DBSCAN (density-based spatial clustering algorithm) in the spatial distribution of terminal devices. Based on a latitude and longitude coordinate system, the figure displays three typical spatial clustering results, corresponding to the power supply ranges of transformer 2 and transformer 3 in the distribution area, respectively. Each cluster region is marked by a dashed circle, with the black dots inside representing the terminal devices responding to the commands. The projection of GIS coordinates onto a two-dimensional plane clearly identifies highly concentrated terminal clusters in physical space. Gray "×" marks indicate noise points or outliers that failed to be assigned to any cluster. The lower part displays two typical probability density distributions for command execution: the left side represents a high-synchronization scenario where all terminals act simultaneously within a very short time, exhibiting a sharp pulse shape in the probability density function. In this case, the command synchronization entropy H≈0, indicating a strong instantaneous power surge; the right side represents a low-synchronization scenario where terminals respond randomly in batches along the time axis, exhibiting a flat, fluctuating probability density function. In this case, the command synchronization entropy H is higher, indicating that the power grid impact is effectively mitigated. Furthermore, to quantify the temporal concurrency of commands, this embodiment calculates the command synchronization entropy within each terminal cluster. This metric is measured by constructing a probability density function of the expected execution time of the instruction. Specifically, if the instruction requires all terminals in the cluster to start responding simultaneously at the same time (e.g., T_0 + 500 milliseconds), the probability density function exhibits an extremely sharp pulse with an entropy value close to zero, indicating a huge instantaneous power surge. Conversely, if the instruction requires terminals to respond in batches and randomly over a period of time, the probability distribution is flatter, the entropy value is higher, and the surge is more moderate. Preferably, when calculating the instruction synchronization entropy, a communication network delay distribution factor can be further introduced. A Gaussian mixture model (GMM) is used to probabilistically model the actual delay of terminal instruction reception under different communication methods (e.g., 5G, fiber optics), and the delay probability density function is convolved with the expected execution time of the instruction to obtain an equivalent concurrent power curve that more closely approximates the actual physical situation, significantly improving the accuracy of subsequent early warnings. Simultaneously, to assess the strength of the terminal response, this embodiment also incorporates a user behavior prediction model based on Long Short-Term Memory (LSTM) networks. By inputting historical market price signal sequences, it extracts high-order volatility features (such as price volatility and kurtosis changes) and derives the terminal user's response aggression index. This index, a value between 0 and 1, reflects the probability that a user will choose to execute full-power, maximum-rate power adjustment under strong stimulation from the current price signal. Finally, the information from multiple dimensions, including the spatial clustering results (such as cluster size and density), instruction synchronization entropy, response aggression index, expected total power change of the instruction, and power change direction (upward or downward), is fused using high-dimensional features, for example, through encoding via a fully connected neural network. This generates a unique "commercial instruction concurrent impact" feature vector for each key physical node affected by commercial instructions (such as transformer substations).

[0032] Step S3: Construct a dynamic embedding model of power grid physical vulnerability based on graph neural networks. This step aims to utilize graph deep learning technology to transform the physical state and topology of the power grid into a high-dimensional vector representation that dynamically reflects its current vulnerability. Specifically, the distribution network is abstracted as a heterogeneous graph structure, where physical devices (such as distribution transformers, switching stations, and load points) are considered as nodes of the graph, and transmission lines and buses connecting these devices are considered as edges. Each node contains its physical attributes as initial features, which are derived from the power grid physical state data (such as real-time voltage, load rate, and rated capacity of equipment) collected in Step S1. This embodiment uses a multi-head graph attention network (GAT) to construct this physical vulnerability embedding model. During information propagation (i.e., forward computation) in the model, GAT, through its core multi-head attention mechanism, can dynamically calculate the attention weights of each node's neighboring nodes. This means that if a neighboring node is already in a critical state such as overload or low voltage, the model will automatically assign it a higher weight, allowing the current node to pay more attention to the impact from this "vulnerable" neighbor when updating its own state representation. In this way, the model can keenly capture local weaknesses and potential risk propagation paths in the power grid. Specifically, to ensure that the model-generated embedding vectors have realistic physical meaning, this embodiment introduces a physical constraint masking mechanism. This mechanism transforms fundamental physical laws that the power system must adhere to, such as Kirchhoff's Current Law (KCL, i.e., the sum of currents flowing into a node equals the sum of currents flowing out), the Voltage Law (KVL), and engineering constraints such as the thermal stability limits of equipment, into at least one regularization penalty term in the model's loss function. During model training, if the model's output violates these physical laws, this penalty term increases, forcing the model to adjust its parameters so that the generated node embedding vectors are optimized not only at the data level but also physically compliant. Ultimately, the model outputs a physical vulnerability embedding vector for each node in the power grid. The position and orientation of this vector in high-dimensional space comprehensively characterize the node's ability to withstand external power surges under its current operating state.

[0033] Step S4: Perform cross-domain "decision-physical" risk simulation and quiet period early warning. For example... Figure 3As shown, this step utilizes the communication, computation, and mechanical response delays (i.e., the silent period, T_silent) between the issuance of a business instruction (T_0) and the actual completion of the physical action by the terminal device to perform advanced risk estimation. This embodiment constructs a cross-modal physical sensing Transformer prediction model to achieve this function. This model includes an encoder and a decoder. The encoder part adopts a dual-stream heterogeneous architecture: one stream specifically processes the "concurrent impact of business instructions" feature vector sequence generated in step S2, using a one-dimensional temporal convolutional network (TCN) to efficiently extract the dynamic features of the instruction strength evolving over time; the other stream inputs the "physical vulnerability embedding vectors" of each node in the power grid generated in step S3, using graph convolution operations to maintain the spatial structure information of the power grid topology. After feature extraction from the two streams, a "market-physical" interactive attention module is designed. This module calculates the cross-modal attention score matrix between the business instruction feature vector and the physical node vulnerability vector to accurately identify which specific business instruction patterns (such as "high synchronization, high-power discharge") pose the greatest potential threat to which specific vulnerable physical nodes (such as "heavily loaded end transformers"). The decoder receives the high-dimensional features fused by the interactive attention module and performs advanced time-domain simulations based on physical mechanisms. It is no longer a simple classification or numerical regression, but rather a regression prediction of the voltage transient trajectory of key nodes, the rate of change of system frequency (ROCOF), and the power flow curves of key lines within a short time window after command execution (e.g., 0-30 seconds after T_0). During the simulation, a built-in quiet period risk assessment logic is incorporated: if the simulation model predicts that, within the quiet period after command issuance and before most terminal devices actually complete power regulation, the effective voltage value of any key node will fall below the safe operating threshold (e.g., 0.9 times the rated voltage) or the power flow of any line will exceed its short-term thermal stability limit, the system immediately generates a dynamic risk warning signal. The signal is presented in a structured data format (such as JSON), including the precise physical location of the risk (e.g., main transformer No. 3 of XX substation), the risk type (e.g., "transient voltage instability"), the predicted risk severity level, the source business instruction ID that triggered the risk, and preliminary suggested instruction correction strategies (e.g., "suggest reducing total power by 20%" or "suggest delaying response time in batches"). Preferably, the cross-modal physical sensing Transformer prediction model can adopt a Residual Physical Network (Res-PINN) architecture. This architecture explicitly incorporates a physical residual term based on the differential algebraic equations (DAE) of the power system into the model's loss function, in addition to the traditional data fitting loss. This forces the model's output not only to be similar to the training data but also to strictly adhere to fundamental physical laws such as power balance in each step of the deduction, improving the model's robustness and physical interpretability when facing novel operating conditions not present in the training set.

[0034] Step S5: Implement closed-loop adaptive control based on risk feedback. For example... Figure 4 As shown, this step aims to transform early warning information into actual intervention actions, forming a closed-loop management process from risk identification to risk avoidance. Specifically, the dynamic risk early warning signal generated in step S4 is pushed to the virtual power plant management platform or the power grid dispatch automation system in real time. Upon receiving the signal, the system automatically activates the "command circuit breaker and reshaping" mechanism. This mechanism first performs a "circuit breaker" operation, that is, intercepting the high-risk commercial commands originally planned to be issued at the communication layer, preventing them from being further transmitted to the terminal equipment. Subsequently, it enters the "reshaping" stage, where the system modifies the original command based on the risk information and correction strategy suggestions provided in the early warning signal. Furthermore, in order to minimize the impact on the economic interests of market participants while ensuring power grid safety, the command reshaping process adopts a command reconstruction method based on differentiable risk sensitivity that minimizes market losses. This method utilizes the differentiable properties of the cross-modal physical sensing Transformer model constructed in step S4. By backpropagating the model, the gradient of the risk prediction value (such as the predicted minimum voltage) relative to each term in the input feature vector of the commercial command can be calculated. The matrix formed by this gradient is the risk sensitivity matrix, which precisely quantifies the marginal contribution of fine-tuning the command parameters of different terminals (such as adjusting power and response delay time) to reducing overall physical risk. Based on this sensitivity matrix, the system constructs a constrained convex optimization problem: its optimization objective is to minimize the economic loss caused by command modification (i.e., the deviation between the reshaped command and the original command should be as small as possible), and its constraint is that the risk prediction value obtained by inputting the reshaped command into the early warning model must be lower than a preset safety threshold. Through an efficient convex optimization solver, the system can generate a precise correction strategy for specific nodes. For example, it can reduce the power or delay the time of commands only for a few terminal clusters located in the most vulnerable areas of the power grid, rather than uniformly reducing all commands indiscriminately. Finally, the system sends the reshaped commands, which are determined to be safe, to the terminal devices and continuously monitors the actual operating status of the power grid through systems such as SCADA. The observed power grid response data is compared with the model's predicted data, the residual between the two is calculated, and this (original command, actual response, predicted response) is used as a new high-quality training sample for online incremental learning of the early warning model. This mechanism ensures that the early warning model can continuously evolve as the power grid operation mode and market environment change, maintaining high accuracy.

[0035] Example 2

[0036] This embodiment provides a dynamic early warning system for energy and power security. (Refer to...) Figure 2This system serves as the hardware platform for the methods described above and can be deployed on cloud servers or dedicated edge computing devices. Specifically, the system includes:

[0037] The global data perception module 101 is used to execute step S1 in the aforementioned method embodiments. It integrates multiple data interface protocols (such as MQTT and OPC UA) to connect to and collect real-time heterogeneous data from multiple sources, including virtual power plant platforms, power grid SCADA systems, and terminal monitoring units. This module also integrates preprocessing functions such as data cleaning, timestamp alignment, and data interpolation to provide standardized data input for subsequent modules.

[0038] The instruction impact characterization module 102 performs step S2 in the aforementioned method embodiment. It internally deploys the DBSCAN clustering algorithm, the instruction synchronization entropy calculation model, and the LSTM-based user response aggressive index prediction model. This module receives business decision instruction data and power grid topology data, and outputs a "business instruction concurrent impact" feature vector generated for each affected critical physical node.

[0039] The physical vulnerability embedding module 103 is used to execute step S3 in the aforementioned method embodiment. Its core is a pre-trained multi-head graph attention network (GAT) model. This module receives real-time power grid physical state data, uses it as initial features of graph nodes, and dynamically generates physical embedding vectors that characterize the current vulnerability level of each node in the power grid through forward propagation of the model.

[0040] The cross-domain risk extrapolation module 104 is used to execute step S4 in the aforementioned method embodiment. The core of this module is the cross-modal physical sensing Transformer prediction model. It receives the instruction impact feature vector from module 102 and the physical vulnerability embedding vector from module 103, performs advanced time-domain extrapolation during the silent period before instruction execution, and generates a dynamic risk warning signal containing specific risk information based on the built-in risk discrimination logic.

[0041] The closed-loop active defense module 105 executes step S5 in the aforementioned method embodiment. It receives warning signals from module 104 and is responsible for intercepting high-risk instructions. This module incorporates an instruction reconfiguration optimizer based on differentiable risk sensitivity, capable of generating optimal corrected instructions that balance security and economy. Simultaneously, this module is also responsible for issuing the corrected instructions and collecting actual operational data, continuously updating and optimizing the artificial intelligence models in the aforementioned modules through an online incremental learning mechanism.

[0042] To verify the effectiveness of the method and system of this invention, a comparative experiment was conducted on a simulation test platform based on the IEEE 33-node standard distribution network topology. This platform was modified to incorporate large-scale distributed resources aggregated by virtual power plants, with a total regulation capacity accounting for 30% of the regional peak load. The simulation scenario was set to simulate continuous high temperatures in summer, causing drastic fluctuations in the electricity spot market price signal, triggering the virtual power plants to issue large-scale, high-concurrency commercial instructions. The test dataset was generated through this simulation platform and contained 1000 high-risk event samples under different market incentive intensities and initial grid operating modes. In contrast, the traditional method uses a static threshold alarm mechanism based on a SCADA system, which only issues an alarm when the actual measured values ​​of voltage or line power flow at key nodes exceed preset safety limits. This method cannot detect the intent of commercial instructions. Figure 8 As shown, the method of this invention has significant advantages over traditional methods in terms of early warning performance. A comparison is made across four key performance dimensions: In terms of early warning lead time, the method of this invention achieves 15.8 seconds, while the traditional method only achieves 0.3 seconds; in terms of early warning accuracy, the method of this invention achieves 94.5%, a significant improvement over the 78.2% of the traditional method; in terms of false negative rate, the method of this invention has a false negative rate of only 2.8%, significantly lower than the 12.5% ​​of the traditional method; and in terms of false positive rate, the method of this invention has a false positive rate of 4.2%, better than the 8.6% of the traditional method. The above simulation comparison results based on a standard test system and typical high-risk scenarios fully verify the technical advantages of this invention in commercial-physical dual-domain fusion early warning.

[0043] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for energy power safety dynamic early warning, characterized in that, The method comprises the following steps: Step S1, constructing a multi-dimensional heterogeneous market-physical coupling feature space data pool, the data pool comprising business decision instruction data, power grid physical state data, and distributed terminal response feature data; Step S2, generating a business instruction concurrent impact feature vector representing the potential impact of business decision behavior on the power grid physical impact based on the business decision instruction data; Step S3, generating a physical vulnerability embedding vector representing the current power mutation capacity of the physical node in the power grid by constructing a graph neural network model based on the power grid physical state data; Step S4, performing cross-domain risk deduction and silent period early warning, wherein the silent period is defined as the delay window between the time of issuing a business instruction and the time when a physical terminal completes the execution action; this step specifically comprises: constructing a cross-modal prediction model, which receives the business instruction concurrent impact feature vector and the physical vulnerability embedding vector as input; using the model to perform advanced time domain simulation deduction within the silent period to predict the voltage trajectory of the key node and the line flow change curve after the instruction execution; if the deduction predicts that the voltage of any key node deviates from the safe operation threshold or the line flow exceeds the thermal stability limit, a dynamic risk warning signal is generated; Step S5, based on the dynamic risk warning signal, implementing closed-loop adaptive regulation, which includes intercepting and reshaping business instructions determined to be high-risk, and issuing safe instructions after reshaping.

2. The method of claim 1, wherein, In the step S1, the business decision instruction data includes: dispatch instruction type, instruction issue timestamp, target response terminal identity list, market price signal, and expected total regulation power; the power grid physical state data includes: real-time topology structure of the distribution network, real-time electrical quantity of the key physical node, rated capacity of the equipment, and thermal stability limit; the distributed terminal response feature data includes: geographic information system coordinates of the response terminal, electrical access point, real-time state of charge, and maximum adjustable power range.

3. The method of claim 2, wherein, In the step S2, the process of generating the business instruction concurrent impact feature vector comprises: Based on the target response terminal identity list and the real-time topology structure, the physical locations of the response terminals are clustered using a density-based spatial clustering algorithm to establish a mapping relationship between business instructions and physical nodes; The instruction synchronization entropy within each terminal cluster is calculated to quantify the concentration of instruction time; The high-order fluctuation features of the market price signal are extracted in combination with a user behavior prediction model based on a long short-term memory network, and a response aggressiveness index reflecting the probability of user full-power regulation execution is deduced; The spatial clustering results, the instruction synchronization entropy, and the response aggressiveness index are fused to generate the business instruction concurrent impact feature vector.

4. The method of claim 3, wherein, In calculating the instruction synchronization entropy, a communication network time delay distribution factor is further introduced, a Gaussian mixture model is used to fit the instruction reception time delay probability density function of the terminal, and it is superimposed with the expected execution time of the instruction to construct an equivalent concurrent power curve.

5. The method of claim 1, wherein, The graph neural network model in the step S3 is a multi-head graph attention network; when constructing the multi-head graph attention network, a physical constraint mask mechanism is introduced, and Kirchhoff's current law, Kirchhoff's voltage law and device thermal stability limit are taken as physical laws and converted into regularization penalty terms in the loss function of the multi-head graph attention network model.

6. The method of claim 5, wherein, In combination with the domain knowledge graph technology, a heterogeneous knowledge graph containing multiple relationships of market subjects, geographical locations, physical devices and electrical properties is constructed, and the entity relationships in the heterogeneous knowledge graph are mapped into vectors by using a knowledge graph embedding algorithm and then embedded into the initialization weights of the multi-head graph attention network.

7. The method of claim 1, wherein, The cross-modal prediction model in the step S4 is a cross-modal physical perception Transformer prediction model, which includes an encoder and a decoder of a double-flow heterogeneous architecture; the encoder is used to process the commercial instruction concurrent impact feature vector sequence and the physical vulnerability embedding vector, and a market-physical interaction attention module is set to realize feature fusion; the cross-modal physical perception Transformer prediction model adopts a residual physical network architecture, and a physical residual term based on a differential algebraic equation of a power system is added in the loss function of the cross-modal physical perception Transformer prediction model.

8. The method of claim 1, wherein, In the step S5, the closed-loop adaptive regulation specifically includes: an instruction fuse and remolding mechanism is activated, which first intercepts original commercial instructions; secondly, the original commercial instructions are remolded by the following steps: by using the differentiable characteristics of the cross-modal prediction model, the gradient of the risk prediction value with respect to the commercial instruction input vector is calculated by using a back propagation algorithm to obtain a risk sensitivity matrix; based on the risk sensitivity matrix, a convex optimization problem is constructed and solved, in which the objective function is to minimize the economic loss caused by instruction modification, and the constraint condition is that the risk prediction value of the remolded instruction is lower than a preset safety threshold, so as to generate a remolded safety instruction; and after the remolded safety instruction is issued, the actual response of the power grid is continuously monitored, the actual operation data are compared with the deduced predicted data, the residual error is calculated, and the residual error is taken as a new sample to perform online incremental learning on the cross-modal prediction model.

9. An energy power safety dynamic early warning system, characterized in that, It includes: a global data perception module for constructing a multi-dimensional heterogeneous market-physical coupling feature space data pool, the data pool including commercial decision instruction data, power grid physical state data and distributed terminal response feature data; an instruction impact feature module for generating a commercial instruction concurrent impact feature vector representing the impact potential of commercial decision behavior on the power grid physics based on the commercial decision instruction data; a physical vulnerability embedding module for generating a physical vulnerability embedding vector representing the current power mutation bearing capacity of a physical node in the power grid by constructing a graph neural network model based on the power grid physical state data; a cross-domain risk deduction module configured to construct a cross-modal prediction model receiving the business instruction and the impact feature vector and the physical vulnerability embedding vector as inputs, and using the model to perform a forward time-domain simulation deduction to regress a voltage trajectory and a line power flow curve of a key node after the instruction execution within a silence period defined by a delay window between a time when the business instruction is issued and a time when the physical terminal completes the execution action, and generate a dynamic risk warning signal if the deduction predicts that the voltage of any key node deviates from a safe operation threshold or the line power flow exceeds a thermal stability limit; a closed-loop active defense module configured to implement a closed-loop adaptive regulation based on the dynamic risk warning signal, the regulation including intercepting and reshaping the business instruction determined as high risk, and issuing a safe instruction after the reshaping. 10.A computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to implement the method of any one of claims 1-8.