Building energy consumption prediction method based on multi-scale convolutional recurrent neural network
By introducing multi-scale convolutional recurrent neural networks into building energy consumption prediction, combining multi-scale convolutional layer and bidirectional GRU layer, the problem of difficulty in capturing timing relationships in traditional methods is solved, and higher-precision energy consumption prediction is achieved.
Patent Information
- Application Number
- CN202111020470.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-01
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2041-09-01
AI Technical Summary
In the prediction of energy consumption of buildings, traditional machine learning methods are difficult to capture the importance of long-term dependencies and timing, and deep learning methods have not effectively captured the correlation characteristics between various elements, resulting in unsatisfactory prediction accuracy.
Using a multi-scale convolutional recurrent neural network method, combining multiple sensor data inside and outside the building, important scale information is extracted through multi-scale convolutional layer and bidirectional GRU layer, building energy consumption prediction model is constructed, and convolutional structure is used. Fusion of attention mechanisms at different scales to enhance the model's understanding of historical information collection and sequence data context.
It significantly improves the accuracy of building energy consumption prediction, and compared with traditional and deep learning methods, it reduces prediction errors and improves prediction correlation, providing more accurate energy consumption prediction results.
Smart Images

Figure CN114065335B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of building energy consumption prediction, and specifically relates to a building energy consumption prediction method based on a multi-scale convolutional recurrent neural network. Background Art
[0002] Energy consumption has become one of the important issues of general concern in society. Among them, building power consumption accounts for more than 50% of the total social power consumption. The power consumption prediction of a building or a family is one of the key issues and has attracted the attention of the majority of people. The prediction of future power consumption can provide early warning for abnormal use of power supply, and can also provide decision-making support for the power supply strategy and scheduling of the power supply department, which is of great significance.
[0003] At present, the prediction accuracy of energy consumption is still insufficient. Traditional machine learning methods such as linear regression, support vector regression SVR, random forest, XGBBoost and ensemble learning can predict energy consumption. However, due to the large number of factors affecting energy consumption and the complex relationships, traditional machine learning methods are difficult to capture long-term dependencies, and the time series importance between various factors is not well obtained. Recently, some scholars have used deep learning methods (RNN, LSTM, GRU, Bi-LSTM, Bi-LSTM, etc.) to predict energy consumption and achieved good results. However, both traditional machine learning methods and the more popular deep learning methods in recent years have not captured the correlation characteristics between various factors from the time series, and the prediction accuracy is not ideal. Summary of the invention
[0004] In view of this, in order to solve the problem of accurate prediction of building energy consumption, the purpose of the present invention is to provide a building energy consumption prediction method based on a multi-scale convolutional recurrent neural network. The method predicts the power consumption of a building by combining the indoor temperature and humidity sensors of a building with the outdoor air pressure, temperature, humidity, wind speed and visible light sensor data.
[0005] Based on the above purpose, a building energy consumption prediction method based on a multi-scale convolutional recurrent neural network is proposed, which includes the following steps:
[0006] Step 1, construct a building energy consumption prediction model based on a multi-scale convolutional recurrent neural network;
[0007] Step 2, using training set data to train the building energy consumption prediction model, wherein the training set data includes influencing factor data and known building energy consumption data;
[0008] Step 3: Input the test set data into the trained building energy consumption prediction model to calculate the predicted value of the building energy consumption.
[0009] Specifically, the building energy consumption prediction model includes a first convolutional layer, a first bidirectional GRU layer, a first multi-scale convolutional layer, a second bidirectional GRU layer, a second multi-scale convolutional layer, a first fully connected layer, and a second fully connected layer. These layers are sequentially connected in order. The outputs of the first convolutional layer and the first bidirectional GRU layer are connected and simultaneously used as the inputs of the first multi-scale convolutional layer and the second multi-scale convolutional layer. The bidirectional GRU layer is formed by paralleling a forward GRU model and a backward GRU model to form a bidirectional structure. The bidirectional GRU layer outputs two merged GRU signals. The output layer of the first fully connected layer is 100, and the output layer of the second fully connected layer is 1. In the building energy consumption prediction model, the input of the first convolutional layer is the influencing factor data sequence, and the output of the second fully connected layer is the building energy consumption value.
[0010] Specifically, for the building energy consumption prediction model x0,...,x T is the influencing factor sequence data, (y0,...,y K ), K < T is the known building energy consumption value, (y K+1 ,...,y T ) is the building energy consumption value to be predicted. is the corresponding estimated value. The input is x0,...,x T , y0,...,y K variables, and they are sequentially input into the building energy consumption prediction model to start training. The loss function uses the standard normalized MSE, and the activation function uses the Relu function.
[0011] Specifically, the analytical expression of the building energy consumption prediction model is as follows:
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018] C 4 t =η 2 ([C2 t ,C 3 t ])
[0019]
[0020] Among them, x t is the input of the model at time t, η 1 (·) and η 2 (·) is two convolution operations, [·,·] is a merge connection operation, MutiScalConv(·,Scale1) and MutiScalConv(·,Scale2) are two multi-scale convolution operations with scales of Scale1 and Scale2 respectively. The specific process of fused convolution is as follows:
[0021] The first convolutional layer η 1 (x t ) accepts sequence data x t The input is It is also used as the input of the first and second multi-scale convolutional layers;
[0022] is the output of the first bidirectional GRU layer, Indicates that the output of the forward GRU With the backward GRU output Perform a merge join; is to multiply the weight vector by the first bidirectional GRU layer And add the offset vector Result;
[0023] Will With η 1 (x t ) Merge into As the input of the first multi-scale convolutional layer;
[0024] It is the output of the first multi-scale convolutional layer with scale 1, connected to the second bidirectional GRU layer;
[0025] is the output of the second bidirectional GRU layer, Indicates that the output of the forward GRU With the backward GRU output Perform a merge join; is to multiply the weight vector by the second bidirectional GRU layer And add the offset vector Result;
[0026] By analogy, we can get Through a convolution operation with a scale of Scale2, [C 2 t ,C 3 t ] is extracted so that the scale information that is more important to the target can be retained and the output is obtained. After the full connection operation, the output O is obtained t ;
[0027] in, and All of them are acquired through learning and training.
[0028] Specifically, the bidirectional GRU layer is a bidirectional structure formed by connecting the forward GRU and the backward GRU models. The output of the first layer forget gate in the forward GRU is: 1 t =σ(W 1 f [H 1 t-1 ,x” t ]+B 1 f ),σ(x)=1 / (1+e -x ), in the forward GRU update gate, the first output is: z 1 t =σ(W 1 z [H 1 t-1 ,x” t ]+B 1 z ), the second output is: Similarly, the corresponding first output of the backward GRU is: z 2 t =σ(W 2 z [H 2 t-1 ,x” t ]+B 2 z ), the second output: Intermediate output of the forward GRU And the intermediate output of the backward GRU By aggregating the intermediate outputs, we get the output Indicates that the output of the forward GRU With the backward GRU output Merge the connection as the output of the bidirectional GRU layer x” t is the input of the bidirectional GRU layer, [W 1 f ,B 1 f ],[W 1 Z ,B 1 Z ],[W 1 h ,B 1 h ] is the forward GRU model parameter, [W 2 f ,B 2 f ],[W 2 Z ,B 2 Z ],[W 2 h ,B 2 h ] is the reverse GRU model parameter, [W 12 o ,B 12 o ] are the output layer parameters. is the output of the first bidirectional GRU layer, corresponding to, is the output of the second bidirectional GRU layer.
[0029] Preferably, the convolutional layer is a 1-dimensional convolutional network.
[0030] Specifically, the influencing factor data include: temperature and humidity of each room in the building, as well as external air pressure, external humidity and external wind speed.
[0031] The building energy consumption prediction model in the method of the present invention mainly includes a multi-scale convolution layer, a bidirectional GRU layer and a fully connected layer. The multi-scale convolution layer is introduced into the recurrent neural network, and the improved multiple attention units are connected in series to distribute the attention mechanism at different scales, so that the model can collect historical information from different scales and distinguish the influence of different input elements on the prediction results. The bidirectional GRU layer can more fully obtain the context information of the sequence data on the basis of GRU. The whole model adopts a convolution structure to fuse the recognition outputs of the attention mechanisms of different scales, and screens and identifies the outputs of different scales through convolution connections, so that the scale information that is more important to the target can be retained, thereby obtaining better accuracy for the prediction of the building energy consumption value. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a schematic diagram of the process of the present invention;
[0033] Figure 2 This is the data processing flow chart of the method of the present invention;
[0034] Figure 3 This is the schematic diagram of the 1D convolutional network in the present invention. Specific embodiments
[0035] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0036] As Figure 1 shown, a building energy consumption prediction method based on a multi-scale convolutional recurrent neural network is proposed, including the following steps:
[0037] Step 1, construct a building energy consumption prediction model based on a multi-scale convolutional recurrent neural network;
[0038] Step 2, use the training set data to train the building energy consumption prediction model, and the training set data includes influencing factor data and known building energy consumption data;
[0039] Step 3, input the test set data into the trained building energy consumption prediction model, and calculate the predicted value of the building energy consumption.
[0040] Specifically, the building energy consumption prediction model includes a first convolutional layer, a first bidirectional GRU layer, a first multi-scale convolutional layer, a second bidirectional GRU layer, a second multi-scale convolutional layer, a first fully connected layer, and a second fully connected layer. Each layer is sequentially connected in order. The output of the first convolutional layer and the output of the first bidirectional GRU layer are connected and used as the input of the first multi-scale convolutional layer and the second multi-scale convolutional layer at the same time. The bidirectional GRU layer is formed by paralleling a forward GRU model and a backward GRU model to form a bidirectional structure. The bidirectional GRU layer outputs two merged GRU signals. The output layer of the first fully connected layer is 100, and the output layer of the second fully connected layer is 1. The input of the first convolutional layer in the building energy consumption prediction model is the influencing factor data sequence, and the output of the fully connected layer is the building energy consumption value.
[0041] Specifically, for the building energy consumption prediction model is x0,...,x T is the influencing factor sequence data, (y0,...,y K ), K < T is the known building energy consumption value, (y K+1,...,y T ) is the building energy consumption value to be predicted, is the corresponding estimate, input is x0,...,x T ,y0,...,y K The variables are sequentially input into the building energy consumption prediction model to start training. The loss function uses the standard normalized MSE, and the activation function uses the Relu function.
[0042] Specifically, the analytical expression of the building energy consumption prediction model is as follows:
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049] C 4 t =η 2 ([C 2 t ,C 3 t ])
[0050]
[0051] Among them, x t is the input of the model at time t, η 1 (·) and η 2 (·) is two convolution operations, [·,·] is a merge connection operation, MutiScalConv(·,Scale1) and MutiScalConv(·,Scale2) are two multi-scale convolution operations with scales of Scale1 and Scale2 respectively. The specific process of fused convolution is as follows:
[0052] The first convolutional layer η 1 (x t ) accepts sequence data x t The input is It is also used as the input of the first and second multi-scale convolutional layers;
[0053] is the output of the first bidirectional GRU layer, Indicates that the output of the forward GRU With the backward GRU output Perform a merge join; is to multiply the weight vector by the first bidirectional GRU layer And add the offset vector Result;
[0054] Will With η 1 (x t ) Merge into As the input of the first multi-scale convolutional layer;
[0055] It is the output of the first multi-scale convolutional layer with scale 1, connected to the second bidirectional GRU layer;
[0056] is the output of the second bidirectional GRU layer, Indicates that the output of the forward GRU With the backward GRU output Perform a merge join; is to multiply the weight vector by the second bidirectional GRU layer And add the offset vector Result;
[0057] By analogy, we can get Through a convolution operation with a scale of Scale2, [C 2 t ,C 3 t ] is extracted so that the scale information that is more important to the target can be retained and the output is obtained. After the full connection operation, the output O is obtained t ; The data processing flow of the method of the present invention is as follows Figure 2 As shown;
[0058] in, and All of them are acquired through learning and training.
[0059] Specifically, the bidirectional GRU layer is a bidirectional structure formed by connecting the forward GRU and the backward GRU models. The output of the first layer forget gate in the forward GRU is: 1 t =σ(W 1 f [H 1 t-1 ,x” t ]+B 1f ),σ(x)=1 / (1+e -x ), in the forward GRU update gate, the first output is: z 1 t =σ(W 1 z [H 1 t-1 ,x” t ]+B 1 z ), the second output is: Similarly, the corresponding first output of the backward GRU is: z 2 t =σ(W 2 z [H 2 t-1 ,x” t ]+B 2 z ), the second output: Intermediate output of the forward GRU And the intermediate output of the backward GRU By aggregating the intermediate outputs, we get the output Indicates that the output of the forward GRU With the backward GRU output Merge the connection as the output of the bidirectional GRU layer x” t is the input of the bidirectional GRU layer, [W 1 f ,B 1 f ],[W 1 Z ,B 1 Z ],[W 1 h ,B 1 h ] is the forward GRU model parameter, [W 2 f ,B 2 f ],[W 2 Z ,B 2 Z ],[W 2 h ,B 2 h ] is the reverse GRU model parameter, [W 12 o ,B 12 o] are the output layer parameters. is the output of the first bidirectional GRU layer, corresponding to, is the output of the second bidirectional GRU layer.
[0060] Preferably, the convolutional layer is a 1-dimensional convolutional network.
[0061] Specifically, the influencing factor data include: the temperature and humidity of each room in the building, as well as the external air pressure, external humidity and external wind speed.
[0062] Preferably, the convolution layer is a 1D convolutional network. Convolutional neural networks generally include 1D convolution, 2D convolution and 3D convolutional networks. 1D convolutional networks are mainly used for sequence data, such as audio data, equipment maintenance sampling data, etc. 2D convolution is mainly used for image processing, such as image classification, target recognition, image segmentation, etc. 3D convolutional networks are mainly used for video processing, such as medical imaging video, motion detection, etc. In this embodiment, time series data is mainly analyzed, and the results of 1D convolutional networks are used. Typical 1D convolutional network results are as follows: Figure 3 As shown in FIG. 1 , it contains a one-dimensional convolution kernel vector, a filter size k=4, and a convolution interval (dilation factors) d=1.
[0063] For the element s that currently needs to be convolved, the mathematical expression of the one-dimensional convolution operation is:
[0064] Where f(i) represents the convolution kernel function, X s-d·i It means taking sample values with an interval of d forward.
[0065] In order to better demonstrate the details of this embodiment, this experiment uses an energy consumption data set of a building in Belgium. The data description is shown in Table 1.
[0066] Table 1 Meaning of data items in the dataset
[0067]
[0068]
[0069] The experimental parameters of the model in this embodiment are shown in Table 2:
[0070] Table 2: Algorithm variable parameter values
[0071]
[0072] Experimental environment: The experimental background adopted in this embodiment is: Computer experimental environment: The experimental background adopted in this embodiment is: The main configuration of the computer is: Pentium (R) Dual-core 3.06 CPU, 8G RAM memory.
[0073] Effect evaluation: The parameters used in this paper to evaluate the performance of the algorithm include RMSE, MAE, MAPE and CC:
[0074] RMSE (Root Mean Square Error) is calculated as follows:
[0075]
[0076] MAE (Mean Absolutely Error) is calculated as follows:
[0077]
[0078] MAPE (Mean Absolutely Percentage Error) is calculated as follows:
[0079]
[0080] R2 (coefficient of Determination), coefficient of determination, is calculated as follows:
[0081]
[0082] It should be noted that RMSE, MAE and MAPE are all measures of prediction errors. The smaller the value, the more accurate it is. The R2 parameter represents the coefficient of determination of the two sequence quantities. The larger the value, the more correlated the two sequence data are and the better the prediction effect.
[0083] For the building energy consumption data set, the periodicity of each sequence data change is not strong, indicating that the energy consumption problem does not show periodic changes with the number of days. From a seasonal perspective, during the 4.5-month data collection period, as the weather gradually became hotter (the data from T1 to T9 showed an upward trend), the air humidity gradually decreased, and the overall energy consumption tended to decrease.
[0084] By conducting experiments on the above data, the future energy consumption of the building can be predicted, and the prediction accuracy is shown in Table 3.
[0085] Table 3: Prediction results of different algorithms
[0086]
[0087] It can be seen from Table 3 that in the prediction calculation of building energy consumption, the prediction accuracy of the method of the present invention is generally higher than that of the traditional machine learning model. From the perspective of RMSE index, compared with SVM, Random Forest, LSTM, GRU, Bi-LSTM, Bi-GRU, Bi-Conv-LSTM, Bi-Conv-GRU network models, the MCRNN model reduces RMSE by 47.83%, 38.72%, 16.62%, 15.67%, 13.29%, 13.58%, 7.55%, and 3.09%. The average accuracy was improved by 37.81%, 70.38%, 32.50%, 16.09%, 25.59%, 27.43%, 4.93% and 4.39% respectively, and the prediction correlation was improved by 83.09%, 69.38%, 8.12%, 11.47%, 8.80%, 8.73%, 5.22% and 2.08% respectively. Moreover, in terms of average percentage error, the method of the present invention showed better performance than other network models.
[0088] It can be seen from the content of the invention and the embodiments that the building energy consumption prediction model in the method of the present invention mainly includes a multi-scale convolution layer, a bidirectional GRU layer and a fully connected layer. The multi-scale convolution layer is introduced into the recurrent neural network, and the improved multiple attention units are connected in series and in a skip connection manner. The attention mechanism is distributed at different scales, so that the model can collect historical information from different scales and distinguish the influence of different input elements on the prediction results. The bidirectional GRU layer can more fully obtain the context information of the sequence data on the basis of GRU. The entire model adopts a convolution structure to fuse the recognition outputs of the attention mechanisms of different scales, and screens and identifies the outputs of different scales through convolution connections, so that those scale information that is more important to the target can be retained, thereby obtaining better accuracy for the prediction of the building energy consumption value.
Claims
1. A building energy consumption prediction method based on a multi-scale convolutional recurrent neural network, characterized in that: The following steps are involved: Step 1, construct a building energy consumption prediction model based on a multi-scale convolutional recurrent neural network; Step 2, using training set data to train the building energy consumption prediction model, wherein the training set data includes influencing factor data and known building energy consumption data; Step 3: Input the test set data into the trained building energy consumption prediction model to calculate the predicted value of building energy consumption; The building energy consumption prediction model includes a first convolution layer, a first bidirectional GRU layer, a first multi-scale convolution layer, a second bidirectional GRU layer, a second multi-scale convolution layer, a first fully connected layer and a second fully connected layer. The layers are connected in sequence. The output of the first convolution layer and the output of the first bidirectional GRU layer are connected and used as the input of the first multi-scale convolution layer and the second multi-scale convolution layer at the same time. The bidirectional GRU layer is a forward GRU model and a backward GRU model connected in parallel to form a bidirectional structure. The bidirectional GRU layer outputs two merged GRU signals. The output layer of the first fully connected layer is 100, and the output layer of the second fully connected layer is 1. In the building energy consumption prediction model, the input of the first convolution layer is an influencing factor data sequence, and the output of the second fully connected layer is a building energy consumption value. The analytical expression of the building energy consumption prediction model is as follows: C 4 t =η 2 ([C 2 t ,C 3 t ]) Among them, x t is the input of the model at time t, η 1 (·) and η 2 (·) is two convolution operations, [·,·] is a merge connection operation, MutiScalConv(·,Scale1) and MutiScalConv(·,Scale2) are two multi-scale convolution operations with scales of Scale1 and Scale2 respectively. The specific process of fused convolution is as follows: The first convolutional layer η 1 (x t ) accepts sequence data x t The input is It is also used as the input of the first and second multi-scale convolutional layers; is the output of the first bidirectional GRU layer, Indicates that the output of the forward GRU With the backward GRU output Perform a merge join; is to multiply the weight vector by the first bidirectional GRU layer And add the offset vector Result; Will With η 1 (x t ) Merge into P t 1 , as the input of the first multi-scale convolutional layer; It is the output of the first multi-scale convolutional layer with scale 1, connected to the second bidirectional GRU layer; is the output of the second bidirectional GRU layer, Indicates that the output of the forward GRU With the backward GRU output Perform a merge join; is to multiply the weight vector by the second bidirectional GRU layer And add the offset vector Result; By analogy, we can get Through a convolution operation with a scale of Scale2, [C 2 t ,C 3 t ] is extracted so that the scale information that is more important to the target can be retained and the output is obtained. After the full connection operation, the output O is obtained t ; in, and All of them are acquired through learning and training.
2. The building energy consumption prediction method based on multi-scale convolutional recurrent neural network according to claim 1 is characterized in that: For the building energy consumption prediction model x0,...,x T is the sequence data of influencing factors, (y0,...,y K ), K < T are the known building energy consumption values, (y K+1 ,...,y T ) are the building energy consumption values to be predicted, is the corresponding estimated value, and the input is x0,...,x T ,y0,...,y K variables. Input them into the building energy consumption prediction model in sequence to start training. The loss function uses the standard normalized MSE, and the activation function uses the Relu function.
3. The building energy consumption prediction method based on multi-scale convolutional recurrent neural network according to claim 1 is characterized in that: The bidirectional GRU layer is a bidirectional structure formed by connecting the forward GRU and the backward GRU models. The output of the first layer forget gate in the forward GRU is: 1 t =σ(W 1 f [H 1 t-1 ,x” t ]+B 1 f ),σ(x)=1 / (1+e -x ), in the forward GRU update gate, the first output is: z 1 t =σ(W 1 z [H 1 t-1 ,x” t ]+B 1 z ), the second output is: Similarly, the corresponding first output of the backward GRU is: z 2 t =σ(W 2 z [H 2 t-1 ,x” t ]+B 2 z ), the second output: Intermediate output of the forward GRU And the intermediate output of the backward GRU By aggregating the intermediate outputs, we get the output Indicates that the output of the forward GRU With the backward GRU output Merge the connection as the output of the bidirectional GRU layer x” t is the input of the bidirectional GRU layer, [W 1 f ,B 1 f ],[W 1 Z ,B 1 Z ],[W 1 h ,B 1 h ] is the forward GRU model parameter, [W 2 f ,B 2 f ],[W 2 Z ,B 2 Z ],[W 2 h ,B 2 h ] is the reverse GRU model parameter, [W 12 o ,B 12 o ] are the output layer parameters.
4. The building energy consumption prediction method based on multi-scale convolutional recurrent neural network according to claim 3 is characterized in that: The convolutional layer is a 1-dimensional convolutional network.
5. The method for predicting building energy consumption based on a multi-scale convolutional recurrent neural network according to claim 1, characterized in that: The influencing factor data include: temperature and humidity of each room in the building, as well as external air pressure, external humidity and external wind speed.
