Method and system for power information physical system node risk assessment based on cross-domain trusted sample enhancement

CN122905441APending Publication Date: 2026-10-13INNER MONGOLIA UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

[0004]但是上述方法在生成跨域风险样本时,主要关注样本的数量是否足够多,但生成的样本内部各变量之间的传播顺序和因果关系往往不符合实际情况

Benefits of technology

第一,通过构建分阶段生成对抗网络,按照信息域到控制域再到物理域的顺序分阶段生成跨域生成样本,使生成样本中的各变量之间保持了与实际风险传播过程一致的先后顺序和因果关系,避免了因跨域传播逻辑错乱导致模型学习到错误传播规律的问题,从而提升了风险评估模型输出结果的准确度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122905441A_ABST
    Figure CN122905441A_ABST
Patent Text Reader

Abstract

The application relates to a power information physical system node risk assessment method and system based on cross-domain trusted sample enhancement, real samples are constructed by acquiring cross-domain operation data; a stage-by-stage generative adversarial network is constructed, cross-domain generated samples are generated in the order of an information domain, a control domain and a physical domain; a diffusion enhancement discriminator is constructed for adversarial training; a physical consistency constraint is introduced, trusted risk enhancement samples are obtained after soft constraint training and hard constraint screening and correction; a multi-domain heterogeneous graph is constructed based on the real samples and the trusted risk enhancement samples, and a local-global heterogeneous neural network is used to output risk scores and risk determination results of each node; the cross-domain sample propagation logic consistency can be maintained, fine risk assessment of multiple types of nodes can be realized, and a decision basis for key risk node positioning is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of security risk assessment technology for power cyber-physical systems, and in particular to a method and system for risk assessment of nodes in power cyber-physical systems based on cross-domain trusted sample enhancement. Background Technology

[0002] With the advancement of the "dual-carbon" target and the large-scale integration of new energy sources, the new power system is gradually evolving from a traditional single physical network into a power cyber-physical system formed by the coupling of information, control, and physical domains. While improving operational flexibility, this type of system also creates closer cross-domain correlations between network attacks, communication anomalies, control failures, and physical faults, bringing new challenges to system security risk assessment.

[0003] Existing power system risk assessment technologies mainly include traditional model-driven methods and data-driven methods. Traditional model-driven methods perform risk analysis based on power system physical models and fault probabilities; data-driven methods utilize machine learning, deep learning, and graph neural networks to learn risk patterns from operational data. In the context of power cyber-physical systems, the objects of risk assessment have gradually expanded from single physical faults to cross-domain coupled risks. Related research constructs cross-domain risk samples through simulation platforms and expands training data using data augmentation methods such as generative adversarial networks and diffusion models.

[0004] However, the methods described above primarily focus on the quantity of samples when generating cross-domain risk samples, but the propagation order and causal relationships between variables within the generated samples often do not reflect reality. For example, when an anomaly occurs in the information domain, the control domain should change first, leading to a change in the physical domain. However, samples generated by existing methods may skip this intermediate step, resulting in samples appearing as a disordered data set. When such samples are used to train a risk assessment model, the model learns incorrect risk propagation logic, leading to low accuracy in the model's output data. Furthermore, existing methods typically only provide a risk assessment result for the entire system or scenario, such as "the system currently has a high risk," but cannot specify "which communication equipment is most dangerous," "which controller is most prone to failure," or "which bus requires the most attention." In actual power grid operation and maintenance, personnel need to know which specific nodes require priority handling, but existing methods cannot provide specific fault node information. Moreover, the generation of cross-domain risk samples and risk assessment are usually conducted separately, so the generated cross-domain risk samples cannot be directly used for training subsequent risk assessment models. This results in low accuracy in power system risk assessment and difficulty in locating key risk nodes. Summary of the Invention

[0005] In view of this, in order to at least partially improve the above problems, this application provides a method, system and computer device for risk assessment of nodes in a power cyber-physical system based on cross-domain trusted sample enhancement.

[0006] Firstly, this application provides a method for risk assessment of nodes in a power cyber-physical system based on cross-domain trusted sample enhancement, including: Acquire cross-domain operation data of the power information physical system, and construct real samples based on the cross-domain operation data, wherein the cross-domain operation data includes condition variables, information domain state variables, control domain state variables and physical domain state variables; Construct a phased generative adversarial network to generate cross-domain generated samples; A diffusion enhancement discriminator is constructed, and forward diffusion perturbation at different diffusion time steps is applied to the real sample and the cross-domain generated sample to obtain the corresponding perturbated samples. The perturbated sample and the corresponding diffusion time step are input together into the diffusion enhancement discriminator, and the diffusion enhancement discriminator is used to perform adversarial training with the staged generative adversarial network. During adversarial training, the degree of violation of physical consistency constraints is added as a penalty to the loss function of the generator of the phased generative adversarial network. After the adversarial training is completed, the cross-domain generated samples are subjected to hard constraint screening and correction to obtain credible risk enhanced samples. Based on the real samples and the credible risk enhancement samples, a multi-domain heterogeneous graph of the power information physical system is constructed based on nodes, edges and node-edge relationships. The node types in the multi-domain heterogeneous graph include information nodes, control nodes and physical nodes, and the edge types include communication edges within the information domain, cross-domain dependency edges from information nodes to control nodes, control action edges from control nodes to physical nodes and electrical topology edges within the physical domain. The multi-domain heterogeneous graph is subjected to node-level risk assessment based on a local-global heterogeneous neural network, and the risk score and risk determination result of each node are output. The method further includes: Based on the risk score and risk assessment results, the target node is determined; In response to the target node risk zeroing instruction, the risk score of the target node is forcibly set to zero, and then the step of performing node-level risk assessment on the multi-domain heterogeneous graph based on the local-global heterogeneous neural network is re-executed, outputting the updated risk score of each node and the global risk change after intervention.

[0007] This application also provides a power cyber-physical system node risk assessment system based on cross-domain trusted sample enhancement, the system being used to implement the above-described method, including: The data acquisition module is used to acquire cross-domain operation data of the power information physical system and construct real samples based on the cross-domain operation data. The cross-domain operation data includes condition variables, information domain state variables, control domain state variables and physical domain state variables. A cross-domain trusted risk sample enhancement module is used to construct a phased generative adversarial network to generate cross-domain generated samples. A diffusion enhancement discriminator is constructed to apply forward diffusion perturbations at different diffusion time steps to the real samples and the cross-domain generated samples and to conduct adversarial training. During the adversarial training, the degree of violation of physical consistency constraints is added as a penalty term to the loss function of the generator of the phased generative adversarial network. After the adversarial training is completed, the cross-domain generated samples are subjected to hard constraint screening and correction to obtain trusted risk enhanced samples. A multi-domain heterogeneous graph construction module is used to construct a multi-domain heterogeneous graph of the power information physical system based on the real samples and the trusted risk enhancement samples, and based on nodes, edges and node-edge relationships. The node types in the multi-domain heterogeneous graph include information nodes, control nodes and physical nodes, and the edge types include communication edges within the information domain, cross-domain dependency edges from information nodes to control nodes, control action edges from control nodes to physical nodes and electrical topology edges within the physical domain. The risk assessment module is used to perform node-level risk assessment on the multi-domain heterogeneous graph based on a local-global heterogeneous neural network, and output the risk score and risk determination result for each node; The counterfactual reasoning module is used to determine the target node based on the risk scores and risk judgment results of each node output by the risk assessment module. In response to the input target node risk zeroing command, the risk score of the target node is forcibly set to zero, triggering the risk assessment module to re-execute the node-level risk assessment, and outputting the updated risk scores of each node and the global risk change after intervention.

[0008] The beneficial effects of this application are: First, by constructing a phased generative adversarial network, cross-domain generated samples are generated in stages according to the order from the information domain to the control domain and then to the physical domain. This ensures that the variables in the generated samples maintain the same chronological order and causal relationship as the actual risk propagation process, avoiding the problem of the model learning incorrect propagation rules due to disordered cross-domain propagation logic, thereby improving the accuracy of the risk assessment model's output results.

[0009] Second, a multi-domain heterogeneous graph containing information nodes, control nodes, and physical nodes is constructed based on real samples and credible risk-enhanced samples. The risk score and risk assessment result of each node are output through a local-global heterogeneous neural network, which can give the specific risk situation of each information node, control node, and physical node. This solves the problem that existing methods can only give the overall risk assessment of the system level but cannot locate specific risk nodes, and provides fault node information that can be directly referenced for power grid operation and maintenance.

[0010] Third, cross-domain risk sample enhancement and node-level risk assessment are placed in the same technical link. The credible risk enhancement samples generated by the phased generative adversarial network and physical consistency constraints are directly used for the training of the subsequent local-global heterogeneous neural network. This forms an effective connection between sample generation and risk assessment, avoiding the problem that the samples cannot be effectively used for model training due to their independence. This improves the accuracy of power system risk assessment and the ability to locate key risk nodes. Attached Figure Description

[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 This is a flowchart illustrating a method for risk assessment of power cyber-physical system nodes based on cross-domain trusted sample enhancement, according to an embodiment of this application.

[0012] Figure 2 This is a schematic diagram of the structure of a power cyber-physical system node risk assessment system based on cross-domain trusted sample enhancement, according to an embodiment of this application. Detailed Implementation

[0013] The terms "first," "second," and "third," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, is intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or modules is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other steps or modules inherent to these processes, methods, products, or apparatuses.

[0014] Please see Figure 1-2One embodiment of this application provides a method for risk assessment of nodes in a power cyber-physical system based on cross-domain trusted sample enhancement. This method is applied to a power cyber-physical system and includes: S1. Obtain cross-domain operation data of the power information physical system, and construct a real sample based on the cross-domain operation data, wherein the cross-domain operation data includes condition variables, information domain state variables, control domain state variables and physical domain state variables; Specifically, condition variables may include attack type, attack intensity, proportion of new energy sources, system inertia, reserve capacity, and load level; information domain state variables may include communication packet loss rate, communication latency, and measurement information freshness, where measurement information freshness characterizes the latency or effectiveness of measurement data from acquisition to control decision use; control domain state variables may include control effectiveness, target achievability, and equipment tripping status; physical domain state variables may include system frequency, minimum bus voltage, and load reduction ratio. Let the condition variables be: c = [c1, c2, ..., c m The information domain state variable is: x I The control domain state variable is: x C The physical domain state variable is: x P And preset random noise, namely: first random noise z I The second random noise z C The third random noise z P .

[0015] S2. Construct a phased generative adversarial network to generate cross-domain generated samples, wherein the phased generative adversarial network includes multiple cascaded generators for generating cross-domain generated samples in the order of information domain to control domain to physical domain. S3. Construct a diffusion enhancement discriminator, apply forward diffusion perturbation at different diffusion time steps to the real sample and the cross-domain generated sample respectively, and obtain the corresponding perturbated samples respectively. S4. Input the perturbed sample and the corresponding diffusion time step into the diffusion enhancement discriminator, and perform adversarial training with the staged generative adversarial network through the diffusion enhancement discriminator. During adversarial training, the degree of violation of physical consistency constraints is added as a penalty to the loss function of the generator of the phased generative adversarial network. After the adversarial training is completed, the cross-domain generated samples are subjected to hard constraint screening and correction to obtain credible risk enhanced samples. S5. Based on the real samples and the trusted risk enhancement samples, construct a multi-domain heterogeneous graph of the power information physical system based on nodes, edges and node-edge relationships. The node types in the multi-domain heterogeneous graph include information nodes, control nodes and physical nodes, and the edge types include communication edges within the information domain, cross-domain dependency edges from information nodes to control nodes, control action edges from control nodes to physical nodes and electrical topology edges within the physical domain. S6. Perform node-level risk assessment on the multi-domain heterogeneous graph based on a local-global heterogeneous neural network, and output the risk score and risk determination result for each node.

[0016] As mentioned above, the existing power cyber-physical systems are becoming increasingly complex, evolving from a single physical network into a structure formed by the coupling of information, control, and physical domains. The information domain refers to the network layer, consisting of communication networks, information acquisition and transmission equipment, used for system status monitoring, data acquisition, and control command issuance. The control domain refers to the decision-making and execution layer, consisting of controllers, actuators, and protection devices, used for making decisions and issuing control commands based on data transmitted from the information domain. The physical domain refers to the physical equipment layer, consisting of buses, lines, loads, and generation units, used for executing control commands and transmitting and distributing electrical energy. In real-world system applications, risks propagate through the information domain-control domain-physical domain relationship; that is, risks begin with disturbances in the information domain, then exert control over the physical domain via the control domain, ultimately manifesting in the physical domain as frequency drops, voltage overruns, or load reductions.

[0017] In real-world system applications, network attacks or communication anomalies in the information domain can lead to erroneous commands or execution failures in the control domain. This ultimately manifests in the physical domain as frequency drops, voltage overruns, or load reductions. Because high-risk fault cases are relatively rare in actual power grids, and cross-domain cascading faults occur infrequently, the number of medium- and high-risk samples is limited. Although training samples exist, these are typically generated by simulation platforms or randomly generated using deep generative models such as traditional generative adversarial networks (GANs). Therefore, they do not follow the propagation path from the information domain to the control domain and then to the physical domain, rendering them unreliable. Consequently, the evaluation results fail to reflect the true state of the system. Furthermore, current system evaluation methods can only calculate the probability of risk occurring in the entire system, but cannot pinpoint the specific node causing the problem. This also results in low granularity and inaccurate evaluation results.

[0018] Based on this, this embodiment first acquires the cross-domain operation data of the system and constructs real samples based on this data. Then, a phased generative adversarial network (GAN) is constructed to generate cross-domain generated samples. This phased GAN includes multiple cascaded generators that, based on preset random noise and conditional variables in the cross-domain operation data, sequentially generate information domain disturbance states, control domain degradation states, and physical domain risk consequences, thereby obtaining cross-domain generated samples. Through this phased generation method, the generators can establish conditional dependencies between variables in the order from the information domain to the control domain and then to the physical domain. This avoids the weakening of cross-domain propagation relationships caused by simply splicing together variables from different domains and generating them uniformly, making the cross-domain generated samples structurally more consistent with the risk transmission process in the power information physical system.

[0019] However, relying solely on phased generation in terms of structure is insufficient to guarantee that samples can adequately cover medium- and high-risk scenarios. Therefore, this embodiment further constructs a diffusion enhancement discriminator, applying forward diffusion perturbations at different diffusion time steps to both real samples and cross-domain generated samples, obtaining perturbed samples. These perturbed samples and their corresponding diffusion time steps are then input into the diffusion enhancement discriminator. Through adversarial training between the generator and the diffusion enhancement discriminator, the generator gradually adjusts its generation results, making the cross-domain generated samples closely resemble real risk samples in terms of distribution characteristics, cross-domain propagation relationships, and risk patterns, thereby improving the coverage of medium- and high-risk scenarios.

[0020] To ensure that cross-domain generated samples can be used for subsequent node-level risk assessment training during adversarial training, this embodiment further introduces physical consistency constraints, including operational boundary constraints, cross-domain monotonic relationship constraints, and physical consequence consistency constraints. The degree of violation of these physical consistency constraints is added as a penalty to the loss function of the generator in the staged generative adversarial network. After adversarial training, the cross-domain generated samples are subjected to hard constraint screening and correction to obtain credible risk enhancement samples. In this way, the credible risk enhancement samples cover medium-to-high risk scenarios while maintaining the propagation relationship between the information domain, control domain, and physical domain, and can serve as the training data foundation for subsequent node-level risk assessment.

[0021] After obtaining credible risk enhancement samples, a multi-domain heterogeneous graph of the power cyber-physical system is constructed based on nodes, edges, and node-edge relationships. A node-level risk assessment is then performed on this multi-domain heterogeneous graph using a local-global heterogeneous neural network, outputting the risk score and risk determination result for each node. This enables refined risk assessment of multiple node types and effectively locates key risk nodes, providing a basis for decision-making regarding system risk prevention and hardening.

[0022] Furthermore, since in actual operation and maintenance, operators not only need to understand the current risk status of each node, but also need to assess the changes in the overall system risk after intervening in specific risk nodes, this embodiment also includes the following after step S6: S7. Based on the risk score and risk assessment result, determine the target node; in response to the target node risk zeroing instruction, forcibly set the risk score of the target node to zero, and return to the step of performing node-level risk assessment of the multi-domain heterogeneous graph based on the local-global heterogeneous neural network to be re-executed, and output the updated risk score of each node and the global risk change after intervention.

[0023] As described above, step S7 extends risk assessment from static risk status diagnosis to dynamic risk intervention effect deduction. Based on the current assessment results, it can quantify the change in risk score of each node and the overall risk change after the risk of any target node is reduced to zero. This helps operations personnel identify the critical nodes with the greatest impact on the overall system risk, providing a quantitative basis for resource allocation and reinforcement priority ranking in risk prevention and control. Simultaneously, this step can help determine whether eliminating the risk of a certain node will cause the emergence of new high-risk nodes, thus enabling the assessment of whether new high-risk nodes appear after intervention and preventing risk transfer to other nodes due to local intervention.

[0024] In one embodiment, step S2, which involves constructing a staged generative adversarial network to generate cross-domain generated samples, includes: S21. Construct a staged generative adversarial network comprising a cascaded first generator, a second generator, and a third generator, and input the condition variable and a preset first random noise into the first generator to generate an information domain perturbation state. S22. Input the condition variable, the information domain perturbation state, and the preset second random noise into the second generator to generate the control domain degradation state; S23. Input the condition variable, the information domain perturbation state, the control domain degradation state, and the preset third random noise into the third generator to generate physical domain risk consequences. Then, merge the information domain perturbation state, the control domain degradation state, and the physical domain risk consequences to obtain cross-domain generated samples.

[0025] As described above, the aforementioned phased generative adversarial network contains three cascaded generators. These three generators are connected in sequence according to the order of "information domain perturbation generation, control domain degradation generation, and physical domain consequence generation," forming an explicit modeling structure for a cross-domain risk propagation chain.

[0026] Specifically, the first generator G I The inputs are the condition variable c and the preset first random noise z. IWherein, the condition variable c is in vector form and is used to constrain the generation process. Specifically, it may include, but is not limited to, the following parameters: attack type, attack intensity, proportion of new energy sources, system inertia, reserve capacity, and load level. The first random noise z I The noise vector is sampled from a standard normal distribution, and its dimension can be preset according to the actual application scenario. The first generator G... I The output is the information domain perturbation state, and its calculation formula is: ; in, The generated information domain state variable vector, i.e., the information domain perturbation state, has specific dimensions that correspond to the information domain state variable x in the real sample. I To maintain consistency, the information domain state variable x I This may include communication packet loss rate, communication latency, and measurement information freshness, where measurement information freshness is used to characterize the latency or effectiveness of measurement data from acquisition to use in control decisions.

[0027] Second generator G C The inputs are the condition variable c and the information domain perturbation state. and the preset second random noise z C The second random noise z C Similarly, the noise vector is sampled from a standard normal distribution. The second generator G... C The output is the degenerate state of the control domain. The calculation formula is as follows: = ; in, The generated control domain state variable vector, i.e., the control domain degenerate state, has the same dimensions as the control domain state variable x in the real sample. C Maintain consistency. Control domain state variables can include control effectiveness, target reachability, and equipment tripping status. Through the above design, the second generator G... C When generating the degenerate state of the control domain, the influence of the condition variable c is considered, as well as the disturbance states that have already occurred in the information domain. This establishes a conditional dependency relationship between information domain perturbation and control domain degradation, making the generated control domain degradation state logically dependent on the information domain perturbation state.

[0028] Third generator G P The inputs are the condition variable c and the information domain perturbation state. Degenerate state of control domain and the preset third random noise z P The third random noise z P Similarly, the noise vector is sampled from a standard normal distribution. The second generator G...C The output is the physical domain risk consequences. The calculation formula is as follows: ;

[0029] in, The generated physical domain state variable vector has the same dimensions as the physical domain state variable x in the real sample. P Maintain consistency. Physical domain state variables may include system frequency, minimum bus voltage, and load shedding ratio. Through the above design, the third generator G... P When generating the physical domain risk consequences, both the condition variable c and the information domain perturbation state are considered. and control domain degradation state This establishes a complete conditional dependency chain: information domain disturbance → control domain degradation → physical domain consequences.

[0030] The outputs of the three generators are then combined, i.e. ,in, This is used to generate cross-domain samples for the final result.

[0031] In the phased generative adversarial network (GAN) training process, three generators participate in adversarial training together. Specifically, the first generator G... I Second generator G C and the third generator G P The outputs of each generator collectively constitute a cross-domain generated sample, which serves as the input to the diffusion enhancement discriminator and is compared with the real sample. The generator parameters are updated using a backpropagation algorithm, based on the true / false discrimination result of the diffusion enhancement discriminator output and the loss function of the physical consistency constraint. The parameter updates of each generator can be performed independently or jointly, depending on the actual training strategy.

[0032] In a preferred embodiment, the first generator G I Second generator G C and the third generator G P All generators employ a multilayer perceptron (MLP) architecture, with each generator containing an input layer, several hidden layers, and an output layer. The number of hidden layers and the number of neurons per layer are preset according to the actual application scenario, typically ranging from 2 to 6 layers, and the number of neurons per layer ranging from 128 to 512. The ReLU activation function is used for each generator, while the output layer selects an appropriate activation function (such as Sigmoid, Tanh, or a linear activation function) based on the range of the variable's value. Further, the first random noise z... I The second random noise z C The third random noise z PThe dimension is set to 128, the number of hidden layers in each generator is set to 4, and the number of neurons in each layer is set to 256. These parameters can be flexibly adjusted according to the actual application scenario; this embodiment does not impose any limitations. Furthermore, the condition variable c is extracted from real samples to constrain the specific scenario of the generated samples, ensuring that the generated cross-domain samples are comparable to real samples under the same condition variable.

[0033] In existing technologies, all variables are typically generated as a whole, ignoring the cross-domain propagation order and causal relationships between variables. This results in a lack of structural conditional dependencies between variables in the information domain, control domain, and physical domain in the generated samples, and the samples may not conform to the actual risk transmission process in terms of propagation logic. In contrast, this embodiment uses three cascaded generators to ensure that the generation process strictly follows the cross-domain risk propagation order of information domain → control domain → physical domain, so that the generated cross-domain samples have structural consistency in cross-domain propagation logic.

[0034] In one embodiment, the output of the third generator is provided with a physical operator layer, which has a built-in differentiable power system physical algebraic equation solving module. The solving process of the physical algebraic equation solving module is compatible with the training process of the staged generative adversarial network, so that the solution result of the physical algebraic equation solving module can participate in the gradient backpropagation of the loss function. The physical domain risk consequences output by the third generator are used as input parameters for the physical algebra equation solving module. After being solved by the physical algebra equation solving module, the final physical domain state that satisfies the physical laws is output. The final physical domain state is used as the physical domain risk consequences in the cross-domain generated sample.

[0035] As mentioned above, in actual power systems, the operating states of the physical domain (such as frequency, voltage, and power flow distribution) must strictly adhere to physical laws, such as Kirchhoff's laws, power flow equations, and frequency dynamic equations. However, when the aforementioned third generator directly generates physical domain risk consequences through a neural network, its output is only constrained by the training data distribution and the loss function, and does not directly satisfy the constraints of physical laws. Therefore, the neural network may generate physical domain states that do not conform to physical laws, such as a frequency of 45Hz but the system has not collapsed, or a bus voltage of 0.8 pu but the power flow has converged. Although such samples are statistically close to real samples, they are unreliable in engineering and cannot be directly used for training subsequent risk assessment models.

[0036] Based on this, this embodiment adds a physical operator layer at the output of the third generator to constrain the initial physical domain risk consequences generated by the third generator within the range allowed by physical laws, ensuring that they satisfy the physical operating laws of the power system. The physical operator layer has a built-in module for solving differentiable physical algebraic equations of the power system. This module accepts the physical domain risk consequences output by the third generator. As input parameters, perform the following operations: First, construct the physical algebraic equations. Based on the type of physical domain variables to be solved, select the corresponding physical algebraic equation. This includes, but is not limited to, power flow equations, frequency dynamic equations, and voltage stability equations. For scenarios requiring output of bus voltage magnitude and phase angle, the physical algebraic equation solving module can select power flow equations, with the following formula:

[0037] Among them, P i Q represents the amount of active power injected at node i. i V represents the amount of reactive power injected at node i. i V represents the voltage magnitude at node i. j θ represents the voltage magnitude at node j. ij G represents the voltage phase angle difference between node i and node j. ij B represents the conductance corresponding to the nodal admittance matrix. ij This represents the susceptance corresponding to the node admittance matrix, where N is the total number of nodes in the system.

[0038] For scenarios requiring output of the system frequency in a dynamic response, the physical algebraic equation solving module uses the following frequency dynamic equation:

[0039] Where f is the system frequency; H is the system inertia constant; This represents the change in mechanical power. This represents the change in electromagnetic power.

[0040] For scenarios requiring output voltage stability metrics, the physical algebraic equation solving module uses the following voltage stability equation:

[0041] Where V is the bus voltage; C is the capacitance parameter; I is the injection current; I load This is the load current.

[0042] Secondly, the physical domain risk consequences output by the third generator are used as input parameters for the equations. These consequences may include, but are not limited to, system frequency values, bus voltage amplitudes, and load shedding ratios. These output values ​​are not directly used as the final physical domain state, but rather as variables to be solved in the physical algebraic equations, or are substituted into the equations and solved to obtain the final physical domain state that satisfies the physical constraints. For example, when the third generator outputs a set of bus voltage amplitudes and phase angles, the physical operator layer substitutes them into the power flow equations for solving, obtaining the final voltage amplitudes and phase angles that satisfy the power balance equations through iterative calculations. When the power flow equations fail to converge, it indicates that the initial physical domain state output by the third generator violates physical laws. In this case, the physical operator layer adjusts the output through differentiable operations to converge the output to a physically feasible solution.

[0043] To enable the solution process of physical algebraic equations to participate in the training process of the phased generative adversarial network (i.e., to participate in the gradient backpropagation of the loss function), this embodiment adopts the following method to achieve the differentiability of the physical algebraic equation solution module: For nonlinear algebraic equations such as power flow equations, the Newton-Raphson method can be used for iterative solutions. Each iteration of the Newton-Raphson method can be regarded as a differentiable linear operation layer, and the entire iterative process constitutes a differentiable composite function. Therefore, the gradient can be calculated using the chain rule and participate in backpropagation. The iteration stops when the magnitude of the residual vector is less than the preset convergence tolerance, and the final physical domain state that satisfies the physical laws is output.

[0044] For some physical algebraic equations, the equations can be directly constructed as implicitly differentiable equations, i.e., F(x,y)=0; where y is the third generator G. P The output is the initial physical domain state, and x is the final physical domain state output after solving the physical operator layer. The gradient of x with respect to y is calculated through implicit differentiation, allowing the gradient to propagate back from the loss function to the third generator through the physical operator layer. In this embodiment, the above calculation can be implemented using the automatic differentiation mechanism in a differentiable programming framework or a custom implicit differentiation layer.

[0045] As an example, the processing flow of the physical operator layer is as follows: Step 1: Obtain the third generator G P Output physical domain risk consequences .

[0046] Step 2: This serves as the input parameter for the physical algebraic equation solving module. The specific physical algebraic equation can be preset or dynamically selected based on the application scenario. For example, when... When bus voltage and load data are included, select the power flow equation; when... When the system includes system frequency and power imbalance, the frequency dynamic equation is selected.

[0047] Step 3: Solve the equations using the physical algebra module to obtain the final physical domain state that satisfies the physical laws. .

[0048] Step 4: As a consequence of physical domain risk in cross-domain generated samples, it is used for subsequent discrimination by the diffusion-enhanced discriminator and for calculating physical consistency constraints. After the loss function is calculated, the gradient is backpropagated sequentially through the physical operator layer, the third generator, the second generator, and the first generator, updating the parameters of each generator. Since the physical algebraic equation solving module is differentiable, the gradient can smoothly propagate from the output to the input, enabling the physical operator layer to not only constrain the physical domain state during the inference phase but also guide the generator to adjust its output through gradient feedback during the training phase, gradually bringing the initial physical domain state it generates closer to a physically feasible solution.

[0049] In a preferred embodiment, the physical algebraic equation solving module uses the Newton-Raphson method to solve the power flow equations as the default physical algebraic equations, with the number of iterations preset to 10 to 20 and the convergence tolerance set to 1 × 10⁻⁶. -6 When the Newton-Raphson method fails to converge within a preset number of iterations, the physical operator layer will output zero gradient or impose a large physical consistency penalty to force the third generator to adjust its output. The physical algebraic equations used by the physical operator layer can be automatically selected based on the variable types output by the third generator. For example, when the output variables include node voltage phase angles, the power flow equation is selected; when the output variables include the system frequency change rate, the frequency dynamic equation is selected. This automatic selection is achieved through a preset mapping table of variable types to physical equation types. Furthermore, the computation process of the physical algebraic equation solving module in the physical operator layer is implemented using a differentiable programming framework (such as PyTorch, TensorFlow, etc.) to ensure that all operations can participate in gradient backpropagation.

[0050] In existing technologies, generative adversarial networks (GANs) typically use the generator's output directly as the final sample without any physical constraint layer. Even if some schemes introduce physical constraints into the loss function (such as the running boundary constraints, cross-domain monotonic relation constraints, and physical consequence consistency constraints mentioned earlier in this embodiment), these physical constraints only act as penalty terms during the training phase, and are called "soft constraints." Such soft constraints cannot guarantee that the samples generated during the inference phase will necessarily satisfy physical laws; they can only statistically reduce the number of samples that violate physical laws, but cannot structurally eliminate samples that violate physical laws. This embodiment upgrades physical constraints from "penalty terms in the loss function" (soft constraints) to "enforcement layers in the network structure" (hard constraints) through a physical operator layer. The physical operator layer is an independent module at the generator output. Regardless of whether it is the training or inference phase, the output of the third generator must be solved by the physical operator layer to satisfy physical laws before it can be used as the final physical domain risk consequence output. Therefore, the physical operator layer fundamentally guarantees the physical consistency of cross-domain generated samples, ensuring that the generated physical domain state is always within the range allowed by physical laws, thus improving the engineering credibility of the generated samples.

[0051] In one embodiment, step S4, which involves constructing a diffusion enhancement discriminator and applying forward diffusion perturbations at different diffusion time steps to the real samples and the cross-domain generated samples to obtain the corresponding perturbated samples, includes: S41. For any sample x0 among the real sample and the cross-domain generated sample, at diffusion time step t, apply a forward diffusion perturbation to sample x0 according to the following formula to obtain the corresponding perturbed sample. : ; in, It is Gaussian noise. The diffusion noise figure is the one that decreases monotonically as the diffusion time step t increases.

[0052] As mentioned above, in order to further improve the coverage of medium- and high-risk scenarios by the generated samples, this embodiment introduces a diffusion enhancement mechanism at the discriminator end to enhance the coverage of real samples. and generate samples Forward perturbations were applied at different diffusion time steps. The perturbed sample x... t Simultaneously input the diffusion time step t into the discriminator: D(x) tThe diffusion time step t is preset to range from 0 to 1000. At low noise scales (e.g., t∈[0,50]), the discriminator learns the fine-grained numerical variation patterns of each variable in the sample; at medium noise scales (e.g., t∈[200,500]), it learns the order and structural relationships between variables in the information domain, control domain, and physical domain; and at high noise scales (e.g., t∈[800,950]), it learns robust discrimination capabilities against noisy samples. Through this multi-scale discriminative training, the generator gradually adjusts the generated results, making the generated samples closely resemble real risk samples in terms of distribution characteristics, cross-domain propagation relationships, and risk patterns.

[0053] In one embodiment, during the training of a phased generative adversarial network, although the phased generation method ensures that the cross-domain generated samples structurally conform to the propagation order of the information domain, control domain, and physical domain, the generator's output may still exceed the physically permissible range (e.g., system frequency exceeding the normal range, load reduction ratio exceeding 100%), or exhibit inconsistencies in the cross-domain propagation logic (e.g., normal communication quality but significantly reduced control effectiveness, severe control failure but almost no impact on the physical domain). While such samples can deceive the discriminator, they are not reliable in engineering and cannot be directly used for training subsequent node-level risk assessment models. Therefore, this embodiment introduces physical consistency constraints, incorporating the degree of violation of these constraints as a penalty term into the generator's loss function (i.e., soft constraints during training), and performs hard constraint screening and correction on the generated cross-domain samples after adversarial training (i.e., hard constraints in post-generation processing). By combining "soft constraints + hard constraints," the final credible risk enhancement samples are ensured to both structurally conform to the cross-domain risk propagation logic and numerically meet the consistency requirements of the power system's physical operating boundaries and physical consequences.

[0054] The physical consistency constraints include operational boundary constraints, cross-domain monotonic relation constraints, and physical consequence consistency constraints.

[0055] The operational boundary constraints are used to limit continuous variables in cross-domain generated samples to a preset physical boundary range. Continuous variables refer to physical quantities or state quantities in the cross-domain generated samples that have a clearly defined physical range of values ​​and can take any intermediate value within that range. For example, continuous variables in different domains are as follows: For the information domain state variables, the communication packet loss rate ranges from [0,1], the communication delay ranges from the preset valid interval, and the measurement of information freshness should be within the preset valid range.

[0056] For the control domain state variable, the control effectiveness range is [0,1], where 0 represents complete failure and 1 represents complete effectiveness; the equipment tripping status is a binary variable, with a value of 0 or 1, where 0 represents no tripping and 1 represents tripping.

[0057] For physical domain state variables, the system frequency range is a preset physical boundary range (e.g., 49.5Hz to 50.5Hz), the bus voltage range is a preset voltage allowable range (e.g., 0.95pu to 1.05pu), and the load shedding ratio ranges from [0,1]. When a continuous variable output by the generator exceeds the above-mentioned preset physical boundary range, the running boundary constraints impose a penalty on the variable, and the penalty amount is proportional to the degree to which it exceeds the boundary.

[0058] Cross-domain monotonicity constraints are used to ensure the consistency of the direction of change of state variables in the information domain, control domain, and physical domain in cross-domain generated samples. This ensures that the risk propagation direction remains consistent across the information, control, and physical domains, preventing situations in the generated samples that do not conform to propagation logic, such as "severe information disturbance but completely normal control state" or "severe control failure but no significant change in physical consequences." Specifically, cross-domain monotonicity constraints require that: as attack intensity increases, the communication packet loss rate should show an upward trend, communication latency should show an increasing trend, and the freshness of measured information should show a downward trend, i.e., the trend of communication quality decline should be enhanced; when communication quality declines, control effectiveness should show a downward trend, and target reachability should decrease, i.e., the trend of control effectiveness decline should be enhanced; when control effectiveness decreases, the physical domain risk consequences (such as frequency deviation, voltage limit exceedance, and load reduction ratio) should show an aggravated trend, i.e., the physical risk consequences should be enhanced. If the generated cross-domain samples exhibit violations of the above monotonicity (e.g., severely reduced control effectiveness but no corresponding increase in physical domain risk consequences), the cross-domain monotonicity constraints will penalize the generator.

[0059] The physical consequence consistency constraint ensures consistency between physical domain outcomes and risk states. Specifically, when a physical domain state variable in a cross-domain generated sample meets a preset high-risk condition, the sample is marked as a high-risk candidate sample. For example, if the system frequency in a cross-domain generated sample is lower than a preset frequency threshold (e.g., 49.2Hz), the bus voltage is lower than a preset voltage threshold (e.g., 0.90 pu), or the load reduction ratio is higher than a preset load reduction threshold (e.g., 10%), the sample is marked as a high-risk candidate sample. The physical consequence consistency constraint requires that the physical domain risk consequences generated by the generator maintain logical consistency with the preset high-risk conditions: when a physical domain state variable does not meet the high-risk condition, it should not be marked as a high-risk candidate sample; when a physical domain state variable meets the high-risk condition, it should be correctly marked as a high-risk candidate sample. The degree of violation of this constraint is quantified by the physical consistency loss term Lphys.

[0060] During the training phase, the degree of violation of the above three physical consistency constraints is added as a penalty term to the generator's loss function. The generator's total loss value is expressed as: ; Among them, L G L represents the total loss value of the generator, indicating the combined loss value of the generator after weighted summation of all loss terms under the current parameters; adv To counteract the loss term, representing the difference in distribution between the cross-domain generated samples and the real samples, is provided by the diffusion-enhanced discriminator, L. bound The boundary loss term represents the degree to which each continuous variable in the cross-domain generated sample exceeds the preset physical boundary range, L. mono L represents the monotonicity loss term corresponding to the cross-domain monotonic relationship constraint, indicating the degree to which variables in the information domain, control domain, and physical domain violate the cross-domain monotonic direction constraint in the cross-domain generated samples. phys The physical consistency loss term, corresponding to the physical consequence consistency constraint, represents the degree of inconsistency between the physical domain risk consequence and the preset high-risk condition in the cross-domain generated sample. Specifically, for each cross-domain generated sample, it is determined whether its physical domain state variables (such as system frequency, bus voltage, load reduction ratio) meet the preset high-risk condition, and whether the sample is correctly marked as a high-risk candidate sample. When a sample meets the preset high-risk condition but is not marked as a high-risk candidate sample, or when a sample does not meet the preset high-risk condition but is incorrectly marked as a high-risk candidate sample, a physical consistency loss is generated. The physical consistency loss term L... phys Cross-entropy loss or hinge loss can be used. λ1, λ2, and λ3 are the weighting coefficients of each loss term, used to adjust the relative importance of the running boundary constraints, cross-domain monotonic relationship constraints, and physical consequence consistency constraints in the total loss. They can be preset according to the actual application scenario.

[0061] In this embodiment, the boundary loss term L bound A boundary penalty function is used to implement this, generating a penalty value when the value of the generated variable exceeds a preset physical boundary. This penalty value is proportional to the distance beyond the boundary. Monotonicity loss term L mono A ranking loss function is used, which generates a penalty value when a pairing of variables in the information domain, control domain, and physical domain violates the cross-domain monotonic direction constraint. The penalty value is proportional to the degree of violation. The adversarial loss term L... adv The discriminant is calculated based on the result of the diffusion enhancement discriminator in judging the authenticity of the perturbed sample. The specific calculation method adopts the standard adversarial loss of the discriminator in the generative adversarial network, which is not limited in this embodiment.

[0062] After adversarial training, although the generated cross-domain samples have undergone soft constraint penalties, soft constraints only guide the generator during training and cannot guarantee that every generated sample strictly satisfies the physical consistency constraints. Therefore, in the post-processing stage, cross-domain generated samples undergo further hard constraint screening and correction, including: For continuous variables that exceed the preset physical boundary range, clip them to the preset physical boundary range; for example, When the generated packet loss rate is 1.2, it is pruned to 1.0; When the load reduction ratio is generated to a value of -0.1, it is reduced to 0.0; When the system frequency generation value is 48.2Hz (lower than the preset lower limit of 49.5Hz), it is clipped to 49.5Hz; When the generated bus voltage value is 1.15pu (higher than the preset upper limit of 1.05pu), it is cut down to 1.05pu.

[0063] Cross-domain generated samples that violate the aforementioned cross-domain monotonic relation constraint are corrected or eliminated according to preset rules, for example, If the attack fails, the cascading depth should not be greater than 0, and the load reduction should not be abnormally high (e.g., greater than 0). In this case, the cascading depth and load reduction of the sample should be corrected to 0, or the sample should be removed directly. If the system crashes (indicated by the system frequency falling below the preset crash threshold or the load reduction ratio exceeding the preset crash threshold), the cascading depth should be no less than 1, and the attack should be successful (indicated by the attack index of the information domain disturbance state exceeding the preset attack success threshold). If the above conditions are not met, the sample should be corrected or removed based on the overall situation. If the number of propagation steps is less than the cascade depth, then the number of propagation steps is corrected to be no less than the cascade depth. For samples that cannot be modified to satisfy the cross-domain monotonic relationship (e.g., samples with severe information domain disturbances but completely normal control state), the samples are directly removed.

[0064] Cross-domain generated samples that meet the pre-defined high-risk conditions in the physical consequence consistency constraint are marked as high-risk candidate samples. These high-risk candidate samples are not used as the final node-level risk assessment results, but rather as the basis for sample selection or label construction during the training of subsequent node-level risk assessment models, guiding the models to focus more on medium- and high-risk scenarios.

[0065] Through soft constraints during the training phase (adding the degree of violation of physical consistency constraints as a penalty to the loss function) and hard constraints during the post-processing phase (pruning of continuous variables, correction or elimination of propagation logic, and screening of high-risk candidate samples), the resulting credible risk enhancement samples possess the following characteristics: all continuous variables are within the preset physical boundary range, and there are no samples that violate the operational boundary constraints; all samples satisfy the cross-domain monotonic relationship constraint, and the direction of variable change is consistent across the information domain, control domain, and physical domain; high-risk candidate samples are correctly labeled, providing a basis for labeling medium- and high-risk samples for subsequent node-level risk assessment model training; the overall samples cover medium- and high-risk scenarios and maintain the propagation relationship between the information domain, control domain, and physical domain, and can be directly used as the training data basis for subsequent node-level risk assessment models.

[0066] In one embodiment, after obtaining credible risk enhancement samples, to achieve multi-type node-level risk assessment of information nodes, control nodes, and physical nodes, this embodiment constructs a multi-domain heterogeneous graph of the power cyber-physical system based on real samples and credible risk enhancement samples. This heterogeneous graph models various entities in the information domain, control domain, and physical domain, and their cross-domain dependencies into a unified heterogeneous graph structure, providing structured input data for subsequent local-global heterogeneous neural networks. The multi-domain heterogeneous graph is represented as G=(V,E,A,R), where V represents the set of nodes, E represents the set of edges, A represents the set of node types, and R represents the set of edge types. Node types include information nodes, control nodes, and physical nodes. Information nodes can represent communication devices, attack targets, or network nodes; control nodes can represent controllers, actuators, or protection devices; physical nodes can represent buses, lines, loads, or generation units. Edge types include communication edges within the information domain, cross-domain dependency edges from information nodes to control nodes, control action edges from control nodes to physical nodes, and electrical topology edges within the physical domain.

[0067] In one embodiment, the local-global heterogeneous neural network includes a domain-specific feature encoding module, a local heterogeneous neighborhood propagation module, an interaction fusion module, and a node-level risk assessment layer; the node-level risk assessment of the multi-domain heterogeneous graph based on the local-global heterogeneous neural network includes: Through the domain-specific feature encoding module, for each current node in the multi-domain heterogeneous graph, the original features of the current node are obtained, and according to the node type of the current node, the original features of the current node are encoded using a feature encoder corresponding to the node type to obtain the initial node representation of the current node. Specifically, for node i, its original feature is x. i The node type is Φ(i). An encoder corresponding to the node type is used to map node features of different dimensions and semantics to a unified representation space: ; in, This represents the feature encoding function corresponding to the node type. This represents the initial hidden layer representation of the node.

[0068] In a preferred embodiment, the information node encoder, control node encoder, and physical node encoder each employ a multilayer perceptron (MLP) structure. Each encoder includes an input layer, several hidden layers, and an output layer. The number of hidden layers ranges from 2 to 4, the number of neurons in each layer ranges from 64 to 256, and the activation function is ReLU. The output dimension of each encoder is preset to a uniform dimension (e.g., 128-dimensional) to ensure that nodes of all types are in the same representation space after encoding. Through domain-specific encoding, the model can preserve the semantic differences between information nodes, control nodes, and physical nodes, avoiding the weakening of the feature meaning of different types of nodes caused by direct uniform mapping. For example, the encoder of the information node can learn the changing patterns of communication packet loss rate and latency, while the encoder of the physical node focuses on the physical laws of electrical characteristics such as frequency and voltage. Both can still maintain their respective semantic information in the unified representation space.

[0069] The local heterogeneous neighborhood propagation module aggregates information about neighboring nodes that are connected to the current node according to different edge types, updates the initial node representation of the current node, and obtains the updated node representation of the current node. Specifically, for propagation at layer l, the representation of node i is updated as follows: ; in, Let be the node representation (vector form) of node i at layer l+1, and W0 be the learnable parameter matrix of the node's own state retention terms. Let be the node representation (vector form) of node i at level l, R be the set of edge types, r be the edge type index, and N be the node representation of node i at level l. r (i) is the set of neighbor nodes connected to node i via edge type r, j is the index of the neighbor node, and W r Let r be the learnable parameter matrix corresponding to edge type r. Let the influence weight of neighbor node j on target node i be defined under edge type r. It is a non-linear activation function (such as ReLU). Let j be the node representation (vector form) of its neighbor node j at level l, where j∈N r (i) represents the summation of the neighboring nodes of node i that are connected to node i through a certain type of edge.

[0070] The above formula means that the representation of node i at level l+1 is determined by the retained terms of its own state. Aggregated information propagated through different types of edges with all neighboring nodes They are jointly constituted. Because the edge types in a multi-domain heterogeneous graph are different (internal communication edges within the information domain, cross-domain dependency edges, control action edges, electrical topology edges), a corresponding parameter matrix W is used for each edge type. r Transformation is performed to differentiate the impact of different propagation paths on the target node. The influence weights are used to measure the contribution of neighbor node information to the target node update when propagating through this edge type. Finally, the updated node representation is obtained after passing through the σ activation function. .

[0071] In a preferred embodiment, the local heterogeneous neighborhood propagation module includes 2 to 4 propagation layers. The choice of the number of propagation layers depends on the maximum propagation distance in the multi-domain heterogeneous graph (i.e., the maximum number of edges that cross-domain risks need to traverse from the information domain to the physical domain in the graph). In this embodiment, the number of propagation layers is preset to 3.

[0072] Through the interactive fusion module, for the current node and each other node in the multi-domain heterogeneous graph, the attention weight between the updated node representation of the current node and the updated node representation of each other node is calculated respectively. The attention weight is multiplied by the corresponding updated node representation of the other node and then summed to obtain the final node risk representation of the current node. Specifically, unlike the local heterogeneous neighborhood propagation module which only focuses on neighboring nodes, the interaction fusion module considers the attention weights between the current node and all other nodes in the graph, thereby capturing risk associations globally. For the current node i, its updated node representation is h. i For each other node j in the multi-domain heterogeneous graph, its updated node representation is h. j Calculate the attention weight e between the current node i and other nodes j. ij :e ij =Attention(h i ,h j Attention weight e ij It reflects the degree of risk impact of node j on node i.

[0073] Final node risk characterization The formula is: ; Here, j∈V represents summing over all nodes j in the multi-domain heterogeneous graph (including non-adjacent nodes), and V represents the set of nodes. This integrates information from all other nodes in the graph, thereby enabling awareness of the global risk context.

[0074] In a preferred embodiment, the weight calculation of the attention module is implemented by scaling dot product attention. After the attention weight is calculated, the updated node representation of the current node is weighted and summed with the updated node representations of all other nodes to obtain the final node risk representation of the current node.

[0075] The final node risk representation of the current node is input into the node-level risk assessment layer, and the risk score and risk determination result of each current node are output through the node-level risk assessment layer.

[0076] Specifically, for the final node risk representation of the current node i, it is input into the node-level risk assessment layer, mapped through a multilayer perceptron (MLP), and outputs the risk score s of the current node i. i : Set a risk assessment threshold τ (e.g., 0.5), when s i When s ≥ τ, node i is determined to be a high-risk node; when s i When the risk level is less than τ, node i is classified as a low-risk node. The risk assessment result can be used for risk ranking of multiple types of nodes and identification of high-risk nodes. During the model training phase, the true high-risk labels of nodes are used as supervision information, and the binary cross-entropy loss function is used to optimize the high-risk prediction probability of nodes so that the risk score output by the model approximates the true risk state.

[0077] In one embodiment, the interaction fusion module is an attention module, which includes a topology-aware cross-attention module and a global cross-domain risk context fusion module. The topology-aware cross-attention module is responsible for integrating the node's topological role information into the node representation, while the global cross-domain risk context fusion module is responsible for capturing the cross-domain risk background between the information domain, control domain, and physical domain from a global perspective. Together, they ensure that the final risk representation of a node simultaneously includes local topological information and global cross-domain risk context.

[0078] In risk assessment of multi-domain heterogeneous graphs, the risk of a node depends not only on its own operational state and the propagation impact of neighboring nodes, but also on its position within the overall topology. For example, a node located at a critical connection between the information and control domains, even if its own state is not obviously abnormal, may trigger a large-scale cross-domain cascading risk if attacked or malfunctioning because it is on a critical channel for cross-domain propagation. Traditional local propagation modules only consider the influence of neighboring nodes and cannot distinguish the differences in the roles of nodes within the topology. To address this, this embodiment introduces a topology-aware cross-attention module, which cross-attention fused the topological structural features of a node with the node representation after local propagation. This enables the model to distinguish between nodes with "abnormal states but weak structural propagation effects" and nodes with "no obvious state changes but located in critical propagation positions," thereby enhancing the ability to identify risk propagation paths and critical risk nodes.

[0079] Specifically, for each current node in a multi-domain heterogeneous graph, its topological features are first obtained. Topological features describe the node's position, connectivity, and importance within the overall topology. In this embodiment, the topological features include, but are not limited to, the following: Node degree: The number of edges directly connected to a node, reflecting the direct connection range of the node in the topology.

[0080] In-degree: The number of edges pointing to this node, reflecting the node's ability to receive information or perform control functions.

[0081] Out-degree: The number of edges originating from this node, reflecting the node's ability to send information or exert control over other nodes. Cross-domain edge count: The number of cross-domain edges connecting this node to nodes in other domains. For example, the cross-domain edge count of an information node refers to the number of edges it connects to the control node, while the cross-domain edge count of a control node refers to the sum of the number of edges it connects to the information node and the physical node. The cross-domain edge count reflects the node's pivotal role in the propagation of cross-domain risks.

[0082] Shortest path distance to the information domain attack source: The shortest path length (in terms of edges) from this node to the nearest information domain attack source node, reflecting the degree to which this node is directly affected by the information domain attack. It should be noted that the "information domain attack source" here refers to the source node in the information domain that may initiate or propagate the attack, and its specific location can be predetermined based on the system topology diagram.

[0083] Shortest path distance to physical critical nodes: The shortest path length from this node to the nearest physical domain critical node (such as an important generator set or load center), reflecting the likelihood that this node will cause significant risks to the physical domain.

[0084] PageRank score: An importance score calculated based on the global link structure of a graph, reflecting the global importance of a node within the entire topology. A higher PageRank score indicates a more important position of the node in the topology.

[0085] Betweenness centrality: The proportion of all shortest paths passing through a node to the total number of shortest paths, reflecting the importance of that node as a bridge for cross-domain propagation. The higher the betweenness centrality of a node, the greater the impact of its failure or anomaly on cross-domain propagation.

[0086] Domain type encoding: A node's domain type identifier (information domain, control domain, or physical domain) used to distinguish the domain to which the node belongs. This information enables the model to identify the domain attributes of a node during cross-domain propagation.

[0087] The acquired topological features are input into a topological encoding function to obtain a topological representation. This topological encoding function can be implemented using a multilayer perceptron (MLP), taking the aforementioned topological feature vector as input and outputting a topological representation vector of uniform dimension to facilitate subsequent cross-attention calculations.

[0088] The updated node representation h of the current node. i The topology representation t of the current node i The input to the topology-aware cross-attention module performs cross-attention operations to obtain node representations after fusing topology information. The formula for cross-attention operation is: = , This is the node representation after incorporating topological information.

[0089] The topology-aware cross-attention module incorporates topological information into node representations, but this information remains limited to the structural role of each node itself. In practical power cyber-physical systems, cross-domain risk propagation is affected not only by the structural position of individual nodes but also by the overall risk context across the information, control, and physical domains. For example, when the information domain as a whole is in a high-risk attack state, even if a physical node is in a normal state, its risk of being affected by cross-domain propagation increases accordingly. To address this, this embodiment further introduces a global cross-domain risk context fusion module to capture the overall risk context of the information, control, and physical domains and write it back to each node representation. Specifically, firstly, the node representations of each node in the information, control, and physical domains after fusing topological information are aggregated at the domain level. For all nodes in the information domain (i.e., all nodes of type information node), their node representations after fusing topological information (i.e., the aforementioned...) are... Perform pooling operations (such as average pooling or max pooling) to obtain the information domain context representation. : For all nodes in the control domain, a pooling operation is performed to obtain the control domain context representation. For all nodes in the physical domain, a pooling operation is performed to obtain the physical domain context representation. : ; where Φ(i) is the type identifier of node i, and I, C, and P represent the information domain, control domain, and physical domain, respectively. The domain-level aggregation operation condenses the information of all nodes in each domain into a global context vector, which represents the overall risk status of the domain in the current cross-domain risk scenario. This represents the final node risk representation of the current node. The above three domain-level context representations are used as cross-domain risk context markers and input into the attention fusion module for cross-domain risk context fusion to obtain the global cross-domain risk context representation g: ; The global cross-domain risk context representation g is written back to the node representation after the fusion topology information of each current node in the multi-domain heterogeneous graph. In this process, the final node risk representation of the current node is obtained. : =Fuse( (g). Through this write-back operation, the final risk representation of each node not only includes its own state, local neighborhood propagation information, and topological role information, but also the global cross-domain risk background between the information domain, control domain, and physical domain in the current scenario, thereby realizing the joint modeling of local risk features and global risk context.

[0090] In one embodiment, the attention module is configured with a causal attention mask matrix to enforce the legal direction and scope of attention interactions during attention computation, ensuring that the model only transmits information along paths conforming to the cross-domain risk propagation chain. Specifically, the causal attention mask matrix is ​​pre-generated based on the physical topology of the multi-domain heterogeneous graph and the cross-domain risk propagation chain. The cross-domain risk propagation chain is a unidirectional causal transmission path of "information domain disturbance → control domain degradation → physical domain consequence," meaning that the information domain state variable is the source of risk propagation, the control domain state variable degrades after being affected by the information domain, and the physical domain state variable produces risk consequences after being acted upon by the control domain. The nodes and edges in the multi-domain heterogeneous graph are constructed based on the physical topology of the actual power information physical system; therefore, the existence of direct connections between each pair of nodes is definite. For pair of nodes without direct connections, their attention interactions have no physical basis and should be prohibited.

[0091] The directionality of attention interactions should be consistent with the aforementioned cross-domain risk propagation chain. Specific rules are as follows: Within the information domain: Information nodes can influence each other through communication paths, thus bidirectional attention interactions are allowed, but only between node pairs with communication edges within the information domain; From the information domain to the control domain: Perturbations of information nodes may cause degradation of the control domain, i.e., information nodes have a causal impact on control nodes. Therefore, attention transfer from information nodes to control nodes is allowed, but attention transfer from control nodes to information nodes is prohibited (because control domain degradation will not cause perturbations in the information domain); From the control domain to the physical domain: Degradation of control nodes may lead to risk consequences in the physical domain, i.e., control nodes have a causal impact on physical nodes. Therefore, attention transfer from control nodes to physical nodes is allowed, but attention transfer from physical nodes to control nodes is prohibited (because physical domain consequences will not cause control domain degradation); Within the physical domain: Physical nodes influence each other through electrical topology, thus bidirectional attention interactions are allowed, but only between node pairs with electrical topology edges within the physical domain; Cross-domain jumps: There is no direct connection between information nodes and physical nodes, therefore any attention interactions between information nodes and physical nodes are prohibited.

[0092] As an example, the causal attention mask matrix is ​​a two-dimensional matrix whose number of rows and columns are equal to the total number of nodes in the multi-domain heterogeneous graph. Each element M in the matrix... ij The validity flag corresponding to the attention path between node i and node j: M is valid when the attention interaction between node i and node j is allowed. ij =1, when attention interaction between node i and node j is prohibited, M ij =0.

[0093] When the attention module calculates attention weights, the causal attention mask matrix is ​​applied to the attention weights to forcibly cut off attention interactions that do not conform to the cross-domain risk propagation chain, while retaining attention interactions that do conform to the cross-domain risk propagation chain. Traditional attention mechanisms typically perform fully connected attention computations across all nodes, without prior constraints on the physical connections and causal directions between nodes. The model relies solely on data-driven learning to acquire associations, making it prone to learning spurious correlations. For example, information nodes and physical nodes may exhibit anomalies simultaneously in the data, but there may be no direct causal path between them. If the model learns freely, it might incorrectly attribute the anomalies of the information node to the physical node, ignoring the intermediate control domain propagation link. This embodiment introduces a causal attention mask matrix, utilizing prior physical knowledge to proactively constrain the legitimate direction and scope of attention interactions. This ensures that the model only transmits information along the causal propagation chain of information domain → control domain → physical domain, fundamentally preventing the model from learning spurious correlations.

[0094] In one embodiment, step S7, which involves forcibly setting the risk score of the target node to zero in response to a target node risk zeroing instruction, and then returning to the step of re-executing the node-level risk assessment of the multi-domain heterogeneous graph based on a local-global heterogeneous neural network, includes: S71. In response to the input target node risk zeroing instruction, the risk score corresponding to the target node is forcibly set to zero; Specifically, based on the risk scores and risk assessment results of each node output above, one or more target nodes requiring intervention are selected. Target nodes can be the nodes with the highest risk scores or nodes specified by operations personnel based on actual operational needs. For example, operations personnel can specify "nodes with risk scores exceeding 0.8 as target nodes," or manually specify "a specific controller as the target node." The system receives a target node risk zeroing command input by the operations personnel, which explicitly indicates which node's risk score needs to be forcibly set to zero. This command can come from a human-machine interface, batch script, or automated operations system. Upon receiving the target node risk zeroing command, the risk score value in the final node risk representation of the target node is forcibly set to zero, assuming that the target node has been fully hardened and its risk has been eliminated. It should be noted that this only sets the risk score to zero; it does not change the original characteristics, node representation, or topology information of the target node, only its output risk score value.

[0095] S72. Using the zeroed target node risk score as input, re-execute the step of performing node-level risk assessment of the multi-domain heterogeneous graph based on the local-global heterogeneous neural network. Specifically, during the re-execution process, the target node participates as a regular node in all computational processes, including domain-specific feature encoding, local heterogeneous neighborhood propagation, attention module interaction and fusion, and the node-level risk assessment layer. It should be noted that because the target node's risk score has been forcibly set to zero, its final output during the re-evaluation will remain zero, rather than the risk score naturally predicted by the model.

[0096] S73. Output the updated risk score of each node after intervention, and calculate the global risk change based on the difference between the risk score of each node before intervention and the updated risk score of each node after intervention.

[0097] Specifically, the calculation formula is as follows: ; in, This represents the change in overall risk. To update the risk score of node i after intervention. Let be the risk score of node i before intervention. When < 0, it means that the global risk of the system decreases after intervention; when > 0, it means that the global risk of the system increases after intervention, which may trigger a new risk transfer; when ≈ 0, it means that the intervention has little impact on the global risk of the system.

[0098] As mentioned above, in the actual operation and maintenance scenarios of power information physical systems, operation and maintenance personnel not only need to understand the current risk status of each node, but also need to further assess "how the overall system risk will change if a high-risk node is intervened (such as hardening or isolation)". For example, when operation and maintenance personnel find that a certain communication device has a high risk, they need to know: "If the risk of this communication device is eliminated, will the risk of the entire system decrease significantly?", "Will a new node become a high-risk node after intervention?", and "Which node should the limited operation and maintenance resources be allocated to first to minimize the overall system risk?" To this end, this embodiment can quantify the impact of hardening or repairing the target node on the overall system risk by comparing the changes in global risk before and after intervention. A significant decrease in global risk after several prognoses indicates that the target node has a strong influence in the propagation of system risk and the risk reduction effect of the intervention is relatively significant. A small change in global risk after several prognoses indicates that the target node has a relatively limited impact on the overall system risk. Secondly, after reducing the risk of the target nodes to zero, some nodes that were originally low-risk may become high-risk nodes. By observing the updated risk scores of each node after intervention, operations and maintenance personnel can promptly identify these newly emerging high-risk nodes, thus taking preventative measures in advance and avoiding the transfer of risk to other nodes due to local intervention. Finally, the changes in global risk after intervention of different target nodes can be compared, thereby assisting operations and maintenance personnel in determining the priority order for hardening target nodes and achieving the goal of minimizing risk with limited operational resources.

[0099] It is understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0100] Based on the same inventive concept, this application also provides a system for implementing the above-mentioned power cyber-physical system node risk assessment system based on cross-domain trusted sample enhancement. The solution provided by this system is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more system embodiments provided below can be found in the limitations of the method described above, and will not be repeated here.

[0101] In one exemplary embodiment, such as Figure 2 As shown, a risk assessment system for nodes in a power information physical system based on cross-domain trusted sample enhancement is provided, including: a data acquisition module 1, a cross-domain trusted risk sample enhancement module 2, a multi-domain heterogeneous graph construction module 3, a risk assessment module 4, and a counterfactual deduction module 5.

[0102] The above system corresponds to the aforementioned method embodiments and can implement the corresponding method steps. Its implementation principle and technical effect are similar, and will not be repeated here.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein, and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for risk assessment of nodes in a power cyber-physical system based on cross-domain trusted sample enhancement, characterized in that, include: Acquire cross-domain operation data of the power information physical system, and construct real samples based on the cross-domain operation data, wherein the cross-domain operation data includes condition variables, information domain state variables, control domain state variables and physical domain state variables; Construct a phased generative adversarial network to generate cross-domain generated samples; A diffusion enhancement discriminator is constructed, and forward diffusion perturbation at different diffusion time steps is applied to the real sample and the cross-domain generated sample to obtain the corresponding perturbated samples. The perturbated sample and the corresponding diffusion time step are input together into the diffusion enhancement discriminator, and the diffusion enhancement discriminator is used to perform adversarial training with the staged generative adversarial network. During adversarial training, the degree of violation of physical consistency constraints is added as a penalty to the loss function of the generator of the phased generative adversarial network. After the adversarial training is completed, the cross-domain generated samples are subjected to hard constraint screening and correction to obtain credible risk enhanced samples. Based on the real samples and the credible risk enhancement samples, a multi-domain heterogeneous graph of the power information physical system is constructed based on nodes, edges and node-edge relationships. The node types in the multi-domain heterogeneous graph include information nodes, control nodes and physical nodes, and the edge types include communication edges within the information domain, cross-domain dependency edges from information nodes to control nodes, control action edges from control nodes to physical nodes and electrical topology edges within the physical domain. The multi-domain heterogeneous graph is subjected to node-level risk assessment based on a local-global heterogeneous neural network, and the risk score and risk determination result of each node are output. The method further includes: Based on the risk score and risk assessment results, the target node is determined; In response to the target node risk zeroing instruction, the risk score of the target node is forcibly set to zero, and then the step of performing node-level risk assessment on the multi-domain heterogeneous graph based on the local-global heterogeneous neural network is re-executed, outputting the updated risk score of each node and the global risk change after intervention.

2. The method for risk assessment of power cyber-physical system nodes based on cross-domain trusted sample enhancement according to claim 1, characterized in that, The step of constructing a staged generative adversarial network to generate cross-domain generated samples includes: A staged generative adversarial network is constructed, comprising a cascaded first generator, a second generator, and a third generator. The condition variable and a preset first random noise are input into the first generator to generate an information domain perturbation state. The condition variable, the information domain perturbation state, and the preset second random noise are input into the second generator to generate the control domain degradation state; The condition variable, the information domain perturbation state, the control domain degradation state, and the preset third random noise are input into the third generator to generate physical domain risk consequences. The information domain perturbation state, the control domain degradation state, and the physical domain risk consequences are then merged to obtain cross-domain generated samples.

3. The method for risk assessment of power cyber-physical system nodes based on cross-domain trusted sample enhancement according to claim 2, characterized in that, The output of the third generator is provided with a physical operator layer, which has a built-in differentiable power system physical algebraic equation solving module. The solving process of the physical algebraic equation solving module is compatible with the training process of the staged generative adversarial network, so that the solution of the physical algebraic equation solving module can participate in the gradient backpropagation of the loss function. The physical domain risk consequences output by the third generator are used as input parameters for the physical algebra equation solving module. After being solved by the physical algebra equation solving module, the final physical domain state that satisfies the physical laws is output. The final physical domain state is used as the physical domain risk consequences in the cross-domain generated sample.

4. The method for risk assessment of power cyber-physical system nodes based on cross-domain trusted sample enhancement according to claim 1, characterized in that, The construction of the diffusion enhancement discriminator involves applying forward diffusion perturbations at different diffusion time steps to the real samples and the cross-domain generated samples, respectively, to obtain corresponding perturbated samples, including: For any sample among the real sample and the cross-domain generated sample At diffusion time step t, the sample is processed according to the following formula. Applying a forward diffusion perturbation, we obtain the corresponding perturbed sample. : ; in, It is Gaussian noise. The diffusion noise coefficient is a monotonically decreasing value that increases with the diffusion time step t. The diffusion enhancement discriminator learns different scale features of the sample at different diffusion time steps t.

5. The method for risk assessment of power cyber-physical system nodes based on cross-domain trusted sample enhancement according to claim 1, characterized in that, The physical consistency constraints include operational boundary constraints, cross-domain monotonic relation constraints, and physical consequence consistency constraints. The operational boundary constraints are used to limit the continuous variables in the cross-domain generated samples to a preset physical boundary range. The cross-domain monotonic relation constraint is used to constrain the consistency of the change direction among the information domain state variables, control domain state variables, and physical domain state variables in the cross-domain generated sample. The physical consequence consistency constraint is used to determine whether the cross-domain generated sample is a high-risk candidate sample based on whether the physical domain state variables in the cross-domain generated sample meet the preset high-risk conditions. The loss function of the generator in the staged generative adversarial network is: ; in, This represents the total loss value. To counteract the loss, For boundary loss terms, This refers to the monotonicity loss term corresponding to the cross-domain monotonic relation constraint. This refers to the physical consistency loss term corresponding to the physical consequence consistency constraint. , , These are the weighting coefficients for each loss term; After the adversarial training is completed, the cross-domain generated samples are subjected to hard constraint screening and correction, including: For continuous variables that exceed the preset physical boundary range, trim them to the preset physical boundary range; Cross-domain generated samples that violate the cross-domain monotonic relation constraint are corrected or eliminated according to preset rules.

6. The method for risk assessment of power cyber-physical system nodes based on cross-domain trusted sample enhancement according to claim 1, characterized in that, The local-global heterogeneous neural network includes a domain-specific feature encoding module, a local heterogeneous neighborhood propagation module, an interaction fusion module, and a node-level risk assessment layer; the node-level risk assessment of the multi-domain heterogeneous graph based on the local-global heterogeneous neural network includes: Through the domain-specific feature encoding module, for each current node in the multi-domain heterogeneous graph, the original features of the current node are obtained, and according to the node type of the current node, the original features of the current node are encoded using a feature encoder corresponding to the node type to obtain the initial node representation of the current node. The local heterogeneous neighborhood propagation module aggregates information about neighboring nodes that are connected to the current node according to different edge types, updates the initial node representation of the current node, and obtains the updated node representation of the current node. Through the interactive fusion module, for the current node and each other node in the multi-domain heterogeneous graph, the attention weight between the updated node representation of the current node and the updated node representation of each other node is calculated respectively. The attention weight is multiplied by the corresponding updated node representation of the other node and then summed to obtain the final node risk representation of the current node. The final node risk representation of the current node is input into the node-level risk assessment layer, and the risk score and risk determination result of each current node are output through the node-level risk assessment layer.

7. The method for risk assessment of power cyber-physical system nodes based on cross-domain trusted sample enhancement according to claim 6, characterized in that, The interaction fusion module is an attention module, which includes a topology-aware cross-attention module and a global cross-domain risk context fusion module; Interactive fusion is achieved through the aforementioned topology-aware cross-attention module: Obtain the topological structure features of the current node, which include at least one of the following: node degree, in-degree, out-degree, number of cross-domain edges, shortest path distance to the attack source in the information domain, shortest path distance to the physical key node, PageRank value, betweenness centrality, and domain type encoding. The topological features are encoded to obtain the topological representation of the current node; Perform cross-attention operation between the updated node representation of the current node and the topological structure representation of the current node to obtain the node representation after fusing the topological structure information; Interactive fusion is performed through the global cross-domain risk context fusion module: Domain-level aggregation is performed on the node representations of the current nodes in the information domain, the control domain, and the physical domain after fusing the topology information, respectively, to obtain the information domain context representation, the control domain context representation, and the physical domain context representation; Attention fusion is performed on the information domain context representation, the control domain context representation, and the physical domain context representation to obtain a global cross-domain risk context representation; The global cross-domain risk context representation is written back to the node representation of each current node in the multi-domain heterogeneous graph after the fusion of topology information, to obtain the final node risk representation of the current node.

8. The method for risk assessment of power cyber-physical system nodes based on cross-domain trusted sample enhancement according to claim 7, characterized in that, The attention module is configured with a causal attention mask matrix; The causal attention mask matrix is ​​pre-generated based on the physical topology of the multi-domain heterogeneous graph and the cross-domain risk propagation chain. The cross-domain risk propagation chain is a unidirectional causal transmission path of "information domain disturbance → control domain degradation → physical domain consequences". The causal attention mask matrix is ​​configured such that when the attention module calculates attention weights, the causal attention mask matrix acts on the attention weights to forcibly cut off attention interactions that do not conform to the cross-domain risk propagation chain, while retaining attention interactions that do conform to the cross-domain risk propagation chain. The causal attention mask matrix is ​​generated in the following ways: Based on the edge type in the multi-domain heterogeneous graph, determine the legality and directionality of the attention path: For communication edges within the information domain, attention interactions between information nodes are permitted; For cross-domain dependency edges from information nodes to control nodes, attention passing from information nodes to control nodes is allowed, but attention passing from control nodes to information nodes is prohibited. For control action edges from control node to physical node, attention transfer from control node to physical node is allowed, but attention transfer from physical node to control node is prohibited. For electrical topology edges within the physical domain, attention interactions between physical nodes are allowed; For node pairs that do not have a direct connection, their attention interaction is prohibited; Each element in the causal attention mask matrix corresponds to the attention weight between a pair of nodes in the multi-domain heterogeneous graph. When the attention interaction between the pair of nodes is allowed, the corresponding element is set to 1; when the attention interaction between the pair of nodes is prohibited, the corresponding element is set to 0, so that the attention module ignores the prohibited attention weights in the attention calculation.

9. The method for risk assessment of power cyber-physical system nodes based on cross-domain trusted sample enhancement according to claim 1, characterized in that, In response to the target node's risk-zeroing instruction, after forcibly setting the target node's risk score to zero, the process returns to the step of re-executing the node-level risk assessment of the multi-domain heterogeneous graph based on a local-global heterogeneous neural network, including: In response to the input command to zero out the risk of the target node, the risk score corresponding to the target node is forcibly set to zero; Using the zeroed target node risk score as input, the step of performing node-level risk assessment of the multi-domain heterogeneous graph based on the local-global heterogeneous neural network is re-executed. Output the updated risk score of each node after intervention, and calculate the global risk change based on the difference between the risk scores of each node before intervention and the updated risk scores of each node after intervention.

10. A risk assessment system for power cyber-physical system nodes based on cross-domain trusted sample enhancement, characterized in that, The system is used to implement the method as described in any one of claims 1-9, comprising: The data acquisition module is used to acquire cross-domain operation data of the power information physical system and construct real samples based on the cross-domain operation data. The cross-domain operation data includes condition variables, information domain state variables, control domain state variables and physical domain state variables. A cross-domain trusted risk sample enhancement module is used to construct a phased generative adversarial network to generate cross-domain generated samples. A diffusion enhancement discriminator is constructed to apply forward diffusion perturbations at different diffusion time steps to the real samples and the cross-domain generated samples and to conduct adversarial training. During the adversarial training, the degree of violation of physical consistency constraints is added as a penalty term to the loss function of the generator of the phased generative adversarial network. After the adversarial training is completed, the cross-domain generated samples are subjected to hard constraint screening and correction to obtain trusted risk enhanced samples. A multi-domain heterogeneous graph construction module is used to construct a multi-domain heterogeneous graph of the power information physical system based on the real samples and the trusted risk enhancement samples, and based on nodes, edges and node-edge relationships. The node types in the multi-domain heterogeneous graph include information nodes, control nodes and physical nodes, and the edge types include communication edges within the information domain, cross-domain dependency edges from information nodes to control nodes, control action edges from control nodes to physical nodes and electrical topology edges within the physical domain. The risk assessment module is used to perform node-level risk assessment on the multi-domain heterogeneous graph based on a local-global heterogeneous neural network, and output the risk score and risk determination result for each node; The counterfactual reasoning module is used to determine the target node based on the risk scores and risk judgment results of each node output by the risk assessment module. In response to the input target node risk zeroing command, the risk score of the target node is forcibly set to zero, triggering the risk assessment module to re-execute the node-level risk assessment, and outputting the updated risk scores of each node and the global risk change after intervention.