Spot day-ahead market decision sample matrix clustering preprocessing method and system
By employing model-driven projection clustering and nuclear norm regularization, the problems of dimensionality curse and outlier interference in the day-ahead electricity market decision sample matrix in high-dimensional space are solved, achieving more efficient sample matrix processing and decision optimization.
Patent Information
- Application Number
- CN202511946721.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-23
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2045-12-23
AI Technical Summary
The decision sample matrix of the day-ahead electricity market suffers from the curse of dimensionality and outlier interference in a high-dimensional space. Traditional clustering algorithms suffer from performance degradation and cannot effectively utilize the low-rank structure and time series correlation of the sample matrix, thus affecting the model training effect.
A model-driven projection clustering and nuclear norm regularization method is adopted. By normalization, fuzzy membership matrix and intra-cluster dimension weights, combined with an alternating iterative optimization strategy, abnormal samples are identified and cleaned, and typical operating patterns are extracted.
It significantly alleviates the curse of dimensionality in high-dimensional spaces, improves the compactness and interpretability of clustering results, enhances the robustness and accuracy of the model, reduces the workload of manual screening, and improves the efficiency and accuracy of market decision-making.
Smart Images

Figure CN121365263B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power market and data preprocessing technology, and particularly relates to a method and system for clustering preprocessing sample matrices of spot day-ahead market decision-making. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] The clearing objective of the day-ahead electricity market is to minimize the overall cost of electricity purchases or maximize social welfare while meeting power system security constraints, determining the generation plan, market price, and nodal prices for each 15-minute or 1-hour trading session the following day. Price optimization, on the other hand, involves decentralized decision-making by market participants, pursuing the maximization of individual interests.
[0004] Therefore, when clearing and optimizing prices in the day-ahead electricity market, it is necessary to comprehensively consider multiple input factors and output decision results. These inputs include, but are not limited to: diverse loads and their time-series characteristics; output from uncertain power sources such as wind and solar power and their stochastic characteristics; probabilistic correlations between various uncertain factors; independent energy storage operation strategies and available capacity; aggregated loads and dispatchable resources of virtual power plants (VPPs); environmental conditions such as meteorology and climate; and medium- and long-term constraints such as unit maintenance plans, grid power construction plans, and power decommissioning plans. Correspondingly, the outputs of the day-ahead market decision include: thermal power unit output plans for each time period; wind and solar power output plans or reduction ratios; charging and discharging power and status trajectories of independent energy storage; and aggregated output and decomposition instructions from virtual power plants.
[0005] To train high-quality prediction and decision-making models using historical data, it is necessary to construct a set of sample matrices for day-ahead market decisions and establish the mapping relationship between the historical data of the aforementioned input and output variables. However, such sample matrices are typically extremely high-dimensional, containing multi-source features with different dimensions, time scales, and a mixture of strong and weak correlations; the curse of dimensionality and spatial phenomena exist in high-dimensional spaces, and traditional Euclidean distance-based clustering algorithms such as K-means degrade drastically in high-dimensional spaces; abnormal operating conditions, extreme weather, and sudden maintenance are common anomalies in the samples, which can seriously interfere with model training; the day-ahead market decision-making sample matrix has a natural matrix structure and time series correlation, and if low-rank constraints such as the nuclear norm can be used during the clustering process, it will be beneficial to uncover typical operating patterns and inherent subspace structures. Summary of the Invention
[0006] To overcome the shortcomings of the prior art, this invention provides a method and system for clustering preprocessing sample matrices of the day-ahead market decision-making process. Based on model-driven projection clustering and nuclear norm regularization, the method achieves clustering preprocessing of the day-ahead market decision-making sample matrix, reducing the workload of manual screening and experience-based segmentation by modelers, and improving the efficiency and accuracy of business processes such as day-ahead market pricing strategy optimization, flexibility assessment, and security verification.
[0007] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: Firstly, a clustering preprocessing method for the spot market decision-making sample matrix is disclosed, including: Determine the time granularity and statistical period of the samples and construct the sample matrix; Normalize each dimension of the feature in the sample matrix to obtain normalized features. Define statistical indicators for each dimension based on the normalized features for feature selection and dimension compression. Let the number of clusters be defined, and let the fuzzy membership matrix be defined. Based on the fuzzy membership matrix, the membership constraints are obtained. A dimension weight matrix is introduced for each cluster, and a cluster center matrix is defined. Under a typical fuzzy clustering framework, the cluster centers are updated, and the dimension weights are adaptively updated based on the intra-cluster weighted variance. Based on model-driven clustering, a probabilistic model is introduced to characterize the distribution of samples within clusters; Explicitly introduce a nuclear norm regularization term into the clustering objective function; An alternating iterative optimization strategy is used to find the minimum value of the clustering objective function; Based on the minimum value of the clustering objective function, further abnormal sample identification and clustering result cleaning are performed, and the cluster to which each sample belongs and its membership degree, the typical operating mode corresponding to each cluster and the set of abnormal samples are output.
[0008] As a further technical solution, the construction of the sample matrix specifically includes: The sample is constructed based on the time step of the current market rolling optimization; the historical time range of the sample is determined to ensure both the sample quantity and coverage of various climate and operating conditions; For each sample, extract the input class features and the output class features; All input and output features are concatenated in a fixed order to obtain the sample feature vector; Stack all samples row by row to obtain the spot market decision sample matrix.
[0009] As a further technical solution, the extracted input class features include: Time-of-use load forecasts; Forecasting of available power output for wind and solar power and related uncertainty quantification indicators; Estimation results of the probabilistic correlation between load and wind and solar power output; Available capacity, state of charge (SOC), and operating constraints of independent energy storage; The available adjustability and controllable load scale of aggregated resources within a virtual power plant; Meteorological and climate information; Unit maintenance plan; Status of grid power supply construction / decommissioning.
[0010] As a further technical solution, the extracted output class features include: The output curves or time-based output decisions of each thermal power unit in the recent clearing results; Power output plans or curtailment / waste of wind and solar power for each wind farm and photovoltaic power station; The charging and discharging power trajectory and initial and final SOC of independent energy storage; Commands for aggregating power output and decomposing internal resources in a virtual power plant.
[0011] As a further technical solution, statistical indicators for each dimension include mean, variance, and correlation coefficient. These statistical indicators are used to: eliminate features with extremely small variance; and merge or filter highly correlated features.
[0012] As a further technical solution, based on the minimum value of the solved clustering objective function, anomaly identification and clustering result cleaning are further performed, specifically including: Define the minimum cluster distance for each sample, and calculate its distance to the nearest cluster based on the final weighted distance; Set distance thresholds and membership thresholds. If a sample meets the set conditions, the sample is marked as an anomalous sample. For samples marked as anomalous, they can be clustered separately or removed from the training set according to their distribution characteristics.
[0013] Secondly, a preprocessing system for clustering the sample matrix of the spot market decision-making process was disclosed, including: The sample matrix construction module is configured to: determine the time granularity and statistical period of the samples and construct the sample matrix; The normalization module is configured to: normalize each dimension of the feature in the sample matrix to obtain the normalized feature, and define statistical indicators for each dimension based on the normalized feature for feature selection and dimension compression. The update module is configured as follows: set the number of clusters, define the fuzzy membership matrix, and obtain the membership constraints based on the fuzzy membership matrix; introduce a dimension weight matrix for each cluster, define the cluster center matrix, update the cluster centers under a typical fuzzy clustering framework, and adaptively update the dimension weights based on the intra-cluster weighted variance. The clustering objective function building module is configured to: introduce a probabilistic model to characterize the distribution of samples within clusters based on model-driven clustering; and explicitly introduce a nuclear norm regularization term into the clustering objective function. The preprocessing output module is configured to use an alternating iterative optimization strategy to find the minimum value of the clustering objective function; Based on the minimum value of the clustering objective function, further abnormal sample identification and clustering result cleaning are performed, and the cluster to which each sample belongs and its membership degree, the typical operating mode corresponding to each cluster and the set of abnormal samples are output.
[0014] The above one or more technical solutions have the following beneficial effects: This invention constructs a day-ahead market decision sample matrix and introduces fuzzy membership, intra-cluster dimensional weights, and nuclear norm constraints. This not only automatically highlights the most critical feature dimensions for various operational scenarios in high-dimensional space but also utilizes the low-rank structure of the sample matrix to extract stable typical operational patterns. Consequently, it significantly alleviates the curse of dimensionality and space problems faced by traditional clustering algorithms in high-dimensional scenarios, improves the compactness and interpretability of clustering results, and provides a unified and reliable data foundation for constructing typical days / scenarios, decision sample compression, and sample weighting.
[0015] The technical solution of this invention explicitly characterizes the weighted distance and membership degree between samples and clusters, as well as the nuclear norm of submatrices within clusters during the clustering process. Combined with the distance-membership degree joint criterion for anomalous samples, it achieves effective identification and labeling of anomalous operating condition samples such as extreme weather, sudden maintenance, and data errors, significantly improving the robustness of subsequent prediction and optimization models to anomalous data.
[0016] Meanwhile, the method and system of this invention can be directly embedded into existing scheduling and trading platforms to achieve automated clustering preprocessing of the spot day-ahead market decision sample matrix, reduce the workload of manual screening and experience-based segmentation by modelers, and improve the efficiency and accuracy of business processes such as day-ahead market pricing strategy optimization, flexibility assessment, and security verification.
[0017] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0018] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0019] Figure 1 This is a schematic diagram of the method flow of an embodiment of the present invention. Detailed Implementation
[0020] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. 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 invention pertains.
[0021] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0022] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0023] Example 1 See appendix Figure 1 As shown in the figure, this embodiment discloses a clustering preprocessing method for the spot market decision sample matrix, including: Step 1: Sample matrix construction: Determine the sample time granularity and statistical period, select the historical time range, extract input class features, extract output class features, concatenate them in a fixed order to form a sample feature vector, and stack them row by row to form a sample matrix; In this step, by constructing a sample matrix set of spot day-ahead market decisions, the inputs such as diversified loads, uncertain power output and stochastic characteristics, probabilistic correlations between uncertain factors, independent energy storage, virtual power plants, climate, unit maintenance plans, grid power construction, and power decommissioning, as well as the outputs such as thermal power, wind power, photovoltaic, independent energy storage, and virtual power plants, are uniformly represented as a sample matrix. Step 2: Data normalization and feature selection: Normalize the features of each dimension of the sample matrix, calculate the mean and variance of each feature dimension, calculate the correlation coefficient between features, remove features with very small variance, merge or select highly correlated features, and obtain a normalized and compressed sample matrix. Step 3: Clustering Model Initialization: Set the Number of Clusters Initialize the fuzzy membership matrix, cluster center matrix, and dimension weight matrix; set the convergence threshold and the maximum number of iterations; and apply membership constraints. Step 4: Constructing the probabilistic model and objective function: Assuming that each feature dimension within a cluster is approximately independent, a multidimensional Gaussian probability model is established for each cluster, a mixture probability model of the samples is constructed, a clustering loss term containing fuzzy membership and dimension weights is constructed, and the nuclear norm regularization term of the submatrices within the cluster is added to the objective function to obtain the overall clustering objective function. Step 5: Alternating Iterative Optimization: Calculate the weighted distance from the sample to each cluster, update the fuzzy membership matrix based on the weighted distance, update the cluster center matrix, update the dimension weight matrix based on the intra-cluster weighted variance, update the nuclear norm related quantities of each cluster sub-matrix based on the current cluster partition, and calculate the change in the objective function or the change in membership. Determine whether the convergence condition is met. If yes, proceed to step six; otherwise, continue iterative optimization. Step Six: Anomaly Identification: Based on the final membership matrix, cluster center matrix, and dimension weight matrix, calculate the weighted distance of each sample to the nearest cluster, calculate the maximum membership degree of each sample, set distance thresholds and membership degree thresholds, determine whether the samples all meet the conditions of excessively large distance or excessively small membership, mark the samples that meet the conditions as anomalies, obtain the anomaly sample set, and complete the clustering preprocessing of the spot market decision sample matrix set. Step 7: Clustering Results Output and Application: Output the cluster to which each sample belongs and its membership degree, output the typical operating mode corresponding to each cluster, output the set of abnormal samples, and use the results for the construction of typical days or typical scenarios, sample screening and model training.
[0024] In this implementation example, the logical relationship between the above steps is as follows: Each dimension of the feature in the sample matrix is normalized to obtain normalized features. Based on these normalized features, statistical indicators for each dimension are defined for feature selection and dimensionality reduction. First, data normalization is performed to eliminate differences in the dimensions and scales of different features. Normalized features help ensure that each feature contributes equally to the results during clustering, unaffected by its original dimensions such as load or temperature. Then, based on these features, statistical indicators such as mean, variance, and correlation coefficient are used to select features and reduce dimensionality, ensuring that the clustering algorithm focuses only on features with important information and removes redundant or noisy features.
[0025] Before performing clustering, the number of clusters, K, needs to be set. Fuzzy clustering allows a sample to belong to multiple clusters simultaneously. The membership matrix represents the degree of membership of each sample to each cluster, typically with values between 0 and 1. This membership constraint serves as the basis for subsequent clustering calculations, controlling the allocation of samples. Fuzzy clustering can effectively handle the mixed characteristics of market states.
[0026] During clustering, a dimensional weight matrix is introduced for each cluster to reflect the attention given to different features across various dimensions. The center of each cluster is the weighted average of all samples in that cluster, and the cluster center matrix defines the representative value of each cluster across each dimension. By using weighted variance, the weights of each dimension can be dynamically adjusted, giving higher weights to dimensions with smaller variances during clustering, thereby strengthening intra-cluster consistency and suppressing the influence of unimportant features.
[0027] Building upon model-driven clustering, this paper introduces a probabilistic model to characterize the distribution of samples within each cluster. In traditional clustering methods, the relationships between samples are typically defined based on distance metrics (such as Euclidean distance). By introducing a probabilistic model, such as a Gaussian mixture model, to describe the distribution of samples within each cluster, we can better capture the statistical characteristics and distribution patterns of samples within the cluster, thereby improving the accuracy and robustness of clustering.
[0028] A nuclear norm regularization term is explicitly introduced into the clustering objective function. Finally, to ensure that the clustering results depend not only on the distance relationships between samples but also on maintaining the low-rank structure of the submatrices within clusters, a nuclear norm regularization term is introduced into the clustering objective function. Nuclear norm regularization encourages low-rank structure in the sample matrices within clusters, which helps to uncover stable patterns in the data, prevents overfitting, and enhances the interpretability and stability of the clustering results.
[0029] This embodiment of the above technical solution first reduces noise and redundant information through data normalization and feature selection. Then, it assigns different feature importance to each cluster through fuzzy membership matrices and dimensional weights. Next, a probabilistic model helps describe the distribution of samples within the cluster. Finally, nuclear norm regularization optimizes the clustering results to ensure the stability and low rank of the sample structure within the cluster.
[0030] The core objective of the above series of steps is to enable clustering to not only focus on the distance relationships between samples, but also to capture the complex structure of the data, such as time series patterns and nonlinear relationships between variables, through multi-level constraints and optimizations, thereby improving the accuracy and interpretability of clustering.
[0031] In one implementation example, specifically in step one, the various input and output quantities of the spot market decision-making process are sorted out and expressed to form a set of historical sample matrices that can be used for cluster analysis. This sets of spot market decision-making sample matrices include a unified mathematical representation of the input and output variables.
[0032] In this step, the time granularity and statistical period of the sample are first determined.
[0033] Samples are constructed using the time steps of the current market rolling optimization (e.g., 1 hour, 30 minutes). The historical time range of the samples can cover the past 1 to 3 years, ensuring both sample quantity and coverage of various climate and operating conditions.
[0034] make This represents the number of historical samples. If the unit is "day", it represents the number of historical days; if the unit is "time period", it represents the number of historical time periods. The total dimension of features for each sample includes two main categories: input and output features.
[0035] For each sample The following information is extracted from the scheduling and trading system: (1) Input class features The forecast includes time-of-use load forecasts, covering different levels such as the entire grid, regional areas, and user-side; available output forecasts for wind and solar power and related uncertainty quantification indicators, such as forecast intervals and variances; probability correlation estimation results between load and wind / solar output, such as indicators pre-calculated using correlation coefficients, Copula, etc.; available capacity, state of charge (SOC), and operational constraints of independent energy storage; available regulation capacity and controllable load scale of aggregated resources within virtual power plants; meteorological and climate information, including temperature, humidity, wind speed, irradiance, and extreme weather markers; unit maintenance plans, including whether maintenance is required within the corresponding period, maintenance capacity, and start and end times; and the construction / decommissioning status of grid power sources, such as whether a certain line is in operation, whether a certain unit has been decommissioned, and transmission channel constraints.
[0036] (2) Output class features The results of the recent clearing process include the output curves or time-sharing output decisions of each thermal power unit; the output plans or curtailment / waste of each wind farm and photovoltaic power station; the charging and discharging power trajectories and initial and final SOC of independent energy storage; and the aggregated output and internal resource decomposition instructions of virtual power plants.
[0037] All input and output features are concatenated in a fixed order to obtain the sample feature vector:
[0038] in: For the first The feature vector of each sample For each sample's feature dimensions, It contains two main categories of features: input and output, representing a D-dimensional space. This represents the total feature dimension of each sample. belong 3D space, that is, the sample has One feature; Input variable vector, including multi-variable loads, weather, available wind and solar power, maintenance plans, grid and power supply construction status, etc. Let the vector space of the input variables be... The feature dimension of the input variable vector for each sample; Output variable vector, including the output or bidding / clearing results of various entities such as thermal power, wind power, photovoltaic, independent energy storage, and virtual power plants. The vector space for output variables. This represents the feature dimension of the output variable vector for each sample; .
[0039] Stack all samples row-wise to obtain the spot market decision sample matrix:
[0040] in: This is a sample matrix of day-ahead market decisions for the spot market. Indicates the first The sample at the th Values can be taken in each feature dimension; ; .
[0041] It should be noted that, It is N × D The matrix contains all N samples. D Each feature value.
[0042] In one implementation example, specifically in step two, regarding normalization and statistical characteristic analysis: Because the dimensions and magnitudes of the various characteristics differ significantly—for example, load is measured in MW, temperature in °C, and output ratio may be 0-1—uniform normalization is required. That is, to eliminate the influence of different dimensions, for each dimension of the characteristic… Perform normalization. Let the first... The minimum and maximum values of the dimensional feature across all samples are as follows:
[0043] The normalized features are:
[0044] in: These are the normalized eigenvalues; To prevent extremely small constants with a denominator of zero.
[0045] After normalization, the following conditions are met:
[0046] Based on normalized data, statistical indicators for each dimension can be defined for feature selection and dimensionality compression: (1) Mean:
[0047] (2) Variance:
[0048] (3) Correlation coefficient, any two dimensions :
[0049] In the formula: : No. The sample mean of a dimensional feature; : No. Sample variance of 3D features; : No. Wei and Di The linear correlation coefficient between dimensional features.
[0050] Statistical indicators can be used to: eliminate features with extremely small variance (low information content); merge / screen highly correlated features. When the threshold is exceeded. These operations can reduce noise dimensionality and improve the efficiency and stability of subsequent high-dimensional clustering.
[0051] The output of step two above is: (1) Normalized sample matrix: The normalized matrix is obtained by normalizing each feature dimension in the sample matrix. The normalized matrix makes the dimensions and scales of different features consistent, ensuring that the subsequent clustering algorithm is not affected by the different dimensions of features.
[0052] (2) Statistical Indicators for Each Feature Dimension: By calculating statistical indicators such as mean, variance, and correlation coefficient, each feature dimension is analyzed to screen out important features and perform dimensionality compression. Specific outputs include: Mean: The mean of each feature dimension across all samples. Variance: The variance of each feature dimension, used to identify redundant features with small variances. Correlation Coefficient: Used to measure the correlation between feature dimensions, helping to identify and remove highly correlated features.
[0053] (3) Feature dimensions after screening: Based on statistical indicators (such as mean, variance and correlation coefficient), feature dimensions are screened and compressed to remove redundant or irrelevant features and retain the most useful information.
[0054] In short, the output of step two is a normalized feature matrix, used to eliminate dimensional differences between different features. The results of feature selection and dimensionality reduction include the selection of meaningful features and the dimensionality-reduced feature set.
[0055] In one implementation example, step three is fuzzy membership degree and basic constraints: This step introduces the idea of fuzzy clustering, which allows a sample to belong to multiple clusters to different degrees at the same time, so as to better reflect the mixed conditions in the spot market before the future, such as a day that has both high load characteristics and is affected by extreme weather.
[0056] The input for step three is the output of step two: the normalized sample matrix and the statistical feature analysis results, such as mean, variance, and correlation coefficient.
[0057] Step three involves constructing a fuzzy membership matrix based on the normalized data and statistical analysis results, updating the cluster centers, and optimizing the clustering process through basic constraints (such as dimensional weights). Specific steps include calculating the similarity between samples, calculating membership degrees, updating cluster centers, and adjusting dimensional weights.
[0058] The output of step three is: a fuzzy membership matrix, representing the membership degree of each sample to each cluster; a cluster centroid matrix, representing the center position of each cluster; and a dimensional weight matrix, reflecting the importance of different feature dimensions in clustering.
[0059] The goal of step two is to provide clean and effective input data for subsequent clustering through normalization and statistical feature analysis. It makes subsequent clustering more accurate by removing redundancy and standardizing data. Step three uses this cleaned data to further optimize the clustering results through fuzzy clustering methods and basic constraints. This process allows each sample to be flexibly assigned to multiple clusters, while considering the importance of features and updating the representative centers of the clusters.
[0060] Let the number of clusters be . Define the fuzzy membership matrix:
[0061] in, Indicates the first The sample belongs to the first The membership degree of each cluster, K This represents the number of clusters in the clustering process.
[0062] Membership constraints can be written as:
[0063] In the formula: Indicates the first The sample belongs to the first The membership degree of each cluster; The number of clusters in the clustering; Total number of samples; Sample index; Cluster index.
[0064] In a specific implementation example: U's storage: can be in memory... It uses double-precision matrix storage, or block storage to accommodate large-scale samples. Initial value settings: Initial membership degrees that satisfy the membership degree constraints can be randomly generated; alternatively, coarse classification can be performed first based on load level, season, etc., and then the membership degrees can be uniformly initialized in each coarse class to improve the convergence speed.
[0065] The physical meaning is that if a sample has multiple typical pattern characteristics in terms of load, climate, etc., its membership degree may not be zero in multiple clusters; this can avoid the information loss caused by hard partitioning and is more in line with the "fuzzy boundary" characteristics of actual system operation.
[0066] Regarding dimensional weights and cluster centers: To characterize the focus of different clusters on different feature dimensions, cluster-specific dimensional weights and cluster centers are introduced.
[0067] Introduce a dimension weight matrix for each cluster:
[0068] And satisfy:
[0069] in: :cluster In the Importance weights on each dimension; : The dimension weight matrix of all clusters.
[0070] Define the cluster center matrix:
[0071] in For clusters In the The central (prototype) value on the dimension.
[0072] In a typical fuzzy clustering framework, the update of cluster centers can be written as:
[0073] in: The fuzziness index; : Weighted membership degree; other symbols are the same as before.
[0074] Cluster center updating is a core step in fuzzy clustering, determining the quality and accuracy of the clustering results. By calculating and updating the membership matrix, cluster centers can be dynamically adjusted to better reflect the sample distribution. Cluster center updates use a weighted average to ensure that each cluster center better represents the samples within the cluster; samples with higher membership degrees have a greater impact on the cluster center. This process is repeated until the cluster centers converge, ultimately yielding a more stable and accurate clustering result. Within the fuzzy clustering framework, cluster center updates adjust the cluster centers based on the membership degree of each sample using a weighted average, progressively optimizing the clustering results. The updated cluster centers provide a representative pattern for each cluster, helping to identify typical operating states of the samples. The output of this step is the final cluster centers, membership matrix, and clustering results for the samples. These results are used in subsequent steps for outlier identification by calculating the distance or membership degree between samples and cluster centers, and can also provide input for market decision-making, strategy optimization, and machine learning models.
[0075] Dimension weights can be adaptively updated based on the intra-cluster weighted variance, for example:
[0076] In the formula: the numerator represents the first... Dimension in cluster The smaller the variance of the "compactness" in the cluster, the more important the dimension is in the cluster.
[0077] The denominator is a normalization factor, guaranteeing the formula Established.
[0078] In fuzzy clustering, adaptive updates of dimension weights adjust the importance of each feature dimension by considering the weighted variance within each cluster. Specifically, when a feature dimension has a highly concentrated sample distribution and low variance within a cluster, its weight is increased, indicating that this dimension provides more stable information in the cluster. Conversely, dimensions with high variance have lower weights because their changes may reflect more complex or unstable features. In this way, adaptive updates of dimension weights automatically adjust the influence of each dimension during the clustering process, ensuring that the most important features dominate the clustering.
[0079] The connection between this adaptive update and subsequent steps is mainly reflected in optimizing clustering results and improving model stability. In steps such as cluster center updating, outlier identification, and application of clustering results, adjusting dimensional weights allows the model to focus more on key features and reduce interference from noisy dimensions. Especially when the dataset contains multiple related or redundant features, updating dimensional weights ensures the effectiveness of the clustering model in high-dimensional data, thereby improving the accuracy of subsequent decision support, market optimization, and prediction models.
[0080] It should be noted that when a certain dimension is in a cluster If the sample variance within a dimension is small, it indicates that the samples are highly similar and the pattern is stable, then its weight... The weight will be amplified; if a certain dimension changes drastically within a cluster, it indicates that the dimension does not have good clustering consistency in that cluster, and the weight will be suppressed; through this adaptive weight mechanism, the present invention realizes subspace clustering: different clusters can automatically select the most important dimensions for themselves, without needing all dimensions to play a role.
[0081] In one implementation example, the specific process of step four is as follows: 1. Assume that the feature dimensions within each cluster are independent.
[0082] 2. The samples of each cluster are modeled as a product of multiple one-dimensional Gaussian distributions, that is, the samples of each cluster are a multidimensional distribution composed of multiple independent Gaussian distributions.
[0083] 3. Combine the distributions of all clusters into a Gaussian mixture model. By using a weighted approach, multiple Gaussian distributions are merged into a single overall model to describe the distribution of the samples.
[0084] This step uses a probabilistic model to characterize the distribution of samples within the cluster.
[0085] In one implementation example, the fourth specific step involves a probabilistic model and clustering criteria: Based on model-driven clustering, this invention introduces a probabilistic model to characterize the distribution of samples within a cluster. Assuming that in cluster... Within, if the characteristic conditions of each dimension are approximately independent, then the cluster... The conditional probability density can be modeled as a product of multidimensional Gaussian distributions:
[0086] in: : No. A cluster; : in the cluster Under these conditions, the sample The probability density; :cluster In the The mean parameter of the dimension (which can be compared with) (equivalent or related) :cluster In the The variance parameter in the dimension; other symbols are the same as before.
[0087] Define cluster prior weights ,satisfy The overall hybrid model is then:
[0088] in: :sample The overall probability density; :cluster The role of the overall mixture model is to effectively model data by calculating the probability distribution of samples, thereby helping to discover potential patterns in the data, classify them, and make subsequent optimizations and decisions.
[0089] By comparing the distances between model distributions under different parameters, a clustering objective function was constructed. Based on this, the present invention introduces nuclear norm regularization to form a matrix-structured objective function.
[0090] In practical implementation, a clustering objective function is constructed based on maximum likelihood to make the model... The goal is to approximate the true data distribution as closely as possible. This idea provides the theoretical foundation for the subsequent introduction of nuclear norm regularization.
[0091] In addition, the clustering objective function of the nuclear norm is introduced: the spot market decision samples have a matrix structure and time correlation. For example, the load and output of 24 time periods in a day form a "row vector" in the sample; the output of multiple units / power plants has a high correlation or low-rank structure in the column direction.
[0092] To fully utilize this structure, this invention explicitly introduces a nuclear norm regularization term into the clustering objective function, encouraging the sample submatrices within clusters to exhibit a low-rank structure, corresponding to the "typical operating mode".
[0093] Let the first Each cluster contains a set of sample indexes. The corresponding intra-cluster submatrix can then be represented as:
[0094] in: : No. Sample submatrices of each cluster; :cluster Medium sample size.
[0095] Define the nuclear norm as the sum of the singular values of a matrix:
[0096] in: For nuclear norm; :matrix The One singular value; : The rank of the submatrix within the cluster.
[0097] Taking into account fuzzy membership, dimensional weights, and nuclear norm constraints, this example constructs the following clustering objective function:
[0098] in, The objective function is the function that needs to be minimized. It consists of two main parts: the first part is the loss function of the clustering or matrix factorization model, which calculates the prediction error. The second part is the regularization term, used to prevent the model from overfitting. : Number of clusters or potential factors, representing the number of potential factors in clustering or matrix factorization in the model. : Sample count, representing the number of samples in the dataset. : Represents D-dimensional space. Weighting coefficients represent the weights of the samples. Belongs to cluster The degree of membership of a sample to a cluster. It is typically used in fuzzy clustering to represent the degree of membership of a sample to a cluster. Cluster The "degree of membership" is usually in the range of [0, 1]. Weight terms in matrix factorization represent clusters. and characteristics The relationship between them. It is usually learned during matrix factorization and is used to represent the contribution of different clusters to a specific feature. :sample In features The values on the matrix are the observed values in the data matrix, which usually represent the actual observed values of a sample on a certain feature. Cluster center or latent variable, representing a cluster In features Typical values of these variables are latent variables in the model. They are usually learned through optimization algorithms and represent the central characteristics of the cluster. Regularization parameter: Controls the strength of the regularization term. Larger values indicate stronger regularization. A higher value means a stronger penalty for the regularization term, and the model will pay more attention to avoiding overfitting; a smaller value... A higher value indicates a greater focus on the fitted data. Kernel norm regularization is a low-rank constraint on a matrix, used to promote the sparsity or low-rank structure of the matrix. The kernel norm is the sum of all singular values of a matrix, used to ensure that the representation of clusters is as concise (low-rank) as possible, thereby avoiding overfitting and improving the generalization ability of the model.
[0099] The first term is the projection clustering cost based on weighted Euclidean distance, reflecting fuzzy membership and dimensionality weights; it primarily measures the difference between each sample and its cluster center. This is achieved through a weighted approach (by...). and (Control), it calculates the actual observations of the sample. eigenvalues of clusters The difference between them. This aims to minimize prediction error, that is, to make each sample as close as possible to the representative features of its corresponding cluster.
[0100] The second term is the nuclear norm regularization term. The balancing parameter is used to control the degree of low rank of submatrices within a cluster. When the size is large, the algorithm tends to obtain a lower-rank cluster structure, which has a stronger suppression effect on outliers; when When the distance is smaller, the focus is more on minimizing the distance, and the clustering is closer to traditional soft clustering.
[0101] The nuclear norm constraint controls the complexity of the model, encourages cluster centers or latent feature representations to have low-rank structure, and prevents overfitting. This regularization term enables the model to better capture low-rank structures in the data and has a strong suppression effect on outliers.
[0102] Regularization parameters : Its function is to balance the weights between the loss function and the regularization term. A larger... This will make the model focus more on simplifying the structure and avoiding complexity; smaller This will allow the model to focus more on fitting the data itself.
[0103] The objective function continues the framework of model-driven projection clustering plus constraints. Taking into account the characteristics of the spot market decision sample matrix, the nuclear norm is introduced as an explicit regularization term to take advantage of the matrix structure and low-rank properties.
[0104] In one implementation example, the iterative optimization and update strategy in step six is as follows: to find the minimum value of the above objective function, an alternating iterative optimization strategy similar to EM and fuzzy C-means is adopted.
[0105] In the given In this case, iterative updates are performed using an alternating optimization approach. This allows the objective function to converge to a local optimum. The iterative process is designed as follows: 1. Initialization: (1) The samples are roughly divided according to the load level or season (such as spring, summer, autumn and winter), and the center of each class is used as the initial cluster center. Alternatively, a randomly selected sample can be used as the cluster center; (2) Initialize dimension weights (3) Initialize the membership matrix Satisfaction: .
[0106] 2. Membership update: For each sample and cluster Calculate the weighted distance:
[0107] Then update the membership:
[0108] in, :sample to cluster The weighted squared Euclidean distance represents the distance between the sample and the cluster center, with weights determined by... control. :cluster and characteristics The weight between clusters. This weight reflects the weight between clusters. Features The degree of importance attached to a feature. The larger the weight, the greater the contribution of that feature to the clustering results. :sample In features The actual observed values. :cluster The center value of represents the cluster. In features Typical or average values. : Dimension of features, representing the dimension of the feature space of the sample data. :sample Cluster Membership degree, representing the membership degree of a sample Belongs to cluster The degree of membership. The value of membership is between 0 and 1. : Represents an exponential function, used to calculate the exponential decay of the distance between a sample and the cluster center. The closer the distance, the greater the membership degree. Temperature parameter, used to control the degree of "fuzziness" in membership. Smaller... Larger values make cluster boundaries more blurred and membership changes smoother; The value makes the cluster boundaries clearer and the changes in membership degree more dramatic. :sample to cluster The square of the weighted distance. Calculated in the same way as the weighted distance, except for clusters. Perform the calculation. The number of clusters indicates the total number of clusters to which a sample can belong.
[0109] 3. Cluster center and dimension weight update: exist When fixed, according to formula Update cluster center According to the formula Update dimension weights .
[0110] 4. Updates related to nuclear norm number: Based on the current membership degree, the samples are divided into clusters. To obtain the submatrix For each Perform singular value decomposition and calculate If necessary, the relevant auxiliary variables are updated by the subgradient of the nuclear norm or the proximal operator to approximately minimize the second term in the objective function.
[0111] 5. Convergence Criterion: If the changes in the membership matrix between two adjacent iterations satisfy
[0112] If the algorithm converges, the iteration is stopped.
[0113] in: : Preset convergence threshold; Number of iterations. : indicates the first In the next iteration, the samples Cluster The membership degree is the probability or degree to which a sample belongs to a certain cluster. : indicates the first In the next iteration, the samples Cluster The membership degree. As the clustering process progresses, the membership degree will be gradually adjusted. This is the maximum value of the membership degree change, calculated as the largest change among all samples and clusters. By comparing the changes in the membership degree of a sample to its cluster in each iteration, the stability of the clustering result is determined. The maximum change value indicates which sample has the largest change in membership degree to a particular cluster among all clusters and all samples. If this change is less than a predetermined threshold (…), then… If the result is 0, then the algorithm is considered to have converged. The convergence threshold is used to determine whether clustering has converged. This is a pre-set, very small value, usually close to zero. When the change in the maximum membership degree is less than this threshold, the algorithm is considered to have converged and the iteration stops. The value setting depends on the specific application scenario. Smaller This will require more precise convergence, and larger convergence... This could lead to an earlier cessation.
[0114] In one implementation example, regarding step seven: anomaly sample identification and sample cluster update: to characterize the abnormal operating conditions, in the final iteration... Next, this step further involves identifying abnormal samples and cleaning the clustering results to provide high-quality data for subsequent spot market day-ahead modeling.
[0115] 1. Anomaly measurement calculation: For each sample Define its minimum cluster distance, and calculate its distance to the nearest cluster based on the final weighted distance:
[0116] in: :sample Abnormal measurements; : The weighted distance as defined; .
[0117] 2. Anomaly detection rules: Set distance thresholds With membership threshold If the following conditions are met: or
[0118] Then the sample The sample is marked as an anomaly, where: Distance threshold; Membership threshold. Samples marked as anomalous can be clustered separately or removed from the training set based on their distribution characteristics, thereby completing the clustering preprocessing and outlier removal of the spot market decision sample matrix set.
[0119] The actual situations corresponding to these samples may include: rare load curves and output characteristics caused by extreme weather; special clearing results caused by temporary maintenance or large-scale failures; and anomalies caused by measurement errors or data entry errors.
[0120] 3. Sample cluster update strategy: For samples marked as anomalous, the following processing methods are available: (1) In subsequent model training, a separate "abnormal scenario set" is established for security verification or risk analysis; (2) Or remove them from the “typical sample set” to avoid causing bias to the regression / prediction model; (3) If there are a large number of abnormal samples and they show a certain pattern, a new cluster can be defined and the clustering algorithm can be run again.
[0121] Thus, this invention completes the clustering preprocessing of the sample matrix set of day-ahead market decisions, resulting in: (1) The cluster to which each sample belongs and its membership degree; (2) Typical operating modes corresponding to each cluster (from the cluster center) Dimension weights and intra-cluster submatrices Common representations); (3) Abnormal sample set.
[0122] These outputs can be used directly: (1) Construct typical daily / typical scenarios for the current market; (2) Provides input for pricing strategy optimization, flexibility assessment, and security constraint unit division; (3) Provide structured and cleaned training data for subsequent machine learning prediction models.
[0123] In this implementation example, a set of sample matrices for day-ahead market decisions is constructed, including unified mathematical representations of input and output variables; the sample matrices are normalized and statistically analyzed to establish feature selection and dimensionality compression mechanisms; a high-dimensional projection clustering framework based on a probability model is constructed, introducing fuzzy membership degrees and dimensionality weights; a nuclear norm regularization term is explicitly introduced into the clustering objective function, utilizing the low-rank structure of the sample cluster submatrices to improve clustering quality; an iterative optimization algorithm combining EM concepts is designed to alternately update the membership matrix, cluster center vector, dimensionality weights, and nuclear norm-related variables; and an outlier identification and sample cluster update strategies are completed by combining the projection distance from sample points to clusters and the membership degree. By traversing historical samples, the clustering preprocessing results of the day-ahead market decision sample matrix set are generated and used for subsequent prediction and decision optimization models.
[0124] Among them, the unified sample matrix modeling for day-ahead spot market decision-making: time-varying factors such as multi-load, uncertain power output, probabilistic correlation, energy storage and virtual power plant status, climate, maintenance plans, power plant construction and decommissioning, etc., are uniformly embedded into a high-dimensional sample matrix structure along with the corresponding thermal power, wind power, photovoltaic, energy storage, and virtual power plant output decisions, providing a unified data carrier for clustering.
[0125] A high-dimensional projection clustering mechanism incorporating dimensional weights: Unlike traditional K-means clustering only in the full-dimensional space, this invention introduces a dimensional weight matrix for each cluster, automatically learns the contribution of each feature in the corresponding cluster, and achieves a characterization of the subspace clustering structure, thus improving the clustering performance and interpretability under high-dimensional data.
[0126] Clustering determination and target construction based on probabilistic models: By utilizing the assumption of approximate independence of high-dimensional samples in each dimension, each cluster is modeled as a product of multidimensional Gaussian distributions, a mixed probability model is constructed, and clustering determination is achieved through the likelihood function or an equivalent objective function, thereby improving the fitting ability to complex sample distributions in the spot market before the market opens.
[0127] Matrix structure clustering with nuclear norm regularization: Taking advantage of the inherent matrix and low-rank structure of spot market decision samples, a nuclear norm term of the sample submatrix within the cluster is introduced into the clustering objective function. By controlling the rank of each submatrix, the compactness of the intra-cluster structure and the consistency of patterns are enhanced, thereby achieving stable extraction of operating patterns.
[0128] Anomaly identification and clustering update mechanism: Combining projection distance and membership degree as joint criteria, an anomaly identification method is proposed for abnormal operating conditions (extreme load, abnormal weather, sudden maintenance, etc.) in the spot market before the day-ahead, and the cluster structure is dynamically updated according to the distribution of anomaly points to improve the robustness of clustering results to abnormal data.
[0129] It can be seamlessly integrated with the spot market day-ahead clearing / optimization model: the clustering results directly affect the sample selection, typical day / typical scenario construction, sample weighting and other stages, providing a data foundation for the day-ahead market pricing strategy optimization, safety constraint unit carrying, flexibility assessment and other models.
[0130] This embodiment's sub-technical solution achieves unified modeling: within a unified data structure, it organizes and expresses various inputs and outputs of day-ahead market decisions, forming a set of historical sample matrices that can be used for cluster analysis; it achieves high-dimensional clustering: avoiding the curse of dimensionality and achieving efficient clustering of the sample matrix when the dimensionality is extremely high and the importance of different dimensions varies; it achieves feature selection and dimensionality reduction: analyzing the characteristics of the day-ahead market decision sample matrix from the perspectives of data structure, magnitude, dimension, and dimensionality, and combining statistical indicators to achieve feature selection and dimensionality compression; it achieves cluster robustness: effectively performing cluster partitioning and cluster updates under the premise of abnormal operating conditions and noisy data; and it achieves matrix structure utilization: utilizing the low-rank property of the sample matrix, the stability and interpretability of the cluster structure are achieved through nuclear norm constraints, thereby forming cluster preprocessing results that can be used for day-ahead market decisions.
[0131] Example: Specific application in the spot market of a certain regional power grid: This example uses a certain regional power grid to illustrate a specific application process of the method of the present invention.
[0132] 1. Data Scope and Scale: Historical Dates: Spot market data for the past 3 years; Time Granularity: Sampled on a daily basis, each day includes decision results for 24 time periods; Sample Size: Day; Feature dimension: Input dimension approximately This includes system load curve characteristics, predicted power and uncertainty parameters for each wind farm / PV station, maintenance status, grid constraint indicators, meteorological characteristics, etc.; the output dimensions are approximately... This includes the output of more than ten thermal power units, the output of multiple wind farms / photovoltaic power stations, and the output trajectories or related indicators of several independent energy storage and virtual power plants; Total dimensions: .
[0133] 2. Parameter settings: Number of clusters: The fuzziness index is selected based on a comprehensive analysis of actual load, meteorological patterns, seasonal divisions, and model evaluation. Temperature parameters: Empirical values (e.g., 0.5–1.5) are used, and the values are determined through cross-validation; nuclear norm weight parameters: Optimize within the range of 0.01 to 0.1; Convergence threshold: .
[0134] 3. Operation Process: Using the system modules described in the specific implementation method, extract data from EMS / SCADA, trading systems, etc., for the past 3 years; construct a sample matrix. Normalization and feature selection are performed to obtain Set the number of clusters. ,initialization Perform iterative clustering with nuclear norm constraints until the convergence criterion is met; calculate and According to the formula , or Mark abnormal samples.
[0135] 4. Results Interpretation and Application: Cluster analysis shows that among the 8 clusters, 2 clusters correspond to high-load summer high-temperature scenarios, characterized by high peak loads, a large proportion of air conditioning load, and relatively stable wind and solar power output characteristics; 2 clusters correspond to high wind and solar power output scenarios in spring and autumn, with dimensional weights indicating that wind and solar prediction errors and curtailment indicators have relatively large weights in these two clusters; the remaining clusters correspond to characteristic scenarios such as "low-load nighttime" and "high heat load for winter heating." Analysis of cluster centers... and dimensional weights It can be clearly seen that in each cluster: which features (such as wind power prediction error and energy storage output) play a dominant role; and which output decisions (such as thermal power unit start-stop combination and energy storage charging and discharging strategy) have highly consistent patterns within the cluster.
[0136] The anomalous sample set is mainly concentrated on days of extreme cold waves and heat waves; and dates when large-scale maintenance or malfunctions cause abnormal fluctuations in clearing results. These anomalous samples will be marked as risk scenarios in subsequent pricing strategy training and incorporated into simulations and stress tests separately, rather than being directly used for statistical modeling of "typical scenarios".
[0137] Example: Comparative Application with Traditional Clustering Methods To further illustrate the beneficial effects of the present invention, this embodiment provides a comparison with traditional K-means, fuzzy C-means (FCM), and other methods on the same spot market day-ahead dataset.
[0138] 1. Comparison scheme setup Option A: Traditional K-means clustering (Euclidean distance, full-dimensionality); Option B: Traditional FCM clustering (fuzzy membership, but without dimensional weights and nuclear norm constraints). Scheme C: The nuclear norm high-dimensional clustering method of the present invention (with dimensional weights and nuclear norm constraints, using the objective function of equation (20)).
[0139] 2. Evaluation Indicators Within-cluster sum of squared errors (SSE); inter-cluster distance metrics (e.g., inter-cluster variance); the effectiveness of clustering results in subsequent prediction models (e.g., the mean squared error (RMSE) of a daily load prediction model trained on each cluster); the interpretability of clustering results (through analysis). (Check whether the importance of each cluster feature is consistent with operational experience).
[0140] 3. Comparative Conclusions In high-dimensional scenarios, SSE is difficult to decrease significantly due to the "curse of dimensionality" in Scheme A, and the cluster structure is not obvious.
[0141] Scheme B improves clustering flexibility to some extent, but still treats all dimensions the same, making it difficult to highlight key features such as wind power prediction errors and energy storage output.
[0142] Solution C, which is the present invention, uses dimensional weights. and nuclear norm constraints The introduction of this method significantly improves the consistency of key feature dimensions within each cluster and suppresses the noise influence on secondary feature dimensions. As a result, the RMSE of the subsequent prediction model is significantly lower than that of schemes A and B, and the operating mode reflected by the cluster center has a better physical explanation.
[0143] In this embodiment of the sub-technical solution, the following steps are taken: First, inputs such as multi-source loads, uncertain power output and their random characteristics, probabilistic correlations between uncertain factors, independent energy storage, virtual power plants, climate, unit maintenance plans, grid power construction, and power decommissioning are analyzed, along with outputs such as thermal power, wind power, photovoltaic power, independent energy storage, and virtual power plants, to construct a unified set of day-ahead market decision-making sample matrices. Then, the sample matrices are normalized and statistically analyzed to achieve feature selection and dimensionality compression from the perspectives of data structure, magnitude, dimensions, and dimensionality. Based on this, fuzzy membership, intra-cluster dimensional weights, and probabilistic models are introduced to construct a high-dimensional projection clustering framework suitable for day-ahead market decision-making samples. The nuclear norm regularization term of the intra-cluster sample submatrices is embedded in the clustering objective function, and typical operating modes are extracted using the low-rank structure of the sample matrix. By iteratively updating membership, cluster centers, and dimensional weights, and combining weighted distance and membership thresholds, the samples are clustered and abnormal samples are identified, completing the clustering preprocessing of the day-ahead market decision-making sample matrix set. This invention can alleviate the "curse of dimensionality" and noise interference problems of high-dimensional data, automatically highlight key feature dimensions, extract typical operating scenarios with physical significance, and improve the robustness and modeling efficiency of subsequent prediction and optimization models for abnormal operating conditions.
[0144] Example 2 The purpose of this embodiment is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the above-described method.
[0145] The processor can be a general-purpose CPU, GPU, or dedicated accelerator chip, used to execute clustering algorithms and matrix operations; the memory is used to store the sample matrix. Normalized matrix Membership matrix Cluster center matrix Dimension weight matrix And intermediate calculation results; the network interface is used for data interaction with EMS / SCADA, trading systems, meteorological systems, etc.
[0146] The programs running on this computer device include: a data acquisition and preprocessing program; a clustering model construction and iterative optimization program, used to perform relevant calculations in specific implementation methods; and a clustering result management and visualization program, used to display typical load curves, power generation output modes, etc. of each cluster.
[0147] Example 3 The purpose of this embodiment is to provide a computer-readable storage medium.
[0148] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the above method.
[0149] The computer-readable storage medium may be a disk, optical disk, USB flash drive, ROM, RAM, or any other portable or fixed storage medium; it stores one or more programs that, when executed on a processor, cause the processor to perform all the steps of any method embodiment of the present invention, including: Constructing a sample matrix of spot market decisions for the current day Normalize the samples; initialize and iteratively update the membership matrix. Cluster center matrix Dimension weight matrix Minimize the objective function based on the nuclear norm constraint. Calculate the anomaly index and label abnormal samples.
[0150] Through the above-described hardware and storage medium embodiments, the present invention can be integrated into existing scheduling / trading platforms as a software module, or run as an independent system on a dedicated server to achieve automated clustering preprocessing of the spot day-ahead market decision sample matrix.
[0151] Example 4 The purpose of this embodiment is to provide a preprocessing system for clustering sample matrices of spot market decision-making, including: The sample matrix construction module is configured to: determine the time granularity and statistical period of the samples and construct the sample matrix; The normalization module is configured to: normalize each dimension of the feature in the sample matrix to obtain the normalized feature, and define statistical indicators for each dimension based on the normalized feature for feature selection and dimension compression. The update module is configured as follows: set the number of clusters, define the fuzzy membership matrix, and obtain the membership constraints based on the fuzzy membership matrix; introduce a dimension weight matrix for each cluster, define the cluster center matrix, update the cluster centers under a typical fuzzy clustering framework, and adaptively update the dimension weights based on the intra-cluster weighted variance. The clustering objective function building module is configured to: introduce a probabilistic model to characterize the distribution of samples within clusters based on model-driven clustering; and explicitly introduce a nuclear norm regularization term into the clustering objective function. The preprocessing output module is configured to use an alternating iterative optimization strategy to find the minimum value of the clustering objective function; Based on the minimum value of the clustering objective function, further abnormal sample identification and clustering result cleaning are performed, and the cluster to which each sample belongs and its membership degree, the typical operating mode corresponding to each cluster and the set of abnormal samples are output.
[0152] Example 5 The purpose of this embodiment is to provide a computer program product containing instructions that, when run on a computer, cause the computer to perform the methods and functions involved in any of the above embodiments. The steps and methods involved in the apparatus of the above embodiments correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0153] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0154] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. 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 the present invention are still within the scope of protection of the present invention.
Claims
1. A preprocessing method for clustering the sample matrix of the spot market decision-making process, characterized by: include: Step 1: Sample Matrix Construction: Determine the sample time granularity and statistical period, select the historical time range, extract input class features, extract output class features, concatenate them in a fixed order to form a sample feature vector, and stack them row by row to form a sample matrix for spot day-ahead market decision-making; By constructing a sample matrix of spot day-ahead market decisions; For each sample Extracting input class features from the scheduling and transaction system With output class features ; All input and output features are concatenated in a fixed order to obtain the sample feature vector: in: For the first The feature vector of each sample For each sample's feature dimensions, It contains two main categories of features: input and output, representing a D-dimensional space. This represents the total feature dimension of each sample. belong 3D space, that is, the sample has One feature; Input variable vector, including multi-variable loads, weather, available wind and solar power, maintenance plans, and grid and power supply construction status. Let the vector space of the input variables be... The feature dimension of the input variable vector for each sample; Output variable vector, including the output or bidding / clearing results of each entity, including thermal power, wind power, photovoltaic, independent energy storage, and virtual power plants. The vector space for output variables. This represents the feature dimension of the output variable vector for each sample; ; Step 2: Data normalization and feature selection: Normalize the features of each dimension of the sample matrix, calculate the mean and variance of each feature dimension, calculate the correlation coefficient between features, remove features with very small variance, merge or select highly correlated features, and obtain a normalized and compressed sample matrix. Step 3: Clustering Model Initialization: Set the Number of Clusters Initialize the fuzzy membership matrix, cluster center matrix, and dimension weight matrix; set the convergence threshold and the maximum number of iterations; and apply membership constraints. Step 4: Constructing the probabilistic model and objective function: Assuming that each feature dimension within a cluster is approximately independent, a multidimensional Gaussian probability model is established for each cluster, a mixture probability model of the samples is constructed, a clustering loss term containing fuzzy membership and dimension weights is constructed, and the nuclear norm regularization term of the submatrices within the cluster is added to the objective function to obtain the overall clustering objective function. Where, assuming in cluster Within, if the characteristic conditions of each dimension are approximately independent, then the cluster... The conditional probability density can be modeled as a product of multidimensional Gaussian distributions: in: : No. A cluster; : in the cluster Under these conditions, the sample The probability density; :cluster In the The mean parameter of the dimension; :cluster In the The variance parameter in the dimension; Define cluster prior weights ,satisfy The overall hybrid model is then: in: :sample The overall probability density; :cluster The prior probabilities of the overall mixture model are used to effectively model data by calculating the probability distribution of samples, which helps to discover potential patterns in the data, classify them, and make subsequent optimizations and decisions. The clustering objective function is: in, The nuclear norm is defined as the sum of the singular values of a matrix: , :matrix The One singular value; : The rank of the submatrix within the cluster These are the normalized eigenvalues. For clusters In the The central value on the dimension, :cluster In the Importance weights on dimensions Indicates the first The sample belongs to the first The membership degree of each cluster, Regularization parameters; Total number of samples Total feature dimension for each sample; Step 5: Alternating Iterative Optimization: Calculate the weighted distance from the sample to each cluster, update the fuzzy membership matrix based on the weighted distance, update the cluster center matrix, update the dimension weight matrix based on the intra-cluster weighted variance, update the nuclear norm related quantities of each cluster sub-matrix based on the current cluster partition, and calculate the change in the objective function or the change in membership. Determine whether the convergence condition is met. If yes, proceed to step six; otherwise, continue iterative optimization. Specifically, for each sample, a minimum cluster distance is defined, and its distance to the nearest cluster is calculated based on the final weighted distance; for each sample and cluster Calculate the weighted distance: Then update the membership: in, :sample to cluster The square of the weighted Euclidean distance represents the distance between the sample and the cluster center; :sample In features Actual observed values; : Represents an exponential function, used to calculate the exponential decay of the distance between a sample and the cluster center; the closer the distance, the greater the membership degree. Temperature parameter, used to control the degree of fuzziness in membership; :sample to cluster The square of the weighted distance; The convergence criterion is that if the changes in the membership matrix between two consecutive iterations satisfy: in: : Preset convergence threshold; Number of iterations : indicates the first In the next iteration, the samples Cluster membership degree : indicates the first In the next iteration, the samples Cluster Membership degree; dimensional weights can be adaptively updated based on the intra-cluster weighted variance: : Weighted membership degree To prevent extremely small constants with a denominator of zero, For fuzziness index, Step Six: Anomaly Identification: Based on the final membership matrix, cluster center matrix, and dimension weight matrix, calculate the weighted distance of each sample to the nearest cluster, calculate the maximum membership degree of each sample, set distance thresholds and membership degree thresholds, determine whether the samples all meet the conditions of excessively large distance or excessively small membership, mark the samples that meet the conditions as anomalies, obtain the anomaly sample set, and complete the clustering preprocessing of the spot market decision sample matrix set. Anomaly detection rules: Set distance threshold With membership threshold If the following conditions are met: or Then the sample The sample is marked as an anomaly, where: Distance threshold; Membership threshold For the sample Anomaly measurement: For samples marked as anomalous, they can be clustered separately or removed from the training set based on their distribution characteristics. Step 7: Clustering Results Output and Application: Output the cluster to which each sample belongs and its membership degree, output the typical operating mode corresponding to each cluster, output the set of abnormal samples, and use the results for the construction of typical days or typical scenarios, sample screening and model training.
2. The spot market day-ahead market decision sample matrix clustering preprocessing method as described in claim 1, characterized in that, When constructing the sample matrix, the specific steps include: Stack all samples row-wise to obtain the spot market decision sample matrix: in: This is a sample matrix of day-ahead market decisions for the spot market. Indicates the first The sample at the th Values can be taken in each feature dimension; ; ; It is N × D The matrix contains all N samples. D Each feature value.
3. The spot market day-ahead market decision sample matrix clustering preprocessing method as described in claim 1, characterized in that, Statistical indicators are used to: eliminate features with extremely small variance; Merge or filter highly relevant features; variance: In the formula: : No. The sample mean of a dimensional feature; : No. Sample variance of 3D features; These are the normalized eigenvalues.
4. A preprocessing system for clustering sample matrices of day-ahead market decisions, employing the preprocessing method for clustering sample matrices of day-ahead market decisions as described in any one of claims 1-3, characterized in that, include: The sample matrix construction module is configured to: determine the time granularity and statistical period of the samples and construct the sample matrix; By constructing a sample matrix of spot day-ahead market decisions; The normalization module is configured to: normalize each dimension of the feature in the sample matrix to obtain the normalized feature, and define statistical indicators for each dimension based on the normalized feature for feature selection and dimension compression. The update module is configured as follows: set the number of clusters, define the fuzzy membership matrix, and obtain the membership constraints based on the fuzzy membership matrix; introduce a dimension weight matrix for each cluster, define the cluster center matrix, update the cluster centers under a typical fuzzy clustering framework, and adaptively update the dimension weights based on the intra-cluster weighted variance. The clustering objective function building module is configured to: introduce a probabilistic model to characterize the distribution of samples within clusters based on model-driven clustering; and explicitly introduce a nuclear norm regularization term into the clustering objective function. The preprocessing output module is configured to use an alternating iterative optimization strategy to find the minimum value of the clustering objective function; Based on the minimum value of the clustering objective function, further abnormal sample identification and clustering result cleaning are performed, and the cluster to which each sample belongs and its membership degree, the typical operating mode corresponding to each cluster and the set of abnormal samples are output.
5. The spot day-ahead market decision sample matrix clustering preprocessing system as described in claim 4, characterized in that, When constructing the sample matrix, the specific steps include: Stack all samples row-wise to obtain the spot market decision sample matrix: in: This is a sample matrix of day-ahead market decisions for the spot market. Indicates the first The sample at the th Values can be taken in each feature dimension; ; ; It is N × D The matrix contains all N samples. D Each feature value.
6. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 3.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method described in any one of claims 1-3.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it performs the steps of the method described in any one of claims 1-3 above.
Citation Information
Patent Citations
Power system abnormal data clustering and vulnerability detection method based on fuzzy mean value algorithm
CN120874056A
