SDTW-IPAM-based short-term power load prediction method and system, electronic equipment and storage medium

By combining SDTW-IPAM clustering and Informer networks, the problem of insufficient clustering evaluation metrics and pattern recognition stability in existing technologies is solved, enabling efficient prediction of complex dynamic load scenarios and improving prediction accuracy and robustness.

CN121144892APending Publication Date: 2025-12-16XINJIANG UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511369391.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-24
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

Existing technologies perform poorly in clustering evaluation metrics and pattern recognition stability when dealing with complex dynamic load scenarios, making it difficult to adapt to highly volatile load patterns. Furthermore, traditional methods suffer from gradient problems and information loss when processing long sequences.

Method used

A short-term power load forecasting method based on SDTW-IPAM is adopted. Cluster analysis is performed using the Soft-DTW distance metric, and the PAM clustering algorithm is improved by combining the Gap statistic and the K-means++ initialization strategy. Finally, an Informer network is used to build a forecasting model to adapt to diverse and complex dynamic load scenarios.

Benefits of technology

It achieves accurate characterization of the dynamic time-series characteristics of the load curve and effective identification of local time deformation, improves the stability and accuracy of pattern recognition, enhances the ability to cope with highly volatile load patterns, and reduces computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144892A_ABST
    Figure CN121144892A_ABST
Patent Text Reader

Abstract

The invention belongs to an SDTW-IPAM-based short-term power load prediction method and system, electronic equipment and a storage medium. The method comprises the steps of data preprocessing, clustering analysis, single-class prediction model construction and future load prediction. The clustering analysis comprises setting of upper and lower limits of a cluster number, construction of a distance matrix, calculation of a Gap value and a standard error, selection of an optimal cluster number, generation of an initial center, clustering processing and normalization processing; according to the method, a distance measurement method is introduced into load clustering, so that the dynamic time sequence characteristics of a load curve can be described more accurately, the local time deformation of the load curve can be effectively identified, and the distinguishing capability of similar load days under the influence of weather, events or potential new energy fluctuation is improved; a clustering algorithm is improved by using statistics and an initialization strategy, so that the stability and the accuracy of performing mode recognition on complex load data are improved, and the load can be effectively divided into typical modes with different dynamic characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of short-term power load prediction, in particular to a short-term power load prediction method and system based on SDTW-IPAM, an electronic device and a storage medium. BACKGROUND

[0002] Short-term power load prediction is a key foundation for the safe operation and economic dispatch of power systems. With the development of power systems, especially the increasing penetration of new energy, power load presents increasingly enhanced volatility, nonlinearity and randomness. These characteristics bring new challenges to the safe and stable operation and economic dispatch of power systems, and higher requirements are put forward for the accuracy and robustness of short-term load prediction. Traditional load prediction methods can still work well when dealing with relatively stable loads, but they often fail to effectively capture the rapid changes and deep nonlinear relationships of loads with increasingly intensified fluctuations and increasingly complex dynamic characteristics, resulting in decreased prediction accuracy. The clustering + deep learning combination method can fully utilize the data decomposition capability of clustering and the feature extraction advantage of deep learning by identifying typical load patterns through clustering algorithms and constructing deep learning models for each load pattern, and has been widely applied in the field of load prediction in recent years. In terms of prediction models, the development process has experienced statistical learning, machine learning and deep learning. Statistical learning methods are simple and efficient, but they are only suitable for linear scenarios and cannot capture the complex nonlinear characteristics of loads. Machine learning methods have improved the modeling ability of nonlinear characteristics, but they are sensitive to parameters and have limited effectiveness. Deep learning methods have brought a breakthrough in prediction performance due to their strong feature extraction capability, but recurrent neural networks and their variants, such as long short-term memory networks and gated recurrent unit networks, can automatically extract time series features, but they have gradient problems and information loss when dealing with long sequences. Hybrid models such as CNN-LSTM and CNN-LSTM-Attention have improved, but they still have limitations in modeling long-term dependencies. To address these issues, time series prediction models based on the Transformer architecture have made significant progress. Researchers have introduced autocorrelation decomposition and seasonal trend decomposition into Autoformer to improve the ability to identify complex periodic patterns. Researchers have combined Fourier enhanced decomposition and wavelet decomposition into FEDformer to enhance multi-scale feature extraction capability. Researchers have proposed Informer through probabilistic sparse self-attention mechanism and self-attention distillation operation to capture long sequence dependencies while reducing computational complexity. These models based on the Transformer architecture have made significant progress in dealing with long sequence problems.

[0003] However, how to further balance the prediction accuracy and computational efficiency, and effectively handle the mutations and noises that may exist in the load sequence, is still a problem worth paying attention to. In the aspect of clustering, researchers proposed a short-term load combination prediction method based on fine division and clustering of fluctuation types, which used FCM clustering algorithm to classify the load fluctuation characteristics, but was still limited to static Euclidean distance measurement, and was difficult to adapt to the deformation time series characteristics. Researchers proposed a clustering method based on DTW K-medoids, which improved the user clustering effect, but the traditional DTW distance calculation was low in efficiency and susceptible to abnormal values. Researchers introduced a load prediction method combining graph neural network and clustering, which effectively captured the spatio-temporal correlation characteristics between loads by constructing a dynamic correlation graph structure and a time graph attention network mechanism, but still had deficiencies in handling local deformation of single user time series. Researchers further proposed a center point clustering algorithm, which improved the clustering effect by optimizing the center point selection strategy based on K-Medoids, however, the random initialization strategy could lead to unstable results. SUMMARY

[0004] In order to overcome the shortcomings of the prior art, the purpose of the present application is to provide a short-term power load prediction method, system, electronic device and storage medium based on SDTW-IPAM, which solves the problems of poor clustering evaluation index performance, poor pattern recognition stability and strong limitations in complex dynamic load scenarios in the prior art.

[0005] To achieve the above purpose, the present application provides the following solutions:

[0006] A short-term power load prediction method based on SDTW-IPAM, comprising:

[0007] performing data cleaning on the original load data to obtain preprocessed data;

[0008] performing SDTW-IPAM clustering analysis on the preprocessed data to obtain clustered and normalized load data;

[0009] using an Informer network to construct a prediction model for each type of clustered and normalized load data to obtain a single-class prediction model;

[0010] using the single-class prediction model to generate a future load prediction sequence and perform denormalization processing to obtain a load prediction result;

[0011] performing SDTW-IPAM clustering analysis on the preprocessed data to obtain clustered and normalized load data, comprising:

[0012] receiving the preprocessed data and setting a minimum cluster number and a maximum cluster number;

[0013] constructing a Soft-DTW distance matrix according to the preprocessed data;

[0014] performing Gap statistical analysis on the Soft-DTW distance matrix to obtain a Gap value and a standard error;

[0015] selecting an optimal cluster number by using a preset constraint according to the Gap value, the standard error, the minimum cluster number, and the maximum cluster number;

[0016] selecting an initial center of the pretreated data by using a K-means++ initialization strategy according to the optimal cluster number;

[0017] performing PAM clustering processing on the pretreated data according to the initial center to obtain clustering load data;

[0018] performing Min-Max normalization processing on each type of the clustering load data to obtain clustering normalized load data.

[0019] Preferably, data cleaning is performed on original load data to obtain pretreated data, including:

[0020] setting a sliding window size; the sliding window size includes: 96 points of 24 hours;

[0021] setting an abnormality determination standard; the abnormality determination standard includes: deviation from a window median ± 3 times a standard deviation;

[0022] performing abnormal data identification on the original load data by using a sliding window median method according to the sliding window size and the abnormality determination standard to obtain an abnormal value;

[0023] replacing the abnormal value by using a historical same-period three-week mean to obtain corrected load data;

[0024] extracting time characteristics and meteorological characteristics of the corrected load data, and integrating the corrected load data, the time characteristics, and the meteorological characteristics to obtain the pretreated data.

[0025] Preferably, a Soft-DTW distance matrix is constructed according to the pretreated data, including:

[0026] constructing a local cost matrix; an expression of the local cost matrix is: wherein, is a value corresponding to a th row and a th column in the local cost matrix; is a th data in a daily load curve ; is a th data in a daily load curve ;

[0027] The Soft-DTW distance matrix is ​​constructed based on the local cost matrix using a pre-constructed Soft-DTW formula; the Soft-DTW formula is: The expression for the Soft-DTW distance matrix is: ;in, This indicates the softmin calculation; The length of the input sequence; For the first time series One data point; For smoothing parameters; The th in the Soft-DTW distance matrix Line number The value corresponding to the column.

[0028] Preferably, gap statistics analysis is performed on the Soft-DTW distance matrix to obtain the gap value and standard error, including:

[0029] The gap value is obtained by calculating the Soft-DTW distance matrix using the gap statistical formula; the expression of the gap statistical formula is: ;in, ; For the number of clusters is The corresponding Gap value; for Within-group dispersion of each cluster; This indicates the expected value calculation; Indicates the first A cluster; For the sample With sample The distance between them; For the first The number of samples in each cluster;

[0030] The standard error is obtained by calculating the Soft-DTW distance matrix using the error calculation formula; the expression of the error calculation formula is: ;in, The standard error is denoted as . It is a function of standard deviation; This is the number of reference datasets.

[0031] Preferably, selecting the optimal number of clusters based on the gap value, the standard error, the minimum number of clusters, and the maximum number of clusters using preset constraints includes:

[0032] Construct predefined constraints; the predefined constraints are: ;

[0033] According to the minimum cluster number, the maximum cluster number, and the preset constraint, a minimum cluster number satisfying the preset constraint is selected to obtain the optimal cluster number.

[0034] Preferably, the short-term power load prediction system based on the SDTW-IPAM comprises:

[0035] A preprocessing module is configured to perform data cleaning on original load data to obtain preprocessed data.

[0036] A clustering analysis module is configured to perform SDTW-IPAM clustering analysis on the preprocessed data to obtain cluster normalized load data.

[0037] A prediction model construction module is configured to perform prediction model construction on each type of the cluster normalized load data by using an Informer network to obtain a single-class prediction model.

[0038] A load prediction module is configured to perform future load prediction sequence generation and inverse normalization processing by using the single-class prediction model to obtain a load prediction result.

[0039] Preferably, an electronic device comprises at least one processor and a memory connected to the processor in communication; wherein the memory stores instructions executable by the processor, and the instructions are executed by the processor to enable the processor to perform the short-term power load prediction method based on the SDTW-IPAM.

[0040] Preferably, a non-transitory computer-readable storage medium storing computer instructions is provided, and the computer instructions are used to enable a computer to perform the short-term power load prediction method based on the SDTW-IPAM.

[0041] The present application discloses the following technical effects:

[0042] The application provides a short-term power load prediction method and system based on SDTW-IPAM, an electronic device and a storage medium. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.

[0044] Figure 1 A short-term power load prediction process diagram based on SDTW-IPAM is provided for the embodiments of the present application.

[0045] Figure 2 An SDTW-IPAM clustering flowchart is provided for the embodiments of the present application.

[0046] Figure 3 An Informer architecture diagram is provided for the embodiments of the present application.

[0047] Figure 4 A short-term load prediction flowchart is provided for the embodiments of the present application.

[0048] Figure 5 Gap statistical analysis results are provided for the embodiments of the present application.

[0049] Figure 6 A typical daily load curve is provided for the embodiments of the present application.

[0050] Figure 7 MIC feature analysis results are provided for the embodiments of the present application.

[0051] Figure 8 Error fluctuation trends are provided for the embodiments of the present application.

[0052] Figure 9The different load type prediction result provided by the embodiment of the present application. DETAILED DESCRIPTION

[0053] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0054] The present application aims to provide a short-term power load prediction method, system, electronic device and storage medium based on SDTW-IPAM, to solve the problems of poor performance of clustering evaluation indicators, poor stability of pattern recognition and strong limitations of complex dynamic load scenarios in the prior art.

[0055] In order to make the above-mentioned purposes, features and advantages of the present application more apparent and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0056] Figure 1 The short-term power load prediction flowchart based on SDTW-IPAM provided by the embodiment of the present application is shown in FIG. 1, and the present application provides a short-term power load prediction method based on SDTW-IPAM, which comprises: Figure 1

[0057] Step 100: data cleaning is performed on original load data to obtain preprocessed data;

[0058] Step 200: SDTW-IPAM clustering analysis is performed on the preprocessed data to obtain clustered and normalized load data;

[0059] Step 300: a single-class prediction model is obtained by using an Informer network to construct a prediction model for each type of the clustered and normalized load data;

[0060] Step 400: a load prediction result is obtained by using the single-class prediction model to generate a future load prediction sequence and perform de-normalization processing;

[0061] The SDTW-IPAM clustering analysis on the preprocessed data to obtain clustered and normalized load data comprises:

[0062] Step 201: the preprocessed data is received and the minimum cluster number and the maximum cluster number are set;

[0063] Step 202: a Soft-DTW distance matrix is constructed according to the preprocessed data;

[0064] ​Step 203: Perform Gap statistics analysis on the Soft-DTW distance matrix to obtain the Gap value and standard error;

[0065] Step 204: Select the optimal number of clusters based on the gap value, the standard error, the minimum number of clusters, and the maximum number of clusters using preset constraints;

[0066] Step 205: Select the initial centers of the preprocessed data using the K-means++ initialization strategy based on the optimal cluster number;

[0067] Step 206: Perform PAM clustering on the preprocessed data based on the initial centers to obtain clustering load data;

[0068] Step 207: Perform Min-Max normalization on the clustering load data for each class to obtain the clustering normalized load data.

[0069] Specifically, the raw load data is cleaned to obtain preprocessed data, including:

[0070] Set the sliding window size; the sliding window size includes: 24 hours and 96 points;

[0071] Set anomaly detection criteria; the anomaly detection criteria include: deviation from the window midpoint ± 3 times the standard deviation;

[0072] Based on the sliding window size and the anomaly determination criteria, the original load data is used to identify anomalies using the sliding window midpoint method to obtain anomaly values;

[0073] The outliers were replaced with the historical three-week average to obtain corrected load data;

[0074] Extract the time and meteorological features of the corrected load data, and integrate the corrected load data, the time features, and the meteorological features to obtain the preprocessed data.

[0075] Further, a Soft-DTW distance matrix is ​​constructed based on the preprocessed data, including:

[0076] Construct a local cost matrix; the expression for the local cost matrix is: ;in, The local cost matrix is ​​the first... Line number The corresponding value in the column; Daily load curve The first in One data point; Daily load curve The first in One data point;

[0077] The Soft-DTW distance matrix is ​​constructed based on the local cost matrix using a pre-constructed Soft-DTW formula; the Soft-DTW formula is: The expression for the Soft-DTW distance matrix is: ;in, This indicates the softmin calculation; The length of the input sequence; For the first time series One data point; For smoothing parameters; The th in the Soft-DTW distance matrix Line number The value corresponding to the column.

[0078] Specifically, gap statistics analysis is performed on the Soft-DTW distance matrix to obtain the gap value and standard error, including:

[0079] The gap value is obtained by calculating the Soft-DTW distance matrix using the gap statistical formula; the expression of the gap statistical formula is: ;in, ; For the number of clusters is The corresponding Gap value; for Within-group dispersion of each cluster; This indicates the expected value calculation; Indicates the first A cluster; For the sample With sample The distance between them; For the first The number of samples in each cluster;

[0080] The standard error is obtained by calculating the Soft-DTW distance matrix using the error calculation formula; the expression of the error calculation formula is: ;in, The standard error is denoted as . It is a function of standard deviation; This is the number of reference datasets.

[0081] Further, the optimal number of clusters is selected based on the gap value, the standard error, the minimum number of clusters, and the maximum number of clusters using preset constraints, including:

[0082] Construct predefined constraints; the predefined constraints are: ;

[0083] According to the minimum cluster number, the maximum cluster number, and the preset constraint, a minimum cluster number is selected to obtain the optimal cluster number.

[0084] Specifically, a Soft-DTW-based load curve similarity measure is used. In power load clustering analysis, the load curve often appears local stretching, compression or peak shift on the time axis due to factors such as weather mutation, social activities or potential new energy output fluctuations. The traditional Euclidean distance measure cannot effectively capture such dynamic time sequence characteristics, limiting the ability of the clustering algorithm to identify similar operation modes. DTW is a distance measure method for processing local deformation of time series through nonlinear alignment, but its non-differentiability and high computational complexity limit the optimization efficiency. Soft-DTW, as an improved version of DTW, replaces the min operation in DTW with a differentiable softmin operation, which not only retains the robustness to time axis deformation, but also facilitates gradient calculation and optimization. Let the time series , where is the historical load at time , , ∈ , respectively: , , (the number of daily load data points with a sampling interval of 15 minutes). Define the local cost matrix , whose element is the sequence , The local distance measure at time and :

[0085]

[0086] In the formula: is the Euclidean distance of the corresponding values of sequences and at time and .

[0087] Soft-DTW introduces a smoothing parameter , replacing the min operation in traditional DTW with a softmin operation:

[0088]

[0089] Define the Soft-DTW distance measure , which satisfies the recursive relationship:

[0090]

[0091] wherein: , and are the cumulative distances in horizontal, diagonal and vertical directions, respectively.

[0092] Smoothing parameter affects the degree of smoothing of softmin operation, and thus the stability and convergence speed of gradient calculation. When approaches 0, the gradient calculation is unstable, leading to difficulties in the optimization process; when is too large, the Soft-DTW distance is excessively smoothed, losing the ability to capture small changes in time series.

[0093] Further, PAM clustering. PAM (Partitioning Around Medoids) is a clustering algorithm based on center objects, whose core idea is to select actual data points as cluster centers and minimize the sum of distances from samples in the cluster to the center point through iterative optimization. PAM selects the actual object closest to the average value in the cluster as the cluster center, rather than using the average value as the center point, which makes it more robust in the face of outliers. PAM clustering is based on the concept of medoid (center point), and each cluster is composed of a representative data point (medoid) and its surrounding approximate data points. Its objective function is:

[0094]

[0095] wherein: is the number of clusters; is the th cluster; is the center point of cluster ; is the distance from data point to center point .

[0096] Specifically, the basic process of PAM clustering algorithm is as follows:

[0097] 1) Randomly select points in the sample as the initial cluster centers.

[0098] 2) Calculate the distance between each data point and the cluster center, and assign it to the cluster where the nearest cluster center is located.

[0099] 3) After all sample points are assigned to the corresponding clusters, recalculate the sum of distances from all data points in the cluster to their cluster centers.

[0100] 4) Select other points in each cluster as new cluster centers and recalculate the sum of distances. If the new sum of distances is smaller than the previous one, adopt the new cluster center, otherwise, keep the original cluster center.

[0101] 5) Repeat steps 2) to 4) until the cluster centers no longer change significantly, and output the final cluster assignment result.

[0102] However, PAM clustering has problems such as difficulty in accurately estimating the number of clusters, randomly selecting initial cluster centers, etc., which may lead to unstable clustering results or falling into local optimum.

[0103] Preferably, improved PAM clustering (IPAM). To solve the problem of difficulty in accurately estimating the number of PAM clusters, this embodiment introduces a Gap statistic to adaptively evaluate the number of clusters. The Gap statistic determines the optimal number of clusters by comparing the within-class dispersion of actual data and reference random data, and its calculation method is as follows:

[0104]

[0105] In the formula: is the expected logarithmic dispersion of reference data; is the within-group dispersion of the i-th cluster, and its calculation formula is:

[0106] In the formula:

[0107] is the distance between sample and sample ; is the i-th cluster; is the number of samples in the i-th cluster.

[0108] Reference random data is a data set generated by uniformly distributed random sampling within the value range of the original data, maintaining the same dimension and sample size as the original data. The basic principle of this comparison is: when the number of clusters can reflect the true structure of the data, the within-class dispersion of the actual data will be significantly smaller than the random data, thereby producing a larger Gap value. To evaluate the statistical significance of the Gap value, the calculation of the standard error is introduced:

[0109]

[0110] In the formula: is the standard deviation function; is the number of reference data sets.

[0111] select the Gap value that first satisfies​​​ Minimum of conditions The value is used as the optimal cluster number.

[0112] Furthermore, to address the issue that randomly selecting initial cluster centers in PAM clustering might lead to cluster centers being too close together, thus affecting the final clustering results, this embodiment introduces a K-means++ initialization strategy. The core idea of ​​this strategy is to ensure that the initially selected cluster centers are far apart, increasing sample diversity and thereby improving clustering quality. The implementation process of the PAM clustering initialization optimization strategy is as follows:

[0113] 1) Randomly select a point from the input set of data points as the first cluster center. .

[0114] 2) For each point in the dataset , For dataset One of the data points. Calculate its shortest distance to the currently selected cluster centers. :

[0115]

[0116] In the formula: This represents the number of selected center points. For point To the center point The distance is measured using the Soft-DTW distance metric.

[0117] 3) Calculate the probability that each sample point will be selected as the next cluster center. Select data points with higher probabilities as new cluster centers:

[0118]

[0119] 4) Based on probability distribution Perform weighted random sampling to select new cluster centers.

[0120] 5) Repeat steps 2) to 4) until... Several cluster centers were selected.

[0121] 6) Utilize this We use an initial cluster center to perform the standard PAM clustering algorithm.

[0122] pass The formula shows that the farther away from the existing cluster center ( The larger the sample point, the more likely it will become the next cluster center, which makes the K initial cluster centers selected by PAM clustering better cover different areas in the data space, increases the representativeness and diversity of the initial center points, helps to avoid the algorithm falling into local optimum, and thus improves the accuracy and stability of identifying complex and diversified load patterns.

[0123] Preferably, the power load clustering method based on SDTW-IPAM combines the Soft-DTW distance metric and the improved PAM clustering (IPAM), which can effectively capture the time sequence characteristics of the load curve and realize accurate pattern division, as shown in the main process of Figure 2 .

[0124] Specifically, the principle of the Informer algorithm. Informer is a deep learning model based on the Transformer architecture. Compared with traditional Transformers, Informer introduces a multi-head probabilistic sparse self-attention mechanism and a self-attention distillation operation, as shown in Figure 3 .

[0125] The model adopts an encoder-decoder (Encoder-Decoder) architecture, in which the encoder part contains a multi-dimensional feature map input, which is processed through a multi-head probabilistic sparse self-attention layer, combined with a self-attention distillation mechanism to reduce the sequence dimension, and finally output the encoding information through a fully connected layer. The decoder part receives the output of the encoder and the input sequence with placeholders, which are processed through a multi-head self-attention mechanism and a masked multi-head probabilistic sparse self-attention to form the final output. The core innovation of Informer lies in the multi-head probabilistic sparse self-attention mechanism, whose calculation formula is:

[0126]

[0127] In the formula: , , Query, Key and Value matrices; feature dimension; normalization activation function. This formula is similar to the standard Transformer, but Informer improves the ability to model long sequences by selecting part of the Query points to participate in attention calculation. Informer introduces a dominant score function to select representative Query points for calculation, and the calculation formula of the score function is:

[0128]

[0129] In the formula: is the first dimension of the Row vector is the first row vector of the transpose of is the total length of the Key sequence.

[0130] The score function identifies the Query points with high responses to multiple Keys by the difference between the logarithmic exponential term and the average term. Query with higher scores tends to better represent the global information of the sequence, and retaining these points can better capture long-range dependencies. The number of samples is determined by , where is an adjustable sparse factor. In addition to the sparse attention mechanism, the Informer introduces a hierarchical feature distillation mechanism to extract dominant features layer by layer and reduce the sequence dimension from the th layer to the th layer. The distillation process is represented as:

[0131]

[0132] In the formula: is a one-dimensional convolution operation; is an activation function; is a max-pooling operation; is the output of the attention module.

[0133] Specifically, the short-term power load prediction method based on SDTW-IPAM and Informer. Based on the above method, the embodiment proposes a short-term power load prediction method based on SDTW-IPAM and Informer. The overall prediction process is as shown in Figure 4 . The specific steps are:

[0134] 1) Data preprocessing: cleaning of the original load data, mainly solving the problem of abnormal values. The sliding window median method is used to identify abnormal values in this embodiment, and the historical same period data is corrected. The sliding window used for abnormal value detection is set to 24 hours 96 points, and the deviation from the window median ± 3 times the standard deviation is determined as an abnormal value, and the historical same period three weeks average is used to replace the abnormal value. At the same time, the basic time characteristics and meteorological characteristics are extracted as the feature set to be analyzed.

[0135] ​2) Cluster analysis: Achieve accurate classification of load data, identify load patterns with different fluctuation characteristics, and lay the foundation for subsequent targeted modeling. The power load curve has the characteristics of large fluctuation, strong nonlinearity and local deformation on the time axis. Traditional clustering methods are difficult to accurately capture these characteristics. Therefore, the SDTW-IPAM algorithm which can adapt to the local deformation of the time axis is used to cluster the load curve, effectively capturing the dynamic time sequence characteristics of the load curve. The optimal number of clusters is automatically determined by the Gap statistic, and then the K-means++ strategy is used to optimize the selection of initial center points, finally the stable and reasonable clustering results are obtained. After clustering, the classification Min-Max method is used for normalization processing for each type of load, retaining the horizontal difference between different categories of loads. The normalization formula is:

[0136]

[0137] In the formula: is the original load value; is the category to which the load belongs all load value sets in the category; is the normalized load value.

[0138] 3) Prediction stage: Build a prediction model for each type of load data based on Informer. The Informer model is suitable for capturing the long-term dependence characteristics of load data due to its innovative sparse self-attention mechanism and self-attention distillation mechanism. For each type of load, the last day is taken as the day to be predicted, and the rest is taken as the historical training set. A prediction model is built and a one-day load prediction sequence is generated.

[0139] 4) Finally, perform denormalization to convert the normalized prediction value output by the model back to the original scale to obtain the final load prediction result.

[0140] Further, experimental analysis and performance evaluation. Data description and evaluation criteria: The experimental data is derived from the actual load data of a power company in 2022 (from January 1, 00:00 to December 31, 23:45), with a sampling interval of 15 minutes, a total of 35040 valid load records. At the same time, the numerical weather prediction (NWP) data of a meteorological platform is introduced as the meteorological feature, which includes temperature, humidity, precipitation, wind speed, wind direction and light intensity. In order to evaluate the performance of the model comprehensively, three complementary evaluation indexes are selected in this embodiment: mean absolute error (MAE), root mean square error (RMSE) and goodness of fit (R²). MAE reflects the average deviation degree of predicted value and actual value, RMSE amplifies the influence of large error through square term to evaluate the stability of prediction, and R² quantifies the overall explanatory power of the model to load change. These indexes together provide multi-dimensional evaluation of model prediction performance. The calculation formula of the evaluation index is as follows:

[0141]

[0142]

[0143]

[0144] In the formula: is the number of prediction set data; is the predicted value of load data; is the true value of load data.

[0145] Specifically, clustering results and performance evaluation. In order to determine the optimal number of clusters, Gap statistic method is used for analysis. In the experiment, 1000 groups of reference random data are generated, the Gap statistics from 2 to 10 and their standard errors are calculated, the results are shown in Figure 5 . The results show that the Gap statistics present a fluctuating upward trend with the increase of the number of clusters . When , the Gap statistics appear the first obvious inflection point, after which although there is still an increase, the growth rate slows down and the fluctuation increases. This shows that dividing the load data into 3 categories is a reasonable choice, which can ensure the clustering effect and avoid the complexity brought by excessive classification.

[0146] Further, after data preprocessing, the original daily load curve is clustered by using SDTW-IPAM clustering algorithm. In order to ensure the stability of calculation and the accuracy of distance measurement, the smoothing parameter in Soft-DTW is set, and three typical load curves and their 95% confidence intervals are obtained, and the clustering results are as followsFigure 6 As shown, according to the fluctuation characteristics of the load curve, three typical daily loads are divided into double-peak load, peak load and stable load, the double-peak load (red curve) presents obvious morning and evening power consumption peaks, and the narrow confidence interval indicates high stability; the peak load (blue curve) has the highest load level and great fluctuation, which is particularly obvious on working days with concentrated commercial and industrial activities; the stable load (green curve) has the lowest load level, presents single-peak characteristics and small fluctuation, and is a typical representative of holiday or weekend power consumption mode.

[0147] Specifically, to evaluate the effectiveness of clustering, the silhouette coefficient (SC) and Davies-Bouldin index (DBI) are used as evaluation indexes. The silhouette coefficient measures the rationality of clustering by calculating the similarity of a sample point with other samples in the same class and the similarity with samples in other classes, and the larger the value, the better the clustering effect. The DBI index evaluates the clustering performance from two aspects of intra-class compactness and inter-class separation, and the smaller the value, the better the clustering effect. The calculation formulas of the two indexes are as follows:

[0148]

[0149]

[0150] In the formula, a sample to the average distance to other samples in the same class; to the average distance to the nearest samples in other classes; is the number of clusters, , is the average distance of intra-class samples to the class center; is the distance between the class center and the class center.

[0151] ​​​​The performance comparison results of different distance measurement methods and clustering algorithms are shown in Table 1. The Soft-DTW distance measurement obtains the optimal performance in the evaluation indicators, with a silhouette coefficient of 0.694, which is improved by 37.4% and 19.4% compared with Euclidean distance and traditional DTW respectively; the DBI index is 0.697, which is reduced by 4.7% and 6.7% respectively. In the comparison of clustering algorithms, SDTW-IPAM algorithm is superior to traditional methods, the silhouette coefficient is improved by 30.5% and 11.8% compared with K-means and PAM respectively, and the DBI index is reduced by 11.2% and 6.1% respectively. It can be seen that SDTW-IPAM improves the intra-class compactness and enhances the inter-class separation, which is suitable for capturing the time sequence characteristics of power load curve and effectively distinguishing different load mode types.

[0152] Table 1

[0153]

[0154] Further, feature engineering. In the collected raw data, there are multiple characteristic factors. Considering the complex influence of time and environmental factors on power load, the original features are analyzed and expanded in this embodiment to improve the accuracy of load prediction. In order to quantify the correlation strength between different features and load, this embodiment uses the maximum mutual information number (MIC) for analysis. Compared with the traditional linear correlation coefficient, MIC can more accurately capture the nonlinear relationship between variables, which is suitable for complex time series data such as power load. Figure 7 The MIC heat map of each feature and load under three typical load modes is shown. The heat map analysis shows that the hour feature shows the strongest correlation in all categories, reflecting the inherent time periodicity of the load. Meteorological features such as light intensity, apparent temperature and temperature are also significantly related to each load. These meteorological factors not only directly affect the user's power consumption behavior (such as air conditioning and heating), but also are key external variables driving new energy output such as photovoltaic and wind power. Therefore, this embodiment designs a differentiated feature strategy for different categories of load: the double-peak load uses hour and light features; the high-peak load uses hour, light, apparent temperature and temperature square features; and the stable load uses hour, light and monthly features. This classification feature strategy effectively captures the unique characteristics of different load types, provides targeted input for the Informer model, and reduces the complexity of the model.

[0155] In particular, the prediction results and comparative analysis. Based on the deep learning model of Informer, the load prediction framework is constructed, and the main hyperparameters are systematically optimized through grid search. The final parameter configuration is as follows: the input sequence length and the prediction step are both set to 96 (corresponding to one day of observation points), the number of attention heads is set to 8, the number of encoder layers is 4, the number of decoder layers is 2, the hidden layer dimension is 128, the feedforward neural network dimension is 256, the dropout rate is set to 0.1, and the activation function is gelu. In terms of data set division, the last day (96 time points) is selected as the test set to evaluate the model performance, and the remaining data is used for model training. In order to improve the training effect and generalization ability of the model, HuberLoss loss function is used to enhance the robustness to abnormal values, AdamW optimizer is selected and combined with cosine annealing learning rate scheduling strategy, early stopping mechanism is introduced to prevent overfitting. In order to verify the prediction accuracy and generalization ability of the proposed combined model, 7 comparative models (including BP, TCN, GRU, BiLSTM, CNN-BiLSTM, Autoformer and FEDformer) and unclustered Informer model are constructed, and the prediction experiments are carried out on the three typical loads (double peak, peak and smooth). Each comparative model uses the same training set and test set as the input of the model, and the same part of the comparative model has the same parameter setting. The unclustered Informer model uses all the historical data before the day to be predicted as the training set, Figure 8 For the error fluctuation chart of each model under the three typical load types, the predicted value is compared with the actual value. Figure 8It can be seen that in the stable load type, the error fluctuation of each model is relatively small due to the regular change of the load. In contrast, in the double-peak load and peak load types with stronger volatility and more severe dynamic changes, the prediction error of each model generally increases, especially during the rapid rise / fall or peak period of the load, the error fluctuation of traditional models such as BP, TCN, GRU, etc. is significantly. This shows that handling the strong dynamics and nonlinearity of the load is a key difficulty in prediction. The SDTW-IPAM combined with the Informer model proposed in this embodiment keeps the error fluctuation at a relatively low level in these two more challenging load modes, significantly better than other comparative models. This is due to the effective identification of complex dynamic patterns by SDTW-IPAM and the ability of Informer to capture long sequence dependencies and potential mutations. The error fluctuation of the Informer model without clustering is significantly greater than the clustered model in this embodiment, further verifying the importance of differentiated modeling for different load patterns in improving prediction accuracy under complex conditions. Compared with the stable load, the double-peak load has greater volatility and increased prediction difficulty. The error fluctuation of each model is very obvious during the morning and evening peak periods, and the GRU and BiLSTM based on a single neural network structure have poor fitting effect, with error peaks significantly higher than other periods; the CNN-BiLSTM hybrid model performs slightly better, but still has a large error in the peak transition area; while the model in this embodiment has the smallest error fluctuation, which is due to the ability of the SDTW-IPAM clustering method to accurately identify the dynamic time series characteristics of the double-peak load and effectively capture long sequence dependencies through the multi-head self-attention mechanism of the Informer model. Autoformer and FEDformer, as advanced time series prediction models, also perform well, but still lag behind the model in this embodiment in the rapid change interval of the load. Under peak load, due to the existence of severe load fluctuations and uncertainties, the prediction difficulty of each model is the greatest, especially for traditional neural network models; while the model in this embodiment still maintains a relatively stable error fluctuation even under such complex conditions, verifying that the combined model based on SDTW-IPAM clustering preprocessing can effectively reduce the prediction error of high-volatility loads.

[0156] Further, Figure 9The prediction results of different models under three typical loads are compared. Under the stationary load, the load fitting curves of each prediction model are close to the actual load curve, indicating that each model can achieve good prediction results for sequences with small fluctuation amplitude. Under the bimodal load, when the load appears early and late peak characteristics, the model proposed in this embodiment can accurately capture the trend and respond with high precision. The local magnification area clearly shows the performance difference of each model in the load peak interval. The fitting curve of the model in this embodiment is closest to the actual load curve, and the single neural network model has a large deviation from the actual load in the peak interval, especially in the rapid rising and falling stage of the load. Although the unclustered Informer model is better than the traditional method, it still has obvious errors in the peak interval. This verifies the importance of clustering preprocessing in improving the prediction accuracy of bimodal load. Under the high peak load, the load fitting curves obtained by different prediction models and the actual curve have certain deviation, but the difference is still obvious. The traditional model shows large fluctuations in the high load continuous stage, while Autoformer and FEDformer perform well overall, but still have deficiencies in capturing subtle fluctuations.

[0157] Specifically, to comprehensively evaluate the prediction performance of each model, Table 2 provides a comparison of the performance of different models under three typical loads. The results show that the model proposed in this embodiment achieves the best performance in all evaluation indicators, fully verifying the effectiveness of the SDTW-IPAM and Informer combination method. From the data in the table, it can be seen that the model in this embodiment performs particularly well under stationary load, and maintains a stable advantage under bimodal and high peak load. The prediction difficulty of each model under high peak load and bimodal load is obviously higher than that under stationary load, which is consistent with the analysis results of Figure 8 and Figure 9 , further confirming the significant influence of the fluctuation characteristics of different load types on prediction accuracy.

[0158] Table 2

[0159]

[0160] Compared with the traditional model, the prediction accuracy of the embodiment method is improved by 15% to 40% on average in terms of EMAE and ERMSE indicators; compared with Autoformer and FEDformer models, the performance is particularly outstanding under high peak load type, and the EM AE is reduced by 7.2% and 3.5% respectively. The most significant improvement occurs in double-peak load prediction, which is mainly due to the fact that the embodiment method can accurately capture the time sequence deformation characteristics of the load curve. It is worth noting that the embodiment method not only leads in prediction accuracy, but also performs excellently in computing efficiency. Compared with Autoformer and FEDformer, the prediction time of the embodiment method is reduced by about 40% to 48% while maintaining high accuracy. Through the above multi-angle analysis, it can be concluded that the model proposed in the embodiment performs best in predicting the performance of the three typical loads. This advantage is due to the accurate capture of the dynamic time sequence characteristics of the load curve by the SDTW-IPAM clustering method and the effective modeling of the long sequence dependency relationship by the Informer model. In particular for volatile double-peak and high-peak loads, the embodiment method effectively improves the prediction accuracy through clustering preprocessing and targeted modeling strategies, to some extent, ensuring the balance between timeliness and accuracy.

[0161] As an optional implementation, the embodiment also provides a short-term power load prediction system based on SDTW-IPAM, comprising:

[0162] A preprocessing module for data cleaning of original load data to obtain preprocessed data;

[0163] A clustering analysis module for SDTW-IPAM clustering analysis of the preprocessed data to obtain clustered normalized load data;

[0164] A prediction model construction module for constructing a single-class prediction model for each type of clustered normalized load data using an Informer network;

[0165] A load prediction module for generating a future load prediction sequence and performing a de-normalization process using the single-class prediction model to obtain a load prediction result.

[0166] As an optional implementation, the embodiment also provides an electronic device comprising at least one processor and a memory communicatively connected to the processor; wherein the memory stores instructions executable by the processor, and the instructions are executed by the processor to enable the processor to execute the foregoing short-term power load prediction method based on SDTW-IPAM.

[0167] As an optional implementation, the embodiment also provides a non-transitory computer readable storage medium storing computer instructions, the computer instructions being used to make a computer execute the foregoing short-term power load prediction method based on SDTW-IPAM.

[0168] The beneficial effects of the present application are as follows:

[0169] (1) The Soft-DTW distance measurement method is introduced into load clustering, which can more accurately depict the dynamic time sequence characteristics of load curves and effectively identify local time deformation, which is crucial for distinguishing similar load days affected by weather, events or potential new energy fluctuations. Compared with traditional distance measurement methods, it performs better in clustering evaluation indicators.

[0170] (2) The PAM clustering algorithm is improved based on Gap statistics and K-means++ initialization strategy, realizing adaptive determination of the number of clusters and optimization of initial centers, improving the stability and accuracy of pattern recognition of complex load data, and effectively dividing the load into typical patterns with different dynamic characteristics (such as double peaks, peaks and smoothness), laying a foundation for subsequent differentiated and targeted prediction modeling.

[0171] (3) For different typical load patterns identified, an exclusive Informer prediction model is constructed and a differentiated feature strategy is adopted, effectively overcoming the limitations of single models in adapting to diversified and complex dynamic load scenarios. The example results show that the proposed combined method is superior to the comparative models in terms of EMAE, ERMSE and R², especially when dealing with high volatility load patterns.

[0172] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be mutually referred to.

[0173] In the embodiments, specific examples are applied to illustrate the principles and implementation modes of the present application. The above description of the embodiments is only used to help understand the method and core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed. In conclusion, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A short-term power load forecasting method based on SDTW-IPAM, characterized in that, The method comprises the following steps: data cleaning is performed on original load data to obtain pretreatment data; SDTW-IPAM clustering analysis is performed on the pretreatment data to obtain clustered and normalized load data; an Informer network is used to construct a prediction model for each type of the clustered and normalized load data to obtain a single-class prediction model; the single-class prediction model is used to generate a future load prediction sequence and perform denormalization processing to obtain a load prediction result; SDTW-IPAM clustering analysis is performed on the pretreatment data to obtain clustered and normalized load data, which comprises the following steps: the pretreatment data is received, and a minimum cluster number and a maximum cluster number are set; a Soft-DTW distance matrix is constructed according to the pretreatment data; Gap statistical analysis is performed on the Soft-DTW distance matrix to obtain a Gap value and a standard error; the Gap value, the standard error, the minimum cluster number and the maximum cluster number are used to select an optimal cluster number by using a preset constraint; the optimal cluster number is used to select an initial center of the pretreatment data by using a K-means++ initialization strategy; PAM clustering processing is performed on the pretreatment data according to the initial center to obtain clustered load data; Min-Max normalization processing is performed on each type of the clustered load data to obtain the clustered and normalized load data. 2.The short-term power load forecasting method based on SDTW-IPAM according to claim 1, wherein, Data cleaning is performed on original load data to obtain pretreatment data, which comprises the following steps: a sliding window size is set; the sliding window size comprises 96 points in 24 hours; an abnormality judgment standard is set; the abnormality judgment standard comprises a deviation of 3 times a standard deviation from a window median; abnormal data identification is performed on the original load data by using a sliding window median method according to the sliding window size and the abnormality judgment standard to obtain abnormal values; the abnormal values are replaced by historical same-period three-week average values to obtain corrected load data; time characteristics and weather characteristics of the corrected load data are extracted, and the corrected load data, the time characteristics and the weather characteristics are integrated to obtain the pretreatment data. 3.The short-term power load forecasting method based on SDTW-IPAM according to claim 1, wherein, A Soft-DTW distance matrix is constructed according to the pretreatment data, which comprises the following steps: constructing a local cost matrix; an expression of the local cost matrix is: ; wherein, is a value corresponding to a (i, j)th element in the local cost matrix; is a value corresponding to a (i, j)th element in the local cost matrix; is a value corresponding to a (i, j)th element in the local cost matrix; is an ith data in a daily load curve; is an ith data in a daily load curve; is an ith data in a daily load curve; is an ith data in a daily load curve; is an ith data in a daily load curve; is an ith data in a daily load curve; The Soft-DTW distance matrix is ​​constructed based on the local cost matrix using a pre-constructed Soft-DTW formula; the Soft-DTW formula is: The expression for the Soft-DTW distance matrix is: ;in, This indicates the softmin calculation; The length of the input sequence; For the first time series One data point; For smoothing parameters; The th in the Soft-DTW distance matrix Line number The value corresponding to the column. 4.The short-term power load forecasting method based on SDTW-IPAM according to claim 1, wherein, Gap statistical analysis is performed on the Soft-DTW distance matrix to obtain a Gap value and a standard error, which comprises the following steps: The Gap value is obtained by calculating the Soft-DTW distance matrix by using a Gap statistical formula; an expression of the Gap statistical formula is: ; wherein, ; is the Gap value corresponding to a cluster number of ; is a within-group dispersion of clusters; represents an expectation calculation; represents an th cluster; is a distance between a sample and a sample ; is a sample number in an th cluster; The standard error is obtained by calculating the Soft-DTW distance matrix by using an error calculation formula; an expression of the error calculation formula is: ; wherein, is the standard error; is a standard deviation function; is a number of reference data sets. 5.The short-term power load forecasting method based on SDTW-IPAM according to claim 4, wherein, the Gap value, the standard error, the minimum cluster number and the maximum cluster number are used to select an optimal cluster number by using a preset constraint, which comprises the following steps: constructing a preset constraint; the preset constraint is: ; the minimum cluster number and the maximum cluster number are used to select a minimum cluster number that meets the preset constraint to obtain the optimal cluster number. 6.A short-term power load forecasting system based on SDTW-IPAM, characterized in that, A short-term power load prediction method based on SDTW-IPAM is used to realize the method of claim 1, and the system comprises: a pretreatment module configured to perform data cleaning on original load data to obtain pretreatment data; a clustering analysis module configured to perform SDTW-IPAM clustering analysis on the pretreatment data to obtain clustered and normalized load data; a prediction model construction module configured to use an Informer network to construct a prediction model for each type of the clustered and normalized load data to obtain a single-class prediction model; A load prediction module is configured to generate a future load prediction sequence and perform a reverse normalization process by using the single-class prediction model, so as to obtain a load prediction result.

7. An electronic device, comprising: The method comprises the following steps: At least one processor and a memory connected with the processor; wherein the memory stores instructions executable by the processor, and the instructions are executed by the processor to enable the processor to perform the short-term power load prediction method based on SDTW-IPAM in any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the short-term power load prediction method based on SDTW-IPAM in any one of claims 1 to 5.

Citation Information

Cited By

  • Multi-step time sequence prediction method and system based on double-segmentation conformal prediction

    CN121365221A