Power load forecasting method, model training method, electronic device and storage medium

By classifying and clustering the power load data in multiple station areas and adjusting the parameters of the power load prediction model, the problems of large hardware resource consumption and low prediction accuracy in the prior art are solved, and more efficient power load prediction is achieved.

CN119051005BActive Publication Date: 2025-08-05STATE GRID BEIJING ELECTRIC POWER CO +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411160409.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2025-08-05
Estimated Expiration
2044-08-22

AI Technical Summary

Technical Problem

In the prior art, the model and its parameters are individually trained for each station area to predict power load, resulting in huge hardware resource consumption, and when using model parameters of similar station areas for prediction, the accuracy of power load prediction is reduced.

Method used

By obtaining the power load data of multiple sample station areas, determining the preset sliding window and prediction step size, generating training data and prediction label pairs, extracting spectrum characteristics and threshold curves, classifying and clustering, and adjusting the parameters of the power load prediction model to classify similar station areas into the same category, and optimizing model training.

Benefits of technology

It reduces the time and overhead of model training, improves the performance and accuracy of the power load prediction model, and can effectively improve the prediction accuracy rate for unpredicted station areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119051005B_ABST
    Figure CN119051005B_ABST
Patent Text Reader

Abstract

The present application discloses a power load forecasting method, a model training method, an electronic device, and a storage medium. The method obtains sample power load data of a sample substation, obtains multiple sample training data and prediction label pairs corresponding to each sample training data based on a preset sliding window, a prediction step size, and the sample power load data, then classifies and clusters each sample substation to obtain multiple second substation sets. The parameters of the power load forecasting model are adjusted based on the prediction label pairs and the number of label pairs corresponding to each sample substation in the second substation set. The parameters of the power load forecasting model can be adjusted based on substations of the same category, thereby improving the training effect of the power load forecasting model. Subsequently, when the power load forecasting model is used to forecast the load of a target substation, the accuracy of the forecast can be effectively improved even for power load data of substations that have not been forecasted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of power systems, and in particular to a power load forecasting method, a model training method, an electronic device, and a storage medium. Background Art

[0002] The power supply range or area of a transformer in the power system is defined as a substation. Accurate prediction of the power load in the substation helps to predict the local operating status of the power grid in advance, so as to deal with possible regional power outages in advance. In recent years, the number of substations in the power grid has been huge. In related technologies, a model and its supporting parameters are usually trained separately for each substation to predict the power load of the substation, but this will consume huge hardware resources and limit the practical application value of substation load prediction. In actual scenarios, the power loads of many substations meet similar time series rules, and substations with similar time series characteristics can use a common model to reduce hardware and time overhead. However, if there are multiple similar substations, and the model and its parameters trained by the data set corresponding to one of the multiple similar substations are used to predict the power load of multiple other similar substations, the accuracy of the substation power load prediction will be reduced.

[0003] Application Contents

[0004] In view of this, the embodiments of the present application provide a power load forecasting method, a model training method, an electronic device and a storage medium, which can improve the accuracy of power load forecasting in a substation.

[0005] In a first aspect, an embodiment of the present application provides a method for predicting power load, comprising:

[0006] Obtaining sample power load data for a plurality of sample substations;

[0007] Determining a preset sliding window and a prediction step size, and obtaining a plurality of sample training data and a prediction label pair corresponding to each of the sample training data based on the preset sliding window, the prediction step size, and the sample power load data;

[0008] Obtaining a frequency spectrum characteristic and a threshold curve of the sample training data based on the sample training data;

[0009] Obtaining a target feature sequence according to the spectrum characteristics and threshold curve of the sample training data;

[0010] Classifying each of the sample substations according to the sample power load data to obtain a plurality of first substation sets;

[0011] Clustering the sample stations in the first station area set according to the target feature sequence to obtain a plurality of second station area sets;

[0012] Determining the number of predicted label pairs corresponding to all the sample substations in the second substation set, and adjusting the parameters of the power load prediction model according to the predicted label pairs corresponding to each of the sample substations in the second substation set and the number of label pairs;

[0013] The power load data to be predicted of the target substation is obtained, and the power load data to be predicted is input into the power load prediction model after parameter adjustment to obtain the load prediction data of the target substation.

[0014] In an optional embodiment, obtaining a target feature sequence based on the spectral features and the threshold curve of the sample training data includes:

[0015] Screening the frequency spectrum features of the sample training data based on the threshold curve to obtain a base frequency feature;

[0016] Perform inverse Fourier transform on the base frequency features to obtain a target feature sequence.

[0017] In an optional implementation, obtaining the spectrum characteristics and threshold curve of the sample training data based on the sample training data includes:

[0018] Performing discrete Fourier transform on each of the sample training data to obtain a frequency spectrum feature of each of the sample training data;

[0019] Calculating the maximum amplitude of each of the spectral features;

[0020] A threshold curve is generated based on all of the maximum amplitudes.

[0021] In an optional embodiment, clustering the sample stations in the first station area set according to the target feature sequence to obtain a plurality of second station area sets includes:

[0022] Calculating similarities between different sample stations in the first station area set based on target feature sequences corresponding to the sample stations in the first station area set to obtain a similarity matrix;

[0023] Obtaining a Laplace matrix according to the similarity matrix;

[0024] Performing eigendecomposition on the Laplace matrix to obtain a plurality of eigenvectors;

[0025] Obtaining a preset number of target eigenvectors from the plurality of eigenvectors to obtain an eigenvector matrix;

[0026] The eigenvector matrix is clustered based on the K-means algorithm to obtain multiple second station area sets.

[0027] In an optional embodiment, the classifying the sample substations according to the sample power load data to obtain a plurality of first substation sets includes:

[0028] Calculating the load fluctuation range corresponding to the sample area according to the sample power load data;

[0029] The sample stations are classified according to the load fluctuation range to obtain a plurality of first station sets.

[0030] In an optional embodiment, adjusting the parameters of the power load prediction model according to the prediction label pairs corresponding to each of the sample substations in the second substation set and the number of the label pairs includes:

[0031] Determining a first loss value of the power load forecasting model according to the predicted label pairs corresponding to each of the sample substations in the second substation set and the number of the label pairs;

[0032] According to the first loss value, the parameters of the power load prediction model are adjusted.

[0033] In an optional embodiment, the method further includes:

[0034] Saving the parameters of the power load forecasting model after each adjustment;

[0035] Calculating a regularization term based on the previously adjusted parameters of the power load forecasting model and the currently adjusted parameters of the power load forecasting model;

[0036] Obtaining a second loss value according to the regularization term and the first loss value;

[0037] Parameters of the power load forecasting model are adjusted according to the second loss value.

[0038] In a second aspect, an embodiment of the present application provides a model training method, comprising:

[0039] Obtaining sample power load data for a plurality of sample substations;

[0040] Determining a preset sliding window and a prediction step size, and obtaining a plurality of sample training data and a prediction label pair corresponding to each of the sample training data based on the preset sliding window, the prediction step size, and the sample power load data;

[0041] Obtaining a frequency spectrum characteristic and a threshold curve of the sample training data based on the sample training data;

[0042] Obtaining a target feature sequence according to the spectrum characteristics and threshold curve of the sample training data;

[0043] Classifying each of the sample substations according to the sample power load data to obtain a plurality of first substation sets;

[0044] Clustering the sample stations in the first station area set according to the target feature sequence to obtain a plurality of second station area sets;

[0045] The number of predicted label pairs corresponding to all the sample substations in the second substation set is determined, and the parameters of the power load prediction model are adjusted according to the predicted label pairs corresponding to each of the sample substations in the second substation set and the number of label pairs.

[0046] In a third aspect, an embodiment of the present application further provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the power load prediction method or model training method as described above is implemented.

[0047] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the power load forecasting method or model training method as described above.

[0048] The embodiments of the present application include at least the following beneficial effects: by obtaining sample power load data of multiple sample substations, determining a preset sliding window and a prediction step size, and obtaining multiple sample training data and prediction label pairs corresponding to each sample training data based on the preset sliding window, the prediction step size, and the sample power load data, it is possible to prepare for the subsequent adjustment of model parameters; then, based on the sample training data, the spectrum characteristics and threshold curve of the sample training data are obtained, and according to the spectrum characteristics and threshold curve of the sample training data, the target feature sequence is obtained, which can efficiently extract the important frequency components of the power load data; then, each sample substation is classified according to the sample power load data to obtain multiple first substations. The method is to cluster the sample substations in the first substation set according to the target feature sequence to obtain multiple second substation sets, which can classify substations with similar load characteristics into the same category; then, by determining the number of predicted label pairs corresponding to all sample substations in the second substation set, and adjusting the parameters of the power load forecasting model according to the predicted label pairs and the number of label pairs corresponding to each sample substation in the second substation set, the parameters of the power load forecasting model can be adjusted based on substations of the same category, reducing the time and cost of model training, while also improving the training effect of the power load forecasting model and the effect of reinforcement learning, thereby further improving the model performance of the power load forecasting model. When the power load forecasting model is subsequently used to forecast the load of the target substation, the prediction accuracy can be effectively improved even for the power load data of substations that have not been predicted. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The drawings that constitute part of this application are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation on this application. In the drawings:

[0050] Figure 1 A flowchart of a method for predicting power load provided in one embodiment of the present application;

[0051] Figure 2 A flowchart of a power load forecasting method provided in another embodiment of the present application;

[0052] Figure 3 A flowchart of a power load forecasting method provided in another embodiment of the present application;

[0053] Figure 4 A flowchart of a power load forecasting method provided in another embodiment of the present application;

[0054] Figure 5 A flowchart of a power load forecasting method provided in another embodiment of the present application;

[0055] Figure 6 A flowchart of a power load forecasting method provided in another embodiment of the present application;

[0056] Figure 7 A target feature sequence diagram corresponding to sample power load data provided in one embodiment of the present application;

[0057] Figure 8 An original feature sequence diagram corresponding to the sample power load data provided in one embodiment of the present application;

[0058] Figure 9 A residual sequence diagram corresponding to sample power load data provided in one embodiment of the present application;

[0059] Figure 10 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other.

[0061] The following detailed descriptions are all exemplary descriptions and are intended to provide further detailed descriptions of the present application. Unless otherwise specified, all technical terms used in this application have the same meanings as those commonly understood by those skilled in the art to which this application belongs. The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit the exemplary embodiments according to this application.

[0062] It should be understood that in the description of the embodiments of the present application, if there is a description of "first", "second", etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features. "At least one" means one or more, "more than" means more than two, greater than, less than, exceed, etc. are understood to exclude the number itself, above, below, within, etc. are understood to include the number itself, and "several" means one or more, unless otherwise clearly and specifically defined. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. It can be understood that A and / or B can mean the existence of A alone, the existence of A and B at the same time, or the existence of B alone. A and B can be singular or plural.

[0063] It's worth noting that transformers in power systems perform multiple tasks, including voltage conversion, power distribution, and electrical isolation, providing crucial support for the safe operation of power systems. The power supply range or area of a transformer in a power system is defined as a substation. Accurately predicting substation loads helps predict the local operating status of the power grid and proactively address potential regional power outages. In recent years, the number of substations in power grids has grown significantly. Related technologies typically train a separate model and its associated parameters for each substation to predict the substation's load. However, this consumes significant hardware resources and limits the practical application value of substation load prediction. In real-world scenarios, the loads of many substations exhibit similar time series patterns. Substations with similar time series characteristics can use a common model to reduce hardware and time overhead. However, if a model and its parameters trained on a dataset corresponding to one of these multiple similar substations are used to predict the loads of multiple other similar substations, the accuracy of the substation load prediction will be reduced.

[0064] Based on this, the present application provides a power load prediction method, a model training method, an electronic device and a storage medium, which obtains sample power load data of multiple sample substations, determines a preset sliding window and a prediction step size, and obtains multiple sample training data and prediction label pairs corresponding to each sample training data based on the preset sliding window, prediction step size and sample power load data, which can prepare for the subsequent adjustment of model parameters; then, based on the sample training data, the spectrum characteristics and threshold curve of the sample training data are obtained, and based on the spectrum characteristics and threshold curve of the sample training data, the target feature sequence is obtained, which can efficiently extract the important frequency components of the power load data; then, each sample substation is trained based on the sample power load data. By performing row classification to obtain multiple first substation sets, and clustering the sample substations in the first substation set according to the target feature sequence to obtain multiple second substation sets, substations with similar load characteristics can be classified into the same category; then, by determining the number of predicted label pairs corresponding to all sample substations in the second substation set, the parameters of the power load forecasting model are adjusted according to the predicted label pairs and the number of label pairs corresponding to each sample substation in the second substation set. The parameters of the power load forecasting model can be adjusted based on substations of the same category, reducing the time and cost of model training. At the same time, it can also improve the training effect of the power load forecasting model and the effect of reinforcement learning, thereby further improving the model performance of the power load forecasting model. When the power load forecasting model is subsequently used to forecast the load of the target substation, even the power load data of the substation that has not been predicted can effectively improve the prediction accuracy.

[0065] The embodiments of the present application are further described below with reference to the accompanying drawings.

[0066] like Figure 1 As shown, the embodiment of the present application provides a power load forecasting method, which includes but is not limited to steps S110 to S180:

[0067] Step S110: Obtain sample power load data of a plurality of sample substations.

[0068] The sample power load data may be obtained from power companies, energy management departments, or existing open data sets, and no specific restrictions are imposed here.

[0069] Step S120: determining a preset sliding window and a prediction step size, and obtaining a plurality of sample training data and a prediction label pair corresponding to each sample training data according to the preset sliding window, the prediction step size and the sample power load data.

[0070] After obtaining the sample power load data, the sample power load data can be processed. Specifically, the sample power load data can be preprocessed, that is, the sample power load data can be checked for missing values, outliers, or noise. If so, the sample power load data can be cleaned and processed. Then, the preprocessed sample power load data can be integrated, that is, the sample power load data of each sample substation can be integrated into a unified dataset. This can be in a table format, where each column represents a sample substation and each row represents a timestamp, recording the sample power load data of each sample substation at that time. Next, the integrated sample power load data can be stored, that is, the integrated dataset can be saved to a suitable data storage medium, such as a CSV file or database, for subsequent analysis and processing. Next, the integrated sample power load data can be verified, that is, the integrity and accuracy of the integrated dataset can be verified. For example, visualization tools or statistical analysis can be used to check whether the dataset meets the expected format and content. Finally, the data can be documented, that is, a document is compiled to record information such as the source of the dataset, the meaning of the fields, and the data collection time range for subsequent use and sharing. Through the above steps, the sample power load data of each sample substation can be integrated into a unified data set, preparing for subsequent analysis and modeling work.

[0071] The preset sliding window size determines the number of data points contained within each preset sliding window. The choice of preset sliding window size can be determined based on specific circumstances and requirements. Common choices include different time granularities such as hours, days, and weeks.

[0072] The preset step size is the number of data points that the sliding window moves forward each time. The choice of the preset step size can affect the number and overlap of generated prediction label pairs and needs to be adjusted based on the specific situation. A prediction label pair consists of sample training data and the corresponding prediction label for that sample training data.

[0073] Based on a preset sliding window, prediction step size, and sample power load data, multiple sample training data and corresponding prediction label pairs are obtained. Specifically, for each sample power load data (or dataset), a preset sliding window is slid from the starting position, moving forward by a preset step size each time. Within each preset sliding window, consecutive data points constitute a sample training data set. For each data set within the preset sliding window (i.e., sample training data), prediction labels need to be defined. These prediction labels can be defined based on the specific task, such as predicting the power load for the next time period. In time series forecasting, a common approach is to use lagged values as prediction labels and generate prediction label pairs using the sample training data and the prediction labels. Similarly, the sample power load data is traversed using the preset sliding window and preset step size until the entire sample power load data set is traversed, resulting in multiple sample training data and corresponding prediction label pairs. Finally, the generated multiple sample training data and corresponding prediction label pairs can be stored to form a training set. Through the above steps, prediction label pairs can be constructed for each dataset based on the preset sliding window, preparing for subsequent time series forecasting modeling.

[0074] Step S130: obtaining the spectrum characteristics and threshold curve of the sample training data based on the sample training data.

[0075] The spectral characteristics and threshold curve of the sample training data are obtained based on the sample training data. Specifically, a discrete Fourier transform can be performed on each sample training data to obtain the spectral characteristics of each sample training data, and then the maximum amplitude of each spectral characteristic is calculated. Finally, the threshold curve is generated based on all maximum amplitudes. The discrete Fourier transform can be a fast Fourier transform. By performing a fast Fourier transform on each sample training data, the computational complexity can be reduced.

[0076] For example, for sample training data within a given preset sliding window (i.e., discrete sequence x(n)), its spectral characteristics can be obtained by performing discrete Fourier transform (DFT) on each sample training data, where the discrete Fourier transform is defined as follows:

[0077]

[0078] Where N is the length of the sequence, x(n) is the value of the sequence at the nth sampling point in the time domain, k is the frequency index, and X(k) is the amplitude and phase of the kth frequency component in the frequency domain. In the discrete Fourier transform, spectral features are primarily based on the amplitude of the frequency components. After performing the discrete Fourier transform on each training sample, the amplitude of the frequency components is usually analyzed to determine which frequency components are the primary features.

[0079] Next, for each spectral feature sequence X(k), determine the maximum amplitude value |X max |, that is, find the maximum amplitude in the spectrum and collect all the maximum amplitudes |X max |, the maximum amplitude corresponding to each sample training data |X max |Record it and then construct a threshold curve. For example, you can take the average or median of all maximum amplitudes as the threshold curve ∈, as shown in the following formula:

[0080] ∈=Mean(|X max |) or ∈=Median(|X max |)

[0081] Alternatively, a suitable threshold curve can be determined based on the distribution characteristics of the maximum amplitude, without specific limitation herein. It will be appreciated that the threshold curve serves as a reference for selecting a target feature sequence from the spectral features, i.e., it is used to determine which frequency components in the spectral features are the primary features. Typically, frequency components exceeding the threshold are considered significant and are retained as the primary features.

[0082] Step S140: Obtain a target feature sequence based on the spectrum features of the sample training data and the threshold curve.

[0083] The target feature sequence is the important frequency components retained in the spectral features of the sample training data.

[0084] Step S150: Classify each sample substation according to the sample power load data to obtain a plurality of first substation sets.

[0085] Different first substation sets correspond to different classification categories. It is understood that by classifying multiple sample substations, the parameters of the power load forecasting model can be adjusted based on each first substation set, thereby reducing the number of samples required for a single training run of the power load forecasting model, improving the efficiency of model training, and reducing the cost of model training.

[0086] Step S160: clustering the sample stations in the first station area set according to the target feature sequence to obtain a plurality of second station area sets.

[0087] For example, assume that there are two first station sets, namely first station set A and first station set B, wherein first station set A includes sample station a1, sample station a2, and sample station a3, and first station set B includes sample station b1, sample station b2, and sample station b3. According to the target feature sequence corresponding to the sample stations in the first station set A, the sample stations in the first station set A are clustered to obtain second station set A1 and second station set A2, wherein second station set A1 includes sample station a1 and sample station a3, and second station set A2 includes sample station a2. Similarly, all sample stations in the first station set B are clustered to obtain second station set B1, wherein second station set B1 includes sample station b1, sample station b2, and sample station b3. By clustering the sample stations in the first station set using the target feature sequence, stations with similar load characteristics can be classified into the same category, providing a basis for subsequent analysis and modeling.

[0088] Step S170: Determine the number of predicted label pairs corresponding to all sample substations in the second substation set, and adjust the parameters of the power load prediction model according to the predicted label pairs and the number of label pairs corresponding to each sample substation in the second substation set.

[0089] The power load forecasting model can be a power load forecasting model based on a long short-term memory (LSTM) network. LSTM is a special recurrent neural network (RNN) that excels at processing and predicting sequence data. It can capture dependencies in long time series and is suitable for predicting time series data such as power load. Specifically, the power load forecasting model can include an input layer, an LSTM layer, and an output layer. The LSTM layer can include two LSTM layers to achieve effective processing and learning of sequence data, and the output layer is a fully connected layer.

[0090] For example, assuming that the second station area set includes sample station area a and sample station area b, where sample station area a corresponds to 4 predicted label pairs and sample station area b corresponds to 3 predicted label pairs, then the number of label pairs corresponding to the second station area set is 7.

[0091] Step S180: Obtain the power load data to be predicted of the target substation, input the power load data to be predicted into the power load prediction model after adjusting the parameters, and obtain the load prediction data of the target substation.

[0092] After obtaining the power load data to be predicted, the power load data to be predicted may be processed. For details, please refer to the above-mentioned processing method of the sample power load data, which will not be described in detail here.

[0093] For example, the power load data to be predicted is the power load data of the past three time steps, and the output is the load prediction data for the next time step.

[0094] In an embodiment of the present application, by obtaining sample power load data of multiple sample substations, determining a preset sliding window and a prediction step size, and obtaining multiple sample training data and prediction label pairs corresponding to each sample training data based on the preset sliding window, prediction step size, and sample power load data, preparation can be made for subsequent adjustment of model parameters; then, based on the sample training data, the spectral characteristics and threshold curve of the sample training data are obtained, and based on the spectral characteristics and threshold curve of the sample training data, a target feature sequence is obtained, which can efficiently extract important frequency components of the power load data; then, each sample substation is classified according to the sample power load data to obtain multiple first substation sets, And clustering the sample substations in the first substation set according to the target feature sequence to obtain multiple second substation sets, which can classify substations with similar load characteristics into the same category; then by determining the number of label pairs corresponding to all sample substations in the second substation set, adjusting the parameters of the power load forecasting model according to the predicted label pairs and the number of label pairs corresponding to each sample substation in the second substation set, it is possible to adjust the parameters of the power load forecasting model based on substations of the same category, reducing the time and cost of model training, while also improving the training effect of the power load forecasting model and the effect of reinforcement learning, thereby further improving the model performance of the power load forecasting model. When the power load forecasting model is subsequently used to forecast the load of the target substation, even the power load data of the substation that has not been predicted can effectively improve the prediction accuracy.

[0095] In one embodiment, Figure 2 As shown, step S140 is further explained, and step S140 may include but is not limited to step S210 and step S220.

[0096] Step S210: Filtering the frequency spectrum features of the sample training data based on the threshold curve to obtain base frequency features.

[0097] The base frequency feature is the primary feature in the spectral feature that occurs more than a preset number of times. The preset number can be set based on actual conditions. The primary feature of the spectral feature can be determined by referring to the amplitude of the frequency component. By analyzing the amplitude of the spectral feature, we can determine which spectral features are the primary features. Specifically, the importance of the spectral feature can be judged based on its amplitude. Generally speaking, spectral features with larger amplitudes represent the primary frequency components in the signal. Therefore, when analyzing spectral features, we focus on the amplitude of the frequency components and use this amplitude to determine which frequency components are the primary features.

[0098] Specifically, the spectral features of the sample training data are screened based on the threshold curve to obtain the base frequency features. Specifically, the amplitude of the spectral features of each sample training data is calculated, and the amplitude of the spectral features of each sample training data is compared with the threshold curve. If the amplitude of the spectral features of the sample training data exceeds the threshold curve, the corresponding spectral features are considered to be the main features. Conversely, if the amplitude of the spectral features of the sample training data is lower than the threshold curve, the corresponding spectral features can be regarded as noise or secondary features. In this way, by comparing the threshold curve with the spectral features, it is possible to determine which spectral features are the main features, thereby performing feature extraction and dimensionality reduction processing on each sample training data in the sample power load data. Next, the number of occurrences of each main feature is counted, and the main frequency whose number of occurrences is greater than or equal to the preset number is selected as the base frequency feature, and the remaining frequency features are removed, for example, the remaining frequency features are set to zero.

[0099] Step S220: performing inverse Fourier transform on the base frequency features to obtain a target feature sequence.

[0100] Among them, the base frequency features are subjected to an inverse Fourier transform to obtain a target feature sequence. Specifically, the base frequency features can be subjected to an inverse discrete Fourier transform (IDFT) to obtain the target feature sequence. The target feature sequence is the important frequency component retained. Specifically, the target feature sequence can be calculated using the following formula, namely:

[0101] Target feature sequence = IDFT(threshold processing(X(k)))

[0102] Wherein, IDFT represents inverse discrete Fourier transform, X(k) represents the frequency spectrum characteristics of the sample training data, and the threshold processing is specifically referred to step S210, which will not be repeated here.

[0103] It is understandable that the Fourier transform provides a tool for converting a time domain signal into a frequency domain representation. In an embodiment of the present application, by applying a discrete Fourier transform within a preset sliding window, the spectral characteristics of the signal can be obtained. The method of decomposing these spectral feature sequences into a target feature sequence and a residual sequence (i.e., the remaining feature sequences except the target feature sequence) is achieved by threshold processing and inverse Fourier transform. This decomposition method can help extract the important frequency components in the signal and provide information on the low-frequency and high-frequency parts of the signal.

[0104] In one embodiment, Figure 3 As shown, step S160 is further explained, and step S160 may include but is not limited to steps S310 to S350.

[0105] Step S310: Calculate similarities between different sample stations in the first station area set based on target feature sequences corresponding to the sample stations in the first station area set to obtain a similarity matrix.

[0106] The similarity matrix represents the similarity between the target feature sequences of each sample station in the first station set. Similarity measurement methods may include Euclidean distance, Gaussian kernel function, etc., which are not specifically limited here. For example, taking Gaussian kernel function as an example, assuming that the target feature sequence of sample station i at time t is p i (t), the target feature sequence of sample station j at time t is p j (t), then the similarity W between sample area i and sample area j is ij The specific formula is as follows;

[0107]

[0108] Among them, ||p i -p j || means p i (t) and p j (t), σ is a parameter.

[0109] Step S320: Obtain a Laplacian matrix according to the similarity matrix.

[0110] Specifically, the similarity matrix is used to calculate the sum of the similarities between each station area and other stations to obtain a degree matrix. The adjacency matrix is then obtained from the similarity matrix. The adjacency matrix is subtracted from the degree matrix to obtain a Laplacian matrix. The degree matrix is a diagonal matrix formed by the sum of the elements in each row of the similarity matrix.

[0111] For example, assuming that the similarity matrix is W, the adjacency matrix A can be obtained by the following formula, namely:

[0112]

[0113] Next, the sum of the similarities between each area and other areas is calculated based on the similarity matrix to obtain the degree matrix D. The Laplace matrix L can be obtained by the following formula:

[0114] L=DA

[0115] Among them, the Laplace matrix L is used for the graph representation of spectral clustering.

[0116] It is understood that in steps S310 and S320, the features required for spectral clustering are constructed using the target feature sequence of each sample station. These features include the similarity matrix and the Laplacian matrix, which provide the basis for the subsequent spectral clustering algorithm.

[0117] Step S330: performing eigendecomposition on the Laplace matrix to obtain multiple eigenvectors.

[0118] Step S340: obtaining a preset number of target eigenvectors from the plurality of eigenvectors to obtain an eigenvector matrix.

[0119] The preset number may be 2, 4, 5, or more, and may be determined based on actual conditions. Assuming the preset number is k, a preset number of target eigenvectors are obtained from a plurality of eigenvectors. Specifically, the eigenvalues corresponding to the eigenvectors are determined, the eigenvectors are sorted according to the values of the eigenvalues, and the eigenvectors corresponding to the first k smallest eigenvalues (i.e., target eigenvectors) are obtained from the plurality of eigenvectors to obtain an eigenvector matrix.

[0120] Step S350: clustering the eigenvector matrix based on the K-means algorithm to obtain multiple second station area sets.

[0121] Each first station area set corresponds to several second station area sets.

[0122] Specifically, the eigenvector matrix can be used as input and clustered using the K-means algorithm to obtain multiple second station area sets.

[0123] For example, the Laplace matrix L is subjected to eigendecomposition to obtain the eigenvalue λ i and the corresponding eigenvector v i ,Right now:

[0124] Lv i =λ i v i

[0125] Next, select the eigenvectors corresponding to the first k smallest eigenvalues to form the eigenvector matrix U. Each row of the eigenvector matrix U represents a data point in the low-dimensional space as follows:

[0126] U=[v1,v2,...,v k ]

[0127] Then, each row of the eigenvector matrix U is regarded as a data point, and K-means clustering is performed in the k-dimensional space to obtain multiple second station area sets, where different second station area sets have different categories, and each second station area set can correspond to a cluster label for identifying the cluster category to which the second station area set belongs.

[0128] In an embodiment of the present application, a spectral clustering algorithm is used to cluster different sample substations in the first substation set based on the similarity matrix and the Laplace matrix, that is, clustering is performed through the decomposition of eigenvectors and the K-means algorithm, and ultimately substations with similar load characteristics are classified into the same category, providing a basis for subsequent analysis and modeling work.

[0129] In one embodiment, Figure 4 As shown, step S150 is further explained, and step S150 may include but is not limited to steps S410 to S420.

[0130] Step S410: Calculate the load fluctuation range corresponding to the sample substation based on the sample power load data.

[0131] The load fluctuation range can be expressed by statistical quantities such as the standard deviation, variance, and the difference between the maximum and minimum values (i.e., the range) of the sample power load data.

[0132] For example, suppose the sample power load data of the sample area is Then, the maximum sample power load data and the minimum sample power load data can be determined from all the sample power load data. The minimum sample power load data is subtracted from the maximum sample power load data to obtain the load fluctuation range corresponding to the sample area, that is:

[0133] Range=max(x t )-min(x t )

[0134] Among them, Range represents the load fluctuation range, max(x t ) represents the maximum sample power load data, min(x t ) represents the minimum sample power load data.

[0135] For example, the load fluctuation range corresponding to the sample area can be obtained by calculating the standard deviation of the sample power load data of the sample area, that is:

[0136]

[0137] Where, σ is the load fluctuation range, is the average value of the sample power load data, T is the number of sample power load data, x t Represents the tth sample power load data.

[0138] Step S420: Classify each sample substation according to the load fluctuation range to obtain multiple first substation sets.

[0139] Specifically, a classification threshold can be determined based on the load fluctuation range of the sample substations, and each sample substation can be classified using the classification threshold. The classification threshold can be set based on the distribution of the load fluctuation range, for example, multiple classification thresholds can be set based on the quartile distribution to classify the sample substations into different load fluctuation range categories.

[0140] It can be understood that different first station area sets represent different load fluctuation ranges.

[0141] For example, assuming that the load fluctuation range of the sample substation is expressed by range or standard deviation, the sample substations with a range or standard deviation below the classification threshold can be classified as "low fluctuation" class, the sample substations with a range or standard deviation above the classification threshold can be classified as "high fluctuation" class, and so on.

[0142] In an embodiment of the present application, by calculating the load fluctuation range corresponding to the sample substation based on the sample power load data, each sample substation can be classified according to the load fluctuation range to obtain multiple first substation sets, thereby reducing the number of samples for a single training of the power load prediction model, improving the efficiency of model training, and reducing the cost of model training.

[0143] In one embodiment, Figure 5 As shown, step S170 is further explained, and step S170 may include but is not limited to steps S510 to S520.

[0144] Step S510: Determine a first loss value of the power load prediction model according to the predicted label pairs and the number of label pairs corresponding to each sample substation in the second substation set.

[0145] For example, assuming D (t) represents the training data of the t-th task (i.e., the t-th adjustment of the power load forecasting model parameters), i.e., the predicted label pair corresponding to the sample area in the t-th second area set, D (t) Specifically, it can be expressed as:

[0146]

[0147] Among them, N t is the number of predicted label pairs corresponding to all sample areas in the t-th second area set, represents the i-th predicted label pair corresponding to the t-th second station set, represents the i-th sample training data corresponding to the t-th second station area set, Represents the i-th predicted label corresponding to the t-th second station area set.

[0148] Furthermore, if the current task is t, the corresponding power load forecasting model is f t, then the first loss value can be calculated by the following formula:

[0149]

[0150] Among them, L t (f t ;D (t) ) is the first loss value, N t is the total number of predicted label pairs corresponding to the t-th task, represents the i-th sample training data corresponding to the t-th task, Represents the i-th predicted label corresponding to the t-th task. t (;) can be the mean square error (MSE) or a loss function, which is not specifically limited here.

[0151] Step S520: adjusting the parameters of the power load prediction model according to the first loss value.

[0152] It is understood that the second substation set in step S510 is the substation set used for the current training of the power load forecasting model. Since there are multiple second substation sets, each second substation set can be used to train the power load forecasting model in turn. That is, each second substation set can repeat steps S510 and S520 to adjust the model parameters of the power load forecasting model.

[0153] In an embodiment of the present application, by adjusting the parameters of the power load prediction model based on the predicted label pairs and the number of label pairs corresponding to each sample substation in the second substation set, the parameters of the power load prediction model can be adjusted based on substations of the same category, thereby reducing the time and overhead of model training. At the same time, it can also improve the training effect of the power load prediction model and the effect of reinforcement learning, thereby further improving the accuracy of the power load prediction model in power load prediction.

[0154] In one embodiment, the power load prediction method further includes steps S610 to S640.

[0155] Step S610: saving the parameters of the power load forecasting model after each adjustment.

[0156] Step S620: Calculate a regularization term based on the parameters of the previously adjusted power load forecasting model and the parameters of the currently adjusted power load forecasting model.

[0157] It should be noted that the parameters after the power load forecasting model is adjusted before are all the model parameters after the power load forecasting model is adjusted before.

[0158] In order to retain the knowledge of the previous task (i.e., the parameters of the power load forecasting model after the previous adjustment), a regularization term can be introduced to align the model parameters of the new task (i.e., the parameters of the current adjusted power load forecasting model) with the model parameters of the old task (i.e., the parameters after the previous adjustment of the power load forecasting model). The difference between the new and old model parameters is measured by the regularization term. The old task can use the power load data of the past year to train the power load forecasting model, and the new task can introduce new power load data every month to fine-tune the power load forecasting model. For example, the latest power load data is obtained every month to update the model. Specifically, the regularization term is usually expressed using the Euclidean distance, that is:

[0159]

[0160] Among them, R(f t , f k ) is the regularization term, f t is the currently adjusted power load forecasting model, f k is the previously adjusted power load forecasting model, θ t f t The parameter vector, θ k represents f k It can be understood that after the model training is completed, we will adjust the parameters f of the power load forecasting model before t The knowledge of is integrated into the knowledge base, specifically by directly storing the model parameters θ t Or extract specific features or representations.

[0161] Step S630: Obtain a second loss value based on the regularization term and the first loss value.

[0162] In this step, by obtaining the second loss value based on the regularization term and the first loss value, it is possible to retain the knowledge of the previous task while minimizing the loss of the current task.

[0163] Specifically, assuming that the previously adjusted power load forecasting model is The second loss value can be calculated by the following formula:

[0164]

[0165] in, is the second loss value; λ is a hyperparameter that weighs the loss of the current adjustment of the power load forecasting model (i.e., the first loss value) and the knowledge retention (i.e., the parameters after the previous adjustment of the power load forecasting model); L t (f t ;D (t) ) is the first loss value; R(f t , fk ) is the regularization term; D (t) It represents the training data of the t-th task (i.e., the t-th adjustment of the power load forecasting model parameters), that is, the prediction label pairs corresponding to all sample substations in the t-th second substation set.

[0166] Step S640: Adjusting parameters of the power load prediction model according to the second loss value.

[0167] In an embodiment of the present application, the knowledge of the new task is integrated into the knowledge base by saving the parameters of the power load forecasting model after each adjustment, and then the regularization term is calculated based on the parameters of the power load forecasting model after the previous adjustment and the parameters of the current adjusted power load forecasting model to avoid catastrophic forgetting of the model; then the second loss value is obtained based on the regularization term and the first loss value, and the parameters of the power load forecasting model are adjusted according to the second loss value. This can not only maintain and utilize the previously learned knowledge, thereby maintaining the performance of the old task and thus maintaining the stability of the power load forecasting model, but also enable the power load forecasting model to continue to learn and adapt to new data, continuously optimize the performance of the power load forecasting model, and improve the training effect of the power load forecasting model.

[0168] like Figure 6 As shown, the embodiment of the present application provides a model training method, which includes but is not limited to steps S710 to S770:

[0169] Step S710: Obtain sample power load data of multiple sample substations;

[0170] Step S720: Determine a preset sliding window and prediction step size, and obtain a plurality of sample training data and prediction label pairs corresponding to each sample training data according to the preset sliding window, prediction step size, and sample power load data;

[0171] Step S730: obtaining the spectrum characteristics and threshold curve of the sample training data based on the sample training data;

[0172] Step S740: Obtaining a target feature sequence based on the spectrum features of the sample training data and the threshold curve;

[0173] Step S750: Classifying each sample substation according to the sample power load data to obtain a plurality of first substation sets;

[0174] Step S760: clustering the sample stations in the first station area set according to the target feature sequence to obtain multiple second station area sets;

[0175] Step S770: Determine the number of predicted label pairs corresponding to all sample substations in the second substation set, and adjust the parameters of the power load prediction model according to the predicted label pairs and the number of label pairs corresponding to each sample substation in the second substation set.

[0176] The principles of steps 710 to 770 can be found in the previous explanations and will not be repeated here.

[0177] In an embodiment of the present application, by obtaining sample power load data of multiple sample substations, determining a preset sliding window and a prediction step size, and obtaining multiple sample training data and prediction label pairs corresponding to each sample training data based on the preset sliding window, prediction step size, and sample power load data, preparation can be made for subsequent adjustment of model parameters; then, based on the sample training data, the spectral characteristics and threshold curve of the sample training data are obtained, and based on the spectral characteristics and threshold curve of the sample training data, a target feature sequence is obtained, which can efficiently extract important frequency components of the power load data; then, each sample substation is classified according to the sample power load data to obtain multiple first substation sets, And clustering the sample substations in the first substation set according to the target feature sequence to obtain multiple second substation sets, which can classify substations with similar load characteristics into the same category; then by determining the number of label pairs of the predicted label pairs corresponding to all sample substations in the second substation set, adjusting the parameters of the power load prediction model according to the predicted label pairs and the number of label pairs corresponding to each sample substation in the second substation set, the parameters of the power load prediction model can be adjusted based on substations of the same category, reducing the time and cost of model training, and at the same time improving the training effect of the power load prediction model and the effect of reinforcement learning, thereby further improving the model performance of the power load prediction model.

[0178] The process of the model training method provided in the embodiments of the present application is described in detail below.

[0179] First, we collected sample power load data from each sample substation and constructed it into datasets. The datasets corresponding to these sample power load data are shown in Table 1. Table 1 constructs an Electricity dataset, with the first column containing timestamp data and the second through last columns numbering the sample substations starting at 1. Each column contains sample power load data for a single sample substation. It's understandable that actual substation power load data can be quite extensive; this is just an example.

[0180] Table 1

[0181] date Sample area 1 Sample area 2 Sample Area 3 Sample area 4 ... 2016-07-01 02:00:00 14 89 78 74 ... 2016-07-01 03:00:00 25 78 85 10 ... 2016-07-01 04:00:00 45 13 52 52 ... ... ... ... ... ... ...

[0182] Then, based on the data set, a preset sliding window and a preset step size are used to construct a prediction label pair. First, the time series data (i.e., sample power load data) is sliced into an input window (i.e., sample training data) and the corresponding output (i.e., predicted label). The function constructed in the actual operation includes two parameters, namely the preset sliding window and the preset step size. Assuming that the value of the preset sliding window is set to 3, it means that 3 consecutive sample power load values are needed to predict the next load value, and the preset step size is 1, 7 sliding windows can be obtained. Taking the sample power compliance data of sample substation 1 as an example, assuming that the sample power compliance data of sample substation 1 is [100, 102, 101, 98, 100, 105, 110, 115, 120, 125], the sample training data (i.e., input (X)) and the predicted label (i.e., output (Y)) in the sliding window corresponding to sample substation 1 are as follows:

[0183] Sliding window 1:

[0184] Input (X): [100, 102, 101], Output (Y): 98;

[0185] Sliding window 2:

[0186] Input (X): [102, 101, 98], Output (Y): 100;

[0187] Sliding window three:

[0188] Input (X): [101, 98, 100], Output (Y): 105; ......

[0190] By analogy, the predicted label pair corresponding to sample area 1 is finally obtained as shown in Table 2.

[0191] Table 2:

[0192] X Y [100,102,101] 98 [102,101,98] 100 [101,98,100] 105 [98,100,105] 110 [100,105,110] 115 [105,110,115] 120 [110,115,120] 125

[0193] The same steps can be followed for other sample areas such as sample area 2 and sample area 3 to obtain corresponding predicted label pairs, which will not be repeated here.

[0194] Next, the Fourier transform is used to obtain the spectral features of the sample training data in each sliding window, and the target feature sequence is decomposed from the original sequence based on the spectral features. That is, for the data set corresponding to each sample station area, the fast Fourier transform is used to obtain the spectral features of each sample training data.

[0195] Table 3

[0196] Sliding Window 1 [303,3.5,3.50] Sliding Window 2 [301,3.87,3.87] Sliding Window Three [299,1.5,1.50] Sliding Window 4 [303,3.5,3.50] Sliding Window Five [315,3.87,3.87] Sliding Window Six [325,3.5,3.50] Sliding Window Seven [333,7.5,7.50]

[0197] Specifically, for each sliding window, the sample training data (i.e., sliding window) and the corresponding FFT (i.e., fast Fourier transform) results were obtained, that is, sliding window one is [100, 102, 101], where the corresponding FFT result is [303, 3.5, 3.5]; sliding window two is [102, 101, 98], where the corresponding FFT result is [301, 3.87, 3.87]; sliding window three is [101, 98, 100], where the corresponding FFT result is [299, 1.5, 1.5], and so on. The final spectrum feature results are shown in Table 3.

[0198] These spectrum features can be used to further analyze the periodicity and frequency components of the sample power load data of the sample substation 1.

[0199] Then, the maximum amplitude corresponding to the spectral features of all sample training data in the statistical data set is counted, and the threshold curve is constructed based on this. For example, the maximum amplitude of these spectral features is taken out and then used as the threshold curve, that is, the maximum amplitude of each spectral feature is calculated, and then the threshold curve is generated based on all the maximum amplitudes, where the threshold curve is the set of all the maximum amplitudes.

[0200] In the spectral feature matrix in Table 3, each column corresponds to a spectral feature, and each element represents the amplitude of that spectral feature in the frequency domain. Therefore, taking the maximum value of each column (i.e., each spectral feature) yields the maximum amplitude of that spectral feature, ultimately yielding the threshold curve [333, 7.5, 7.5].

[0201] Next, for each time point, the amplitude of the spectral feature is compared with the threshold curve. If the amplitude of the spectral feature of the sample training data exceeds the threshold curve, the corresponding spectral feature is considered to be the main feature. The number of occurrences of each main feature is counted, and the main frequency with a number of occurrences greater than or equal to the preset number is selected as the base frequency feature. The remaining frequency features (i.e., residual sequences) are removed, for example, by setting the remaining frequency features to zero, and finally Table 4 is obtained.

[0202] Table 4

[0203] Sliding Window 1 [0,0,0] Sliding Window 2 [0,0,0] Sliding Window Three [0,0,0] Sliding Window 4 [0,0,0] Sliding Window Five [0,0,0] Sliding Window Six [0,0,0] Sliding Window Seven [333,7.5,7.5]

[0204] Then perform inverse Fourier transform on the base frequency features to obtain the target feature sequence. Assuming that the result of the target feature sequence is [47.5, 32.5, 32.5, 32.5, 32.5, 32.5, 32.5, 32.5, 47.5], the residual sequence is obtained by subtracting it from the original feature sequence (i.e. the feature sequence of the sample power load data) [52.5, 69.5, 68.5, 65.5, 67.5, 72.5, 77.5, 82.5, 87.5, 77.5]. The target feature sequence is shown in the figure below. Figure 7 As shown, the original feature sequence diagram is as follows Figure 8 As shown, the residual sequence diagram is as follows Figure 9 shown.

[0205] Then, the load fluctuation range corresponding to the sample substation is calculated based on the sample power load data. For example, the sample power load data for sample substation 1 is [100, 102, 101, 98, 100, 105, 110, 115, 120, 125], with a fluctuation range of 125-98 = 27; the sample power load data for sample substation 2 is [130, 128, 135, 132, 130, 137, 140, 145, 150, 155], with a fluctuation range of 155-128 = 27; and the sample power load data for sample substation 3 is [160, 158, 165, 162, 160, 167, 170, 175, 180, 185], with a fluctuation range of 185-158 = 27. The sample substations are then classified according to the load fluctuation range to obtain multiple first substation sets. Assuming that the fluctuation range is divided into three intervals, namely small fluctuation range (0-10), medium fluctuation range (10-20), and large fluctuation range (above 20), then since the fluctuation range of all sample areas is 27, they are all classified as "large fluctuation range" category.

[0206] Furthermore, based on the target feature sequences corresponding to the sample areas in the first area set, the similarities between different sample areas in the first area set are calculated to obtain a similarity matrix. Assuming that the target feature sequence of sample area 1 is [47.5, 32.5, 32.5, 32.5, 32.5, 32.5, 32.5, 32.5, 47.5]; the target feature sequence of sample area 2 is [65.0, 45.0, 45.0, 45.0, 45.0, 45.0, 45.0, 45.0, 65.0]; the target feature sequence of sample area 3 is [82.5, 57.5, 57.5, 57.5, 57.5, 57.5, 57.5, 57.5, 82.5], the Euclidean distance can be used to calculate the similarity matrix. For example, the distance between sample area 1 and sample area 2 is:

[0207]

[0208] The final similarity matrix W may be as follows (assuming the calculated results):

[0209]

[0210] The Laplace matrix is obtained based on the similarity matrix. Specifically, the sum of the similarities between each station area and other stations is calculated based on the similarity matrix to obtain the degree matrix. Among them, the degree matrix is a diagonal matrix formed by the sum of the elements in each row of the similarity matrix. The degree matrix D is as follows:

[0211]

[0212] Then, the Laplace matrix L is obtained by subtracting the similarity matrix W from the degree matrix D, that is, L = DW. The Laplace matrix L is as follows:

[0213]

[0214] Next, the Laplace matrix is eigendecomposed to obtain multiple eigenvectors, and the eigenvectors corresponding to the first two smallest eigenvalues (i.e., target eigenvectors) are obtained from the multiple eigenvectors to obtain the eigenvector matrix U.

[0215]

[0216] K-means is used to cluster the feature vector matrix in two-dimensional space. For example, setting K = 2, the sample areas are clustered into two groups, resulting in two sets of second area collections. For example, sample areas 1 and 2 are divided into the first set of second area collections, and sample area 3 is divided into the second set of second area collections.

[0217] The first set of second substations is used as a training set, and the second set of second substations is used as a training set. The number of label pairs corresponding to all sample substations in the first set of second substations is determined. The parameters of the power load forecasting model are adjusted based on the predicted label pairs and the number of label pairs corresponding to each sample substation in the first set of second substations. After the training model for the first set of second substations is completed, the number of label pairs corresponding to all sample substations in the second set of second substations is determined. The parameters of the power load forecasting model are adjusted based on the predicted label pairs and the number of label pairs corresponding to each sample substation in the second set of second substations. In this way, the model can be adapted to the parameters of multiple training sets simultaneously, achieving the goal of comprehensive optimization.

[0218] It can be seen from the above embodiments that power load forecasting is a key issue in power system planning and operation, and is of great significance for ensuring the stable operation and reasonable scheduling of the power system. In order to effectively meet this challenge, many data-driven forecasting methods have emerged in recent years. In the application embodiment, a comprehensive power load forecasting method is proposed, which combines multiple links such as data integration, feature engineering, clustering and model building, providing comprehensive and efficient support for power system management and planning.

[0219] First, this method demonstrates comprehensiveness and reliability in data preparation. By collecting power load data from each substation and preprocessing and cleaning the data, the integrity and quality of the data are ensured. The power load data from each substation is then integrated into a unified dataset, which is then verified and documented to prepare for subsequent analysis and modeling. Secondly, in terms of feature engineering, this method utilizes techniques such as fast discrete Fourier transform and threshold curve construction to efficiently extract and reduce the spectral characteristics of power load data. By analyzing the spectral characteristics, the key frequency components are identified, providing an important reference for subsequent model construction.

[0220] Next, regarding clustering, this method employs a fluctuation range-based initial classification and spectral clustering algorithm, enabling flexible identification of substations with similar load characteristics. Clustering allows different substations to be classified into distinct categories, providing important insights for power system management and planning. Finally, regarding model construction, this method utilizes models such as the LSTM, which are suitable for sequential data, to better capture the temporal characteristics of power load data. Through lifelong learning techniques, the model continuously learns and adapts to new data, enhancing its robustness and adaptability.

[0221] In summary, the power load forecasting method in the embodiments of this application demonstrates excellent performance and flexibility in many aspects, providing important support and guidance for power system management and planning. It comprehensively considers multiple aspects, including data preparation, feature engineering, clustering, and model building, to construct a comprehensive and efficient forecasting framework that can achieve accurate and reliable power load forecasting.

[0222] It is understood from common technical knowledge that the present application may be implemented by other embodiments that do not deviate from its spirit or essential features. Therefore, the embodiments disclosed above are merely illustrative in all respects and are not intended to be exclusive. All modifications that come within the scope of this application or are equivalent to the scope of this application are intended to be included in this application.

[0223] In addition, refer to Figure 10An embodiment of the present application further provides an electronic device, wherein the electronic device 200 includes a memory 202, a processor 201, and a computer program stored in the memory 202 and executable on the processor 201.

[0224] The processor 201 and the memory 202 may be connected via a bus or other means.

[0225] The memory 202 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory 202 may include a high-speed random access memory and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 202 may optionally include a memory remotely located relative to the processor 201, and these remote memories may be connected to the processor 201 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0226] The non-transient software programs and instructions required to implement the power load forecasting method or model training method of the above-described embodiments are stored in memory 202. When executed by processor 201, the power load forecasting method or model training method of the above-described embodiments is performed. Therefore, the power load forecasting method or model training method of the above-described embodiments will not be described in detail here. Furthermore, the description of the beneficial effects of employing the same method will not be repeated here.

[0227] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0228] In addition, one embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions. The computer-executable instructions are executed by a processor or controller, for example, by a processor in the above-mentioned device embodiment, so that the processor can execute the power load forecasting method or model training method in the above-mentioned embodiment. Therefore, the power load forecasting method or model training method in the above-mentioned embodiment will not be described in detail here. In addition, the description of the beneficial effects of using the same method will not be described in detail.

[0229] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0230] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (apparatus), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0231] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0232] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0233] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit them. Although the present application has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present application can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present application should be included in the scope of protection of the claims of the present application.

Claims

1. A method for predicting power load, characterized in that: include: Obtaining sample power load data for a plurality of sample substations; Determining a preset sliding window and a prediction step size, and obtaining a plurality of sample training data and a prediction label pair corresponding to each of the sample training data based on the preset sliding window, the prediction step size, and the sample power load data; Obtaining a frequency spectrum characteristic and a threshold curve of the sample training data based on the sample training data; Obtaining a target feature sequence according to the spectrum characteristics and threshold curve of the sample training data; Classifying each of the sample substations according to the sample power load data to obtain a plurality of first substation sets; Clustering the sample stations in the first station area set according to the target feature sequence to obtain a plurality of second station area sets; Determining the number of predicted label pairs corresponding to all the sample substations in the second substation set, and adjusting the parameters of the power load prediction model according to the predicted label pairs corresponding to each of the sample substations in the second substation set and the number of label pairs; The power load data to be predicted of the target substation is obtained, and the power load data to be predicted is input into the power load prediction model after parameter adjustment to obtain the load prediction data of the target substation.

2. The power load forecasting method according to claim 1, characterized in that: The step of obtaining a target feature sequence based on the spectrum features and the threshold curve of the sample training data includes: Screening the frequency spectrum features of the sample training data based on the threshold curve to obtain a base frequency feature; Perform inverse Fourier transform on the base frequency features to obtain a target feature sequence.

3. The power load forecasting method according to claim 1, characterized in that: The obtaining of the spectrum characteristics and threshold curve of the sample training data based on the sample training data includes: Performing discrete Fourier transform on each of the sample training data to obtain a frequency spectrum feature of each of the sample training data; Calculating the maximum amplitude of each of the spectral features; A threshold curve is generated based on all of the maximum amplitudes.

4. The power load forecasting method according to claim 1, characterized in that: Clustering the sample stations in the first station area set according to the target feature sequence to obtain a plurality of second station area sets includes: Calculating similarities between different sample stations in the first station area set based on target feature sequences corresponding to the sample stations in the first station area set to obtain a similarity matrix; Obtaining a Laplace matrix according to the similarity matrix; Performing eigendecomposition on the Laplace matrix to obtain a plurality of eigenvectors; Obtaining a preset number of target eigenvectors from the plurality of eigenvectors to obtain an eigenvector matrix; The eigenvector matrix is clustered based on the K-means algorithm to obtain multiple second station area sets.

5. The power load forecasting method according to claim 1, characterized in that: The method of classifying each of the sample substations according to the sample power load data to obtain a plurality of first substation sets includes: Calculating the load fluctuation range corresponding to the sample area according to the sample power load data; The sample stations are classified according to the load fluctuation range to obtain a plurality of first station sets.

6. The power load forecasting method according to claim 1, characterized in that: The adjusting the parameters of the power load prediction model according to the predicted label pairs corresponding to each of the sample substations in the second substation set and the number of the label pairs includes: Determining a first loss value of the power load forecasting model according to the predicted label pairs corresponding to each of the sample substations in the second substation set and the number of the label pairs; According to the first loss value, the parameters of the power load prediction model are adjusted.

7. The power load forecasting method according to claim 6, characterized in that: The method further comprises: Saving the parameters of the power load forecasting model after each adjustment; Calculating a regularization term based on the previously adjusted parameters of the power load forecasting model and the currently adjusted parameters of the power load forecasting model; Obtaining a second loss value according to the regularization term and the first loss value; Adjust the parameters of the power load forecasting model according to the second loss value.

8. A model training method, characterized in that: include: Obtaining sample power load data for a plurality of sample substations; Determining a preset sliding window and a prediction step size, and obtaining a plurality of sample training data and a prediction label pair corresponding to each of the sample training data based on the preset sliding window, the prediction step size, and the sample power load data; Obtaining a frequency spectrum characteristic and a threshold curve of the sample training data based on the sample training data; Obtaining a target feature sequence according to the spectrum characteristics and threshold curve of the sample training data; Classifying each of the sample substations according to the sample power load data to obtain a plurality of first substation sets; Clustering the sample stations in the first station area set according to the target feature sequence to obtain a plurality of second station area sets; The number of predicted label pairs corresponding to all the sample substations in the second substation set is determined, and the parameters of the power load prediction model are adjusted according to the predicted label pairs corresponding to each of the sample substations in the second substation set and the number of label pairs.

9. An electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the power load forecasting method according to any one of claims 1 to 7 or the model training method according to claim 8 is implemented.

10. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the power load forecasting method according to any one of claims 1 to 7 or the model training method according to claim 8.

Citation Information

Patent Citations

  • Load prediction method and device, computer equipment and storage medium

    CN110929954A

  • Kmeans clustering method and system for low-voltage transformer area

    CN111797899A