Building energy consumption prediction method based on deep learning

Through the T2SNET model combined with the CEEMDAN algorithm and the time embedding layer, the neglected problem of the heterogeneity and time factors of meteorological data and energy consumption data in building energy consumption prediction is solved, and high-accurate energy consumption prediction is achieved.

CN120372156APending Publication Date: 2025-07-25NANTONG INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510427113.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the prior art, the building energy consumption prediction system is too complex, ignores the characteristic heterogeneity of meteorological data and energy consumption data, and does not fully consider time factors and multi-scale periodicity, resulting in inaccurate predictions.

Method used

The building energy consumption prediction model (T2SNET) based on twin timing networks is adopted, combined with the CEEMDAN algorithm for data pattern decomposition, and the time embedding layer and feature adaptive fusion layer are used to extract the context causal relationship of timing data by fully symmetrically extending the causal convolution network, and a multi-layer one-dimensional convolutional neural network is established for prediction.

Benefits of technology

Accurate fitting at the extreme value of daily energy consumption is achieved, and the prediction is improved, and it is suitable for multiple types of building energy consumption scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120372156A_ABST
    Figure CN120372156A_ABST
Patent Text Reader

Abstract

The invention discloses a building energy consumption prediction method based on deep learning, and relates to the technical field of energy consumption prediction, and the method comprises the following steps: S1, obtaining meteorological data and building energy consumption data; s2, establishing a building energy consumption prediction model based on the twin time sequence network, wherein the building energy consumption prediction model comprises a data preprocessing layer, a time embedding layer, a time sequence feature extraction layer, a feature adaptive fusion layer and a prediction layer; according to the method, mode decomposition and noise removal are performed on original data in combination with a CEEMDAN algorithm, data periodicity is highlighted, meanwhile, energy consumption and meteorological data are modeled by utilizing a twin model based on a fully symmetric extended causal convolutional network, a context causal relationship of time series data can be accurately extracted, a T2SNET predicted value can accurately fit an observation value, and the accuracy of the observation value is improved. The method has good performance at the extreme value of daily energy consumption, is not influenced by energy consumption value oscillation, has relatively high robustness, and can be widely applied to prediction of multi-type building energy consumption scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of energy consumption prediction, and particularly to a building energy consumption prediction method based on deep learning. Background Art

[0002] Building energy consumption has become an important part of China's energy consumption and carbon emissions. Effective building energy consumption prediction provides strong support for energy scheduling and control.

[0003] The research effectiveness of deep learning algorithms in the field of energy consumption has been verified. However, there are also problems such as the overly complex prediction system, such as the accumulation of time and space costs brought by the coupling of multiple algorithms. Secondly, the feature heterogeneity of different data sources is ignored, such as meteorological data and energy consumption data, and the adaptive fusion of data has become the research focus. In addition, the importance of time factors is forgotten, and the multi-scale periodicity is not considered, such as the regular features in the two dimensions of days and weeks. Therefore, a building energy consumption prediction method based on deep learning is proposed. Summary of the Invention

[0004] The purpose of the present invention is to solve the problems in the prior art, and a building energy consumption prediction method based on deep learning is proposed.

[0005] A building energy consumption prediction method based on deep learning includes the following steps:

[0006] S1. Obtain meteorological data and building energy consumption data;

[0007] S2. Establish a building energy consumption prediction model based on a Siamese time series network, and the building energy consumption prediction model includes a data preprocessing layer, a time embedding layer, a time series feature extraction layer, a feature adaptive fusion layer, and a prediction layer;

[0008] S3. Obtain a test data set for training the building energy consumption prediction model, and determine the final hyperparameters of the model framework by means of grid search, so as to obtain an optimized building energy consumption prediction model;

[0009] S4. Input the meteorological data and building energy consumption data into the optimized building energy consumption prediction model, and output the future energy consumption prediction result.

[0010] Preferably, in step S2, the building energy consumption prediction model is used to predict the electricity consumption of a building. Assuming that the input time step is P and the prediction time step is Q, given the historical P time step electricity energy consumption observations meteorological data observations and the time embedding XT = XW + XH, XT ∈ R (P+Q)×d , for predicting the electricity energy consumption in the future Q time steps Among them, d1 represents the number of variables of the input power consumption observation value at time step t, d2 represents the number of variables of the input meteorological observation value at time step t, and d represents the variable dimension after the time stamp passes through the embedding layer.

[0011] Preferably, in step S2, the data preprocessing layer uses the CEEMDAN algorithm to decompose the original data into patterns, converting it into smooth signals with periodicity under multiple patterns. At the same time, the Mean-std normalization method is used to standardize each decomposed variable. The working principle and process of the CEEMDAN algorithm are as follows:

[0012] Assume the original input is x ∈ R 1×1 , the total number of decompositions is M, and the output is x' ∈ R M×1 ;

[0013] (1) Create a set of original data with added noise: x i (t) = x(t) + w0ε i (t), i ∈ {1,..., I}, where x(t) represents the original variable value, ε(t) is white noise with independent Gaussian distribution and unit variance, w0 is the noise coefficient, and I is the number of times of added noise;

[0014] (2) For each x i (t), obtain the first decomposed IMF through EMD, and calculate the first decomposed The first residual is

[0015] (3) Decompose the residual with added noise to obtain the second Assume E j (·) is the operator that generates the j-th mode obtained by EMD:

[0016]

[0017] (4) Repeat the above operations for the remaining until the obtained residual cannot be further decomposed by EMD. The final residual can be expressed as:

[0018]

[0019] where M is the total number of , and the original data can also be expressed as the sum of

[0020]

[0021] Preferably, in step S2, the time embedding layer introduces two types of time representations. One is the week embedding XW i∈R 1 ×d , and the other is the hour embedding XH j ∈R 1×d , where i represents a certain day of the 7-day week, d represents the dimension of the embedding, used to represent the day of the week, and j represents a certain hour of the 24 hours of a day, used to represent the time of day;

[0022] The embedding method is to use one-hot encoding to map the timestamp information, and a one-dimensional convolutional neural network is used to extract features from the one-hot encoded information to form a dense timestamp vector as the input of the time series feature extraction layer:

[0023] f(x) = ReLU(w * Onehot(x))

[0024] Among them, w represents the one-dimensional convolutional kernel, Onehot represents the one-hot encoding, used to map the original integer input to a sparse encoded vector, and ReLU represents the ReLU activation function.

[0025] Preferably, in the step S2, the time series feature extraction layer is based on a one-dimensional convolutional neural network and a temporal convolutional network, and respectively extracts the temporal correlations of meteorological data and energy consumption data. The one-dimensional convolutional neural network is designed to extract the deep hidden features of the input sequence, and dilated causal convolution is used as the core component of the temporal convolutional network to capture the temporal trends of the nodes.

[0026] Preferably, in the step S2, the feature adaptive fusion layer is used to fuse the meteorological and energy consumption time series features, and the result is used as the input of the prediction layer. An adaptive fusion gate is designed in the feature adaptive fusion layer. The time series feature extraction layer outputs the representations H 1,P ∈R d and H 2,P ∈R d , and through the adaptive fusion gate, they are fused to obtain H ∈ R d ,

[0027]

[0028] Among them, W1 ∈ R d×d 、W2 ∈ R d×d and are learnable parameters, ⊙ represents the element-wise product, σ represents the sigmoid activation, is the gating unit, and the gating fusion mechanism adaptively controls the flow of the two time series feature representations.

[0029] Preferably, in the step S2, a multi-layer one-dimensional convolutional neural network is used as the prediction layer to derive the energy consumption value at the next moment. A loss function is set in the prediction layer, and the loss function is defined as the mean absolute error between the observed value y and the predicted value between,

[0030]

[0031] where λ is the regularization parameter, θ represents all learnable parameters in the building energy consumption prediction model, and N represents the number of test samples.

[0032] Compared with the existing technologies, the advantages of the present invention are as follows:

[0033] 1. The present invention combines the CEEMDAN algorithm to decompose the original data into modes, removes noise and highlights the periodicity of the data. At the same time, a twin model based on a fully symmetric extended causal convolutional network is used to model the energy consumption and meteorological data respectively, which can accurately extract the context causal relationship of time series data, so that the predicted value of T2SNET can accurately fit the observed value, performs well at the extreme values of daily energy consumption, and is not affected by the oscillation of energy consumption values, has high robustness, and can be widely applied to the prediction of multi-type building energy consumption scenarios.

[0034] 2. The time embedding layer in the present invention incorporates time variables of different scales into the whole process of feature extraction and prediction, fully considering the iconic role of timestamps in energy consumption changes, such as the periodic characteristics of peak electricity consumption periods in buildings. In view of the heterogeneity of energy consumption data and meteorological data, a multi-source data feature adaptive fusion module is innovatively proposed, and the deep representations of the two are weighted and fused through training and learning, comprehensively considering various factors affecting building energy consumption, so that the prediction results are more in line with the actual situation. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 is the overall framework structure diagram of the building energy consumption prediction model in the present invention.

[0036] Figure 2 is the power consumption trend diagram of different weeks in the university dormitory in the present invention.

[0037] Figure 3 is the structural schematic diagram of the dilated causal convolution in the present invention.

[0038] Figure 4 is the hourly energy consumption data diagram of five different buildings in the present invention.

[0039] Figure 5 is the relationship diagram between the energy consumption data and the meteorological data in the present invention.

[0040] Figure 6This is a comparison chart of the T2SNET prediction results and the true observed values of the building energy consumption in university dormitories in the present invention.

[0041] Figure 7 This is a comparison chart of the T2SNET prediction results and the true observed values of the building energy consumption in university laboratories in the present invention.

[0042] Figure 8 This is a comparison chart of the T2SNET prediction results and the true observed values of the building energy consumption in university classrooms in the present invention.

[0043] Figure 9 This is a comparison chart of the T2SNET prediction results and the true observed values of the building energy consumption in office buildings in the present invention.

[0044] Figure 10 This is a comparison chart of the T2SNET prediction results and the true observed values of the building energy consumption in primary and secondary school classrooms in the present invention. Detailed implementation manners

[0045] To make the technical means, creative features, achieved purposes and functions of the present invention easy to understand, the present invention will be further described below in conjunction with specific implementation manners.

[0046] Refer to Figure 1 As shown, a building energy consumption prediction method based on deep learning includes the following steps:

[0047] S1. Obtain meteorological data and building energy consumption data;

[0048] S2. Establish a building energy consumption prediction model (T2SNET) based on a twin time series network. The building energy consumption prediction model (T2SNET) includes a data preprocessing layer, a time embedding layer, a time series feature extraction layer, a feature adaptive fusion layer, and a prediction layer;

[0049] S3. Obtain a test data set for training the building energy consumption prediction model (T2SNET), and determine the final model framework hyperparameters by means of grid search, so as to obtain an optimized building energy consumption prediction model (T2SNET);

[0050] S4. Input the meteorological data and building energy consumption data into the optimized building energy consumption prediction model (T2SNET), and output the future energy consumption prediction results.

[0051] In step S2, the building energy consumption prediction model is used to predict the electricity consumption of a building. Assuming that the input time step is P and the prediction time step is Q, given the electricity energy consumption observations of the previous P time steps meteorological data observations and the time embedding XT = XW + XH, XT ∈ R (P+Q)×d , for predicting the electricity energy consumption of the next Q time steps Among them, d1 represents the number of variables of the input power consumption observation value at the t time step, d2 represents the number of variables of the input meteorological observation value at the t time step, and d represents the variable dimension after the time stamp passes through the embedding layer.

[0052] In the step S2, the data preprocessing layer uses the CEEMDAN algorithm to perform mode decomposition on the original data, converting it into smooth signals in multiple modes and having periodicity. At the same time, the Mean-std normalization method is used to standardize each decomposed variable. The working principle and process of the CEEMDAN algorithm are as follows:

[0053] Assume that the original input is x ∈ R 1×1 , the total number of decompositions is M, and the output is x' ∈ R M×1 ;

[0054] (1) Create a set of original data with added noise: x i (t) = x(t) + w0ε i (t), i ∈ {1,..., I}, where x(t) represents the original variable value, ε(t) is white noise with independent Gaussian distribution and unit variance, w0 is the noise coefficient, and I is the number of times of added noise;

[0055] (2) For each x i (t), obtain the first decomposed IMF through EMD, and calculate the first decomposed The first residual is

[0056] (3) Decompose the residual with added noise Obtain the second Assume that E j (·) is the operator that generates the jth mode obtained by EMD:

[0057]

[0058] (4) Repeat the above operations on the remaining until the obtained residual can no longer be decomposed by EMD. The final residual can be expressed as:

[0059]

[0060] where M is the total number of , and the original data can also be expressed as the sum of

[0061]

[0062] By adopting Gaussian white noise with a certain standard deviation, the CEEMDAN algorithm can adaptively extract the components and variation trends of the signal to weaken the mode mixing defects existing in the EMD algorithm and the EEMD algorithm, and at the same time can overcome the problem that wavelet transform is prone to generating many components without real physical meaning.

[0063] In the step S2, the time embedding layer introduces two types of time representations. One is the week embedding XW i ∈R 1×d , and the other is the hour embedding XH j ∈R 1×d . Here, i represents a certain day of the 7 days in a week, d represents the embedding dimension used to represent which day of the week, j represents a certain hour of the 24 hours in a day, used to represent the moment in a day;

[0064] The embedding method is to use One-hot encoding to map the timestamp information (day and hour information), and use a one-dimensional convolutional neural network (1D-CNNs) to extract features from the One-hot encoded information to form a dense timestamp vector as the input of the time series feature extraction layer:

[0065] f(x) = ReLU(w * Onehot(x))

[0066] Among them, w represents the one-dimensional convolutional kernel, Onehot represents the one-hot encoding, which is used to map the original integer input to a sparse encoding vector, and ReLU represents the ReLU activation function.

[0067] The time embedding representation, as an important variable for time series prediction, is mainly reflected in two aspects. On the one hand, time can effectively distinguish the differences in energy consumption between different time steps. For example, in the dynamic change process of the electricity consumption peak changing with time, the differences between time steps can help the model better distinguish the building energy consumption at different time steps and fully understand the heterogeneity of the data. On the other hand, time can better reflect the periodicity of building energy consumption, which helps to learn the potential time series change rules; for example Figure 2 the distance between the orange and black curves in [reference] reflects the similarity of energy consumption in different weeks, which is defined as the periodic feature. Secondly, the energy consumption between consecutive days is repetitive. For example, the peak will appear at the same time points (such as 9 am to 12 pm). The above two aspects provide a basis for energy consumption prediction.

[0068] In step S2, the temporal feature extraction layer is based on one-dimensional convolutional neural networks (1D-CNNs) and temporal convolutional networks (TCNs), and respectively extracts the temporal correlations of meteorological data and energy consumption data. The one-dimensional convolutional neural network (1D-CNNs) is designed to extract the deep hidden features of the input sequence, and dilated causal convolution is used as the core component of the temporal convolutional network (TCNs) to capture the temporal trends of nodes;

[0069] The temporal convolutional network (TCNs) based on dilated causal convolutional networks exponentially expands the receptive field scale by increasing the network depth. Contrary to the method based on recurrent neural networks (RNNs), the dilated causal convolutional network processes long-range time series data in a non-recursive manner. The dilated causal convolution preserves the temporal causal order by padding zeros to historical information for predicting the current time step. As a special case of the standard one-dimensional convolution, the dilated causal convolution operation slides the input by skipping values at a certain stride, as Figure 3 shown; Generally, in mathematical science, given a one-dimensional sequence input x ∈ R P×1 and a convolutional kernel f ∈ R K , the output is H i ∈ R P×d (i represents the input as meteorological or energy consumption), and the dilated causal convolution operation of x and f at step t is expressed as:

[0070]

[0071] where dila is the dilation factor that controls the skip distance. By stacking dilated causal convolutional layers with dilation factors in ascending order, the receptive field of the model grows exponentially. It enables the dilated causal convolutional network to capture longer sequences with fewer layers and also saves computational resources.

[0072] In step S2, the feature adaptive fusion layer is used to fuse the meteorological and energy consumption temporal features, and the result is used as the input of the prediction layer. An adaptive fusion gate is designed in the feature adaptive fusion layer. The temporal feature extraction layer outputs the representations H 1,P ∈ R d and H 2,P ∈ R d of meteorology and energy consumption at the last moment. After passing through the adaptive fusion gate, the fusion obtains H ∈ R d ,

[0073]

[0074] where W1 ∈ R d×d , W2 ∈ R d×d and are learnable parameters, ⊙ represents element-wise multiplication, and σ represents the sigmoid activation, It is a gating unit, and the gating fusion mechanism adaptively controls the flow of two temporal feature representations.

[0075] In the step S2, a multi-layer one-dimensional convolutional neural network is used as the prediction layer to derive the energy consumption value at the next moment. A loss function is set in the prediction layer, and the loss function is defined as the mean absolute error between the observed value y and the predicted value between,

[0076]

[0077] where λ is the regularization parameter, θ represents all learnable parameters in the building energy consumption prediction model, and N represents the number of test samples.

[0078] Embodiment

[0079] Using the public dataset from the Building Data Genome project, the Building Data Genome project collects data from the entire building's electricity meters, including the heating system in the building. The present invention analyzes the hourly energy consumption data of five different buildings from March to May 2015. The statistical information of these five buildings is shown in the following table:

[0080] Table 1 Hourly Energy Consumption Data of Five Different Buildings

[0081]

[0082] To highlight the complexity of the data, Figure 4 shows the hourly energy consumption profile of each building under different decomposition modes. Each building has a different energy consumption pattern, presenting a random and non-linear pattern, and it is difficult to accurately describe the data temporal characteristics and regularity.

[0083] In addition, Figure 5 visualizes the correlation graph between meteorological data and energy consumption data. It can be clearly seen from the graph that the change trends between air humidity (Humility) and energy consumption (Energy) are synchronous. On the contrary, the temperature variable (Temperature) shows a negative correlation with the energy consumption data at some time points. Therefore, in the prediction process, the present invention takes spatial humidity and energy consumption variables as key input variables.

[0084] To further measure the advantages of the proposed prediction method compared with other baseline models, the present invention uses three common evaluation indicators, namely mean absolute error loss (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) for evaluation. MAE, RMSE, and MAPE can calculate the errors between the predicted value and the observed value (y i ), that is:

[0085]

[0086] Among them, n represents the size of the test set. Lower values of MAE, RMSE, and MAPE indicate more accurate prediction performance.

[0087] In the T2SNET of the present invention, grid search is applied to find the best model on the test data set. Specifically, among all candidate hyperparameter selections, by cycling through and trying each possibility, the hyperparameter group with the best performance on the test data set is selected as the final result. For each hyperparameter group, the best parameters of the proposed T2SNET model and the baseline technology are determined during the training process and determined with the minimum MAE on the test set. The specific processing is as follows: In the experiment, the maximum number of epochs is 100, and the batch size is 64. Specifically, after one epoch, the prediction model on the validation set is evaluated. If the MAE on the test set is improved, the model parameters will be updated and recorded to replace the last saved parameters. To be consistent with existing research, the target time step Q and the historical time step P are set to 1 and 24 respectively. The final model hyperparameter values are: the number of layers of TCN is 3, the size of the convolutional kernel is 3, the number of hidden nodes of the model is 64, the decay rate of the model is 0.9, the learning rate is 0.005, λ is 0.001, and the training method is Adam.

[0088] For short-term prediction of building energy consumption, Table 2 lists the true prediction results of the electricity consumption of the T2SNET model proposed in the present invention and the baseline model on five data sets.

[0089] Table 2 Comparison of the performance of the T2SNET model and the baseline model on five types of building data sets

[0090]

[0091]

[0092] Baseline models for comparison:

[0093] Autoregressive Integrated Moving Average Model (ARIMA): Used to predict future values of time series data, including three parts: autoregression (AR), differencing (I), and moving average (MA). The trend and seasonality of the data are modeled through the combination of the above parts.

[0094] Linear Regression Model (LR): In a prediction task, the linear regression model is used to describe the linear relationship between one or more independent variables and a dependent variable.

[0095] Support Vector Regression Model (SVR): It realizes nonlinear modeling by mapping input data into a high-dimensional space. The kernel function is used to map the data into a higher-dimensional space so as to find a linear relationship in the new space. The goal is to find an optimal hyperplane that keeps close to as many data points as possible.

[0096] Artificial Neural Network (ANN): It consists of multiple neuron layers, divided into an input layer, a hidden layer, and an output layer. During the training process, ANN learns the patterns and features in the data by adjusting the weights and biases of the connections and can handle complex nonlinear relationships.

[0097] Random Forest (RF): It consists of multiple decision trees, each of which is independently trained, and makes a final prediction by integrating their prediction results. In prediction, RF calculates the average prediction value of all trees.

[0098] Long Short-Term Memory Network (LSTM): It is used to capture the mutual relationship between energy consumption data and time. The Hybrid Genetic Algorithm (GA) is adopted to select the optimal architecture of the LSTM neural network to improve its prediction accuracy and robustness.

[0099] CEEMDAN-RF-LSTM: A hybrid method of Random Forest (RF) and Long Short-Term Memory (LSTM) based on Complete Ensemble Empirical Mode Decomposition with Adaptive Noise (CEEMDAN) for predicting building energy consumption.

[0100] As can be seen from Table 2, by comparing the results of the statistical learning method ARIMA with those of the traditional machine learning methods LR, SVM, and RF, it is found that the traditional machine learning methods perform more prominently in the energy consumption prediction task. For example, on the university dormitory building dataset, compared with LR, SVM, and RF, the performance of ARIMA in terms of the MAE index decreased by 7.913%, 104.286%, and 117.200% respectively; on the office dataset, it decreased by 114.191%, 150.909%, and 140.00% respectively; on the primary and secondary school classroom dataset, it decreased by 430.722%, 434.003%, and 340.127% respectively. The above experimental results prove that the traditional machine learning methods are superior to the statistical methods in terms of the ability to extract nonlinear features, and at the same time demonstrate the difficulty of the building energy consumption prediction task.

[0101] However, traditional machine learning methods have insufficient depth in feature extraction, especially the non-linear time series correlation in time series prediction tasks, which has become a key problem to be solved in current energy consumption prediction. The emergence of deep learning has completely broken the problem of insufficient feature extraction and further improved the prediction accuracy through means such as recurrent structures and increasing the network depth. In particular, recurrent deep learning models represented by recurrent neural networks (RNNs) have outstanding performance in the direction of time series. For example, compared with traditional machine learning models and shallow neural networks, in terms of evaluation metrics such as MAE, RMSE, and MAPE, the method based on LSTM has shown different degrees of improvement in different datasets. For example, in the university dormitory building dataset, compared with traditional machine learning methods such as LR, SVM, RF, and shallow network ANN, the optimal baseline CEEMDAN-RF-LSTM prediction method can improve the predictability by 42.982%, 47.143%, 43.801%, and 48.164% respectively in terms of the MAE metric; secondly, the predictability can be improved by 43.028%, 47.992%, 44.483%, and 48.038% respectively in terms of the RMSE metric; in terms of the MAPE metric, the predictability can be improved by 42.414%, 45.876%, 42.864%, and 47.745% respectively. Based on the above comparison results, the advantages of recurrent deep learning networks in building energy consumption have been reflected, verifying the importance of non-linear time correlation in energy consumption prediction.

[0102] It should be noted that in some datasets, such as university dormitories, the overall performance of the baseline deep learning networks LSTM and ANN is lower than that of some traditional machine learning baseline models. The main reason for the above results is the constraint of the data sample size. Deep learning technology is to learn the distribution and internal data feature laws of large sample data and master the complex non-linear relationship between independent variables and target variables. In this invention, 80% of the data for three months with an hourly time granularity is used as the training set, and there is a problem of insufficient learning in some datasets, resulting in a slightly lower final test effect than traditional machine learning models. However, this does not affect the comprehensive performance of deep learning on all datasets.

[0103] Building energy consumption shows complex and variable patterns in the time dimension, with obvious data fluctuations, which poses a huge challenge to prediction. Therefore, this invention inherits the use of the Complete Ensemble Empirical Mode Decomposition with Adaptive Noise (CEEMDAN) method to decompose the original time-series observation signals, forming smoother and more periodic wave signals and removing the influence of certain noise. At the same time, considering long-term feature extraction, the coupling of different source data, and the key role of timestamps in time-series prediction, a building energy consumption prediction model based on a twin time-series network (T2SNET) is proposed. By comparing the performance of T2SNET and baseline models on five building energy consumption datasets, it is not difficult to find that T2SNET has significant advantages compared with statistical methods and traditional machine learning methods. Compared with deep learning models such as ANN, LSTM, and CEEMDAN-RF-LSTM, the prediction accuracy has been improved to varying degrees. For example, for the university dormitory building energy consumption dataset, compared with the optimal baseline model CEEMDAN-RF-LSTM, the performance of T2SNET in terms of MAE, RMSE, and MAPE indicators has been improved by 2.923%, 5.054%, and 3.304% respectively; for the university classroom building energy consumption dataset, the improvements are 4.561%, 9.448%, and 3.155% respectively; for the primary and secondary school classroom building dataset, the improvements are 7.692%, 8.565%, and 7.189% respectively. The above experimental comparison results verify the absolute advantage of T2SNET proposed in this invention in the task of predicting building energy consumption, and also reflect the practical application value of T2SNET in industrial scenarios.

[0104] To further demonstrate the performance of T2SNET proposed in this invention, Figures 6 - 10 the fitting situation between the prediction results of T2SNET and the true observed values is shown. From the visualization legend, it can be summarized that:

[0105] (1) The predicted values of the model can accurately fit the observed values and remain consistent;

[0106] (2) The model can still maintain a satisfactory performance at the extreme values (maximum or minimum energy consumption) of each day;

[0107] (3) The performance of the model will not decline due to the oscillation of energy consumption values.

[0108] The above findings prove that T2SNET proposed in this invention has high robustness, can be applied to the prediction of multi-type building energy consumption scenarios, and overcomes the problem of energy consumption data value oscillation. Therefore, T2SNET proposed in this invention is not only more scientific in theory but also more practical in real scenarios.

[0109] As is known by common technical knowledge, the present invention can be implemented by other embodiments that do not depart from its spiritual essence or essential features. Therefore, the above-disclosed embodiments are illustrative in all aspects and not exclusive. All changes within the scope of the present invention or within the scope equivalent to the present invention are encompassed by the present invention.

Claims

1. A building energy consumption prediction method based on deep learning, characterized in that: The steps include the following: S1. Obtain meteorological data and building energy consumption data; S2. Establish a building energy consumption prediction model based on a twin time series network, where the building energy consumption prediction model includes a data preprocessing layer, a time embedding layer, a time series feature extraction layer, a feature adaptive fusion layer, and a prediction layer; S3. Obtain a test data set for training the building energy consumption prediction model, and determine the final hyperparameters of the model framework by means of grid search, so as to obtain an optimized building energy consumption prediction model; S4. Input the meteorological data and building energy consumption data into the optimized building energy consumption prediction model, and output the future energy consumption prediction result.

2. The method for predicting building energy consumption based on deep learning according to claim 1, characterized in that: In the step S2, the building energy consumption prediction model is used to predict the electricity consumption of a building. Assuming that the input time step is P and the prediction time step is Q, the historical electricity energy consumption observations of P time steps are given Meteorological data observations and the time embedding XT = XW + XH, XT ∈ R (P+Q)×d , which is used to predict the electricity energy consumption of the next Q time steps where d1 represents the number of variables of the input electricity energy consumption observations at time step t, d2 represents the number of variables of the input meteorological observations at time step t, and d represents the dimension of the variables after the time stamp passes through the embedding layer.

3. The method for predicting building energy consumption based on deep learning according to claim 1, characterized in that: In step S2, the data preprocessing layer uses the CEEMDAN algorithm to perform mode decomposition on the original data, convert it into smooth signals in multiple modes and with periodicity, and at the same time use the Mean-std normalization method to standardize each decomposed variable. The working principle and process of the CEEMDAN algorithm are as follows: Assume the original input is \(x\in\mathbb{R}\) 1×1 , the total number of decompositions is \(M\), and the output is \(x'\in\mathbb{R}\) M×1 ; (1) Create the original data set with added noise: x i y(t) = x(t) + w0ε i (t), i ∈ {1,..., I}, where x(t) represents the original variable value, ε(t) is white noise with independent Gaussian distribution and unit variance, w0 is the noise coefficient, and I is the number of times the noise is added; (2) For each x i (t), obtain the first decomposed IMF through EMD and calculate the first decomposed The first residual is (3) Decompose the added noise residue Obtain the second Assume E j (·) is the operator that generates the j-th mode obtained by EMD: (4) For the remaining Repeat the above operations until the obtained residual cannot be further decomposed by EMD. The final residual can be expressed as: where M is the total number, and the original data can also be expressed as the sum with the residuals:

4. A building energy consumption prediction method based on deep learning according to claim 1, characterized in that: In the step S2, the time embedding layer introduces two types of time representations. One is the week embedding XW i ∈R 1×d , and the other is the hour embedding XH j ∈R 1×d , where i represents a certain day of the week in a week of 7 days, d represents the dimension of the embedding, which is used to represent the day of the week, and j represents a certain hour of 24 hours in a day, which is used to represent the moment in a day; The embedding method is to use one-hot encoding to map the timestamp information, and use a one-dimensional convolutional neural network to extract features from the one-hot encoded information to form a dense timestamp vector as the input of the time series feature extraction layer: f(x) = ReLU(w * Onehot(x)) where w represents the one-dimensional convolutional kernel, Onehot represents one-hot encoding, which is used to map the original integer input into a sparse encoded vector, and ReLU represents the ReLU activation function.

5. A building energy consumption prediction method based on deep learning according to claim 1, characterized in that: In step S2, the time series feature extraction layer is based on a one-dimensional convolutional neural network and a temporal convolutional network, and extracts the temporal correlation of the meteorological data and the energy consumption data respectively. The one-dimensional convolutional neural network is designed to extract the deep hidden features of the input sequence, and uses dilated causal convolution as the core component of the temporal convolutional network to capture the time trend of the nodes.

6. The method for predicting building energy consumption based on deep learning according to claim 1, wherein: In the step S2, the feature adaptive fusion layer is used to fuse the meteorological and energy consumption time series features, and the result is used as the input of the prediction layer. An adaptive fusion gate is designed in the feature adaptive fusion layer. The time series feature extraction layer outputs the representations H 1,P ∈R d and H 2,P ∈R d , and through the adaptive fusion gate, they are fused to obtain H ∈ R d , where W1 ∈ R d×d 、W2 ∈ R d×d and b z ∈ R d are learnable parameters, ⊙ represents element-wise multiplication, σ represents the sigmoid activation, z is the gating unit, and the gating fusion mechanism adaptively controls the flow of two temporal feature representations.

7. A building energy consumption prediction method based on deep learning according to claim 1, characterized in that: In the step S2, a multi-layer one-dimensional convolutional neural network is used as the prediction layer for deriving the energy consumption value at the next moment. A loss function is set in the prediction layer, and the loss function is defined as the mean absolute error between the observed value y and the predicted value between where λ is the regularization parameter, θ represents all learnable parameters in the building energy consumption prediction model, and N represents the number of test samples.