Power system risk conditional scenario generation and checking method based on double-layer conditional diffusion

CN122840674APending Publication Date: 2026-09-29STATE GRID SICHUAN ELECTRIC POWER CORP ELECTRIC POWER RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611044951.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-14
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0004]本发明目的在于提供一种基于双层条件扩散的电力系统风险条件场景生成及校核方法,将系统运行风险信息与多类型电源出力特征共同引入场景构建过程,提高所生成的风险条件场景对电力系统风险状态的表征能力,解决了现有构建方法所生成的风险条件场景难以准确表征电力系统运行风险的问题

Benefits of technology

[0043]本申请实施例通过构建电力系统运行风险指标,将电力系统运行风险与多类型能源出力特征共同用于风险条件场景生成;且使用具有双层无分类器引导机制的双层条件扩散模型用于生成风险条件场景,由于该双层条件扩散模型在采样阶段分别以系统侧运行风险和出力侧出力特征作为条件进行噪声预测,以得到满足目标风险条件和出力特征条件的风险条件场景;使得生成的风险条件场景能够在保证场景统计特征和时序变化规律的同时,提高场景对目标运行风险状态的表征能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122840674A_ABST
    Figure CN122840674A_ABST
Patent Text Reader

Abstract

The application discloses a power system risk condition scenario generation and checking method based on double-layer condition diffusion, and relates to the technical field of power system operation analysis and risk condition scenario construction. The construction method comprises the following steps: obtaining historical operation data of a power system; constructing power system operation risk indexes based on the historical operation data; constructing a system side condition vector based on the operation risk indexes; extracting output characteristic indexes of various types of energy from the historical data; constructing a source side condition vector based on the output characteristic indexes; inputting the system side condition vector and the source side condition vector into a pre-trained double-layer condition diffusion model to obtain a risk condition scenario generated by the double-layer condition diffusion model. The power system operation risk and the output characteristics of the multiple types of energy are used together for risk condition scenario generation, so that the generated risk condition scenario can guarantee the statistical characteristics and the timing change law of the scenario, and improve the representation ability of the scenario to a target operation risk state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system operation analysis and risk condition scenario construction technology, specifically to a method for generating and verifying power system risk condition scenarios based on two-layer condition diffusion. Background Technology

[0002] With the continuous advancement of new power system construction, the proportion of energy sources such as wind power, photovoltaics, and hydropower in the power system continues to increase, and the combined effect of multiple power sources makes the system operation more complex. Among them, wind power and photovoltaic output exhibit significant randomness, volatility, and intermittency. In contrast, different types of hydropower have significantly different operating characteristics: storage-type hydropower relies on the regulation capacity of reservoirs and usually has a strong output regulation space, but is also affected by factors such as inflow process, reservoir boundary conditions, and unit operation constraints; run-of-river hydropower has no reservoir capacity or weak reservoir capacity regulation capacity, and its output process is more sensitive to changes in natural inflow, with relatively limited overall regulation elasticity. In order to support power system operation analysis, risk assessment, and extreme condition testing, it is usually necessary to construct multi-energy risk condition scenarios that can reflect possible future evolution paths.

[0003] Current methods for constructing wind, solar, and hydropower output scenarios typically employ deep learning-based approaches. These methods utilize generative adversarial networks (GANs) and variational autoencoders (VAEs) to learn complex distribution characteristics from historical samples and generate corresponding scenarios. This approach primarily focuses on the statistical characteristics of the source data itself, ensuring that the constructed scenarios closely approximate historical samples in terms of probability distribution, mean level, fluctuation amplitude, and temporal patterns. However, this approach fails to adequately consider the operational risk state of the corresponding power system. Power system operational risk is not only related to the output characteristics of wind, solar, and hydropower sources but also closely linked to factors such as load levels, reserve configuration, generator ramp-up capabilities, network constraints, and hydropower regulation capabilities. Therefore, the same combined wind, solar, and hydropower output trajectory may correspond to completely different operational risk levels under different system backgrounds. Consequently, scenarios generated using existing methods cannot accurately characterize power system operational risks and are insufficient to support a comprehensive analysis of power system operation. Summary of the Invention

[0004] The purpose of this invention is to provide a method for generating and verifying power system risk condition scenarios based on two-layer condition diffusion. This method incorporates system operation risk information and output characteristics of multiple types of power sources into the scenario construction process, thereby improving the ability of the generated risk condition scenarios to represent the risk state of the power system. This solves the problem that the risk condition scenarios generated by existing construction methods are difficult to accurately represent the operation risks of the power system.

[0005] This invention is achieved through the following technical solution:

[0006] The first aspect of this application provides a method for generating power system risk condition scenarios based on two-layer condition diffusion, including:

[0007] Acquire historical operating data of the power system; the historical operating data includes historical load data, historical output data of various types of clean energy, unit operating status and reserve demand data, as well as network structure and power flow data;

[0008] Based on the historical operating data, power system operation risk indicators are constructed; and based on the operation risk indicators, system-side condition vectors are constructed.

[0009] The output characteristic indicators of various energy sources are extracted from the historical data; and a source-side condition vector is constructed based on the output characteristic indicators.

[0010] The system-side condition vector and the source-side condition vector are input into a pre-trained two-layer condition diffusion model to obtain the risk condition scenario generated by the two-layer condition diffusion model; the risk condition scenario represents the temporal characteristics of various energy outputs under the risk state of the power system.

[0011] The two-layer conditional diffusion model includes a two-layer classifier-free guidance mechanism, wherein the first-layer guidance mechanism is used to adjust the power system operation risk state corresponding to the generated risk condition scenario, and the second-layer guidance mechanism is used to adjust the output characteristics of various energy sources in the generated risk condition scenario.

[0012] In one feasible implementation, the system operation risk indicators include reserve margin indicators, ramp-up margin indicators, and absolute safety margin indicators for the line:

[0013] The reserve margin index characterizes the power system's ability to cope with fluctuations in clean energy output and load disturbances;

[0014] The ramp margin index characterizes the power system's ability to cope with net load increases during adjacent adjustment periods;

[0015] The absolute safety margin index of the line represents the remaining available transmission capacity of critical lines in the power system.

[0016] In one feasible implementation, a system-side condition vector is constructed based on the operational risk indicators, including:

[0017] The operational risk indicators are classified into levels using a hierarchical classification method based on empirical distribution quantiles; the level intervals are set with partial overlap.

[0018] Based on the operational risk indicators after the classification, a system-side condition vector is constructed.

[0019] In one feasible implementation, the system-side condition vector and the source-side condition vector are input into a pre-trained two-layer conditional diffusion model to obtain the risk condition scenarios generated by the two-layer conditional diffusion model, including:

[0020] The system-side condition vector, source-side condition vector, and background condition vector are input into a pre-trained two-layer condition diffusion model to obtain the risk condition scenario generated by the two-layer condition diffusion model; the background condition vector contains characteristics of the power grid operating environment.

[0021] A second aspect of this application provides a verification method for verifying the risk condition scenarios generated above, the verification method comprising:

[0022] Given the target condition vector and the target background condition vector of the target power system;

[0023] The target condition vector and the target background condition vector are input into the two-layer condition diffusion model to obtain multiple risk condition scenarios generated by the two-layer condition diffusion model;

[0024] Each generated risk condition scenario and power system load are input into the operation model. The operation model simulates the operation results of the power system. Based on the operation results, the reconstructed risk indicators corresponding to each risk condition scenario are reconstructed.

[0025] The reconstructed risk indicators are compared with the target risk indicators in the target condition vector to determine the consistency between the generated multiple risk condition scenarios and the target power system risk conditions.

[0026] In one feasible implementation, the reconstructed risk indicators are compared with the target risk indicators in the target condition vector to determine the consistency between the generated multiple risk condition scenarios and the target power system risk conditions, including:

[0027] The percentage of scenarios in which all reconstructed risk indicators in the generated multiple risk condition scenarios fall into the corresponding target risk interval is taken as the hit rate of the generated multiple risk condition scenarios for the target risk conditions of the power system; the target risk interval is the level interval in which the target risk indicator is located after the risk indicators are classified.

[0028] For risk condition scenarios that do not hit the target risk range, the average deviation of the reconstructed system risk index from the boundary of the target risk range is used as the degree of deviation of the generated multiple risk condition scenarios from the target risk conditions of the power system.

[0029] A third aspect of this application provides a power system risk condition scenario generation device based on two-layer condition diffusion, comprising:

[0030] The historical data acquisition unit is used to acquire historical operating data of the power system; the historical operating data includes historical load data, historical output data of various types of clean energy, unit operating status and reserve demand data, as well as network structure and power flow data.

[0031] The risk indicator construction unit constructs power system operation risk indicators based on the historical operation data; and constructs system-side condition vectors based on the operation risk indicators.

[0032] The output characteristic index extraction unit is used to extract the output characteristic indexes of various energy sources from the historical data; and to construct a source-side condition vector based on the output characteristic indexes.

[0033] The risk condition scenario generation unit is used to input the system-side condition vector and the source-side condition vector into a pre-trained two-layer condition diffusion model to obtain the risk condition scenario generated by the two-layer condition diffusion model; the risk condition scenario represents the temporal characteristics of various energy outputs under the risk state of the power system;

[0034] The two-layer conditional diffusion model includes a two-layer classifier-free guidance mechanism, wherein the first-layer guidance mechanism is used to adjust the power system operation risk state corresponding to the generated risk condition scenario, and the second-layer guidance mechanism is used to adjust the output characteristics of various energy sources in the generated risk condition scenario.

[0035] A fourth aspect of this application provides a verification device for verifying the risk condition scenario generated above, the verification device comprising:

[0036] A condition vector determination unit is used to determine the target condition vector and the target background condition vector of the target power system.

[0037] A multi-risk condition scenario generation unit is used to input the target condition vector and the target background condition vector into the two-layer condition diffusion model to obtain multiple risk condition scenarios generated by the two-layer condition diffusion model;

[0038] The risk indicator reconstruction unit is used to input each generated risk condition scenario and power system load into the operation model, obtain the operation results of the power system through the operation model simulation, and reconstruct the reconstructed risk indicators corresponding to each risk condition scenario based on the operation results.

[0039] The comparison and verification unit is used to compare the reconstructed risk indicators with the target risk indicators in the target condition vector to determine the consistency between the generated multiple risk condition scenarios and the target power system risk conditions.

[0040] A fifth aspect of this application provides an electronic device, including: a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the above-described method.

[0041] A sixth aspect of this application provides a storage medium, comprising: storing a program or instructions on the storage medium, wherein the program or instructions, when executed by a processor, implement the steps of the above-described method.

[0042] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0043] This application embodiment constructs a power system operation risk index, combining power system operation risk with the output characteristics of multiple energy types for risk condition scenario generation; and uses a two-layer conditional diffusion model with a two-layer classifier-free guidance mechanism to generate risk condition scenarios. Since this two-layer conditional diffusion model uses system-side operation risk and output-side output characteristics as conditions for noise prediction during the sampling phase, it obtains risk condition scenarios that meet the target risk conditions and output characteristic conditions; thus, the generated risk condition scenarios can improve the scenario's ability to represent the target operation risk state while ensuring the scenario's statistical characteristics and temporal change patterns. Attached Figure Description

[0044] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, 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 the present invention and should not be considered 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:

[0045] Figure 1 A flowchart illustrating a method for generating power system risk condition scenarios based on two-layer condition diffusion, provided in an embodiment of this application;

[0046] Figure 2 This is a schematic diagram of the structure of the two-layer conditional diffusion model provided in the embodiments of this application;

[0047] Figure 3 A flowchart illustrating a verification method provided in an embodiment of this application;

[0048] Figure 4 A schematic diagram of a power system risk condition scenario generation device based on two-layer condition diffusion provided in an embodiment of this application;

[0049] Figure 5 This is a schematic diagram of the structure of a verification device provided in an embodiment of this application;

[0050] Figure 6 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application.

[0051] The markings and corresponding component names in the attached diagram are as follows:

[0052] 41-Historical data acquisition unit, 42-Risk indicator construction unit, 43-Output characteristic indicator extraction unit, 44-Risk condition scenario generation unit, 51-Condition vector determination unit, 52-Multi-risk condition scenario generation unit, 53-Risk indicator reconstruction unit, 54-Comparison and verification unit, 61-Memory, 62-Processor, 63-Communication component, 64-Display, 65-Power supply component, 66-Audio component. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.

[0054] As will be known to those skilled in the art, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0055] The terms “comprising” and “having”, and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not expressly listed or inherent to such process, method, product, or apparatus.

[0056] Example 1:

[0057] Embodiment 1 of this application provides a method for generating power system risk condition scenarios based on two-layer condition diffusion, in order to solve the problem that the risk condition scenarios generated by existing construction methods are difficult to accurately represent the operational risks of power systems.

[0058] The subject executing this method can be any computing device capable of implementing the method, such as a server, mobile phone, personal computer, smart wearable device, smart robot, etc.

[0059] Furthermore, the embodiments of this application do not limit the execution order of different steps. When using the method provided in the embodiments of this application, the execution order of different steps can be adjusted according to actual needs.

[0060] For ease of description, the following uses a power system risk condition scenario generation device based on two-layer condition diffusion as the execution subject of this method to provide a detailed description of the method provided in this application embodiment.

[0061] like Figure 1 The diagram shown is a flowchart illustrating a specific implementation of a power system risk condition scenario generation method based on two-layer condition diffusion, as provided in this application embodiment. The method includes the following steps 11-14:

[0062] Step 11: Obtain historical operating data of the power system; the historical operating data includes historical load data, historical output data of various types of clean energy, unit operating status and reserve demand data, and network structure and power flow data.

[0063] The power system in this embodiment is a power system that includes multiple types of clean energy such as wind power, photovoltaic power and hydropower.

[0064] The acquired historical operating data includes historical load data of the power system, historical output data of various types of clean energy such as wind power output, photovoltaic power output and hydropower output, as well as operating status and reserve demand data of conventional units, and network structure and power flow related data of the power system.

[0065] Historical operational data is used for calculating risk indicators for subsequent system operation and for training scenario models.

[0066] Step 12: Based on the historical operating data, construct power system operation risk indicators; and based on the operation risk indicators, construct system-side condition vectors.

[0067] In this embodiment, in response to the problems that may occur in the operation of the power system under the conditions of high proportion of new energy (wind power, photovoltaic) and clean energy (hydropower), such as insufficient reserve capacity, increased pressure on net load ramping and limited line transmission margin, a power system operation risk indicator system is constructed based on the power system operation analysis results, from three aspects: short-term reserve capacity, short-term upward adjustment capacity and network security boundary.

[0068] The power system operation risk indicator system constructed in this embodiment includes reserve margin indicators (specifically, 15-minute reserve margin indicators), ramp-up margin indicators, and line absolute safety margin indicators.

[0069] Among them, the 15-minute reserve margin index characterizes the power system's ability to regulate the output fluctuations and load disturbances of clean energy (wind power, photovoltaic, and run-of-river hydropower) within a short time scale, and reflects the relationship between the power system's 15-minute reserve demand and available reserve capacity.

[0070] Specifically: Let the power system be in time period The 15-minute standby requirement is The operating unit can provide 15 minutes of spin-off standby. The standby capacity available for the shut-down unit is The 15-minute reserve margin index is defined as follows:

[0071] ,(1);

[0072] From equation (1), it can be seen that when the power system has available reserve capacity (through... (Characteristics) relative to reserve demand The more abundant the reserve capacity, the larger the 15-minute reserve margin index value; as the available reserve capacity of the power system gradually approaches the reserve demand boundary, the smaller the 15-minute reserve margin index value. Therefore, this 15-minute reserve margin index can reflect the reserve risk level of the system on a short time scale.

[0073] The ramp margin index characterizes the power system's ability to cope with net load increases during adjacent adjustment periods, specifically reflecting the sufficiency of the power system's short-term upward adjustment capacity.

[0074] Define time period The net load of the power system is:

[0075] (2);

[0076] In the formula, Indicates the total load of the power system. , ,and They represent time periods respectively. The output of wind power, photovoltaic power and run-of-river hydropower.

[0077] Based on the definition of net load, the change in net load between two adjacent time periods can be expressed as:

[0078] (3);

[0079] When the net load increases, the system needs to provide ramp-up capability; therefore, we take the portion greater than 0 to obtain the power system's ramp-up demand:

[0080] (4);

[0081] Based on this, the system will be divided into time periods. By comparing the total available uphill climbing capacity with the aforementioned uphill climbing requirements, the uphill margin index can be defined as follows:

[0082] (5);

[0083] in, Indicates the unit The rate of upward slope and These represent the corresponding time scales. Indicates the time period of the unit The power-on status, Indicates the time period of the unit Startup status, This indicates the basic output that the unit can provide after startup. As can be seen from equation (5), the larger the value of this ramp margin index, the more sufficient the power system's upward adjustment capability is to cope with the increase in net load; conversely, it indicates that the power system faces a greater ramp risk.

[0084] The absolute safety margin index of a line represents the remaining available transmission capacity of a critical line in a power system and more intuitively reflects the remaining safety space of the line from the boundary of exceeding the limit.

[0085] Based on the results of power system operation simulation, the line During the period The trend can be represented as:

[0086] (6);

[0087] In the formula, , , , and These represent the power generation units, wind power, photovoltaic power, hydropower, and loads on the lines, respectively. The factors that shift the tide , , , and These represent the active power output of unit n in time period t, the active power output of wind farm w in time period t, the active power output of photovoltaic power station s in time period t, the active power output of hydropower station h in time period t, and the active load power of load node d, respectively.

[0088] by Indicates the line Based on the transmission capacity limit, the absolute safety margin index of the line is defined as follows:

[0089] ,(7);

[0090] As can be seen from equation (7), the absolute safety margin index of this line reflects the most stressful line among all critical lines. The corresponding remaining available transmission capacity can therefore characterize the network security boundary margin of the power system under its current operating state. The larger the value of the absolute security margin index of the line, the more relaxed the line transmission constraints; the smaller the index value, the closer the system is to the line security boundary.

[0091] By jointly constructing the aforementioned 15-minute backup margin index, climb margin index, and line absolute safety margin index, the system operation status can be characterized from three dimensions: backup risk, adjustment risk, and network security risk. This forms the system-side risk condition foundation required for subsequent risk condition scenario construction and closed-loop verification.

[0092] The above describes the system operation risks from three dimensions: backup risk, adjustment risk, and network security risk, forming the system-side risk condition foundation required for subsequent risk condition scenario construction and closed-loop verification.

[0093] Step 13: Extract the output characteristic indicators of various energy sources from the historical data; and construct the source-side condition vector based on the output characteristic indicators.

[0094] Since the overall level and statistical shape of the output curves of new energy sources such as wind power and photovoltaics, as well as clean energy sources such as hydropower, directly affect the operating status of the power system, this step further introduces the output characteristic indicators of wind, solar and hydropower as source-side condition information based on the risk characterization of the power system.

[0095] In this step, to control the conditional dimensions while also considering the characteristic representation capability, the average values ​​of the daily wind, solar, and hydropower output curves are preferred. As an indicator of output characteristics.

[0096] Suppose a certain station is at the first The output curve for the day is:

[0097] ;

[0098] Then the field is in the first position. The average daily output can be expressed as:

[0099] (8);

[0100] in, Indicates the number of time periods within a single day. This indicates that the venue is at the... Heavenly The output value for each time period. By using the daily average value index, the overall output level of various power supply output curves can be reflected in a lower dimension, thus providing a source-side characteristic constraint basis for the subsequent construction of risk condition scenarios.

[0101] Based on the power system operation risk indicators and output characteristic indicators constructed above, system-side condition vectors and source-side condition vectors are constructed respectively.

[0102] Since power system operation risk indicators and output characteristic indicators typically differ in physical dimensions, numerical ranges, and distribution patterns, directly inputting these indicators into the generative model (two-layer conditional diffusion model) can easily lead to scale imbalances between different condition variables, thus affecting model training stability and conditional control effectiveness. Therefore, we first normalize all indicators to map them to a unified numerical range, and then construct system-side condition vectors and source-side condition vectors respectively.

[0103] The system-side condition vector can be represented as:

[0104] (9);

[0105] In the formula, This indicates a 15-minute reserve margin indicator. Indicates the uphill margin index, This represents the absolute safety margin index of the line. The system-side condition vector is used to characterize the system operational risk state corresponding to the risk condition scenario.

[0106] The source-side condition vector can be represented as:

[0107] (10);

[0108] In the formula, Indicates wind power output characteristics. Indicators representing photovoltaic power output characteristics This represents the characteristic index of hydropower output. The source-side condition vector is used to characterize the overall output characteristics of the risk condition scenario on the source side. By constructing the system-side condition vector and the source-side condition vector respectively, a hierarchical expression of the system's operational risk state and source-side output characteristics can be achieved, thus providing the input condition basis for subsequent construction of two-layer condition diffusion scenarios and closed-loop verification.

[0109] Since power system operation risk indicators and output characteristic indicators are both continuous variables, although they can characterize the power system operation status and wind and solar power output characteristics under typical load conditions in a relatively detailed manner, directly assigning precise values ​​to each of the multidimensional continuous indicators during the construction of condition scenarios can easily lead to a rapid increase in the dimensionality of the condition space, thereby increasing the complexity of target condition setting, sample matching, and model implementation. Furthermore, since the distribution of historical samples in high-dimensional continuous spaces is usually sparse, directly using continuous conditions can also easily lead to problems such as a lack of effective sample support for target conditions, difficulties in condition matching, and unstable generation and control.

[0110] For the reasons mentioned above, in a feasible implementation, this embodiment performs hierarchical processing on continuous indicators to achieve interval-based expression of different risk states and power output characteristics. Power system operation risk indicators and wind and solar power output characteristic indicators are mapped to a finite number of discrete levels for target condition setting, feasible combination screening, and historical sample matching. After discrete-level processing of power system operation risk indicators and power output indicators, corresponding system-side condition vectors and source-side condition vectors are constructed.

[0111] The method of grading continuous indicators is essentially a hierarchical approximation of continuous risk and output states. While retaining the main level information, it reduces the complexity of condition control and improves the operability and implementation stability of the technical solution.

[0112] In one specific implementation, a system-side condition vector is constructed based on the operational risk indicators, including:

[0113] The operational risk indicators are classified into levels using a hierarchical classification method based on empirical distribution quantiles; the level intervals are set with partial overlap; and a system-side condition vector is constructed based on the classified operational risk indicators.

[0114] Similarly, a source-side condition vector is constructed based on the output characteristic index, including:

[0115] A hierarchical classification method based on empirical distribution quantiles is adopted to classify the output characteristic indicators into levels; based on the output characteristic indicators after level classification, a source-side condition vector is constructed.

[0116] Specifically, the grading method based on empirical distribution quantiles can be divided into three levels: each indicator (power system operation risk indicator and output characteristic indicator) is divided into Level 1, Level 2, and Level 3. Compared with the grading method based on fixed thresholds, the quantile-based grading does not depend on the physical dimensions and absolute value range of the indicators, and can adapt to the different distribution patterns and scale differences of different indicators, thus ensuring that all types of indicators have a consistent hierarchical meaning after grading.

[0117] The aforementioned grade intervals employ a partially overlapping approach, rather than a completely rigid mutually exclusive division, because: both system operation risk indicators and output characteristic indicators exhibit continuous variation; samples near quantiles typically lack clearly defined grade boundaries. Rigid segmentation could mechanically classify similar samples into different grades, weakening the rationality of the conditional expression. Furthermore, under multi-dimensional condition combinations, the distribution of historical samples across different grade combinations is often uneven. Appropriately setting overlapping intervals can create buffer zones between adjacent grades, thereby expanding the range of matchable samples, alleviating sample sparsity issues, improving the robustness of target condition setting, and enhancing the feasibility of scenario construction. Through this graded processing, while preserving the main hierarchical information of system operation risk status and output characteristics, a reasonable mapping of continuous indicators to discrete conditions can be achieved, providing a foundation for subsequent two-layer condition diffusion scenario construction and closed-loop verification.

[0118] Taking an indicator with a value range of [0,1] as an example, according to a three-level classification, if a rigid mutually exclusive division of intervals is used (the traditional approach, with no overlapping intervals): Level 1 (low risk): [0,0.33], Level 2 (medium risk): (0.33,0.66), Level 3 (high risk): (0.66,1]; values ​​very close to 0.33 and 0.66 are abruptly cut to different levels, with adjacent levels completely separated without any buffer; Using partially overlapping level intervals: Level 1 (low risk): [0,0.40], Level 2 (medium risk): [0.25,0.75], Level 3 (high risk): [0.60,1.00]; the overlap is reflected in the overlap interval between Level 1 and Level 2 [0.25,0.40] and the overlap interval between Level 2 and Level 3 [0.6,0.75]. For example, if the indicator value is 0.32, falling in Level 1 or Level 2... Within the level crossover interval, it will not be mechanically forced to be classified into a certain level, which conforms to the physical characteristics of continuous and gradual change of indicators, making the condition expression more reasonable.

[0119] Step 14: Input the system-side condition vector and the source-side condition vector into the pre-trained two-layer condition diffusion model to obtain the risk condition scenario generated by the two-layer condition diffusion model; the risk condition scenario represents the temporal characteristics of various energy outputs under the risk state of the power system.

[0120] Before performing step 14, the two-layer conditional diffusion model needs to be trained. The training dataset used for model training is as follows: After completing the power system operation risk assessment, index classification, and condition vector construction, combined with historical output data of wind power, photovoltaic, and hydropower, the power system risk indicators and output characteristic indicators corresponding to historical risk condition scenarios under each typical load condition are obtained. The quantified power system operation risk indicators and output characteristic indicators are then attached as condition labels to the corresponding historical wind and solar power output scenarios, thereby constructing a training dataset for risk condition scenarios with adjustable system operation risk. This training dataset not only preserves the temporal evolution characteristics of wind, solar, and hydropower output scenarios but also establishes the correspondence between wind, solar, and hydropower output scenarios and system operation states.

[0121] The two-layer conditional diffusion model is trained using the aforementioned training dataset to obtain a model that can respond to risk conditions of the target power system and the output characteristics of wind, solar, and hydropower. This model learns the distribution patterns of historical wind, solar, and hydropower output scenarios under different power system risk states and different output characteristics, thereby establishing a mapping relationship between system-side risk information and source-side output scenarios.

[0122] like Figure 2 As shown, the two-layer conditional diffusion model in this embodiment is based on the conditional diffusion model. A two-layer classifier-less guidance mechanism is introduced during the sampling phase of the conditional diffusion model to guide the system operation risk conditions and the power output characteristics of wind, solar, and hydropower, respectively, thereby enhancing the model's control over the target risk state and source-side power output characteristics. Specifically, the first-layer guidance mechanism adjusts the power system operation risk state corresponding to the generated risk condition scenario, while the second-layer guidance mechanism adjusts the power output characteristics of various energy sources within the generated risk condition scenario.

[0123] The conditional diffusion model includes a forward diffusion process and a reverse denoising process. The forward diffusion process is used to gradually add noise to historical wind, solar, and hydropower output scenarios, so that the original samples gradually degenerate into noise distributions. The reverse denoising process is used to gradually recover risk condition scenarios that meet the target conditions from noise samples under conditional constraints.

[0124] During the forward diffusion process, the original scene samples By gradually adding noise, the first... Step noise samples , can be represented as:

[0125] ,(11);

[0126] in, Indicates Gaussian noise. This represents the coefficient obtained by multiplying the noise scheduling parameters.

[0127] In the reverse denoising process, a neural network is used to predict the noise components in the current noise sample, and combined with conditional vectors. Gradually restore the target scenario.

[0128] During model training, the error between the real noise and the predicted noise is used as the objective function, i.e.:

[0129] (12);

[0130] in, Indicates the distribution of the original data The expected value is calculated using time step t, true noise ϵ, and conditional vector c, which is essentially the average loss over all training samples. This indicates that the neural network is at time step and condition vector The following are the prediction results for noise.

[0131] In one feasible implementation, the two-layer condition diffusion model, in addition to power system operation risk conditions and output characteristic conditions, also incorporates background conditions as supplementary input to enhance the consistency between the constructed scenario and the actual operating environment. The background conditions include characteristics of the power grid operating environment, preferably including daily meteorological background characteristics. Typical load condition labels and peak time information , can be represented as:

[0132] ,(13);

[0133] To enhance the control capability of the two-layer conditional diffusion model over power system operation risk conditions and wind, solar, and hydropower output characteristics, a two-layer classifier-free guidance mechanism is introduced in the sampling phase.

[0134] Let the unconditional prediction noise be... The prediction noise under system risk conditions is The noise for dual-condition joint prediction is The prediction noise after double-layer guidance can be expressed as:

[0135] ,(14);

[0136] in, and These represent the guidance strengths of the system risk condition and the output characteristic condition, respectively. After obtaining the guided noise prediction results, the samples are updated step by step according to the reverse denoising process, ultimately obtaining the risk condition scenario that satisfies the target risk condition and the output characteristic condition.

[0137] The above completes the generation of power system risk condition scenarios.

[0138] This application embodiment constructs a power system operation risk index, combining power system operation risk with the output characteristics of multiple energy types for risk condition scenario generation; and uses a two-layer conditional diffusion model with a two-layer classifier-free guidance mechanism to generate risk condition scenarios. Since this two-layer conditional diffusion model uses system-side operation risk and output-side output characteristics as conditions for noise prediction during the sampling phase, it obtains risk condition scenarios that meet the target risk conditions and output characteristic conditions; thus, the generated risk condition scenarios can improve the scenario's ability to represent the target operation risk state while ensuring the scenario's statistical characteristics and temporal change patterns.

[0139] Example 2:

[0140] To address the problem that existing technologies mostly evaluate generated risk conditions at the statistical level and lack analysis of power system operation risks, this embodiment provides a verification method for verifying the risk conditions generated in Embodiment 1.

[0141] The subject executing this method can be any computing device capable of implementing the method, such as a server, mobile phone, personal computer, smart wearable device, smart robot, etc.

[0142] Furthermore, the embodiments of this application do not limit the execution order of different steps. When using the method provided in the embodiments of this application, the execution order of different steps can be adjusted according to actual needs.

[0143] For ease of description, the following uses a verification device as the subject of this method to provide a detailed description of the method provided in this application embodiment.

[0144] This embodiment constructs a comprehensive evaluation framework consisting of statistical indicator evaluation and system-level closed-loop verification. Statistical indicator evaluation measures the quality of the generated scene from three levels: point value deviation, temporal pattern consistency, and probability distribution approximation capability. System-level closed-loop verification involves re-inputting the generated scene into the corresponding safety-constrained unit combination model, calculating system-level risk indicators, and verifying their consistency with the target system conditions. This two-layer evaluation approach allows for a more comprehensive verification of the effectiveness of the proposed wind and solar scene generation method at both the data and system operation levels.

[0145] Statistical indicator evaluation is divided into two categories: one is the error indicator for comparing a single representative scene with the real scene, which is used to measure point value deviation and shape deviation; the other is the probability indicator for the distribution quality of the scene set, which is used to evaluate the coverage and distribution approximation ability of the generated scene set to the real observation.

[0146] Specifically, the evaluation indicators for statistical indicators include root mean square error and dynamic time regularization distance.

[0147] The root mean square error (RMSE) measures the overall deviation between the generated scene and the real scene at hourly and station-by-station values. RMSE is sensitive to amplitude error and can directly reflect the degree of approximation of the generated curve to the overall power level. The smaller the RMSE value, the smaller the deviation between the generated scene and the real scene at the point value level. Its RMSE is defined by formula (15).

[0148] (15);

[0149] In the formula, These represent the number of time periods contained in the scene. Indicates the number of stations, Indicates station Scene generation in time The output value, station Real-world scenarios in time The output value.

[0150] Solar power output sequences typically exhibit significant peak shifts and local phase offsets. Using only point value deviations for evaluation may not accurately reflect the morphological similarity between two curves under temporal misalignment. Therefore, Dynamic Time Warping (DTW) is introduced to measure the temporal morphological difference between the generated and real-world scenes. A smaller DTW indicates that the temporal morphology of the generated curve is closer to that of the real curve.

[0151] Let the real scene sequence be The generated scene sequence is DTW is defined as the cumulative distance between two sequences along the optimal alignment path W, and can be expressed as:

[0152] (16);

[0153] In the formula This represents the local distance function, typically taking the Euclidean distance or absolute distance.

[0154] While the two indicators mentioned above can evaluate the consistency between the generated scenario and the real sample from the output side, they cannot directly indicate whether the generated scenario meets the operational risk state of the target system. Therefore, the consistency of system-level conditions cannot be inferred solely from the energy trajectory itself, but must be verified by re-inputting the generated scenario into the optimized operating model and calculating the system risk indicators.

[0155] Based on this, the following embodiment presents a closed-loop verification method.

[0156] like Figure 3 The diagram shown is a flowchart illustrating the specific implementation of a verification method provided in this application, including the following steps 31-34:

[0157] Step 31: Given the target condition vector and the target background condition vector of the target power system.

[0158] Suppose that under a typical load condition, the target system conditions are as follows:

[0159] ,(17);

[0160] In the formula, These represent the power system-side condition vector and the source-side condition vector, respectively, in the input two-layer conditional diffusion model.

[0161] Step 32: Input the target condition vector and the target background condition vector into the two-layer condition diffusion model to obtain multiple risk condition scenarios generated by the two-layer condition diffusion model.

[0162] Given background and target conditions (target system-side condition vector and target source-side condition vector), the two-layer conditional diffusion model generates... A risk condition scenario, denoted as , .

[0163] Step 33: Input each generated risk condition scenario and power system load into the operation model, simulate the operation results of the power system through the operation model, and reconstruct the reconstructed risk indicators corresponding to each risk condition scenario based on the operation results.

[0164] Each risk condition scenario and its corresponding load are generated and fed into the corresponding operational model to obtain the respective system operation results, from which the system risk index vector is reconstructed. As shown in formula (18):

[0165] (18);

[0166] In the formula, These represent 15 minutes of backup margin, uphill margin, and absolute safety margin of the route, respectively.

[0167] Step 34: Compare the reconstructed risk indicators with the target risk indicators in the target condition vector to determine the consistency between the generated multiple risk condition scenarios and the target power system risk conditions.

[0168] After obtaining the system risk conditions of the generated scenario, it is necessary to determine whether these conditions match the target conditions. Considering that the system-level indicators have been classified into levels, the following two indicators (system risk condition hit rate and deviation degree) are used to measure the degree of compliance with the system risk conditions.

[0169] The implementation of step 34 includes: taking the percentage of scenarios in which all reconstructed risk indicators in the generated multiple risk condition scenarios fall into the corresponding target risk interval as the hit rate of the generated multiple risk condition scenarios for the target risk condition of the power system; the target risk interval is the level interval in which the target risk indicator is located after the risk indicator is classified; for risk condition scenarios that do not hit the target risk interval, taking the average deviation of their reconstructed system risk indicators relative to the boundary of the target risk interval as the degree of deviation of the generated multiple risk condition scenarios for the target risk condition of the power system.

[0170] Specifically:

[0171] Let the set of indicators for participating in the power system (including power system operation risk indicators and output characteristic indicators) be . ,index Set the target interval as , Indicates the first Each generated risk condition scenario sample (each generated risk condition scenario is considered a scenario sample) and its corresponding load are fed into the operational simulation model, along with the resulting indicators. The result above. If If the value falls within the target range, the indicator is considered to have hit the target.

[0172] The single indicator hit determination formula is shown in equation (19), which is used to characterize whether a certain system indicator has successfully fallen into the target interval.

[0173] (19);

[0174] Therefore, the hit rate of power system risk conditions can be expressed by formulas (20) and (21):

[0175] (20);

[0176] In the formula, Let M represent the system risk hit rate of the m-th scenario sample, and M represent the total number of scenario samples.

[0177] ,(twenty one);

[0178] In the formula, This represents the overall hit rate of the power system risk conditions, that is, the hit rate of the generated M scenario samples for the system risk conditions. This represents the total number of valid scenario samples that participated in the verification.

[0179] The degree of deviation is used to characterize the overall distance between the missed samples and the target interval, thus compensating for the deficiency of hit rate indicators, which can only reflect whether the target has been reached but not how much deviation there is. For the missed samples... The first sample The degree of deviation for each indicator can be defined as:

[0180] ,(twenty two);

[0181] Therefore The total systematic deviation for a sample is defined as:

[0182] ,(twenty three);

[0183] Therefore, by averaging over all feasible samples, we obtain the formula for the average system deviation:

[0184] , (twenty four).

[0185] In summary, by re-inputting the generated risk condition scenarios into the running model for closed-loop verification, the consistency between the generated risk condition scenarios and the risk conditions of the target system can be further verified, thereby improving the controllability, interpretability, and engineering applicability of the risk condition scenario construction results.

[0186] This embodiment re-inputs the generated risk condition scenarios into the system operation model for back-substitution analysis and performs closed-loop verification of the power system risk results. This verifies the feasibility of the scenarios, the consistency of risks, and the degree of target hit, thereby enhancing the application value of the risk condition scenario construction results in power system risk assessment, high-risk condition identification, and operation analysis.

[0187] Example 3:

[0188] To address the problem that existing construction methods cannot accurately represent the operational risks of power systems, this application also provides a power system risk condition scenario generation device based on two-layer condition diffusion, based on the same inventive concept as Embodiment 1.

[0189] A schematic diagram of the specific structure of the device is shown below. Figure 4 As shown, it includes the following functional units:

[0190] The historical data acquisition unit 41 is used to acquire historical operating data of the power system; the historical operating data includes historical load data, historical output data of various types of clean energy, unit operating status and reserve demand data, and network structure and power flow data.

[0191] Risk indicator construction unit 42 constructs power system operation risk indicators based on the historical operation data; and constructs system-side condition vectors based on the operation risk indicators.

[0192] System operation risk indicators include reserve margin indicators, ramp-up margin indicators, and absolute safety margin indicators for the line:

[0193] The reserve margin index characterizes the power system's ability to adjust to fluctuations in clean energy output and load disturbances; the ramp-up margin index characterizes the power system's ability to cope with net load increases during adjacent adjustment periods; and the line absolute safety margin index characterizes the remaining available transmission capacity of critical lines in the power system.

[0194] The risk indicator construction unit 42 is specifically used to: classify the operational risk indicators into levels using a hierarchical classification method based on empirical distribution quantiles; the level intervals of the level classification adopt a partially overlapping setting method; and construct a system-side condition vector based on the operational risk indicators after level classification.

[0195] The output characteristic index extraction unit 43 is used to extract the output characteristic indexes of various energy sources from the historical data; and to construct a source-side condition vector based on the output characteristic indexes.

[0196] The risk condition scenario generation unit 44 is used to input the system-side condition vector, the source-side condition vector, and the background condition vector into a pre-trained two-layer condition diffusion model to obtain the risk condition scenario generated by the two-layer condition diffusion model; the risk condition scenario represents the temporal characteristics of various energy outputs under the risk state of the power system.

[0197] The two-layer conditional diffusion model includes a two-layer classifier-free guidance mechanism, wherein the first-layer guidance mechanism is used to adjust the power system operation risk state corresponding to the generated risk condition scenario, and the second-layer guidance mechanism is used to adjust the output characteristics of various energy sources in the generated risk condition scenario.

[0198] The risk condition scenario generation unit 44 is specifically used to: input the system-side condition vector, the source-side condition vector, and the background condition vector into a pre-trained two-layer condition diffusion model to obtain the risk condition scenario generated by the two-layer condition diffusion model; the background condition vector contains power grid operating environment features.

[0199] This application embodiment constructs a power system operation risk index, combining power system operation risk with the output characteristics of multiple energy types for risk condition scenario generation; and uses a two-layer conditional diffusion model with a two-layer classifier-free guidance mechanism to generate risk condition scenarios. Since this two-layer conditional diffusion model uses system-side operation risk and output-side output characteristics as conditions for noise prediction during the sampling phase, it obtains risk condition scenarios that meet the target risk conditions and output characteristic conditions; thus, the generated risk condition scenarios can improve the scenario's ability to represent the target operation risk state while ensuring the scenario's statistical characteristics and temporal change patterns.

[0200] Example 4:

[0201] To address the issue that existing evaluations of generated risk conditions mostly remain at the statistical level and lack analysis of power system operation risks, this application also provides a verification device based on the same inventive concept as Embodiment 2.

[0202] A schematic diagram of the specific structure of the device is shown below. Figure 5 As shown, it includes the following functional units:

[0203] The condition vector determination unit 51 is used to determine the target condition vector and the target background condition vector of the target power system.

[0204] The multi-risk condition scenario generation unit 52 is used to input the target condition vector and the target background condition vector into the two-layer condition diffusion model to obtain multiple risk condition scenarios generated by the two-layer condition diffusion model.

[0205] The risk indicator reconstruction unit 53 is used to input each generated risk condition scenario and power system load into the operation model, obtain the operation result of the power system through the operation model simulation, and reconstruct the reconstruction risk indicator corresponding to each risk condition scenario based on the operation result.

[0206] The comparison and verification unit 54 is used to compare the reconstructed risk indicators with the target risk indicators in the target condition vector to determine the consistency between the generated multiple risk condition scenarios and the target power system risk conditions.

[0207] The comparison and verification unit 54 is specifically used to: take the percentage of scenarios in which all reconstructed risk indicators in the generated multiple risk condition scenarios fall into the corresponding target risk interval as the hit rate of the generated multiple risk condition scenarios to the target risk condition of the power system; the target risk interval is the level interval in which the target risk indicator is located after the risk indicator is classified; for risk condition scenarios that do not hit the target risk interval, take the average deviation of their reconstructed system risk indicators relative to the boundary of the target risk interval as the degree of deviation of the generated multiple risk condition scenarios from the target risk condition of the power system.

[0208] This embodiment re-inputs the generated risk condition scenarios into the system operation model for back-substitution analysis and performs closed-loop verification of the power system risk results. This verifies the feasibility of the scenarios, the consistency of risks, and the degree of target hit, thereby enhancing the application value of the risk condition scenario construction results in power system risk assessment, high-risk condition identification, and operation analysis.

[0209] Based on the same inventive concept as the foregoing embodiments of this application, this application also provides a computing device.

[0210] like Figure 6 As shown, the computing device includes a memory 61 and a processor 62. The memory 61 can be configured to store various other data to support operation on the electronic device. Examples of such data include instructions for any application or method used to operate on the electronic device. The memory 61 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0211] The processor 62, coupled to the memory 61, is used to execute the computer program stored in the memory 61 to perform the power system risk condition scenario generation method based on two-layer condition diffusion described in the foregoing embodiments.

[0212] When the processor 62 executes the computer program, in executing a power system risk condition scenario generation method based on two-layer conditional diffusion, it constructs a power system operation risk index and uses power system operation risk and multi-type energy output characteristics together for risk condition scenario generation; and uses a two-layer conditional diffusion model with a two-layer classifier-free guidance mechanism to generate risk condition scenarios. Since this two-layer conditional diffusion model uses system-side operation risk and output-side output characteristics as conditions for noise prediction during the sampling phase, it obtains risk condition scenarios that meet the target risk conditions and output characteristic conditions; thus, the generated risk condition scenarios can improve the scenario's ability to represent the target operation risk state while ensuring the scenario's statistical characteristics and temporal change patterns.

[0213] When the processor 62 executes the computer program, in executing a verification method, it performs back-substitution analysis by re-inputting the generated risk condition scenario into the system operation model and performs closed-loop verification of the power system risk results, thereby verifying the feasibility of the scenario, the consistency of risks, and the degree of target hit, thereby enhancing the application value of the risk condition scenario construction results in power system risk assessment, high-risk operating condition identification, and operation analysis.

[0214] When the processor 62 executes the computer program in the memory 61, in addition to the functions described above, it can also perform other functions, as detailed in the descriptions of the preceding embodiments.

[0215] Furthermore, such as Figure 6 As shown, the computing device also includes other components such as a display 64, a communication component 63, a power supply component 65, and an audio component 66. Figure 6 The diagram only shows some components and does not mean that the computing device includes only these components. Figure 6 The components shown.

[0216] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a computer, can implement the methods provided in the above embodiments.

[0217] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0218] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments.

[0219] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for generating power system risk condition scenarios based on two-layer condition diffusion, characterized in that, include: Acquire historical operating data of the power system; the historical operating data includes historical load data, historical output data of various types of clean energy, unit operating status and reserve demand data, as well as network structure and power flow data; Based on the historical operating data, power system operation risk indicators are constructed, and system-side condition vectors are constructed based on the operation risk indicators. The output characteristic indicators of various energy sources are extracted from the historical data, and a source-side condition vector is constructed based on the output characteristic indicators. The system-side condition vector and the source-side condition vector are input into a pre-trained two-layer conditional diffusion model to obtain the risk condition scenario generated by the two-layer conditional diffusion model. The risk condition scenario characterizes the temporal characteristics of various energy outputs under risk conditions in the power system; The two-layer conditional diffusion model includes a two-layer classifier-free guidance mechanism, wherein the first-layer guidance mechanism is used to adjust the power system operation risk state corresponding to the generated risk condition scenario, and the second-layer guidance mechanism is used to adjust the output characteristics of various energy sources in the generated risk condition scenario.

2. The method according to claim 1, characterized in that, The system operation risk indicators include reserve margin indicators, ramp-up margin indicators, and absolute safety margin indicators for the line: The reserve margin index characterizes the power system's ability to cope with fluctuations in clean energy output and load disturbances; The ramp margin index characterizes the power system's ability to cope with net load increases during adjacent adjustment periods; The absolute safety margin index of the line represents the remaining available transmission capacity of critical lines in the power system.

3. The method according to claim 1, characterized in that, Based on the aforementioned operational risk indicators, a system-side condition vector is constructed, including: The operational risk indicators are classified into levels using a hierarchical classification method based on empirical distribution quantiles; the level intervals are set with partial overlap. Based on the operational risk indicators after the classification, a system-side condition vector is constructed.

4. The method according to claim 1, characterized in that, The system-side condition vector and the source-side condition vector are input into a pre-trained two-layer conditional diffusion model to obtain the risk condition scenarios generated by the two-layer conditional diffusion model, including: The system-side condition vector, source-side condition vector, and background condition vector are input into a pre-trained two-layer condition diffusion model to obtain the risk condition scenario generated by the two-layer condition diffusion model; the background condition vector contains characteristics of the power grid operating environment.

5. A verification method, characterized in that, The verification method is used to verify the risk condition scenario generated in claim 1, and includes: Given the target condition vector and the target background condition vector of the target power system; The target condition vector and the target background condition vector are input into the two-layer condition diffusion model to obtain multiple risk condition scenarios generated by the two-layer condition diffusion model; Each generated risk condition scenario and power system load are input into the operation model. The operation model simulates the operation results of the power system. Based on the operation results, the reconstructed risk indicators corresponding to each risk condition scenario are reconstructed. The reconstructed risk indicators are compared with the target risk indicators in the target condition vector to determine the consistency between the generated multiple risk condition scenarios and the target power system risk conditions.

6. The method according to claim 5, characterized in that, The reconstructed risk indicators are compared with the target risk indicators in the target condition vector to determine the consistency between the generated multiple risk condition scenarios and the target power system risk conditions, including: The percentage of scenarios in which all reconstructed risk indicators in the generated multiple risk condition scenarios fall into the corresponding target risk interval is taken as the hit rate of the generated multiple risk condition scenarios for the target risk conditions of the power system; the target risk interval is the level interval in which the target risk indicator is located after the risk indicators are classified. For risk condition scenarios that do not hit the target risk range, the average deviation of the reconstructed system risk index from the boundary of the target risk range is used as the degree of deviation of the generated multiple risk condition scenarios from the target risk conditions of the power system.

7. A power system risk condition scenario generation device based on two-layer condition diffusion, characterized in that, include: The historical data acquisition unit is used to acquire historical operating data of the power system; the historical operating data includes historical load data, historical output data of various types of clean energy, unit operating status and reserve demand data, as well as network structure and power flow data. The risk indicator construction unit constructs power system operation risk indicators based on the historical operation data; and constructs system-side condition vectors based on the operation risk indicators. The output characteristic index extraction unit is used to extract the output characteristic indexes of various energy sources from the historical data; and to construct a source-side condition vector based on the output characteristic indexes. The risk condition scenario generation unit is used to input the system-side condition vector and the source-side condition vector into a pre-trained two-layer condition diffusion model to obtain the risk condition scenario generated by the two-layer condition diffusion model. The risk condition scenario characterizes the temporal characteristics of various energy outputs under risk conditions in the power system; The two-layer conditional diffusion model includes a two-layer classifier-free guidance mechanism, wherein the first-layer guidance mechanism is used to adjust the power system operation risk state corresponding to the generated risk condition scenario, and the second-layer guidance mechanism is used to adjust the output characteristics of various energy sources in the generated risk condition scenario.

8. A verification device, characterized in that, The verification device is used to verify the risk condition scenario generated in claim 1, and the verification device includes: A condition vector determination unit is used to determine the target condition vector and the target background condition vector of the target power system. A multi-risk condition scenario generation unit is used to input the target condition vector and the target background condition vector into the two-layer condition diffusion model to obtain multiple risk condition scenarios generated by the two-layer condition diffusion model; The risk indicator reconstruction unit is used to input each generated risk condition scenario and power system load into the operation model, obtain the operation results of the power system through the operation model simulation, and reconstruct the reconstructed risk indicators corresponding to each risk condition scenario based on the operation results. The comparison and verification unit is used to compare the reconstructed risk indicators with the target risk indicators in the target condition vector to determine the consistency between the generated multiple risk condition scenarios and the target power system risk conditions.

9. An electronic device, characterized in that, include: A processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method as claimed in any one of claims 1-6.

10. A storage medium, characterized in that, include: The storage medium stores a program or instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-6.