Power load forecasting method, device, equipment and storage medium

By acquiring and cleaning power load information, combining peak and valley curve charts and attention parameters encoded by cosine function, the problem of insufficient power load prediction accuracy in the prior art is solved, and a higher precision power load prediction is achieved.

CN118691125BActive Publication Date: 2024-12-20SHENZHEN JIANGXING INTELLIGENCE INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411171987.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-20
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

The prior art cannot achieve high-precision power load prediction, and traditional methods fail to fully capture the long-term dependence of power load data and the importance of peak and valley periods, resulting in limited prediction accuracy.

Method used

Data cleaning and peak-to-valley curve chart determination by obtaining power load information and impact information, including time, weather, user operation behavior and production activity schedule, using encoder and decoder to encode attention parameters based on cosine function encoding using encoder and decoder Make predictions.

Benefits of technology

The accuracy of power load prediction is improved, and more accurate load prediction is achieved through the combination of peak and valley perception and prediction model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118691125B_ABST
    Figure CN118691125B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and storage medium for predicting electric load, and relates to the technical field of electric load prediction. The present application comprises: obtaining current electric load information and current electric load impact information, wherein the electric load impact information at least includes time information, weather information, user operation behavior, and production activity schedule; performing data cleaning on the electric load information and the electric load impact information to obtain electric load cleaning data and electric load impact information cleaning data; determining an electric load peak-valley value curve according to the electric load cleaning data and the electric load impact information cleaning data; predicting the electric load cleaning data, the electric load impact information cleaning data and the electric load peak-valley value based on an electric load prediction model to obtain an electric load prediction value, thereby realizing load prediction according to the prediction model and peak-valley perception, and improving the prediction accuracy of electric load prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of power load forecasting, and in particular to a power load forecasting method, device, equipment and storage medium. Background Art

[0002] Power load forecasting is an important part of power system operation and management, and is of great significance for ensuring power supply and optimizing resource allocation. With the development of smart grids, big data and artificial intelligence technologies are widely used in power load forecasting. Traditional loss functions such as mean square error (MSE) treat the prediction errors of all time periods equally, which cannot reflect the importance difference of power load peak and valley periods. Traditional forecasting methods often fail to fully capture the long-term dependency of power load data, resulting in limited prediction accuracy. Therefore, there is an urgent need for a power load forecasting method with high prediction accuracy to forecast power load.

[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of this application is to provide a method, device, equipment and storage medium for power load forecasting, aiming to solve the technical problem that high-precision power load forecasting cannot be performed in the prior art.

[0005] To achieve the above objectives, the present application proposes a method for power load forecasting, the method comprising:

[0006] Obtaining current power load information and current power load impact information, wherein the power load impact information includes at least time information, weather information, user operation behavior, and production activity schedule;

[0007] Performing data cleaning on the power load information and the power load impact information to obtain power load cleansing data and power load impact information cleansing data;

[0008] Determine a peak-valley curve of electricity consumption according to the power load cleaning data and the power load impact information cleaning data;

[0009] The power load cleaned data, the power load impact information cleaned data and the power consumption peak and valley values ​​are predicted based on the power load prediction model to obtain the power load prediction value, wherein the power load prediction model includes an encoder and a decoder, the encoder inputs the power load cleaned data, the power load impact information cleaned data and the power consumption peak and valley value curve as a query vector to the decoder, the decoder can embed the query vector into a matrix according to time, the position of the variable of the query vector in the matrix is ​​determined by sine and cosine function encoding, and a position coding matrix is ​​obtained, the attention parameter of the query vector is determined according to the position coding matrix, the query vector is predicted based on the attention parameter, and the power load prediction value is obtained.

[0010] In one embodiment, the step of performing data cleaning on the power load information and the power load impact information to obtain power load cleaned data and power load impact information cleaned data includes:

[0011] Performing data identification on the power load information and the power load impact information to determine normal data and abnormal data in the power load information and the power load impact information;

[0012] Filling missing values ​​in the abnormal data by interpolation to obtain filled data;

[0013] The filling data is combined with the normal data to obtain the power load cleansing data and the power load impact information cleansing data.

[0014] In one embodiment, the step of determining the peak-valley value curve diagram of power consumption according to the power load cleaning data and the power load impact information cleaning data comprises:

[0015] Analyze the power load cleaning data and the power load impact information cleaning data to obtain time information, weather information, and power load information, wherein the time information includes holiday information;

[0016] Sorting the power load cleaning data in order according to time information to obtain a power load curve;

[0017] The power load curve is analyzed to determine the peak and valley values ​​of the power load curve, and a peak-valley value curve diagram of the power load is obtained.

[0018] In one embodiment, the step of predicting the power load cleaned data, the power load impact information cleaned data and the power consumption peak and valley values ​​based on the power load prediction model to obtain the power load prediction value further includes:

[0019] Acquiring historical power load information and historical power load impact information corresponding to the historical power load information;

[0020] Performing data cleaning on the historical power load information and the historical power load impact information to obtain historical power load cleansing data and historical power load impact information cleansing data;

[0021] The historical power load cleaned data, the historical power load impact information cleaned data and the feature matrix are divided into data to obtain a training set and a validation set;

[0022] The training set is input into the initial power load forecasting model for fitting, the weight of the initial power load forecasting model is updated, the updated initial power load forecasting model is verified based on the verification set, and the loss value of the updated initial power load forecasting model is obtained. When the loss value is less than a preset threshold, the updated initial power load forecasting model is output as a power load forecasting model. The initial power load forecasting model includes an encoder and a decoder. The encoder inputs the power load cleaning data, the power load impact information cleaning data and the power consumption peak and valley value curve as a query vector into the decoder. The decoder can embed the query vector into a matrix according to time. The position of the variable of the query vector in the matrix is ​​determined by sine and cosine function encoding, and a position coding matrix is ​​obtained. The attention parameter of the query vector is determined according to the position coding matrix. The query vector is predicted based on the attention parameter to obtain the power load prediction value.

[0023] In one embodiment, the step of updating the weight of the initial power load forecasting model, verifying the updated initial power load forecasting model based on the verification set, and obtaining the loss value of the updated initial power load forecasting model includes:

[0024] Generate an input sequence based on time information using the historical power load information and the power load impact information in the verification set;

[0025] Inputting the input sequence into an encoder to obtain a power load characteristic;

[0026] Arranging the power load characteristics according to time to obtain peak and valley information of the power load;

[0027] Inputting the peak and valley information of the electric load into a decoder to generate an electric load prediction value;

[0028] The true value of the verification set is compared with the power load prediction value to obtain a loss value.

[0029] In one embodiment, after the step of comparing the true value of the validation set with the power load forecast value to obtain the loss value, the step further includes:

[0030] When the loss value is greater than the loss threshold, the updated initial power load prediction model is trained based on the training set, and the steps of inputting the training set into the initial power load prediction model for fitting and updating the weights of the initial power load prediction model are repeated until the loss value is less than the loss threshold.

[0031] In one embodiment, the step of predicting the power load cleaned data, the power load impact information cleaned data and the power consumption peak and valley values ​​based on the power load prediction model to obtain the power load prediction value includes:

[0032] Obtain target forecast time of power load;

[0033] Based on the power load forecasting model, power load forecasting is performed on the target forecasting time, the power load cleaning data, the power load impact information cleaning data and the power consumption peak and valley values ​​to obtain a power load forecast value at the target forecasting time.

[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a power load prediction device, which includes:

[0035] A data collection module is used to obtain current power load information and current power load impact information, wherein the power load impact information includes time information and weather information;

[0036] A data cleaning module, used for cleaning the power load information and the power load impact information to obtain power load cleaning data and power load impact information cleaning data;

[0037] A peak value determination module, used to determine a peak-valley value curve of electricity consumption according to the power load cleaning data and the power load impact information cleaning data;

[0038] The load prediction module is used to predict the power load cleansing data, the power load impact information cleansing data and the power consumption peak and valley values ​​based on the power load prediction model to obtain a power load prediction value.

[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes an electric power load forecasting device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the electric power load forecasting method as described above.

[0040] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the power load forecasting method described above are implemented.

[0041] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the power load forecasting method described above are implemented.

[0042] One or more technical solutions proposed in the present application have at least the following technical effects: obtaining current power load information and current power load impact information, wherein the power load impact information includes at least time information, weather information, user operation behavior, and production activity schedule; performing data cleaning on the power load information and the power load impact information to obtain power load cleaning data and power load impact information cleaning data; determining a peak and valley value curve of electricity consumption based on the power load cleaning data and the power load impact information cleaning data; predicting the power load cleaning data, the power load impact information cleaning data, and the power peak and valley values ​​based on a power load prediction model to obtain a power load prediction value, thereby realizing load prediction based on the prediction model and peak and valley perception, and improving the prediction accuracy of power load prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0045] Figure 1 A schematic diagram of a flow chart provided for the first embodiment of the power load forecasting method of the present application;

[0046] Figure 2 A single-day peak-to-valley curve diagram of power consumption provided in an embodiment of the power load forecasting method of the present application;

[0047] Figure 3 A schematic diagram of a flow chart provided for the second embodiment of the power load forecasting method of the present application;

[0048] Figure 4 This is a schematic diagram of the module structure of the power load prediction device according to an embodiment of the present application;

[0049] Figure 5 Schematic diagram of the equipment structure of the hardware operating environment involved in the power load prediction method in the embodiment of the present application.

[0050] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0051] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0052] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0053] The main solution of the embodiment of the present application is: obtaining the current power load information and the current power load impact information, wherein the power load impact information includes at least time information, weather information, user operation behavior, and production activity schedule; performing data cleaning on the power load information and the power load impact information to obtain power load cleaning data and power load impact information cleaning data; determining a power consumption peak and valley value curve based on the power load cleaning data and the power load impact information cleaning data; and predicting the power load cleaning data, the power load impact information cleaning data, and the power consumption peak and valley values ​​based on a power load prediction model to obtain a power load prediction value.

[0054] In this embodiment, for ease of description, the following description is made by taking identification of the power load prediction device as the execution subject.

[0055] Because existing technologies treat prediction errors of all time periods equally based on traditional loss functions such as mean square error (MSE), they are unable to reflect the differences in importance between peak and valley periods of power load. Traditional prediction methods often fail to fully capture the long-term dependencies of power load data, resulting in limited prediction accuracy.

[0056] The present application provides a solution, by obtaining current power load information and current power load impact information, the power load impact information at least including time information, weather information, user operation behavior, and production activity schedule; performing data cleaning on the power load information and the power load impact information to obtain power load cleaning data and power load impact information cleaning data; determining a power consumption peak and valley value curve chart based on the power load cleaning data and the power load impact information cleaning data; predicting the power load cleaning data, the power load impact information cleaning data, and the power consumption peak and valley values ​​based on a power load prediction model to obtain a power load prediction value, thereby realizing load prediction based on the prediction model and peak and valley perception, and being able to improve the prediction accuracy of power load prediction.

[0057] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a power load forecasting device, etc. The following takes the power load forecasting device as an example to illustrate this embodiment and the following embodiments.

[0058] Based on this, the present application embodiment provides a method for predicting power load. Figure 1 , Figure 1 This is a flow chart of the first embodiment of the power load forecasting method of the present application.

[0059] In this embodiment, the power load prediction method includes steps S10 to S40:

[0060] Step S10, obtaining current power load information and current power load impact information, wherein the power load impact information at least includes time information, weather information, user operation behavior, and production activity schedule.

[0061] It should be noted that power load information refers to the total amount of power or power consumption required by a power system or power equipment at a certain time or over a period of time. It is usually calculated in terms of power and can be used to measure the operating status of the power system or equipment. Power load information refers to factors that affect power load information, which may include weather information, time information and other factors that can affect power load.

[0062] It is understandable that the weather information includes weather data of the area where the power system is located, including air temperature, perceived temperature, weather conditions and other weather data, and the time information includes at least power load information at various times throughout the year and corresponding holiday marks.

[0063] In a specific implementation, when obtaining the current power load information and the current power load impact information, the power load information can be obtained from the current power system, and the time information in the power load impact information can be obtained from the clock, while the corresponding weather data, including air temperature, perceived temperature and weather conditions, are obtained from the current meteorological system.

[0064] Step S20, performing data cleaning on the power load information and the power load impact information to obtain power load cleansing data and power load impact information cleansing data.

[0065] It should be noted that the power load cleansing data and the power load impact information cleansing data refer to the power load data and the power load impact information after the original power load data and the power load impact information are processed by removing duplicates, missing values, abnormal values, etc.

[0066] In the specific implementation, it is first necessary to organize the acquired data, sort the power load data according to time, obtain the changing trend of the power load data over time, and associate the power load impact data of the corresponding time in the power load data sorted according to time, and associate the time, power load, weather conditions, temperature, body temperature, etc., and clean the associated power load data and power load impact data to obtain power load cleaned data and power load impact information cleaned data.

[0067] Exemplarily, the step of performing data cleaning on the power load information and the power load impact information to obtain power load cleaned data and power load impact information cleaned data includes:

[0068] Performing data identification on the power load information and the power load impact information to determine normal data and abnormal data in the power load information and the power load impact information;

[0069] Filling missing values ​​in the abnormal data by interpolation to obtain filled data;

[0070] The filling data is combined with the normal data to obtain the power load cleansing data and the power load impact information cleansing data.

[0071] In the specific implementation, firstly, the power load information and the power load impact information are identified, the power load data is read, including the historical load data and the real-time load data, and the repeated data records in the power data are deduplicated. The deduplicated data is compared with the current power load data and the preset threshold value or the abnormal detection algorithm based on the historical data distribution to determine the normal data and abnormal data in the power load information. And the abnormal data is identified, and the missing value data points in the abnormal data are determined. When the missing values ​​are identified, they can be filled according to the interpolation method, wherein the interpolation method can be any one of the interpolation methods such as linear interpolation, polynomial interpolation, Lagrange interpolation, nearest neighbor interpolation, etc., and the abnormal data is interpolated according to the interpolation method. In the case of a large number of missing values, the missing values ​​can also be filled by machine learning. After the abnormal data is interpolated, it can be merged with the identified normal data. The data in the merging process needs to maintain the original time data and logical order, and the merged data can also be further verified and corrected to ensure the accuracy and integrity of the data. Similarly, the data cleaning method for the power load impact information is consistent with the cleaning method for the power load data.

[0072] Step S30, determining a peak-valley curve of electricity consumption according to the power load cleaning data and the power load impact information cleaning data.

[0073] It should be noted that the peak and valley value graph is used to describe the electricity consumption in the current dimension. When describing the peak and valley value of electricity consumption, the power load can be reflected in the time dimension. Specifically, the power load can be described from a certain day, a certain month, a certain quarter, a certain year or other set time dimensions. The power load can also be described in the weather dimension. Take the power load within a day as an example to draw the peak and valley value curve graph of electricity consumption. Figure 2 , Figure 2 This is a curve chart of peak and valley values ​​of electricity consumption in a single day.

[0074] In a specific implementation, when determining the peak and valley value curve of electricity consumption based on the power load cleaning data and the power load information cleaning data, the power load cleaning data and the power load impact information can be associated, and the weather information, time information and the power load cleaning data can be associated, that is, the correspondence between the weather information and the power load cleaning data, as well as the correspondence between the time information and the power load cleaning data can be obtained, and the peak and valley value curves of electricity consumption corresponding to time and weather can be obtained respectively.

[0075] Exemplarily, the step of determining the peak-valley value curve diagram of power consumption according to the power load cleaning data and the power load impact information cleaning data includes:

[0076] Analyze the power load cleaning data and the power load impact information cleaning data to obtain time information, weather information, and power load information, wherein the time information includes holiday information;

[0077] Sorting the power load cleaning data in order according to time information to obtain a power load curve;

[0078] The power load curve is analyzed to determine the peak and valley values ​​of the power load curve, and a peak-valley value curve diagram of the power load is obtained.

[0079] In a specific implementation, the power load cleaning data and the power load impact information cleaning data are analyzed to obtain time information, weather information, and power load information, wherein the time information includes holiday information. The obtained power load cleaning data is sorted in chronological order to obtain a power load curve, and the power load curve is analyzed to determine the peak and valley values ​​of the power load curve, and obtain a peak-valley value curve of the power load. Specifically, the power load data is sorted in chronological order, wherein when sorting the time, the time information can be marked according to the holiday information to determine the special time points in the power load. It can be understood that people's electricity demand will increase during holidays, which will cause the power load data to be much higher than the power load at other times. Similarly, when the temperature on a certain day is high or low, people's activities of consuming electricity for heating or cooling gradually increase, which will also increase the power load. When the power load line is drawn according to time, it can be found that the power load is higher from 8 to 18 o'clock in a single day. When there are no special holidays, the power load will increase on weekends. The power load data will also increase during holidays, such as National Day and Spring Festival. If we look at it from the dimension of the year, we can find that the power load in summer and winter will be higher than that in other months. When the power load curve is drawn according to the above dimensions, the peak and valley values ​​reflected in the power load curve can be determined, and the peak and valley value curve of the power load can be obtained based on the peak and valley values.

[0080] Step S40, based on the power load prediction model, the power load cleaned data, the power load impact information cleaned data and the power consumption peak and valley values ​​are predicted to obtain the power load prediction value, wherein the power load prediction model includes an encoder and a decoder, the encoder inputs the power load cleaned data, the power load impact information cleaned data and the power consumption peak and valley value curve as a query vector to the decoder, the decoder can embed the query vector into a matrix according to time, the position of the variable of the query vector in the matrix is ​​determined by sine and cosine function encoding, and a position coding matrix is ​​obtained, the attention parameter of the query vector is determined according to the position coding matrix, the query vector is predicted based on the attention parameter, and the power load prediction value is obtained.

[0081] In a specific implementation, when predicting the power load forecast value, the target forecast time of the power load can be obtained; based on the power load forecast model, the target forecast time, the power load cleaning data, the power load impact information cleaning data and the power consumption peak and valley values ​​are used to forecast the power load to obtain the power load forecast value at the target forecast time; according to the target forecast time, the target forecast time, the power load cleaning data, the power load impact information cleaning data and the power consumption peak and valley values ​​can be input into the power load forecast model to obtain the power load forecast value at the target forecast time.

[0082] The present embodiment provides a method for predicting electric load, which obtains current electric load information and current electric load impact information, wherein the electric load impact information includes at least time information, weather information, user operation behavior, and production activity schedule; performs data cleaning on the electric load information and the electric load impact information to obtain electric load cleansing data and electric load impact information cleansing data; determines an electric load peak-valley value curve according to the electric load cleansing data and the electric load impact information cleansing data; predicts the electric load cleansing data, the electric load impact information cleansing data, and the electric load peak-valley value based on an electric load prediction model to obtain an electric load prediction value, thereby realizing load prediction according to the prediction model and peak-valley perception, and improving the prediction accuracy of electric load prediction.

[0083] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 Before step S40, the power load prediction method further includes steps S401 to S404:

[0084] Step S401: Acquire historical power load information and historical power load impact information corresponding to the historical power load information;

[0085] Step S402: performing data cleaning on the historical power load information and the historical power load impact information to obtain historical power load cleansing data and historical power load impact information cleansing data;

[0086] Step S403: partitioning the historical power load cleaned data, the historical power load impact information cleaned data and the feature matrix to obtain a training set and a validation set;

[0087] Step S404: input the training set into the initial power load prediction model for fitting, update the weight of the initial power load prediction model, verify the updated initial power load prediction model based on the verification set, and obtain the loss value of the updated initial power load prediction model. When the loss value is less than a preset threshold, output the updated initial power load prediction model as a power load prediction model. The initial power load prediction model includes an encoder and a decoder. The encoder inputs the power load cleaning data, the power load impact information cleaning data and the power consumption peak and valley value curve as a query vector into the decoder. The decoder can embed the query vector into a matrix according to time. The position of the variable of the query vector in the matrix is ​​determined by sine and cosine function encoding, and a position coding matrix is ​​obtained. The attention parameter of the query vector is determined according to the position coding matrix, and the query vector is predicted based on the attention parameter to obtain the power load prediction value.

[0088] In a specific implementation, historical power load information and the historical power load information are obtained. Corresponding historical power load impact information , where historical power load impact information includes time information , weather information , holiday mark The historical power load impact information is combined with the historical power load to obtain the corresponding relationship between the historical power load information and the historical power load impact information. . Perform data cleaning on the historical power load information and the historical power load impact information to obtain the historical power load cleaned data and the historical power load impact information cleaned data. Perform data partitioning on the historical power load cleaned data, the historical power load impact information cleaned data and the feature matrix to obtain a training set and a validation set, and divide them according to the data volume of 9:1. Then input the training set into the initial power load forecasting model for fitting, update the weight of the initial power load forecasting model, and verify the updated initial power load forecasting model based on the validation set to obtain the loss value of the updated initial power load forecasting model. When the loss value is less than a preset threshold, output the updated initial power load forecasting model as a power load forecasting model, and the initial power load forecasting model is a Transformer model. Among them, the Transformer model is composed of an encoder-decoder, and the correspondence between the historical power load information and the historical power load impact information is input embedded (Input Embedding) with an input sequence. Each element of the input sequence is first converted into an embedding vector in a high-dimensional space, and each element in the input sequence is labeled, and the input sequence is converted into an index table according to the label, and an embedding matrix is ​​defined at the same time. ,in is the dimension of the embedding vector, is the size of the input sequence. For each index in the input sequence , by finding the embedding No. Column to get the corresponding embedding vector , which can be specifically expressed as ,in is a length of The vector of The first position is 1, and the other positions are 0. This operation is actually from the embedding matrix Extract the Then position encoding is performed, which can be done through a linear combination of sine and cosine functions:

[0089] ;

[0090] ;

[0091] in, It's the location. is the dimension, is the dimension of the model.

[0092] The encoder is encoded based on N identical layers stacked together. Each layer contains two main parts: multi-head attention and feedforward network. The encoder extracts the feature information of the historical sequence as the query vector K, V as the content vector, and the normalized output of the target sequence in the decoder as the query vector Q. In multi-head attention, the self-attention mechanism is applied multiple times, each head learns different representations of the sequence, and then these representations are merged. The self-attention module in the Transformer enables the model to dynamically pay attention to information at different positions in the input sequence when processing sequence data, improving the model's ability to understand the input sequence. The expression of the attention mechanism is:

[0093]

[0094] Where: is the attention function, is the dimension of the input sequence.

[0095] The feedforward network consists of two linear layers and a nonlinear activation function, which is expressed as:

[0096]

[0097] in, is the weight matrix, is the bias term.

[0098] The training set is input into the initial power load forecasting model for fitting, the weight of the initial power load forecasting model is updated, the updated initial power load forecasting model is verified based on the verification set, and the loss value of the updated initial power load forecasting model is obtained. When the loss value is less than a preset threshold, the updated initial power load forecasting model is output as the power load forecasting model.

[0099] The steps of updating the weight of the initial power load forecasting model, verifying the updated initial power load forecasting model based on the verification set, and obtaining the loss value of the updated initial power load forecasting model include:

[0100] Generate an input sequence based on time information using the historical power load information and the power load impact information in the verification set;

[0101] Inputting the input sequence into an encoder to obtain a power load characteristic;

[0102] Arranging the power load characteristics according to time to obtain peak and valley information of the power load;

[0103] Inputting the peak and valley information of the electric load into a decoder to generate an electric load prediction value;

[0104] The true value of the verification set is compared with the power load prediction value to obtain a loss value.

[0105] In the specific implementation, the test set data is segmented and input into the model for prediction, the output is denormalized to obtain the prediction result, which is compared with the prediction set data to evaluate the model accuracy. The model uses mean absolute error (MAE), root mean square error (RMSE) and determination coefficient (R-squared) 3 evaluation indicators are used for comprehensive evaluation. The evaluation indicator formula is as follows:

[0106]

[0107]

[0108]

[0109] Where: , are the true value and average value of the test set samples, respectively, and N is the number of samples; Output values ​​for the model.

[0110] Exemplarily, after the step of comparing the true value of the validation set with the power load forecast value to obtain the loss value, the step further includes:

[0111] When the loss value is greater than the loss threshold, the updated initial power load prediction model is trained based on the training set, and the steps of inputting the training set into the initial power load prediction model for fitting and updating the weights of the initial power load prediction model are repeated until the loss value is less than the loss threshold.

[0112] In a specific implementation, after the loss value is calculated, the loss value is compared. When the loss value is greater than the loss threshold, it indicates that the current model training result is not ideal, and therefore the power load prediction model needs to be retrained. Therefore, the steps of inputting the training set into the initial power load prediction model for fitting and updating the weights of the initial power load prediction model can be repeated until the loss value is less than the loss threshold.

[0113] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the power load forecasting method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.

[0114] This application also provides a power load prediction device, please refer to Figure 4 , the power load prediction device comprises:

[0115] The data collection module 10 is used to obtain the current power load information and the current power load impact information, wherein the power load impact information at least includes time information, weather information, user operation behavior, and production activity schedule;

[0116] A data cleaning module 20, configured to clean the power load information and the power load impact information to obtain power load cleaned data and power load impact information cleaned data;

[0117] A peak value determination module 30, configured to determine a peak-valley value curve of power consumption according to the power load cleaning data and the power load impact information cleaning data;

[0118] The load prediction module 40 is used to predict the power load cleansing data, the power load impact information cleansing data and the power consumption peak and valley values ​​based on the power load prediction model to obtain a power load prediction value.

[0119] The power load prediction device provided by the present application adopts the power load prediction method in the above embodiment, which can solve the technical problem that the prior art cannot perform high-precision power load prediction. Compared with the prior art, the beneficial effects of the power load prediction device provided by the present application are the same as the beneficial effects of the power load prediction method provided by the above embodiment, and the other technical features in the power load prediction device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0120] The present application provides an electric load prediction device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the electric load prediction method in the above-mentioned embodiment one.

[0121] Reference below Figure 5 , which shows a schematic diagram of the structure of a power load prediction device suitable for implementing the embodiment of the present application. The power load prediction device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electric power load forecasting device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0122] like Figure 5 As shown, the power load prediction device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the power load prediction device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the power load forecasting device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a power load forecasting device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.

[0123] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0124] The power load prediction device provided by the present application adopts the power load prediction method in the above embodiment, which can solve the technical problem that the prior art cannot perform high-precision power load prediction. Compared with the prior art, the beneficial effects of the power load prediction device provided by the present application are the same as the beneficial effects of the power load prediction method provided by the above embodiment, and the other technical features in the power load prediction device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.

[0125] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0126] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0127] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the power load forecasting method in the above-mentioned embodiment.

[0128] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0129] The computer-readable storage medium may be included in the power load forecasting device; or may exist independently without being installed in the power load forecasting device.

[0130] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the power load forecasting device, the power load forecasting device:

[0131] Obtaining current power load information and current power load impact information, wherein the power load impact information includes at least time information, weather information, user operation behavior, and production activity schedule;

[0132] Performing data cleaning on the power load information and the power load impact information to obtain power load cleansing data and power load impact information cleansing data;

[0133] Determine a peak-valley curve of electricity consumption according to the power load cleaning data and the power load impact information cleaning data;

[0134] The power load cleansing data, the power load impact information cleansing data and the power consumption peak and valley values ​​are predicted based on the power load prediction model to obtain a power load prediction value.

[0135] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0136] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0137] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0138] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned power load forecasting method, and can solve the technical problem that high-precision power load forecasting cannot be performed in the prior art. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the power load forecasting method provided in the above-mentioned embodiment, and will not be repeated here.

[0139] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned power load forecasting method when executed by a processor.

[0140] The computer program product provided by the present application can solve the technical problem that the prior art cannot perform high-precision power load forecasting. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the power load forecasting method provided by the above embodiment, which will not be repeated here.

[0141] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for predicting power load, It is characterized in that The power load forecasting method comprises: Acquire current power load information and current power load impact information, wherein the power load impact information includes at least time information and weather information; Performing data cleaning on the power load information and the power load impact information to obtain power load cleansing data and power load impact information cleansing data; Determine a peak-valley curve of electricity consumption according to the power load cleaning data and the power load impact information cleaning data; Based on the power load prediction model, the power load cleaned data, the power load impact information cleaned data and the power consumption peak and valley value curve are predicted to obtain a power load prediction value; Wherein, the step of predicting the power load cleaned data, the power load impact information cleaned data and the power consumption peak and valley values ​​based on the power load prediction model to obtain the power load prediction value also includes: Acquiring historical power load information and historical power load impact information corresponding to the historical power load information; Performing data cleaning on the historical power load information and the historical power load impact information to obtain historical power load cleansing data and historical power load impact information cleansing data; The historical power load cleaned data, the historical power load impact information cleaned data and the feature matrix are divided into data to obtain a training set and a validation set; The training set is input into the initial power load prediction model for fitting, the weight of the initial power load prediction model is updated, the updated initial power load prediction model is verified based on the verification set, and the loss value of the updated initial power load prediction model is obtained. When the loss value is less than a preset threshold, the updated initial power load prediction model is output as a power load prediction model. The initial power load prediction model includes an encoder and a decoder. The encoder inputs the power load cleaning data, the power load impact information cleaning data and the power consumption peak and valley value curve diagram as a query vector into the decoder. The decoder can embed the query vector into an embedding matrix according to time. The position of the variable of the query vector in the embedding matrix is ​​determined by sine and cosine function encoding, and a position coding matrix is ​​obtained. The attention parameter of the query vector is determined according to the position coding matrix. The query vector is predicted based on the attention parameter to obtain the power load prediction value. The step of updating the weight of the initial power load forecasting model, verifying the updated initial power load forecasting model based on the verification set, and obtaining the loss value of the updated initial power load forecasting model comprises: Generate an input sequence based on time information using the historical power load information and the power load impact information in the verification set; Inputting the input sequence into an encoder to obtain a power load characteristic; Arranging the power load characteristics according to time to obtain peak and valley information of the power load; Inputting the peak and valley information of the electric load into a decoder to generate an electric load prediction value; The true value of the verification set is compared with the power load prediction value to obtain a loss value.

2. The method according to claim 1, It is characterized in that The step of performing data cleaning on the power load information and the power load impact information to obtain power load cleaned data and power load impact information cleaned data comprises: Performing data identification on the power load information and the power load impact information to determine normal data and abnormal data in the power load information and the power load impact information; Filling missing values ​​in the abnormal data by interpolation to obtain filled data; The filling data is combined with the normal data to obtain the power load cleansing data and the power load impact information cleansing data.

3. The method according to claim 1, It is characterized in that The step of determining the peak-valley value curve diagram of power consumption according to the power load cleaning data and the power load impact information cleaning data comprises: Analyze the power load cleaning data and the power load impact information cleaning data to obtain time information, weather information, and power load information, wherein the time information includes holiday information; Sorting the power load cleaning data in order according to time information to obtain a power load curve; The power load curve is analyzed to determine the peak and valley values ​​of the power load curve, and a peak-valley value curve diagram of the power load is obtained.

4. The method according to claim 1, It is characterized in that After the step of comparing the true value of the verification set with the power load forecast value to obtain the loss value, the method further includes: When the loss value is greater than the loss threshold, the updated initial power load prediction model is trained based on the training set, and the steps of inputting the training set into the initial power load prediction model for fitting and updating the weights of the initial power load prediction model are repeated until the loss value is less than the loss threshold.

5. The method according to any one of claims 1 to 4, It is characterized in that The step of predicting the power load cleaned data, the power load impact information cleaned data and the power consumption peak and valley values ​​based on the power load prediction model to obtain the power load prediction value comprises: Obtain target forecast time of power load; Based on the power load forecasting model, power load forecasting is performed on the target forecasting time, the power load cleaning data, the power load impact information cleaning data and the power consumption peak and valley values ​​to obtain a power load forecast value at the target forecasting time.

6. A power load forecasting device, It is characterized in that The device comprises: A data collection module is used to obtain current power load information and current power load impact information, wherein the power load impact information includes time information and weather information; A data cleaning module, used for cleaning the power load information and the power load impact information to obtain power load cleaning data and power load impact information cleaning data; A peak value determination module, used to determine a peak-valley value curve of electricity consumption according to the power load cleaning data and the power load impact information cleaning data; A load prediction module, used to predict the power load cleaned data, the power load impact information cleaned data and the power consumption peak and valley values ​​based on a power load prediction model to obtain a power load prediction value; Wherein, the method of predicting the power load cleaned data, the power load impact information cleaned data and the power consumption peak and valley values ​​based on the power load prediction model to obtain the power load prediction value further includes: Acquiring historical power load information and historical power load impact information corresponding to the historical power load information; Performing data cleaning on the historical power load information and the historical power load impact information to obtain historical power load cleansing data and historical power load impact information cleansing data; The historical power load cleaned data, the historical power load impact information cleaned data and the feature matrix are divided into data to obtain a training set and a validation set; The training set is input into the initial power load prediction model for fitting, the weight of the initial power load prediction model is updated, the updated initial power load prediction model is verified based on the verification set, and the loss value of the updated initial power load prediction model is obtained. When the loss value is less than a preset threshold, the updated initial power load prediction model is output as a power load prediction model. The initial power load prediction model includes an encoder and a decoder. The encoder inputs the power load cleaning data, the power load impact information cleaning data and the power consumption peak and valley value curve diagram as a query vector into the decoder. The decoder can embed the query vector into an embedding matrix according to time. The position of the variable of the query vector in the embedding matrix is ​​determined by sine and cosine function encoding, and a position coding matrix is ​​obtained. The attention parameter of the query vector is determined according to the position coding matrix. The query vector is predicted based on the attention parameter to obtain the power load prediction value. The updating of the weight of the initial power load forecasting model, and verifying the updated initial power load forecasting model based on the verification set to obtain the loss value of the updated initial power load forecasting model includes: Generate an input sequence based on time information using the historical power load information and the power load impact information in the verification set; Inputting the input sequence into an encoder to obtain a power load characteristic; Arranging the power load characteristics according to time to obtain peak and valley information of the power load; Inputting the peak and valley information of the electric load into a decoder to generate an electric load prediction value; The true value of the verification set is compared with the power load prediction value to obtain a loss value.

7. A power load forecasting device, It is characterized in that The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the power load forecasting method according to any one of claims 1 to 5.

8. A storage medium, It is characterized in that The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the power load forecasting method according to any one of claims 1 to 5 are implemented.