A method and system for constructing and checking a day-ahead security-constrained dispatch scenario of a power system

CN122926048APending Publication Date: 2026-10-16ELECTRIC POWER RESEARCH INSTITUTE OF STATE GRID SHANDONG ELECTRIC POWER COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611061238.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-16
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

对于电网现货日前市场样本而言,初始中心若落在常规运行状态附近,则高电价、负电价、严重阻塞等样本可能无法形成有效簇;初始中心若过于偏向极端样本,又可能导致常规样本簇划分不稳定

Benefits of technology

本公开的一种电力系统日前安全约束出清场景构建校核方法,采用一种磷虾群聚类方法,将磷虾群中的每一只磷虾个体编码为一组候选聚类中心,并以市场约束加权类内离差、价格波动一致性、时序曲线相似性、极端样本覆盖惩罚和类间分离度构建综合适应度函数;通过诱导运动、觅食运动、随机扩散、优选个体选择、市场状态保持型交叉及自适应变异迭代更新候选聚类中心;在满足终止条件后输出最优聚类中心、代表性日前市场样本及其发生概率。能够降低传统聚类方法对初始聚类中心的依赖,提高高维、非线性、多峰、不同密度日前市场样本的聚类稳定性,并增强高电价、负电价、严重阻塞和备用不足等低概率高影响样本的保留能力,可用于日前市场出清仿真、报价策略评估、价格风险识别和电网运行方式校核。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122926048A_ABST
    Figure CN122926048A_ABST
Patent Text Reader

Abstract

The present disclosure provides a power system day-ahead security constraint clearing scenario construction and checking method and system, relates to the technical field of power spot market data analysis, and comprises the following steps: acquiring multi-source sample data of a power grid spot day-ahead market, and constructing an initial sample set; constructing a day-ahead market sample feature vector based on the multi-source sample data; clustering based on the day-ahead market sample feature vector by adopting a brine shrimp swarm clustering method, constructing a comprehensive fitness function according to market constraint weighted intra-class dispersion, price fluctuation consistency, time sequence curve similarity, extreme sample coverage penalty and inter-class separation degree; outputting an optimal clustering center after a termination condition is met, and generating a day-ahead market representative sample set and its occurrence probability according to the optimal clustering center. The present disclosure can reduce the dependence of a traditional clustering method on an initial clustering center, and improve the clustering stability of high-dimensional, nonlinear, multi-peak and different density day-ahead market samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of electricity spot market data analysis technology, specifically to a method and system for constructing and verifying a day-ahead security constraint clearing scenario in the power system. Background Technology

[0002] The statements in this section are merely background information relating to this disclosure and do not necessarily constitute prior art.

[0003] Due to the significant uncertainties in power system operation and market trading behavior, market operators, power generation companies, electricity retailers, and dispatching agencies typically need to utilize large amounts of historical samples for day-ahead market simulation, price risk assessment, pricing strategy analysis, and operational mode verification. Directly using the entire sample set results in a large computational burden for clearing simulations and makes interpretation of results difficult, while simply manually selecting typical days can easily overlook key risk scenarios. Therefore, it is necessary to construct a sample clustering optimization method that can balance statistical representativeness, market operation mechanisms, and coverage of extreme risks.

[0004] Many sample clustering optimization methods have been studied for effective sample selection, but they still have the following limitations: (1) Existing K-means clustering methods are easy to calculate, but usually require the initial cluster centers to be given in advance. For the day-ahead market samples of the power grid spot market, if the initial centers fall near the normal operating conditions, samples with high electricity prices, negative electricity prices, severe congestion, etc. may not be able to form effective clusters; if the initial centers are too biased towards extreme samples, it may lead to unstable clustering of normal samples.

[0005] (2) Existing clustering methods based on Euclidean distance usually treat all features as equally important, making it difficult to reflect the different contributions of different market variables to the similarity of samples. If two samples are similar in system load, but one has transmission section blockage and forms nodal price differentiation, while the other does not have blockage, then they should not be simply classified into the same category in terms of market operation.

[0006] (3) Existing clustering methods are not good at retaining extreme samples. The number of samples with high electricity prices, negative electricity prices, insufficient reserves and blockages in the current market is usually small. In the clustering process with the main goal of minimizing intra-class error, these samples are easily absorbed into the larger number of regular sample clusters, resulting in the lack of key risk scenarios in the final representative sample set.

[0007] (4) Although the existing intelligent optimization clustering method has a certain global optimization capability, if it is not modified in combination with the business characteristics of the electricity spot market, its fitness function still mainly focuses on the sample distance in a mathematical sense, without considering the consistency of electricity price fluctuations, transmission congestion constraints, reserve margin constraints, uncertainty of new energy output and day-ahead time series curve shape.

[0008] (5) Existing representative sample output methods typically only output cluster labels and abstract cluster centers. However, the abstract centers may not correspond to actual trading days or trading periods, making it difficult to directly input them into the day-ahead market clearing procedure. Some methods do not simultaneously provide the probability of representative sample occurrence, the coverage ratio of extreme samples, and market state labels, resulting in a lack of necessary probability weights and explanatory information for subsequent market simulation, risk assessment, and pricing strategy analysis. Summary of the Invention

[0009] To address the aforementioned issues, this disclosure proposes a method and system for constructing and verifying a day-ahead safety constraint clearing scenario in the power system. It provides a comprehensive fitness function that incorporates market operation characteristics, enabling the clustering process to consider not only the mathematical distance between samples but also market constraint weighted intra-class deviation, price fluctuation consistency, time series curve similarity, extreme sample coverage penalty, and inter-class separation. This results in clustering results that better align with actual market operation mechanisms.

[0010] According to some embodiments, the present disclosure adopts the following technical solutions: A method for constructing and verifying a day-ahead security constraint clearing scenario for a power system includes: Obtain multi-source sample data from the day-ahead spot market of the power grid and construct an initial sample set; Construct a feature vector for the current market sample based on multi-source sample data; Based on the feature vector of the current market sample, the krill swarm clustering method is used for clustering. A comprehensive fitness function is constructed based on market constraint weighted intra-class deviation, price fluctuation consistency, time series curve similarity, extreme sample coverage penalty and inter-class separation. Candidate cluster centers are updated based on krill swarm induced movement, foraging movement, and random diffusion; preferred individuals are selected according to fitness ranking, and market state-preserving crossover and adaptive mutation are performed on the preferred individuals and other krill individuals to generate new candidate cluster centers; Boundary repair and market constraint verification are performed on the new candidate cluster centers; the optimal cluster center is output after the termination condition is met, and a representative sample set of the current day's market and its occurrence probability are generated based on the optimal cluster center.

[0011] As one embodiment, the multi-source sample data includes historical sample data, predicted sample data, and external impact data. The historical sample data, predicted sample data, and external impact data include system load, zonal load, nodal load, predicted wind power output, predicted photovoltaic output, available capacity of conventional units, unit quotation data, electricity volume declared by market entities, price declared by market entities, planned power of tie lines, system reserve capacity, zonal reserve capacity, transmission section load factor, nodal price, zonal price, system marginal price, congestion price, ancillary service price, temperature, humidity, wind speed, irradiance, and holiday indicators.

[0012] As one embodiment, the construction of the current day market sample feature vector based on multi-source sample data includes: A day-ahead market sample feature vector is constructed using trading days, trading hours, nodes, zones, or combinations of trading days and trading hours as sample units. The day-ahead market sample feature vector includes basic features and derived features. The basic features include load, renewable energy output, market clearing price, tie line power, reserve capacity, and cross-sectional load factor. The derived features include net load, renewable energy penetration rate, load ramp rate, price peak-to-valley difference, price volatility, reserve margin, congestion severity, number of high-price periods, number of low-price or negative-price periods, price curve slope, supply and demand tension, and node price difference.

[0013] As one embodiment, preprocessing of the feature vector of the current market sample includes: For missing data, different repair strategies are adopted according to the data type. For continuous operation data, interpolation between adjacent time periods, interpolation of the same type of day, or historical similar day repair are used; for discrete status data, business rules are used to complete the data. For outlier data, they are identified by a combination of market rules and statistical methods. Samples identified as true extreme market conditions are included in the extreme sample set and retained in subsequent clustering. For features of different dimensions, normalization or standardization is used, and a standardized sample set is obtained after preprocessing.

[0014] As one embodiment, the clustering based on the feature vector of the current market sample using a krill swarm clustering method includes: Determine the parameters for cluster size, krill population size, maximum number of iterations, upper limit of induction speed, upper limit of foraging speed, random diffusion intensity, crossover probability, mutation probability, and termination threshold. Once the parameters are determined, a clustering optimization configuration file is generated, which includes mathematical optimization parameters and market business constraints. Each krill individual represents a set of candidate cluster centers. Each krill individual in the krill swarm is encoded as a matrix composed of multiple candidate cluster centers. After determining the encoding structure, N krill individuals are initialized.

[0015] As one example, for each individual krill, based on its corresponding K candidate cluster centers, each sample in the standardized sample set is assigned to the nearest cluster center. A comprehensive fitness function is constructed based on market constraint weighted intra-cluster deviation, price fluctuation consistency, time series curve similarity, extreme sample coverage, and inter-cluster separation. The current market business needs are embedded into the cluster optimization process through the comprehensive fitness function.

[0016] As one example, after completing the fitness calculation, all krill individuals are sorted according to their comprehensive fitness values. The optimization objective is to minimize the comprehensive fitness function. The smaller the fitness value, the better the clustering scheme corresponding to the krill individual. For each krill individual, its historical best position is recorded. For the entire krill population, the current global best individual and its corresponding cluster center matrix are recorded.

[0017] As one embodiment, the induced movement direction of the current krill individual is calculated based on the fitness and positional differences between adjacent krill individuals. If the clustering scheme of a neighboring krill individual is better than that of the current individual, the neighboring individual will have an attractive effect on the current individual; if the clustering scheme of a neighboring individual is significantly worse, it will have a repulsive effect on the current individual.

[0018] As one example, the movement direction of the current krill individual is determined by combining the current global optimal position and the individual's historical optimal position. The current global optimal position represents the optimal market sample partitioning scheme that the group has discovered before, and the individual's historical optimal position represents the optimal partitioning scheme that the individual has reached.

[0019] As one embodiment, a random diffusion mechanism is introduced, which applies random perturbation to candidate cluster centers in the search space, giving krill individuals the opportunity to explore market state areas that have not yet been fully searched. The random diffusion intensity preferably decreases gradually with the number of iterations.

[0020] As one embodiment, the market-constrained weighted intra-class deviation is calculated based on the weighted distance between the sample and its cluster center according to the feature weights. The feature weights are adaptively determined based on one or more of the following: contribution of electricity price fluctuation, blockage contribution, load ramping contribution, contribution of renewable energy penetration rate, reserve margin contribution, and contribution of price curve change.

[0021] As one embodiment, the price fluctuation consistency is calculated based on one or more of the following: average electricity price, highest electricity price, lowest electricity price, price peak-to-valley difference, price standard deviation, peak price duration, and negative price duration.

[0022] According to some embodiments, the present disclosure adopts the following technical solutions: A verification system for constructing a power system day-ahead security constraint clearing scenario includes: The data acquisition module is used to acquire multi-source sample data from the day-ahead spot market of the power grid and construct an initial sample set; The feature construction module is used to construct feature vectors for current market samples based on multi-source sample data; The fitness calculation module is used to perform clustering based on the feature vector of the current market sample using the krill swarm clustering method. It constructs a comprehensive fitness function based on market constraint weighted intra-class deviation, price fluctuation consistency, time series curve similarity, extreme sample coverage penalty, and inter-class separation. The krill swarm optimization module is used to update candidate cluster centers based on the krill swarm's induced movement, foraging movement, and random diffusion; selects preferred individuals according to fitness ranking, and performs market state-preserving crossover and adaptive mutation on the preferred individuals and other krill individuals to generate new candidate cluster centers; The constraint repair module is used to perform boundary repair and market constraint verification on new candidate cluster centers; The representative sample output module is used to output the optimal cluster center after the termination condition is met, and to generate a representative sample set of the current day's market and its occurrence probability based on the optimal cluster center.

[0023] According to some embodiments, the present disclosure adopts the following technical solutions: A computer program product includes a computer program that, when executed by a processor, implements the aforementioned method for constructing and verifying a day-ahead security constraint clearing scenario in a power system.

[0024] According to some embodiments, the present disclosure adopts the following technical solutions: A non-transitory computer-readable storage medium is provided for storing computer instructions, which, when executed by a processor, implement the aforementioned method for constructing and verifying a day-ahead security constraint clearing scenario in a power system.

[0025] According to some embodiments, the present disclosure adopts the following technical solutions: An electronic device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the aforementioned method for constructing and verifying a day-ahead safety constraint clearing scenario in a power system.

[0026] Compared with the prior art, the beneficial effects of this disclosure are as follows: This disclosure discloses a method for constructing and verifying a day-ahead safety constraint clearing scenario in a power system. It employs a krill swarm clustering method, encoding each individual krill in the swarm as a candidate cluster center. A comprehensive fitness function is constructed using market-constrained weighted intra-cluster deviation, price volatility consistency, time-series curve similarity, extreme sample coverage penalty, and inter-cluster separation. The candidate cluster centers are iteratively updated through induced movement, foraging movement, random diffusion, optimal individual selection, market state-preserving crossover, and adaptive mutation. After meeting the termination condition, the optimal cluster center, representative day-ahead market samples, and their occurrence probabilities are output. This method reduces the dependence of traditional clustering methods on initial cluster centers, improves the clustering stability of high-dimensional, nonlinear, multi-peak, and multi-density day-ahead market samples, and enhances the retention capacity of low-probability, high-impact samples such as high electricity prices, negative electricity prices, severe congestion, and insufficient reserves. It can be used for day-ahead market clearing simulation, pricing strategy evaluation, price risk identification, and power grid operation mode verification.

[0027] This disclosure discloses a method for constructing and verifying a day-ahead safety constraint clearing scenario in the power system. It constructs a comprehensive fitness function that combines market operation characteristics, so that the clustering process not only considers the mathematical distance between samples, but also considers key day-ahead market factors such as load, new energy, electricity price, congestion, reserve, bidding behavior and time series curve shape, thereby making the clustering results more consistent with the actual market operation mechanism.

[0028] The present invention discloses a method for constructing and verifying day-ahead safety constraint clearing scenarios in power systems, and provides an extreme market sample coverage mechanism to ensure that low-frequency but high-impact scenarios such as high electricity prices, low or negative electricity prices, severe congestion, insufficient reserves, and extreme weather are reasonably retained in the representative sample set, thereby avoiding the representative sample set being overly biased towards the average state or normal operating state.

[0029] This disclosure discloses a method for constructing and verifying a day-ahead safety constraint clearing scenario for power systems. It provides an output method that can be directly applied to day-ahead market business applications, so that the final result includes not only cluster centers and cluster labels, but also representative trading days, representative trading periods, representative price curves, representative load curves, representative renewable energy output curves, corresponding occurrence probabilities, and market status labels. Attached Figure Description

[0030] The accompanying drawings, which form part of this disclosure, are used to provide a further understanding of this disclosure. The illustrative embodiments of this disclosure and their descriptions are used to explain this disclosure and do not constitute an undue limitation of this disclosure.

[0031] Figure 1 This is a flowchart of a method for constructing and verifying a day-ahead security constraint clearing scenario in a power system, according to an embodiment of this disclosure. Figure 2 This is a schematic diagram illustrating the construction of current market sample features according to an embodiment of the present disclosure; Figure 3 This is a schematic diagram of the individual krill coding structure according to an embodiment of the present disclosure; Figure 4 This is a schematic diagram illustrating the composition of the comprehensive fitness function in an embodiment of this disclosure; Figure 5 This is a schematic diagram of the krill swarm movement update according to an embodiment of the present disclosure; Figure 6 This is a schematic diagram illustrating preferred individual selection, market state-preserving crossover, and adaptive mutation in an embodiment of this disclosure. Figure 7 This is a schematic diagram illustrating the representative current-day market sample output and application process of an embodiment of this disclosure; Figure 8 This is a block diagram of the adaptive preferred krill clustering system according to an embodiment of the present disclosure. Detailed Implementation

[0032] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.

[0033] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains.

[0034] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this disclosure. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms “comprising” and / or “including” are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0035] Example 1 One embodiment of this disclosure provides a method for constructing and verifying a power system day-ahead security constraint clearing scenario, the method steps of which include: Step 1: Obtain multi-source sample data from the day-ahead spot market of the power grid and construct an initial sample set; Step 2: Construct a feature vector for the current day's market samples based on multi-source sample data; Step 3: Based on the feature vector of the current market sample, the krill swarm clustering method is used for clustering. A comprehensive fitness function is constructed based on market constraint weighted intra-class deviation, price fluctuation consistency, time series curve similarity, extreme sample coverage penalty, and inter-class separation. Step 4: Update candidate cluster centers based on krill swarm induced movement, foraging movement, and random diffusion; select preferred individuals according to fitness ranking, and perform market state-preserving crossover and adaptive mutation on the preferred individuals and other krill individuals to generate new candidate cluster centers; Step 5: Perform boundary repair and market constraint verification on the new candidate cluster centers; output the optimal cluster center after the termination condition is met, and generate a representative sample set of the current day's market and its occurrence probability based on the optimal cluster center.

[0036] As one embodiment, this disclosure provides a method for constructing and verifying a day-ahead safety constraint clearing scenario in a power system. This method begins with acquiring multi-source day-ahead market data and sequentially proceeds through sample feature construction, data preprocessing, clustering parameter determination, krill swarm initialization, comprehensive fitness calculation, krill swarm movement update, optimal individual selection, crossover and mutation, constraint repair, and termination judgment, ultimately outputting a representative day-ahead market sample set and its probability of occurrence. Figure 1 As shown, this disclosure does not simply perform a regular clustering calculation, but rather constructs the current market sample clustering process as a closed-loop optimization process that includes market constraints, extreme scenario preservation, and swarm intelligence iterative optimization. The specific implementation process is as follows: Step 1: Obtain multi-source sample data from the day-ahead spot market of the power grid and construct an initial sample set; In this step, the day-ahead spot market data of the target power grid within a preset historical period is obtained. The preset historical period can be one month, one quarter, one year, multiple consecutive years, or any trading period set by the user based on market analysis objectives. Data sources may include day-ahead market clearing systems, power trading platforms, dispatch automation systems, renewable energy power forecasting systems, meteorological data platforms, market participant reporting systems, and power grid operation monitoring systems.

[0037] Specifically, the multi-source sample data includes historical sample data, predicted sample data, and external impact data. The historical sample data, predicted sample data, and external impact data include at least one or more of the following: system load, zonal load, nodal load, predicted wind power output, predicted photovoltaic output, available capacity of conventional units, unit start-up and shutdown status, unit price quotation curve, electricity volume declared by market participants, price declared by market participants, planned power of tie lines, system reserve capacity, zonal reserve capacity, transmission section load factor, nodal price, zonal price, system marginal price, congestion price, ancillary service price, temperature, humidity, wind speed, irradiance, rainfall, holiday indicators, and major maintenance indicators.

[0038] After acquiring multi-source sample data, the day-ahead market sample unit is determined based on the specific application objective. If used for annual day-ahead market clearing simulation and typical day compression, the trading day is used as the sample unit; if used for nodal price risk identification or price prediction model training, the trading period can be used as the sample unit; if used for regional congestion analysis, the status of a zone or transmission section can be used as the sample unit; if used for market participant bidding behavior analysis, a combination of market participants, trading days, or trading periods can be used as the sample unit.

[0039] When using trading days as the sample unit, each sample includes the load curve, renewable energy output curve, net load curve, electricity price curve, reserve curve, and section load factor curve for all time periods within that trading day. When using trading periods as the sample unit, each sample includes the system operating status, market clearing status, and external influencing factors for that period. When using nodes as the sample unit, each sample includes the node electricity price, node load, node region, node price difference, congestion-related sections, and node price fluctuation indicators.

[0040] Step 2: Construct a feature vector for the current day's market samples based on multi-source sample data; Specifically, to ensure that the clustering results accurately reflect the current market conditions, instead of directly using the raw data for clustering, the raw data is transformed into a multi-dimensional feature vector that characterizes the market's operational mechanisms. This is because the features of the current market samples are not from a single source, but are jointly formed from market clearing data, power grid operation data, and new energy and meteorological data after data alignment, cleaning, basic feature extraction, and derivative feature construction.

[0041] Construct the initial sample set as P ,in m This indicates the number of market samples at the current date. Indicates the 1st, 2nd, ... m The initial sample is a market sample set from the previous day. This initial sample set is not a simple data table, but a comprehensive set of market conditions that includes power system physical operation information, market price information, and external influence information.

[0042] Furthermore, the feature vector of the day-ahead market sample is constructed by including basic features and derived features. Basic features describe the directly observed state of the market sample and include at least load level, renewable energy output, market clearing price, tie-line power, reserve capacity, section load factor, unit available capacity, and bid price level. Derived features describe the deeper operational characteristics of the market sample and include at least net load, renewable energy penetration rate, load ramp-up rate, net load ramp-up rate, price peak-to-trough difference, price volatility, reserve margin, congestion severity, node spread, bid-ask curve slope, supply and demand tension, number of high-price periods, number of low-price or negative-price periods, and duration of price peaks.

[0043] Taking the trading day sample as an example, the first... d The sample feature vector for each trading day is represented by the following formula, where each variable represents the relevant features of load, renewable energy, net load, electricity price, reserve, congestion, and extreme market conditions: in, Indicates the first Feature vectors of the clearing operation scenario a day prior; , , and This indicates the load level and load ramping characteristics; and Indicates the characteristics of new energy power output; and This indicates the net load level and net load ramp-up characteristics; , , and This indicates the price status in the current clearing results; Indicates the reserve margin characteristic; Indicates the constraint state characteristics of a power transmission section or line; and Indicates the duration of high prices, low prices, or corresponding extreme operating conditions; This indicates an extreme operating scenario.

[0044] Furthermore, the feature vectors of the current market samples are preprocessed, including the following steps: After feature construction is completed, the sample feature vectors need to be preprocessed to reduce the impact of outliers, missing data, and differences in units on the clustering results. For missing data, different repair strategies are adopted according to the data type. For continuous operational data, such as load, renewable energy output, and electricity price, interpolation between adjacent time periods, interpolation of the same type of day, or repair using historically similar days can be used. For discrete status data, such as holiday markers, maintenance markers, and congestion status markers, business rules can be used to complete the data.

[0045] Outlier data is identified using a combination of market rules and statistical methods. Samples identified as representing genuine extreme market conditions, such as actual high or negative electricity prices and severe congestion, should not be simply deleted but added to the extreme sample set and prioritized for retention in subsequent clustering. For features of different dimensions, normalization or standardization is applied, resulting in a standardized sample set after preprocessing.

[0046] Step 3: Based on the feature vector of the current market samples, a krill swarm clustering method is used for clustering. A comprehensive fitness function is constructed based on market constraint weighted intra-cluster deviation, price fluctuation consistency, time series curve similarity, extreme sample coverage penalty, and inter-cluster separation. Candidate cluster centers are updated based on the induced movement, foraging movement, and random diffusion of the krill swarm. Optimal individuals are selected according to fitness ranking, and market state-preserving crossover and adaptive mutation are performed on the optimal individuals and other krill individuals to generate new candidate cluster centers. Boundary repair and market constraint verification are performed on the new candidate cluster centers. After the termination condition is met, the optimal cluster center is output, and a representative sample set of the current market and its occurrence probability are generated based on the optimal cluster center.

[0047] Specifically, a krill swarm clustering method is used for clustering. The specific process of the clustering algorithm includes: (1) First, determine the feature weights and market sensitivity coefficients: Unlike general clustering, different features in the current market sample have varying importance for identifying market conditions. For example, in price risk analysis, price volatility, peak electricity price, minimum electricity price, nodal spread, and congestion price have higher weights; in renewable energy consumption analysis, renewable energy penetration rate, net load ramp-up rate, duration of low prices, and duration of negative prices have higher weights; and in reserve risk analysis, reserve margin, peak load, net load ramp-up rate, and available unit capacity have higher weights.

[0048] Therefore, this disclosure sets a feature weight vector W. The feature weights can be given by expert experience, or they can be adaptively calculated based on electricity price correlation, congestion contribution, renewable energy contribution, load ramping contribution, reserve margin contribution, and price curve change contribution.

[0049] (2) Determine the number of clusters, the size of the krill population, and the optimization parameters: In this step, the number of clusters K, the krill population size N, the maximum number of iterations Imax, the upper limit of induction speed, the upper limit of foraging speed, the random diffusion intensity, the crossover probability, the mutation probability, and the termination threshold are determined. The number of clusters K can be preset by the user according to business needs, or it can be automatically determined by clustering effectiveness indicators.

[0050] Once the parameters are determined, a clustering optimization configuration file is generated. This configuration file includes not only mathematical optimization parameters but also market business constraints, such as minimum cluster capacity threshold, minimum coverage ratio of extreme samples, high-priced sample identification threshold, low-priced or negative-priced sample identification threshold, cross-sectional blockage identification threshold, and insufficient reserve identification threshold.

[0051] (3) Establish the individual coding structure of krill: In this disclosure, each krill individual represents a set of candidate cluster centers. For example... Figure 3 The krill individual coding structure shown is that each krill individual is encoded as a K×D dimensional matrix, where K represents the number of clusters and D represents the feature dimension of the current market sample. Figure 3 Explain how the "individual position" in the swarm intelligence optimization algorithm corresponds to the "candidate cluster center set" in the current market sample clustering problem.

[0052] This encoding method transforms the current market sample clustering problem into finding the optimal cluster center matrix in a K×D dimensional continuous search space. Changes in the position of individual krill represent updates to the candidate cluster centers, and the evolution of the krill population represents the iterative optimization process of the clustering scheme.

[0053] (4) Initialize the krill population: After determining the coding structure, N krill individuals are initialized. To improve the quality of the initial population and reduce the instability caused by random initialization, this disclosure employs a combination of random initialization, market-stratified initialization, and extreme sample augmentation initialization. Random initialization ensures the coverage of the search space; market-stratified initialization ensures that different typical market conditions are covered by the initial population; and extreme sample augmentation initialization ensures that key samples such as high electricity prices, negative electricity prices, severe congestion, and insufficient reserves are not ignored in the initial stage.

[0054] (5) Preliminary division of samples based on candidate cluster centers: For each individual krill, each sample in the standardized sample set is assigned to the nearest cluster center based on its corresponding K candidate cluster centers. The sample distance calculation uses market-constrained weighted distance instead of ordinary Euclidean distance, allowing key features such as price, congestion, reserve, and new energy sources to play a greater role in the distance metric.

[0055] (6) Construct and calculate the comprehensive fitness function: To address the issue that traditional clustering methods only focus on intra-cluster distance and neglect market business characteristics, this disclosure constructs a comprehensive fitness function. The clustering objective of this disclosure is not simply minimizing mathematical error, but is jointly determined by market-constrained weighted intra-cluster deviation, price volatility consistency, time-series curve similarity, extreme sample coverage, and inter-cluster separation.

[0056] in, Indicates the first The sample of the clearing operation a day ago and the first The first of the individual krill Weighted distance of power grid operation constraints between candidate cluster centers; Indicates the number of feature dimensions of the sample; Indicates the first h The weights of each feature; Indicates the first The sample at the th h Values ​​can be taken in each feature dimension; Indicates the first The first of the individual krill The candidate cluster centers in the _ h Values ​​can be taken in each feature dimension; Indicates that the two are in the first h The difference across each feature dimension.

[0057]

[0058] in, Indicates the first i Market-constrained weighted within-class squared error of clustering results for individual krill. This indicates a penalty for price volatility consistency. This represents the time series curve similarity penalty term. This indicates that extreme samples cover the penalty term. Indicates the degree of separation between classes. α , β , γ , λ and η These are non-negative weighting coefficients. Through the aforementioned comprehensive fitness function, this disclosure can embed day-ahead market business demands into the clustering optimization process, making the final clustering result both mathematically compact and possessing market interpretability and risk coverage capabilities.

[0059] (7) Determine the current individual optimum and the global optimum: After completing the fitness calculation, all krill individuals are sorted according to their overall fitness values. Since this disclosure aims to minimize the overall fitness function, a smaller fitness value indicates a better clustering scheme for that krill individual. For each krill individual, its historical best position is recorded; for the entire krill population, the current globally best individual and its corresponding cluster center matrix are recorded.

[0060] (8) Perform induced movements to utilize information from neighboring superior individuals: In this step, the induced movement direction of the current krill individual is calculated based on the fitness and positional differences between adjacent krill individuals. If the clustering scheme of a neighboring krill individual is better than that of the current individual, then the neighboring individual will have an attractive effect on the current individual; if the clustering scheme of a neighboring individual is significantly worse, then it will have a repulsive effect on the current individual.

[0061] (9) Perform foraging movements to integrate global optimum and individual historical experience: Foraging movement determines the direction of movement for an individual krill based on both its current global optimal position and its historical optimal position. The current global optimal position represents the best current-day market sample partitioning scheme discovered by the group, while the individual's historical optimal position represents a relatively optimal partitioning scheme that the individual has previously achieved.

[0062] (10) Perform random diffusion to enhance global search capabilities: To prevent the population from prematurely converging to a local optimum, this disclosure further introduces a random diffusion mechanism. Random diffusion is used to apply random perturbations to candidate cluster centers in the search space, giving krill individuals the opportunity to explore market state regions that have not yet been fully explored. The intensity of random diffusion is preferably gradually reduced with the number of iterations.

[0063]

[0064] in, Indicates the first The krill individual in the first The position at the next iteration, in this method, corresponds to... A cluster center matrix consisting of candidate cluster centers; Indicates the updated location of individual krill; Indicates the position update step size; This indicates the induced movement term, used to adjust the current individual's movement direction based on differences in fitness and location among neighboring individuals; This represents the foraging motion term, used to guide the updating of candidate cluster centers based on the current global best position and the individual's historical best position; This represents the random diffusion term, which is used to apply random perturbations to candidate cluster centers to enhance the search space exploration capability and reduce the probability of getting trapped in local optima.

[0065] like Figure 5 The diagram illustrates the krill swarm location update process under the combined effects of induced movement, foraging movement, and random diffusion. Candidate cluster centers are not updated mechanically using a single formula, but rather through the combined influence of neighboring individuals, global optimum guidance, individual historical experience, and random perturbation. This mechanism allows the present invention to simultaneously consider both global search capability and local convergence capability.

[0066] (11) Update candidate cluster centers based on motion results: Based on the combined results of induced movement, foraging movement, and random diffusion, the position of each krill individual is updated. Since the position of each krill individual corresponds to a set of candidate cluster centers, the position update represents an update of the candidate cluster center matrix. After the update, it is necessary to check whether the features of each candidate cluster center are within reasonable upper and lower limits.

[0067] (12) Execute the preferred individual selection: After completing the basic motion update of the candidate cluster centers, this disclosure further performs the selection of preferred individuals. First, all krill individuals are sorted according to their comprehensive fitness function values, and the top-ranked individuals are selected as preferred individuals. The preferred individuals represent the better current-day market sample partitioning scheme in the current iteration.

[0068] (13) Execute a market-state-maintaining crossover: After selecting the preferred individuals, a market state-maintaining crossover is performed between the ordinary individuals and the preferred individuals. For example... Figure 6 The process of selecting, crossing over, and mutating preferred individuals is illustrated. This disclosure does not simply involve random crossover between arbitrary candidate centers, but rather considers the consistency of the day-ahead market state and conducts constrained information exchange based on market labels such as load level, renewable energy penetration rate, electricity price range, and congestion status.

[0069] (14) Perform adaptive mutation: After crossover, adaptive mutation is performed on some candidate cluster centers. The purpose of adaptive mutation is to further expand the search scope and avoid premature convergence of groups. Unlike fixed mutation, the mutation intensity disclosed in this invention is dynamically adjusted based on the number of iterations, sample density, price volatility, blocking severity, and extreme sample coverage.

[0070] (15) Compare the fitness of new and old individuals and perform selection retention: For new krill individuals generated through movement updates, crossovers, and mutations, sample allocation and overall fitness calculations are performed again. If the overall fitness value of the new individual is better than that of the original individual, the new individual is retained; if the new individual is slightly worse than the original individual, but can improve the coverage of extreme samples or improve inter-class separation, the new individual can be retained according to the preset probability.

[0071] (16) Implement market constraint repair: After each iteration, the current clustering results are validated and corrected for market constraints. These market constraints include minimum cluster size constraints, extreme sample coverage constraints, price range coverage constraints, market operating status coverage constraints, and representative sample authenticity constraints. Through market constraint correction, this disclosure can significantly improve the business usability of the clustering results.

[0072] (17) Determine whether the termination condition is met: After completing one round of population update and constraint repair, it is determined whether the termination conditions are met. The termination conditions may include reaching the maximum number of iterations Imax, the change in the global optimal fitness over multiple consecutive iterations being less than a preset threshold, the clustering effectiveness index reaching a preset standard, the coverage of extreme samples reaching a preset requirement, all minimum cluster capacity constraints being met, and all representative sample authenticity verifications passing.

[0073] (18) Generate the final clustering results and a representative current-day market sample set: After obtaining the final cluster centers, all day-ahead market samples are categorized based on these centers. For each cluster, the number of samples within the cluster, the average price, price volatility, average load, renewable energy penetration rate, reserve margin, congestion frequency, proportion of extreme samples, and market state label are calculated. Then, within each cluster, the closest real sample to the cluster center that satisfies market operating constraints is selected as the representative sample.

[0074]

[0075] in, Let |Gk| represent the probability of the k-th representative sample belonging to a cluster, |Gk| represent the number of samples in the k-th cluster, and m represent the total number of samples. For clusters that have undergone extreme sample augmentation, their application probability can also be adjusted based on historical frequency and risk weight.

[0076] To illustrate the practical application of representative sample sets, see [link / reference]. Figure 7 This illustrates the representative day-ahead market sample output and application process. The objective of this disclosure is not merely to obtain cluster labels, but to generate compressed sample results that can be directly used for day-ahead market business analysis. Figure 7This indicates that the final representative sample set can be input into modules such as day-ahead market clearing simulation, pricing strategy evaluation, price risk analysis, new energy consumption assessment, and congestion reserve verification.

[0077] As one example, a representative sample set is input into the day-to-day market business application: In recent market clearing simulations, representative samples can replace a large number of historical samples in calculating unit combination and safety-constrained economic dispatch, thereby reducing computational load. In bidding strategy evaluation, market participants can assess bidding returns and risks based on prices, loads, renewable energy sources, and congestion status under different representative scenarios. In price risk analysis, market operators can use representative samples to identify high-price, negative-price, and price peak scenarios. In renewable energy consumption analysis, the focus can be on scenarios of high renewable energy generation at low prices and rapid net load ramp-up. In congestion reserve verification, the system safety margin can be analyzed under scenarios of limited capacity and insufficient reserve.

[0078] Furthermore, a systematic deployment structure is formed: This disclosure can also be deployed in the form of a system in a power market technical support system, a dispatching and operation analysis platform, a market simulation platform, or a market participant auxiliary decision-making platform. For an explanation of the relationships between the modules within the system, see [link to relevant documentation]. Figure 8 . Figure 8 A block diagram of the adaptive optimal krill community clustering system of this disclosure is shown. Figure 8 The purpose is to map the above method steps into engineering-implementable software modules, so that this disclosure can be implemented not only as an algorithm method, but also as a system, device and storage medium.

[0079] like Figure 8 As shown, the system includes a data acquisition module, a feature construction module, a data preprocessing module, a clustering parameter determination module, a fitness calculation module, a krill population optimization module, a constraint repair module, a representative sample output module, and a market application interface module. These modules work together to achieve a closed-loop process from data access, sample construction, intelligent clustering, representative sample output to market business applications.

[0080] As one embodiment, after obtaining the representative operational sample set and its scenario weights for day-ahead clearing, the representative operational sample set is used as the input scenario set for the day-ahead safety constraint clearing model. Each representative operational sample corresponds to a real trading day, a real trading period, or a predicted operational scenario, and includes load forecast curves, renewable energy forecast output curves, net load curves, available capacity of conventional units, upper and lower limits of unit output, unit ramping constraints, tie-line planned power, system reserve demand, regional reserve demand, line or transmission section limits, and grid operation status identifiers. During the day-ahead safety constraint clearing process, for each representative operational sample, corresponding power balance constraints, unit combination constraints, upper and lower limits of unit output constraints, unit ramping constraints, reserve constraints, tie-line power constraints, and network security constraints are constructed, and the day-ahead safety constraint unit combination model and the safety constraint economic dispatch model are called to solve them, obtaining the unit start-up and shutdown status, unit output plan, reserve allocation results, tie-line power plan, line power flow or transmission section power flow, and constraint triggering status under that representative operational sample. After completing the clearing calculations for each representative operating sample, the clearing verification results corresponding to each representative operating sample are weighted and summarized according to the scenario weights to obtain the statistical results of the target power grid's operating status within a preset period. The statistical results of the operating status include the frequency of line or transmission section exceeding limits, the frequency of insufficient reserves, the frequency of unit ramp-up constraint triggering, the frequency of renewable energy absorption being limited, the frequency of tie-line power constraint triggering, and the coverage of high-load, low-reserve scenarios. Therefore, the samples output by this disclosure are not simply mathematical clustering results, but rather operating scenario input data that can be directly incorporated into the day-ahead safety constraint clearing model. This sample set can be used to support the generation of day-ahead dispatch plans for the power system, clearing simulation calculations, operating mode verification, transmission section safety verification, reserve adequacy verification, and renewable energy absorption verification.

[0081] The representative operating sample set disclosed herein can be applied to the following power system technical scenarios: First, for day-ahead safety constraint unit combination calculations. The load forecast curves, renewable energy forecast output curves, available unit capacity, minimum start-up and shutdown times, unit ramping capabilities, and reserve requirements from the representative operating samples are input into the unit combination model to obtain the unit start-up and shutdown status and reserve configuration results for each representative scenario. Second, for day-ahead safety constraint economic dispatch calculations. The net load curves, tie-line planned power, transmission section limits, and unit operating constraints from the representative operating samples are input into the safety constraint economic dispatch model to obtain the planned output of each unit, line power flow, section power flow, and constraint triggering status. Third, for grid operation mode verification. Based on the clearing results of each representative operating sample, line power flow, section load factor, reserve margin, unit ramping margin, and renewable energy absorption status are verified to identify operating scenarios that do not meet safety operation constraints. Fourth, for extreme operating scenario verification. For samples exhibiting high load and low reserve, high proportion of renewable energy and low net load, rapid net load ramp-up, high load on transmission sections, sudden power changes in tie lines, and insufficient available unit capacity, a focused clearing and verification process is implemented to avoid representative samples being overly biased towards average operating conditions and overlooking critical operational risks. Fifth, sample compression is used for periodic clearing simulations. For annual, quarterly, or monthly clearing simulation tasks, representative operating samples are used to replace the full historical or full forecast samples, reducing the number of repetitive solutions for safety-constrained unit combinations and safety-constrained economic dispatch, thus improving the efficiency of clearing simulations.

[0082] This disclosure has at least the following beneficial effects: First, by combining representative samples obtained from krill clustering with the power system day-ahead safety constraint clearing model, the representative samples can be directly used as input boundary conditions for unit combination, safety constraint economic dispatch, power flow verification, and reserve verification, avoiding sample optimization that only stays at the mathematical clustering level. Second, by constructing a comprehensive fitness function through grid constraint weighted intra-class deviation, reserve margin consistency, power flow or section load state consistency, time series curve similarity, and extreme operating scenario coverage penalty, the clustering results can reflect power system operating characteristics such as load, new energy, reserve, section power flow, unit available capacity, and net load ramping. Third, this disclosure can reduce the number of day-ahead clearing simulation samples while retaining key operating scenarios such as high load and low reserve, high proportion of new energy and low net load, rapid net load ramping, high transmission section load, and insufficient unit available capacity, thereby reducing the amount of redundant calculations in safety constraint clearing and improving clearing simulation efficiency. Fourth, this disclosure can obtain power system operation risk identification results based on the clearing verification results of representative operating samples, such as line or transmission section exceeding limits, insufficient reserves, limited new energy consumption, and unit ramping constraint triggering, providing technical support for day-ahead dispatch plan generation, operation mode verification, and safety margin assessment.

[0083] Example 2 One embodiment of this disclosure provides a method for constructing and verifying a day-ahead security constraint clearing scenario for a power system. Taking day-ahead market representative day clustering based on trading day samples as an example, the specific content includes: In this embodiment, the sample unit is the trading day. The goal is to select several representative trading days from historical market data from one or more years ago for day-ahead market clearing simulation and annual price risk assessment. Each trading day sample includes the full-day load curve, wind power forecast output curve, photovoltaic forecast output curve, net load curve, nodal or regional electricity price curve, reserve capacity curve, cross-sectional load factor curve, and statistical characteristics of market participant quotations.

[0084] During the sample construction phase, the 24-hour or 96-point time-series data for each trading day are converted into a multi-dimensional feature vector. This feature vector includes daily maximum load, daily minimum load, daily average load, load peak-to-valley difference, maximum load ramp rate, daily total wind power output, daily total photovoltaic power output, renewable energy penetration rate, net load peak value, net load valley value, maximum net load ramp rate, day-ahead average market price, highest price, lowest price, price standard deviation, price peak-to-valley difference, duration of high price, duration of low or negative price, maximum cross-sectional load factor, number of congestion periods, average congestion price, average reserve capacity, and minimum reserve margin.

[0085] During the clustering optimization phase, each krill individual is coded as a cluster center for K trading days. If K is set to eight, each krill individual contains eight candidate centers, which may correspond to regular operating days, high-load and high-price days, days with high new energy output and low prices, days with low new energy output and high net load, days with congestion risk, low reserve days, low-load holiday days, and days with sharp price fluctuations. After clustering, a real trading day is selected from each cluster as a representative day, and its occurrence probability is calculated.

[0086] Example 3 One embodiment of this disclosure provides a method for constructing and verifying a day-ahead security constraint clearing scenario in a power system. Taking nodal price scenario clustering based on transaction period samples as an example, the specific content includes: In this embodiment, the sample unit is the trading period. The goal is to cluster the nodal electricity price status of different trading periods in the day-ahead market for nodal price risk identification and auxiliary analysis of market participant quotations. Each trading period sample includes the system load, zonal load, renewable energy forecast output, nodal electricity price vector, zonal electricity price, tie line power flow, cross-sectional load factor, reserve capacity, unit quotation statistics, and meteorological information for that period.

[0087] Because node price has a high dimensionality, the node price vector can first be subjected to regional aggregation, principal component dimensionality reduction, or key node screening to obtain the main price features. Then, the main price features are combined with load, renewable energy, reserve, congestion, and pricing behavior features to form a sample vector. For price risk analysis scenarios, the weights of the price fluctuation consistency term and the inter-class separation term can be increased to make the clustering results more clearly distinguish between high-price periods, low-price periods, congestion periods, non-congestion periods, and price peak periods.

[0088] Example 4 One embodiment of this disclosure provides a method for constructing and verifying a power system day-ahead security constraint clearing scenario, taking enhanced clustering in extreme market scenarios as an example. The specific content includes: This embodiment focuses on addressing the problem of a small number of extreme market samples that are easily absorbed by regular samples. First, an extreme sample set is defined based on market rules and historical statistical thresholds. For example, samples with prices exceeding the 95th percentile of the year are defined as high-price samples; samples with prices below zero or below the 5th percentile of the year are defined as low-price or negative-price samples; samples with section load rates exceeding a preset threshold and generating significant nodal price differences are defined as severely congested samples; and samples with reserve margins below a preset safety threshold are defined as insufficient reserve samples.

[0089] An extreme sample coverage penalty term is set in the fitness function. The penalty is increased when a certain type of extreme samples are dispersed into multiple regular clusters and fail to form interpretable representative samples; the penalty is decreased when the extreme samples of this type are aggregated into stable clusters, or when they are covered by at least one representative sample in the representative sample set.

[0090] Example 5 One embodiment of this disclosure provides a power system day-ahead security constraint clearing scenario construction and verification system, including: The data acquisition module is used to acquire multi-source sample data from the day-ahead spot market of the power grid and construct an initial sample set; The feature construction module is used to construct feature vectors for current market samples based on multi-source sample data; The fitness calculation module is used to perform clustering based on the feature vector of the current market sample using the krill swarm clustering method. It constructs a comprehensive fitness function based on market constraint weighted intra-class deviation, price fluctuation consistency, time series curve similarity, extreme sample coverage penalty, and inter-class separation. The krill swarm optimization module is used to update candidate cluster centers based on the krill swarm's induced movement, foraging movement, and random diffusion; selects preferred individuals according to fitness ranking, and performs market state-preserving crossover and adaptive mutation on the preferred individuals and other krill individuals to generate new candidate cluster centers; The constraint repair module is used to perform boundary repair and market constraint verification on new candidate cluster centers; The representative sample output module is used to output the optimal cluster center after the termination condition is met, and to generate a representative sample set of the current day's market and its occurrence probability based on the optimal cluster center.

[0091] As one embodiment, this disclosure can be deployed as a software system in a power market technical support system, a market simulation platform, a dispatching and operation analysis platform, or a market participant auxiliary decision-making platform.

[0092] The data acquisition module is used to extract sample data from the market clearing system, energy management system, new energy forecasting system, meteorological system, and quotation reporting system; the feature construction module is used to convert the raw data into sample vectors at the trading day, trading period, node, or partition level; the krill swarm optimization module is used to perform induced movement, foraging movement, random diffusion, optimal individual selection, crossover, and mutation; it also includes a data preprocessing module, a parameter determination module, and a market application interface module. The market application interface module is used to transmit the output results to the day-ahead market clearing simulation, quotation strategy evaluation, and price risk analysis programs.

[0093] Example 6 One embodiment of this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method for constructing and verifying a day-ahead security constraint clearing scenario in a power system.

[0094] Example 7 One embodiment of this disclosure provides a non-transitory computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, they implement the aforementioned method for constructing and verifying a day-ahead security constraint clearing scenario in a power system.

[0095] Example 8 One embodiment of this disclosure provides an electronic device, including: a processor, a memory, and a computer program; wherein the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes the aforementioned method for constructing and verifying a day-ahead safety constraint clearing scenario for a power system.

[0096] In further embodiments, the following is also provided: A server that can be used to execute the methods provided in the above embodiments. Specifically: A server includes a Central Processing Unit (CPU), system memory comprising Random Access Memory (RAM) and Read Only Memory (ROM), and a system bus connecting the system memory and the CPU. The server also includes a basic input / output system (I / O system) to facilitate information transfer between various components within the computer, and mass storage devices for storing the operating system, applications, and other program modules.

[0097] A basic input / output system includes a display for showing information and input devices such as a mouse and keyboard for user input. Both the display and the input devices are connected to the central processing unit via an input / output controller connected to the system bus. The basic input / output system may also include an input / output controller for receiving and processing input from multiple other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller also provides output to a display screen, printer, or other types of output devices.

[0098] Mass storage devices are connected to the central processing unit via a mass storage controller (not shown) connected to the system bus. The mass storage devices and their associated computer-readable media provide non-volatile storage for the server. That is, mass storage devices may include computer-readable media (not shown) such as hard disks or CD-ROM (CompactDisc Read-Only Memory) drives.

[0099] Computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include RAM, ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash memory or other solid-state storage technologies, CD-ROM, DVD (Digital Versatile Disc) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will understand that computer storage media are not limited to the above-mentioned types. The aforementioned system memories and mass storage devices can be collectively referred to as memory.

[0100] According to various embodiments of this disclosure, the server can also connect to and operate on a remote computer on a network, such as the Internet. That is, the server can connect to a network via a network interface unit connected to the system bus, or it can use a network interface unit to connect to other types of networks or remote computer systems (not shown).

[0101] The aforementioned memory also includes one or more programs, which are stored in the memory and configured to be executed by the CPU.

[0102] One embodiment provides a terminal that can be used to perform the methods provided in the above embodiments. The terminal may be a portable mobile terminal, such as a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The terminal may also be referred to by other names such as user terminal, portable terminal, laptop terminal, desktop terminal, etc.

[0103] Typically, a terminal includes a processor and memory.

[0104] The processor may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor may be implemented using at least one of the following hardware forms: DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor may also include a main processor and coprocessors. The main processor, also known as the CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor may also include an AI (Artificial Intelligence) processor, which handles computational operations related to machine learning.

[0105] The memory may include one or more computer-readable storage media, which may be non-transitory. The memory may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory are used to store at least one instruction, which is executed by a processor to implement the sound reverberation method provided in the method embodiments of this application.

[0106] In some embodiments, the terminal may also optionally include: a peripheral device interface and at least one peripheral device. The processor, memory, and peripheral device interface can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of: a radio frequency circuit, a display screen, a camera assembly, an audio circuit, a positioning assembly, or a power supply.

[0107] Peripheral device interfaces can be used to connect at least one I / O (Input / Output) related peripheral device to the processor and memory. In some embodiments, the processor, memory, and peripheral device interface are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor, memory, and peripheral device interface can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0108] Radio frequency (RF) circuits are used to receive and transmit RF signals, also known as electromagnetic signals. RF circuits communicate with communication networks and other communication devices via electromagnetic signals. RF circuits convert electrical signals into electromagnetic signals for transmission, or convert received electromagnetic signals back into electrical signals. Optionally, RF circuits include: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, user identity module cards, etc. RF circuits can communicate with other terminals through at least one wireless communication protocol. These wireless communication protocols include, but are not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0109] The display screen is used to display the UI (User Interface). This UI can include graphics, text, icons, videos, and any combination thereof. When the display screen is a touch screen, it also has the ability to collect touch signals on or above the surface of the display. These touch signals can be input as control signals to a processor for processing. In this case, the display screen can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there can be one display screen, which serves as the front panel of the terminal; in other embodiments, there can be at least two display screens, respectively disposed on different surfaces of the terminal or in a folded design; in still other embodiments, the display screen can be a flexible display screen, disposed on a curved or folded surface of the terminal. Furthermore, the display screen can be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0110] A camera assembly is used to capture images or videos. Optionally, the camera assembly includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0111] The audio circuitry may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting them into electrical signals that are input to a processor for processing, or to radio frequency (RF) circuitry for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, positioned at different locations on the terminal. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor or RF circuitry into sound waves. The speaker may be a traditional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuitry may also include a headphone jack.

[0112] The positioning component is used to determine the current geographical location of the terminal to enable navigation or LBS (Location Based Service). The positioning component can be based on the US GPS (Global Positioning System), China's BeiDou system, or Russia's Galileo system.

[0113] The power supply is used to power the various components in the terminal. The power supply can be alternating current (AC), direct current (DC), a disposable battery, or a rechargeable battery. When the power supply includes a rechargeable battery, it can be a wired or wirelessly rechargeable battery. A wired rechargeable battery is charged via a wired connection, while a wirelessly rechargeable battery is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0114] In some embodiments, the terminal further includes one or more sensors. These one or more sensors include, but are not limited to, accelerometers, gyroscopes, pressure sensors, fingerprint sensors, optical sensors, and proximity sensors.

[0115] An accelerometer can detect the magnitude of acceleration along the three axes of a coordinate system established by the terminal. For example, an accelerometer can be used to detect the components of gravitational acceleration along the three axes. The processor can then control the touchscreen to display the user interface in either landscape or portrait view based on the gravitational acceleration signals acquired by the accelerometer. Accelerometers can also be used for collecting motion data in games or for other applications.

[0116] The gyroscope sensor can detect the terminal's orientation and rotation angle. It can work in conjunction with an accelerometer to capture the user's 3D movements on the terminal. Based on the data collected by the gyroscope sensor, the processor can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0117] The pressure sensor can be located on the side bezel of the terminal and / or under the touchscreen display. When the pressure sensor is located on the side bezel, it can detect the user's grip signal on the terminal, and the processor can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor. When the pressure sensor is located under the touchscreen display, the processor can control the operable controls on the UI interface based on the user's pressure on the touchscreen display. Operable controls include at least one of button controls, scroll bar controls, icon controls, or menu controls.

[0118] A fingerprint sensor is used to collect a user's fingerprint. The processor identifies the user based on the fingerprint collected by the sensor, or vice versa. When the user's identity is verified as trusted, the processor authorizes the user to perform relevant sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor can be located on the front, back, or side of the terminal. When the terminal has physical buttons or a manufacturer's logo, the fingerprint sensor can be integrated with those buttons or the logo.

[0119] An optical sensor is used to collect ambient light intensity. In one embodiment, the processor can control the display brightness of the touch screen based on the ambient light intensity collected by the optical sensor. Specifically, when the ambient light intensity is high, the display brightness of the touch screen is increased; when the ambient light intensity is low, the display brightness of the touch screen is decreased. In another embodiment, the processor can also dynamically adjust the shooting parameters of the camera assembly based on the ambient light intensity collected by the optical sensor.

[0120] A proximity sensor, also known as a distance sensor, is typically located on the front panel of a terminal. It is used to detect the distance between the user and the front of the terminal. In one embodiment, when the proximity sensor detects that the distance between the user and the front of the terminal is gradually decreasing, the processor controls the touchscreen display to switch from a screen-on state to a screen-off state; conversely, when the proximity sensor detects that the distance between the user and the front of the terminal is gradually increasing, the processor controls the touchscreen display to switch from a screen-off state to a screen-on state.

[0121] Those skilled in the art will understand that the structure shown does not constitute a limitation on the terminal, and may include more or fewer components than shown, or combine certain components, or employ different component arrangements.

[0122] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When executed by the processor, the computer instructions perform the method described in Embodiment 1. For brevity, further details are omitted here.

[0123] It should be understood that in this embodiment, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0124] Memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of memory may also include non-volatile random access memory. For example, memory may also store information about the device type.

[0125] A computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the method described in Embodiment 1.

[0126] The method in Embodiment 1 can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor. The software modules can reside in readily available storage media in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0127] The computer storage medium of this embodiment can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be—but is not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0128] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0129] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0130] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as "C" or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0131] A computer program product includes a computer program that, when executed by a processor, implements the method described in Embodiment 1.

[0132] This disclosure also provides at least one computer program product tangibly stored on a non-transitory computer-readable storage medium. The computer program product includes computer-executable instructions, such as instructions included in program modules, which execute in a device on a target real or virtual processor to perform the processes / methods described above. Typically, program modules include routines, programs, libraries, objects, classes, components, data structures, etc., that perform specific tasks or implement specific abstract data types. In various embodiments, the functionality of program modules can be combined or divided among program modules as needed. The machine-executable instructions for the program modules can execute within a local or distributed device. In a distributed device, the program modules can reside in both local and remote storage media.

[0133] Computer program code used to implement the methods of this disclosure may be written in one or more programming languages. This computer program code may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, such that when executed by the computer or other programmable data processing apparatus, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be performed. The program code may be executed entirely on a computer, partially on a computer, as a stand-alone software package, partially on a computer and partially on a remote computer, or entirely on a remote computer or server.

[0134] In the context of this disclosure, computer program code or related data may be carried on any suitable carrier to enable a device, apparatus, or processor to perform the various processes and operations described above. Examples of carriers include signals, computer-readable media, and the like. Examples of signals may include electrical, optical, radio, sound, or other forms of propagation signals, such as carrier waves, infrared signals, etc.

[0135] Those skilled in the art will recognize that the units and algorithm steps described in conjunction with the embodiments herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0136] While the specific embodiments of this disclosure have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of this disclosure. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of this disclosure are still within the scope of protection of this disclosure.

Claims

1. A method for constructing and verifying a day-ahead security constraint clearing scenario in a power system, characterized in that, include: Obtain multi-source sample data from the day-ahead spot market of the power grid and construct an initial sample set; Construct a feature vector for the current market sample based on multi-source sample data; Based on the feature vector of the current market sample, the krill swarm clustering method is used for clustering. A comprehensive fitness function is constructed based on market constraint weighted intra-class deviation, price fluctuation consistency, time series curve similarity, extreme sample coverage penalty and inter-class separation. Candidate cluster centers are updated based on krill swarm induced movement, foraging movement, and random diffusion; preferred individuals are selected according to fitness ranking, and market state-preserving crossover and adaptive mutation are performed on the preferred individuals and other krill individuals to generate new candidate cluster centers; Boundary repair and market constraint verification are performed on the new candidate cluster centers; the optimal cluster center is output after the termination condition is met, and a representative sample set of the current day's market and its occurrence probability are generated based on the optimal cluster center.

2. The method for constructing and verifying a day-ahead security constraint clearing scenario in a power system as described in claim 1, characterized in that, The multi-source sample data includes historical sample data, predicted sample data, and external impact data. The historical sample data, predicted sample data, and external impact data include system load, zonal load, nodal load, predicted wind power output, predicted photovoltaic output, available capacity of conventional units, unit quotation data, electricity volume declared by market participants, price declared by market participants, planned power of tie lines, system reserve capacity, zonal reserve capacity, transmission section load factor, nodal price, zonal price, system marginal price, congestion price, ancillary service price, temperature, humidity, wind speed, irradiance, and holiday indicators.

3. The method for constructing and verifying a day-ahead security constraint clearing scenario in a power system as described in claim 1, characterized in that, The construction of the current day market sample feature vector based on multi-source sample data includes: A day-ahead market sample feature vector is constructed using trading days, trading hours, nodes, zones, or combinations of trading days and trading hours as sample units. The day-ahead market sample feature vector includes basic features and derived features. The basic features include load, renewable energy output, market clearing price, tie line power, reserve capacity, and cross-sectional load factor. The derived features include net load, renewable energy penetration rate, load ramp rate, price peak-to-valley difference, price volatility, reserve margin, congestion severity, number of high-price periods, number of low-price or negative-price periods, price curve slope, supply and demand tension, and node price difference.

4. The method for constructing and verifying a day-ahead security constraint clearing scenario in a power system as described in claim 3, characterized in that, Preprocessing of the feature vectors of the current market samples includes: For missing data, different repair strategies are adopted according to the data type. For continuous operation data, interpolation between adjacent time periods, interpolation of the same type of day, or historical similar day repair are used; for discrete status data, business rules are used to complete the data. For outlier data, they are identified by a combination of market rules and statistical methods. Samples identified as true extreme market conditions are included in the extreme sample set and retained in subsequent clustering. For features of different dimensions, normalization or standardization is used, and a standardized sample set is obtained after preprocessing.

5. The method for constructing and verifying a day-ahead security constraint clearing scenario in a power system as described in claim 1, characterized in that, The clustering based on the feature vector of the current market sample, using the krill swarm clustering method, includes: Determine the parameters for cluster size, krill population size, maximum number of iterations, upper limit of induction speed, upper limit of foraging speed, random diffusion intensity, crossover probability, mutation probability, and termination threshold. Once the parameters are determined, a clustering optimization configuration file is generated, which includes mathematical optimization parameters and market business constraints. Each krill individual represents a set of candidate cluster centers. Each krill individual in the krill swarm is encoded as a matrix composed of multiple candidate cluster centers. After determining the encoding structure, N krill individuals are initialized.

6. The method for constructing and verifying a day-ahead security constraint clearing scenario in a power system as described in claim 5, characterized in that, For each individual krill, based on its corresponding K candidate cluster centers, each sample in the standardized sample set is assigned to the nearest cluster center. A comprehensive fitness function is constructed based on market-constrained weighted intra-cluster deviation, price fluctuation consistency, time series curve similarity, extreme sample coverage, and inter-cluster separation. The current market business needs are then embedded into the cluster optimization process through the comprehensive fitness function.

7. The method for constructing and verifying a day-ahead security constraint clearing scenario in a power system as described in claim 6, characterized in that, After completing the fitness calculation, all krill individuals are sorted according to their comprehensive fitness values. The optimization objective is to minimize the comprehensive fitness function. The smaller the fitness value, the better the clustering scheme corresponding to the krill individual. For each krill individual, its historical best position is recorded. For the entire krill population, the current global best individual and its corresponding cluster center matrix are recorded.

8. The method for constructing and verifying a day-ahead security constraint clearing scenario in a power system as described in claim 1, characterized in that, Based on the fitness and positional differences between adjacent krill individuals, the induced movement direction of the current krill individual is calculated. If the clustering scheme of a neighboring krill individual is better than that of the current individual, the neighboring individual will have an attractive effect on the current individual; if the clustering scheme of a neighboring individual is significantly worse, it will have a repulsive effect on the current individual.

9. The method for constructing and verifying a day-ahead security constraint clearing scenario in a power system as described in claim 1, characterized in that, The movement direction of the krill individual is determined by combining the current global optimal position and the individual's historical optimal position. The current global optimal position represents the optimal market sample partitioning scheme that the group has discovered so far, while the individual's historical optimal position represents the optimal partitioning scheme that the individual has reached in the past.

10. The method for constructing and verifying a day-ahead security constraint clearing scenario in a power system as described in claim 1, characterized in that, A random diffusion mechanism is introduced, which applies random perturbation to candidate cluster centers in the search space, giving krill individuals the opportunity to explore market state areas that have not yet been fully searched. The random diffusion intensity is preferably gradually reduced with the number of iterations.

11. The method for constructing and verifying a day-ahead security constraint clearing scenario in a power system as described in claim 6, characterized in that, The market-constrained weighted intra-class deviation is calculated based on the weighted distance between the sample and its cluster center according to the feature weights. The feature weights are adaptively determined based on one or more of the following: contribution of electricity price fluctuation, blockage contribution, load ramping contribution, contribution of renewable energy penetration rate, reserve margin contribution, and contribution of price curve change.

12. The method for constructing and verifying a day-ahead security constraint clearing scenario in a power system as described in claim 6, characterized in that, The price fluctuation consistency is calculated based on one or more of the following: average electricity price, highest electricity price, lowest electricity price, price peak-to-valley difference, price standard deviation, peak price duration, and negative price duration.

13. A power system day-ahead security constraint clearing scenario construction and verification system, characterized in that, include: The data acquisition module is used to acquire multi-source sample data from the day-ahead spot market of the power grid and construct an initial sample set; The feature construction module is used to construct feature vectors for current market samples based on multi-source sample data; The fitness calculation module is used to perform clustering based on the feature vector of the current market sample using the krill swarm clustering method. It constructs a comprehensive fitness function based on market constraint weighted intra-class deviation, price fluctuation consistency, time series curve similarity, extreme sample coverage penalty, and inter-class separation. The krill swarm optimization module is used to update candidate cluster centers based on the krill swarm's induced movement, foraging movement, and random diffusion; selects preferred individuals according to fitness ranking, and performs market state-preserving crossover and adaptive mutation on the preferred individuals and other krill individuals to generate new candidate cluster centers; The constraint repair module is used to perform boundary repair and market constraint verification on new candidate cluster centers; The representative sample output module is used to output the optimal cluster center after the termination condition is met, and to generate a representative sample set of the current day's market and its occurrence probability based on the optimal cluster center.

14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for constructing and verifying a day-ahead security constraint clearing scenario for a power system as described in any one of claims 1-12.

15. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium is used to store computer instructions, which, when executed by a processor, implement a method for constructing and verifying a day-ahead security constraint clearing scenario for a power system as described in any one of claims 1-12.

16. An electronic device, characterized in that, include: The device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the method for constructing and verifying a day-ahead safety constraint clearing scenario for a power system as described in any one of claims 1-12.