Electric quantity prediction method and device

By training two neural network models, combining data of historical typical events and meteorological information, accurate prediction of industrial and commercial electricity is achieved, solving the problem of low accuracy in the face of special factors by traditional electricity prediction methods, and improving the accuracy and stability of prediction.

CN119886410APending Publication Date: 2025-04-25国网河北省电力有限公司营销服务中心 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411815616.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

When traditional power prediction methods face factors such as air pollution, emergency response and statutory holidays, the prediction accuracy is low, resulting in a large deviation in power prediction.

Method used

By training two preset neural network models, the first model is trained based on meteorological data before and after historical typical events and the actual value of industrial and commercial electricity, and the second model is trained based on the duration, type, meteorological data and total impact electricity of historical typical events, thereby achieving accurate prediction of industrial and commercial electricity during the target typical events.

Benefits of technology

This method can more accurately consider the impact of typical events on electricity, improve the accuracy and stability of electricity prediction, and compared with traditional methods, the prediction results are faster and more reliable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119886410A_ABST
    Figure CN119886410A_ABST
Patent Text Reader

Abstract

The invention provides an electric quantity prediction method and device, and the method comprises the steps: training a first preset neural network model based on the meteorological data of a preset time period before and after a historical typical event and the actual value of industrial and commercial electric quantity, and obtaining a first model; performing prediction based on the meteorological data and the first model during the historical typical event period to obtain a predicted value of the industrial and commercial power during the historical typical event period, and calculating a total influence power during the historical typical event period based on the predicted value and an actual value of the industrial and commercial power during the historical typical event period; training a second preset neural network model based on the duration and the type of the historical typical event, and the meteorological data and the total influence electric quantity during the historical typical event to obtain a second model; and based on the duration and the type of the target typical event, the meteorological data during the target typical event, the first model and the second model, obtaining a predicted value of the industrial and commercial electric quantity during the occurrence of the target typical event. The industrial and commercial electric quantity of the typical event can be accurately predicted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of industrial and commercial electricity forecasting, and in particular, to an electricity forecasting method and device. Background Art

[0002] Electricity forecast is the prediction of the total amount of electric energy consumed by the load of the power system within a period of time. Its accuracy is closely related to factors such as electricity price stability, power grid security, and user interests. In order to ensure the accuracy of its forecast, marketing, dispatching, trading, development and other disciplines have cooperated with each other and multi-level linkage for many years to ensure the smooth progress of related work.

[0003] Traditional electricity forecasting is to model and forecast all types of electricity as a whole, combined with factors such as climate factors, economic effects, and crop planting areas. However, in recent years, air pollution has been more serious, various meetings have been held frequently, and many regions have implemented emergency responses. In addition, due to various statutory holidays, industrial and commercial electricity consumption often fluctuates greatly, resulting in large deviations in electricity forecasts. Summary of the invention

[0004] In order to overcome the technical problem of inaccurate power prediction in the related art, the embodiments of the present application provide a power prediction method and device.

[0005] This application is implemented through the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a method for predicting power consumption, including:

[0007] Based on the meteorological data of a preset period before and after a typical historical event and the actual value of industrial and commercial electricity consumption, a first preset neural network model is trained to obtain a first model.

[0008] Based on the meteorological data during historical typical events and the first model, predictions are made to obtain predicted values ​​of industrial and commercial electricity during historical typical events, and based on the predicted values ​​and the actual values ​​of industrial and commercial electricity during historical typical events, the total affected electricity during historical typical events is calculated.

[0009] Based on the duration of historical typical events, the types of historical typical events, the meteorological data during the historical typical events and the total impact on electricity, a second preset neural network model is trained to obtain a second model.

[0010] Based on the duration of the target typical event, the type of the target typical event, the meteorological data during the target typical event, the first model and the second model, a predicted value of industrial and commercial electricity consumption during the target typical event is obtained.

[0011] In combination with the first aspect, in some possible implementations, based on the duration of historical typical events, the types of historical typical events, the meteorological data during historical typical events, and the total impact electricity, a second preset neural network model is trained to obtain a second model, including:

[0012] Based on the duration of historical typical events, the daily average of meteorological data during historical typical events is calculated.

[0013] The daily average value and the total impact electricity are normalized respectively, and the normalized data and the types of historical typical events are divided into a training set and a test set, and the second preset neural network model is trained to obtain a second model.

[0014] In combination with the first aspect, in some possible implementations, the daily average value and the total impact power are normalized respectively, and the normalized data and the types of historical typical events are divided into a training set and a test set, and a second preset neural network model is trained to obtain a second model, including:

[0015] The daily average value is combined with the first formula to perform Min-Max Normalization to obtain the first data set.

[0016] The total impact electric quantity is combined with the second formula and normalized by mathematical function to obtain the second data set.

[0017] The first data set, the second data set and the types of typical historical events are used as training sets and test sets to train a second preset neural network model to obtain a second model.

[0018] The first formula is:

[0019]

[0020] Among them, R represents the data before Min-Max Normalization, and R' represents the data after Min-MaxNormalization.

[0021] The second formula is:

[0022]

[0023] Among them, r represents the data before the mathematical function normalization, and r' represents the data after the mathematical function normalization.

[0024] In conjunction with the first aspect, in some possible implementations, based on the predicted value and the actual value of the industrial and commercial electricity during the historical typical event, the total impact electricity during the historical typical event is calculated, including:

[0025] The differences between the predicted values ​​and the actual values ​​of the industrial and commercial electricity during the historical typical events are calculated respectively, and the absolute values ​​of the multiple differences are recorded as the daily affected electricity during the multiple historical typical events.

[0026] The sum of the daily impact electricity during multiple historical typical events is calculated to obtain the total impact electricity.

[0027] In combination with the first aspect, in some possible implementations, based on the duration of the target typical event, the type of the target typical event, the meteorological data during the target typical event, the first model and the second model, obtaining a predicted value of industrial and commercial electricity consumption during the target typical event includes:

[0028] The meteorological data during the target typical event is input into the first model to obtain the initial forecast value of the industrial and commercial electricity volume of the target typical event.

[0029] The duration of the target typical event, the meteorological data during the target typical event, and the type of the target typical event are input into the second model to obtain the total impact electricity of the target typical event.

[0030] Based on the duration of the target typical event, the initial prediction value and the total impact electricity of the target typical event, the predicted value of industrial and commercial electricity during the occurrence of the target typical event is obtained.

[0031] In combination with the first aspect, in some possible implementations, based on the duration of the target typical event, the initial prediction value, and the total impact power of the target typical event, a prediction value of industrial and commercial power during the target typical event is obtained, including:

[0032] The quotient of the total impact electricity of the target typical event and the duration of the target typical event is calculated to obtain the daily impact electricity of the target typical event.

[0033] The difference between the initial forecast value and the daily impact electricity of the target typical event is calculated to obtain the forecast value of industrial and commercial electricity during the target typical event.

[0034] In combination with the first aspect, in some possible implementations, the first preset neural network model and the second preset neural network model are both LSTM neural network models; the error functions of the first preset neural network model and the second preset neural network model are both MSE error functions; the activation functions of the first preset neural network model and the second preset neural network model are both sigmoid function and tanh function; the parameter update algorithms of the first preset neural network model and the second preset neural network model are both RMSprop algorithms; the first preset neural network model and the second preset neural network model both test the accuracy of their own models through absolute percentage error, standardized root mean square error and goodness of fit.

[0035] In combination with the first aspect, in some possible implementations, the learning rates of the first preset neural network model and the second preset neural network model are both updated in real time using a third formula;

[0036] The third formula is:

[0037]

[0038] Among them, α' represents the learning rate after update, α represents the learning rate before update, and t represents the number of iterations.

[0039] In combination with the first aspect, in some possible implementations, meteorological data for a preset period of time before historical typical events, meteorological data for a preset period of time after historical typical events, meteorological data during historical typical events, and meteorological data during target typical events are all obtained through the meteorological platform.

[0040] In a second aspect, an embodiment of the present application provides an electric quantity prediction device, comprising:

[0041] The first modeling module is used to train a first preset neural network model based on meteorological data in a preset period before and after a typical historical event and actual values ​​of industrial and commercial electricity consumption to obtain a first model.

[0042] The first operation module is used to make predictions based on the meteorological data during the historical typical events and the first model to obtain the predicted value of industrial and commercial electricity during the historical typical events, and calculate the total affected electricity during the historical typical events based on the predicted value and the actual value of industrial and commercial electricity during the historical typical events.

[0043] The second modeling module is used to train a second preset neural network model based on the duration of historical typical events, the type of historical typical events, the meteorological data during the historical typical events and the total impact on electricity to obtain a second model.

[0044] The result output module is used to obtain the predicted value of industrial and commercial electricity consumption during the target typical event based on the duration of the target typical event, the type of the target typical event, the meteorological data during the target typical event, the first model and the second model.

[0045] It can be understood that the beneficial effects of the second aspect mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0046] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0047] The present application first obtains a first model by training the meteorological data before and after the historical typical events and the actual value of the industrial and commercial electricity, and then inputs the meteorological data during the historical typical events into the first model for prediction, and obtains the predicted value of the industrial and commercial electricity during the historical typical time, and then calculates the sum of the difference between the predicted value and the actual value to obtain the total affected electricity, and then uses the total affected electricity, the duration of the historical typical events, the type of the historical typical events and the meteorological data during the historical typical events as training data to train the second model, so that the predicted value of the industrial and commercial electricity during the target typical event can be accurately predicted according to the first model, the second model, the duration of the target typical event, the type of the target typical event and the meteorological data. Compared with the traditional method of directly predicting through meteorological data, this prediction method can introduce the impact of the typical event itself on the electricity, making the prediction more accurate. In addition, because the present application splits the specific process of prediction into two models, the data dimension is lower, the model is more efficient during training, and the output result is shorter, ensuring the overall electricity prediction is fast, accurate and stable.

[0048] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0050] Figure 1 It is a flowchart of a power prediction method provided by an embodiment of the present application;

[0051] Figure 2 It is a structural diagram of an electricity prediction device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0052] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0053] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0054] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0055] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0056] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0057] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0058] The present application provides a method for predicting power consumption. Figure 1 is a schematic diagram of the process of the power prediction method provided by an embodiment of the present application, referring to Figure 1 , the detailed description of the power prediction method is as follows:

[0059] Step 101 , based on the meteorological data of a preset period before and after a typical historical event and the actual value of industrial and commercial electricity consumption, a first preset neural network model is trained to obtain a first model.

[0060] Exemplarily, historical typical events may include: emergency responses caused by various holidays, meetings, etc. Meteorological data for a preset period before historical typical events, meteorological data for a preset period after historical typical events, meteorological data during historical typical events, and meteorological data during target typical events are all acquired through the meteorological platform.

[0061] Exemplarily, meteorological data may include: temperature, precipitation, temperature and humidity index, pollution index, etc. The meteorological platform may be an app in a mobile phone or a weather forecast or a weather forecast webpage.

[0062] Specifically, the first model is used to predict normal daily electricity consumption without typical events, and its training data is daily meteorological data and actual values ​​of daily industrial and commercial electricity consumption.

[0063] Step 102, based on the meteorological data during the historical typical event and the first model, a forecast is made to obtain a forecast value of the industrial and commercial electricity during the historical typical event, and based on the forecast value and the actual value of the industrial and commercial electricity during the historical typical event, the total impact electricity during the historical typical event is calculated.

[0064] Exemplarily, based on the predicted value and the actual value of the industrial and commercial electricity during the historical typical event period, calculating the total impact electricity during the historical typical event period may include:

[0065] The differences between the predicted values ​​and the actual values ​​of the industrial and commercial electricity during the historical typical events are calculated respectively, and the absolute values ​​of the multiple differences are recorded as the daily affected electricity during the multiple historical typical events.

[0066] The sum of the daily impact electricity during multiple historical typical events is calculated to obtain the total impact electricity.

[0067] Step 103: Based on the duration of the historical typical events, the types of the historical typical events, the meteorological data during the historical typical events and the total impact on electricity, a second preset neural network model is trained to obtain a second model.

[0068] Exemplarily, the first preset neural network model and the second preset neural network model may be the same or different.

[0069] Exemplarily, step 103 may include:

[0070] Based on the duration of historical typical events, the daily average of meteorological data during historical typical events is calculated.

[0071] The daily average value and the total impact electricity are normalized respectively, and the normalized data and the types of historical typical events are divided into a training set and a test set, and the second preset neural network model is trained to obtain a second model.

[0072] Specifically, in order to speed up the training of the model, the daily average value and the total impact electricity will be normalized. The faster the model training speed, the faster the predicted value of industrial and commercial electricity during the target typical event can be obtained.

[0073] Exemplarily, normalizing the daily average value and the total impact electricity respectively, dividing the normalized data and the types of historical typical events into a training set and a test set, training the second preset neural network model to obtain the second model may include:

[0074] The daily average value is combined with the first formula to perform Min-Max Normalization to obtain the first data set.

[0075] The total impact electric quantity is combined with the second formula and normalized by mathematical function to obtain the second data set.

[0076] The first data set, the second data set and the types of typical historical events are used as training sets and test sets to train a second preset neural network model to obtain a second model. The ratio of the number of data in the training set to the number of data in the test set is 8:2.

[0077] The first formula can be:

[0078]

[0079] Among them, R represents the data before Min-Max Normalization, and R' represents the data after Min-MaxNormalization.

[0080] The second formula can be:

[0081]

[0082] Among them, r represents the data before the mathematical function normalization, and r' represents the data after the mathematical function normalization.

[0083] Exemplarily, the first preset neural network model and the second preset neural network model are both LSTM neural network models; the error functions of the first preset neural network model and the second preset neural network model are both MSE error functions; the activation functions of the first preset neural network model and the second preset neural network model are both sigmoid function and tanh function; the parameter update algorithms of the first preset neural network model and the second preset neural network model are both RMSprop algorithms; the first preset neural network model and the second preset neural network model both test the accuracy of their own models through absolute percentage error, standardized root mean square error and goodness of fit.

[0084] Specifically, the error function is mean-square error (MSE). Since MSE focuses more on the accuracy of the model prediction results, it is more appropriate to choose MSE as the error function in this solution. i is the actual value of industrial and commercial electricity, It is the predicted value of industrial and commercial electricity consumption.

[0085]

[0086] There are three main activation functions used in the LSTM model: ReLU function, sigmoid function, and tanh function. For the power prediction model, sigmoid function and tanh function are used as activation functions.

[0087] The Sigmoid function is a special form of the Logistic function, usually represented by σ(x) or sig(x).

[0088]

[0089] The tanh function is the hyperbolic tangent function obtained by translating and stretching the sigmoid function, and its value range is [-1,1].

[0090]

[0091] The parameter update algorithm is mainly the RMSprop algorithm, as shown below:

[0092]

[0093] Among them, w t is the weight at time step t. α is the learning rate, which determines the speed at which the weight is updated. is the gradient of the objective function with respect to the current weight. V t It is the moving average of the squared gradient, used to smooth gradient changes.

[0094] Specifically, mean absolute percentage error (MAPE), normalized root mean square error (NRMSE), and goodness of fit (Coefficient of Determination, also known as R 2 ) are as follows

[0095]

[0096]

[0097] Among them, E i is the actual value, is the actual average value, is the predicted value.

[0098] Exemplarily, the learning rates of the first preset neural network model and the second preset neural network model are both updated in real time by a third formula;

[0099] The third formula can be:

[0100]

[0101] Among them, α' represents the learning rate after update, α represents the learning rate before update, and t represents the number of iterations.

[0102] The learning rate α of the LSTM model is an important hyperparameter that affects the speed and convergence performance of the model training. At the beginning of training, the learning rate can be set to a larger value, such as 0.01 or 0.001, to speed up the training process. If the loss function of the model decreases slowly or oscillates, you can try to increase the learning rate. On the contrary, if the loss function of the model appears unstable or oscillating, you may need to reduce the learning rate. The learning rate can be set to automatically update, using the learning rate shown above, for more flexibility.

[0103] Step 104 , based on the duration of the target typical event, the type of the target typical event, the meteorological data during the target typical event, the first model and the second model, obtain a predicted value of industrial and commercial electricity consumption during the target typical event.

[0104] Exemplarily, step 104 may include:

[0105] The meteorological data during the target typical event is input into the first model to obtain the initial forecast value of the industrial and commercial electricity volume of the target typical event.

[0106] The duration of the target typical event, the meteorological data during the target typical event, and the type of the target typical event are input into the second model to obtain the total impact electricity of the target typical event.

[0107] Based on the duration of the target typical event, the initial prediction value and the total impact electricity of the target typical event, the predicted value of industrial and commercial electricity during the occurrence of the target typical event is obtained.

[0108] Exemplarily, based on the duration of the target typical event, the initial prediction value, and the total impact power of the target typical event, obtaining the prediction value of industrial and commercial power during the target typical event may include:

[0109] The quotient of the total impact electricity of the target typical event and the duration of the target typical event is calculated to obtain the daily impact electricity of the target typical event.

[0110] The difference between the initial forecast value and the daily impact electricity of the target typical event is calculated to obtain the forecast value of industrial and commercial electricity during the target typical event.

[0111] For example, in some other embodiments, after calculating the daily impact electricity during multiple historical typical events, the daily average value of meteorological data during the historical typical events can be calculated according to the duration of the historical typical events.

[0112] The daily average value is combined with the first formula to perform Min-Max Normalization to obtain the first data set. The daily impact electricity during multiple historical typical events is combined with the second formula to perform mathematical function normalization to obtain the third data set. The first data set, the third data set and the type of historical typical events are used as training sets and test sets to train the third preset neural network model to obtain the third model.

[0113] The meteorological data during the target typical event is input into the first model to obtain the initial forecast value of the industrial and commercial electricity of the target typical event. The duration of the target typical event, the meteorological data during the target typical event, and the type of the target typical event are input into the third model to obtain the daily impact electricity during multiple target typical events. The difference between the initial forecast value and the daily impact electricity during multiple target typical events is calculated to obtain the forecast value of the industrial and commercial electricity during the target typical event.

[0114] Exemplarily, the types of typical events may include: emergency responses caused by various holidays and meetings. In order to ensure the accuracy of the predicted value of industrial and commercial electricity during the target typical event, on the basis of training the third model, the method may also include: determining whether to use the second model or the third model for prediction based on the type of the target typical event. For example: if the type of the target typical event is a holiday, the predicted value obtained by using the third model will be more accurate, and if the type of the target typical event is an emergency response, the predicted value obtained by using the second model will be more accurate.

[0115] The above-mentioned electricity prediction method first obtains a first model through training the meteorological data before and after the historical typical event and the actual value of its industrial and commercial electricity, and then inputs the meteorological data during the historical typical event into the first model for prediction, and obtains the predicted value of industrial and commercial electricity during the historical typical time, and then calculates the sum of the difference between the predicted value and the actual value to obtain the total affected electricity, and then uses the total affected electricity, the duration of the historical typical event, the type of the historical typical event and the meteorological data during the historical typical event as training data to train the second model, so that the predicted value of industrial and commercial electricity during the target typical event can be accurately predicted according to the first model, the second model, the duration of the target typical event, the type of the target typical event and the meteorological data. Compared with the traditional method of directly predicting through meteorological data, this prediction method can introduce the impact of the typical event itself on the electricity, making the prediction more accurate. In addition, because the present application splits the specific process of prediction into two models, the data dimension is lower, the model is more efficient during training, and the output result is shorter, ensuring the overall electricity prediction is fast, accurate and stable.

[0116] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0117] Corresponding to the power prediction method described in the above embodiment, Figure 2 A structural block diagram of an electric power prediction device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0118] See also Figure 2 The power prediction device in the embodiment of the present application may include:

[0119] The first modeling module 201 is used to train a first preset neural network model based on the meteorological data of a preset period before and after a typical historical event and the actual value of industrial and commercial electricity consumption to obtain a first model.

[0120] The first operation module 202 is used to make predictions based on the meteorological data during the historical typical events and the first model to obtain the predicted value of the industrial and commercial electricity during the historical typical events, and calculate the total affected electricity during the historical typical events based on the predicted value and the actual value of the industrial and commercial electricity during the historical typical events.

[0121] The second modeling module 203 is used to train a second preset neural network model based on the duration of historical typical events, the types of historical typical events, the meteorological data during the historical typical events and the total impact electricity to obtain a second model.

[0122] The result output module 204 is used to obtain the predicted value of industrial and commercial electricity consumption during the target typical event based on the duration of the target typical event, the type of the target typical event, the meteorological data during the target typical event, the first model and the second model.

[0123] Exemplarily, the second modeling module 203 may include:

[0124] Based on the duration of historical typical events, the daily average of meteorological data during historical typical events is calculated.

[0125] The daily average value and the total impact electricity are normalized respectively, and the normalized data and the types of historical typical events are divided into a training set and a test set, and the second preset neural network model is trained to obtain a second model.

[0126] Exemplarily, the second modeling module 203 may include:

[0127] The daily average value is combined with the first formula to perform Min-Max Normalization to obtain the first data set.

[0128] The total impact electric quantity is combined with the second formula and normalized by mathematical function to obtain the second data set.

[0129] The first data set, the second data set and the types of typical historical events are used as training sets and test sets to train a second preset neural network model to obtain a second model.

[0130] The first formula can be:

[0131]

[0132] Among them, R represents the data before Min-Max Normalization, and R' represents the data after Min-MaxNormalization.

[0133] The second formula can be:

[0134]

[0135] Among them, r represents the data before the mathematical function normalization, and r' represents the data after the mathematical function normalization.

[0136] Exemplarily, the first operation module 202 may include:

[0137] The differences between the predicted values ​​and the actual values ​​of the industrial and commercial electricity during the historical typical events are calculated respectively, and the absolute values ​​of the multiple differences are recorded as the daily affected electricity during the multiple historical typical events.

[0138] The sum of the daily impact electricity during multiple historical typical events is calculated to obtain the total impact electricity.

[0139] Exemplarily, the result output module 204 may include:

[0140] The meteorological data during the target typical event is input into the first model to obtain the initial forecast value of the industrial and commercial electricity volume of the target typical event.

[0141] The duration of the target typical event, the meteorological data during the target typical event, and the type of the target typical event are input into the second model to obtain the total impact electricity of the target typical event.

[0142] Based on the duration of the target typical event, the initial prediction value and the total impact electricity of the target typical event, the predicted value of industrial and commercial electricity during the occurrence of the target typical event is obtained.

[0143] Exemplarily, the result output module 204 may include:

[0144] The quotient of the total impact electricity of the target typical event and the duration of the target typical event is calculated to obtain the daily impact electricity of the target typical event.

[0145] The difference between the initial forecast value and the daily impact electricity of the target typical event is calculated to obtain the forecast value of industrial and commercial electricity during the target typical event.

[0146] Exemplarily, the first preset neural network model and the second preset neural network model are both LSTM neural network models; the error functions of the first preset neural network model and the second preset neural network model are both MSE error functions; the activation functions of the first preset neural network model and the second preset neural network model are both sigmoid function and tanh function; the parameter update algorithms of the first preset neural network model and the second preset neural network model are both RMSprop algorithms; the first preset neural network model and the second preset neural network model both test the accuracy of their own models through absolute percentage error, standardized root mean square error and goodness of fit.

[0147] Exemplarily, the learning rates of the first preset neural network model and the second preset neural network model are both updated in real time by a third formula;

[0148] The third formula can be:

[0149]

[0150] Among them, α' represents the learning rate after update, α represents the learning rate before update, and t represents the number of iterations.

[0151] Exemplarily, meteorological data for a preset period of time before a historical typical event, meteorological data for a preset period of time after a historical typical event, meteorological data during a historical typical event, and meteorological data during a target typical event are all acquired through the meteorological platform.

[0152] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0153] Those of ordinary skill in the art will appreciate that the templates, units, and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0154] If the module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various power prediction method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal and software distribution medium.

[0155] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A method for predicting power consumption, characterized in that: include: Based on the meteorological data of a preset period before and after a typical historical event and the actual value of industrial and commercial electricity consumption, a first preset neural network model is trained to obtain a first model; Performing a forecast based on the meteorological data during the historical typical event and the first model to obtain a forecast value of industrial and commercial electricity during the historical typical event, and calculating the total impact electricity during the historical typical event based on the forecast value and the actual value of industrial and commercial electricity during the historical typical event; Based on the duration of the historical typical event, the type of the historical typical event, the meteorological data during the historical typical event, and the total impact electricity, training a second preset neural network model to obtain a second model; Based on the duration of the target typical event, the type of the target typical event, the meteorological data during the target typical event, the first model and the second model, a predicted value of industrial and commercial electricity consumption during the target typical event is obtained.

2. The power consumption prediction method according to claim 1, characterized in that: The method of training a second preset neural network model based on the duration of the historical typical event, the type of the historical typical event, the meteorological data during the historical typical event, and the total impact electricity to obtain a second model includes: Based on the duration of the historical typical event, calculating the daily average of the meteorological data during the historical typical event; The daily average value and the total impact electricity are normalized respectively, and the normalized data and the types of historical typical events are divided into a training set and a test set, and a second preset neural network model is trained to obtain a second model.

3. The power consumption prediction method according to claim 2, characterized in that: The daily average value and the total impact power are normalized respectively, and the normalized data and the types of historical typical events are divided into a training set and a test set, and a second preset neural network model is trained to obtain a second model, including: The daily average value is combined with the first formula to perform Min-Max Normalization to obtain a first data set; The total impact electric quantity is combined with the second formula to perform mathematical function normalization to obtain a second data set; Using the first data set, the second data set and the types of typical historical events as a training set and a test set, training the second preset neural network model to obtain a second model; The first formula is: Among them, R represents the data before Min-Max Normalization, and R' represents the data after Min-MaxNormalization; The second formula is: Among them, r represents the data before the mathematical function normalization, and r' represents the data after the mathematical function normalization.

4. The power consumption prediction method according to claim 1, characterized in that: The calculating the total impact electricity during the historical typical event based on the predicted value and the actual value of the industrial and commercial electricity during the historical typical event includes: Calculating the difference between the predicted value and the actual value of the industrial and commercial electricity during the historical typical events respectively, and recording the absolute values ​​of the multiple differences as the daily affected electricity during the multiple historical typical events; The sum of the daily impact electricity during the multiple historical typical events is calculated to obtain the total impact electricity.

5. The power consumption prediction method according to claim 1, characterized in that: The method of obtaining a predicted value of industrial and commercial electricity consumption during the target typical event based on the duration of the target typical event, the type of the target typical event, the meteorological data during the target typical event, the first model, and the second model includes: Inputting the meteorological data during the target typical event into the first model to obtain an initial forecast value of the industrial and commercial electricity consumption of the target typical event; Inputting the duration of the target typical event, the meteorological data during the target typical event, and the type of the target typical event into the second model to obtain the total impact electricity of the target typical event; Based on the duration of the target typical event, the initial predicted value and the total impact electricity of the target typical event, a predicted value of industrial and commercial electricity during the period when the target typical event occurs is obtained.

6. The method for predicting power consumption according to claim 5, characterized in that: The step of obtaining the predicted value of industrial and commercial electricity during the period when the target typical event occurs based on the duration of the target typical event, the initial predicted value, and the total impact electricity of the target typical event includes: Calculate the quotient of the total impact electricity of the target typical event and the duration of the target typical event to obtain the daily impact electricity of the target typical event; The difference between the initial prediction value and the daily impact electricity of the target typical event is calculated to obtain the prediction value of industrial and commercial electricity during the period when the target typical event occurs.

7. The power consumption prediction method according to claim 1, characterized in that: Both the first preset neural network model and the second preset neural network model are LSTM neural network models; the error functions of the first preset neural network model and the second preset neural network model are MSE error functions; the activation functions of the first preset neural network model and the second preset neural network model are sigmoid function and tanh function; the parameter update algorithms of the first preset neural network model and the second preset neural network model are RMSprop algorithms; the first preset neural network model and the second preset neural network model both test the accuracy of their own models through absolute percentage error, standardized root mean square error and goodness of fit.

8. The method for predicting power consumption according to claim 7, characterized in that: The learning rates of the first preset neural network model and the second preset neural network model are both updated in real time by a third formula; The third formula is: Among them, α' represents the learning rate after update, α represents the learning rate before update, and t represents the number of iterations.

9. The method for predicting power consumption according to claim 1, characterized in that: The meteorological data of the preset time period before the historical typical event, the meteorological data of the preset time period after the historical typical event, the meteorological data during the historical typical event and the meteorological data during the target typical event are all acquired through the meteorological platform.

10. A power prediction device, characterized in that: include: A first modeling module is used to train a first preset neural network model based on meteorological data of a preset period before and after a historical typical event and actual values ​​of industrial and commercial electricity consumption to obtain a first model; a first computing module, configured to perform a prediction based on the meteorological data during the historical typical event and the first model to obtain a predicted value of industrial and commercial electricity during the historical typical event, and calculate a total impact electricity during the historical typical event based on the predicted value and an actual value of industrial and commercial electricity during the historical typical event; A second modeling module is used to train a second preset neural network model based on the duration of the historical typical event, the type of the historical typical event, the meteorological data during the historical typical event, and the total impact electricity to obtain a second model; The result output module is used to obtain the predicted value of industrial and commercial electricity consumption during the target typical event based on the duration of the target typical event, the type of the target typical event, the meteorological data during the target typical event, the first model and the second model.