Power consumption prediction method and system based on pattern recognition

By aligning electricity consumption data in time and space and extracting features, a pattern-specific prediction model is constructed, which solves the shortcomings of existing technologies in electricity consumption pattern recognition and prediction, and realizes efficient and real-time electricity consumption prediction and decision support.

CN121901950AInactive Publication Date: 2026-04-21GUANGXI MODERN VOCATIONAL & TECH COLLEGE +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGXI MODERN VOCATIONAL & TECH COLLEGE
Filing Date
2025-12-04
Publication Date
2026-04-21
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing electricity consumption forecasting methods struggle to automatically identify various electricity consumption patterns when faced with complex and ever-changing electricity consumption behaviors. They lack dedicated forecasting models for different patterns and uncertainty quantification. Furthermore, deep learning methods have high computational complexity and long training times, failing to meet the real-time requirements of modern power systems.

Method used

By acquiring and assessing electricity consumption data, spatiotemporal alignment and missing value repair are performed. Feature vectors are extracted and dimensionality reduction is carried out. Clustering optimization is performed using a mini-batch iterative update method. A pattern-specific prediction model is constructed, and real-time data quality checks and uncertainty quantification are conducted. A lightweight prediction model is then used for rapid pattern recognition and prediction.

Benefits of technology

It achieves accurate prediction of various power consumption patterns, reduces computational complexity and training time, adapts to different data conditions, dynamically adjusts model parameters, provides reliable prediction results and decision support, and meets the real-time needs of industrial parks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121901950A_ABST
    Figure CN121901950A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power systems, and discloses a power consumption prediction method and system based on pattern recognition, and the method comprises the steps: obtaining original power consumption data, carrying out the quality evaluation and grading, and carrying out the time-space alignment according to a quality grade label; abnormal and missing value detection is carried out, and abnormal points and missing values are repaired; carrying out feature extraction to obtain a feature vector, and carrying out feature fusion and dimension reduction processing on the feature vector; initializing a clustering center, carrying out clustering optimization by adopting a small-batch iteration updating method, and then carrying out mode label distribution; constructing a training set of each mode, and training a special prediction model of each mode; performing real-time data quality inspection, feature extraction and dimension reduction, rapid pattern recognition and prediction calculation; quantile regression uncertainty quantification, mode recognition entropy evaluation and prediction reliability dynamic monitoring are carried out; according to the method, the prediction precision and the calculation efficiency are improved, and the adaptability and the robustness of the system are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system technology, and more specifically, to a method and system for predicting electricity consumption based on pattern recognition. Background Technology

[0002] With the continued growth of global energy consumption and the deepening of intelligent reforms in the power system, accurate power load forecasting has become a key technological support for ensuring the safe and stable operation of the power grid, optimizing energy allocation, and promoting the grid connection and consumption of renewable energy. Especially in the scenario of energy management in industrial parks, these parks typically house various types of high-energy-consuming enterprises, such as semiconductor chip manufacturing, precision machining, biomedical research and development, data centers, and cold chain logistics. These different types of enterprises exhibit significantly different electricity consumption patterns. Furthermore, with the integration of distributed photovoltaic power generation systems and energy storage systems, and the advancement of power market reforms, energy management centers need to accurately forecast the future electricity load of different types of enterprises within the park to achieve goals such as maximizing the self-consumption ratio of photovoltaic power generation, optimizing energy storage charging and discharging strategies, and reducing electricity purchase costs.

[0003] Traditional electricity consumption forecasting methods primarily rely on statistical methods such as time series analysis and regression analysis. While these methods can reflect the periodicity and trend characteristics of load to some extent, their accuracy and adaptability are insufficient to meet the actual needs of modern power systems given increasingly complex electricity consumption patterns, diverse and heterogeneous influencing factors, and nonlinear and non-stationary load changes. In recent years, electricity consumption forecasting methods based on deep learning have gained increasing attention. By constructing complex models such as Long Short-Term Memory networks and convolutional neural networks, they can capture the complex nonlinear relationships in electricity consumption data to some extent. However, these deep learning methods generally suffer from high model complexity, long training times, high computational resource consumption, and poor interpretability. Furthermore, most methods use a uniform model to predict all electricity consumption scenarios, failing to fully consider the differences between different electricity consumption patterns, often leading to increased prediction errors during mode switching.

[0004] Existing technologies also include some pattern recognition-based electricity consumption forecasting methods that attempt to improve prediction accuracy by identifying electricity consumption patterns. However, most existing pattern recognition methods employ traditional K-means clustering or simple classification algorithms, requiring manual setting of features and the number of patterns. They lack the ability to automatically discover new electricity consumption patterns and are insufficiently adaptable to complex and ever-changing electricity consumption behaviors. Furthermore, the integration of pattern recognition results with prediction models in existing technologies is relatively loose. They fail to construct specialized prediction models for different patterns and lack modeling of the dynamic evolution of electricity consumption patterns and quantification of prediction uncertainties.

[0005] Therefore, a new pattern recognition-based electricity consumption forecasting method is needed that can automatically discover and identify multiple electricity consumption patterns, build efficient and accurate dedicated forecasting models for different patterns, provide uncertainty quantification and decision support, and continuously adapt to the evolution of electricity consumption behavior. Summary of the Invention

[0006] This invention provides a power consumption prediction method and system based on pattern recognition, which solves the technical problems of power system X in related technologies.

[0007] This invention provides a pattern recognition-based electricity consumption prediction method, comprising:

[0008] Obtain raw electricity consumption data, perform quality assessment and classification on the raw electricity consumption data, and perform spatiotemporal alignment based on the quality level labels to obtain a spatiotemporally aligned multi-source dataset;

[0009] Anomaly and missing value detection is performed on spatiotemporally aligned multi-source datasets, and anomalies and missing values ​​are repaired to obtain clean multi-source datasets.

[0010] Feature vectors are obtained by extracting features from a clean multi-source dataset. Feature vectors are then fused and dimensionality reduced to obtain a low-dimensional embedded feature set.

[0011] Cluster centers are initialized based on a low-dimensional embedded feature set. After cluster optimization using a mini-batch iterative update method, pattern labels are assigned to obtain a pattern label set.

[0012] Training sets for each pattern are constructed based on the pattern label set and a clean multi-source dataset. Dedicated prediction models for each pattern are then trained to obtain a set of pattern-specific prediction models.

[0013] Based on a set of pattern-specific prediction models, real-time data quality checks, feature extraction and dimensionality reduction, rapid pattern recognition and prediction calculations are performed to obtain a set of online prediction results.

[0014] Based on the online prediction result set, quantile regression uncertainty quantification, pattern recognition entropy value evaluation, and prediction reliability dynamic monitoring are performed to obtain an enhanced prediction result set.

[0015] In a preferred embodiment, the step of assessing and classifying the quality of the raw electricity consumption data, and performing spatiotemporal alignment based on the quality level labels, includes:

[0016] Three-phase power parameters are collected based on a smart meter acquisition system, and an adaptive sampling frequency configuration strategy based on load change rate is adopted.

[0017] A multi-dimensional quality assessment method is adopted to calculate the quality score based on sampling frequency, data integrity rate and communication stability indicators.

[0018] Data with a quality score greater than or equal to the second quality threshold is labeled as high quality level A, data with a quality score greater than or equal to the first quality threshold but less than the second quality threshold is labeled as medium quality level B, and data with a quality score less than the first quality threshold is labeled as low quality level C.

[0019] A reference timestamp alignment method is adopted, and a linear interpolation method is used to synchronize the time of data with misaligned sampling times.

[0020] In a preferred embodiment, the step of detecting outliers and missing values ​​based on a spatiotemporally aligned multi-source dataset and repairing outliers and missing values ​​includes:

[0021] Based on quality level labels, a strategy mapping method is used to configure corresponding anomaly detection strategies for different quality levels;

[0022] Configure a complete three-dimensional constraint detection strategy for high-quality A-level data, including temporal continuity constraints, spatial correlation constraints, and physical rationality constraints;

[0023] Configure a two-dimensional constraint detection strategy for data of medium quality level B, including time continuity constraint detection and physical rationality constraint detection;

[0024] Configure a single-dimensional constraint detection strategy for low-quality grade C data, which only includes physical rationality constraint detection;

[0025] Based on the detected outliers and missing values, an adaptive repair strategy based on the missing value scale is adopted.

[0026] For small-scale cases where the number of consecutive missing or abnormal time steps does not exceed the time step threshold, a linear interpolation method is used for rapid repair.

[0027] For large-scale cases exceeding the time step threshold, historical data matching and repair are used;

[0028] For extreme cases involving long time periods and the inability to match sufficiently similar historical data, a tensor-based completion method is used for deep repair.

[0029] In a preferred embodiment, the steps of extracting features from a clean multi-source dataset to obtain a feature vector, and performing feature fusion and dimensionality reduction on the feature vector include:

[0030] Based on the power consumption data from clean multi-source datasets, a multi-scale sliding window statistical method oriented by power load characteristics is used to extract time-domain statistical features. The time window scale is set to correspond to short-term load changes, load changes during scheduling periods, daily load curves and weekly load patterns, respectively.

[0031] Extract the following data within each time window: average load, load variance, peak-to-valley difference, load factor, load fluctuation coefficient, maximum load utilization hours, and load density distribution entropy.

[0032] The feature vectors of each dimension are standardized so that the feature values ​​are mapped to a uniform normalization range;

[0033] Principal component analysis is used to reduce the dimensionality of features based on the standardized feature vectors.

[0034] In a preferred embodiment, the step of initializing cluster centers based on a low-dimensional embedded feature set, optimizing clustering using a mini-batch iterative update method, and then assigning pattern labels includes:

[0035] Based on a low-dimensional embedded feature set, the K-means++ intelligent initialization method is used to determine the initial cluster centers;

[0036] The low-dimensional embedding vectors are preprocessed with L2 normalization, and clustering optimization is performed using a mini-batch iterative update method. In each iteration, a mini-batch subset is randomly selected, and the nearest neighbor search method is used to assign the samples to the nearest cluster centers. The cluster centers are then adjusted based on the incremental mean update method.

[0037] Based on the optimized cluster centers, the final pattern label is assigned to all samples, and the nearest neighbor determination method is used to determine the pattern label.

[0038] In a preferred embodiment, the step of constructing a training set for each pattern based on the pattern label set and a clean multi-source dataset, and training a dedicated prediction model for each pattern, includes:

[0039] Based on the pattern label set, a dedicated training set is constructed for each electricity consumption pattern;

[0040] Based on the historical load sequences and power influencing factors corresponding to the clean multi-source dataset, an input feature vector is constructed.

[0041] Extract the prediction target, pair the input features with the prediction target, and obtain the training sample set of the load pattern;

[0042] We select the gradient boosting tree framework to construct a dedicated prediction model for the load pattern, and adopt a modeling strategy that incorporates power system constraints to obtain the configuration of the load pattern prediction model that incorporates power system constraints.

[0043] An iterative training method is used to build a prediction model. In each iteration, the prediction residual is calculated, the regression tree is trained to minimize the sum of squared residuals, the new tree is added to the ensemble model and the parameters are updated, and the prediction value is corrected in combination with power system constraints.

[0044] Pattern-specific prediction models are trained for each electricity consumption pattern, and model parameters and feature importance are saved. An index mapping between patterns and models is established.

[0045] In a preferred embodiment, the steps of performing real-time data quality checks, feature extraction and dimensionality reduction, rapid pattern recognition, and prediction calculation based on a set of pattern-specific prediction models include:

[0046] Based on real-time collected electricity consumption data, data quality checks are performed and interpolation repairs are carried out when anomalies are detected.

[0047] Based on the preprocessed real-time data, a multi-scale sliding window statistical method is used to extract time-domain features, a typical daily load curve analysis method of the power system is used to extract morphological features, and external factors are feature-encoded to construct a high-dimensional original feature vector.

[0048] Based on the high-dimensional original feature vector and the dimension reduction transformation matrix, matrix multiplication is used to quickly calculate the low-dimensional embedding vector;

[0049] The pattern category is determined by calculating the Euclidean distance from real-time data to each cluster center;

[0050] Based on the identified load pattern, the corresponding pattern-specific prediction model is invoked to obtain the initial prediction value;

[0051] The initial prediction results are corrected, including power range constraints, power change rate constraints, and power balance constraint checks, and the final power consumption prediction value is output.

[0052] In a preferred embodiment, the steps of quantizing quantile regression uncertainty, evaluating pattern recognition entropy, and dynamically monitoring prediction reliability based on the online prediction result set include:

[0053] Based on the set of online prediction results, three models are called simultaneously to assess uncertainty and output the predicted power consumption value with confidence interval;

[0054] Based on the pattern recognition results, the soft assignment probability distribution is calculated and the entropy value is calculated, and the prediction uncertainty measure is output.

[0055] Based on the predicted values ​​and the actual observed values, the relative prediction error is calculated and cumulatively monitored. When the error exceeds the set threshold, the model update mechanism is triggered, and the prediction reliability evaluation index is output.

[0056] In a preferred embodiment, the step of obtaining the enhanced prediction result set includes:

[0057] Based on the embedding vectors and assigned pattern categories of the new samples, the corresponding cluster centers are adjusted using the moving average incremental update method.

[0058] When the preset conditions are met, the batch recalculation method is used to recalculate the cluster centers based on recent samples;

[0059] Calculate the minimum distance from the embedding vector of a new sample to the existing cluster centers;

[0060] When the minimum distance exceeds the new pattern detection threshold and the cumulative number of samples in the buffer reaches the preset condition, a new pattern is determined to have appeared. New cluster centers are initialized based on the mean of the samples in the buffer, and point prediction models and quantile regression models are constructed for the appearing pattern.

[0061] Based on cumulative statistical monitoring results, a model update mechanism is triggered when prediction performance declines.

[0062] New data is added to the training buffer of the corresponding mode. When the buffer reaches the batch condition, incremental update is performed. The hot start incremental training method is used to continue training on the basis of the original model. Gradient calculation and parameter update are performed based on the new sample data. After training is completed, the buffer is cleared to obtain the updated prediction model and quantile regression model.

[0063] This invention provides a pattern recognition-based electricity consumption forecasting system for executing the aforementioned pattern recognition-based electricity consumption forecasting method, comprising:

[0064] The data acquisition and alignment module is used to acquire raw electricity consumption data, perform quality assessment and classification on the raw electricity consumption data, and perform spatiotemporal alignment according to the quality level labels to obtain a spatiotemporally aligned multi-source dataset.

[0065] The quality inspection and repair module is used to detect outliers and missing values ​​in spatiotemporally aligned multi-source datasets, repair outliers and missing values, and obtain clean multi-source datasets.

[0066] The feature extraction and dimensionality reduction module is used to extract features from a clean multi-source dataset to obtain feature vectors, and then perform feature fusion and dimensionality reduction on the feature vectors to obtain a low-dimensional embedded feature set.

[0067] The pattern recognition and labeling module is used to initialize cluster centers based on a low-dimensional embedded feature set, optimize clustering using a mini-batch iterative update method, and then assign pattern labels to obtain a pattern label set.

[0068] The pattern prediction model module is used to construct training sets for each pattern based on the pattern label set and a clean multi-source dataset, train a dedicated prediction model for each pattern, and obtain a set of pattern-specific prediction models.

[0069] The online recognition and prediction module is used to perform real-time data quality checks, feature extraction and dimensionality reduction, rapid pattern recognition and prediction calculation based on a set of pattern-specific prediction models, and obtain a set of online prediction results.

[0070] The uncertainty and reliability module is used to perform quantile regression uncertainty quantification, pattern recognition entropy evaluation, and dynamic monitoring of prediction reliability based on the online prediction result set, thereby obtaining an enhanced prediction result set.

[0071] The beneficial effects of this invention are as follows:

[0072] By employing a categorized prediction strategy that automatically identifies multiple electricity consumption patterns and constructs a dedicated prediction model for each pattern, this invention can more precisely characterize electricity consumption patterns under different modes. Compared to traditional methods that use a uniform model to predict all scenarios, this invention can dynamically select the most suitable prediction model based on the pattern characteristics of current electricity consumption data, thereby significantly reducing prediction errors. Furthermore, this invention utilizes efficient algorithms such as principal component analysis dimensionality reduction, mini-batch K-means clustering, and the LightGBM lightweight prediction model, avoiding the high computational complexity of deep learning models. This reduces model training time from several days using traditional deep learning methods to several hours, and online prediction latency from seconds to milliseconds, meeting the practical needs of industrial park energy management systems for real-time prediction and rapid response.

[0073] By employing mechanisms such as data quality grading, adaptive sampling frequency configuration, and optional data source design, the strict requirements on input data quality and availability are reduced, enabling the method to adapt to data conditions in different parks and still operate normally even when data quality is poor or some data sources are unavailable. Through online learning and dynamic pattern update mechanisms, this invention can monitor prediction errors and pattern drift in real time, dynamically adjust cluster centers and prediction model parameters, and even automatically create new electricity consumption patterns, allowing the prediction system to continuously adapt to the evolution of electricity consumption behavior and maintain long-term stable prediction performance.

[0074] By providing prediction intervals and quantifying uncertainty through quantile regression, enhancing interpretability through semantic pattern description and feature importance analysis, and generating decision suggestions to directly support practical operations such as energy storage charging and discharging scheduling and power purchase plan optimization, the prediction results are expanded from a single numerical value to comprehensive decision support information including confidence intervals, influencing factor analysis, and operational suggestions. This significantly improves the practical value of the prediction system in energy management and provides park managers with a more comprehensive and reliable basis for decision-making. Attached Figure Description

[0075] Figure 1 This is a flowchart of a pattern recognition-based electricity consumption prediction method according to the present invention;

[0076] Figure 2 This is a block diagram of a pattern recognition-based electricity consumption prediction system according to the present invention. Detailed Implementation

[0077] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, some features described in the examples may be combined in other examples.

[0078] At least one embodiment of the present invention discloses a power consumption prediction method based on pattern recognition, such as... Figure 1 As shown, it includes:

[0079] Step 1: Obtain raw electricity consumption data, perform quality assessment and classification on the raw electricity consumption data, and perform spatiotemporal alignment based on the quality level labels to obtain a spatiotemporally aligned multi-source dataset;

[0080] Specifically, it includes the following:

[0081] Electricity consumption data is collected. Based on the communication capability assessment results of the smart meter data collection system and the characteristics of power load changes, an adaptive sampling frequency configuration strategy based on load change rate is adopted. Specifically, for enterprises such as semiconductor manufacturing with high load change rates, a minute-level sampling frequency is configured to capture rapid load changes; for enterprises such as data centers with relatively stable loads, a 15-minute-level sampling frequency is configured to balance data accuracy and communication load; for infrastructure with slow load changes, an hour-level sampling frequency is configured to reduce system overhead. Three-phase power parameters are collected through smart meters to obtain active power data sequences, reactive power data sequences, three-phase voltage data sequences, and three-phase current data sequences for each enterprise within the park.

[0082] To comprehensively assess power quality, the system also needs to calculate key indicators such as the power factor. The power factor calculation process is as follows: obtain the active and reactive power values ​​of a specified enterprise at the current moment; calculate the apparent power by adding the squares of the active and reactive power and taking the square root; divide the active power by the apparent power to obtain the power factor value at that moment. This calculation method is based on the fundamental principles of power systems, reflecting energy utilization efficiency through the ratio of active power to apparent power. Simultaneously, the system also calculates other power quality indicators such as voltage imbalance, providing comprehensive power characteristic data for subsequent electricity consumption pattern analysis.

[0083] External environmental data is collected. Based on a meteorological data interface, real-time meteorological data for the park's location is retrieved every 10 minutes via HTTP API calls. This includes temperature, humidity, wind speed, and light intensity sequences, as these meteorological factors directly impact the company's electricity demand. Based on a calendar service interface, a query request method is used to obtain the type label for each date, resulting in a date type sequence categorized as weekdays, weekends, holidays, and special dates. This is used to identify electricity consumption patterns under different time periods.

[0084] Enterprise operation data is collected. Based on the park's enterprise operation data interface, a data availability detection method is used to send a probe request to the interface and determine the availability of the data source based on the response status. If the data source is available, production status data of each enterprise is obtained through data push or periodic retrieval, resulting in an operation status sequence containing status labels such as full-load production, normal production, reduced production, shutdown, and equipment maintenance. If the data source is unavailable, the feature is marked as a missing status, and interpolation or default values ​​are used to fill it in subsequent processing.

[0085] After data collection, all collected multi-source data underwent quality assessment and grading. A multi-dimensional quality assessment method was adopted, with corresponding quality indicators designed for different types of data sources. For electricity consumption data, a weighted scoring method was used to calculate the comprehensive quality score based on three core indicators: sampling frequency, data integrity rate, and communication stability. The specific calculation process included: normalizing the ratio of the actual sampling frequency to the highest sampling frequency to the 0-1 range; converting the data integrity rate from a percentage to a decimal value within the 0-1 range; and normalizing the communication stability indicator to the 0-1 range using (1 - packet loss rate). Weight coefficients were assigned to each of the three indicators (the sum of the weight coefficients equals 1), and the values ​​of each indicator were multiplied by their corresponding weight coefficients and then summed to obtain the final data quality score. Based on the quality scores, a threshold classification method was used to divide the data into three levels: high-quality level A (quality score ≥ 0.8), medium-quality level B (0.5 ≤ quality score < 0.8), and low-quality level C (quality score < 0.5), providing a basis for subsequent stratified processing strategies.

[0086] Based on the collected multi-source data and their quality level labels, a benchmark timestamp alignment method is adopted, using the standard Unix timestamp as a unified time benchmark. For data with incompletely aligned sampling times, a time tolerance judgment strategy is used. If the difference between two timestamps is less than a set tolerance threshold (usually set to 10% of the sampling period), they are determined to be at the same time, and a linear interpolation method is used for time synchronization. In the linear interpolation process, the target interpolation time and two adjacent actual sampling times (the previous time and the next time) are first determined, and the power values ​​of the previous and next times are obtained; the time difference between the target time and the previous time, and the time difference between the next time and the previous time are calculated as the total time interval; the time difference ratio is calculated; the power difference between the next time and the previous time is calculated and multiplied by the time difference ratio; this result is added to the power value of the previous time to obtain the power estimate of the target time. Based on the time-aligned multi-source data, a data structuring organization method is adopted to construct a three-dimensional data tensor according to the enterprise dimension and the time dimension, resulting in a spatiotemporally aligned multi-source dataset, where the total number of time steps represents the time series length, and the total number of enterprises represents the spatial dimension.

[0087] Furthermore, for situations where meteorological data is only available from nearby meteorological stations and not from actual measurements within the park, a spatial interpolation correction method based on geographical distance can be used to improve the spatial representativeness of the meteorological data. Specifically, based on the park's location coordinates and the location coordinates of several surrounding meteorological stations, an inverse distance weighted interpolation method is used to calculate the estimated meteorological parameters for the park's location. For temperature parameter calculation, the temperature observation values ​​from multiple meteorological stations at the current time are obtained, and the weight value of each meteorological station is calculated; the temperature observation value of each meteorological station is multiplied by its corresponding weight value; all weighted temperature values ​​are summed; the sum is divided by the sum of all weight values ​​to obtain the estimated temperature of the park's location at the current time. The weight value calculation process is as follows: calculate the Euclidean distance from the specified meteorological station to the park (i.e., the square root of the sum of the squares of the differences between the meteorological station coordinates and the park coordinates); perform a power operation on the distance value (the power exponent is usually taken as 2); calculate the reciprocal of the distance power as the initial weight for that meteorological station, repeat the above steps for all meteorological stations to obtain all initial weights; divide each initial weight by the sum of all initial weights to obtain the normalized weight, ensuring that the sum of all weights equals 1. Before calculating the weights, the geographic coordinates need to be preprocessed: the latitude and longitude coordinates of the meteorological station and the park are converted into a unified plane coordinate system (such as the UTM coordinate system) to ensure the accuracy of distance calculations; for geographically large areas, the influence of the Earth's curvature needs to be considered, and the great circle distance formula or projection transformation is used for correction; the distance unit is unified to kilometers or meters to avoid weight calculation deviations caused by coordinate system differences. Using this spatial interpolation correction method, a corrected meteorological data sequence is obtained, replacing the original meteorological data in the dataset. The purpose of this replacement embodiment is to improve the spatial accuracy of meteorological parameters through multi-site data fusion when meteorological data sources are limited, thereby enhancing the predictive model's ability to model meteorological influencing factors.

[0088] The output of this step is a spatiotemporally aligned multi-source dataset.

[0089] Step 2: Detect outliers and missing values ​​in the spatiotemporally aligned multi-source dataset, repair outliers and missing values, and obtain a clean multi-source dataset.

[0090] Specifically, it includes the following:

[0091] Based on the quality level labels of each enterprise in the dataset, a strategy mapping method is used to configure corresponding anomaly detection strategies for different quality levels. For high-quality data (Level A), a complete three-dimensional constraint detection strategy is configured, including temporal continuity constraint detection, spatial correlation constraint detection, and physical rationality constraint detection. For medium-quality data (Level B), a two-dimensional constraint detection strategy is configured, including temporal continuity constraint detection and physical rationality constraint detection, omitting the computationally complex spatial correlation detection. For low-quality data (Level C), a single-dimensional constraint detection strategy is configured, including only physical rationality constraint detection. This yields an anomaly detection strategy configuration table for each enterprise.

[0092] Based on the above strategy configuration, the system begins to execute the corresponding anomaly detection process. For enterprise data configured with a time continuity constraint detection strategy, a sudden change anomaly is detected based on the power consumption data at adjacent time points using a rate of change threshold judgment method. When calculating the relative rate of change, the power values ​​of the specified enterprise at the current time and the previous time point are obtained, and the difference between the two power values ​​is calculated (i.e., the power value at the current time point minus the power value at the previous time point). This power difference is then divided by the sum of the power value at the previous time point and a small positive number (to avoid division by zero, the small positive number is usually taken as 10^-6 as a guarantee of numerical stability), yielding the relative rate of change for the enterprise at the current time point. This relative rate of change calculation method prevents the denominator from being zero by introducing a small positive number, ensuring the stability and reliability of the calculation.

[0093] In addition to time-dimensional detection, the system also needs to perform spatial-dimensional anomaly detection. For enterprise data configured with spatial correlation constraint detection strategies, the local anomaly factor method is used to detect isolated anomalies based on the spatial distribution characteristics of electricity consumption data from different enterprises at the same time. This method identifies outliers by analyzing the relative positions of enterprises in the spatial distribution. For the power value of a specified enterprise at the current time, its k nearest neighbor set is calculated (k is usually set to 5 based on a balance between computational efficiency and detection accuracy). Based on the power mean and standard deviation of the nearest neighbor enterprises, a standard score judgment method is used. When calculating the power mean of the nearest neighbor enterprises, the k nearest neighbor enterprises of the specified enterprise are determined, the power values ​​of these k nearest neighbor enterprises at the current time are obtained, the k power values ​​are added together, and the sum is divided by k to obtain the power mean of the nearest neighbor enterprises. When calculating the standard score, the power value of the specified enterprise at the current time is obtained, the difference between this power value and the power mean of the nearest neighbor enterprises is calculated, the standard deviation of the power of the nearest neighbor enterprises is calculated, and the power difference is divided by the sum of the standard deviation and a small positive number to obtain the standard score. The method for calculating the standard deviation of power of neighboring firms is as follows: calculate the difference between the power value of each neighboring firm and the mean, square each difference, sum all the squared differences, divide the sum by the number of neighboring firms k, and take the square root of the division result to obtain the standard deviation. This standard score calculation method identifies outliers that deviate significantly from the spatial distribution by comparing the power value of a firm with the statistical characteristics of its neighboring firms.

[0094] Building upon temporal and spatial dimension checks, the system further performs physical rationality checks. For all enterprise data, based on the fundamental laws of the power system and the characteristics of industrial electricity consumption, a multi-level power constraint check method is used to detect physical violations. The system performs the following checks: Power balance constraint check: For a specified enterprise at a given time, check whether the active power, reactive power, and apparent power (apparent power equals the square root of the sum of the squares of active power and reactive power) satisfy the power triangle relationship; Industrial power factor constraint check: Based on the typical power factor range (cosine value between 0.75 and 0.95) that meets the requirements of industrial enterprise power consumption specifications, check whether the calculated power factor is within a reasonable range; Load factor constraint check: Calculate the instantaneous load factor (i.e., the ratio of current power to rated capacity) and check whether it meets the requirement of 0.1 to 1.2 (considering the actual situation of short-term overload); Power quality constraint check: According to relevant national power quality standards, check that the three-phase voltage imbalance does not exceed 2% and the voltage deviation (i.e., the absolute value of the difference between the actual voltage and the rated voltage divided by the rated voltage) does not exceed 7%. If any constraint is not met, the data point is marked as a physical anomaly and added to the physical anomaly set.

[0095] Simultaneously, the system executes a missing value detection process. Based on a spatiotemporally aligned multi-source dataset, a data integrity scanning method is used to detect missing values. For the time series data of each enterprise, according to a preset sampling frequency (usually 15 minutes or 1 hour interval), it checks for any missing time points. Specifically, the timestamp sequence of the enterprise data is obtained, the time interval between adjacent timestamps is calculated, and the time interval is compared with the standard sampling interval. If the time interval exceeds 1.5 times the standard sampling interval, a missing value is determined, and the start and end times of the missing value are recorded. In addition, data points with null values, invalid values ​​(such as negative power values), or values ​​that are significantly outside the equipment's measurement range are also marked as missing values. Through the above detection process, the set of missing value locations for each enterprise is obtained.

[0096] After anomaly detection, the system transitions to the data repair phase. Based on the detected set of all anomalies and the set of missing value locations, an adaptive repair strategy based on the missing value scale is adopted. According to practical experience, 10 time steps are used as the threshold for small-scale missing values. For continuous missing values ​​or small-scale missing values ​​with no more than 10 anomalous time steps, a linear interpolation fast repair method is used. In the linear interpolation repair process, the effective time points before and after the missing point are first determined (satisfying that the previous effective time point is less than the target time point, and the target time point is less than the next effective time point), and the power values ​​of the specified enterprise at the effective time points are obtained. The time difference between the target time point and the previous effective time point, and the time difference between the next effective time point and the previous effective time point are calculated. The ratio of the time differences is calculated (i.e., the result of step three divided by the result of step four). The power difference between the next effective time point and the previous effective time point is calculated, and the ratio is multiplied by the power difference. The result of the multiplication is added to the power value of the previous effective time point to obtain the repaired value.

[0097] For large-scale missing data exceeding a threshold, the system employs a more refined historical data matching and repair method. Specifically, based on the contextual information of the missing time period (day of the week, season, temperature, etc.), a multi-dimensional feature matching algorithm is used to retrieve K historical dates with similar characteristics from the historical database (K is typically set to 3-5 based on a trade-off between matching accuracy and computational complexity), resulting in a set of similar dates. Based on the historical power data of the corresponding time period in the set of similar dates, a weighted average method is used to calculate the repair value. This involves obtaining the historical power value of each date in the set at the corresponding time, determining the weight value of each similar date, multiplying each historical power value by its corresponding weight, and then summing all the multiplication results to obtain the repair value. The sum of the weight values ​​is equal to 1 to ensure the reasonableness of the repair value. The repaired data is then filled back into the original dataset, resulting in a clean multi-source dataset.

[0098] To address the extreme case of large-scale, long-term missing data where sufficiently similar historical dates cannot be found, a deep inpainting method based on tensor completion is employed to improve inpainting accuracy. This method leverages the inherent structural characteristics of the data for high-precision inpainting. Specifically, based on a multi-source dataset, a tensor reconstruction method is used to construct a three-dimensional spatiotemporal tensor, where the first dimension represents the enterprise, the second dimension represents time, and the third dimension represents the feature type (power, voltage, current, etc.). Based on the assumption of the low-rank characteristic of tensors (i.e., the data has inherent low-dimensional structural features), a tensor decomposition optimization method is used to construct a low-rank tensor completion model. In the tensor completion optimization process, the kernel norm of the tensor is first calculated to measure its rank; the fitting error at the observation location is calculated (i.e., the difference between the tensor to be completed and the observed tensor is calculated over the set of observation locations); the square of the Frobenius norm of the fitting error is calculated, and then the regularization parameter is multiplied by the fitting error term; the kernel norm is added to the weighted fitting error term to form the objective function; and the optimal tensor is solved by minimizing the objective function. The optimization problem is solved using the alternating direction multiplier method (an efficient constrained optimization algorithm), resulting in a completed tensor. Based on this completed tensor, a data extraction method is used to extract the repaired values ​​corresponding to the enterprise and time, yielding a deeply repaired dataset. The purpose of this alternative embodiment is to utilize the spatiotemporal low-rank structure of the data to obtain high-quality repair results even under extreme missing data conditions, thereby improving the robustness of data preprocessing.

[0099] The output of this step is a clean multi-source dataset.

[0100] Step 3: Extract features from the clean multi-source dataset to obtain feature vectors, perform feature fusion and dimensionality reduction on the feature vectors to obtain a low-dimensional embedded feature set;

[0101] Specifically, it includes the following:

[0102] Based on clean, multi-source datasets containing concentrated power consumption data, a multi-scale sliding window statistical method guided by power load characteristics is employed to extract time-domain statistical features. According to the operating patterns of the power system, time window scales are set to conform to the characteristics of power system operation, corresponding to hourly load changes, load changes during dispatch periods, daily load curves, and weekly load patterns. For each time window scale, based on the set of power data points within the window, key statistical methods used in power load analysis are employed to extract multiple load features.

[0103] Specific statistical characteristic calculation methods include: Average load calculation is achieved by obtaining the power values ​​at all times within a time window, summing all power values, and then dividing by the length of the time window. Load variance calculation is achieved by calculating the difference between the power value at each time moment and the average load, squaring each difference, summing the results, and then dividing the sum by the length of the time window. Peak-valley difference calculation is achieved by finding the maximum and minimum power values ​​within the time window and subtracting the minimum power value from the maximum power value. Load factor calculation is achieved by obtaining the average load and the installed capacity of the enterprise within the time window and dividing the average load by the installed capacity. Load fluctuation coefficient calculation is achieved by calculating the standard deviation of the load by the square root of the load variance, and then dividing the standard deviation of the load by the sum of the average load and a small positive number (usually 10^-6 to avoid division by zero). Maximum load utilization hours calculation is achieved by determining the maximum load value within the window, setting a threshold of 90% of the maximum load (this proportion is based on the standard definition of high load operation in the power system), and counting the number of times the power value is greater than or equal to the threshold. The load density distribution entropy is calculated by dividing the load value into several intervals, calculating the probability that the load falls into each interval, taking the logarithm of each probability and multiplying it by the probability, and finally summing all the multiplication results and taking the negative value. By concatenating the load statistical characteristics at all scales, a time-domain load feature vector is obtained.

[0104] Based on time-domain statistical characteristics, features reflecting the morphological characteristics of the load curve are further extracted. Based on 24-hour daily load curve data, morphological features are extracted using a typical daily load curve analysis method for power systems.

[0105] Regarding peak-valley characteristic identification: Based on the load curve, a peak-valley identification algorithm for power systems is used to identify the peak load period, flat load period, and valley load period of the daily load curve, obtaining peak load power, valley load power, and peak-valley difference rate. The calculation steps for the peak-valley difference rate are to subtract the valley load power from the peak load power, and then divide by the peak load power.

[0106] Regarding load change rate characteristics: The load curve slope analysis method is used to calculate the load ramp rate and load descent rate, reflecting the enterprise's ability to rapidly change electricity consumption. The load ramp rate is calculated by dividing the difference in power increase between adjacent time points by the time interval and taking the maximum value of all ramp rates. The load descent rate is calculated by dividing the difference in power decrease between adjacent time points by the time interval and taking the maximum value of all descent rates.

[0107] Regarding load factor characteristics: Based on the load curve, the power system load characteristic analysis method is used to calculate the daily minimum load factor, daily maximum load factor, and daily average load factor. The daily minimum load factor is calculated by dividing the off-peak load power by the installed capacity. The daily maximum load factor is calculated by dividing the peak load power by the installed capacity. The daily average load factor is calculated by dividing the daily average load by the installed capacity.

[0108] Regarding shape characteristics: The calculation process for the shape factor of the load curve includes calculating the square of the power value at each moment, summing all the squared values, dividing the sum by 24 hours, taking the square root of the division result to obtain the effective load value, and dividing the effective load value by the daily average load to obtain the shape factor. The calculation process for the unevenness coefficient of the load curve includes calculating the difference between peak load power and valley load power, dividing the difference by the daily average load to obtain the unevenness coefficient. Combining these power load shape characteristics yields the load curve shape characteristic vector, including peak load power, valley load power, peak-valley difference rate, load ramp rate, load decline rate, daily minimum load rate, daily maximum load rate, daily average load rate, shape factor, and unevenness coefficient.

[0109] In order to comprehensively capture the external factors affecting electricity consumption behavior, feature vectors of external factors are constructed based on the data of external influencing factors using feature encoding methods.

[0110] For continuous variables (temperature, humidity, wind speed, and light intensity), Z-score standardization is employed. Standardization is achieved by obtaining the current raw temperature value, calculating its historical mean and standard deviation, and then subtracting the historical mean from the raw temperature value and dividing by the historical standard deviation. The purpose of standardization is to eliminate dimensional differences between different meteorological variables: temperature is typically expressed in degrees Celsius (industrial environments range from approximately -40°C to 50°C), humidity is expressed as a percentage (0%–100%, based on the definition of relative humidity), wind speed is expressed in meters per second (0–30 m / s, based on meteorological observation standards), and light intensity is expressed in lux (0–100,000 lux, based on industrial lighting standards). Z-score standardization converts all continuous variables into a standard normal distribution with a mean of 0 and a standard deviation of 1, ensuring equal weighting for each variable during subsequent feature fusion.

[0111] For categorical variables (date type, operational status), a one-hot encoding method is used to map each category to a binary vector. For example, if the date type includes three categories: weekday, weekend, and holiday, then weekday is encoded as [1,0,0], weekend as [0,1,0], and holiday as [0,0,1]. All external factor features are concatenated to obtain the external factor feature vector.

[0112] After extracting various features, feature fusion and dimensionality reduction are performed to obtain the final low-dimensional feature representation. Based on the extracted feature vectors of each dimension, a feature fusion strategy is used to construct a high-dimensional feature vector.

[0113] The feature fusion process includes the following steps: First, feature vector standardization is performed, normalizing the time-domain load feature vector, load curve morphology feature vector, and external factor feature vector to ensure that different types of features have the same numerical range during fusion. Second, weighted feature concatenation is performed, setting feature weights based on the importance of different feature types for electricity consumption pattern identification: time-domain load feature weight is 0.5 (reflecting basic load characteristics), load curve morphology feature weight is 0.3 (reflecting load change patterns), and external factor feature weight is 0.2 (reflecting environmental impact factors). Third, the normalized feature vectors are multiplied by their corresponding weights and concatenated in the order of time-domain features, morphology features, and external features to construct a weighted fused feature vector. Finally, feature vector assembly is performed, assembling the weighted fused feature vectors of all enterprises at the same time into a high-dimensional feature vector.

[0114] Before performing dimensionality reduction using Principal Component Analysis (PCA), the high-dimensional eigenvectors need to be preprocessed by centering. This centering preprocessing is achieved by calculating the mean of all sample eigenvectors and then centering each sample (i.e., subtracting the mean from the sample eigenvector). This preprocessing step ensures that PCA can correctly identify the main directions of data variation and avoids the impact of mean shift on the calculation of the covariance matrix.

[0115] Based on the high-dimensional eigenvector set of all samples, principal component analysis (PCA) is used for dimensionality reduction. The covariance matrix is ​​calculated by taking the difference between each sample and the mean, multiplying the difference vector by its transpose to obtain the outer product matrix, and summing all outer product matrices and dividing by the number of samples. Eigenvalue decomposition is performed on the covariance matrix to obtain an eigenvalue sequence (arranged in descending order) and the corresponding eigenvector matrix. Based on the cumulative variance contribution rate criterion (cumulative variance contribution rate is an indicator of the amount of information retained by principal components), the top d principal components (with a cumulative variance contribution rate greater than or equal to 0.95) are selected, and a dimensionality reduction transformation matrix containing the top d eigenvectors is constructed.

[0116] Based on the dimensionality reduction transformation matrix, dimensionality reduction is performed on all samples in the clean multi-source dataset to construct a low-dimensional embedding feature set. For each sample in the clean multi-source dataset, its corresponding centered high-dimensional feature vector is multiplied by the transpose of the dimensionality reduction transformation matrix to obtain the low-dimensional embedding vector of that sample. This process is repeated for all samples to obtain the low-dimensional embedding feature set, where each low-dimensional embedding vector has a dimension of d (typically 50-100 dimensions). This low-dimensional embedding feature set retains the main information of the original high-dimensional features while reducing the data dimensionality, providing high-quality feature representations for subsequent electricity consumption pattern recognition.

[0117] Furthermore, to address the issue of electricity consumption data exhibiting significant periodicity, a Fast Fourier Transform (FFT) is employed to extract frequency domain features and enhance pattern recognition capabilities. Specifically, based on a long-time power consumption sequence (typically consisting of 1024 or 2048 sampling points), the FFT algorithm is used to convert the time-domain signal to the frequency domain and calculate the spectrum.

[0118] The Fast Fourier Transform (FFT) obtains a sequence of power values ​​for a company over a continuous time period. For each frequency index, it calculates the complex exponential function value corresponding to that frequency, multiplies the power value by the complex exponential function value, and sums the products over all time points to obtain the spectral value for that frequency. This process is repeated to calculate the spectral values ​​for all frequency indices. This transform is a standard Discrete Fourier Transform (DFT), which decomposes the time-domain signal into complex representations of different frequency components, where the complex exponential function represents the basis functions for different frequencies.

[0119] Based on the spectrum, an amplitude extraction method is used to calculate the amplitude of each frequency component. Based on the amplitude spectrum, a peak detection method is used to identify the frequency peaks corresponding to the main periodic components, extracting the daily periodic amplitude (corresponding to a frequency of 1 / 24 hour, i.e., a 24-hour cycle), weekly periodic amplitude (corresponding to a frequency of 1 / 168 hour, i.e., a 7-day × 24-hour cycle), and seasonal periodic amplitude. The frequency domain features are added to the high-dimensional original feature vector to obtain an enhanced feature vector, which is then subjected to dimensionality reduction using principal component analysis. The purpose of this alternative embodiment is to capture the periodic patterns of electricity consumption data through frequency domain features, thereby improving the accuracy of identifying patterns with obvious periodicity.

[0120] The output of this step is a set of low-dimensional embedded features.

[0121] Step 4: Initialize cluster centers based on low-dimensional embedded feature set, optimize clustering using mini-batch iterative update method, and then assign pattern labels to obtain pattern label set;

[0122] Specifically, it includes the following:

[0123] The K-means++ intelligent initialization method is used to determine the initial cluster centers. The specific process is as follows: A sample is randomly selected from the feature set as the first cluster center. For subsequent k-th cluster centers (k=2,3,…,K), based on the selected k-1 cluster centers, the feature vector of the candidate sample is obtained, and the squared Euclidean distance from the sample to each selected cluster center is calculated. The minimum value among all distances is selected as the nearest distance to the sample. This process is repeated to calculate the nearest distance to all unselected samples. This distance calculation ensures that the newly selected cluster centers are as far away from existing centers as possible, improving the initialization quality. This process is repeated until K initial cluster centers are selected. The number of patterns K needs to be determined in advance, using either the elbow rule (determining the optimal K value by calculating the rate of change of the sum of squares within clusters under different K values) or the silhouette coefficient method (an indicator for evaluating cluster quality) from historical data analysis. Based on the periodic characteristics of electricity load and the diversity of enterprise electricity consumption patterns, K is typically set to 20-30: fewer than 20 patterns may not be sufficient to distinguish different electricity consumption behaviors, while more than 30 patterns will lead to over-segmentation and increased computational complexity.

[0124] Based on the initial cluster centers, a mini-batch iterative update method is used for cluster optimization. Before clustering calculation, L2 normalization preprocessing is performed on the low-dimensional embedding vectors, which involves dividing each feature vector by its magnitude. This preprocessing step unifies the magnitude of all feature vectors to 1, ensuring that the Euclidean distance calculation is not affected by differences in vector magnitude. This allows the clustering algorithm to focus more on vector direction rather than magnitude, improving the stability and accuracy of clustering. In each iteration, a mini-batch subset is randomly selected from the feature set for processing. Considering the balance between memory efficiency and convergence speed, the batch size is usually set to 256 or 512: a batch that is too small (e.g., 64) will lead to slow convergence, while a batch that is too large (e.g., 1024) will increase memory consumption and may get stuck in local optima. For each sample in the batch, the nearest neighbor search method is used. By obtaining the feature vector of the sample in the batch, the squared Euclidean distance from the sample to each cluster center is calculated, and the cluster center with the smallest distance is found. The sample is then assigned to the nearest cluster center. Based on the samples allocated to each cluster in the current batch, an incremental mean update method is used to adjust the cluster centers. For a given cluster, the cumulative sample count allocated to that cluster is maintained. Based on the newly allocated samples, the current cluster center and the cumulative sample count are obtained. The current cluster center is multiplied by the cumulative sample count, and the feature vector of the newly allocated sample is added to the product. The result is divided by the updated sample count (cumulative count incremented by 1), updating the cluster center to the newly calculated mean, and the cumulative sample count is incremented by 1. This incremental update method can maintain computational efficiency when processing large-scale data, while ensuring that the cluster centers gradually converge to the optimal position.

[0125] Based on the optimized cluster centers, final pattern labels are assigned to all samples. For each sample, a nearest neighbor determination method is used. By obtaining the sample's low-dimensional embedding feature vector, the squared Euclidean distance from the sample to each cluster center is calculated. The index of the cluster center with the smallest distance is found and used as the sample's pattern label, thus obtaining the pattern label set. To construct a representative sample set for each pattern, for each pattern category, based on the distances of all samples under that pattern to the cluster centers, a nearest neighbor selection strategy is used to select several samples with the smallest distances as typical representative samples of that pattern. The number of typical samples is typically 5 to 10: fewer than 5 samples may not be sufficient to represent the feature diversity of the pattern, while more than 10 samples will increase the computational complexity of subsequent semantic analysis, thus obtaining the typical sample set.

[0126] Based on typical sample sets for each mode, a power load characteristic analysis and rule template method is used to generate a semantic description of the mode in the power industry, improving the interpretability of the mode. For typical samples of a specified mode, the original power feature space is traced back to extract power industry information such as load level, peak-valley characteristics, load factor, power factor, date type, and meteorological conditions corresponding to the typical samples. Based on the statistical distribution of these power characteristics, a power load classification rule identification method is used to determine the dominant power characteristics of the mode. For example, if 90% of the typical samples of a certain mode correspond to weekdays, the average load factor is higher than 0.8, the peak-valley difference rate is greater than 0.3, and the power factor is higher than 0.85, then the power load classification rule template "weekday + high load factor + peak-valley difference + good power factor" is used to generate a semantic description of the mode as "weekday high load peak-valley operation mode". Similarly, load modes with electrical professional meanings, such as "nighttime base load stable operation mode", "weekend low load stable mode", "holiday minimum load mode", "high temperature air conditioning load mode", and "production equipment start-stop transition mode", can be identified. The electrical professional semantic description of each mode is associated with the mode number to obtain a load mode description mapping table.

[0127] Furthermore, considering the potential hierarchical structure of electricity consumption patterns, a hierarchical clustering method is employed to further refine the patterns and improve prediction accuracy. Specifically, based on the several main pattern categories obtained from the first-level clustering, a secondary clustering method is used to further subdivide the sample subsets within each main pattern. The number of sub-patterns is set (typically 3-5), and a mini-batch K-means algorithm is used to cluster the subsets, obtaining several sub-pattern centers within that main pattern. This process is repeated for all main patterns, resulting in a total of multiple fine-grained sub-patterns. For a new sample, its main pattern is first determined, and then its sub-pattern within that main pattern is determined, resulting in two layers of pattern labels. The purpose of this alternative embodiment is to capture the multi-level structural characteristics of electricity consumption behavior through hierarchical pattern classification, constructing more refined prediction models for electricity consumption patterns of different granularities.

[0128] The output of this step is a set of pattern labels and a load pattern description mapping table.

[0129] Step 5: Construct training sets for each pattern based on the pattern label set and a clean multi-source dataset, train dedicated prediction models for each pattern, and obtain a set of pattern-specific prediction models.

[0130] Specifically, it includes the following:

[0131] Based on the pattern label set, a dedicated training set is constructed for each load pattern using load pattern filtering and power data organization methods. For each load pattern, a sample index set corresponding to the label is selected from all samples. Based on the index set, the corresponding historical load sequence and power influencing factors are extracted from the clean multi-source dataset to construct the input feature vector. Considering the daily periodicity of power load and the need for short-term forecasting, the input features include the active power sequence, reactive power sequence, power factor sequence, load rate sequence, external meteorological features, date type code, and enterprise operation status code of the past 24 hours. The 24-hour historical window can fully capture the intraday load change pattern. The corresponding forecast target is extracted, namely the active power one hour in the future. This forecast duration meets the actual needs of short-term load forecasting in the power system. The input features and the forecast target are paired to obtain the training sample set of the load pattern.

[0132] For the training sample set of load patterns, the LightGBM gradient boosting tree framework was selected to construct the prediction model. Compared with traditional machine learning methods, this framework has the advantages of fast training speed, low memory consumption, and high prediction accuracy, and is particularly suitable for handling the time-series characteristics of power load. A modeling strategy incorporating power system constraints was adopted, and the key hyperparameters of the model were configured as follows:

[0133] For the model structure parameters, the base learner is set to a decision tree, and the maximum tree depth is 6-8 layers. This depth range can balance the model complexity and the ability to capture the nonlinear features of power load. If it is too shallow (such as 3-4 layers), it may not be able to fully learn the load change pattern, and if it is too deep (such as more than 10 layers), it is easy to overfit. The minimum number of samples for the leaf node is set to 20 to ensure that each leaf node has enough samples to support it and improve the model's generalization ability.

[0134] For training control parameters, the learning rate is set to 0.05. This small learning rate ensures stable convergence of the model on power load fluctuation data and avoids oscillations during training. The number of iteration rounds is set to 200-500 rounds to fully learn the temporal dependencies of power load. The specific number of rounds is determined based on the performance of the validation set. A histogram-based splitting strategy is used to accelerate the training process.

[0135] For the regularization parameters, the L1 regularization coefficient is set to 0.01 and the L2 regularization coefficient is set to 0.01. These small regularization coefficients can prevent the model from overfitting on the power load data while maintaining sufficient model expressiveness.

[0136] For power system constraint parameters, the lower bound of load forecast is set to 0 to ensure that the predicted power is non-negative and conforms to physical reality; the upper bound of load forecast is set to 1.2 times the rated power of the enterprise. This coefficient is determined based on the short-term overload capacity allowed by the power system to prevent the predicted value from exceeding the physical possibility range; the power change rate constraint is set to 30% of the rated power per hour. This constraint is determined based on the ramp-up capability of typical power equipment to ensure that the predicted load change conforms to the physical characteristics of the equipment.

[0137] For the loss function configuration, mean squared error (MSE) is selected as the model optimization objective. This loss function squares the prediction error, which can effectively penalize large prediction deviations. It is particularly suitable for the high requirements of prediction accuracy in power load regression prediction tasks. Compared with mean absolute error (MAE), MSE is more sensitive to outliers, which helps the model to better learn the abrupt changes in power load. At the same time, MSE has good mathematical properties, which facilitates gradient calculation and model optimization.

[0138] Based on the above configurations, the configuration of the load pattern prediction model that incorporates power system constraints is obtained.

[0139] Based on the training sample set and model configuration, a gradient boosting iterative training method is used to construct the prediction model. The training process includes: initializing the ensemble model, calculating the prediction residuals in each iteration, training the regression tree to minimize the sum of squared residuals, adding the new tree to the ensemble model and updating the parameters, and correcting the predicted values ​​in conjunction with power system constraints. Iteration continues until a preset number of rounds is reached or the MAPE of the validation set no longer decreases for 20 consecutive rounds.

[0140] The model building process described above is repeated for all load patterns to obtain pattern-specific prediction models. A model serialization method is used to save the parameters, tree structure, feature importance, and other information of each model to persistent storage. A model index table is constructed, associating the pattern number with the corresponding model's storage location and metadata, resulting in a set of pattern-specific prediction models and its index table.

[0141] Furthermore, for the few-sample pattern with fewer than 100 training samples, transfer learning is used to improve model performance. By calculating the distance between cluster centers, 2 to 3 neighboring patterns are selected, and their training sets are merged with the few-sample pattern to form an enhanced training set. The features of the neighboring pattern samples are standardized and adjusted, and a weighted loss function is used for training (original pattern sample weight 2.0, neighboring pattern sample weight 0.5).

[0142] The output of this step is a set of pattern-specific prediction models.

[0143] Step 6: Based on the set of pattern-specific prediction models, perform real-time data quality checks, feature extraction and dimensionality reduction, rapid pattern recognition and prediction calculations to obtain a set of online prediction results.

[0144] Specifically, it includes the following:

[0145] Based on real-time collected electricity consumption data, rapid verification is performed using data quality inspection methods, including three-phase voltage balance checks (less than 2%), power factor rationality checks (0.8-1.0 range), and power consistency verification. If outliers are detected, real-time repair is performed using interpolation repair methods based on power load variation patterns. Based on the preprocessed real-time data, time-domain statistical features (including average load, load variance, peak-valley difference, load factor, etc.) are extracted using multi-scale sliding window statistical methods, load morphology features (including peak-valley features, load change rate features, load factor features, and shape features) are extracted using typical daily load curve analysis methods of the power system, and external factor features are constructed using feature encoding methods (Z-score standardization for continuous variables and one-hot encoding for categorical variables) to obtain a high-dimensional original feature vector.

[0146] Based on the high-dimensional original feature vector and the dimensionality reduction transformation matrix, matrix multiplication is used to quickly calculate the low-dimensional embedding vector. The dimensionality reduction process includes: centering and matrix multiplication dimensionality reduction; nearest neighbor search is used for pattern recognition; the pattern category is determined by calculating the Euclidean distance between the low-dimensional embedding vector and each cluster center, and the pattern confidence is calculated based on the ratio of the minimum distance to the second minimum distance.

[0147] Based on the identified load patterns and confidence levels, the corresponding pattern-specific prediction models are called from the prediction model set. The real-time low-dimensional embedding vectors are used as input features, and the initial power prediction values ​​for multiple future time steps (including time-segmented predictions for the next 1 hour, 4 hours, and 24 hours) are obtained through forward inference calculations of the model.

[0148] To ensure the forecast results comply with power system constraints, the initial forecast results are revised, including power range constraints (ensuring the forecast power is within a reasonable physical range), power change rate constraints (limiting the change rate between adjacent times to no more than 30% of the rated power per hour), and power balance constraint checks. Based on the revised forecast values, a forecast reliability index is calculated, comprehensively considering model confidence and historical forecast accuracy.

[0149] The system outputs the final power consumption forecast (including time-segmented forecast sequences for the next 1 hour, 4 hours, and 24 hours), forecast reliability assessment indicators, and identified pattern categories. Based on the identified pattern categories, the system queries the load pattern description mapping table generated in step 4 to obtain the corresponding semantic descriptions in the power industry (such as "weekday high load peak-valley operation mode," "nighttime base load stable operation mode," etc.), providing users with intuitive and understandable pattern explanations and improving the interpretability and decision support capabilities of the forecast results. The entire online calculation time is controlled within 100 milliseconds, meeting the requirements for real-time forecasting.

[0150] The output of this step is a set of online prediction results, including predicted power consumption (a sequence of predicted active power over multiple time steps), identified pattern categories, pattern confidence levels, and prediction reliability assessment metrics.

[0151] Step 7: Based on the online prediction result set, perform quantile regression uncertainty quantification, pattern recognition entropy value evaluation, and prediction reliability dynamic monitoring to obtain an enhanced prediction result set;

[0152] Specifically, it includes the following:

[0153] Based on the identified pattern categories, corresponding uncertainty quantification models are constructed. During the model training phase, for each load pattern, in addition to the point prediction model trained in step 5, two quantile regression models also need to be trained simultaneously: the lower quantile model is trained using a quantile loss function with a quantile parameter of 0.05 (corresponding to the 5th quantile, chosen to capture extreme low values), using a larger weight when the predicted value is less than the true value; the upper quantile model is trained using a quantile parameter of 0.95 (corresponding to the 95th quantile, chosen to capture extreme high values), employing the corresponding quantile loss function. The power balance constraint term is calculated by taking the absolute value of the difference between the predicted total power and the system's total load demand. When the difference is greater than 0, it is added to the loss function as a constraint violation, ensuring that the uncertainty quantification results conform to the power system operation constraints.

[0154] In the online forecasting phase, based on the pattern category and predicted value output in step 6, three models are simultaneously invoked for uncertainty assessment: the point prediction model is invoked to obtain the central predicted value, the lower quantile model is invoked to obtain the lower bound prediction, and the upper quantile model is invoked to obtain the upper bound prediction, constructing a 90% confidence forecast interval. The width of the forecast interval is calculated as a measure of uncertainty; a larger interval width indicates higher forecast uncertainty. This process outputs a power consumption forecast value with a confidence interval, including the point predicted value (central predicted value), the lower bound predicted value (5th quantile), and the upper bound predicted value (95th quantile), forming a 90% confidence forecast interval, indicating that there is a 90% probability that the actual power consumption falls within this interval.

[0155] Based on the pattern confidence and distance to cluster centers output in step 6, the entropy calculation method is used to evaluate the uncertainty of pattern recognition. The soft-assignment probability distribution is calculated by plotting the distance vector from real-time samples to each cluster center, taking the negative value of the distance to each cluster center, and dividing by a temperature parameter (usually set to 0.1 to control the smoothness of the probability distribution). The exponential function value is then calculated and normalized to obtain the soft-assignment probability. The entropy value is calculated by taking the logarithm of the soft-assignment probability for each pattern, multiplying the probability by the logarithm, summing over all patterns, and taking the negative value to obtain the entropy value for pattern recognition. This process outputs a measure of prediction uncertainty, including the interval width (the difference between the upper and lower bounds; a larger value indicates higher prediction uncertainty) and the pattern recognition entropy value (the entropy value calculated based on the soft-assignment probability; a larger value indicates higher pattern recognition uncertainty).

[0156] Based on the predicted values ​​output from step 6 and the actual observed values, the prediction error is calculated using a relative error calculation method. The relative error calculation involves obtaining the predicted value and the actual observed value, calculating the absolute difference between the predicted and actual values, dividing the absolute difference by the actual value, and adding a small positive number (to prevent division by zero) to obtain the relative prediction error. The cumulative sum statistic calculation involves obtaining the cumulative sum statistic from the previous time step, subtracting the historical average error and tolerance offset from the current prediction error, adding the result to the cumulative sum statistic from the previous time step, and taking the maximum of this sum and zero as the current cumulative sum statistic. If the cumulative sum statistic exceeds a threshold (set to 5 times the historical average error), a significant decline in prediction performance is considered, triggering the model update mechanism. This process outputs a prediction reliability evaluation index, a comprehensive evaluation index that considers historical prediction accuracy, model confidence, and prediction error trends, used to assess the credibility of the current prediction results.

[0157] Based on the pattern categories and embedding vectors of newly added samples output in step 6, the cluster centers are adjusted using a moving average incremental update method. Incremental update obtains the embedding vectors of newly added samples and their assigned pattern categories to determine the current cluster centers for those patterns. A learning rate (typically 0.01-0.05) is set to control the update speed. The current cluster center is multiplied by (1 minus the learning rate), and the embedding vector of the newly added sample is multiplied by the learning rate. These two values ​​are then added together to obtain the updated cluster centers. After accumulating a certain number of updated samples (e.g., 100-500 samples), a batch recalculation method is used to recalculate the cluster centers based on recent samples, resulting in an updated set of cluster centers.

[0158] For the embedding vector of a newly added sample, calculate its minimum distance to all existing cluster centers. If the minimum distance exceeds the new pattern detection threshold (set to twice the cluster radius), the sample is marked as a potential new pattern sample. Maintain a buffer of potential new pattern samples. When the number of similar samples accumulated in the buffer exceeds a threshold (set to 50-100), a new electricity consumption pattern is determined to have appeared. A new pattern initialization method is adopted, creating new cluster centers based on the mean of the buffer samples, increasing the number of patterns accordingly, and training dedicated point prediction models and quantile regression models for the new patterns.

[0159] Based on newly added data and cumulative statistical monitoring results, an online learning method is used to update the prediction model for the corresponding pattern. Incremental updates of the prediction model are triggered when new data is added to the training buffer for that pattern, reaching the batch size (set to 64 or 128). LightGBM supports incremental training, using a hot-start incremental training approach based on buffer samples and a portion of historical samples (sampling ratio 20%–30%) to continue training on the original model: loading the parameters of the already trained model as initial weights; performing gradient calculations and parameter updates based on new sample data; training for several rounds (set to 10–20 rounds); updating the model parameters; and clearing the buffer to obtain the updated prediction model. This update process is repeated for all active patterns (patterns with recently added samples) to obtain the updated set of prediction models and quantile regression models.

[0160] The output of this step is the final enhanced forecast result set, which directly supports forecasting and dispatching decisions for energy management in the park. This set includes power consumption forecast sequences that conform to power system constraints, identified pattern categories and their power industry semantic descriptions, uncertainty quantification results and forecast reliability assessment indicators, and provides decision-making suggestions for dispatch optimization and power purchase planning.

[0161] A pattern recognition-based electricity consumption forecasting system is used to execute the aforementioned pattern recognition-based electricity consumption forecasting method, such as... Figure 2 As shown, it includes:

[0162] The data acquisition and alignment module is used to acquire raw electricity consumption data, perform quality assessment and classification on the raw electricity consumption data, and perform spatiotemporal alignment according to the quality level labels to obtain a spatiotemporally aligned multi-source dataset.

[0163] The quality inspection and repair module is used to detect outliers and missing values ​​in spatiotemporally aligned multi-source datasets, repair outliers and missing values, and obtain clean multi-source datasets.

[0164] The feature extraction and dimensionality reduction module is used to extract features from a clean multi-source dataset to obtain feature vectors, and then perform feature fusion and dimensionality reduction on the feature vectors to obtain a low-dimensional embedded feature set.

[0165] The pattern recognition and labeling module is used to initialize cluster centers based on a low-dimensional embedded feature set, optimize clustering using a mini-batch iterative update method, and then assign pattern labels to obtain a pattern label set.

[0166] The pattern prediction model module is used to construct training sets for each pattern based on the pattern label set and a clean multi-source dataset, train a dedicated prediction model for each pattern, and obtain a set of pattern-specific prediction models.

[0167] The online recognition and prediction module is used to perform real-time data quality checks, feature extraction and dimensionality reduction, rapid pattern recognition and prediction calculation based on a set of pattern-specific prediction models, and obtain a set of online prediction results.

[0168] The uncertainty and reliability module is used to perform quantile regression uncertainty quantification, pattern recognition entropy evaluation, and dynamic monitoring of prediction reliability based on the online prediction result set, thereby obtaining an enhanced prediction result set.

[0169] In one embodiment of the present invention, a specific example is provided:

[0170] This invention focuses on a scenario of refined power consumption forecasting for diverse enterprises within an industrial park. The park houses five different types of enterprises: semiconductor manufacturing company A, precision machining company B, data center company C, biopharmaceutical R&D company D, and cold chain logistics company E. The park is equipped with a 10MW photovoltaic power generation system and a 5MWh energy storage system. The energy management center needs to forecast the power load of each enterprise and the park as a whole for the next 24 hours to optimize energy storage charging and discharging strategies and power purchase plans.

[0171] Based on the smart meter data collection system, electricity consumption data for a typical workday (Wednesday) in October 2024 was acquired, with a sampling frequency of 15 minutes. Table 1 shows examples of electricity consumption data for enterprises in the industrial park and external factors.

[0172] Table 1: Electricity consumption data of enterprises in the park and examples of external factors;

[0173]

[0174] Based on the data in Table 1, the method of this invention is used for feature extraction and pattern recognition to identify the current electricity consumption patterns of each enterprise. Through a load pattern description mapping table, the system automatically converts the identified pattern numbers into semantic descriptions with electrical engineering meanings. For example, Enterprise A is identified as "Stable Nighttime Base Load Operation Mode" from 00:00 to 06:00; Enterprise B is identified as "High-Load Peak-Valley Operation Mode" from 08:00 to 18:00; Enterprise C is identified as "Continuous Load Mode for Data Centers" throughout the day; Enterprise D is identified as "Normal Load Mode for R&D Offices" from 08:00 to 18:00; and Enterprise E is identified as "Periodic Load Mode for Cold Chain Equipment" at different times. These semantic descriptions help energy managers intuitively understand the electricity consumption characteristics and current operating status of each enterprise.

[0175] Based on the identified electricity consumption patterns, the corresponding prediction model is invoked to obtain the load forecast results for the next 24 hours (from 00:00 to 23:00 on October 18th). An example of the overall load forecast results for the park is shown in Table 2.

[0176] Table 2: Example of overall load forecast results for the park;

[0177]

[0178] As can be seen from Table 2, the method of the present invention can accurately identify the electricity consumption patterns in different time periods, and the relative error of the predicted values ​​is controlled within 1%. The prediction interval can effectively quantify the prediction uncertainty and provide a reliable basis for energy management decisions.

[0179] Based on the forecast results, the energy management system generates the following decision recommendations: During the peak photovoltaic output period from 08:00 to 16:00, the predicted load is 5.2-6.0MW, and the photovoltaic output is 6.8-8.5MW. It is recommended that the energy storage system charge approximately 15-20MWh during this period and feed the excess electricity into the grid. During the evening peak period from 18:00 to 22:00, the predicted load is 4.2-5.2MW, while the photovoltaic output drops below 2MW. It is recommended that the energy storage system discharge to support the load, reduce the amount of electricity purchased from the grid, and optimize the cost of electricity purchase.

[0180] Through the method of this invention, the industrial park has achieved multiple objectives, including increasing the self-consumption rate of photovoltaic power generation, optimizing the operation of the energy storage system, and reducing the cost of electricity purchase, thus verifying the effectiveness and practical value of the method.

[0181] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.

Claims

1. A power consumption prediction method based on pattern recognition, characterized in that, Includes the following steps: Obtain raw electricity consumption data, perform quality assessment and classification on the raw electricity consumption data, and perform spatiotemporal alignment based on the quality level labels to obtain a spatiotemporally aligned multi-source dataset; Anomaly and missing value detection is performed on spatiotemporally aligned multi-source datasets, and anomalies and missing values ​​are repaired to obtain clean multi-source datasets. Feature vectors are obtained by extracting features from a clean multi-source dataset. Feature vectors are then fused and dimensionality reduced to obtain a low-dimensional embedded feature set. Cluster centers are initialized based on a low-dimensional embedded feature set. After cluster optimization using a mini-batch iterative update method, pattern labels are assigned to obtain a pattern label set. Training sets for each pattern are constructed based on the pattern label set and a clean multi-source dataset. Dedicated prediction models for each pattern are then trained to obtain a set of pattern-specific prediction models. Based on a set of pattern-specific prediction models, real-time data quality checks, feature extraction and dimensionality reduction, rapid pattern recognition and prediction calculations are performed to obtain a set of online prediction results. Based on the online prediction result set, quantile regression uncertainty quantification, pattern recognition entropy value evaluation, and prediction reliability dynamic monitoring are performed to obtain an enhanced prediction result set.

2. The electricity consumption prediction method based on pattern recognition according to claim 1, characterized in that, The steps of performing quality assessment and classification of the raw electricity consumption data, and spatiotemporal alignment based on the quality level labels, include: Three-phase power parameters are collected based on a smart meter acquisition system, and an adaptive sampling frequency configuration strategy based on load change rate is adopted. A multi-dimensional quality assessment method is adopted to calculate the quality score based on sampling frequency, data integrity rate and communication stability indicators. Data with a quality score greater than or equal to the second quality threshold is labeled as high quality level A, data with a quality score greater than or equal to the first quality threshold but less than the second quality threshold is labeled as medium quality level B, and data with a quality score less than the first quality threshold is labeled as low quality level C. A reference timestamp alignment method is adopted, and a linear interpolation method is used to synchronize the time of data with misaligned sampling times.

3. The electricity consumption prediction method based on pattern recognition according to claim 1, characterized in that, The steps for detecting outliers and missing values ​​and repairing outliers and missing values ​​based on spatiotemporally aligned multi-source datasets include: Based on quality level labels, a strategy mapping method is used to configure corresponding anomaly detection strategies for different quality levels; Configure a complete three-dimensional constraint detection strategy for high-quality A-level data, including temporal continuity constraints, spatial correlation constraints, and physical rationality constraints; Configure a two-dimensional constraint detection strategy for data of medium quality level B, including time continuity constraint detection and physical rationality constraint detection; Configure a single-dimensional constraint detection strategy for low-quality grade C data, which only includes physical rationality constraint detection; Based on the detected outliers and missing values, an adaptive repair strategy based on the missing value scale is adopted. For small-scale cases where the number of consecutive missing or abnormal time steps does not exceed the time step threshold, a linear interpolation method is used for rapid repair. For large-scale cases exceeding the time step threshold, historical data matching and repair are used; For extreme cases involving long time periods and the inability to match sufficiently similar historical data, a tensor-based completion method is used for deep repair.

4. The electricity consumption prediction method based on pattern recognition according to claim 1, characterized in that, The feature extraction is performed on the clean multi-source dataset to obtain features. The steps for feature fusion and dimensionality reduction of feature vectors include: Based on the power consumption data from clean multi-source datasets, a multi-scale sliding window statistical method oriented by power load characteristics is used to extract time-domain statistical features. The time window scale is set to correspond to short-term load changes, load changes during scheduling periods, daily load curves and weekly load patterns, respectively. Extract the following data within each time window: average load, load variance, peak-to-valley difference, load factor, load fluctuation coefficient, maximum load utilization hours, and load density distribution entropy. The feature vectors of each dimension are standardized so that the feature values ​​are mapped to a uniform normalization range; Principal component analysis is used to reduce the dimensionality of features based on the standardized feature vectors.

5. The electricity consumption prediction method based on pattern recognition according to claim 1, characterized in that, The steps of initializing cluster centers based on a low-dimensional embedded feature set, optimizing clustering using a mini-batch iterative update method, and then assigning pattern labels include: Based on a low-dimensional embedded feature set, the K-means++ intelligent initialization method is used to determine the initial cluster centers; The low-dimensional embedding vectors are preprocessed with L2 normalization, and clustering optimization is performed using a mini-batch iterative update method. In each iteration, a mini-batch subset is randomly selected, and the nearest neighbor search method is used to assign the samples to the nearest cluster centers. The cluster centers are then adjusted based on the incremental mean update method. Based on the optimized cluster centers, the final pattern label is assigned to all samples, and the nearest neighbor determination method is used to determine the pattern label.

6. The electricity consumption prediction method based on pattern recognition according to claim 1, characterized in that, The steps for constructing training sets for each pattern based on the pattern label set and a clean multi-source dataset, and training dedicated prediction models for each pattern, include: Based on the pattern label set, a dedicated training set is constructed for each electricity consumption pattern; Based on the historical load sequences and power influencing factors corresponding to the clean multi-source dataset, an input feature vector is constructed. Extract the prediction target, pair the input features with the prediction target, and obtain the training sample set of the load pattern; We select the gradient boosting tree framework to construct a dedicated prediction model for the load pattern, and adopt a modeling strategy that incorporates power system constraints to obtain the configuration of the load pattern prediction model that incorporates power system constraints. An iterative training method is used to build a prediction model. In each iteration, the prediction residual is calculated, the regression tree is trained to minimize the sum of squared residuals, the new tree is added to the ensemble model and the parameters are updated, and the prediction value is corrected in combination with power system constraints. Pattern-specific prediction models are trained for each electricity consumption pattern, and model parameters and feature importance are saved. An index mapping between patterns and models is established.

7. The electricity consumption prediction method based on pattern recognition according to claim 1, characterized in that, The steps for real-time data quality checking, feature extraction and dimensionality reduction, rapid pattern recognition, and prediction calculation based on the pattern-specific prediction model set include: Based on real-time collected electricity consumption data, data quality checks are performed and interpolation repairs are carried out when anomalies are detected. Based on the preprocessed real-time data, a multi-scale sliding window statistical method is used to extract time-domain features, a typical daily load curve analysis method of the power system is used to extract morphological features, and external factors are feature-encoded to construct a high-dimensional original feature vector. Based on the high-dimensional original feature vector and the dimension reduction transformation matrix, matrix multiplication is used to quickly calculate the low-dimensional embedding vector; The pattern category is determined by calculating the Euclidean distance from real-time data to each cluster center; Based on the identified load pattern, the corresponding pattern-specific prediction model is invoked to obtain the initial prediction value; The initial prediction results are corrected, including power range constraints, power change rate constraints, and power balance constraint checks, and the final power consumption prediction value is output.

8. The electricity consumption prediction method based on pattern recognition according to claim 1, characterized in that, The steps of quantizing quantile regression uncertainty, evaluating pattern recognition entropy, and dynamically monitoring prediction reliability based on the online prediction result set include: Based on the set of online prediction results, three models are called simultaneously to assess uncertainty and output the predicted power consumption value with confidence interval; Based on the pattern recognition results, the soft assignment probability distribution is calculated and the entropy value is calculated, and the prediction uncertainty measure is output. Based on the predicted values ​​and the actual observed values, the relative prediction error is calculated and cumulatively monitored. When the error exceeds the set threshold, the model update mechanism is triggered, and the prediction reliability evaluation index is output.

9. The electricity consumption prediction method based on pattern recognition according to claim 1, characterized in that, The steps for obtaining the enhanced prediction result set include: Based on the embedding vectors and assigned pattern categories of the new samples, the corresponding cluster centers are adjusted using the moving average incremental update method. When the preset conditions are met, the batch recalculation method is used to recalculate the cluster centers based on recent samples; Calculate the minimum distance from the embedding vector of a new sample to the existing cluster centers; When the minimum distance exceeds the new pattern detection threshold and the cumulative number of samples in the buffer reaches the preset condition, a new pattern is determined to have appeared. New cluster centers are initialized based on the mean of the samples in the buffer, and point prediction models and quantile regression models are constructed for the appearing pattern. Based on cumulative statistical monitoring results, a model update mechanism is triggered when prediction performance declines. New data is added to the training buffer of the corresponding mode. When the buffer reaches the batch condition, incremental update is performed. The hot start incremental training method is used to continue training on the basis of the original model. Gradient calculation and parameter update are performed based on the new sample data. After training is completed, the buffer is cleared to obtain the updated prediction model and quantile regression model.

10. A pattern recognition-based electricity consumption forecasting system, characterized in that, An assembly for performing a pattern recognition-based electricity consumption prediction method according to any one of claims 1-9, comprising: The data acquisition and alignment module is used to acquire raw electricity consumption data, perform quality assessment and classification on the raw electricity consumption data, and perform spatiotemporal alignment according to the quality level labels to obtain a spatiotemporally aligned multi-source dataset. The quality inspection and repair module is used to detect outliers and missing values ​​in spatiotemporally aligned multi-source datasets, repair outliers and missing values, and obtain clean multi-source datasets. The feature extraction and dimensionality reduction module is used to extract features from a clean multi-source dataset to obtain feature vectors, and then perform feature fusion and dimensionality reduction on the feature vectors to obtain a low-dimensional embedded feature set. The pattern recognition and labeling module is used to initialize cluster centers based on a low-dimensional embedded feature set, optimize clustering using a mini-batch iterative update method, and then assign pattern labels to obtain a pattern label set. The pattern prediction model module is used to construct training sets for each pattern based on the pattern label set and a clean multi-source dataset, train a dedicated prediction model for each pattern, and obtain a set of pattern-specific prediction models. The online recognition and prediction module is used to perform real-time data quality checks, feature extraction and dimensionality reduction, rapid pattern recognition and prediction calculation based on a set of pattern-specific prediction models, and obtain a set of online prediction results. The uncertainty and reliability module is used to perform quantile regression uncertainty quantification, pattern recognition entropy evaluation, and dynamic monitoring of prediction reliability based on the online prediction result set, thereby obtaining an enhanced prediction result set.