CN109685290B - Power consumption prediction method, device and equipment based on deep learning - Google Patents

Power consumption prediction method, device and equipment based on deep learning Download PDF

Info

Publication number
CN109685290B
CN109685290B CN201910109904.0A CN201910109904A CN109685290B CN 109685290 B CN109685290 B CN 109685290B CN 201910109904 A CN201910109904 A CN 201910109904A CN 109685290 B CN109685290 B CN 109685290B
Authority
CN
China
Prior art keywords
sequence
prediction
training
value
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910109904.0A
Other languages
Chinese (zh)
Other versions
CN109685290A (en
Inventor
赵云
肖勇
何恒靖
钱斌
周密
郑楷洪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CSG Electric Power Research Institute
China Southern Power Grid Co Ltd
Original Assignee
CSG Electric Power Research Institute
China Southern Power Grid Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CSG Electric Power Research Institute, China Southern Power Grid Co Ltd filed Critical CSG Electric Power Research Institute
Priority to CN201910109904.0A priority Critical patent/CN109685290B/en
Publication of CN109685290A publication Critical patent/CN109685290A/en
Application granted granted Critical
Publication of CN109685290B publication Critical patent/CN109685290B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Economics (AREA)
  • Software Systems (AREA)
  • Biomedical Technology (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Biophysics (AREA)
  • Strategic Management (AREA)
  • Artificial Intelligence (AREA)
  • Human Resources & Organizations (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Tourism & Hospitality (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a power consumption prediction method based on deep learning, which adopts a sequence-to-sequence seq2seq model comprising a long-short-term memory network LSTM embedded block as a prediction model, enhances the learning and expressivity of the sequence-to-sequence seq2seq model, utilizes historical power consumption data comprising historical time sequence and exogenous characteristic data to train and obtain the prediction model, enables the prediction model to learn and express exogenous characteristics besides time characteristics, increases the constraint on a plurality of factors influencing the power consumption trend, thereby obtaining a prediction model more close to the actual condition of power consumption, and predicts the power consumption through the prediction model to obtain a more accurate power consumption prediction result. The invention also provides a power consumption prediction device and equipment based on deep learning, which have the beneficial effects.

Description

Power consumption prediction method, device and equipment based on deep learning
Technical Field
The invention relates to the field of electricity metering, in particular to a method, a device and equipment for predicting electricity consumption based on deep learning.
Background
The power system is a complex real-time dynamic system and relates to various links such as power generation, power transmission, power distribution, power utilization, scheduling management and the like. Grid load prediction is an important component of power system scheduling.
The electricity consumption and load prediction of enterprises is of a time series prediction type, i.e. predicting future values from historical time data. For the process of time series prediction in the prior art, an autoregressive integral moving average (ARIMA) model is generally adopted, a stationary time series is obtained by differentiating a non-stationary time series, then parameters of the model are obtained by analyzing autocorrelation coefficients and bias correlation coefficients, a data series formed by a predicted object along with time is regarded as a random series, and the model is used for approximately describing the series. However, since the ARIMA model only focuses on the characteristics of the time series itself, and the electricity consumption prediction often has other characteristics besides time, the prediction result obtained by using the ARIMA model to predict the electricity consumption deviates greatly from the actual electricity consumption.
How to improve the accuracy of electricity consumption prediction is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a power consumption prediction method, device and equipment based on deep learning, which improve the accuracy of power consumption prediction compared with the prior art.
In order to solve the technical problems, the invention provides a power consumption prediction method based on deep learning, which comprises the following steps:
training a prediction model in advance according to historical electricity consumption data;
receiving input electric quantity prediction inquiry time and exogenous characteristic parameters;
inputting the electric quantity prediction inquiry time and the exogenous characteristic parameters into the prediction model, and outputting an electric quantity prediction value;
the historical electricity utilization data comprises a historical time sequence and exogenous characteristic data of the historical time sequence, and the prediction model is specifically a sequence-to-sequence seq2seq model comprising a long-short-term memory network LSTM embedded block.
Optionally, both the encoder and the decoder of the prediction model are long-term memory network LSTM.
Optionally, training the prediction model in advance according to the historical electricity consumption data specifically includes:
determining a training input vector and a label value corresponding to the training input vector according to the historical time sequence and the exogenous characteristic data; wherein the training input vector comprises a training period parameter and a characteristic parameter;
inputting the training input vector into a preset sequence to a sequence seq2seq model structure to obtain a training value;
determining the minimum error value of the training value and the label value according to a preset rule;
and adjusting model parameters of the sequence-to-sequence seq2seq model structure according to the error minimum value to obtain the prediction model.
Optionally, the determining, according to a preset rule, the minimum error value between the training value and the tag value specifically includes:
and calculating the negative gradient directions of the training value and the label value by using an Adam gradient descent method so as to determine the error minimum value according to the negative gradient directions.
Optionally, the determining, according to a preset rule, the minimum error value between the training value and the tag value specifically includes:
and calculating the negative gradient directions of the training value and the label value by utilizing an SGD random gradient descent method so as to determine the error minimum value according to the negative gradient directions.
Optionally, when the length of the historical time sequence is greater than a threshold, when the training input vector is input into a preset sequence to sequence seq2seq model structure, the method further includes:
a sliding window memory mechanism applying fixed weights introduces hysteresis data points into the preset sequence-to-sequence seq2seq model structure.
Optionally, the sliding window memory mechanism applying a fixed weight introduces the hysteresis data point into the preset sequence-to-sequence seq2seq model structure, specifically including:
inputting the encoder output value of the lag data point into a full connection layer to reduce the dimension, and adding the encoder output value after the dimension reduction into the input characteristic of a decoder;
and averaging preset data points and neighbor data points to reduce noise and compensate uneven intervals according to the average value.
Optionally, training the prediction model in advance according to the historical electricity consumption data specifically includes:
training by applying a plurality of groups of initialization data to obtain a plurality of initial prediction models; the initialization data sets are in one-to-one correspondence with the initial prediction models;
saving checkpoints in each of the initial predictive models;
calculating a prediction weight of an initial prediction model corresponding to the check point according to the check point;
and carrying out model fusion on each initial prediction model according to each prediction weight to obtain the prediction model.
In order to solve the technical problem, the invention also provides a power consumption prediction device based on deep learning, which comprises:
the training unit is used for training the prediction model in advance according to the historical electricity consumption data;
the receiving unit is used for receiving the input electric quantity prediction inquiry time and the exogenous characteristic parameters;
the calculation unit is used for inputting the electric quantity prediction inquiry time and the exogenous characteristic parameters into the prediction model and outputting an electric quantity prediction value;
the historical electricity utilization data comprises a historical time sequence and exogenous characteristic data of the historical time sequence, and the prediction model is specifically a sequence-to-sequence seq2seq model comprising a long-short-term memory network LSTM embedded block.
In order to solve the technical problem, the invention also provides a power consumption prediction device based on deep learning, which comprises:
a memory for storing instructions, the instructions comprising the steps of any one of the deep learning-based electricity consumption prediction methods described above;
and the processor is used for executing the instructions.
The power consumption prediction method based on deep learning provided by the invention adopts a sequence-to-sequence seq2seq model comprising a long-short-term memory network LSTM embedded block as a prediction model, utilizes historical power consumption data comprising a historical time sequence and exogenous characteristic data to train to obtain the prediction model, and predicts the power consumption through the prediction model. In the prior art, an ARIMA model which only concerns time features is adopted for electricity consumption prediction, the deviation of a prediction result is larger, and because a long short-term memory network LSTM allows exogenous features to be injected into the model, the scheme increases the learning and expressivity from a sequence to a sequence seq2seq model by a long-term memory network LSTM embedded block, so that the prediction model learns and expresses exogenous features besides time features, and the constraint on a plurality of factors which influence electricity consumption trend is increased, thereby obtaining a prediction model which is more close to the actual condition of electricity consumption, and further obtaining a more accurate electricity consumption prediction result. The invention also provides a power consumption prediction device and equipment based on deep learning, which have the beneficial effects and are not repeated here.
Drawings
For a clearer description of embodiments of the invention or of the prior art, the drawings that are used in the description of the embodiments or of the prior art will be briefly described, it being apparent that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained from them without inventive effort for a person skilled in the art.
FIG. 1 (a) is a graph of a first type of enterprise electricity usage;
FIG. 1 (b) is a graph of a second type of enterprise electricity usage;
FIG. 2 (a) is a graph showing the power consumption of a first and second type of enterprises;
FIG. 2 (b) is a graph showing the power consumption of a second type of enterprise;
FIG. 3 (a) is a graph showing the power consumption of a first type of enterprise;
FIG. 3 (b) is a graph of electricity usage by a second type of enterprise;
fig. 4 is a flowchart of a first power consumption prediction method based on deep learning according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a neural unit structure of a long and short term memory network LSTM;
FIG. 6 is a flowchart illustrating a specific implementation of step S40 in FIG. 4 according to an embodiment of the present invention;
FIG. 7 (a) is a schematic diagram of a principle of introducing hysteresis data points according to an embodiment of the present invention;
FIG. 7 (b) is a schematic diagram of a prediction principle after introducing hysteresis data points according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a power consumption prediction device based on deep learning according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a power consumption prediction device based on deep learning according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a power consumption prediction method, device and equipment based on deep learning, which improves the accuracy of power consumption prediction compared with the prior art.
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
FIG. 1 (a) is a graph of a first type of enterprise electricity usage; FIG. 1 (b) is a graph of a second type of enterprise electricity usage; FIG. 2 (a) is a graph showing the power consumption of a first and second type of enterprises; FIG. 2 (b) is a graph showing the power consumption of a second type of enterprise; FIG. 3 (a) is a graph showing the power consumption of a first type of enterprise; FIG. 3 (b) is a graph of electricity usage by a second type of enterprise; fig. 4 is a flowchart of a first power consumption prediction method based on deep learning according to an embodiment of the present invention; fig. 5 is a schematic diagram of the neural unit structure of the long-short term memory network LSTM.
Fig. 1 (a) to 3 (b) illustrate the trend of electricity consumption of different enterprises over time with the date (Day) as the horizontal axis and the electricity consumption (Electricity Consumption) as the vertical axis. In order to better predict the power consumption situation of enterprises, the daily power history curves of a plurality of important power consumption enterprises are analyzed, the curves are classified according to the autocorrelation coefficients and the partial correlation coefficients of the curves, and the daily power curves of the enterprises are found to be mainly divided into three categories:
(1) The stationary profile, as shown in fig. 1 (a) and 1 (b), is apparent for large scale continuous stable production industrial power users.
(2) The periodic curves, as shown in fig. 2 (a) and 2 (b), are apparent in seasonal production.
(3) The unstable profile, as shown in fig. 3 (a) and 3 (b), has a large variation period and poor regularity.
It can be seen that, unlike regional and industry electricity consumption prediction, enterprise electricity consumption is simultaneously influenced by macroscopic and microscopic factors, and if the enterprise electricity consumption influence factors can be systematically analyzed, the prediction accuracy of the enterprise electricity consumption can be improved. However, external characteristic parameters related to the sequence, such as holidays, climate conditions, commodity futures prices and the like, cannot be added in prediction calculation by adopting a mode of training an ARIMA model for prediction in the prior art.
Thus, embodiments of the present invention employ a sequence-to-sequence seq2seq model comprising long and short term memory network LSTM embedded blocks as a predictive model to incorporate exogenous characteristic parameters.
As shown in fig. 4, the power consumption prediction method based on deep learning provided by the embodiment of the invention includes:
s40: the predictive model is trained in advance based on historical electricity usage data.
The historical electricity utilization data comprises a historical time sequence and exogenous characteristic data of the historical time sequence, and the prediction model is specifically a sequence-to-sequence seq2seq model comprising a long-period memory network LSTM embedded block.
The long-short-term memory network LSTM is one type of recurrent neural network RNN. The recurrent neural network RNN memorizes the information before the sequence and applies it to the calculation of the current output, i.e. the output of the sequence is related to the output of the previous state. While long and short term memory networks LSTM have the ability to remove or add information to the state of the cell, managed by a gate structure including a forget gate, an input gate, an output gate, the structure of which is shown in fig. 5. Wherein X is input, t is current time, and h is hidden layer state. The algorithm formula of the long-short-term memory network LSTM is as follows:
f t =σ(W fx x t +W fh h t-1 +b f ) (1)
i t =σ(W ix x t +W ih h t-1 +b i ) (2)
g t =φ(W gx x t +W gh h t-1 +b g ) (3)
o t =σ(W ox x t +W oh h t-1 +b o ) (4)
s t =g t ⊙i t +s t-1 ⊙f t (5)
h t =φ(s t )⊙o t (6)
wherein f t Representing a forget gate; i.e t Representing an input gate; o (o) t Representing an output gate; g t Representing a memory unit; s is(s) t Output results are transmitted to the next LSTM block; h is a t Output results are transmitted to the next layer of neurons; sigma represents the activation function sigmoid; phi represents an activation function tanh; w (W) x (including W fx 、W ix 、W gx 、W ox ) Is a parameter of the input layer; w (W) h (including W fh 、W ih 、W gh 、W oh ) Parameters input for hidden layers; x is x t Inputting a value for an input layer; h is a t-1 Inputting a value for an hidden layer at the previous moment; b (including b) f 、b i 、b g 、b o ) Is constant.
The embodiment of the invention adopts a sequence-to-sequence seq2seq model as a prediction model to predict the time sequence. The sequence-to-sequence seq2seq model is divided into two parts of an encoder and a decoder, a section of sequence and characteristics are input into the encoder, and the encoded result is input into the decoder for decoding, so that a training value is obtained.
The long-term memory network LSTM embedded block can be applied as an encoder or a decoder in a sequence-to-sequence seq2seq model, and a better application mode is that both the encoder and the decoder of the prediction model are long-term memory network LSTM.
S41: and receiving input electric quantity prediction inquiry time and exogenous characteristic parameters.
S42: and inputting the electricity quantity prediction inquiry time and the exogenous characteristic parameters into a prediction model, and outputting an electricity consumption predicted value.
After training to obtain a prediction model, the power consumption can be predicted according to the input power prediction inquiry time and the exogenous characteristic parameters corresponding to the power prediction inquiry time, and the power consumption predicted value is output.
According to the electricity consumption prediction method based on deep learning, which is provided by the embodiment of the invention, a sequence-to-sequence seq2seq model comprising a long-short-term memory network LSTM embedded block is adopted as a prediction model, historical electricity consumption data comprising a historical time sequence and exogenous characteristic data is used for training to obtain the prediction model, and the electricity consumption is predicted through the prediction model. In the prior art, an ARIMA model which only concerns time features is adopted for electricity consumption prediction, the deviation of a prediction result is larger, and because a long short-term memory network LSTM allows exogenous features to be injected into the model, the scheme increases the learning and expressivity from a sequence to a sequence seq2seq model by a long-term memory network LSTM embedded block, so that the prediction model learns and expresses exogenous features besides time features, and the constraint on a plurality of factors which influence electricity consumption trend is increased, thereby obtaining a prediction model which is more close to the actual condition of electricity consumption, and further obtaining a more accurate electricity consumption prediction result.
Fig. 6 is a flowchart of a specific implementation of step S40 in fig. 4 according to an embodiment of the present invention. As shown in fig. 6, in another embodiment, step S40 specifically includes:
s60: a training input vector and a tag value corresponding to the training input vector are determined based on the historical time series and the exogenous characteristic data.
Wherein the training input vector comprises a training period parameter and a feature parameter.
In training the predictive model, the training input vector may be in the form of a three-dimensional vector. A three-dimensional vector (1,30,12) is entered, wherein the parameter 30 indicates the number of days of training, and the parameter 12 includes the characteristics of what day is working day, month, legal holiday, futures, and what day is working day, month, legal holiday, futures, daily power consumption, etc. The corresponding tag value is daily electricity (1,30,1) for the day, and the batch_size is set to 16. The depth of the encoder and decoder of the sequence-to-sequence Seq2Seq model may be set to 30 and the number of layers of the long and short memory network LSTM to 2.
And converting the historical time sequence and the exogenous characteristic data into training input vectors and label values corresponding to the training input vectors according to preset searching and converting rules. The exogenous characteristic is determined according to the factor with the greatest influence on the electricity consumption of the user, and can be obtained by analyzing historical electricity consumption data of the user by a worker or by applying a specific analysis algorithm.
S61: and inputting the training input vector into a preset sequence to a sequence seq2seq model structure to obtain a training value.
S62: and determining the minimum error value of the training value and the label value according to a preset rule.
In a specific implementation, determining the minimum error value between the training value and the tag value requires first determining a negative gradient direction of the error between the training value and the tag value, so as to determine the minimum error value according to the negative gradient direction. The negative gradient direction of the training value and the label value can be calculated by adopting an Adam gradient descent method, and the negative gradient direction of the training value and the label value can also be calculated by adopting an SGD random gradient descent method.
The algorithm principle of the Adam gradient descent method is as follows:
require: step size epsilon (suggested default: 0.001)
Require: exponential decay rate, ρ, of moment estimation 1 And ρ 2 Within interval [0, 1). (default to 0.9 and 0.999, respectively)
Require: small constant delta for numerical stabilization (suggested default to 10@ 8 )
Require: initial parameter θ
Initializing first and second moment variables s=0, r=0
Initialization time step t=0
while does not reach the stop criterion do
From the training set, m samples { x }, are taken (1) ,…,x (m) Small lot size, corresponding to target y (i)
Calculating the gradient:
Figure BDA0001967692010000081
t←t-1
updating the partial first moment estimation: s+.rho 1 s+(1-ρ 1 )g
Updating the biased moment estimate: r+.rho 2 r+(1-ρ 2 )g⊙g
Correcting the deviation of the first moment:
Figure BDA0001967692010000082
correcting the deviation of the second moment:
Figure BDA0001967692010000083
computing and updating:
Figure BDA0001967692010000084
(element-by-element application operation)
Application update: θ≡θ+Δθ
end while
S63: and adjusting model parameters of the sequence to sequence seq2seq model structure according to the error minimum value to obtain a prediction model.
The embodiment of the invention provides a specific implementation mode for training a prediction model, which refines the implementation steps of the power consumption prediction method based on deep learning and improves the practicability and the reference in practical application.
FIG. 7 (a) is a schematic diagram of a principle of introducing hysteresis data points according to an embodiment of the present invention; FIG. 7 (b) is a schematic diagram of a prediction principle after introducing hysteresis data points according to an embodiment of the present invention.
On the basis of the above embodiment, in another embodiment, when the length of the historical time series is greater than the threshold, the power consumption amount prediction method based on the deep learning further includes, when step S61 is performed:
a sliding window memory mechanism employing fixed weights introduces hysteresis data points into the preset sequence-to-sequence seq2seq model structure.
Long and short term memory networks LSTM have very good memory effects for relatively short sequences (within 100-300 items), but cannot be incorporated into the same predictive model when training longer time sequences is desired. Therefore, when the length of the historical time series is greater than the preset threshold, a fixed-weight sliding window memory mechanism can be applied to introduce the hysteresis data points (delayed data) into the preset series to the series seq2seq model structure so as to strengthen the memory of the neuron, for example, the input of the current time series increases the electricity consumption data corresponding to the time of the year before the current time, and the electricity consumption data is used as a sample feature to be added into training.
In an implementation, a sliding window memory mechanism applying fixed weights introduces hysteresis data points into a preset sequence to sequence seq2seq model structure, specifically comprising:
inputting encoder output values of the lag data points into the full connection layer to reduce dimensionality, and adding the encoder output values after the dimensionality reduction into input features of a decoder;
the preset data points and the neighbor data points are averaged to reduce noise and compensate uneven intervals according to the average value.
As shown in fig. 7 (a) and 7 (b), if it is desired to introduce data of the last quarter and the last year as input data, the data of the two time points before the year and before the quarter are fed to the full connection layer after the output of the encoder to reduce the dimension, and the result is added to the input features of the decoder, where "features" are time point features including "last year", "last quarter". The fixed weight sliding window memory mechanism serves two purposes: firstly, the calculation burden of processing high-dimensional input data is reduced, and the data dimension is reduced by selecting a subset of the input through structuring; secondly, the false-proof passbook is removed, so that the task processing system is more focused on finding out significant useful information related to the current output in the input data, and the quality of the output is improved. Important data points (preset data points) are determined by fixed weights, and the important data points are averaged with the neighbors to reduce noise and compensate for uneven spacing.
According to the electricity consumption prediction method based on deep learning, provided by the embodiment of the invention, the hysteresis data points are introduced into the prediction model through the sliding window memory mechanism with fixed weight, so that the time sequence with the length exceeding the memory capacity of the long-short-term memory network LSTM can be learned, and a more practical prediction model is obtained.
On the basis of the above embodiments, in another embodiment, to improve the model prediction accuracy, when training the prediction model in step S40, specifically includes:
training by applying a plurality of groups of initialization data to obtain a plurality of initial prediction models; the initialization data sets are in one-to-one correspondence with the initial prediction models;
saving checkpoints in each initial predictive model;
calculating the prediction weight of the initial prediction model corresponding to the check point according to the check point;
and carrying out model fusion on each initial prediction model according to each prediction weight to obtain a prediction model.
The initialization data is the initial value (seed value) of the model parameters. Because the prediction models obtained by training on the basis of different initial values have different performances, a plurality of groups of model parameters can be trained by applying a plurality of groups of different initial values, check points are stored in each initial prediction model, the prediction weights of the initial prediction models corresponding to the check points are calculated according to the check points, and model fusion is carried out on the initial prediction models according to the prediction weights, so that the prediction models are obtained.
According to the power consumption prediction method based on deep learning, different initialization prediction models are obtained through different initialization data training, the prediction weight of each initial prediction model is determined according to the check point in each initial prediction model, and the final model parameters are obtained through weighted average according to the prediction weight, so that the prediction accuracy of the prediction model is improved.
The invention further discloses a power consumption prediction device based on the deep learning, which corresponds to the power consumption prediction method based on the deep learning.
Fig. 8 is a schematic structural diagram of a power consumption prediction device based on deep learning according to an embodiment of the present invention. As shown in fig. 8, the power consumption prediction apparatus based on deep learning includes:
a training unit 801, configured to train a prediction model in advance according to historical electricity consumption data;
a receiving unit 802, configured to receive an input power prediction query time and an exogenous characteristic parameter;
the calculating unit 803 is configured to input the electricity quantity prediction query time and the exogenous characteristic parameter into a prediction model, and output an electricity consumption prediction value;
the historical electricity utilization data comprises a historical time sequence and exogenous characteristic data of the historical time sequence, and the prediction model is specifically a sequence-to-sequence seq2seq model comprising a long-period memory network LSTM embedded block.
Since the embodiments of the apparatus portion and the embodiments of the method portion correspond to each other, the embodiments of the apparatus portion are referred to the description of the embodiments of the method portion, and are not repeated herein.
Fig. 9 is a schematic structural diagram of a power consumption prediction device based on deep learning according to an embodiment of the present invention. As shown in fig. 9, the deep learning-based power consumption prediction device may vary in configuration or performance, and may include one or more processors (central processing units, CPU) 910 (e.g., one or more processors) and memory 920, one or more storage media 930 (e.g., one or more mass storage devices) storing applications 933 or data 932. Wherein the memory 920 and storage medium 930 may be transitory or persistent storage. The program stored on the storage medium 930 may include one or more modules (not shown), each of which may include a series of instruction operations in the computing device. Still further, the processor 910 may be configured to communicate with a storage medium 930 to execute a series of instruction operations in the storage medium 930 on the deep learning-based power usage prediction device 900.
The deep learning-based power consumption prediction device 900 may also include one or more power supplies 940, one or more wired or wireless network interfaces 950, one or more input/output interfaces 960, and/or one or more operating systems 931, such as Windows Server TM ,Mac OS X TM ,Unix TM ,Linux TM ,FreeBSD TM Etc.
The steps in the deep learning-based electricity consumption prediction method described above with reference to fig. 4 and 6 are implemented by the deep learning-based electricity consumption prediction apparatus based on the structure shown in fig. 9.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working processes of the deep learning-based power consumption prediction apparatus and the computer readable storage medium described above may refer to corresponding processes in the foregoing method embodiments, which are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed method, apparatus, device, and computer readable storage medium may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules is merely a logical function division, and there may be additional divisions of actual implementation, e.g., multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms. The modules illustrated as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
The integrated modules, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in whole or in part in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a function calling device, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The method, the device and the equipment for predicting the power consumption based on the deep learning provided by the invention are described in detail. In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (7)

1. The power consumption prediction method based on deep learning is characterized by comprising the following steps of:
training a prediction model in advance according to historical electricity consumption data;
receiving input electric quantity prediction inquiry time and exogenous characteristic parameters;
inputting the electric quantity prediction inquiry time and the exogenous characteristic parameters into the prediction model, and outputting an electric quantity prediction value;
the historical electricity utilization data comprises a historical time sequence and exogenous characteristic data of the historical time sequence, and the prediction model is specifically a sequence-to-sequence seq2seq model comprising a long-short-term memory network LSTM embedded block;
the training prediction model in advance according to the historical electricity consumption data specifically comprises the following steps:
determining a training input vector and a label value corresponding to the training input vector according to the historical time sequence and the exogenous characteristic data; wherein the training input vector comprises a training period parameter and a characteristic parameter;
inputting the training input vector into a preset sequence to a sequence seq2seq model structure to obtain a training value;
determining the minimum error value of the training value and the label value according to a preset rule;
adjusting model parameters of the sequence-to-sequence seq2seq model structure according to the error minimum value to obtain the prediction model;
when the length of the historical time sequence is greater than a threshold value, when the training input vector is input into a preset sequence to a sequence seq2seq model structure, the method further comprises:
applying a fixed weight sliding window memory mechanism to introduce hysteresis data points into the preset sequence-to-sequence seq2seq model structure;
the sliding window memorization mechanism applying fixed weights introduces the hysteresis data points into the preset sequence-to-sequence seq2seq model structure, and specifically comprises the following steps:
inputting the encoder output value of the lag data point into a full connection layer to reduce the dimension, and adding the encoder output value after the dimension reduction into the input characteristic of a decoder;
and averaging preset data points and neighbor data points to reduce noise and compensate uneven intervals according to the average value.
2. The method of claim 1, wherein the encoder and decoder of the prediction model are long-term and short-term memory network LSTM.
3. The method for predicting power consumption according to claim 1, wherein determining the minimum error value between the training value and the tag value according to a preset rule specifically comprises:
and calculating the negative gradient directions of the training value and the label value by using an Adam gradient descent method so as to determine the error minimum value according to the negative gradient directions.
4. The method for predicting power consumption according to claim 1, wherein determining the minimum error value between the training value and the tag value according to a preset rule specifically comprises:
and calculating the negative gradient directions of the training value and the label value by utilizing an SGD random gradient descent method so as to determine the error minimum value according to the negative gradient directions.
5. The electricity consumption prediction method according to any one of claims 1 to 4, wherein the training of the prediction model in advance based on historical electricity consumption data specifically comprises:
training by applying a plurality of groups of initialization data to obtain a plurality of initial prediction models; the initialization data sets are in one-to-one correspondence with the initial prediction models;
saving checkpoints in each of the initial predictive models;
calculating a prediction weight of an initial prediction model corresponding to the check point according to the check point;
and carrying out model fusion on each initial prediction model according to each prediction weight to obtain the prediction model.
6. The utility model provides a power consumption prediction device based on degree of depth study which characterized in that includes:
the training unit is used for training the prediction model in advance according to the historical electricity consumption data;
the receiving unit is used for receiving the input electric quantity prediction inquiry time and the exogenous characteristic parameters;
the calculation unit is used for inputting the electric quantity prediction inquiry time and the exogenous characteristic parameters into the prediction model and outputting an electric quantity prediction value;
the historical electricity utilization data comprises a historical time sequence and exogenous characteristic data of the historical time sequence, and the prediction model is specifically a sequence-to-sequence seq2seq model comprising a long-short-term memory network LSTM embedded block;
the training unit is specifically used for:
determining a training input vector and a label value corresponding to the training input vector according to the historical time sequence and the exogenous characteristic data; wherein the training input vector comprises a training period parameter and a characteristic parameter;
inputting the training input vector into a preset sequence to a sequence seq2seq model structure to obtain a training value;
determining the minimum error value of the training value and the label value according to a preset rule;
adjusting model parameters of the sequence-to-sequence seq2seq model structure according to the error minimum value to obtain the prediction model;
when the length of the historical time sequence is greater than a threshold value, when the training input vector is input into a preset sequence to a sequence seq2seq model structure, the method further comprises:
applying a fixed weight sliding window memory mechanism to introduce hysteresis data points into the preset sequence-to-sequence seq2seq model structure;
the sliding window memorization mechanism applying fixed weights introduces the hysteresis data points into the preset sequence-to-sequence seq2seq model structure, and specifically comprises the following steps:
inputting the encoder output value of the lag data point into a full connection layer to reduce the dimension, and adding the encoder output value after the dimension reduction into the input characteristic of a decoder;
and averaging preset data points and neighbor data points to reduce noise and compensate uneven intervals according to the average value.
7. A power consumption prediction apparatus based on deep learning, comprising:
a memory for storing instructions comprising the steps of the deep learning-based electricity consumption prediction method of any one of claims 1 to 5;
and the processor is used for executing the instructions.
CN201910109904.0A 2019-02-11 2019-02-11 Power consumption prediction method, device and equipment based on deep learning Active CN109685290B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910109904.0A CN109685290B (en) 2019-02-11 2019-02-11 Power consumption prediction method, device and equipment based on deep learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910109904.0A CN109685290B (en) 2019-02-11 2019-02-11 Power consumption prediction method, device and equipment based on deep learning

Publications (2)

Publication Number Publication Date
CN109685290A CN109685290A (en) 2019-04-26
CN109685290B true CN109685290B (en) 2023-06-16

Family

ID=66195775

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910109904.0A Active CN109685290B (en) 2019-02-11 2019-02-11 Power consumption prediction method, device and equipment based on deep learning

Country Status (1)

Country Link
CN (1) CN109685290B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110264251B (en) * 2019-05-31 2021-08-10 杭州博钊科技有限公司 Data organization form for representing cash flow and prediction method based on multi-task learning
CN112529144B (en) * 2019-09-17 2023-10-13 中国科学院分子细胞科学卓越创新中心 Predictive learning method and system for short-term time sequence prediction
CN111178611B (en) * 2019-12-23 2022-09-23 广西电网有限责任公司 Method for predicting daily electric quantity
CN111626536A (en) * 2019-12-26 2020-09-04 上海理工大学 Residential electricity consumption energy efficiency evaluation method based on data driving
CN111539841A (en) * 2019-12-31 2020-08-14 远景智能国际私人投资有限公司 Electric quantity prediction method, device, equipment and readable storage medium
CN111667377B (en) * 2020-04-24 2021-03-09 南方电网能源发展研究院有限责任公司 Full-automatic power consumption prediction method and system
CN111797386A (en) * 2020-06-28 2020-10-20 四川长虹电器股份有限公司 Credible user behavior detection method based on Internet of things
CN111861032A (en) * 2020-07-29 2020-10-30 广州海关技术中心 Bulk resource type mineral product release risk prediction method based on deep learning
CN112116265A (en) * 2020-09-25 2020-12-22 国网上海市电力公司 Industry landscape index construction method driven by electric power data
CN113268403B (en) * 2021-05-25 2023-10-31 中国联合网络通信集团有限公司 Time series analysis and prediction method, device, equipment and storage medium
CN114549095B (en) * 2022-04-25 2022-08-09 江西师范大学 Sliding window type electricity selling amount prediction method based on time sequence
CN114743072B (en) * 2022-05-24 2023-01-31 中国科学院计算机网络信息中心 Training method of short-term time sequence prediction model
CN116205382B (en) * 2023-05-05 2023-08-22 南方电网科学研究院有限责任公司 Prediction method and prediction device for electricity consumption, electronic device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106886846A (en) * 2017-04-26 2017-06-23 中南大学 A kind of bank outlets' excess reserve Forecasting Methodology that Recognition with Recurrent Neural Network is remembered based on shot and long term
CN107590567A (en) * 2017-09-13 2018-01-16 南京航空航天大学 A kind of Recognition with Recurrent Neural Network short-term load forecasting method based on comentropy cluster and notice mechanism
CN108197751A (en) * 2018-01-23 2018-06-22 国网山东省电力公司电力科学研究院 Seq2seq network Short-Term Load Forecasting Methods based on multilayer Bi-GRU
CN108764568A (en) * 2018-05-28 2018-11-06 哈尔滨工业大学 A kind of data prediction model tuning method and device based on LSTM networks
CN109214592A (en) * 2018-10-17 2019-01-15 北京工商大学 A kind of Air Quality Forecast method of the deep learning of multi-model fusion

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017201511A1 (en) * 2016-05-20 2017-11-23 Google Llc Training machine learning models

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106886846A (en) * 2017-04-26 2017-06-23 中南大学 A kind of bank outlets' excess reserve Forecasting Methodology that Recognition with Recurrent Neural Network is remembered based on shot and long term
CN107590567A (en) * 2017-09-13 2018-01-16 南京航空航天大学 A kind of Recognition with Recurrent Neural Network short-term load forecasting method based on comentropy cluster and notice mechanism
CN108197751A (en) * 2018-01-23 2018-06-22 国网山东省电力公司电力科学研究院 Seq2seq network Short-Term Load Forecasting Methods based on multilayer Bi-GRU
CN108764568A (en) * 2018-05-28 2018-11-06 哈尔滨工业大学 A kind of data prediction model tuning method and device based on LSTM networks
CN109214592A (en) * 2018-10-17 2019-01-15 北京工商大学 A kind of Air Quality Forecast method of the deep learning of multi-model fusion

Also Published As

Publication number Publication date
CN109685290A (en) 2019-04-26

Similar Documents

Publication Publication Date Title
CN109685290B (en) Power consumption prediction method, device and equipment based on deep learning
Nannen et al. A method for parameter calibration and relevance estimation in evolutionary algorithms
Weng et al. Gold price forecasting research based on an improved online extreme learning machine algorithm
Hsu et al. Forecasting the turning time of stock market based on Markov–Fourier grey model
Pan et al. A comparison of neural network backpropagation algorithms for electricity load forecasting
Tax Human activity prediction in smart home environments with LSTM neural networks
CN111553543B (en) TPA-Seq2 Seq-based power load prediction method and related components
Di Persio et al. Multitask machine learning for financial forecasting
CN112766078A (en) Power load level prediction method of GRU-NN based on EMD-SVR-MLR and attention mechanism
CN112508286A (en) Short-term load prediction method based on Kmeans-BilSTM-DMD model
CN115169746A (en) Power load short-term prediction method and device based on fusion model and related medium
CN114694379B (en) Traffic flow prediction method and system based on self-adaptive dynamic graph convolution
CN116432697A (en) Time sequence prediction method integrating long-term memory network and attention mechanism
Wu et al. A forecasting model based support vector machine and particle swarm optimization
JPH06337852A (en) Time series prediction method by neural network
Oelrich et al. Local prediction pools
CN111277710A (en) Telephone traffic prediction method, system, computer device and storage medium
US20210342691A1 (en) System and method for neural time series preprocessing
Yahya et al. A genetic algorithm-based Grey model combined with Fourier series for forecasting tourism arrivals in Langkawi Island Malaysia
Doudkin et al. Ensembles of neural network for telemetry multivariate time series forecasting
CN114239934A (en) Power grid load sequence prediction method and system based on generative countermeasure network
CN114492641A (en) Power load prediction method, device, equipment and storage medium
Taveeapiradeecharoen et al. A large dimensional var model with time-varying parameters for daily forex forecasting
CN114139677A (en) Unequal interval time sequence data prediction method based on improved GRU neural network
Yu et al. A combination forecasting model of extreme learning machine based on genetic algorithm optimization

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant