A user power consumption load prediction method
By combining the k-Graph and DDTW algorithms with the Times2D model, a user electricity load prediction method was developed, which solved the problem of low prediction accuracy and achieved accurate prediction for different types of users and improved model stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING INSTITUTE OF TECHNOLOGY (ZHUHAI)
- Filing Date
- 2026-03-02
- Publication Date
- 2026-06-23
AI Technical Summary
Existing methods for predicting user electricity load have limitations such as low accuracy, difficulty in accurately classifying different types of users, inability to remove noise and outliers, and inability to fully exploit the complex temporal relationships in the data, resulting in large errors in the prediction results.
The k-Graph univariate time series clustering algorithm is used to cluster the historical electricity load data of users. The DDTW algorithm is used to select training samples and the Time2D model is used for training to build a user electricity load prediction model. The load characteristics are captured and predicted through periodic decomposition, derivative heatmap module and aggregation module.
It achieves accurate prediction of electricity consumption patterns for different types of users, improves prediction accuracy and model stability, and has strong generalization ability and anti-interference ability.
Smart Images

Figure CN121813337B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity, and more particularly to a method for predicting user electricity load. Background Technology
[0002] In existing power systems, user electricity load is affected by multiple factors such as season, time of day, and user type, exhibiting complex time-series characteristics. Existing methods for predicting user electricity consumption patterns can be categorized into four types: traditional statistical models, machine learning models, deep learning models, and hybrid models. Traditional models are suitable for simple scenarios, machine learning and deep learning perform well in complex nonlinear problems, while hybrid models compensate for the shortcomings of single models by combining the strengths of different types of models.
[0003] Existing methods for predicting user electricity consumption patterns mostly rely on single-algorithm models, which have significant drawbacks. First, existing single algorithms struggle to accurately classify user load types and cannot develop differentiated prediction strategies based on different load characteristics. This results in poor adaptability of the prediction model to different user types, failing to meet diverse electricity consumption prediction needs. Second, electricity load time-series data commonly contains noise and outliers. Existing methods lack effective sample filtering mechanisms to remove low-quality samples, leading to insufficient purity in the training set and directly impacting the training accuracy of subsequent prediction models. Finally, traditional one-dimensional time-series-based prediction models have limited ability to capture complex time correlations hidden in the data (such as multiple periods, drastic fluctuations, and turning points), failing to fully mine deeper data information. This makes it difficult for the model to accurately fit the changing patterns of electricity load, ultimately resulting in large prediction errors.
[0004] Therefore, existing technologies still need improvement and development. Summary of the Invention
[0005] The first objective of this invention is to provide a method for predicting user electricity load, which aims to solve the technical problem of low accuracy in predicting user electricity load.
[0006] To achieve the above objectives, the solution provided by the present invention is as follows:
[0007] A method for predicting user electricity load includes: acquiring historical one-dimensional electricity load time series data of users, and clustering the historical one-dimensional electricity load time series data of users based on the k-Graph univariate time series clustering algorithm to obtain multiple groups of user load samples of different categories; based on the DDTW algorithm, selecting user load samples with similarity higher than a preset similarity threshold from each group of user load samples of different categories as training samples, and using the training samples to construct a training set; using the training set to train a pre-constructed Times2D model to obtain a user electricity load prediction model; acquiring recent electricity load data of target users, and inputting the recent electricity load data of target users into the user electricity load prediction model to obtain the predicted electricity load of target users.
[0008] Preferably, the step of acquiring historical one-dimensional electricity load time series data of users and clustering the historical one-dimensional electricity load time series data of users based on the k-Graph univariate time series clustering algorithm to obtain multiple sets of user load samples of different categories includes: acquiring historical one-dimensional electricity load time series data of users; generating multiple directed graphs of different subsequence lengths based on the historical one-dimensional electricity load time series data of users; the nodes of the directed graphs correspond to the feature points of the historical one-dimensional electricity load time series data of users; and the edges of the directed graphs correspond to the time correlation and load change relationship between the feature points; for each directed graph, extracting... The node, edge, and degree features of the user's historical one-dimensional electricity load time series data are analyzed, and a feature matrix of a directed graph is constructed based on these features. The k-Means algorithm based on Euclidean distance is used to cluster the feature matrix of the directed graph, obtaining clustering results corresponding to each directed graph. A consensus matrix is constructed and used as a similarity matrix. The spectral clustering algorithm is then used to cluster the cluster groups corresponding to each directed graph, resulting in multiple groups of user load samples of different categories. The consensus matrix represents the frequency with which two time series are assigned to the same cluster in multiple clustering results.
[0009] Preferably, the node feature is the number of times the user's historical one-dimensional electricity load time series data passes through each node of the corresponding directed graph, the edge feature is the number of times the user's historical one-dimensional electricity load time series data passes through each edge of the corresponding directed graph, and the degree feature is the degree of each node in the directed graph corresponding to the user's historical one-dimensional electricity load time series data.
[0010] Preferably, the step of using the k-Means algorithm based on Euclidean distance to cluster the feature matrix of the directed graph to obtain the clustering result corresponding to each directed graph further includes: standardizing the feature matrix of the directed graph to obtain a standardized feature matrix.
[0011] Preferably, the step of using the DDTW algorithm to select user load samples with similarity higher than a preset similarity threshold from each group of user load samples of different categories as training samples, and using the training samples to construct a training set, includes: for each group of user load samples of different categories, calculating the first derivative for each user load sample in the group to obtain the corresponding derivative sequence; calculating the mean sequence of all derivative sequences, and using the mean sequence as the standard shape sequence for the corresponding category; calculating the similarity between the derivative sequence and the standard shape sequence corresponding to each user load sample using a dynamic time warping algorithm; using user load samples with similarity higher than the preset similarity threshold as training samples, and using the training samples to construct a training set.
[0012] Preferably, the step of training the pre-built Times2D model using the training set to obtain the user electricity load prediction model includes: converting the training samples in the training set into standard tensor samples; inputting the standard tensor samples into the pre-built Times2D model for training; during the training process, calculating the loss between the predicted value and the actual load value; and based on the loss between the predicted value and the actual load value, iteratively updating all parameters in the Times2D model through the backpropagation algorithm and optimizer until the Times2D model reaches a preset number of training rounds to obtain the load prediction model.
[0013] Preferably, the user electricity load prediction model includes a periodic decomposition module, a first- and second-order derivative heatmap module, and an aggregation module. The periodic decomposition module is used to receive standard tensor samples to capture the periodic characteristics of the standard tensor samples. The first- and second-order derivative heatmap module is used to receive standard tensor samples to capture the abrupt changes and transitions of the standard tensor samples. The aggregation module is used to fuse the periodic characteristics and the abrupt changes and transitions, and output the predicted electricity load based on the fused characteristics.
[0014] Preferably, the periodic decomposition module performs a fast Fourier transform on the standard tensor samples and identifies the dominant period that plays a leading role in the sequence variation by analyzing the amplitude spectrum. Then, based on the identified dominant period, the standard tensor samples are reconstructed into 2D tensors, and complex features within and between periods are extracted from the reconstructed 2D tensors to obtain optimized 2D feature tensors. Finally, the optimized 2D feature tensors are converted into new one-dimensional tensors as periodic features of training samples.
[0015] Preferably, the first and second derivative heatmap module performs time-step numerical calculations on the standard tensor sample to obtain the first and second derivatives corresponding to the standard tensor sample. Then, a 2D heatmap is constructed based on the first and second derivatives, and structured features are extracted from the 2D heatmap. Finally, the extracted features are converted into a new one-dimensional tensor as the mutation and transition features of the training sample.
[0016] Preferably, the aggregation module uses an element-wise summation method to fuse periodic features and mutation and transition features to obtain fused features.
[0017] In this scheme, the k-Graph univariate time series clustering algorithm is used to achieve accurate clustering of user load, ensuring that samples of the same type have consistent electricity consumption patterns, laying the foundation for differentiated modeling. At the same time, by introducing the DDTW sample screening mechanism, the interference of noise and outliers is effectively eliminated, constructing a high-purity training set and improving data quality from the source. In addition, through the two-dimensional feature transformation capability of the Times2D model, complex features such as multi-periodicity, violent fluctuations and turning points that are difficult to capture in one-dimensional time series are transformed into spatially identifiable patterns for in-depth mining. The deep integration of multiple algorithms not only solves the pain points of inaccurate load classification, uneven sample quality and insufficient capture of complex features in traditional prediction methods, but also ensures the efficiency and stability of model training, while strengthening the adaptability to the electricity consumption patterns of different types of users. Ultimately, it achieves accurate prediction of the electricity load of target users and has strong generalization and anti-interference capabilities. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0019] Figure 1 This is a flowchart of the user electricity load prediction method provided in the embodiments of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0021] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0022] It should also be noted that when a component is described as "fixed to" or "set on" another component, it can be directly on the other component or there may be an intervening component present. When a component is described as "connected to" another component, it can be directly connected to the other component or there may be an intervening component present.
[0023] Furthermore, the use of terms such as "first" and "second" in this invention is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of a person skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0024] like Figure 1 As shown, this is a user electricity load prediction method according to an embodiment of the present invention.
[0025] Please see Figure 1 As shown, the user electricity load prediction method of this invention includes:
[0026] S101. Obtain the historical one-dimensional electricity load time series data of users, and cluster the historical one-dimensional electricity load time series data of users based on the k-Graph univariate time series clustering algorithm to obtain multiple sets of user load samples of different categories.
[0027] S102. Based on the DDTW algorithm, select user load samples with similarity higher than the preset similarity threshold from each group of user load samples of different categories as training samples, and use the training samples to construct a training set;
[0028] S103. Use the training set to train the pre-built Times2D model to obtain the user electricity load prediction model.
[0029] S104. Obtain the recent electricity load data of the target user and input the recent electricity load data of the target user into the user electricity load prediction model to obtain the predicted electricity load of the target user.
[0030] In this embodiment, step S101 involves acquiring historical one-dimensional electricity load time series data of users, and clustering the historical one-dimensional electricity load time series data of users based on the k-Graph univariate time series clustering algorithm to obtain multiple sets of user load samples of different categories. This includes: acquiring historical one-dimensional electricity load time series data of users, generating multiple directed graphs with different subsequence lengths based on the historical one-dimensional electricity load time series data of users, where the nodes of the directed graph correspond to the feature points of the historical one-dimensional electricity load time series data of users, and the edges of the directed graph correspond to the time correlation and load change relationship between the feature points; for each For directed graphs, node features, edge features, and degree features are extracted from the historical one-dimensional electricity load time series data of users, and a feature matrix of the directed graph is constructed based on the node features, edge features, and degree features. The k-Means algorithm based on Euclidean distance is used to cluster the feature matrix of the directed graph to obtain the clustering results corresponding to each directed graph. A consensus matrix is constructed and used as a similarity matrix. The spectral clustering algorithm is used to cluster the cluster groups corresponding to each directed graph to obtain multiple groups of user load samples of different categories. The consensus matrix represents the frequency with which two time series are assigned to the same cluster in multiple clustering results.
[0031] In this embodiment, the k-Graph univariate time series clustering algorithm is a graph-based time series clustering method. Its core idea is to transform one-dimensional time series data into a graph structure, and then analyze the graph structure to discover similarities between time series, thereby completing the clustering.
[0032] In this embodiment, the node feature is the number of times the user's historical one-dimensional electricity load time series data passes through each node of the corresponding directed graph, the edge feature is the number of times the user's historical one-dimensional electricity load time series data passes through each edge of the corresponding directed graph, and the degree feature is the degree of each node in the directed graph corresponding to the user's historical one-dimensional electricity load time series data.
[0033] In this embodiment, when generating directed graphs with multiple subsequence lengths, for a given subsequence length l, all continuous subsequences of length l in the user's historical one-dimensional electricity load time series data are defined as nodes in the directed graph. For any two nodes, if their corresponding subsequences have a temporal succession relationship in the original time series, a directed edge is established between these two nodes. The edge weight is used to quantify the correlation strength between the two subsequences, and its calculation method can be one of the following: calculating the mean absolute value of the difference between the load values of corresponding points of the two subsequences to characterize the load change; or calculating the cosine similarity of the two subsequences to characterize their morphological similarity.
[0034] In this embodiment, the k-Means algorithm based on Euclidean distance is used to cluster the feature matrix of the directed graph to obtain the clustering result corresponding to each directed graph. Before that, the feature matrix of the directed graph is standardized to obtain a standardized feature matrix.
[0035] In the constructed feature matrix, the node features, edge features, and degree features typically have different dimensions and numerical ranges. For example, the node feature (the number of times a node is traversed) may accumulate to thousands of times, while the degree feature (the degree of a node) may only be a single digit. If the k-Means algorithm based on Euclidean distance is used directly on such non-standardized data, features with large numerical ranges will dominate the distance calculation, while the influence of features with small numerical ranges will be masked, resulting in distorted clustering results.
[0036] To address the aforementioned issues, the Z-score normalization method is employed to process the feature matrix. This method processes each feature dimension (i.e., each column of the matrix) independently, transforming it into a distribution with a mean of 0 and a standard deviation of 1. Normalization typically accelerates the convergence speed of gradient descent algorithms such as k-Means and helps obtain more stable and reasonable clustering results.
[0037] In this embodiment, for general electricity load forecasting scenarios without special accuracy requirements, the subsequence length l is set to a range of 4-8 hours, generating 5 directed graphs with different subsequence lengths. For each directed graph, 3 feature matrices are constructed. Euclidean distance is used as a similarity measure, and the feature matrices are clustered using the k-Means algorithm (k=3) to obtain 5 clustering results. Finally, multiple sets of user load samples of different categories are obtained, namely residential user load samples, commercial user load samples, and industrial user load samples.
[0038] For residential electricity consumption with significant daily peak-valley differences and greatly affected by weekends / weekdays and seasons, when using k-Graph clustering, the subsequence length l is set to a range of 6-10 hours, and it is divided into four categories: weekday peak, weekday valley, weekend peak, and weekend valley.
[0039] For users with distributed photovoltaic / wind power installations, load data may show negative loads and is greatly affected by sunlight / wind, with significant load fluctuations during the day. The user's historical one-dimensional electricity load time series data is clustered into three categories: original electricity load, renewable energy generation load, and net load. If the user has installed distributed photovoltaic power, the subsequence length *l* in k-Graph clustering must cover the sunlight period, i.e., the peak renewable energy generation period, typically 8-12 hours.
[0040] In this embodiment, the user's historical one-dimensional electricity load time series data can be preprocessed, and then the preprocessed user's historical one-dimensional electricity load time series data can be used to generate directed graphs with multiple subsequence lengths.
[0041] In this embodiment, the core of constructing the consensus matrix is to count the frequency of two time series in the same cluster in all clustering results and normalize it, ultimately forming a symmetric matrix that characterizes the similarity of samples.
[0042] Suppose we obtain M clustering results, each corresponding to a different subsequence length, and N time series samples to be clustered (one-dimensional historical electricity load time series data of users). Then, the consensus matrix is an N×N symmetric matrix MC. Each element MC[i,j] in this matrix represents the frequency at which the i-th time series and the j-th time series are assigned to the same cluster in these M clustering results.
[0043] In this embodiment, in step S102, based on the DDTW algorithm, user load samples with similarity higher than a preset similarity threshold are selected from each group of user load samples of different categories as training samples, and a training set is constructed using the training samples. This includes: calculating the first derivative for each user load sample in each group of user load samples of different categories to obtain the corresponding derivative sequence; calculating the mean sequence of all derivative sequences and using the mean sequence as the standard shape sequence for the corresponding category; calculating the similarity between the derivative sequence and the standard shape sequence corresponding to each user load sample using the dynamic time warping algorithm; and using user load samples with similarity higher than a preset similarity threshold as training samples to construct a training set.
[0044] In this embodiment, the DDTW algorithm refers to the derivative dynamic time warping algorithm, which is an optimized extension of the traditional DTW (Dynamic Time Warping) algorithm. Its core is to extract sequence shape information by introducing derivatives, weakening the interference of absolute numerical values and noise, and more accurately quantifying the similarity of the change patterns of two time series. The core commonality of electricity loads of similar users is the consistency of their electricity consumption behavior patterns (such as the rhythm of changes during morning and evening peak hours), rather than the consistency of absolute load values. DDTW, by using derivatives to remove numerical interference, can accurately identify similar samples with the same source of change patterns, avoiding misjudging similar samples with different load levels as dissimilar.
[0045] In this embodiment, the preset similarity threshold is set according to the electricity consumption scenario. In the basic scenario, the preset similarity threshold is 0.8. In the scenario containing distributed new energy, the preset similarity threshold can be lowered to 0.7-0.75 to retain fluctuating feature samples.
[0046] In this embodiment, step S103 involves training a pre-built Times2D model using a training set to obtain a user electricity load prediction model. This includes: converting training samples in the training set into standard tensor samples; inputting the standard tensor samples into the pre-built Times2D model for training; calculating the loss between the predicted value and the actual load value during the training process; and iteratively updating all parameters in the Times2D model based on the loss between the predicted value and the actual load value using a backpropagation algorithm and an optimizer, until the Times2D model reaches a preset number of training rounds to obtain the load prediction model.
[0047] In this embodiment, the user electricity load prediction model includes a periodic decomposition module, a first-order and second-order derivative heatmap module, and an aggregation module. The periodic decomposition module is used to receive standard tensor samples to capture the periodic characteristics of the standard tensor samples. The first-order and second-order derivative heatmap module is used to receive standard tensor samples to capture the abrupt change and transition characteristics of the standard tensor samples. The aggregation module is used to fuse the periodic characteristics and the abrupt change and transition characteristics, and output the predicted electricity load based on the fused characteristics.
[0048] In this embodiment, the inputs to the periodicity decomposition module and the first- and second-order derivative heatmap module are both standard tensor samples.
[0049] In this embodiment, the periodicity decomposition module performs a Fast Fourier Transform (FFT) on the standard tensor samples, transforming them from the time domain to the frequency domain. By analyzing the amplitude spectrum, it identifies one or more key periods that dominate the sequence variation, i.e., the dominant periods. Then, based on the identified dominant periods, the standard tensor samples are reconstructed into a 2D tensor, where one dimension represents the time within the period, and the other dimension represents the number of periods (e.g., reconstructing 30 days of data into a 30-row × 24-column matrix with a 24-hour period). Finally, a first 2D convolutional layer is used to extract complex features within the period (e.g., correlations between hours) and between periods (e.g., correlations between different days) from the reconstructed 2D tensor, obtaining an optimized 2D feature tensor. This optimized 2D feature tensor is then converted into a new one-dimensional tensor, i.e., the periodic features of the training samples.
[0050] In this embodiment, the first-order and second-order derivative heatmap module performs time-step numerical calculations on the standard tensor samples to obtain their first-order and second-order derivatives. After appropriately padding the obtained first-order and second-order derivative tensors with zeros, they are stacked along a new channel dimension to form a 2D heatmap. This transforms abrupt changes that are difficult to analyze intuitively in the temporal domain into spatially distinguishable visual features. Finally, a second 2D convolutional layer is used to extract structured features from the 2D heatmap and convert the extracted features into a new one-dimensional tensor, namely the abrupt changes and transition features of the training samples.
[0051] Specifically, the first derivative is used to quantify the rate of change of load at each time point, reflecting drastic fluctuations, while the second derivative is used to quantify the change in the rate of change of load, reflecting turning points.
[0052] In this embodiment, the aggregation module fuses periodic features and abrupt change / turning point features using an element-wise summation method to obtain fused features. These fused features are then mapped to the final prediction result (e.g., the electricity load value for the next 24 hours) through one or more fully connected layers. The features extracted from the two paths represent the macroscopic regularity and microscopic dynamics of the data, respectively. By fusing them through the aggregation module, the model can simultaneously grasp the inertia and abrupt changes in load, thereby making more accurate predictions.
[0053] In this embodiment, the element-wise summation method can directly superimpose the feature values at corresponding positions, thereby achieving effective information integration.
[0054] In this embodiment, in step S104, the recent electricity load data of the target user is obtained, and it is converted into tensor data to be predicted that conforms to the input format of the user electricity load prediction model. The tensor data to be predicted is input into the user electricity load prediction model. The user electricity load prediction model performs forward calculation through its internal periodic decomposition module, derivative heatmap module and aggregation module, and outputs the predicted electricity load value of the target user at one or more future time points, such as the predicted electricity load in the next 7 days.
[0055] In this embodiment, the k-Graph univariate time series clustering algorithm is used to achieve accurate clustering of user load, ensuring that samples of the same type have consistent electricity consumption patterns, laying the foundation for differentiated modeling. At the same time, by introducing the DDTW sample screening mechanism, the interference of noise and outliers is effectively eliminated, constructing a high-purity training set and improving data quality from the source. In addition, through the two-dimensional feature transformation capability of the Times2D model, complex features such as multi-periodicity, violent fluctuations and turning points that are difficult to capture in one-dimensional time series are transformed into spatially identifiable patterns for in-depth mining. The deep integration of multiple algorithms not only solves the pain points of inaccurate load classification, uneven sample quality and insufficient capture of complex features in traditional prediction methods, but also ensures the efficiency and stability of model training, while strengthening the adaptability to the electricity consumption patterns of different categories of users. Ultimately, it achieves accurate prediction of the electricity load of target users and has strong generalization and anti-interference capabilities.
[0056] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural transformations made using the contents of the present invention's specification and drawings under the inventive concept of the present invention, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present invention.
Claims
1. A user's electric power load forecasting method characterized by comprising: include: The historical one-dimensional electricity load time series data of users is obtained, and the user historical one-dimensional electricity load time series data is clustered based on the k-Graph univariate time series clustering algorithm to obtain multiple sets of user load samples of different categories. Based on the DDTW algorithm, user load samples with similarity higher than a preset similarity threshold are selected from each group of user load samples of different categories as training samples, and the training samples are used to construct a training set; The pre-built Times2D model is trained using the training set to obtain a user electricity load prediction model. Obtain recent electricity load data of target users and input the recent electricity load data of target users into the user electricity load prediction model to obtain the predicted electricity load of target users; The process involves acquiring historical one-dimensional electricity load time series data of users and clustering this data using a k-Graph univariate time series clustering algorithm to obtain multiple sets of user load samples of different categories. This includes: acquiring historical one-dimensional electricity load time series data of users; generating multiple directed graphs with different subsequence lengths based on the historical one-dimensional electricity load time series data; the nodes of the directed graphs corresponding to feature points in the historical one-dimensional electricity load time series data; and the edges of the directed graphs corresponding to the time correlation and load change relationships between feature points. For each directed graph, user load data is extracted. The node, edge, and degree features of historical one-dimensional electricity load time series data are analyzed, and a feature matrix of a directed graph is constructed based on these features. The k-Means algorithm based on Euclidean distance is used to cluster the feature matrix of the directed graph, obtaining clustering results corresponding to each directed graph. A consensus matrix is constructed and used as a similarity matrix. A spectral clustering algorithm is then used to cluster the clusters corresponding to each directed graph, obtaining multiple groups of user load samples of different categories. The consensus matrix represents the frequency with which two time series are assigned to the same cluster in multiple clustering results. The DDTW algorithm-based method selects user load samples with similarity higher than a preset similarity threshold from each group of user load samples of different categories as training samples, and uses the training samples to construct a training set. This includes: calculating the first derivative for each user load sample within each group of user load samples of different categories to obtain the corresponding derivative sequence; calculating the mean sequence of all derivative sequences and using the mean sequence as the standard shape sequence for the corresponding category; calculating the similarity between the derivative sequence and the standard shape sequence corresponding to each user load sample using a dynamic time warping algorithm; and using user load samples with similarity higher than the preset similarity threshold as training samples to construct a training set.
2. The user's electric power load forecasting method according to claim 1, characterized by, The node feature is the number of times the user's historical one-dimensional electricity load time series data passes through each node of the corresponding directed graph; the edge feature is the number of times the user's historical one-dimensional electricity load time series data passes through each edge of the corresponding directed graph; and the degree feature is the degree of each node in the directed graph corresponding to the user's historical one-dimensional electricity load time series data.
3. The user's electric load prediction method according to claim 1, wherein The step of using the k-Means algorithm based on Euclidean distance to cluster the feature matrix of the directed graph to obtain the clustering result corresponding to each directed graph also includes: standardizing the feature matrix of the directed graph to obtain a standardized feature matrix.
4. The user electricity load forecasting method as described in claim 1, characterized in that, The step of training a pre-built Times2D model using the training set to obtain a user electricity load prediction model includes: Convert the training samples in the training set into standard tensor samples; The standard tensor samples are input into the pre-built Times2D model for training. During the training process, the loss between the predicted value and the actual load value is calculated. Based on the loss between the predicted value and the actual load value, all parameters in the Times2D model are iteratively updated through the backpropagation algorithm and optimizer until the Times2D model reaches the preset training rounds, thus obtaining the load prediction model.
5. The user electricity load forecasting method as described in claim 4, characterized in that, The user electricity load prediction model includes a periodic decomposition module, a first- and second-order derivative heatmap module, and an aggregation module. The periodic decomposition module is used to receive standard tensor samples to capture the periodic characteristics of the standard tensor samples. The first- and second-order derivative heatmap module is used to receive standard tensor samples to capture the abrupt change and transition characteristics of the standard tensor samples. The aggregation module is used to fuse the periodic characteristics and the abrupt change and transition characteristics, and output the predicted electricity load based on the fused characteristics.
6. The user electricity load forecasting method as described in claim 5, characterized in that, The periodic decomposition module performs a fast Fourier transform on the standard tensor samples and identifies the dominant period that plays a leading role in the sequence variation by analyzing the amplitude spectrum. Then, based on the identified dominant period, the standard tensor samples are reconstructed into 2D tensors. Complex features within and between periods are extracted from the reconstructed 2D tensors to obtain an optimized 2D feature tensor. Finally, the optimized 2D feature tensor is converted into a new one-dimensional tensor as the periodic feature of the training samples.
7. The user electricity load forecasting method as described in claim 5, characterized in that, The first and second derivative heatmap module performs time-step numerical calculations on the standard tensor sample to obtain the first and second derivatives corresponding to the standard tensor sample. Then, a 2D heatmap is constructed based on the first and second derivatives, and structured features are extracted from the 2D heatmap. Finally, the extracted features are converted into a new one-dimensional tensor as the mutation and transition features of the training sample.
8. The user electricity load forecasting method as described in claim 5, characterized in that, The aggregation module uses an element-wise summation method to fuse periodic features and mutation and transition features to obtain fused features.