Electricity prediction method, device and computer readable storage medium

By comprehensively considering the power timing, temperature, holiday, wind and weather information, and using the neural network model to perform power forecasting, the problem of inaccurate forecasting caused by the failure to consider seasonal factors in the existing technology is solved, and a more accurate and comprehensive power forecast is achieved. .

CN111899123BActive Publication Date: 2024-09-06SHENZHEN JIANGXING INTELLIGENCE INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010741215.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-28
Publication Date
2024-09-06
Estimated Expiration
2040-07-28

AI Technical Summary

Technical Problem

In the existing technology, power prediction fails to fully consider seasonal factors, resulting in inaccurate prediction results.

Method used

By obtaining power timing information, temperature information, holiday information, wind information and weather information, the neural network model is used to comprehensively consider these factors to predict the power value.

Benefits of technology

The accuracy and comprehensiveness of power forecasting are improved, ensuring that the forecast results are closer to actual power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111899123B
    Figure CN111899123B
Patent Text Reader

Abstract

The present invention discloses a method for predicting electric quantity, which includes: obtaining electric quantity time series information, temperature information, holiday information, wind information and weather information; determining a first prediction value according to the electric quantity time series information, determining a second prediction value according to the temperature information, the holiday information and the wind information, and determining a third prediction value according to the weather information; determining a predicted electric quantity value according to the first prediction value, the second prediction value and the third prediction value; and outputting the predicted electric quantity value. Since multiple factors including electric quantity time series information, temperature information, holiday information, wind information and weather information are comprehensively considered instead of only the factors of electric quantity data, the predicted electric quantity value is predicted, thereby improving the comprehensiveness and accuracy of the result of the electric quantity prediction. In addition, a device for predicting electric quantity and a computer-readable storage medium are also disclosed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a power prediction method, device and computer-readable storage medium. Background Art

[0002] The electricity consumption data of an enterprise can be used to reflect the overall production and development level of the enterprise. Since electricity consumption is basically not affected by human interference or statistical omissions, electricity consumption data can more accurately reflect the economic development status of the enterprise. Accurate electricity consumption forecasts can timely preview the electricity consumption of the enterprise and provide certain guidance for the future development planning of the enterprise.

[0003] The existing technology for predicting electricity consumption data mainly predicts the future electricity consumption of an enterprise through its historical electricity consumption data. However, other influencing factors, such as seasonal factors, are not considered. The electricity demand in different seasons is different. If only electricity consumption data is used for prediction, the prediction result will be inaccurate. Summary of the invention

[0004] The main purpose of the present invention is to provide a power prediction method, device and computer-readable storage medium, aiming to solve the problem of incorrect power data prediction.

[0005] To achieve the above object, the present invention provides a method, device and computer-readable storage medium for predicting power. The method for predicting power includes the following steps:

[0006] Obtain power timing information, temperature information, holiday information, wind speed information and weather information;

[0007] determining a first prediction value according to the power time series information, determining a second prediction value according to the temperature information, the holiday information and the wind force information, and determining a third prediction value according to the weather information;

[0008] Determine a predicted power value according to the first predicted value, the second predicted value and the third predicted value;

[0009] The predicted power value is output.

[0010] In one embodiment, the step of determining a first prediction value according to the power time series information, determining a second prediction value according to the temperature information, the holiday information, and the wind force information, and determining a third prediction value according to the weather information, and determining a predicted power value according to the first prediction value, the second prediction value, and the third prediction value includes:

[0011] Inputting the power time series information, temperature information, holiday information, wind information and weather information into a preset power prediction model;

[0012] Obtain the predicted electricity value output by the electricity prediction model, wherein the electricity prediction model determines a first prediction value based on the electricity time series information, determines a second prediction value based on the temperature information, the holiday information and the wind information, and determines a third prediction value based on the weather information, and outputs the predicted electricity value based on the first prediction value, the second prediction value and the third prediction value.

[0013] In one embodiment, before the step of inputting the power time series information, temperature information, holiday information, wind information and weather information into a preset power prediction model, the step further includes:

[0014] Acquire a first training set, a second training set, and a third training set, wherein the first training set includes a plurality of power timing training information, the second training set includes a plurality of groups of training information, the training information includes temperature training information, holiday training information, and wind force training information, and the third training set includes a plurality of weather training information;

[0015] Inputting the first training set into a first training layer of a neural network in a preset training model, inputting the second training set into a second training layer of the neural network, and inputting the third training set into a third training layer of the neural network;

[0016] When the convergence value of the fourth training layer of the neural network is less than a preset threshold, the training is stopped, and the training model of the stopped training is saved as a power prediction model, wherein the fourth training layer is trained according to the output values ​​of the first training layer, the second training layer and the third training layer.

[0017] In one embodiment, the step of inputting the first training set into the first training layer of the neural network in the preset training model includes:

[0018] Determine an abnormal power value in the power time series training information, wherein the power time series training information includes a plurality of power values ​​that are sequentially adjacent in time;

[0019] Determine an average value corresponding to the power values ​​adjacent to the abnormal power value;

[0020] Replacing the abnormal power value with the average value corresponding to the abnormal power value to obtain processed power time series training information;

[0021] The processed electrical quantity timing training information is input into the first training layer, and the first training set includes the processed electrical quantity timing training information.

[0022] In one embodiment, before the step of inputting the second training set into the second training layer of the neural network, the method further includes:

[0023] Determining abnormal air temperature training information and abnormal wind force training information in the training information, the air temperature training information comprising a first preset number of air temperature training parameters, the number of air temperature training parameters in the abnormal air temperature training information being less than the first preset number, and the wind force training information comprising a second preset number of wind force training parameters, the number of wind force training parameters in the abnormal wind force training information being less than the second preset number;

[0024] Determine the missing temperature training parameters in the abnormal temperature training information according to each temperature training parameter in the abnormal temperature training information, and determine the missing temperature training parameters in the abnormal temperature training information according to each temperature training parameter in the abnormal temperature training information;

[0025] Determine the wind force training parameters missing from the abnormal wind force training information according to each wind force training parameter in the abnormal wind force training information, and determine the wind force training parameters missing from the abnormal wind force training information according to each wind force training parameter in the abnormal wind force training information;

[0026] The missing air temperature training parameters are added to the abnormal air temperature training information, and the missing wind force training parameters are added to the abnormal wind force training information.

[0027] In one embodiment, before the step of inputting the first training set into the first training layer of the neural network in the preset training model, the step includes:

[0028] Determine at least one of a learning rate, a weight initialization method, and a regularization coefficient corresponding to the first training layer, the second training layer, the third training layer, and the fourth training layer in the training model according to a grid search algorithm;

[0029] The training parameters of the training model are set according to at least one of the learning rate, the weight initialization method, and the regularization coefficient.

[0030] In one embodiment, before the step of determining the third prediction value according to the weather information, the method further includes:

[0031] Determine a word matrix corresponding to the weather information according to the weather information;

[0032] Determine the word vector corresponding to the weather information according to the correspondence between the word matrix and the word vector and the word matrix;

[0033] A third prediction value is determined based on the word vector.

[0034] To achieve the above objectives, the present invention also provides a power prediction device, which includes a memory, a processor, and a power prediction program stored in the memory and executable on the processor, and when the power prediction program is executed by the processor, it implements the various steps of the power prediction method described above.

[0035] In one embodiment, the power prediction device includes a power prediction model, and the network of the power prediction model includes a first processing layer, a second processing layer, a third processing layer and a fourth processing layer; the fourth processing layer outputs a predicted power value based on the output values ​​of the first processing layer, the second processing layer and the third processing layer.

[0036] To achieve the above objectives, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores an electric quantity prediction program, and when the electric quantity prediction program is executed by a processor, the various steps of the electric quantity prediction method described above are implemented.

[0037] The power forecasting method, device and computer-readable storage medium provided by the present invention first obtain power time series information, temperature information, holiday information, wind information and weather information; then determine a first forecast value according to the power time series information, determine a second forecast value according to the temperature information, holiday information and wind information, and determine a third forecast value according to the weather information; finally determine and output the forecasted power value according to the first forecast value, the second forecast value and the third forecast value. Since multiple factors such as power time series information, temperature information, holiday information, wind information and weather information are comprehensively considered instead of only the power data factor, the forecasted power value is predicted, thereby improving the comprehensiveness and accuracy of the power forecast result. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of the hardware structure of the power prediction device involved in an embodiment of the present invention;

[0039] Figure 2 It is a flowchart of a first embodiment of the method for predicting power consumption of the present invention;

[0040] Figure 3 It is a flow chart of a second embodiment of the method for predicting power consumption of the present invention;

[0041] Figure 4 It is a flow chart of a third embodiment of the method for predicting power consumption of the present invention;

[0042] Figure 5 Schematic diagram of a flow chart of a fourth embodiment of a method for predicting power consumption according to the present invention;

[0043] Figure 6This is a schematic diagram of a detailed process of inputting the first training set into the first training layer of the neural network in the preset training model in step S60 of the fifth embodiment of the power prediction method of the present invention;

[0044] Figure 7 FIG. 6 is a flow chart of a sixth embodiment of a method for predicting power consumption according to the present invention.

[0045] Figure 8 This is a detailed flow chart of determining the third prediction value according to the weather information in step S20 in the seventh embodiment of the power prediction method of the present invention;

[0046] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0048] The main solution of the embodiment of the present invention is: obtaining power timing information, temperature information, holiday information, wind information and weather information; determining a first prediction value based on the power timing information, determining a second prediction value based on the temperature information, the holiday information and the wind information, and determining a third prediction value based on the weather information; determining a predicted power value based on the first prediction value, the second prediction value and the third prediction value; and outputting the predicted power value.

[0049] Since the power value is predicted by comprehensively considering multiple factors such as power timing information, temperature information, holiday information, wind information and weather information, rather than just considering the power data factor, the comprehensiveness and accuracy of the power prediction results are improved.

[0050] As an implementation scheme, the power prediction device can be Figure 1 shown.

[0051] The embodiment of the present invention relates to an electric quantity prediction device, which includes: a processor 101, such as a CPU, a memory 102, and a communication bus 103. The communication bus 103 is used to realize connection and communication between these components.

[0052] The memory 102 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Figure 1 As shown, the memory 102 as a computer-readable storage medium may include an electric quantity prediction program; and the processor 101 may be used to call the electric quantity prediction program stored in the memory 102 and perform the following operations:

[0053] Obtain power timing information, temperature information, holiday information, wind speed information and weather information;

[0054] determining a first prediction value according to the power time series information, determining a second prediction value according to the temperature information, the holiday information and the wind force information, and determining a third prediction value according to the weather information;

[0055] Determine a predicted power value according to the first predicted value, the second predicted value and the third predicted value;

[0056] The predicted power value is output.

[0057] In one embodiment, the processor 101 may be used to call the power prediction program stored in the memory 102 and perform the following operations:

[0058] Inputting the power time series information, temperature information, holiday information, wind information and weather information into a preset power prediction model;

[0059] Obtain the predicted electricity value output by the electricity prediction model, wherein the electricity prediction model determines a first prediction value based on the electricity time series information, determines a second prediction value based on the temperature information, the holiday information and the wind information, and determines a third prediction value based on the weather information, and outputs the predicted electricity value based on the first prediction value, the second prediction value and the third prediction value.

[0060] In one embodiment, the processor 101 may be used to call the power prediction program stored in the memory 102 and perform the following operations:

[0061] Acquire a first training set, a second training set, and a third training set, wherein the first training set includes a plurality of power timing training information, the second training set includes a plurality of groups of training information, the training information includes temperature training information, holiday training information, and wind force training information, and the third training set includes a plurality of weather training information;

[0062] Inputting the first training set into a first training layer of a neural network in a preset training model; inputting the second training set into a second training layer of the neural network; and inputting the third training set into a third training layer of the neural network;

[0063] When the convergence value of the fourth training layer of the neural network is less than a preset threshold, the training is stopped, and the training model of the stopped training is saved as a power prediction model, wherein the fourth training layer is trained according to the output values ​​of the first training layer, the second training layer and the third training layer.

[0064] In one embodiment, the processor 101 may be used to call the power prediction program stored in the memory 102 and perform the following operations:

[0065] Determine an abnormal power value in the power time series training information, wherein the power time series training information includes a plurality of power values ​​that are sequentially adjacent in time;

[0066] Determine an average value corresponding to the power values ​​adjacent to the abnormal power value;

[0067] Replacing the abnormal power value with the average value corresponding to the abnormal power value to obtain processed power time series training information;

[0068] The processed electrical quantity timing training information is input into the first training layer, and the first training set includes the processed electrical quantity timing training information.

[0069] In one embodiment, the processor 101 may be used to call the power prediction program stored in the memory 102 and perform the following operations:

[0070] Determining abnormal air temperature training information and abnormal wind force training information in the training information, the air temperature training information comprising a first preset number of air temperature training parameters, the number of air temperature training parameters in the abnormal air temperature training information being less than the first preset number, and the wind force training information comprising a second preset number of wind force training parameters, the number of wind force training parameters in the abnormal wind force training information being less than the second preset number;

[0071] Determine the missing temperature training parameters in the abnormal temperature training information according to each temperature training parameter in the abnormal temperature training information, and determine the missing temperature training parameters in the abnormal temperature training information according to each temperature training parameter in the abnormal temperature training information;

[0072] Determine the wind force training parameters missing from the abnormal wind force training information according to each wind force training parameter in the abnormal wind force training information, and determine the wind force training parameters missing from the abnormal wind force training information according to each wind force training parameter in the abnormal wind force training information;

[0073] The missing air temperature training parameters are added to the abnormal air temperature training information, and the missing wind force training parameters are added to the abnormal wind force training information.

[0074] In one embodiment, the processor 101 may be used to call the power prediction program stored in the memory 102 and perform the following operations:

[0075] Determine at least one of a learning rate, a weight initialization method, and a regularization coefficient corresponding to the first training layer, the second training layer, the third training layer, and the fourth training layer in the training model according to a grid search algorithm;

[0076] The training parameters of the training model are set according to at least one of the learning rate, the weight initialization method, and the regularization coefficient.

[0077] In one embodiment, the processor 101 may be used to call the power prediction program stored in the memory 102 and perform the following operations:

[0078] Determine a word matrix corresponding to the weather information according to the weather information;

[0079] Determine the word vector corresponding to the weather information according to the correspondence between the word matrix and the word vector and the word matrix;

[0080] A third prediction value is determined based on the word vector.

[0081] Based on the hardware architecture of the above-mentioned power prediction device, an embodiment of the power connection prediction method of the present invention is proposed.

[0082] Reference Figure 2 , Figure 2 The first embodiment of the power prediction method of the present invention comprises the following steps:

[0083] Step S10: Obtaining power time series information, temperature information, holiday information, wind information and weather information.

[0084] Specifically, the power time series information may be power consumption parameters arranged in chronological order, or the power time series information may be a power consumption parameter sequence converted from power consumption parameters to a certain window length, for example, the power consumption sequence may be sequence data with a window length of 7, indicating power consumption parameters with 7 days as a time step. The power consumption parameters in the power time series information may be expressed in kilowatt-hours or in ten thousand kilowatt-hours.

[0085] The temperature information is weather temperature information, which can be a temperature parameter of the weather including date information, or a sequence of temperature parameters of the weather converted into a certain window length. The temperature parameter in the temperature information can be represented by the average of the highest and lowest temperatures of the day.

[0086] The holiday information is the holiday date corresponding to the national statutory holidays or other holidays.

[0087] Wind force information is information about the degree of wind force, which can be a wind force parameter containing date information, or a sequence of wind force parameters converted into a certain window length. The degree of wind force information can be expressed in wind force levels; a regular expression is used to extract specific numbers from the wind force information, for example, a range of "level 3 to 4" is used to express the wind force information, and the average of the calculated range is used as the wind force parameter of the day in the wind force information.

[0088] Weather information is weather text information used to indicate weather conditions, and may be a weather briefing, wherein the weather information may be cloudy, overcast, or clear, etc. Weather information may be weather data including date information, or may be a weather data sequence converted from weather data into a certain window length.

[0089] Step S20: determining a first prediction value according to the power time series information, determining a second prediction value according to the temperature information, the holiday information and the wind force information, and determining a third prediction value according to the weather information.

[0090] Specifically, the first prediction value is a reference value obtained by calculating the power time series information for determining the predicted power value; the second prediction value is a reference value obtained by calculating the temperature information, holiday information and wind information for determining the predicted power value; the third prediction value is a reference value obtained by calculating the weather information for determining the predicted power value. The first prediction value is determined according to the power time series information, the second prediction value is determined according to the temperature information, holiday information and wind information, and the third prediction value is determined according to the weather information, wherein the first prediction value, the second prediction value and the third prediction value can be calculated by a function formula or by inputting into a neural network.

[0091] Step S30: determining a predicted power value according to the first predicted value, the second predicted value and the third predicted value.

[0092] Specifically, the predicted power value is the power consumption data in the future. The power consumption data in the future is obtained by calculating the power time series information, temperature information, holiday information, wind information and weather information in the past period of time. For example, the power consumption data for the next day can be calculated using the power time series information, temperature information, holiday information, wind information and weather information in the past 7 days.

[0093] Determining the predicted power value according to the first predicted value, the second predicted value, and the third predicted value may be performed by setting weights for the first predicted value, the second predicted value, and the third predicted value, and then calculating the predicted power value. Alternatively, the first predicted value, the second predicted value, and the third predicted value may be input into a neural network model for calculation to obtain the predicted power value.

[0094] Step S40: outputting the predicted power value.

[0095] In the technical solution provided in this embodiment, firstly, the power time series information, temperature information, holiday information, wind information and weather information are obtained; then, the first prediction value is determined according to the power time series information, the second prediction value is determined according to the temperature information, holiday information and wind information, and the third prediction value is determined according to the weather information; finally, the predicted power value is determined and output according to the first prediction value, the second prediction value and the third prediction value. Since the predicted power value is predicted by comprehensively considering multiple factors such as power time series information, temperature information, holiday information, wind information and weather information, rather than only considering the power data factor, the comprehensiveness and accuracy of the power prediction result are improved.

[0096] Reference Figure 3 , Figure 3 This is a second embodiment of the power prediction method of the present invention. Based on the first embodiment, step S20 and step S30 include the following steps:

[0097] Step S21: inputting the power time series information, temperature information, holiday information, wind force information and weather information into a preset power prediction model.

[0098] Specifically, the preset electricity forecasting model is a functional module for electricity forecasting, which can be a neural network model, and can be a neural network model including an LSTM (Long Short-Term Memory) recurrent neural network. The electricity forecasting model can be a multi-input neural network, which is a network structure that can accept multiple input data types, including multiple data types such as numbers, categories, and images. A multi-input neural network is a neural network with multiple input layers at the same time. A neural network structure is established separately for multiple input data. After relatively independent model training, the respective output layers or intermediate layers are combined into a combined layer and put into the same neural network for fusion training.

[0099] Step S31: Obtain the predicted power value output by the power prediction model, wherein the power prediction model determines a first prediction value based on the power timing information, determines a second prediction value based on the temperature information, the holiday information and the wind information, and determines a third prediction value based on the weather information, and outputs the predicted power value based on the first prediction value, the second prediction value and the third prediction value.

[0100] Specifically, the power forecasting model calculates power time series information, temperature information, holiday information, wind information and weather information to obtain a predicted power value, wherein the predicted power value is the future power consumption predicted by the power forecasting model.

[0101] In the technical solution provided in this embodiment, the predicted power value is obtained by analyzing the input data of the power prediction model, and the power prediction model has a fast response speed, thereby improving the efficiency of power prediction. In addition, multiple data are input into the power prediction model to obtain the predicted power value, thereby improving the accuracy of power prediction.

[0102] Reference Figure 4 , Figure 4 This is the third embodiment of the power prediction method of the present invention. Based on the second embodiment, before step 21, the following steps are also included:

[0103] Step S50: Obtain a first training set, a second training set and a third training set, wherein the first training set includes multiple power timing training information, the second training set includes multiple groups of training information, the training information includes temperature training information, holiday training information and wind training information, and the third training set includes multiple weather training information.

[0104] Specifically, the first training set is a training sample set including a plurality of power time series training information, which is used to train the training model, wherein the power time series training information is power time series information used to train the training model.

[0105] The second training set is a training sample set including multiple sets of training information, including temperature training information, holiday training information and wind force training information, which is used to train the training model. The temperature training information is temperature information used to train the training model, the holiday training information is holiday information used to train the training model, and the wind force training information is wind force information used to train the training model.

[0106] The third training set is a training sample set including a plurality of weather training information, and is used to train the training model, wherein the weather training information is weather information used to train the training model.

[0107] Step S60: input the first training set into the first training layer of the neural network in the preset training model, input the second training set into the second training layer of the neural network, and input the third training set into the third training layer of the neural network.

[0108] Specifically, the preset training model is a functional module that learns and analyzes the information in the training sample set. When the training model stops training, the training model becomes a power prediction model. The network of the training model includes a first training layer, a second training layer, a third training layer and a fourth training layer; the fourth training layer outputs a predicted power value according to the output values ​​of the first training layer, the second training layer and the third training layer.

[0109] The first training layer is used to train the first training set, and the first training layer may include an LSTM (Long Short-Term Memory) recurrent neural network and a fully connected layer.

[0110] The second training layer is used to train the second training set, and the second training layer may include an Embedding layer, an LSTM (Long Short-Term Memory) recurrent neural network, and a fully connected layer.

[0111] The third training layer is used to train the third training set, and the third training layer may include a fully connected layer.

[0112] Adding batch normalization layers to the fully connected layer in the first training layer and the fully connected layer in the third training layer can effectively reduce overfitting and reduce the mean absolute percentage error. The batch normalization layer is used to compress the data in the range of [-1,1] and make it obey a normal distribution with a mean of 0 and a variance of 1, thereby effectively solving the problem of vanishing gradients in the neural network and improving the convergence speed of the neural network.

[0113] Step S70: When the convergence value of the fourth training layer of the neural network is less than a preset threshold, stop training and save the training model of the stopped training as a power prediction model, wherein the fourth training layer is trained according to the output values ​​of the first training layer, the second training layer and the third training layer.

[0114] Specifically, the fourth training layer is used to train the output values ​​of the first training layer, the second training layer, and the third training layer, and the fourth training layer may include a fully connected layer. The training model is trained through a large amount of power time series information, temperature information, holiday information, wind information, and weather information. The convergence value of the training model represents the difference between the output result and the expected result after iterative calculation. The preset convergence threshold refers to the expected difference achieved by the training model training. When the convergence value is less than the preset convergence threshold, it means that the output result of the training model data has reached the expected result, so the training of the training model is stopped, and the training model that has stopped training is saved as the power prediction model.

[0115] In the technical solution provided in this embodiment, since a technical means is adopted to train the training model to obtain the power prediction model, the training model is trained through a large number of first training sets, second training sets and third training sets, so that the generated power prediction model comprehensively considers a variety of data, thereby ensuring the accuracy and comprehensiveness of the diagnosis results.

[0116] Reference Figure 5 , Figure 5This is the fourth embodiment of the power prediction method of the present invention. Based on the third embodiment, before step S60, the following steps are further included:

[0117] Step S80: Determine at least one of the learning rate, weight initialization method and regularization coefficient corresponding to the first training layer, the second training layer, the third training layer and the fourth training layer in the training model according to a grid search algorithm.

[0118] Specifically, the grid search algorithm is an exhaustive search method for determining training parameters. It arranges and combines the possible values ​​of each training parameter, lists all possible combinations and generates a "grid". Each combination is then trained, and the performance is evaluated using cross-validation. After trying all parameter combinations, it automatically adjusts to the best parameter combination. Through grid search, training parameters such as learning rate, weight initialization method, and regularization coefficient can be determined. Among them, the learning rate, weight initialization method, and regularization coefficient are hyperparameters pre-adjusted by the training model. By adjusting the hyperparameters, the best hyperparameter combination is found. Among them, the best hyperparameter combination is the hyperparameter combination that minimizes the mean square error corresponding to the training sample set. The best parameter combination makes the training model converge faster and prevents the training model from overfitting. Among them, the test set is a sample set for error analysis of the training model. 10% of the training set can be divided as a test set, and the remaining 90% is used for training the training model.

[0119] Step S90: Setting training parameters of the training model according to at least one of the learning rate, the weight initialization method, and the regularization coefficient.

[0120] Specifically, training parameters are hyperparameters set before training the model.

[0121] In the technical solution provided in this embodiment, by searching and determining the training parameters of the training model, selecting appropriate training parameters can save the training time of the training model, make the training model converge faster, and the error corresponding to the converged training model is smaller.

[0122] Reference Figure 6 , Figure 6 This is the fifth embodiment of the power prediction method of the present invention, based on the third embodiment, step S60 includes the following steps:

[0123] Step S61: determining an abnormal power value in the power time series information, wherein the power time series information includes a plurality of power values ​​that are sequentially adjacent in time.

[0124] Specifically, an abnormal power value is an abnormally large or small power value in the power time series information. For example, the power consumption of an enterprise on holidays is abnormally small compared to the power consumption on non-holidays. The existence of abnormal power values ​​can lead to deviations in power forecasts, or the model cannot converge when training the training model.

[0125] Step S62: Determine the average value of the power values ​​adjacent to the abnormal power value.

[0126] Specifically, since the power time series information includes multiple power values ​​that are sequentially adjacent in time, the power values ​​adjacent to the abnormal power value can be determined, and the adjacent power values ​​can be multiple adjacent power values. The average value of the adjacent power values ​​is the average value of the multiple power values.

[0127] Step S63: Replace the abnormal power value with the average value corresponding to the abnormal power value to obtain processed power timing information, input the processed power timing training information into the first training layer, and the first training set includes the processed power timing training information.

[0128] Specifically, the average value replaces the abnormal power value in the power time series information, thereby obtaining new power time series information.

[0129] In the technical solution provided in this embodiment, since there may be abnormal power consumption data in the power time series information, such as abnormally low power consumption data on holidays, the power time series information needs to be preprocessed before determining the first prediction value.

[0130] Reference Figure 7 , Figure 7 This is the sixth embodiment of the power prediction method of the present invention, based on the third embodiment, and before step S50, the following steps are further included:

[0131] Step S100: Determine abnormal air temperature training information and abnormal wind force training information in the training information, the air temperature training information includes a first preset number of air temperature training parameters, and the number of air temperature training parameters in the abnormal air temperature training information is less than the first preset number, and the wind force training information includes a second preset number of wind force training parameters, and the number of wind force training parameters in the abnormal wind force training information is less than the second preset number.

[0132] Specifically, the abnormal temperature training information is temperature training information with missing values, and the number of temperature training parameters in the abnormal temperature training information is less than the first preset number corresponding to the temperature training parameters in the normal temperature training information. The temperature training parameters are the temperature parameters of the weather in the temperature training information.

[0133] Abnormal wind training information is wind training information with missing values, and the number of wind training parameters in the abnormal wind training information is less than the second preset number corresponding to the wind training parameters in the normal wind training information. The wind training parameters are wind parameters in the wind training information.

[0134] Step S110: Determine the missing temperature training parameters in the abnormal temperature training information according to each temperature training parameter in the abnormal temperature training information, and determine the missing temperature training parameters in the abnormal temperature training information according to each temperature training parameter in the abnormal temperature training information; determine the missing wind training parameters in the abnormal wind training information according to each wind training parameter in the abnormal wind training information, and determine the missing wind training parameters in the abnormal wind training information according to each wind training parameter in the abnormal wind training information.

[0135] Specifically, the missing temperature training parameter is a temperature training parameter that does not exist in the temperature training information. The missing temperature training parameter in the abnormal temperature parameters is determined, and the missing temperature training parameter is determined according to each temperature training parameter in the abnormal temperature training information. The average value of each temperature training parameter can be used as the missing temperature training parameter.

[0136] The missing wind training parameter is a wind training parameter that does not exist in the wind training information. The missing wind training parameter in the abnormal wind parameters is determined, and the missing wind training parameter is determined according to each wind training parameter in the abnormal wind training information. The average value of each wind training parameter can be used as the missing wind training parameter.

[0137] Step S120: adding the missing air temperature training parameters to the abnormal air temperature training information, and adding the missing wind force training parameters to the abnormal wind force training information.

[0138] Specifically, after the missing air temperature training information is added to the abnormal air temperature training information, the number of air temperature training parameters in the air temperature training information meets the first preset number. After the missing wind force training information is added to the abnormal wind force training information, the number of wind force training parameters in the wind force training information meets the second preset number.

[0139] For the convenience of description, the Figure 7 In the embodiment, steps S100 - S120 are located before step S50 , but steps S100 - S120 may be located before step S60 .

[0140] In the technical solution provided by this embodiment, due to the existence of abnormal temperature training information and abnormal wind force training information, large errors may occur when training the training model. Data replacement is performed on the abnormal temperature training information and abnormal wind force training information to ensure the integrity of the data in the temperature information and wind force information, so that the model converges faster during model training and the prediction result is more accurate when power prediction is performed.

[0141] Reference Figure 8 , Figure 8 This is a seventh embodiment of the power prediction method of the present invention, based on any one of the first to sixth embodiments, wherein determining the third prediction value according to the weather information in step S20 includes:

[0142] Step S22: Determine a word matrix corresponding to the weather information according to the weather information.

[0143] Specifically, the word matrix is ​​a matrix used to represent information corresponding to a word. The text data in the weather information is converted into the form of a word matrix for training a training model, or for inputting into a power prediction model for power prediction.

[0144] Step S23: Determine the word vector corresponding to the weather information according to the correspondence between the word matrix and the word vector and the word matrix; and determine the third prediction value according to the word vector.

[0145] Specifically, the correspondence between the word matrix and the word vector can be a simple mapping from a one-hot matrix to a word vector, and the correspondence between the word matrix and the word vector is obtained after training a neural network (such as an Embedding layer). Through the correspondence between the word matrix and the word vector and the word matrix, the word vector corresponding to each word in the compression dimension can be determined, thereby achieving dimensionality reduction and feature extraction of text data. Feature extraction and calculation are performed on the information contained in the word vector to determine the third prediction value.

[0146] In the technical solution provided in this embodiment, the text data in the weather information is converted into a word matrix, the word vector is determined by the word matrix, and the text data is converted into digital information, which facilitates quantification of the weather information and calculation of the third prediction value.

[0147] The present invention also provides a power prediction device, which includes a memory, a processor, and a power prediction program stored in the memory and executable on the processor. When the power prediction program is executed by the processor, the various steps of the power prediction method described in the above embodiment are implemented.

[0148] The present invention also provides a power prediction device, which includes a power prediction model. The network of the power prediction model includes a first processing layer, a second processing layer, a third processing layer and a fourth processing layer; the fourth processing layer outputs a predicted power value based on the output values ​​of the first processing layer, the second processing layer and the third processing layer.

[0149] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an electric quantity prediction program, and when the electric quantity prediction program is executed by a processor, the steps of the electric quantity prediction method described in the above embodiment are implemented.

[0150] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0151] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0152] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0153] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for predicting power consumption, characterized in that: The power prediction method comprises: Obtain power timing information, temperature information, holiday information, wind speed information and weather information; Acquire a first training set, a second training set, and a third training set, wherein the first training set includes a plurality of power timing training information, the second training set includes a plurality of groups of training information, the training information includes temperature training information, holiday training information, and wind force training information, and the third training set includes a plurality of weather training information; Inputting the first training set into a first training layer of a neural network in a preset training model, inputting the second training set into a second training layer of the neural network, and inputting the third training set into a third training layer of the neural network; When the convergence value of the fourth training layer of the neural network is less than a preset threshold, the training is stopped, and the training model of the stopped training is saved as the power prediction model, wherein the fourth training layer is trained according to the output values ​​of the first training layer, the second training layer and the third training layer; the power prediction model is a multi-input neural network, a network structure that accepts multiple input data types, and the data types include numbers, categories and images. The multi-input neural network is a neural network with multiple input layers at the same time, and the neural network structure is established separately for multiple input data. After the model training is relatively independent, the respective output layers or intermediate layers are combined into a combined layer and put into the same neural network for fusion training; Input the power time series information, temperature information, holiday information, wind information and weather information into a preset power prediction model; obtain the predicted power value output by the power prediction model, wherein the power prediction model determines a first prediction value according to the power time series information, determines a second prediction value according to the temperature information, the holiday information and the wind information, and determines a third prediction value according to the weather information, the first prediction value is a reference value for determining the predicted power value obtained by calculating the power time series information; the second prediction value is a reference value for determining the predicted power value obtained by calculating the temperature information, the holiday information and the wind information; the third prediction value is a reference value for determining the predicted power value obtained by calculating the weather information; Determining a predicted power value according to the first predicted value, the second predicted value, and the third predicted value includes: inputting the first predicted value, the second predicted value, and the third predicted value into a neural network model for calculation to obtain the predicted power value; The predicted power value is output.

2. The power consumption prediction method according to claim 1, characterized in that: The step of inputting the first training set into the first training layer of the neural network in the preset training model comprises: Determine an abnormal power value in the power time series training information, wherein the power time series training information includes a plurality of power values ​​that are sequentially adjacent in time; Determine an average value corresponding to the power values ​​adjacent to the abnormal power value; Replacing the abnormal power value with the average value corresponding to the abnormal power value to obtain processed power time series training information; The processed electrical quantity timing training information is input into the first training layer, and the first training set includes the processed electrical quantity timing training information.

3. The power consumption prediction method according to claim 1, characterized in that: Before the step of inputting the second training set into the second training layer of the neural network, the method further includes: Determining abnormal air temperature training information and abnormal wind force training information in the training information, the air temperature training information comprising a first preset number of air temperature training parameters, the number of air temperature training parameters in the abnormal air temperature training information being less than the first preset number, and the wind force training information comprising a second preset number of wind force training parameters, the number of wind force training parameters in the abnormal wind force training information being less than the second preset number; Determine the missing temperature training parameters in the abnormal temperature training information according to each temperature training parameter in the abnormal temperature training information, and determine the missing temperature training parameters in the abnormal temperature training information according to each temperature training parameter in the abnormal temperature training information; Determine the wind force training parameters missing from the abnormal wind force training information according to each wind force training parameter in the abnormal wind force training information, and determine the wind force training parameters missing from the abnormal wind force training information according to each wind force training parameter in the abnormal wind force training information; The missing air temperature training parameters are added to the abnormal air temperature training information, and the missing wind force training parameters are added to the abnormal wind force training information.

4. The power consumption prediction method according to claim 1, characterized in that: Before the step of inputting the first training set into the first training layer of the neural network in the preset training model, the method includes: Determine at least one of a learning rate, a weight initialization method, and a regularization coefficient corresponding to the first training layer, the second training layer, the third training layer, and the fourth training layer in the training model according to a grid search algorithm; The training parameters of the training model are set according to at least one of the learning rate, the weight initialization method, and the regularization coefficient.

5. The power prediction method according to any one of claims 1 to 4, characterized in that: The step of determining the third prediction value according to the weather information comprises: Determine a word matrix corresponding to the weather information according to the weather information; Determine the word vector corresponding to the weather information according to the correspondence between the word matrix and the word vector and the word matrix; A third prediction value is determined based on the word vector.

6. A power prediction device, characterized in that: The power prediction device includes a memory, a processor, and a power prediction program stored in the memory and executable on the processor. When the power prediction program is executed by the processor, each step of the power prediction method according to any one of claims 1 to 5 is implemented.

7. The power prediction device according to claim 6, characterized in that: The power prediction device includes a power prediction model, and the network of the power prediction model includes a first processing layer, a second processing layer, a third processing layer and a fourth processing layer; the fourth processing layer outputs a predicted power value according to the output values ​​of the first processing layer, the second processing layer and the third processing layer.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an electric quantity prediction program, and when the electric quantity prediction program is executed by a processor, each step of the electric quantity prediction method according to any one of claims 1 to 5 is implemented.