A risk scenario-based power market parallel clearing method and system

By generating multidimensional risk scenarios through improved WGAN and GCN, and combining K-means++ clustering and distributed SCUC models, the computational efficiency and cross-market linkage issues in power market risk assessment are solved, achieving efficient risk assessment and decision support.

CN122264932APending Publication Date: 2026-06-23STATE GRID JIANGSU ECONOMIC RES INST +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID JIANGSU ECONOMIC RES INST
Filing Date
2026-03-23
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Traditional risk assessment methods for the electricity spot market are too time-consuming to meet the timeliness requirements of intraday rolling transactions in the electricity spot market, and cannot depict the cross-market price linkage effect, thus restricting the ability of market participants to cope with systemic risks.

Method used

A multidimensional risk scenario is generated using an improved Wasserstein generative adversarial network (WGAN), and spatiotemporal features are extracted by combining graph convolutional networks (GCN). Distributed parallel clearing calculation is achieved by using K-means++ clustering and parallel computation of the safety constraint unit portfolio (SCUC) model, and risk indicators are aggregated to quantify cross-market chain reactions.

Benefits of technology

It improves the computational efficiency of power market risk assessment, expands risk coverage, captures multiple risk coupling effects, quantifies cross-market chain reactions, and supports risk management in complex decision-making scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122264932A_ABST
    Figure CN122264932A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on risk scene's electric power market parallel clearing method and system, it is characterized by: S1, multi-dimensional risk scene synchronization generation;S2, scene space-time feature extraction;S3, scene clustering group;S4, distributed parallel clearing calculation;S5. Risk index aggregation analysis.The application improves risk coverage by scene coupling generation, solves the problem that scene and clearing calculation are separated and cannot capture multiple risk coupling effects;Through distributed architecture for clearing calculation, improve the efficiency of calculation;Through risk index, the cross-market chain reaction effect can be quantified.The application improves risk coverage by scene coupling generation, solves the problem that scene and clearing calculation are separated and cannot capture multiple risk coupling effects;Through distributed architecture for clearing calculation, improve the efficiency of calculation;Through risk index, the cross-market chain reaction effect can be quantified.
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 optimization, and in particular to a parallel clearing method and system for the power market based on risk scenarios. Background Technology

[0002] Against the backdrop of the ongoing deepening of market-oriented reforms in the power industry, the electricity spot market, as a core component of the power market system, faces extremely high demands on the decision-making and risk management of market participants due to the uncertainty of its price fluctuations. Accurately assessing price risks in the electricity spot market is crucial for power generation companies to optimize their pricing strategies, for electricity retailers to mitigate transaction losses, and for regulatory agencies to maintain market stability.

[0003] Currently, the Monte Carlo method is widely used in the risk assessment field of traditional electricity spot markets to generate single risk scenarios and to quantify market risk through sequential clearing calculations. The typical implementation process of this method includes three key steps: First, based on historical transaction data and market influencing factors, a large number of simulated price fluctuation samples are generated using random sampling techniques to cover possible market price trends; second, for each generated price fluctuation sample, the electricity market clearing model is invoked to perform sequential clearing calculations, obtaining the market clearing results for the corresponding scenario, including core parameters such as nodal marginal electricity prices and unit output allocation; finally, based on the clearing results of all samples, risk indicators such as Value at Risk (VaR) and Conditional Value at Risk (CVR) are statistically obtained to reflect the probability of loss that may result from market price fluctuations.

[0004] The shortcomings of existing technologies: As the scale of the electricity spot market expands and the complexity of trading instruments increases, the aforementioned traditional methods have gradually revealed significant deficiencies. On the one hand, serial clearing calculations require independent clearing operations for each price sample. When the number of samples reaches thousands or even tens of thousands, the overall calculation time increases dramatically, often requiring hours or even days to complete a full assessment, making it difficult to meet the timeliness requirements of intraday rolling trading and hourly decision updates in the electricity spot market. On the other hand, existing risk indicators can only reflect the probability of loss in a single market dimension and cannot characterize the price linkage effect between the electricity spot market and the medium- and long-term contract market and ancillary service market. This makes it difficult for the assessment results to support complex decision-making scenarios such as cross-market arbitrage and portfolio risk management, thus restricting the ability of market participants to cope with systemic risks. Summary of the Invention

[0005] In view of the above problems, the present invention provides a parallel clearing method and system for the electricity market based on risk scenarios, the main purpose of which is to solve the clearing efficiency problem in the electricity market.

[0006] To achieve the above-mentioned objectives, the technical solution adopted by this invention is: a parallel clearing method for the electricity market based on risk scenarios, the specific steps of which are as follows: Step S1: Multi-dimensional risk scenarios are generated simultaneously; Historical price data, unit parameters, and grid topology are acquired. A set of coupled risk scenarios is generated through a generative adversarial network (WGAN), and a three-dimensional scenario matrix containing price fluctuations, load deviations, and unit failures is output. S11. Data acquisition and preprocessing; S12. Risk scenario generation based on improved WGAN; S13. Train the Generative Adversarial Network (WGAN); Step S2: Scene spatiotemporal feature extraction; The 3D scene matrix is ​​input into the graph convolutional network (GCN) to extract the spatiotemporal correlation feature vectors and output a feature matrix with a dimension of 256. S21. Data preprocessing; S22. Construction of Graph Convolutional Network (GCN); S23. Multi-channel spatiotemporal feature fusion; S24. Output after compression of the fully connected layer; Step S3: Scene clustering and grouping; The K-means++ clustering algorithm is executed based on the feature matrix to generate N typical scenario clusters and establish a scenario cluster index table. The goal is to cluster high-dimensional spatiotemporal feature vectors into typical scenario clusters, reduce the computational complexity of subsequent clearing, and retain key risk features. S31. Data preprocessing; S32. Improved K-means++ algorithm; S33. Clustering Iterative Optimization; S34. Post-processing of clustering results; Step S4: Distributed parallel clearing calculation; Each scenario cluster is assigned to a cloud computing node, and the Security Constraint Unit Combination (SCUC) model is solved in parallel to output the clearing results of each cluster. The goal is to solve the Security Constraint Unit Combination (SCUC) model in parallel for the clustered typical scenario clusters to accelerate batch clearing. S41. Input data preparation; S42. Construct the SCUC model; S43. Distributed solution; Step S5. Risk indicator aggregation analysis; Aggregate the clearing results of each cluster, calculate the cross-market Value at Risk (VaR) and cascading reaction coefficient, and generate a risk heatmap; S51. Input data integration; S52. Value at Risk (VaR) calculation for a single market; S53. Construct a cross-market chain effect matrix; S54. Risk heatmap generation; S55. Output risk heat map.

[0007] This invention also discloses a parallel clearing system for the electricity market based on risk scenarios, characterized in that: The multi-dimensional risk scenario synchronous generation module is used to perform the above step S1; The scene spatiotemporal feature extraction module is used to perform step S2 above; The scene clustering module is used to perform step S3 above; The distributed parallel clearing calculation module is used to execute step S4 above; The risk indicator aggregation and analysis module is used to perform step S5 as described above.

[0008] The present invention also discloses a computer program product, including a computer program, characterized in that, when the computer program is executed by a processor, it implements the invention's parallel clearing method for the electricity market based on risk scenarios. Beneficial effects

[0009] This invention discloses a parallel clearing method and system for the electricity market based on risk scenarios. 1. It enhances risk coverage through scenario coupling, addressing the problem of separating scenario and clearing calculations, which fails to capture the coupling effects of multiple risks. 2. It improves computational efficiency through a distributed architecture for clearing calculations. 3. It quantifies cross-market chain reaction effects through risk indicators. Attached Figure Description

[0010] Figure 1 This is a schematic diagram of the parallel clearing method for the electricity market based on risk scenarios implemented in this invention. Detailed Implementation

[0011] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0012] The parallel clearing method for the electricity market based on risk scenarios in this embodiment is achieved through, as follows: Figure 1 The flowchart shown illustrates the processing architecture for implementing parallel clearing of the electricity market based on risk scenarios. The specific steps are as follows: S1. Multi-dimensional risk scenarios are generated simultaneously.

[0013] Historical price data, unit parameters, and grid topology are acquired. A set of coupled risk scenarios is generated through an improved Wasserstein generative adversarial network (WGAN), and a three-dimensional scenario matrix containing price fluctuations, load deviations, and unit failures is output.

[0014] S11. Data Acquisition and Preprocessing.

[0015] Among these, historical price data (timestamp, nodal price, transaction volume) can be obtained from power trading platforms or power data service platforms; unit parameters (start-up and shutdown costs, ramp-up rate, price curve) can be obtained from information disclosures on power trading platforms or power generation companies; and grid topology (branch impedance, node connection relationship) can be obtained from power grid companies or open source data platforms.

[0016] In electricity market transactions, the price quote curve is a curve model submitted to the market by power generation companies or electricity sales companies, reflecting the "correspondence between price and tradable electricity volume (or power). It is one of the core bases for market clearing and price formation.

[0017] In electricity market clearing calculations, when the clearing party (usually referring to the market operator or dispatch center) clears the market, it needs to conduct calculations based on key data across the entire market. Essentially, it is an economic dispatch optimization problem with security constraints, which must simultaneously satisfy: the balance of electricity supply and demand in the entire market (power generation = electricity consumption + network loss); the technical constraints of all generating units (such as upper and lower limits of output, ramping constraints); and the security constraints of the entire network (such as line transmission capacity, voltage stability, etc.).

[0018] Therefore, the clearing party must integrate the unit parameters of the entire market and the complete grid topology in order to obtain an economically secure clearing result through optimization algorithms (such as linear programming and mixed integer programming).

[0019] After obtaining the above data, the data is preprocessed as follows: First, standardize the historical price data: , This is the original electricity price (yuan / MWh). It is the standardized electricity price. Historical average price The standard deviation is denoted as .

[0020] Then, the network topology is parsed into a CIM / XML file, and a node-branch association matrix is ​​constructed. n is the number of nodes, and m is the number of branches.

[0021] S12. Risk scenario generation based on improved WGAN.

[0022] 1. Generator Structure Design The generator takes a 100-dimensional Gaussian noise vector z as input, which follows a normal distribution. The output is a three-dimensional scene matrix, where the first dimension represents the price fluctuation ΔP ∈ [-30%, +30%] at T time points, the second dimension represents the load deviation ΔD ∈ [-15%, +15%] at T time points, and the third dimension represents the fault status F ∈ {0, 1} of all units at T time points. Generally, T can be set to 8760, in hours, corresponding to simulating 365 days or 1 year of data to generate a near-realistic risk scenario.

[0023] To avoid excessive computation, the vectors corresponding to the fault states of all units at T time points can be compressed, F= · + , , These are the trainable weight matrix and the bias matrix, respectively. It is the embedding vector of all unit fault states.

[0024] The generator in WGAN is essentially a "mapping function," that is, learning and mapping from a 100-dimensional random noise space to a 3-dimensional target data space. Through adversarial training with a discriminator (which distinguishes between generated and real data), the generator can eventually produce a 3-dimensional matrix that is highly similar to the distribution of real data, thus simulating or generating the target data (risk market scenario).

[0025] 2. Improved spectral normalization of the discriminator Traditional WGAN uses weight pruning to control gradients, restricting the discriminator weights to a fixed interval to satisfy the "Lipschitz continuity" constraint and ensure that the Wasserstein distance is computable. However, weight pruning forces the parameter distribution to be concentrated in a narrow interval, which limits the discriminator's ability (such as its inability to learn complex features) and exacerbates training instability. More seriously, it can easily lead to mode collapse, that is, in order to "deceive" the discriminator, the generator only generates a few seemingly "successful" samples (rather than covering all the patterns of the real data).

[0026] This embodiment uses spectral normalization to constrain the discriminator weight matrix W: , It is the spectral norm (maximum singular value) of W.

[0027] Spectral normalization is an alternative constraint method to weight clipping, which satisfies Lipschitz continuity by limiting the spectral norm of the discriminator weight matrix.

[0028] Spectral normalization, by limiting the maximum magnification factor of the matrix, satisfies the Lipschitz constraint while preserving the relative proportions of the weight matrix. This allows the discriminator to learn the multi-dimensional features of the data more evenly, avoiding over-reliance on a few features. If the discriminator can evenly identify multiple data patterns, the generator cannot win by "generating only a few patterns." In this case, the generator must learn the complete distribution of the real data (covering all patterns) to avoid being identified by the discriminator in adversarial situations, fundamentally suppressing pattern collapse.

[0029] 3. Loss Function Coupling Mechanism Introduce a price-load coupling term into the loss function of WGAN: , is the coupling strength coefficient, empirically taken as 0.5; Cov is the covariance calculation function.

[0030] S13. Train WGAN.

[0031] 1. Initialization: The weights of the generator and discriminator are initialized using a He normal distribution.

[0032] 2. Combat training: Discriminator update: Calculate the Wasserstein distance between the real scene and the generated scene: , Generator update: Min , The generator's goal is to minimize -D(G(z)), which is equivalent to maximizing D(G(z)), that is, to make the generated samples as much as possible as possible to be judged as "real data" by the discriminator. This is the core logic of the generator's battle against the discriminator.

[0033] 3. Termination conditions: 5000 training iterations or discriminator loss fluctuation <1e-5.

[0034] S2, Scene Spatiotemporal Feature Extraction.

[0035] The 3D scene matrix is ​​input into a graph convolutional network (GCN) to extract spatiotemporal correlation feature vectors and output a feature matrix with a dimension of 256.

[0036] S21. Data preprocessing.

[0037] For the 3D scene matrix M ∈ generated in step S1 The elements of each dimension in the matrix are standardized using the formula S1. N represents the number of scenes.

[0038] S22. Construction of Graph Convolutional Networks (GCNs) Based on the impedance between nodes in the power grid topology (mainly substations / power plants in this embodiment), an adjacency matrix is ​​established. ,in, Let be the impedance between node i and node j. This is the attenuation coefficient, empirically set to 0.2, used to control the correlation strength.

[0039] The GCN layer in GCN is represented as follows: , To add a self-loop adjacency matrix, for The degree matrix, For the features of the l-th layer nodes, For a trainable weight matrix, This is the activation function.

[0040] S23. Multi-channel spatiotemporal feature fusion 1. Spatiotemporal Separation Convolution Temporal convolutional layers for capturing dynamic evolution: A one-dimensional convolutional kernel K is applied independently to each risk dimension of M, and feature extraction is performed using a 24-hour sliding window to obtain temporal features. The time feature means compressing hours into (T / 24) days (e.g., compressing 8760 hours into 365 days), with each day containing 3 risk dimensions (price / load / failure), and each dimension having C feature channels.

[0041] Spatial graph convolutional layers for capturing node associations: incorporating temporal features Inputting GCN, the neighborhood information is aggregated according to the power grid topology to obtain the spatial features output by GCN. The spatial characteristics refer to the C-dimensional risk characteristics of each power grid node on a daily basis.

[0042] 2. Cross-dimensional attention mechanism Attention weight calculation: , Let k be the attention weights in dimension k of the 3D scene matrix. Let g be the feature vector of the k-th risk dimension, g be the mean of the global spatiotemporal features, and v be the feature vector of the k-th risk dimension. The parameters are trainable, and tanh() is the activation function. For feature concatenation operations, exp() is an exponential function.

[0043] Global spatiotemporal feature mean , Feature fusion output: , S24. Output after compression of fully connected layer , The final output is the scene's spatiotemporal features. For the dimensionality reduction weight matrix, The parameter is the bias parameter, and Flatten() is the flattening operation.

[0044] Finally, output the spatiotemporal features of N scenes. Each scene corresponds to a 256-dimensional vector.

[0045] S3, Scene Clustering.

[0046] The K-means++ clustering algorithm is executed based on the feature matrix to generate N typical scenario clusters, and a scenario cluster index table is established. The goal is to cluster high-dimensional spatiotemporal feature vectors into typical scenario clusters, reducing the computational complexity of subsequent clearing calculations while retaining key risk features.

[0047] S31. Data preprocessing, same as S21.

[0048] S32. Improved K-means++ algorithm.

[0049] 1. Initial cluster center selection First, calculate the risk exposure of scenario i. , For the spatiotemporal characteristics of scene i, The risk-sensitive weight vector (the weight ratio of price fluctuation, unit failure and other dimensions is 2:1.5:0.8 (which can be appropriately changed) to amplify the contribution of price fluctuation and unit failure dimensions. This weight vector can be obtained through training. For element-wise multiplication, It is an L2 norm.

[0050] Then, the scenario with the highest risk exposure, i.e., the highest risk, is selected as the first center; then, the Euclidean distance Di between each scenario and the first center is calculated, and the probability distribution of scenario i as a subsequent center is calculated based on the distance. j represents the index of other scenarios besides the one corresponding to the first center.

[0051] Then put all the scenes By sequentially accumulating the values, a "probability bucket" is constructed within the interval [0,1]. A random number between 0 and 1 is generated, and the scene that falls within that interval is selected as the new center. The scene closest to the center is selected as the representative scene for each cluster.

[0052] The relationship between the number of cluster centers K and the number of original scenes N satisfies: For example, when N=10000, K=4.

[0053] 2. Distance metric based on risk similarity In this embodiment, to enhance the clustering distinction between price fluctuations and unit failures, the following formula is used to calculate the distance between scenario i and cluster center j: S33. Clustering Iterative Optimization 1. Based on Each scene is assigned to the nearest cluster center to form an initial cluster.

[0054] 2. Calculate the mean of all scenes in each cluster as the new center and redistribute the scenes.

[0055] 3. The cluster center movement distance is less than the threshold ϵ=10 −5 The iteration may terminate when the maximum number of iterations (100) is reached.

[0056] S34. Post-processing of clustering results.

[0057] Generate a scene cluster index table to record the cluster number to which each scene belongs; select the scene closest to the center of each cluster as the representative scene.

[0058] S4, Distributed Parallel Clearing Calculation.

[0059] Each scenario cluster is assigned to a cloud computing node, and the Security Constrained Group Combination (SCUC) model is solved in parallel, outputting the clearing results for each cluster. The goal is to accelerate batch clearing by solving the Security Constrained Group Combination (SCUC) model in parallel for clustered typical scenario clusters.

[0060] S41. Input data preparation.

[0061] The input data includes the scenario cluster index table output in step S3, unit parameters (minimum output, maximum output, and ramp rate), network constraints (line capacity, node phase angle limits), and the price quotation curve for unit i. .

[0062] S42. Construct the SCUC model.

[0063] The objective function is to minimize the total running cost, and its expression is: , T represents the number of scheduling periods. For the number of units, Let i be the output of unit i during time period t. These represent the start-up and shutdown costs of unit i during time period t, respectively.

[0064] Constraints include common power balance constraints (sum of unit output = load + network loss), unit output limits (output is between the maximum and minimum values), and ramp constraints (unit power change is less than ramp rate).

[0065] This embodiment adds a risk scenario coupling constraint, which can constrain the fluctuation range of unit output within each scenario cluster, ensuring that the risk is controllable. The expression for this constraint is: , Where s is a sub-scene in scene cluster k, The weight of scene s is (1 / distance between scene s and cluster center). The baseline output of unit i (the optimized value under the risk-free scenario, i.e., the result of solving the SCUC model without considering the coupling constraints of the risk scenario). It is the risk tolerance of unit i in cluster k. This represents the maximum risk deviation of unit i.

[0066] Risk tolerance Failure rate i is the historical failure probability of unit i. This represents the risk level of cluster k, specifically the average risk exposure within the cluster. This is the scaling factor, with a default value of 10. For example, the risk tolerance for high-failure-rate units in the risk cluster is 0.9, allowing for larger fluctuations.

[0067] Maximum risk deviation , is a system-level coefficient, empirically taken as 0.3; The system influence coefficient of unit i is preset and is used to indicate the influence of unit i on the system relative to all units.

[0068] S43. Distributed solution.

[0069] 1. Task allocation strategy.

[0070] The scheduler in the master compute node accepts all scene cluster tasks and then distributes the tasks to child compute nodes for distributed computing, on a scene cluster basis. Scene cluster tasks are defined based on the scene cluster index table, and a clearing task is set for each cluster k, that is, each type of scene.

[0071] The allocation rules are as follows: , This allows for the priority allocation of high-computing-power nodes to high-risk clusters. This represents the computing power of node j.

[0072] 2. Parallel Solution. The master compute node sends the corresponding scenario cluster data and SCUC model to the sub-compute nodes; each sub-compute node calls a mixed integer programming solver (such as CPLEX) to solve the SCUC model; after aggregation, the master compute node outputs the unit combination scheme for each cluster. , This indicates the start / stop status of unit i in scenario s. This represents the output of unit i in scenario s.

[0073] S5. Risk indicator aggregation analysis.

[0074] Aggregate the clearing results of each cluster, calculate the cross-market Value at Risk (VaR) and cascading reaction coefficient, and generate a risk heatmap.

[0075] S51. Input data integration.

[0076] The input data includes the results of distributed computing and the scenario clearing result sets output by each sub-computing node. , This represents the electricity price of node n in time period t and scenario s; it also includes the weight of scenario cluster k calculated through step S3. , Let N be the number of scenes in scene cluster k, and N be the total number of scenes.

[0077] S52. Value at Risk (VaR) calculation for a single market.

[0078] 1. Calculate revenue for each scenario , The net injection power of node n in scenario s during time period t. For the cost of generating electricity.

[0079] Here, the returns are calculated separately for each market (mainly intraday, day-to-day, and real-time markets) based on the number and length of time periods. It includes the income and expenditure of a corresponding market m, independent of other markets.

[0080] 2. Sort scenarios in ascending order of scenario returns, and take the return of the scenario with a ranking of 0.05N as the risk value of a single market. VaR is used to measure the "maximum possible loss" in a financial market (or a single market) at a certain confidence level. This formula means that with a 95% probability, the maximum loss is the [ranking value]. Benefits in the following scenarios.

[0081] S53. Constructing a cross-market chain effect matrix 1. Define market correlation strength, which is used to quantify the strength of the transmission of a market risk event to other markets.

[0082] , Let m be the scenario revenue sequence for market m. The electrical distance between markets (based on the shortest path). The attenuation coefficient is... Let be the standard deviation of the market m-return series.

[0083] 2. Construct a chain effect index.

[0084] , in, For the deviation of market m1 in cluster k from the benchmark value, The return of market m1 in a risk-free scenario (obtained from historical data). , Let m be the average return of market m1 in cluster k.

[0085] S54. Risk heatmap generation.

[0086] 1. Define the x-axis as the risk type (price fluctuation / load deviation / unit failure) and the y-axis as the market dimension (intraday market / day-ahead market / real-time market).

[0087] 2. Colorimetric value calculation: ,in, For cluster k, the VaR of risk type r in market m. These represent the historical maximum and minimum VaR for market m, respectively.

[0088] S55. Output risk heat map.

[0089] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. 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 of the technical features, and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A parallel clearing method for the electricity market based on risk scenarios, characterized in that, The specific steps are as follows: S1. Multi-dimensional risk scenarios are generated simultaneously; Historical price data, unit parameters, and grid topology are acquired. A set of coupled risk scenarios is generated through a generative adversarial network (WGAN), and a three-dimensional scenario matrix containing price fluctuations, load deviations, and unit failures is output. S2. Scene spatiotemporal feature extraction; The 3D scene matrix is ​​input into the graph convolutional network (GCN) to extract the spatiotemporal correlation feature vectors and output a feature matrix with a dimension of 256. S3, Scene Clustering and Grouping; The K-means++ clustering algorithm is executed based on the feature matrix to generate N typical scene clusters and to establish a scene cluster index table. The goal is to cluster high-dimensional spatiotemporal feature vectors into typical scenario clusters, thereby reducing the computational complexity of subsequent clearing while retaining key risk features. S4, Distributed parallel clearing computation; Each scenario cluster is assigned to a cloud computing node, and the Security Constraint Unit Combination (SCUC) model is solved in parallel to output the clearing results of each cluster. The goal is to solve the Security Constraint Unit Combination (SCUC) model in parallel for the clustered typical scenario clusters to accelerate batch clearing. S5. Risk indicator aggregation analysis; Aggregate the clearing results of each cluster, calculate the cross-market Value at Risk (VaR) and cascading reaction coefficient, and generate a risk heatmap.

2. The parallel clearing method for the electricity market based on risk scenarios according to claim 1, characterized in that, Step S1 specifically includes: S11. Data acquisition and preprocessing; Obtain historical price data from power trading platforms or power data service platforms; obtain unit parameters from information disclosures on power trading platforms or power generation companies; obtain grid topology from power grid companies or open-source data platforms; In electricity market clearing calculations, when the clearing party performs the clearing process, it integrates the unit parameters and complete grid topology of the entire market and preprocesses the data: First, standardize the historical price data: , This is the original electricity price (yuan / MWh). It is the standardized electricity price. Historical average price Standard deviation; Then, the network topology is parsed into a CIM / XML file, and a node-branch association matrix is ​​constructed. n is the number of nodes, and m is the number of branches; S12. Risk scenario generation based on improved WGAN; The generator structure is designed as follows: the input to the generator is a 100-dimensional Gaussian noise vector z, which follows a normal distribution; the output is a three-dimensional scene matrix, where the first dimension is the price fluctuation ΔP ∈ [-30%, +30%] at T time points, the second dimension is the load deviation ΔD ∈ [-15%, +15%] at T time points, and the third dimension is the fault status F of all units at T time points F ∈ {0,1}; through adversarial training with the discriminator, the generator can eventually produce a 3-dimensional matrix that is highly similar to the distribution of real data, thus simulating or generating the target data. Discriminator Spectral Normalization Improvement: Spectral normalization is used to constrain the discriminator weight matrix W. , It is the spectral norm of W; Loss function coupling mechanism: Introduce a price-load coupling term into the loss function of the Generative Adversarial Network (WGAN). , is the coupling strength coefficient, empirically taken as 0.5; Cov is the covariance calculation function; S13. Train the Generative Adversarial Network (WGAN); Initialization: The weights of the generator and discriminator are initialized using a He normal distribution; Adversarial Training: Discriminator Update: Calculating the Wasserstein distance between the real scene and the generated scene. , Generator update: Min , The generator's goal is to minimize -D(G(z)), which is equivalent to maximizing D(G(z)), that is, to make the generated samples as much as possible as possible to be judged as "real data" by the discriminator; Termination condition: 5000 training iterations or discriminator loss fluctuation <1e-5.

3. The parallel clearing method for the electricity market based on risk scenarios according to claim 1, characterized in that, Step S2 specifically includes: S21. Data preprocessing; For the 3D scene matrix M ∈ generated in step S1 The elements of each dimension in the matrix are standardized, where N is the number of scenes; S22. Construction of Graph Convolutional Network (GCN); Based on the impedance between nodes in the power grid topology, establish an adjacency matrix. ,in, Let be the impedance between node i and node j. This is the attenuation coefficient, empirically set to 0.2, used to control the correlation strength; The GCN layer in a graph convolutional network (GCN) is represented as follows: , To add a self-loop adjacency matrix, for The degree matrix, For the features of the l-th layer nodes, For a trainable weight matrix, For activation functions; S23. Multi-channel spatiotemporal feature fusion; Global spatiotemporal feature mean , Feature fusion output: , S24. Output after compression of the fully connected layer; , The final output is the scene's spatiotemporal features. For the dimensionality reduction weight matrix, The bias parameter is Flatten(), which is the flattening operation; Finally, output the spatiotemporal features of N scenes. Each scene corresponds to a 256-dimensional vector.

4. The parallel clearing method for the electricity market based on risk scenarios according to claim 1, characterized in that, Step S3 specifically includes: S31. Data preprocessing; S32. Improved K-means++ algorithm; Calculate the distance between scene i and cluster center j. ; S33. Clustering Iterative Optimization; based on Each scene is assigned to the nearest cluster center to form an initial cluster; Calculate the mean of all scenes in each cluster as the new center, and redistribute the scenes; The cluster center movement distance is less than the threshold ϵ=10 −5 The iteration may terminate when the maximum number of iterations is reached. S34. Post-processing of clustering results; Generate a scene cluster index table to record the cluster number to which each scene belongs; select the scene closest to the center of each cluster as the representative scene.

5. The parallel clearing method for the electricity market based on risk scenarios according to claim 1, characterized in that, Step S4 specifically includes: S41. Input data preparation; S42. Construct the SCUC model; S43. Distributed solution; Task allocation strategy: The scheduler in the master computing node accepts all scene cluster tasks and then allocates the tasks to the sub-computing nodes for distributed computing on a scene cluster basis. Parallel solution: The master compute node sends the corresponding scenario cluster data and SCUC model to the sub-compute nodes; each sub-compute node calls the mixed integer programming solver to solve the SCUC model; after aggregation, the master compute node outputs the unit combination scheme for each cluster. , This indicates the start / stop status of unit i in scenario s. This represents the output of unit i in scenario s.

6. The parallel clearing method for the electricity market based on risk scenarios according to claim 5, characterized in that, In step S42, the SCUC model is constructed: The objective function is to minimize the total running cost: , T represents the number of scheduling periods. For the number of units, Let i be the output of unit i during time period t. These represent the start-up and shutdown costs of unit i during time period t, respectively. Risk tolerance Failure rate i is the historical failure probability of unit i. For the risk level of cluster k, This is the scaling factor; Maximum risk deviation , which are system-level coefficients. This is the system influence coefficient for the preset unit i.

7. The parallel clearing method for the electricity market based on risk scenarios according to claim 1, characterized in that, Step S5 specifically includes: S51. Input data integration; The input data includes the results of distributed computing and the scenario clearing result sets output by each sub-computing node. , This represents the electricity price of node n in time period t and scenario s; it also includes the weight of scenario cluster k calculated through step S3. , Let N be the number of scenes in scene cluster k, and N be the total number of scenes. S52. Value at Risk (VaR) calculation for a single market; S53. Construct a cross-market chain effect matrix; S54. Risk heatmap generation; S55. Output risk heat map.

8. The parallel clearing method for the electricity market based on risk scenarios according to claim 7, characterized in that, In step S54, the risk heatmap is generated: Define the x-axis as the risk type and the y-axis as the market dimension; Colorimetric value calculation: ,in, For cluster k, the VaR of risk type r in market m. These represent the historical maximum and minimum VaR for market m, respectively.

9. A parallel clearing system for the electricity market based on risk scenarios, characterized in that: A multi-dimensional risk scenario synchronous generation module is used to perform step S1 as described in claim 1; A scene spatiotemporal feature extraction module is used to perform step S2 as described in claim 1; The scene clustering module is used to execute step S3 as described in claim 1; A distributed parallel clearing calculation module is used to execute step S4 as described in claim 1; The risk indicator aggregation and analysis module is used to perform step S5 as described in claim 1.

10. A computer program product comprising a computer program, characterized in that, When executed by a processor, the computer program implements the parallel clearing method for the electricity market based on any one of claims 1-8.