A Smart Building Energy Consumption Prediction Method Based on Improved DBO-LSTM

By improving the DBO-LSTM model and combining mutual information feature selection with optimized dung beetle algorithm, the problems of model building difficulty and low training efficiency in building energy consumption prediction are solved, achieving high-precision and efficient energy consumption prediction and improving the effectiveness of smart building energy consumption management.

CN117313795BActive Publication Date: 2025-11-14SHANDONG ELECTRIC GRP DIGITAL TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311302283.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-09
Publication Date
2025-11-14
Estimated Expiration
2043-10-09

AI Technical Summary

Technical Problem

Existing building energy consumption prediction methods suffer from several problems, including high difficulty in model building, insufficient consideration of time periodicity and time delay characteristics in data-driven methods, low training efficiency of LSTM models and the impact of hyperparameter settings on prediction accuracy, and an imbalance between global exploration and local development in the dung beetle optimizer algorithm.

Method used

An improved DBO-LSTM model is adopted. Through mutual information feature selection and data normalization, combined with Tent mapping and Levy flight strategy optimization dung beetle algorithm, the optimal parameters of the LSTM model are found, thereby improving feature selection and model prediction accuracy.

Benefits of technology

It achieves high accuracy and efficiency in building energy consumption prediction, enhances the energy management capabilities of data-driven models in smart building scenarios, and improves the robustness and accuracy of prediction models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117313795B_ABST
    Figure CN117313795B_ABST
Patent Text Reader

Abstract

This invention discloses a smart building energy consumption prediction method based on an improved DBO-LSTM, belonging to the field of building energy consumption prediction. This method uses an improved dung beetle algorithm to optimize the LSTM parameters, specifically using the optimal individual position in the algorithm as the number of neurons in the two hidden layers of the LSTM and the learning rate to establish the optimal prediction model. Furthermore, it utilizes Tent mapping to initialize the dung beetle population distribution, improving the quality of the initial population distribution and thus enhancing the model's global search capability. Secondly, it proposes using the Levy flight strategy to perturb the optimal solution, enabling the model to escape local optima and explore other regions of the solution space until the global optimum is found, improving the model's optimization accuracy in the search space. This method deeply mines the spatiotemporal characteristics of building operation data, improves the prediction accuracy of the data-driven model, and realizes energy consumption prediction in smart building scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of building energy consumption prediction, specifically a smart building energy consumption prediction method based on an improved DBO-LSTM. Background Technology

[0002] Building energy consumption prediction methods can be categorized into three types: model-driven methods ("white box"), data-driven methods ("black box"), and hybrid-driven methods ("grey box"). Model-driven methods, based on the laws of thermodynamics and heat transfer, establish physical simulation models of buildings to simulate the activities of people inside the building, the operation of equipment, and the heat transfer processes inside and outside the building. However, the difficulty and cost of establishing the initial physical model remain high, hindering the widespread application of this method. Data-driven methods can be specifically divided into statistical regression and machine learning methods. These traditional data-driven methods do not fully consider the time periodicity and time lag characteristics of building operation data, and their simplified processing methods are too crude, leading to the loss of effective information. To address the shortcomings of traditional data-driven methods in the time and spatial dimensions, some scholars have conducted in-depth research on hybrid-driven methods.

[0003] In recent years, with the rapid development of artificial intelligence technology, research on energy consumption prediction for public buildings based on hybrid-driven methods has become increasingly widespread. Fan et al. used autoencoder neural networks to extract features from complex time series and compared them with feature engineering methods such as expert knowledge methods and statistical analysis methods, proving that unsupervised feature engineering methods based on autoencoder neural networks can improve prediction accuracy. Li et al. used stacked autoencoders in the feature extraction stage and extreme learning machines (ELM) in the energy consumption prediction stage. Zhang Tingfei et al. proposed a building energy consumption prediction method based on LSTM networks, which improved prediction accuracy compared with BP neural networks. However, energy consumption data has nonlinear and time series characteristics. Due to the relatively complex internal structure of LSTM, its training efficiency is much lower than that of traditional RNNs under the same computing power. Each LSTM cell means four fully connected layers (MLP). If the time span of LSTM is large and the network is deep, the computational load will be very large and time-consuming. The setting of LSTM-related hyperparameters has a significant impact on prediction accuracy. Therefore, selecting appropriate algorithms to improve the prediction accuracy of LSTM according to different application scenarios has become a challenging task. The Dung Beetle Optimizer (DBO) algorithm is a novel swarm intelligence optimization algorithm proposed by XUE J et al. in 2023. It takes into account both global exploration and local exploitation, and has the characteristics of fast convergence speed and high solution accuracy. However, it also has the disadvantage of an imbalance between global exploration and local exploitation capabilities, which can easily lead to local optima. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention discloses a smart building energy consumption prediction method based on an improved DBO-LSTM, which mines the temporal characteristics of building operation data to further improve the accuracy of energy consumption prediction.

[0005] To solve the aforementioned technical problem, the technical solution adopted by the present invention is as follows:

[0006] 1) Data collection:

[0007] Appropriate selection of variables can directly improve the accuracy and practicality of load forecasting. This invention uses historical energy consumption data of a public building, which is sorted by time series and includes data on daily and hourly energy consumption over two years. The operational data is used to train and test various forecasting models.

[0008] 2) Feature selection:

[0009] Due to the high dimensionality of the data, data standardization is followed by analysis of correlation coefficients between data points to determine the impact of each feature on the label, thereby eliminating features with little influence. During data preprocessing, the selection of the original data significantly determines the accuracy of the model. Feature selection methods include correlation analysis and numerical sensitivity analysis, but these are linear input selection methods, while energy consumption data is non-linear. Therefore, mutual information feature selection is more effective, as it is highly efficient at calculating the correlation between input and output data.

[0010] Mutual information (MI) represents the interdependence between two variables X and Y.

[0011] The mutual information I(X;Y) between variables X and Y is defined as:

[0012]

[0013] Here, p(x,y) is the joint probability density function, and p(x) and p(y) are the marginal probability density functions of variables x and y, respectively. Mutual information (MI) is used to evaluate the amount of information contributed by the occurrence of one event to the occurrence of another event. The MI mutual information method calculates the mutual information metric between all features and the target feature, then sorts them, and selects the K features with the highest MI to achieve the purpose of feature selection. When there is some correlation between variables, the smaller the randomness between variables, the greater the mutual information.

[0014] In this invention, the MI mutual information method is used to analyze the correlation coefficient between each feature in the original energy consumption dataset and the building energy consumption prediction target, so as to determine the impact of each feature on the building energy consumption prediction target and thus eliminate features that have little impact on it.

[0015] 3) Data normalization processing:

[0016] The feature vectors are normalized to obtain the final data, which is then used as the model input. The feature vectors are transformed into data within the range of (0,1) using the following formula:

[0017]

[0018] Among them, X * This is the result after normalization. X represents the original data in the sample set, min represents the minimum data in sample set X, and max represents the maximum data in sample set X.

[0019] 4) Establish an improved DBO-LSTM model

[0020] This invention uses a dual-hidden-layer LSTM model for prediction. The fit and prediction accuracy are not only related to the model's topology, but also significantly influenced by the setting of key parameters. Currently, the number of hidden layer neurons and the learning rate, crucial parameters of LSTM models, are difficult to determine and are mostly determined manually based on experience or through numerous experiments. This approach is random and leads to highly unstable model prediction performance. Therefore, this invention proposes an improved dung beetle algorithm to optimize the LSTM prediction model. The improved dung beetle algorithm is used to optimize the LSTM parameters, specifically by using the optimal individual position in the algorithm as the number of neurons in the two hidden layers and the learning rate to establish the optimal prediction model.

[0021] The specific steps for establishing the improved DBO-LSTM model are as follows:

[0022] S41) Initialize the basic parameters during the LSTM model parameter optimization process, including dung beetle population size, maximum number of iterations, limit the number of hidden layer neurons and the learning rate search range, and randomly initialize the individual movement speed, acceleration and time of the dung beetle population; the dung beetle algorithm population size includes stealing dung beetles, small dung beetles, breeding dung beetles and rolling dung beetles;

[0023] S42) Initialize the population position of the dung beetle algorithm based on the Tent chaotic mapping, and set the individual position to the number of neurons in each hidden layer of the model and the learning rate;

[0024] S43) Other LSTM parameter settings, including the number of LSTM hidden layers, loss function, and optimization algorithm;

[0025] S44) Preprocess the original data to form a new dataset, and divide the new dataset into a training set and a test set. Input the training set and the test set into the LSTM model for training and testing.

[0026] S45) The fitness function of the dung beetle algorithm is the root mean square error of the 10-fold cross-validation between the actual and predicted labels of the LSTM model.

[0027] S46) Iterate, calculate the position of the dung beetle in each iteration and calculate the fitness value. By comparison, determine the optimal historical position of the individual and then determine the optimal position of the population. Use the Levy flight strategy to perturb the optimal solution so that the dung beetle algorithm can jump out of the local optimal solution, thereby more accurately determining the global optimal position of the population.

[0028] S47) Determine if the maximum number of iterations has been reached. If yes, end the process; otherwise, return to step S42) and continue execution.

[0029] S48) Return the optimal individual position and its fitness value, map the optimal individual position to the number of neurons in the LSTM hidden layer and the learning rate, and the optimization ends.

[0030] 5) Model Training

[0031] The proposed improved dung beetle algorithm was used to optimize the LSTM model for training. Initial parameters for the optimization algorithm were set as follows: dropout ∈ [0,1], batch size ∈ [20,300], population size 30, and number of iterations 300. 80% of the dataset was used as the training set, and the remaining data as the test set. The preprocessed feature vectors were then input into the LSTM model for training.

[0032] 6) Verify the accuracy of the prediction model

[0033] The dataset is input into a trained LSTM model to predict the energy consumption of smart buildings. The model prediction accuracy is evaluated using the root mean square error (RMSE), mean absolute error (MAE), and symmetric mean absolute percentage error (SMAPE). The lower the value, the higher the model accuracy.

[0034] The dung beetle optimization algorithm randomly initializes the population positions in the search space, but this method has three main drawbacks: a) the distribution of individual dung beetles is uneven; b) its global exploration ability is weak; and c) the population has low diversity and is prone to getting trapped in local optima. To enhance the uniformity and ergodicity of the population distribution, chaotic mapping is introduced to optimize the population initialization method. Chaotic mapping is a method that combines determinism and randomness; chaos has characteristics such as randomness and non-periodicity. Chaotic variables replace random variables in the initialization and position update process, thus the chaotic mapping strategy has a wider search range in the solution space than random search strategies. Currently, the most widely used chaotic mapping is the logistic chaotic mapping, but the Tent mapping has better ergodicity, uniformity, and faster iteration speed than the logistic mapping. Therefore, this paper uses Tent mapping to initialize the positions of dung beetle individuals. First, the obtained values ​​are projected into the chaotic variable space using the Tent mapping relationship. Then, the generated chaotic values ​​are mapped into the algorithm's initial space through linear transformation. Tent mapping can preserve the randomness of initializing individuals, improve the diversity of the population and the distribution quality of the search space, make it easier for the algorithm to escape local optima when solving function optimization problems, and improve the global search capability.

[0035] The steps for initializing a dung beetle swarm using Tent mapping are as follows:

[0036] A1) Determine the value of parameter α;

[0037] A2) Set the range of initial values ​​for the x0 sequence according to the objective function of the optimization problem, and randomly generate X values ​​within this range. The x0 sequence represents the position information of the dung beetle in the 0th iteration.

[0038] A3), let X0=x0(n), n=1, 2,...,X;

[0039] A4) Let x(1) = X0, x(t+1) is obtained from the formula:

[0040]

[0041] Calculated;

[0042] In the formula, α is the control parameter, x(t) represents the position information of the dung beetle at the t-th iteration, and x(t+1) represents the position information of the dung beetle at the (n+1)-th iteration;

[0043] To ensure that the sequence generated by the Tent chaotic mapping is valid, α ≠ 0.5, and the initial value x0 and the parameter α cannot be equal;

[0044] A5) Save the x sequence and enter the main loop of the DBO algorithm.

[0045] To verify the effectiveness of the initial population distribution in the Tent chaotic map optimization algorithm, 100 points were randomly generated in a two-dimensional plane for the initial population distribution experiment, such as... Figure 1 As shown:

[0046] In the position update formula for dung beetles engaging in theft, their positions are updated based on their current best individual value. Therefore, if the current best position is not the globally optimal point, the dung beetle population will concentrate its search around that location, failing to find the true optimal position and leading to search stagnation. This easily results in getting trapped in local optima. In such cases, the Levy flight strategy can be used to update the dung beetle positions, allowing these individuals to move to a wider search space. This increases the diversity of the dung beetle population, enabling the algorithm to escape local optima and explore other regions of the solution space until it finally finds the globally optimal solution.

[0047] The small-step tracking characteristic of the Lévy flight pattern helps the algorithm perform local neighborhood searches, improving optimization accuracy. The long-distance jump characteristic perturbs the population position, aiding the algorithm's exploration and helping it escape local optima. The step size of the Lévy distribution is:

[0048]

[0049] In the formula, β = 1.5, and x and y are numbers that follow a normal distribution;

[0050]

[0051] Where Γ is the Gamma function.

[0052] After introducing Levy's flight into the dung beetle's position update formula, the dung beetle's position update formula becomes:

[0053] x i (t+1)=X b +levy(β)(S×g× (9)

[0054] (|x i (t)-X * |+|x i (t)-x b |)),

[0055] x i (t) represents the position information of the i-th dung beetle at the t-th iteration, x i (t+1) represents the position information of the i-th dung beetle in the (t+1)-th iteration, g is a random vector of size 1×D following a normal distribution, S represents a constant, and X * X represents the current local optimum. b This indicates the globally optimal position.

[0056] Furthermore, this method uses the total electricity input from the public power grid as the prediction target, and uses the total electricity input from the public power grid, temperature, humidity, wind speed, sunshine duration, weekday, date and time, office energy consumption, computer room energy consumption, refrigerator energy consumption, ventilation energy consumption, air conditioning energy consumption, lighting energy consumption, water heater energy consumption, electric vehicle energy consumption, and charging energy consumption in the 24 hours prior to the prediction time as the original energy consumption dataset.

[0057] Furthermore, the preprocessing in step S44) includes feature selection and normalization. Specifically, a sliding window is used to form 360 feature components from 15 features over 24 hours. Then, the MI mutual information method is used to select the top 60 features with the largest MI values ​​among the 360 ​​feature components formed by the sliding window method to form a new dataset.

[0058] The beneficial effects of this invention are:

[0059] 1. To achieve high-efficiency energy saving in smart buildings, an energy consumption prediction method based on an improved DBO-LSTM is proposed. In data preprocessing, to reduce model training time while ensuring prediction accuracy, MI (Minimum Injection) is used to select effective and key feature parameters for energy consumption prediction.

[0060] 2. Since the prediction accuracy of LSTM is affected by key hyperparameters such as the number of hidden layer neurons and the learning rate, the excellent dung beetle algorithm is used to optimize the LSTM parameters. Furthermore, improvements are made to address the problems of uneven initial population distribution and inaccurate optimization states of some individuals in the population. First, a Tent mapping is proposed to initialize the population distribution, improving the quality of the initial population distribution and thus enhancing the algorithm's global search capability. Second, a Levy flight strategy is proposed to perturb the optimal solution, enabling the algorithm to escape local optima and explore other regions of the solution space until the global optimum is found, thereby improving the algorithm's optimization accuracy in the search space.

[0061] 3. The hyperparameters of the LSTM are optimized using the dung beetle algorithm to match the selected features with the network topology, thereby improving the accuracy and robustness of the LSTM model's predictions. The methodology established in this patent deeply explores the spatiotemporal characteristics of building operation data, improves the prediction accuracy of data-driven models, and enables energy consumption prediction in smart building scenarios. This helps data-driven models play a greater role in the refined management of building energy consumption. Attached Figure Description

[0062] Figure 1 A comparison chart of the initial population positions using random methods and Tent chaotic mapping;

[0063] Figure 2 Here is the flowchart for IDBO-LSTM;

[0064] Figure 3 The graph shows the fitness change curve of the f1 test function;

[0065] Figure 4 The fitness change curve of the f3 test function;

[0066] Figure 5 The graph shows the fitness change of the f6 test function. Detailed Implementation

[0067] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0068] Example 1

[0069] This embodiment discloses a smart building energy consumption prediction method based on an improved DBO-LSTM, including the following steps:

[0070] 1) Data collection:

[0071] A public building located in Shandong, China, was selected as the data source for case study. The building has a total area of ​​100,000 square meters and a total air-conditioned area of ​​62,000 square meters. The building is divided into four sections: Section A, Section B, Section C, and a plaza. Section A mainly consists of office space for businesses, including a lobby, conference hall, corridors, executive offices, and general offices. Section B primarily comprises public spaces, including an entrance lobby, office hall, public corridors, a multi-functional hall, a public ceremonial hall, a grand hall, and an underground restaurant. Section C mainly consists of commercial space for businesses. The dataset used in the experiment is the building's electricity consumption from August 15, 2021, to September 4, 2022. This dataset contains 15 features, described in Table 1.

[0072] Table 1 Dataset Description

[0073]

[0074]

[0075] 2) Feature selection:

[0076] This paper uses data from the previous 24 hours to predict the value of Gi for the next hour. Therefore, a sliding window is used to form 360 feature components from the 15 features of the 24 hours. Then, the MI mutual information method is used to select the top 60 features with the largest MI values ​​from the 360 ​​feature components formed by the sliding window method. The selection results are shown in Table 2.

[0077] Table 2 Characteristics of MI Selection

[0078]

[0079]

[0080] The selected features, such as Gi(t-1), represent those input from the building's public power grid one hour prior to the current time. The MI value is the mutual information between the current feature component X and the Gi component based on the current time. Table 2 shows that most features from the previous 4 hours have relatively high mutual information values ​​with the current Gi feature. The mutual information values ​​between the features of Gi, Ao, Co, and A2 from the previous 24 hours and the current Gi feature are also relatively high. MI reduces redundant features by 83.3%, significantly improving the efficiency of the model algorithm.

[0081] 3) Data normalization processing:

[0082] The feature vectors are normalized to obtain the final data, which is then used as the model input. The feature vectors are transformed into data within the range of (0,1) using the following formula:

[0083]

[0084] Among them, X * This is the result after normalization. X represents the original data in the sample set, min represents the minimum data in sample set X, and max represents the maximum data in sample set X.

[0085] 4) Model network:

[0086] First, data collection was conducted, using a public building in Shandong, China as the data source for verification. Next, a data preprocessing module was implemented, employing mutual information to preprocess the data, selecting key feature parameters effective for energy consumption prediction, and dividing the dataset into training and testing sets. Then, an improved dung beetle algorithm was established to optimize the LSTM model. This improved algorithm was used to optimize the hyperparameters of the LSTM, ensuring the selected features matched the network topology, thus improving the accuracy and robustness of the LSTM model's predictions. Finally, the energy consumption prediction results were obtained.

[0087] like Figure 2 As shown, the specific algorithm for the improved DBO-LSTM smart building energy consumption prediction method is as follows:

[0088] (1) Initialize the basic parameters of the LSTM model during the optimization process, including the algorithm population size, maximum number of iterations, limit the number of hidden layer neurons and the learning rate search range, and randomly initialize the individual movement speed, acceleration and time of the population;

[0089] (2) Initialize the population position of the dung beetle algorithm based on Tent chaotic mapping, and set the individual position to the number of neurons in each hidden layer of the model and the learning rate;

[0090] (3) Other LSTM parameter settings: the number of LSTM hidden layers is 2, the loss function is RMSE, and the optimization algorithm is Adam.

[0091] (4) Preprocess the original data to form 360 feature components, and select the top 60 feature components with the highest MI weights to form a new dataset. Use 80% of the dataset as the training set and the remaining data as the test set. Then, input the feature vectors obtained after data preprocessing into the LSTM model for training;

[0092] (5) The fitness function of the dung beetle algorithm is the root mean square error of the 10-fold cross-validation between the actual label and the predicted label of the LSTM model.

[0093] (6) Perform iterations, calculate the position of an individual in each iteration and calculate the fitness value, determine the optimal historical position of the individual by comparison and then determine the optimal position of the population, use the Levy flight strategy to perturb the optimal solution, so that the algorithm can jump out of the local optimal solution and thus more accurately determine the global optimal position of the population.

[0094] (7) Determine whether the maximum number of iterations has been reached. If yes, end the process; otherwise, return to step (2) and continue execution.

[0095] (8) Return the optimal individual position and its fitness value, map the optimal individual position to the number of neurons in the LSTM hidden layer and the learning rate, and the optimization ends.

[0096] 5) Split the dataset

[0097] The original data was preprocessed to generate 360 ​​feature components. The top 60 feature components with the highest MI weights were selected to form a new dataset. 80% of the dataset was used as the training set, and the remaining data was used as the test set.

[0098] 6) Model Training

[0099] This step trains the LSTM model using the proposed improved dung beetle algorithm. Initial parameters for the optimization algorithm are set as follows: dropout ∈ [0,1], batch size ∈ [20,300], population size is set to 30, and the number of iterations is set to 300. 80% of the dataset is used as the training set, and the remaining data is used as the test set. The feature vectors obtained after data preprocessing are then input into the LSTM model for training.

[0100] 7) Forecasting and Assessment

[0101] 7.1) Evaluation Indicators

[0102] Three evaluation metrics are used to assess the quality of the model.

[0103] (1) Root Mean Square Error: The smaller the RMSE value, the better the model fit.

[0104]

[0105] (2) Mean Absolute Error: The smaller the MAE value, the better the model fit.

[0106]

[0107] (3) Symmetrical Mean Absolute Percentage Error: The smaller the SMAPE value, the better the model fit.

[0108]

[0109] in, For the predicted value, y i For the true value, is the mean of the true values, and n is the number of data points.

[0110] 7.2) Results Analysis

[0111] 7.2.1) Comparative Analysis of Dung Beetle Algorithm Experiments

[0112] To verify the performance of the algorithm, this section uses the basic dung beetle search algorithm (DBO), the improved dung beetle search algorithm (IDBO), and the sparrow search algorithm (SSA) together to conduct experiments on the test function. The expression of the test function is shown in Table 3.

[0113] Table 3 Test function expressions

[0114]

[0115]

[0116] This invention employs the above six test functions to perform performance testing on the algorithm. Functions f1–f3 are unimodal test functions, while f4–f6 are multimodal test functions. Unimodal functions primarily test the local search capability of the swarm algorithm, while multimodal functions primarily test its global search capability. In the experiments, the parameters set for DBO, GWO, and SSA are the same as those recommended in the original work, representing representative empirical values. The population size is set to 30, the maximum number of iterations is set to 300 generations, and each test function is tested independently 30 times. Figures 3 to 5 The graphs show the convergence curves of DBO, IDBO, GWO, and SSA in three different test functions.

[0117] The convergence curves of the functions show that the GWO algorithm has the weakest overall optimization ability, while the IDBO algorithm has higher convergence accuracy than the other algorithms. It can be seen that the improved dung beetle algorithm has significantly better convergence than the other algorithms, and its convergence speed is also relatively fast. In particular, the f3 function converges to 0 very quickly, and the f1 and f3 functions reach their optimal values ​​around generation 150, indirectly demonstrating the faster convergence speed.

[0118] Whether for unimodal or multimodal functions, the IDBO algorithm demonstrates excellent performance, achieving rapid search and convergence, and allowing for further exploration, showcasing a reasonable balance between its global exploration and local exploration capabilities. Finally, comparisons reveal that the IDBO algorithm not only surpasses other algorithms in final convergence accuracy but also in convergence speed.

[0119] 7.2.2) Comparative Analysis of Basic Model Experiments

[0120] To verify the superior predictive performance of the proposed IDBO-LSTM model, a comparative experiment was first conducted on three prediction models: SVR, K-Nearest Neighbor Regression (KNR), and LSTM. Single-step prediction experiments were then performed using features 1 to 15 to compare the total input electricity Gi of the public power grid.

[0121] The experimental comparison results (Table 3) show that the LSTM model has the best prediction results among the three model prediction evaluation indicators: mean absolute error, root mean square error, and symmetric mean absolute percentage error.

[0122] Table 3 Comparison of predictions from SVR, KNR, and LSTM models.

[0123]

[0124] 7.2.3) Comparative Analysis of Combined Model Experiments

[0125] A comparative experiment was conducted on three prediction models: LSTM, DBO-LSTM, and IDBO-LSTM. Single-step prediction experiments were performed on the total input electricity Gi of the public power grid using features 1 to 15.

[0126] In the experimental comparison results (Table 4), it can be seen from the three model prediction evaluation indicators, namely mean absolute error, root mean square error, and symmetric mean absolute percentage error, that the IDBO-LSTM model has the best prediction results.

[0127] Table 4 Comparison of predictions from LSTM, DBO-LSTM, and IDBO-LSTM models.

[0128]

[0129] Table 4 presents the average results of 20 experiments for the three combined models. The first three columns represent the three evaluation metrics of the prediction model, and the fourth column represents the training time of the prediction model. As shown in Table 4, compared to the LSTM model, the IDBO-LSTM model improves performance on RMSE, MAE, and SMAPE by 10%, 18%, and 15%, respectively. Compared to the DBO-LSTM model, the IDBO-LSTM model improves performance on RMSE, MAE, and SMAPE by 4%, 6%, and 10%, respectively. The training time of the IDBO-LSTM model is also reduced by 99 seconds and 11 seconds compared to the LSTM and DBO-LSTM models, respectively.

[0130] The above description is merely the basic principle and preferred embodiment of the present invention. Improvements and substitutions made by those skilled in the art based on the present invention are within the scope of protection of the present invention.

Claims

1. A smart building energy consumption prediction method based on improved DBO-LSTM, characterized in that: Includes the following steps: S01) Data collection: Collect historical energy consumption data of buildings to form the original energy consumption dataset; S02) Feature selection: Analyze the correlation coefficients between each feature in the original energy consumption dataset and the building energy consumption prediction target, thereby determining the impact of each feature on the building energy consumption prediction target and eliminating features that have little impact on it. S03) Data normalization processing: The feature vectors in the original energy consumption dataset are normalized to obtain the final data as the model input; S04) Establish an improved DBO-LSTM model, optimize the LSTM parameters using an improved dung beetle algorithm, and use the optimal individual position in the dung beetle algorithm as the number of neurons in the two hidden layers of the LSTM and the learning rate to establish the optimal prediction model. The specific steps are as follows: S41) Initialize the basic parameters during the LSTM model parameter optimization process, including dung beetle population size, maximum number of iterations, limit the number of hidden layer neurons and the learning rate search range, and randomly initialize the individual movement speed, acceleration and time of the dung beetle population; S42) Initialize the dung beetle population location based on the Tent chaotic mapping, setting the individual location to the number of neurons in each hidden layer of the model and the learning rate; S43) Other LSTM parameter settings, including the number of LSTM hidden layers, loss function, and optimization algorithm; S44) Preprocess the data collected in step S01) to form a new dataset, and divide the new dataset into a training set and a test set. Input the training set and the test set into the LSTM model for training and testing. S45) The fitness function of the dung beetle algorithm is the root mean square error of the 10-fold cross-validation between the actual label and the predicted label of the LSTM model. S46) Iterate, calculate the position of the dung beetle in each iteration and calculate the fitness value. By comparison, determine the optimal historical position of the individual and then determine the optimal position of the population. Use the Levy flight strategy to perturb the optimal solution so that the dung beetle algorithm can jump out of the local optimal solution, thereby more accurately determining the global optimal position of the population. S47) Determine if the maximum number of iterations has been reached. If yes, end the process; otherwise, return to step S42) and continue execution. S48) Return the optimal individual position and its fitness value, and map the optimal individual position to the number of neurons in the LSTM hidden layer and the learning rate. The optimization ends. S05) Divide the model input data into training set, validation set and test set. The training set and validation set are used to train the improved DBO-LSTM model, and the test set is used to input the trained DBO-LSTM model to predict building energy consumption.

2. The smart building energy consumption prediction method based on improved DBO-LSTM according to claim 1, characterized in that: In step S42), the specific steps for initializing the dung beetle population location based on the Tent chaotic mapping are as follows: A1) Determine the value of parameter α; A2) Set the range of initial values ​​for the x0 sequence according to the objective function of the optimization problem, and randomly generate X values ​​within this range. The x0 sequence represents the position information of the dung beetle in the 0th iteration. A3), let X0=x0(n), n=1, 2,...,X; A4) Let x(1) = X0, x(t+1) is obtained from the formula: Calculated; In the formula, α is the control parameter, x(t) represents the position information of the dung beetle at the t-th iteration, and x(t+1) represents the position information of the dung beetle at the (n+1)-th iteration; To ensure that the sequence generated by the Tent chaotic mapping is valid, α ≠ 0.5, and the initial value x0 and the parameter α cannot be equal; A5) Save the x sequence and enter the main loop of the DBO algorithm.

3. The smart building energy consumption prediction method based on improved DB0-LSTM according to claim 2, characterized in that: α=0.4。 4. The smart building energy consumption prediction method based on improved DB0-LSTM according to claim 1, characterized in that: After perturbing the optimal solution of the DBO algorithm using the Lévy flight strategy, the position update formula for the dung beetle is: x i (t) represents the position information of the i-th dung beetle at the t-th iteration, x i (t+1) represents the position information of the i-th dung beetle in the (t+1)-th iteration, g is a random vector of size 1×D following a normal distribution, S represents a constant, and X * X represents the current local optimum. b Let represent the global optimal position, and levy(β) represent the step size of the Lévy distribution; Where β = 1.5, and x and y are random numbers that follow a normal distribution; Where Γ() is the Gamma function.

5. The smart building energy consumption prediction method based on improved DB0-LSTM according to claim 1, characterized in that: The specific settings for other LSTM parameters are as follows: the number of hidden layers in LSTM is 2, the loss function is RMSE, and the optimization algorithm is Adam.

6. The smart building energy consumption prediction method based on improved DBO-LSTM according to claim 1, characterized in that: In step S02), the correlation coefficients between each feature in the original energy consumption dataset and the building energy consumption prediction target are analyzed using the MI mutual information method.

7. The smart building energy consumption prediction method based on improved DB0-LSTM according to claim 1, characterized in that: This method uses the total electricity input from the public power grid as the prediction target, and uses the total electricity input from the public power grid, temperature, humidity, wind speed, sunshine duration, weekday, date and time, office energy consumption, computer room energy consumption, refrigerator energy consumption, ventilation energy consumption, air conditioning energy consumption, lighting energy consumption, water heater energy consumption, electric vehicle energy consumption, and charging energy consumption in the 24 hours before the prediction time as the original energy consumption dataset.

8. The smart building energy consumption prediction method based on improved DB0-LSTM according to claim 7, characterized in that: The preprocessing in step S44) includes feature selection and normalization. Specifically, a sliding window is used to form 360 feature components from 15 features over 24 hours. Then, the MI mutual information method is used to select the top 60 features with the largest MI values ​​among the 360 ​​feature components formed by the sliding window method to form a new dataset.