Power load forecasting method, device, equipment and medium
By applying time convolutional neural networks and migration learning in power load predictions, the problem of gradient explosion and gradient disappearance of existing technology in the existing technology, especially when the target domain users lack historical load data, have achieved high accuracy Power load prediction.
Patent Information
- Application Number
- CN202410784864.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-06-18
AI Technical Summary
The prior art faces the problems of gradient explosion and gradient disappearance in power load prediction, and in the case where the target domain users lack historical load data, it is impossible to effectively realize power load prediction with sparse load sample data or no load sample data.
Adopt time convolutional neural networks and migration learning methods. By obtaining large sample load data sets of multiple source users and small sample load data sets of target domain users, extracted the characteristic matrix, calculate the similarity of the source domain users and the target domain users Select the source domain data with the minimum similarity for migration and learning, and optimize the super -reinvigated number of time convolutional neural networks to establish a load prediction model.
The accuracy and reliability of the user's power load prediction is improved, especially in the absence of historical load data, it can effectively realize the prediction of the scarce or non -load sample data of the load sample data.
Smart Images

Figure CN118630747B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power load forecasting, and more specifically, to a power load forecasting method, device, equipment and medium. Background Art
[0002] In the operation and management of power systems, accurate short-term load forecasting is crucial to optimizing the balance of energy supply and demand and improving the efficiency of power system operation. Traditional machine learning methods have achieved good prediction results in load forecasting. However, due to the lack of relevant load historical data sets in some areas, traditional forecasting methods are difficult to apply.
[0003] At present, the power load forecasting method provided by the existing technology may face the defects of gradient explosion and gradient vanishing in the common recurrent neural network method in source domain load forecasting; in the power load forecasting of target domain users, due to the limited number of load sample data used for training or the absence of load sample data used for training, the power load forecasting method provided by the existing technology cannot effectively realize the power load forecasting of target domain users with scarce or no load sample data. Summary of the invention
[0004] The purpose of this application is to provide a method, device, equipment and medium for power load forecasting, which are applied to regions or users that lack historical load data sets to improve the accuracy and reliability of power load forecasting for regions or users.
[0005] In a first aspect of the present application, a method for predicting power load is provided, the method comprising:
[0006] Obtain a large sample load data set of multiple source domain users and a small sample load data set of target domain users; wherein the load characteristics of the source domain users are similar to or identical to the load characteristics of the target domain users;
[0007] The characteristic matrices of the large sample load data set and the small sample load data are extracted respectively;
[0008] Calculate the similarity of each source domain user to the target domain user based on the feature matrix;
[0009] A temporal convolutional neural network is constructed, and the feature matrix of the large sample load data set with the smallest similarity is used as the training data of the temporal convolutional neural network. The hyperparameters of the temporal convolutional neural network are optimized in combination with the snow melting optimizer until the training of the temporal convolutional neural network is completed, and a load forecasting model that can predict the power load of users in the target domain is obtained.
[0010] In one implementation, before respectively extracting the feature matrices of the large sample load data set and the small sample load data set, the method further includes: preprocessing the large sample load data sets of multiple source domain users and the small sample load data sets of target domain users; wherein the preprocessing includes any one of missing value processing, outlier processing, and normalization processing.
[0011] In one implementation, a sliding window algorithm is used to extract feature matrices of the large sample load data set and the small sample load data set.
[0012] In one implementation, the similarity of each source domain user to the target domain user is calculated based on the feature matrix, including:
[0013] According to the characteristic matrix of each large sample load data set and the characteristic matrix of the small sample load data, the Mahalanobis distance and the maximum mean difference value between each source domain user and the target domain user are calculated;
[0014] Normalizing the Mahalanobis distance and the maximum mean difference value to obtain normalized results of the Mahalanobis distance and the maximum mean difference value;
[0015] Based on the normalized results, the similarity of each source domain user to the target domain user is calculated.
[0016] In one implementation, the similarity of each source domain user to the target domain user is calculated based on the normalization result, specifically: taking the average value of the normalization result as the similarity of each source domain user to the target domain user.
[0017] In one implementation, the hyperparameters include a parameter space of a learning rate, a convolution kernel size, and a number of convolution kernels.
[0018] In one implementation, the temporal convolutional neural network includes a dilated convolutional network and a residual connection network; wherein the residual connection network includes two layers of dilated causal convolution and nonlinear identity mapping.
[0019] In a second aspect of the present application, a power load prediction device is provided, the device comprising:
[0020] A data acquisition module, used to acquire a large sample load data set of multiple source domain users and a small sample load data set of target domain users; wherein the load characteristics of the source domain users are similar to or identical to the load characteristics of the target domain users;
[0021] A feature extraction module is used to extract feature matrices of a large sample load data set and a small sample load data set respectively;
[0022] A similarity calculation module is used to calculate the similarity of each source domain user relative to the target domain user based on the feature matrix;
[0023] The load forecasting module is used to construct a temporal convolutional neural network. The feature matrix of the large sample load data set with the smallest similarity is used as the training data of the temporal convolutional neural network. The hyperparameters of the temporal convolutional neural network are optimized in combination with the snow melting optimizer until the temporal convolutional neural network training is completed, and a load forecasting model that can predict the power load of users in the target domain is obtained.
[0024] The third aspect of the present application provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of an electric power load forecasting method provided in the present application are implemented.
[0025] In a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of a power load forecasting method provided in the present application are implemented.
[0026] Compared with the prior art, this application has the following beneficial effects:
[0027] In a power load prediction method, device, equipment and medium provided in the present application, power load prediction for target domain users is completed based on time convolutional neural network and transfer learning. First, the load data sets of multiple source domain users and target domain users are preprocessed, and then the feature matrix corresponding to the load data set is extracted by the sliding window method, and the similarity of each source domain relative to the target domain is calculated. The similarities calculated by the two methods are normalized, and the minimum mean of the normalized results is taken as the judgment indicator for selecting source domain users. It should be noted that the smaller the mean of the normalized result, the stronger the similarity of the load characteristics of the source domain users and the target domain users. The feature matrix of the source domain that is highly similar to the target domain users is input into the time convolutional network model optimized by the snow melting optimizer to establish a load prediction model, and complete the accurate prediction of small sample load data of target domain users. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The drawings described herein are used to provide a further understanding of the embodiments of the present application, constitute a part of the present application, and do not constitute a limitation on the embodiments of the present application. In the drawings:
[0029] Figure 1 A schematic diagram of a flow chart of a power load forecasting method provided in an embodiment of the present application;
[0030] Figure 2 A flowchart of selecting a source domain by using the MD-MMD method provided in an embodiment of the present application;
[0031] Figure 3 A schematic diagram of the structure of the dilated convolution of the temporal convolutional neural network provided in an embodiment of the present application;
[0032] Figure 4 A schematic diagram of the structure of a residual connection network of a temporal convolutional neural network provided in an embodiment of the present application;
[0033] Figure 5 A comparison chart of the SAO-TCN and TCN prediction results and the true values only for target domain users provided in the embodiment of the present application;
[0034] Figure 6 A comparison chart of the prediction results and the actual values of the power load prediction method provided in the embodiment of the present application;
[0035] Figure 7 A functional block diagram of a power load prediction device provided in an embodiment of the present application;
[0036] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with examples and drawings. The illustrative implementation scheme of the present application and its description are only used to explain the present application and are not intended to limit the present application.
[0038] It should be noted that the terms "include" or "may include" used in various embodiments of the present application indicate the presence of the function, operation or element applied for, and do not limit the addition of one or more functions, operations or elements. In addition, as used in various embodiments of the present application, the terms "include", "have" and their cognates are only intended to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the presence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or the possibility of adding one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items.
[0039] It should be understood that terms such as "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly indicate the number of technical features indicated. Therefore, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0040] At present, the power load forecasting method provided by the existing technology may face the defects of gradient explosion and gradient vanishing in the common recurrent neural network method in source domain load forecasting; in the power load forecasting of target domain users, due to the limited number of load sample data used for training or the absence of load sample data used for training, the power load forecasting method provided by the existing technology cannot effectively realize the power load forecasting of target domain users with scarce or no load sample data.
[0041] Based on this, the embodiments of the present application provide a method, device, equipment and medium for predicting power load, which completes the power load prediction for target domain users based on time convolutional neural network and transfer learning. First, the load data sets of multiple source domain users and target domain users are preprocessed, and then the feature matrix corresponding to the load data set is extracted by the sliding window method, and the similarity of each source domain relative to the target domain is calculated. The similarities calculated by the two methods are normalized, and the minimum mean of the normalized results is taken as the judgment indicator for selecting source domain users. It should be noted that the smaller the mean of the normalized result, the stronger the similarity of the load characteristics of the source domain users and the target domain users. The feature matrix of the source domain that is highly similar to the target domain users is input into the time convolutional network model optimized by the snow melting optimizer to establish a load prediction model, thereby completing the accurate prediction of small sample load data of target domain users.
[0042] The following will describe in detail the power load forecasting method provided by the embodiment of the present application in combination with specific implementation methods. Figure 1 , Figure 1 A flow chart of a power load forecasting method provided in an embodiment of the present application is shown as follows: Figure 1 As shown, the method includes:
[0043] S101, obtaining a large sample load data set of multiple source domain users and a small sample load data set of target domain users; wherein the load characteristics of the source domain users are similar to or identical to the load characteristics of the target domain users.
[0044] In this embodiment, the source domain user refers to a load user that already exists and has been in operation for a long time, and for which sufficient historical load data can be collected. Based on these load data, the power load of the source domain user at a future moment can be accurately predicted, such as factories, commercial centers, schools, etc. The target domain user refers to an electricity user that is ready to be put into operation or has been in operation for a short time, and it is impossible to collect enough historical load data for the user, which means that the number of load sample data used for training is limited or there is no load sample data used for training. Therefore, the power load prediction method provided by the prior art cannot effectively realize the power load prediction of the target domain user with sparse or no load sample data.
[0045] For large sample load data sets and small sample load data, since this application performs power load forecasting, the forecast period is determined according to the forecast demand, and the historical time of the historical load in the training data is determined according to the forecast period. For example, for long-term load forecasting, the historical load data in the large sample load data set can be 5-10 years of historical data, and the power load forecasting model learns the changing rules of the historical data in the past 5-10 years to predict the power load in the target domain in the next year or several years. For medium-term load forecasting, the historical load data in the large sample load data set can be the monthly and weekly historical data in recent years, and the power load forecasting model learns the changing rules of the monthly and weekly historical data in recent years of the target domain to predict the power load in the next few weeks or months. For short-term load forecasting, the historical load data in the large sample load data set can be hourly historical data, and the power load data corresponding to the historical time is obtained. The power load forecasting model learns the changing rules of the historical data in recent months or weeks to predict the power load in the target domain in the next few hours. According to the needs of different forecasting cycles, different data sources are obtained to complete the migration of power load data in the target domain.
[0046] Accordingly, whether it is the power load data in the large sample load data set or the power load data in the small sample load data set, it can be the power load data collected by the power metering terminal, such as smart meters and concentrators, at preset time intervals, such as 15 minutes. The power load data collected by the power metering terminal is time series data. The power load data collected by the power metering terminal can be electric energy data. Electric energy is the most commonly used low-frequency feature in the power collection system and is also the main prediction object of load forecasting. Therefore, electric energy data can be used as power load data to obtain a more accurate power load prediction value.
[0047] Transfer learning technology provides a new approach to solving the problem of load forecasting in the case of data scarcity. Transfer learning refers to using an already trained model to fine-tune it on a new task. This technology can speed up model training and improve model performance, especially when data is scarce. The principle is to improve learning performance in the target domain by transferring knowledge, models, features, parameters, etc. from the source domain to one or more target domains. Therefore, transfer learning helps solve the problem of insufficient data or distribution mismatch by using the knowledge in the source domain to improve learning performance in the target domain.
[0048] Therefore, this embodiment obtains a large sample load data set of multiple source domain users and a small sample load data set of target domain users, wherein it is necessary to ensure that the load characteristics of the source domain users are similar or identical to the load characteristics of the target domain users. Ensuring that the load characteristics of the source domain users are similar or identical to the load characteristics of the target domain users is to reduce the cost of training and calculation, improve the overall convergence efficiency of the model, and maintain a high prediction accuracy.
[0049] S102, extracting the feature matrices of the large sample load data set and the small sample load data set respectively.
[0050] In this embodiment, a sliding window algorithm is used to extract the characteristic matrix of the large sample load data set and the characteristic matrix of the small sample load data. It can be understood that the size of the selection window of the sliding window algorithm is M, and the measured load values from time XM to time X are used to predict the load value at the future time X+1, that is, the dimension of the input data is M.
[0051] Exemplarily, M is taken as 24, 24 consecutive elements are taken as a processing unit, and then the window is moved along the data sequence, one element at a time, until the window traverses the entire data sequence.
[0052] S103: Calculate the similarity of each source domain user to the target domain user according to the feature matrix.
[0053] In this embodiment, if Figure 2 As shown, according to the characteristic matrix of each large sample load data set and the characteristic matrix of the small sample load data, the Mahalanobis distance and the maximum mean difference value between each source domain user and the target domain user are calculated; the Mahalanobis distance and the maximum mean difference value are normalized to obtain the normalized results of the Mahalanobis distance and the maximum mean difference value respectively; based on the normalized results, the similarity of each source domain user relative to the target domain user is calculated.
[0054] In this embodiment, the similarity of each source domain user to the target domain user is calculated by Mahalanobis distance and maximum mean difference, and the source domain is selected by comprehensively considering multiple factors to ensure that data highly similar to the target domain is selected, thereby improving the accuracy of prediction.
[0055] Specifically, the Mahalanobis distance (MD), for two sample vectors and Where t represents the tth target domain user, s represents the sth source domain user, and X t The characteristic matrix set representing the small sample load data of the target domain users, X s The feature matrix set representing the small sample load data of source domain users, Represents the feature matrix of the small sample load data of the mth target domain user, The feature matrix representing the large sample load data of the nth source domain user.
[0056] The Mahalanobis distance calculation formula between each source domain user and a target domain user is as follows: Here, S represents the covariance matrix.
[0057] Maximum Mean Discrepancy (MMD), for the target domain and source domain Let its probability distribution be P s (x) and P t (x), the maximum mean difference value can be expressed as follows:
[0058] Among them, n and m represent the number of vectors in the corresponding source domain and target domain, i and j represent the vectors in the corresponding source and target domain, and H represents the reproducing kernel Hilbert space. represents the value of the i-th vector in the source domain mapped to H, represents the value of j vectors in the target domain mapped to H, and φ(·) represents the mapping from X to H. The mapping between the two domains is realized by using Gaussian kernel function, and the mapping is expressed as Where σ is the radial bandwidth of the kernel function.
[0059] Finally, the average of the normalized results is taken as the similarity of each source domain user to the target domain user, that is, Among them, S MD * and S MMD * are the normalized results of MD and MMD values according to the normalization process described below, S MD-MMD Indicates the similarity of each source domain user to the target domain user.
[0060] It should be noted that S MD-MMD The smaller the value, the stronger the similarity between the source domain users and the target domain users, and the more conducive it is to the transfer learning of the load data of the source domain users to the load data of the target domain users.
[0061] S104, constructing a temporal convolutional neural network, using the feature matrix of the large sample load data set with the smallest similarity as the training data of the temporal convolutional neural network, and optimizing the hyperparameters of the temporal convolutional neural network in combination with the snow melting optimizer until the temporal convolutional neural network training is completed, and obtaining a load prediction model that can predict the power load of users in the target domain.
[0062] In this embodiment, in order to achieve accurate and reliable load forecasting, many methods based on machine learning and deep learning have emerged. These include traditional machine learning methods such as support vector machines and decision trees, as well as deep learning methods such as long short-term memory neural networks. However, these models have two obvious shortcomings: first, they usually require a large amount of historical data for training model parameters; second, as parameter models, they cannot effectively quantify the uncertainty of load forecasting. There are some problems in the current field of power system load forecasting. For example, the common recurrent neural network method in source domain load forecasting may face challenges such as gradient explosion and gradient disappearance.
[0063] As a powerful sequence modeling tool, the Temporal Convolutional Network (TCN) performs well in time series forecasting tasks. It has the ability to capture long-term dependencies and parallel computing, and is suitable for processing the temporal characteristics of load data. Combining the Temporal Convolutional Network and transfer learning can better cope with the challenges of load forecasting in data-scarce conditions.
[0064] In one embodiment, the temporal convolutional neural network includes a dilated convolutional network and a residual connection network; wherein the residual connection network includes two layers of dilated causal convolution and nonlinear identity mapping.
[0065] In order to obtain long-term and effective historical information, a very deep network model is required to extract features from the historical sequence. To solve this problem, this embodiment introduces dilated convolution in the temporal convolutional neural network, such as Figure 3 As shown in Figure 1, while ensuring sufficient historical valid information, the depth and complexity of the network are greatly reduced. Using dilated convolution can obtain output through fewer network layers, which can avoid the problems of gradient disappearance and training complexity caused by too many layers of ordinary convolution. When training deep networks, residual connection networks, such as Figure 4 As shown in the figure, information can be transferred across layers, thereby improving the training speed of the network and avoiding the problem of gradient disappearance. The residual connection model of the temporal convolutional neural network also includes two layers of convolution and nonlinear identity mapping. In addition, the residual connection module also introduces the linear rectification function (ReLU) as the activation function, introduces weight normalization (Weight Norm) to achieve regularization, and introduces spatial loss (Dropout) to normalize the full channel of each training.
[0066] Snow Ablation Optimizer (SAO) is an effective hyperparameter optimization method that can help neural network models adjust hyperparameters to improve the prediction performance of neural network models. Therefore, combining the snow ablation optimizer with the temporal convolutional neural network can optimize the temporal convolutional neural network and improve the generalization ability and prediction accuracy of the temporal convolutional neural network.
[0067] The parameters of the temporal convolutional neural network are optimized using the snow melt optimizer. The snow melt optimizer iteratively searches the parameter space of the learning rate, convolution kernel size, and number of convolution kernels of the temporal convolutional neural network to seek the best hyperparameter combination to optimize the hyperparameters of the temporal convolutional neural network.
[0068] In the snow melting optimizer, the iterative process starts with a randomly generated population. As shown in the following formula, the entire population is usually modeled as a matrix with N rows and Dim columns, where N represents the size of the population and Dim represents the dimension of the solution space.
[0069] Where L and U represent the lower and upper bounds of the solution space respectively; θ represents a random number in [0,1]. The position calculation formula during exploration is as follows:
[0070]
[0071] Among them, Z i represents the i-th individual in the t-th iteration, BM i (t) represents a vector containing random numbers based on this. In the Gaussian distribution representing Brownian motion, θ1 represents a random number from [0,1], G(t) is the current optimal solution, and Elite(t) is a random individual selected from several elites in the group. is the centroid position of the entire group.
[0072] Elite(t) and The specific expression is as follows:
[0073] Elite(t)∈[G(t),Z 2nd (t),Z 3rd (t),Z c (t)], where Z 2nd (t) and Z 3rd (t) represent the second best individual and the third best individual in the current population. c(t) represents the centroid position of the top 50% of individuals in terms of fitness value, and the individuals in the top 50% of fitness value are named leaders. That is, in each iteration, Elite (t) is randomly selected from the set consisting of the current optimal solution, the second-best individual, the third-best individual, and the centroid position of the leader.
[0074] As snow is converted to liquid water through the act of melting, search agents are encouraged to develop high-quality solutions around the current best solution rather than expanding with highly dispersed features in the solution space. Based on the knowledge of the current best search agent and the position of the group's centroid, individuals are more likely to develop promising areas. In the snow melting optimizer, the snow melting rate is calculated using the following equation:
[0075] Then during the development phase of the snow melt optimizer, the position update equation was given:
[0076]
[0077] Where M is the snowmelt rate; θ2 represents a random number selected from [-1,1].
[0078] To summarize, the complete position update equation for the snowmelt optimizer algorithm is as follows:
[0079] Among them, index a and index b Respectively represent the P in the entire position matrix a and P b The corresponding row number set in .
[0080] After the training of the temporal convolutional neural network is completed, the mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE) and mean absolute percentage error (MAPE) are calculated. Specifically, the calculation of the mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE) and mean absolute percentage error (MAPE) is common knowledge to the technicians in this technical field, so it will not be repeated here. Based on these error values, the optimal hyperparameter combination of the temporal convolutional neural network can be determined.
[0081] The use of snow melt optimizer can effectively improve the performance of temporal convolutional neural network. The prediction results of the power load forecasting model based on snow melt optimizer-temporal convolutional neural network and single temporal convolutional neural network in the target domain are compared. Figure 5As shown in the figure, compared with the single time convolutional neural network model, the power load forecasting model based on snow ablation optimizer-time convolutional neural network can effectively improve the accuracy of the forecast. Therefore, the Mahalanobis distance and the maximum mean difference value are combined as the transfer learning source domain selection method, and the snow ablation optimizer is used to optimize the hyperparameters of the time convolutional neural network, thus proposing a load forecasting model based on snow ablation optimizer-time convolutional neural network transfer learning. The comparison between the prediction results of the load forecasting model and the true value is as follows: Figure 6 As shown in the figure, the load forecasting model can significantly improve the forecasting accuracy and effectively avoid negative migration.
[0082] In some embodiments, before respectively extracting the feature matrices of the large sample load data set and the small sample load data set, the method further includes: preprocessing the large sample load data set of multiple source domain users and the small sample load data set of target domain users; wherein the preprocessing includes any one of missing value processing, outlier processing, and normalization processing.
[0083] During the data collection process of the power metering terminal, there will be many situations that lead to abnormal data collection. Common reasons include problems with the installation and wiring of smart meters, failure of the carrier signal communication function, poor communication efficiency or poor signal of the master station, and sudden changes in the data stored in the meter. These problems will cause missing values in the collected historical load data: some data are not recorded normally, which is manifested as empty values in the data table; sudden changes: due to some reasons, the load change range exceeds the normal peak and trough, and the load is manifested as a sudden sharp increase or decrease; data to be supplemented: due to the equipment itself or known factors such as equipment maintenance and meter damage. Ultimately, it will affect the accuracy and effectiveness of the original data set in the load forecast. Therefore, it is necessary to preprocess the collected data.
[0084] In order to avoid the large proportion of abnormal data in the historical load data of large and small sample load data sets, which affects the prediction results of the power load forecasting model, the following processing methods are used to deal with the above common data anomalies:
[0085] For missing values, delete or replace them according to experience or load curve trends, or identify and delete rows containing missing values through functions to ensure the integrity of experimental data. For mutation values, compare and correct them with data at adjacent times, or compare and correct them with data at the same time of adjacent days. After processing the missing values and mutation values of the collected historical load data, probability statistics can also be used to process the remaining abnormal data. Specifically, the historical load data can be initially corrected through experience, and then the confidence interval can be determined by time periods according to the fluctuation range of the load curve, so as to further identify the remaining abnormal data. Furthermore, signal analysis methods such as wavelet analysis can be used to process abnormal data of historical load data. Wavelets can describe the local characteristics of signals in the time domain and frequency domain. The time-frequency representation of historical load data signals is given by wavelet transform, and the signals can be analyzed in any time domain. In addition, in order to prevent the different orders of magnitude between variables from affecting the accuracy of the model, that is, to eliminate the dimensional differences between different features, the data is normalized as follows:
[0086] Among them, x and x * are the load values before and after normalization, x max and x min are the maximum and minimum values of the load respectively.
[0087] Please refer to Figure 7 , Figure 7 A block diagram of a power load forecasting device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the device comprises:
[0088] The data acquisition module 710 is used to acquire a large sample load data set of multiple source domain users and a small sample load data set of target domain users; wherein the load characteristics of the source domain users are similar to or identical to the load characteristics of the target domain users;
[0089] A feature extraction module 720 is used to extract feature matrices of a large sample load data set and a small sample load data set respectively;
[0090] A similarity calculation module 730 is used to calculate the similarity of each source domain user with respect to the target domain user according to the feature matrix;
[0091] The load forecasting module 740 is used to construct a temporal convolutional neural network, use the feature matrix of the large sample load data set with the smallest similarity as the training data of the temporal convolutional neural network, and optimize the hyperparameters of the temporal convolutional neural network in combination with the snow melting optimizer until the temporal convolutional neural network training is completed, thereby obtaining a load forecasting model that can predict the power load of users in the target domain.
[0092] It should be noted that the specific implementation of each module of the power load prediction device provided in this embodiment can be as described above. Figure 1 The corresponding description of the method embodiment shown in the figure, the device can be used to execute a power load forecasting method of the above method embodiment of the present application, which will not be described in detail here
[0093] It can be seen that an electric load prediction device provided by an embodiment of the present application completes the electric load prediction for target domain users based on temporal convolutional neural networks and transfer learning. First, the load data sets of multiple source domain users and target domain users are preprocessed, and then the feature matrix corresponding to the load data set is extracted by the sliding window method, and the similarity of each source domain relative to the target domain is calculated. The similarities calculated by the two methods are normalized, and the minimum mean of the normalized results is taken as the judgment indicator for selecting source domain users. It should be noted that the smaller the mean of the normalized result, the stronger the similarity of the load characteristics of the source domain users and the target domain users. The feature matrix of the source domain that is highly similar to the target domain users is input into the temporal convolutional network model optimized by the snow melting optimizer to establish a load prediction model, thereby completing the accurate prediction of the small sample load data of the target domain users.
[0094] Please refer to Figure 8 , Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 800 includes a processor 810, a memory 820, a communication interface 830, and at least one communication bus for connecting the processor 810, the memory 820, and the communication interface 830. The memory 820 includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (PROM), or a portable CD-ROM, and the memory 420 is used for related instructions and data.
[0095] The communication interface 830 is used to receive and send data. The processor 810 can be one or more CPUs. When the processor 810 is a CPU, the CPU can be a single-core CPU or a multi-core CPU. The processor 810 in the electronic device 800 is used to read one or more programs 821 stored in the memory 820, and perform the following operations: obtain a large sample load data set of multiple source domain users and a small sample load data set of target domain users; wherein the load characteristics of the source domain users are similar or identical to the load characteristics of the target domain users; extract the feature matrix of the large sample load data set and the small sample load data set respectively; calculate the similarity of each source domain user to the target domain user based on the feature matrix; construct a temporal convolutional neural network, use the feature matrix of the large sample load data set with the smallest similarity as the training data of the temporal convolutional neural network, and optimize the hyperparameters of the temporal convolutional neural network in combination with the snow melting optimizer until the temporal convolutional neural network training is completed, and obtain a load prediction model that can predict the power load of the target domain users.
[0096] It should be noted that the specific implementation of each operation of the electronic device 800 can be as described above. Figure 1 The corresponding description of the method embodiment shown, the electronic device 800 can be used to execute a power load forecasting method of the above method embodiment of the present application, which will not be described in detail here.
[0097] In the embodiments of the present disclosure, a computer-readable storage medium is also provided, and the computer-readable storage medium is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in a computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of a power load forecasting method in the above embodiment. It should be understood by those skilled in the art that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0098] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A method for predicting power load, characterized in that: include: Obtain a large sample load data set of multiple source domain users and a small sample load data set of target domain users; Wherein the load characteristics of the source domain users are similar to or identical to the load characteristics of the target domain users; The characteristic matrices of the large sample load data set and the small sample load data are extracted respectively; The similarity of each source domain user to the target domain user is calculated according to the feature matrix; wherein the similarity of each source domain user to the target domain user is calculated according to the feature matrix, including: calculating the Mahalanobis distance and the maximum mean difference value between each source domain user and the target domain user according to the feature matrix of each large sample load data set and the feature matrix of the small sample load data; normalizing the Mahalanobis distance and the maximum mean difference value to obtain the normalized results of the Mahalanobis distance and the maximum mean difference value respectively; calculating the similarity of each source domain user to the target domain user according to the normalized result; wherein the similarity of each source domain user to the target domain user is calculated according to the normalized result, specifically: taking the average value of the normalized results as the similarity of each source domain user to the target domain user; A temporal convolutional neural network is constructed, and the feature matrix of the large sample load data set with the smallest similarity is used as the training data of the temporal convolutional neural network. The hyperparameters of the temporal convolutional neural network are optimized in combination with the snow melting optimizer until the training of the temporal convolutional neural network is completed, and a load forecasting model that can predict the power load of users in the target domain is obtained.
2. A method for predicting power load according to claim 1, characterized in that: Before respectively extracting the feature matrices of the large sample load data set and the small sample load data, the method further includes: Preprocessing is performed on a large sample load data set of multiple source domain users and a small sample load data set of target domain users; wherein the preprocessing includes any one of missing value processing, outlier processing, and normalization processing.
3. A method for predicting power load according to claim 2, characterized in that: The sliding window algorithm is used to extract the feature matrices of large sample load data sets and small sample load data respectively.
4. A method for predicting power load according to claim 1, characterized in that: The hyperparameters include a parameter space of a learning rate, a convolution kernel size, and a number of convolution kernels.
5. A method for predicting power load according to claim 1, characterized in that: The temporal convolutional neural network includes a dilated convolutional network and a residual connection network; wherein the residual connection network includes two layers of dilated causal convolution and nonlinear identity mapping.
6. A power load forecasting device, characterized in that: The device includes: A data acquisition module, used to acquire a large sample load data set of multiple source domain users and a small sample load data set of target domain users; wherein the load characteristics of the source domain users are similar to or identical to the load characteristics of the target domain users; A feature extraction module is used to extract feature matrices of a large sample load data set and a small sample load data set respectively; A similarity calculation module is used to calculate the similarity of each source domain user relative to the target domain user according to the feature matrix; wherein, the similarity of each source domain user relative to the target domain user is calculated according to the feature matrix, including: calculating the Mahalanobis distance and the maximum mean difference value between each source domain user and the target domain user according to the feature matrix of each large sample load data set and the feature matrix of the small sample load data; normalizing the Mahalanobis distance and the maximum mean difference value to obtain the normalized results of the Mahalanobis distance and the maximum mean difference value respectively; calculating the similarity of each source domain user relative to the target domain user according to the normalized result; wherein, the similarity of each source domain user relative to the target domain user is calculated according to the normalized result, specifically: taking the average value of the normalized results as the similarity of each source domain user relative to the target domain user; The load forecasting module is used to construct a temporal convolutional neural network. The feature matrix of the large sample load data set with the smallest similarity is used as the training data of the temporal convolutional neural network. The hyperparameters of the temporal convolutional neural network are optimized in combination with the snow melting optimizer until the temporal convolutional neural network training is completed, and a load forecasting model that can predict the power load of users in the target domain is obtained.
7. An electronic device, characterized in that: The electronic device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the steps of an electric power load forecasting method as described in any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of a power load forecasting method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Short-term power load prediction method based on power consumption behavior similarity between users
CN115099502A
Short-term load prediction method and system based on data fusion and deep learning
CN116957154A