Adjustable Load Forecasting Method and System Based on Temporal Autoencoding and Clustering Algorithm

Through an adjustable load prediction method based on timing self-coding and clustering algorithm, the complexity problem of multi-user power load prediction is solved. The sparse attention mechanism and the LSTM model are used to extract features, and adaptive fusion is combined with the Informer model to achieve high-precision prediction of load timing data.

CN120200240BActive Publication Date: 2025-08-05STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510644750.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2025-08-05
Estimated Expiration
2045-05-20

AI Technical Summary

Technical Problem

In the prior art, a single load prediction model cannot meet the complex and diverse needs of multi-user power loads, and it is difficult to achieve fast and accurate predictions. Especially after photovoltaics and electric vehicles are connected to the distribution network, the way load aggregation participates in grid regulation is more flexible, resulting in an increase in prediction challenges.

Method used

The adjustable load prediction method based on timing self-coding and clustering algorithm is adopted, and data clustering is performed through the K-medoids method, and global and local timing features are extracted in combination with the sparse attention mechanism and the LSTM model. The feature learning is performed using the Informer model, and the weights are adaptively integrated to suppress fluctuations to generate adjustable load prediction values.

Benefits of technology

Effectively deal with variable length and speed changes in the time series, overcome noise and local changes, improve the accuracy and stability of load prediction, and significantly improve the model's trend characterization accuracy of load timing data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120200240B_ABST
    Figure CN120200240B_ABST
Patent Text Reader

Abstract

An adjustable load prediction method and system based on temporal autoencoding and clustering algorithms obtain an auxiliary test dataset and a test dataset through clustering; construct an encoding layer based on a sparse attention mechanism and an LSTM model, and construct a decoding layer based on an Informer model. In the encoding layer, global temporal features are extracted from the auxiliary test dataset, and local temporal features are extracted from the test dataset, the fluctuations of the global temporal features and the local temporal features are suppressed, and an adaptive fusion weight is determined according to the global temporal features and the local temporal features; in the decoding layer, feature learning is performed on the globally and locally temporally feature with fluctuations suppressed to obtain the change features of the global temporal features and the local temporal features; the weighted sum of the output data of the encoding layer and the decoding layer is used as the adjustable load prediction value. It overcomes the problems of variable length, variable speed, noise, and local changes in time series, and improves the trend representation accuracy of the model for load time series data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power system load forecasting, and specifically relates to an adjustable load forecasting method and system based on time series autoencoding and clustering algorithms. Background Art

[0002] With the accelerating development of the new power system, a large number of photovoltaic power sources, electric vehicles, etc. are connected to the distribution network, making its structure and operation increasingly complex, and the way of load aggregation participating in grid regulation is more flexible, posing challenges to its accurate forecasting.

[0003] In the prior art, a single load forecasting model cannot meet the forecasting requirements of various loads. To avoid the mutual influence between different loads, it is necessary to extract effective features from historical loads, perform classification processing and forecasting. Multi-user power load forecasting refers to forecasting the power loads of multiple users or regions based on historical load data, which can enable grid enterprises to master the power demands of different users or regions, so as to better carry out planning and implement dispatching optimization, etc. However, due to the complex and diverse electricity consumption behaviors of each user, it is difficult to achieve fast and accurate forecasting using traditional methods. Summary of the Invention

[0004] To solve the deficiencies existing in the prior art, the present invention provides an adjustable load forecasting method and system based on time series autoencoding and clustering algorithms, which divides the electricity consumption types of different users and processes time series data to improve the effect of multi-user load clustering and enhance the accuracy and stability of load forecasting.

[0005] The present invention adopts the following technical solutions.

[0006] The present invention proposes an adjustable load forecasting method based on time series autoencoding and clustering algorithms, including:

[0007] Obtain all historical data of the adjustable load, and obtain an auxiliary test data set through clustering; obtain the real-time value of the adjustable load, and obtain a test data set through clustering;

[0008] Construct an encoding layer of a prediction model based on a sparse attention mechanism and an LSTM model, and construct a decoding layer of the prediction model based on an Informer model. The encoding layer and the decoding layer form the prediction model. In the encoding layer, extract global temporal features from the auxiliary test dataset based on the sparse attention mechanism, extract local temporal features from the test dataset based on the LSTM model, suppress the fluctuations of the global temporal features and the local temporal features based on an adaptive gating function, and determine an adaptive fusion weight according to the global temporal features and the local temporal features. In the decoding layer, perform feature learning on the global temporal features and the local temporal features after fluctuation suppression to obtain the change features of the global temporal features and the local temporal features. Based on the adaptive fusion weight, use the weighted sum of the output data of the encoding layer and the output data of the decoding layer as the adjustable load prediction value.

[0009] Obtain the historical data of the adjustable load, and obtain the auxiliary test dataset through clustering, including:

[0010] Obtain the historical data of the adjustable load to form a load auxiliary training time series, use the K-medoids method to cluster the load auxiliary training time series to determine the data categories; based on the clustering cost function, use the elbow inflection point determination method to optimize the data categories; the clustering clusters corresponding to the optimized data categories are used as the auxiliary test dataset.

[0011] The clustering cost function satisfies the following relationship:

[0012]

[0013] In the formula, is the clustering cost function when the number of clusters is , is the clustering cluster of the load auxiliary training time series determined based on the dynamic time warping method The average cumulative distance between the sample x in and the clustering center of the clustering cluster

[0014] When the first-order difference of the clustering cost function is less than the set threshold , it is determined that the elbow inflection point is reached, where the value range of the threshold is ; when the elbow inflection point is reached, the data categories reach the optimum, and the number of clusters reaches the optimum value , and the clustering clusters corresponding to the optimized data categories are all load data time series, and multiple load data time series of different categories form the auxiliary test dataset.

[0015] Obtain the real-time value of the adjustable load, and obtain the test dataset through clustering, including:

[0016] Obtain the real-time value of the adjustable load to form a load training time series, and use the K-medoids method to cluster the load training time series; aiming at minimizing the clustering cost function, match the clustering categories of the load training time series with the optimized data categories, and use the clustering clusters of the load training time series with category matching as the test data set.

[0017] Aiming at minimizing the clustering cost function, the following relational expression is satisfied:

[0018]

[0019] In the formula, is the clustering cost function when the number of clusters reaches the optimal value ; is the clustering center of the clustering cluster of the load training time series determined based on the dynamic time warping method and the clustering center of the clustering cluster of the load-assisted training time series ;

[0020] The clustering clusters of the load training time series with category matching are all load data time series, and multiple load data time series of different categories constitute the test data set.

[0021] The globally and locally time series features after fluctuation suppression are the output data of the encoding layer of the prediction model; the change features of the globally and locally time series features are the output data of the decoding layer of the prediction model.

[0022] The adaptive gating function satisfies the following relational expression:

[0023]

[0024] In the formula, is the globally and locally time series features after fluctuation suppression at time ; is the sigmoid function, is the gating input weight matrix, is the data corresponding to the auxiliary test data set or the test data set at time ; is the gating input vector, is the fluctuation suppression weight matrix, is the globally and locally time series features at time ; is the regularization constraint value.

[0025] The adaptive fusion weight satisfies the following relational expression:

[0026]

[0027] In the formula, is the adaptive fusion weight at time , is the adjustment coefficient of the adaptive fusion weight, which is used to control the steepness of the change of the adaptive fusion weight, is the adjustment threshold of the adaptive fusion weight;

[0028] The adjustable load prediction result satisfies the following relational expression:

[0029]

[0030] In the formula, is the adjustable load prediction result at time , is the output data of the encoding layer of the prediction model at time , is the output data of the decoding layer of the prediction model at time .

[0031] Based on the auxiliary test data set and the test data set, determine the benchmark correction terms for each data category after optimization; use the matching degree between the real-time value of the adjustable load and the cluster center to which it belongs, and the adaptive fusion weight, and generate the correction weights of the benchmark correction terms for each data category based on the Sigmoid function; when the root mean square error and the mean absolute error of the adjustable load prediction result are both the smallest, determine the regularization constraint value that characterizes the fluctuation consistency of the adjustable load prediction value; feedback the regularization constraint value to the adaptive gating function to suppress the fluctuations of the global time series features and the local time series features, so as to update the output data of the encoding layer and the output data of the decoding layer, and obtain the updated adjustable load prediction value; superimpose the weighted sum of the updated adjustable load prediction value and the benchmark correction terms for each optimized data category to obtain the optimized adjustable load prediction value.

[0032] The correction weights of the benchmark correction terms for each data category satisfy the following relational expression:

[0033]

[0034] In the formula, is the correction weight of the th data category at time , is the matching degree between the real-time value of the adjustable load and the cluster center of the th data category to which it belongs, is the th data category at time 's benchmark correction term, is at time The adaptive fusion weight.

[0035] The regularization constraint value satisfies the following relational expression:

[0036]

[0037] In the formula, is the regularization constraint value, is the mean square error function, and are respectively the true value of the adjustable load and the fluctuation change amount at its adjacent time point, and are respectively the predicted value of the adjustable load and the fluctuation change amount at its adjacent time point, is the adjustment parameter for fluctuation consistency, used to control the sensitivity to fluctuations, .

[0038] The optimized predicted value of the adjustable load satisfies the following relational expression:

[0039]

[0040] In the formula, is the optimized predicted result of the adjustable load at time , is the updated predicted result of the adjustable load at time , is the optimal value of the number of clusters.

[0041] The present invention also proposes an adjustable load prediction system based on a time series autoencoder and a clustering algorithm, including:

[0042] A dataset construction module, used to obtain historical data of the adjustable load, and obtain an auxiliary test dataset through clustering; obtain the real-time value of the adjustable load, and obtain a test dataset through clustering;

[0043] A prediction module, used to construct an encoding layer of a prediction model based on a sparse attention mechanism and an LSTM model, construct a decoding layer of the prediction model based on an Informer model, and the encoding layer and the decoding layer constitute the prediction model; in the encoding layer, extract global time series features from the auxiliary test dataset based on the sparse attention mechanism, extract local time series features from the test dataset based on the LSTM model, suppress the fluctuations of the global time series features and the local time series features based on an adaptive gating function, and determine the adaptive fusion weight according to the global time series features and the local time series features; in the decoding layer, perform feature learning on the globally and locally time series features after fluctuation suppression to obtain the change features of the global time series features and the local time series features; based on the adaptive fusion weight, use the weighted sum of the output data of the encoding layer and the output data of the decoding layer as the predicted value of the adjustable load.

[0044] The present invention is also a terminal, including a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method.

[0045] The present invention is also a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the method are implemented.

[0046] The beneficial effects of the present invention are at least as follows compared with the prior art. The present invention provides an adjustable load prediction method based on a time series autoencoder and a clustering algorithm. The K-medoids method based on the Dynamic Time Warping (DTW) algorithm is used to perform dynamic time adjustment clustering on the multi-user historical load test data set and the original load data and perform category matching, which can effectively handle the variable length and variable speed problems in time series data and overcome the noise and local changes in time series data, and improve the training effect of the data. The sparse attention mechanism and the feature extraction module of LSTM are used to perform time series feature extraction on the auxiliary training data and load data in the data set, learn the historical load time series change trend, and capture the advantages of the dependency relationship of the sequence data. The Informer model is used to learn the feature data, which improves the trend representation accuracy of the model for load time series data. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 is a flowchart of an adjustable load prediction method based on a time series autoencoder and a clustering algorithm proposed by the present invention;

[0048] Figure 2 is a schematic diagram of load training time series of multiple categories obtained by using the K-medoids method in an embodiment of the present invention. DETAILED DESCRIPTION

[0049] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. The embodiments described in this application are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the spirit of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0050] The present invention proposes an adjustable load prediction method based on a time series autoencoder and a clustering algorithm, as Figure 1 shown, including:

[0051] Step 1: Obtain the historical data of the adjustable load to form a load-assisted training time series, and use the K-medoids method to cluster the load-assisted training time series to determine the data categories.

[0052] Obtain all the historical data of the adjustable load, and after preprocessing and normalization, obtain the load-assisted training time series; for all the historical data of the adjustable load Perform preprocessing, including: correcting outliers, filling in missing values, and normalizing the preprocessed data;

[0053] In the embodiment, all the historical data of the adjustable load is the active power collected by the electric meters in an industrial park in a certain area; each load data after preprocessing and normalization forms a load-assisted training time series in chronological order.

[0054] The K-medoids clustering algorithm abandons the mean strategy in K-means and selects the sample located at the center as the clustering center, reducing the sensitivity of K-medoids to outliers. In the embodiment, through the clustering of the load-assisted training time series, all the historical data of various adjustable loads is divided into clusters.

[0055] Step 2: Based on the clustering cost function, use the elbow inflection point determination method to optimize the data categories; the clustering clusters corresponding to the optimized data categories are used as the auxiliary test data set.

[0056] The clustering cost function satisfies the following relationship:

[0057]

[0058] In the formula, is the clustering cost function when the number of clusters is , is the clustering cluster of the load-assisted training time series determined based on the dynamic time warping method The average cumulative distance between the sample x in and the clustering center of the clustering cluster .

[0059] When the first-order difference of the clustering cost function is less than the set threshold , it is determined that the elbow inflection point is reached, where the value range of the threshold is , and the preferred value in the embodiment is 5%; when the elbow inflection point is reached, the data categories reach the optimum, and the number of clusters reaches the optimum value , and the clustering clusters corresponding to the optimized data categories are all load data time series, and multiple load data time series of different categories form the auxiliary test data set.

[0060] Based on the clustering cost function, the present invention determines the optimal clustering category of the load-assisted training time series by using the elbow inflection point determination method, thereby ensuring the similarity of the load data in the same category and the overall clustering effect, and reducing the influence of outliers on the clustering result when processing time series data.

[0061] Step 3: Obtain the real-time value of the adjustable load to form a load training time series, and use the K-medoids method to cluster the load training time series; aiming at minimizing the clustering cost function, match the clustering category of the load training time series with the optimized data category, and use the clustering cluster of the load training time series with the category match as the test data set.

[0062] Aiming at minimizing the clustering cost function, the following relationship is satisfied:

[0063]

[0064] In the formula, is the clustering cost function when the number of clusters reaches the optimal value When, is the clustering center of the clustering cluster of the load training time series determined based on the dynamic time warping method And the clustering center of the clustering cluster of the load-assisted training time series The average cumulative distance of.

[0065] The clustering clusters of the load training time series with category matches are all load data time series, and multiple load data time series of different categories constitute the test data set.

[0066] The present invention also matches the real-time collected adjustable load data with the clustering categories of a large amount of historical load data based on the optimal clustering number. When the clustering cost function reaches the minimum, the matching of the real-time collected adjustable load data with the clustering categories of a large amount of historical load data is achieved, which can not only ensure that the user loads in the same category have strong similarity, but also help the model better capture the time series characteristics of the data, thereby facilitating the model learning and training and improving the description accuracy of the model for load data; in addition, by optimizing the double-layer control of determining the optimal clustering number and minimizing the clustering cost function, the problem of limited amount of real-time collected adjustable load data is solved.

[0067] Figure 2 are the obtained load training time series of multiple categories. The load training time series of each category have the same time axis and are divided into multiple categories according to the load fluctuation range.

[0068] Step 4: Construct the encoding layer of the prediction model based on the sparse attention mechanism and the LSTM model, and construct the decoding layer of the prediction model based on the Informer model. The encoding layer and the decoding layer constitute the prediction model. In the encoding layer, extract the global temporal features from the auxiliary test dataset based on the sparse attention mechanism, extract the local temporal features from the test dataset based on the LSTM model, suppress the fluctuations of the global temporal features and the local temporal features based on the adaptive gating function, and determine the adaptive fusion weights according to the global temporal features and the local temporal features. In the decoding layer, perform feature learning on the globally and locally temporally feature with suppressed fluctuations to obtain the changing features of the global temporal features and the local temporal features. Based on the adaptive fusion weights, use the weighted sum of the output data of the encoding layer and the output data of the decoding layer as the adjustable load prediction value.

[0069] Specifically, Step 4 includes:

[0070] Step 4.1: Construct the encoding layer of the prediction model based on the sparse attention mechanism and the LSTM model, and construct the decoding layer of the prediction model based on the Informer model. The encoding layer and the decoding layer constitute the prediction model;

[0071] The prediction model is a temporal autoencoder with the same input and output sequence lengths for temporal reconstruction. The temporal autoencoder proposed in this invention uses LSTM as the encoder and Informer as the decoder. Through end-to-end encoding-decoding reconstruction, it can not only adaptively align load sequences of different lengths and rates, but also capture multi-scale temporal features of load changes during the encoding stage. During the training process, the LSTM encoder is responsible for extracting short-term and long-term dependency information of the sequence, while the Informer decoder reconstructs the sequence through the global attention mechanism, naturally filtering out noise and retaining key trends, enabling subsequent clustering and prediction to be based on more representative latent vectors, significantly improving the clustering purity and prediction accuracy, and effectively accelerating model convergence.

[0072] The sparse attention mechanism (Sparse Attention) and the LSTM model can achieve better performance in sequence tasks. Among them, the sparse attention mechanism reduces the sensitivity of the prediction model to noise, better focuses on deep temporal change features, and thus improves the model's feature capture generalization ability. The LSTM model effectively captures long-term dependencies in time series through long short-term memory networks; makes full use of global and local temporal features through Informer. The prediction model proposed in this invention gives full play to the advantages of each data processing framework, better extracts deep temporal change features of the load, and improves the load prediction efficiency and accuracy.

[0073] Step 4.2, in the encoding layer, global temporal features are extracted from the auxiliary test dataset based on the sparse attention mechanism, and local temporal features are extracted from the test dataset based on the LSTM model. Based on the adaptive gating function, the fluctuations of the global temporal features and local temporal features are suppressed; the adaptive gating function satisfies the following relational expression:

[0074]

[0075] In the formula, is the global or local temporal feature after fluctuation suppression at time ; is the sigmoid function, is the gating input weight matrix, is the data corresponding to time in the auxiliary test dataset or test dataset, is the gating input vector, is the fluctuation suppression weight matrix, is the global or local temporal feature at time ; is the regularization constraint value;

[0076] The global and local temporal features after fluctuation suppression are the output data of the encoding layer of the prediction model.

[0077] Step 4.3, according to the global and local temporal features, determine the adaptive fusion weight, which satisfies the following relational expression:

[0078]

[0079] In the formula, is the adaptive fusion weight at time ; is the adjustment coefficient of the adaptive fusion weight, which is used to control the steepness of the change of the adaptive fusion weight, is the adjustment threshold of the adaptive fusion weight.

[0080] Step 4.4, in the decoding layer, perform feature learning on the global and local temporal features after fluctuation suppression to obtain the change features of the global and local temporal features;

[0081] The change features of the global and local temporal features are the output data of the decoding layer of the prediction model.

[0082] Step 4.5, based on the adaptive fusion weight, use the weighted sum of the output data of the encoding layer and the output data of the decoding layer of the prediction model as the adjustable load prediction value;

[0083]

[0084] In the formula, is the adjustable load prediction result at time , is the output data of the encoding layer of the prediction model at time , is the output data of the decoding layer of the prediction model at time .

[0085] The prediction model proposed by the present invention can extract the deep time-series change characteristics in the load, thereby improving the prediction accuracy and precision of the adjustable load. In the design and optimization process of the prediction model proposed by the present invention, the physical characteristics of the adjustable load are fully utilized, and targeted technical strategies are formulated starting from the actual characteristics such as the volatility, amplitude, and mutation of the load data in each link of data processing, model fusion, and optimization objectives, so as to reflect the physical pertinence and engineering practicability of the proposed method.

[0086] Step 5: Based on the auxiliary test data set and the test data set, determine the benchmark correction terms for each optimized data category; use the matching degree between the real-time value of the adjustable load and the cluster center and the adaptive fusion weight to generate the correction weights of the benchmark correction terms for each data category based on the Sigmoid function; when the root mean square error and the mean absolute error of the adjustable load prediction result are both minimized, determine the regularization constraint value representing the fluctuation consistency of the adjustable load prediction value; feedback the regularization constraint value to the adaptive gating function to suppress the fluctuations of the global time-series features and the local time-series features, so as to update the output data of the encoding layer and the output data of the decoding layer, and obtain the updated adjustable load prediction value; superimpose the weighted sum of the updated adjustable load prediction value and the benchmark correction terms for each optimized data category to obtain the optimized adjustable load prediction value.

[0087] Specifically, step 5 includes:

[0088] Step 5.1: Based on the auxiliary test data set and the test data set, determine the benchmark correction terms for each optimized data category;

[0089] Specifically, calculate the residual mean of the historical data corresponding to each optimized data category and the real-time value respectively as the benchmark correction term for each optimized data category; calculate the residual mean of the historical prediction value and the true value for each clustering category to form a category-specific benchmark correction term, and both the auxiliary test data set and the test data set are clustered based on the dynamic time warping algorithm, so the time series alignment can be ensured.

[0090] Step 5.2: Based on the matching degree between the real-time value of the adjustable load and the cluster center it belongs to, and the adaptive fusion weight, generate the correction weights of the benchmark correction terms for each data category using the Sigmoid function, satisfying the following relational expression:

[0091]

[0092] In the formula, is the correction weight of the th data category at time , is the matching degree between the real-time value of the adjustable load and the cluster center of the th data category it belongs to, is the th data category's benchmark correction term at time , is the adaptive fusion weight at time .

[0093] Step 5.3: When the root mean square error and mean absolute error of the adjustable load prediction result are both minimized, determine the regularization constraint value representing the fluctuation consistency of the adjustable load prediction value, satisfying the following relational expression:

[0094]

[0095] In the formula, is the regularization constraint value, is the mean square error function, and are the fluctuation change amounts of the real value of the adjustable load and its adjacent time points respectively, and are the fluctuation change amounts of the predicted value of the adjustable load and its adjacent time points respectively, is the adjustment parameter for fluctuation consistency, used to control the sensitivity to fluctuations, ;

[0096] Use the two commonly used model evaluation indicators, root mean square error (RMSE) and mean absolute error (MAE), to evaluate the description effect of the load characteristics by the prediction model proposed in this invention;

[0097] Feed back the regularization constraint value to the adaptive gating function to suppress the fluctuations of the global time series features and local time series features, so as to update the output data of the encoding layer and the output data of the decoding layer, thereby updating the predicted value of the adjustable load, satisfying the following relational expression:

[0098]

[0099] In the formula, is the updated adjustable load prediction result at time . is the updated output data of the encoding layer of the prediction model at time . is the updated output data of the decoding layer of the prediction model at time .

[0100] Step 5.4: Superimpose the updated adjustable load prediction value and the weighted sum of the benchmark correction terms of each optimized data category to obtain the optimized adjustable load prediction value, which satisfies the following relational expression:

[0101]

[0102] In the formula, is the optimized adjustable load prediction result at time .

[0103] The present invention implements residual correction based on multi-modal feature fusion, and improves the prediction accuracy by combining clustering category information and time series auto-encoding features. This method makes full use of the classification ability of clustering analysis for load patterns and the feature representation ability of time series auto-encoding, and effectively reduces the systematic deviation through dynamic residual compensation. Experiments show that the prediction error can be reduced by 12.3%, significantly improving the prediction stability in the case of sudden load scenarios. Joint training is performed to predict the adjustable load with the trained prediction model.

[0104] The present invention also proposes an adjustable load prediction system based on time series auto-encoding and clustering algorithm, including:

[0105] A dataset construction module, configured to obtain historical data of adjustable load and obtain an auxiliary test dataset through clustering; obtain real-time values of adjustable load and obtain a test dataset through clustering;

[0106] A prediction module is used to construct an encoding layer of a prediction model based on a sparse attention mechanism and an LSTM model, and construct a decoding layer of the prediction model based on an Informer model. The encoding layer and the decoding layer constitute the prediction model. In the encoding layer, global temporal features are extracted from an auxiliary test dataset based on the sparse attention mechanism, and local temporal features are extracted from the test dataset based on the LSTM model. Based on an adaptive gating function, the fluctuations of the global temporal features and the local temporal features are suppressed, and an adaptive fusion weight is determined according to the global temporal features and the local temporal features. In the decoding layer, feature learning is performed on the global temporal features and the local temporal features after fluctuation suppression to obtain the change features of the global temporal features and the local temporal features. Based on the adaptive fusion weight, the weighted sum of the output data of the encoding layer and the output data of the decoding layer is used as the adjustable load prediction value.

[0107] The present disclosure may be a system, a method, and / or a computer program product. The computer program product may include a computer-readable storage medium having thereon computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0108] A computer-readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. A computer-readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punch card or raised structures in grooves having instructions stored thereon, and any suitable combination of the foregoing. The computer-readable storage medium used herein is not construed as an instantaneous signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.

[0109] The computer-readable program instructions described herein can be downloaded to various computing / processing devices from a computer-readable storage medium or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.

[0110] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state-setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via an Internet service provider through the Internet). In some embodiments, by using the status information of the computer-readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer-readable program instructions to implement various aspects of the present disclosure.

[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific embodiments of the present invention, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.

Claims

1. An adjustable load forecasting method based on time series autoencoding and clustering algorithm, characterized in that: include: Obtain historical data of adjustable load to form a load-assisted training time series, and use the K-medoids method to cluster the load-assisted training time series to determine the data category; Based on the clustering cost function, the elbow inflection point judgment method is used to optimize the data category; The clusters corresponding to the optimized data categories are used as auxiliary test data sets; the real-time value of the adjustable load is obtained, and the test data set is obtained through clustering; The encoding layer is constructed based on the sparse attention mechanism and the LSTM model, and the decoding layer is constructed based on the informer model. The encoding layer and the decoding layer constitute the prediction model. In the encoding layer, the global time series features are extracted from the auxiliary test dataset based on the sparse attention mechanism, and the local time series features are extracted from the test dataset based on the LSTM model. The fluctuations of the global and local time series features are suppressed based on the adaptive gating function shown in the following relationship: Where, For the moment Global and local time series characteristics after fluctuation suppression, is the sigmoid function, is the gate input weight matrix, The auxiliary test data set or the test data set concentration moment The corresponding data, is the gate input vector, is the fluctuation suppression weight matrix, For the moment The global and local timing characteristics of is the regularization constraint value; The adaptive fusion weight is determined based on the global timing features and local timing features. In the decoding layer, feature learning is performed on the global timing features and local timing features after fluctuation suppression to obtain the change characteristics of the global timing features and local timing features. Based on the adaptive fusion weight, the weighted sum of the output data of the encoding layer and the output data of the decoding layer is used as the adjustable load prediction value.

2. The adjustable load forecasting method based on time series autoencoding and clustering algorithm according to claim 1 is characterized in that: The clustering cost function satisfies the following relationship: Where, is the number of clusters The clustering cost function when , Clustering of load-assisted training time series determined based on dynamic time warping method Sample x and clusters in The cluster center The average cumulative distance.

3. The adjustable load forecasting method based on time series autoencoding and clustering algorithm according to claim 2 is characterized in that: When the first-order difference of the clustering cost function Less than the set threshold When , it is determined that the elbow inflection point has been reached, where the threshold value range is ; When the elbow inflection point is reached, the data category reaches the optimal level and the number of clusters is Reach the optimal value ,The clusters corresponding to the optimized data categories are all load data time series, and multiple load data time series of different categories constitute the auxiliary test data set.

4. The adjustable load forecasting method based on time series autoencoding and clustering algorithm according to claim 3 is characterized in that: Obtain the real-time value of the adjustable load and obtain the test data set through clustering, including: The real-time value of the adjustable load is obtained to form a load training time series, and the K-medoids method is used to cluster the load training time series. With the goal of minimizing the clustering cost function, the clustering categories of the load training time series are matched with the optimized data categories, and the cluster clusters of the load training time series with matching categories are used as test data sets.

5. The adjustable load forecasting method based on time series autoencoding and clustering algorithm according to claim 4 is characterized in that: The goal is to minimize the clustering cost function, which satisfies the following relationship: Where, To achieve the optimal number of clusters The clustering cost function when , The cluster center of the load training time series determined based on the dynamic time warping method Cluster centers of clusters of load-assisted training time series The average cumulative distance of The clusters of the class-matched load training time series are all load data time series, and multiple load data time series of different classes constitute the test data set.

6. The adjustable load forecasting method based on time series autoencoding and clustering algorithm according to claim 1 is characterized in that: The global time series features and local time series features after fluctuation suppression are the output data of the encoding layer of the prediction model; The change characteristics of the global time series features and the local time series features are the output data of the decoding layer of the prediction model.

7. The adjustable load forecasting method based on time series autoencoding and clustering algorithm according to claim 1 is characterized in that: The adaptive fusion weight satisfies the following relationship: Where, For the moment Adaptive fusion weights, is the adjustment coefficient of the adaptive fusion weight, which is used to control the steepness of the change of the adaptive fusion weight. is the adjustment threshold of the adaptive fusion weight.

8. The adjustable load forecasting method based on time series autoencoding and clustering algorithm according to claim 7 is characterized in that: The adjustable load forecast result satisfies the following relationship: Where, For the moment Adjustable load forecast results, The encoding layer of the prediction model at time The output data, is the decoding layer of the prediction model at time Output data.

9. The adjustable load forecasting method based on time series autoencoding and clustering algorithm according to claim 4 is characterized in that: Also includes: Determine optimized benchmark correction items for each data category based on the auxiliary test data set and the test data set; The matching degree between the real-time value of the adjustable load and the cluster center to which it belongs and the adaptive fusion weight are used to generate the correction weights of the benchmark correction items of each data category based on the Sigmoid function. When the root mean square error and the mean absolute error of the adjustable load prediction result are minimized, the regularization constraint value that characterizes the fluctuation consistency of the adjustable load prediction value is determined. The regularization constraint value is fed back to the adaptive gating function to suppress the fluctuation of the global timing characteristics and the local timing characteristics, so as to update the output data of the encoding layer and the output data of the decoding layer to obtain the updated adjustable load prediction value. The updated adjustable load prediction value is superimposed with the weighted sum of the optimized benchmark correction items of each data category to obtain the optimized adjustable load prediction value.

10. The adjustable load forecasting method based on time series autoencoding and clustering algorithm according to claim 9, characterized in that: The correction weights of the benchmark correction items for each data category satisfy the following relationship: Where, For the Data categories at time The correction weight of The real-time value of the adjustable load and the The matching degree of the cluster centers of the data categories, For the Data categories at time The baseline correction term, For the moment Adaptive fusion weights.

11. The adjustable load forecasting method based on time series autoencoding and clustering algorithm according to claim 9, characterized in that: The regularization constraint value satisfies the following relationship: Where, is the regularization constraint value, is the mean square error function, and are the real value of the adjustable load and its fluctuation variation at adjacent time points, and are the adjustable load forecast value and its fluctuation variation at adjacent time points, is the adjustment parameter of fluctuation consistency, which is used to control the sensitivity to fluctuations. .

12. The adjustable load forecasting method based on time series autoencoding and clustering algorithm according to claim 11, characterized in that: The optimized adjustable load forecast value satisfies the following relationship: Where, For the moment The optimized adjustable load forecast results are: For the moment The updated adjustable load forecast results, is the optimal value of the number of clusters.

13. An adjustable load forecasting system based on time series autoencoding and clustering algorithm, used to implement the adjustable load forecasting method based on time series autoencoding and clustering algorithm according to any one of claims 1 to 12, characterized in that: include: The dataset construction module is used to obtain the historical data of adjustable loads to form a load-assisted training time series, and the K-medoids method is used to cluster the load-assisted training time series to determine the data category; Based on the clustering cost function, the elbow inflection point judgment method is used to optimize the data category; The clusters corresponding to the optimized data categories are used as auxiliary test data sets; the real-time value of the adjustable load is obtained, and the test data set is obtained through clustering; The prediction module is used to construct the encoding layer of the prediction model based on the sparse attention mechanism and the LSTM model, and the decoding layer of the prediction model based on the informer model. The encoding layer and the decoding layer constitute the prediction model. In the encoding layer, the global time series features are extracted from the auxiliary test data set based on the sparse attention mechanism, and the local time series features are extracted from the test data set based on the LSTM model. The fluctuations of the global time series features and the local time series features are suppressed based on the adaptive gating function. The adaptive fusion weight is determined based on the global time series features and the local time series features. In the decoding layer, feature learning is performed on the global time series features and the local time series features after the fluctuation is suppressed to obtain the change characteristics of the global time series features and the local time series features. Based on the adaptive fusion weight, the weighted sum of the output data of the encoding layer and the output data of the decoding layer is used as the adjustable load prediction value. The adaptive gating function is as follows: Where, For the moment Global and local time series characteristics after fluctuation suppression, is the sigmoid function, is the gate input weight matrix, The auxiliary test data set or the test data set concentration moment The corresponding data, is the gate input vector, is the fluctuation suppression weight matrix, For the moment The global and local timing characteristics of is the regularization constraint value.

14. The adjustable load forecasting system based on time series autoencoding and clustering algorithm according to claim 13, characterized in that: The dataset building blocks include: The auxiliary test data set construction unit is used to obtain all historical data of adjustable loads to form a load-assisted training time series. The load-assisted training time series is clustered using the K-medoids method to determine the data category. Based on the clustering cost function, the elbow inflection point determination method is used to optimize the data category. The clusters corresponding to the optimized data categories serve as the auxiliary test data set. The test data set construction unit is used to obtain the real-time value of the adjustable load to form a load training time series, and cluster the load training time series using the K-medoids method; with the goal of minimizing the clustering cost function, the clustering categories of the load training time series are matched with the optimized data categories, and the cluster clusters of the load training time series with matching categories are used as the test data set.

15. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1 to 12.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Short-term load prediction method and system based on ARIMA and CNN-LSTM combined model

    CN118644096A

  • Adjustable electrical load characteristic analysis and prediction method and system based on machine learning

    CN119886542A