A building energy consumption prediction model training method and device
By combining BIM and IoT sensors with spatiotemporal graph convolutional networks, the shortcomings of traditional models in processing spatial topology and dynamic change data in building energy consumption prediction are solved, achieving efficient and accurate energy consumption prediction and adapting to the non-steady-state changes of the building environment.
Patent Information
- Application Number
- CN202511090137.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2045-08-05
AI Technical Summary
Traditional building energy consumption prediction models cannot effectively handle spatial topology and dynamically changing data, lack correlation between data, resulting in insufficient data integration capabilities and an inability to respond in real time.
Building structural parameters are obtained through BIM models, data are collected by deploying IoT sensors, a building energy consumption database is constructed, and manual annotation is performed. The model is trained using a spatiotemporal graph convolutional network, data interpolation and noise reduction are performed, a spatiotemporal correlation matrix is constructed, feature extraction is performed by combining multi-scale causal convolution and dynamic graph convolution, and the model is optimized using a composite loss function.
It improves the accuracy and real-time performance of building energy consumption prediction, can adapt to non-steady-state changes in complex scenarios, enhances data quality and computing efficiency, and reduces the cost of repeated development.
Smart Images

Figure CN120995105B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and data processing technology, and in particular to a method and device for training a building energy consumption prediction model. Background Technology
[0002] With the increasing prominence of global energy issues, the building sector is paying more and more attention to online energy consumption monitoring systems. As an important component of building energy consumption monitoring systems, building energy consumption prediction models integrate advanced sensors, network communication and data analysis technologies to collect various energy consumption data inside buildings and external factors in real time. By integrating and analyzing the data, comprehensive and high-precision predictions of building energy consumption can be achieved.
[0003] However, traditional statistical models mainly rely on linear assumptions and cannot model spatial topology. Single-dimensional deep learning models can only handle single-dimensional features and cannot handle dynamically changing data. Mainstream technologies lack data integration capabilities, lack correlation between data, lack dynamic modeling, and cannot respond in real time.
[0004] Therefore, in order to solve the above problems, this invention proposes a method and device for training a building energy consumption prediction model. Summary of the Invention
[0005] This invention addresses the shortcomings of existing technologies by developing a training method and equipment for a building energy consumption prediction model. By training the building energy consumption prediction model, this invention enables the model to efficiently process data and automatically optimize it, thereby improving the accuracy of prediction results and reducing the cost of repetitive development.
[0006] The technical solution of this invention to solve the technical problem is a method for training a building energy consumption prediction model, comprising the following steps:
[0007] S1. Obtain building structural parameters through BIM building information model, and collect dynamic data of temperature, humidity and pedestrian density by deploying IoT sensors. Integrate the acquired data to form a building energy consumption database, and then have experts in the field manually annotate the acquired data to classify the acquired data into building energy consumption levels.
[0008] S2. Align the collected data in time and space, interpolate the collected data to fill in the missing data areas, and perform noise reduction and normalization operations to finally obtain the preprocessed spatiotemporal correlation matrix.
[0009] S3. Train the preset building energy consumption prediction model, construct a building energy consumption prediction model based on spatiotemporal graph convolutional network, input the spatiotemporal correlation matrix into the building energy consumption prediction model for training, repeat the training process iteratively until the preset stopping iteration condition is met, and obtain the trained model.
[0010] S4. Input the newly collected data into the trained model to obtain the classification results of building energy consumption.
[0011] S1 is as follows: Building energy efficiency levels are classified into Level 1, Level 2, Level 3, Level 4, and Level 5.
[0012] S2 is as follows: A grid space is constructed based on the building structure parameters of the building information model. The building structure parameters are static parameters, and the constructed grid space is a static space.
[0013] Data from IoT sensors is projected into a static grid space to form a dynamic grid space. Data missing in the grid space is interpolated, including temporal interpolation and spatial interpolation. The interpolated data is then subjected to noise reduction and normalization operations to obtain a spatiotemporal correlation matrix that includes building structural parameters and data collected by IoT sensors.
[0014] The time interpolation operation is as follows:
[0015] The data from the IoT sensor is converted into periodic parameters using a Fast Fourier Transform (FFT). Then, Fourier-enhanced dynamic time interpolation is performed on the periodic parameters of the IoT sensor data. By capturing periodic factors and non-stationary external variables, the data from the IoT sensor is interpolated. The calculation formula is as follows:
[0016] ,
[0017] in, express Interpolation at time, Indicates the total number of cycles. Indicates the first One cycle, Indicates the first The frequency of each cycle, Indicates the first Phase of each cycle, express The strength, Indicates the first Interpolation at time, express The weight, express Momentary noise, express The weight, Represents external variables. Indicates the weight of external variables;
[0018] Simultaneously, a spatiotemporal joint latent variable interpolation method is used to calculate... The conditional probability distribution of the interpolation at each time step is used to generate spatiotemporal joint latent variables by encoding the spatial topology and temporal context through a VAE, and the hidden state of the interpolation at the previous time step is calculated through a graph neural network.
[0019] ,
[0020] ,
[0021] ,
[0022] in, express Timing interpolation The conditional probability distribution, express Spatiotemporal joint latent variables at time, express The mean at time, express Variance at time, express The hidden state at all times The weights representing the hidden states, The weights of the spatiotemporal joint latent variables are represented. This represents a multilayer perceptron.
[0023] The spatial interpolation operation is as follows:
[0024] Graph neural network-enhanced interpolation is applied to the building structural parameters of the Building Information Model (BIM). A grid space is constructed based on these BIM parameters, and data from IoT sensors is mapped to this grid space. The center point of each grid cell is designated as a node. If two grid cells are physically connected, an edge is established. The graph neural network aggregates the neighbor information of each node to obtain its hidden state. The graph neural network has L layers, and the grid space contains N nodes. The formula for calculating the hidden state of each node in each layer of the graph neural network is as follows:
[0025] ,
[0026] in, This represents a non-linear activation function operation. The graph neural network represents the first... Layer weights, This indicates a splicing and merging operation. The graph neural network represents the first... The first in the layer The hidden state of each node, The graph neural network represents the first... The first in the layer The hidden state of each node, Represents a node The set of neighboring nodes, express The nodes in Represents a node and nodes Relationship, The graph neural network represents the first... The first in the layer The hidden state of each node;
[0027] Then, iterating layer by layer, the hidden state of each node in the Lth layer of the graph neural network is obtained. Then, based on the hidden state of the node, interpolation is predicted, and the calculation formula is as follows:
[0028] ,
[0029] in, Indicates the first Interpolation at each node Indicates the first Spatiotemporal joint latent variables at each node express The weight, The weight represents the hidden state.
[0030] The specific steps for generating the spatiotemporal correlation matrix are as follows:
[0031] The data, after interpolation in both time and space dimensions, undergoes denoising and normalization. The processed data is then aligned, and the data from the IoT sensors is sorted by time series and represented as follows: , Time series data sets The length of the time series is represented; the processed building structure parameters are based on a set of nodes formed by network spatial nodes. Then, the time and space data are time-sliced and aligned to generate a spatiotemporal correlation matrix. Represented as:
[0032] ,
[0033] in, express elements, express Time of the first The spatiotemporal values at each node.
[0034] The specific steps for training a building energy consumption prediction model are as follows:
[0035] A building energy consumption prediction model based on a spatiotemporal graph convolutional network is constructed. The model includes an input layer, a hidden layer, and an output layer. The spatiotemporal correlation matrix is input into the building energy consumption prediction model, and after passing through the input layer, it is input into the hidden layer. The hidden layer includes time and spatial dimensions. For time dimension data, causal convolution with different dilation rates is used to capture multi-granular temporal features. For spatial dimension data, the adjacency matrix is generated by the node features to obtain the output of time and spatial dimensions. Then, the output of time and spatial dimensions is fused and input into the output layer. The Softmax classifier outputs the probability distribution of five levels of energy consumption. The classification result with the highest probability is the classification result of building energy consumption.
[0036] Then, a composite loss function is constructed, and the model parameters are adjusted based on the loss function;
[0037] The training process of the building energy consumption prediction model is iterated until the loss function value meets the preset stopping condition, at which point the training ends and the trained building energy consumption prediction model is obtained.
[0038] The specific operations in the hidden layer are as follows:
[0039] (1) In terms of time dimension, from the spatiotemporal correlation matrix Extracting temporal features , , Indicates the first Temporal feature sequence of each node, Set dilation rates for different period sizes. , These correspond to 1-hour, 3-hour, and 6-hour periods, respectively. The time dimension features extracted from each layer of the multi-scale causal dilated convolutional computation model are calculated, and then layer-by-layer computation is performed based on the time dimension features output from each layer. The layer outputs the time feature matrix at each node. The calculation formula is as follows:
[0040] ,
[0041] in, In the model, the first The time dimension features of the layer output, Presentation layer normalization operation, Indicates the first The layer period is Branch weights, Indicates the first The layer period is The convolution kernel weights, Indicates the number of layers in the model;
[0042] (2) In the spatial dimension, according to the spatiotemporal correlation matrix The nodes in the model constitute a spatial feature matrix, and the first node in the model is the first node in the spatial feature matrix. The spatial feature matrix of the layer is represented as , , The feature dimension is represented by a dynamic adjacency matrix generated by querying trainable parameters and key trainable parameters. The calculation formula is as follows:
[0043] ,
[0044] Then, based on the obtained dynamic adjacency matrix, the spatial feature matrix of the next layer is predicted. until the first [number] in the model is obtained. The spatial feature matrix of the layer output This is the output of the spatial dimension. The formula for calculating the next layer of spatial feature matrix is as follows:
[0045] ,
[0046] in, This represents a non-linear activation function operation. The values can be trained into a matrix.
[0047] The calculation process of the composite loss function is as follows:
[0048] The composite loss function consists of cross-entropy loss, regularization loss, and VAE reconstruction loss;
[0049] (1) Calculate the cross-entropy loss by using the predicted probability of building energy consumption level and the manually labeled building energy consumption level classification;
[0050] ,
[0051] in, Represents cross-entropy loss, This represents the total number of input data samples. Indicates the input number of the first... Each data sample is labeled with a building energy consumption level classification. Indicates the predicted input number. The energy efficiency level of each data sample is The probability, These correspond to Level 1, Level 2, Level 3, Level 4, and Level 5 energy efficiency, respectively.
[0052] (2) The formula for calculating regularization loss is as follows:
[0053] ,
[0054] in, Indicates the regularization loss. This represents the regularization strength coefficient used to control model complexity. This indicates the number of layers in the network of the model. This indicates that the model is in the time dimension. The trainable weight matrix of a layer network, This indicates that the model is in the spatial dimension of the first... The trainable weight matrix of a layer network, Denotes the Frobenius norm of a matrix. Represents the L2 norm;
[0055] (3) The formula for calculating the VAE reconstruction loss is as follows:
[0056] ,
[0057] in, The reconstruction loss function is represented by VAE, which stands for Variational Autoencoder. This represents the spatiotemporal joint latent variables given the time-dimensional data collected by IoT sensors. The posterior distribution of the variable. Describe the posterior distribution Expectations express divergence parameter, express Divergence weighting coefficient Representing spatiotemporal joint latent variables The prior distribution, Indicates the reconstruction loss parameter. This represents the spatiotemporal joint latent variables given the time-dimensional data collected by IoT sensors. The true posterior distribution;
[0058] (4) The formula for calculating the composite loss function is as follows:
[0059] ,
[0060] in, Represents the composite loss function. express The weighting coefficients, express The weighting coefficients, express The weighting coefficients.
[0061] On the other hand, the present invention also provides an electronic device, including: a processor and a memory, wherein the processor is configured to run a program stored in the memory, wherein the program executes a building energy consumption prediction model training method when it runs.
[0062] The effects described in the invention are merely those of the embodiments, and not all the effects of the invention. The above technical solutions have the following advantages or beneficial effects:
[0063] This invention constructs a building energy consumption database by collecting multimodal data, performs interpolation processing on the data in both time and spatial dimensions, and aligns the processed data in both dimensions to obtain a spatiotemporal correlation matrix. Interpolation fills in gaps in the data, making it more complete and improving its quality and reliability, facilitating more comprehensive data analysis. Time interpolation using Fourier transform and spatiotemporal joint latent variable interpolation captures periodic changes and sudden disturbances, avoiding the fragmentation of non-steady-state characteristics by single data. Latent variables ensure that the interpolation results conform to the building's patterns and enhance the spatial consistency of time interpolation. Through multi-level feature abstraction and latent variable fusion, multi-scale spatial dependency modeling from micro to macro levels can be achieved, improving the rationality of interpolation.
[0064] This invention establishes spatiotemporal dependency by using multi-scale causal convolution in the time dimension and dynamic graph convolution in the spatial dimension, and jointly establishing the spatiotemporal dependency between the two. Specifically, by using a hybrid dilation rate to model features at different temporal granularities, it can avoid the scale limitations of a single convolution kernel; by expanding the receptive field through dilated convolution, it can improve computational efficiency; by employing a causal filling mechanism, it can perform real-time prediction and is applicable to non-steady-state changes in the built environment; and by generating a dynamic adjacency matrix, it breaks through the fixed topological limitations of static adjacency matrices.
[0065] By constructing a composite loss function, the stability and generalization ability of the model are improved. In the composite loss function, multi-task collaborative optimization is carried out, and different loss terms can complement each other to avoid model bias caused by a single objective. Regularization is introduced to prevent model overfitting. The introduction of VAE reconstruction loss can ensure that the generated data conforms to the laws of physics. The introduction of latent variable analysis supports decision source attribution.
[0066] In summary, the method of this invention can improve the accuracy and real-time performance of predictions in complex scenarios, providing an effective solution for energy efficiency management in smart cities. Attached Figure Description
[0067] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0068] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation
[0069] To clearly illustrate the technical features of this solution, the invention will be described in detail below through specific embodiments and in conjunction with the accompanying drawings. The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure of the invention, the components and arrangements of specific examples are described below.
[0070] Example 1
[0071] like Figure 1 As shown, a method for training a building energy consumption prediction model includes the following steps:
[0072] S1. Obtain building structural parameters through BIM building information model, and collect dynamic data of temperature, humidity and pedestrian density by deploying IoT sensors. Integrate the acquired data to form a building energy consumption database, and then have experts in the field manually annotate the acquired data to classify the acquired data into building energy consumption levels.
[0073] S2. Align the collected data in time and space, interpolate the collected data to fill in the missing data areas, and perform noise reduction and normalization operations to finally obtain the preprocessed spatiotemporal correlation matrix.
[0074] S3. Train the preset building energy consumption prediction model, construct a building energy consumption prediction model based on spatiotemporal graph convolutional network, input the spatiotemporal correlation matrix into the building energy consumption prediction model for training, repeat the training process iteratively until the preset stopping iteration condition is met, and obtain the trained model.
[0075] S4. Input the newly collected data into the trained model to obtain the classification results of building energy consumption.
[0076] S1 is specifically as follows: Building energy efficiency levels are classified into Level 1, Level 2, Level 3, Level 4, and Level 5.
[0077] Level 1 energy efficiency is the expected target value for building energy consumption indicators;
[0078] Level 2 energy efficiency represents the upper limit of permissible building energy consumption indicators;
[0079] Level 3 energy efficiency is defined as exceeding the energy consumption constraint value but not exceeding 1.5 times the energy consumption constraint value;
[0080] Level 4 energy efficiency is defined as exceeding the energy consumption constraint value by 1.5 times but not exceeding 1.8 times the energy consumption constraint value.
[0081] Level 5 energy efficiency is 1.8 times higher than the energy consumption constraint value.
[0082] S2 is as follows: A grid space is constructed based on the building structure parameters of the building information model. The building structure parameters are static parameters, and the constructed grid space is a static space.
[0083] Data from IoT sensors is projected into a static grid space to form a dynamic grid space. Data missing in the grid space is interpolated, including temporal interpolation and spatial interpolation. The interpolated data is then subjected to noise reduction and normalization operations to obtain a spatiotemporal correlation matrix that includes building structural parameters and data collected by IoT sensors.
[0084] The time interpolation operation is as follows:
[0085] The data from the IoT sensor is converted into periodic parameters using a Fast Fourier Transform (FFT). Then, Fourier-enhanced dynamic time interpolation is performed on the periodic parameters of the IoT sensor data. By capturing periodic factors and non-stationary external variables, the data from the IoT sensor is interpolated. The calculation formula is as follows:
[0086] ,
[0087] in, express Interpolation at time, Indicates the total number of cycles. Indicates the first One cycle, Indicates the first The frequency of each cycle, Indicates the first Phase of each cycle, express The strength, Indicates the first Interpolation at time, express The weight, express Momentary noise, express The weight, Represents external variables. Indicates the weight of external variables;
[0088] Simultaneously, a spatiotemporal joint latent variable interpolation method is used to calculate... The conditional probability distribution of the interpolation at each time step is used to generate spatiotemporal joint latent variables by encoding the spatial topology and temporal context through a VAE, and the hidden state of the interpolation at the previous time step is calculated through a graph neural network.
[0089] ,
[0090] ,
[0091] ,
[0092] in, express Timing interpolation The conditional probability distribution, express Spatiotemporal joint latent variables at time, express The mean at time, express Variance at time, express The hidden state at all times The weights representing the hidden states, The weights of the spatiotemporal joint latent variables are represented. This represents a multilayer perceptron.
[0093] The spatial interpolation operation is as follows:
[0094] Graph neural network-enhanced interpolation is applied to the building structural parameters of the Building Information Model (BIM). A grid space is constructed based on these BIM parameters, and data from IoT sensors is mapped to this grid space. The center point of each grid cell is designated as a node. If two grid cells are physically connected, an edge is established. The graph neural network aggregates the neighbor information of each node to obtain its hidden state. The graph neural network has L layers, and the grid space contains N nodes. The formula for calculating the hidden state of each node in each layer of the graph neural network is as follows:
[0095] ,
[0096] in, This represents a non-linear activation function operation. The graph neural network represents the first... Layer weights, This indicates a splicing and merging operation. The graph neural network represents the first... The first in the layer The hidden state of each node, The graph neural network represents the first... The first in the layer The hidden state of each node, Represents a node The set of neighboring nodes, express The nodes in Represents a node and nodes Relationship, The graph neural network represents the first... The first in the layer The hidden state of each node;
[0097] Then, iterating layer by layer, the hidden state of each node in the Lth layer of the graph neural network is obtained. Then, based on the hidden state of the node, interpolation is predicted, and the calculation formula is as follows:
[0098] ,
[0099] in, Indicates the first Interpolation at each node Indicates the first Spatiotemporal joint latent variables at each node express The weight, The weight represents the hidden state.
[0100] The specific steps for generating the spatiotemporal correlation matrix are as follows:
[0101] The data, after interpolation in both time and space dimensions, undergoes denoising and normalization. The processed data is then aligned, and the data from the IoT sensors is sorted by time series and represented as follows: , Time series data sets The length of the time series is represented; the processed building structure parameters are based on a set of nodes formed by network spatial nodes. Then, the time and space data are time-sliced and aligned to generate a spatiotemporal correlation matrix. Represented as:
[0102] ,
[0103] in, express elements, express Time of the first The spatiotemporal values at each node.
[0104] The specific steps for training a building energy consumption prediction model are as follows:
[0105] A building energy consumption prediction model based on a spatiotemporal graph convolutional network is constructed. The model includes an input layer, a hidden layer, and an output layer. The spatiotemporal correlation matrix is input into the building energy consumption prediction model, and after passing through the input layer, it is input into the hidden layer. The hidden layer includes time and spatial dimensions. For time dimension data, causal convolution with different dilation rates is used to capture multi-granular temporal features. For spatial dimension data, the adjacency matrix is generated by the node features to obtain the output of time and spatial dimensions. Then, the output of time and spatial dimensions is fused and input into the output layer. The Softmax classifier outputs the probability distribution of five levels of energy consumption. The classification result with the highest probability is the classification result of building energy consumption.
[0106] Then, a composite loss function is constructed, and the model parameters are adjusted based on the loss function;
[0107] The training process of the building energy consumption prediction model is iterated until the loss function value meets the preset stopping condition, at which point the training ends and the trained building energy consumption prediction model is obtained.
[0108] The specific operations in the hidden layer are as follows:
[0109] (1) In terms of time dimension, from the spatiotemporal correlation matrix Extracting temporal features , , Indicates the first Temporal feature sequence of each node, Set dilation rates for different period sizes. , These correspond to 1-hour, 3-hour, and 6-hour periods, respectively. The time dimension features extracted from each layer of the multi-scale causal dilated convolutional computation model are calculated, and then layer-by-layer computation is performed based on the time dimension features output from each layer. The layer outputs the time feature matrix at each node. The calculation formula is as follows:
[0110] ,
[0111] in, In the model, the first The time dimension features of the layer output, Presentation layer normalization operation, Indicates the first The layer period is Branch weights, Indicates the first The layer period is The convolution kernel weights, Indicates the number of layers in the model;
[0112] (2) In the spatial dimension, according to the spatiotemporal correlation matrix The nodes in the model constitute a spatial feature matrix, and the first node in the model is the first node in the spatial feature matrix. The spatial feature matrix of the layer is represented as , , The feature dimension is represented by a dynamic adjacency matrix generated by querying trainable parameters and key trainable parameters. The calculation formula is as follows:
[0113] ,
[0114] Then, based on the obtained dynamic adjacency matrix, the spatial feature matrix of the next layer is predicted. until the first [number] in the model is obtained. The spatial feature matrix of the layer output This is the output of the spatial dimension. The formula for calculating the next layer of spatial feature matrix is as follows:
[0115] ,
[0116] in, This represents a non-linear activation function operation. The values can be trained into a matrix.
[0117] The calculation process of the composite loss function is as follows:
[0118] The composite loss function consists of cross-entropy loss, regularization loss, and VAE reconstruction loss;
[0119] (1) Calculate the cross-entropy loss by using the predicted probability of building energy consumption level and the manually labeled building energy consumption level classification;
[0120] ,
[0121] in, Represents cross-entropy loss, This represents the total number of input data samples. Indicates the input number of the first... Each data sample is labeled with a building energy consumption level classification. Indicates the predicted input number. The energy efficiency level of each data sample is The probability, These correspond to Level 1, Level 2, Level 3, Level 4, and Level 5 energy efficiency, respectively.
[0122] (2) The formula for calculating regularization loss is as follows:
[0123] ,
[0124] in, Indicates the regularization loss. This represents the regularization strength coefficient used to control model complexity. This indicates the number of layers in the network of the model. This indicates that the model is in the time dimension. The trainable weight matrix of a layer network, This indicates that the model is in the spatial dimension of the first... The trainable weight matrix of a layer network, Denotes the Frobenius norm of a matrix. Represents the L2 norm;
[0125] (3) The formula for calculating the VAE reconstruction loss is as follows:
[0126] ,
[0127] in, The reconstruction loss function is represented by VAE, which stands for Variational Autoencoder. This represents the spatiotemporal joint latent variables given the time-dimensional data collected by IoT sensors. The posterior distribution of the variable. Describe the posterior distribution Expectations express divergence parameter, express Divergence weighting coefficient Representing spatiotemporal joint latent variables The prior distribution, Indicates the reconstruction loss parameter. This represents the spatiotemporal joint latent variables given the time-dimensional data collected by IoT sensors. The true posterior distribution;
[0128] (4) The formula for calculating the composite loss function is as follows:
[0129] ,
[0130] in, Represents the composite loss function. express The weighting coefficients, express The weighting coefficients, express The weighting coefficients.
[0131] Example 2
[0132] An electronic device includes a processor and a memory, the processor being configured to run a program stored in the memory, wherein the program, when running, executes a method for training a building energy consumption prediction model.
[0133] Example 3
[0134] To illustrate the workflow of this invention, let's take an office building as an example (the building's maintenance, operation, and security management are all running normally). To predict the building's electricity consumption for one quarter, firstly, the BIM (Building Information Modeling) acquires the building's structural parameters, including the building's geometric parameters (length, width, height, geometric features, etc.), structural element parameters (size, location, and construction method of walls, columns, beams, floor slabs, etc.), spatial relationship parameters (layout, connection relationships, etc.), attribute information parameters (materials, building age, etc.), construction parameters (connection method, supporting structure, etc.), and performance parameters (light performance, thermal performance, etc.). Simultaneously, 200 IoT sensors deployed within the office building collect temperature, humidity, and pedestrian density data, with the sensors collecting data every 10 minutes.
[0135] The energy consumption level classification standard is set, with a target of 0.8. The maximum allowed value is 1.0. ;
[0136] Then, a grid space is constructed based on the building structure parameters of the building information model. The data collected by the IoT sensors is then projected into the spatial grid. The system then uses the method in this invention to interpolate the missing data areas. After the interpolation is completed, the overall data is denoised and normalized to achieve the alignment of temporal and spatial data. Each aligned grid contains building structure parameters and temperature, humidity and pedestrian density data at different times (both collected and interpolated data).
[0137] Next, data containing both spatial and temporal dimensions are input into the constructed building energy consumption prediction model for training. The training is conducted in daily iterations. During the next training cycle, the model parameters are adjusted based on the actual energy consumption and prediction results of the previous cycle. After the adjustment is completed, the model is trained based on the data within that cycle. The above training process is iterated in each cycle until a preset quarter is reached, thus completing the training of the model. As the number of training iterations increases, the accuracy of the model increases accordingly.
[0138] Example 4
[0139] To demonstrate the beneficial effects of this invention, the method of this invention was experimentally compared with existing methods based on the data collected in this invention. Existing methods include ARIMA+MLP (ARIMA is a statistical model for time series analysis and prediction, and MLP is a multiple linear regression algorithm), RF+XGBoost (RF is a pseudo-random forest method, and XGBoost is an optimization algorithm based on gradient boosting decision trees), and LSTM+CNN (LSTM is a long short-term memory network, and CNN is a convolutional neural network). The evaluation metrics are accuracy, recall, and F1 score. As shown in Table 1, the method of this invention outperforms the four existing building energy consumption prediction models, demonstrating that the prediction accuracy of the method of this invention is higher. The method of this invention has improved performance compared to existing methods.
[0140] Table 1 Performance comparison between the method of the present invention and existing methods
[0141]
[0142] Although the specific embodiments of the invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the invention. Based on the technical solutions of the invention, various modifications or variations that can be made by those skilled in the art without creative effort are still within the scope of protection of the invention.
Claims
1. A method for training a building energy consumption prediction model, characterized in that, Includes the following steps: S1. Obtain building structural parameters through BIM building information model, and collect dynamic data of temperature, humidity and pedestrian density by deploying IoT sensors. Integrate the acquired data to form a building energy consumption database, and then have experts in the field manually annotate the acquired data to classify the acquired data into building energy consumption levels. S2. Align the collected data in time and space, interpolate the collected data to fill in the missing data areas, and perform noise reduction and normalization operations to finally obtain the preprocessed spatiotemporal correlation matrix. S3. Train the preset building energy consumption prediction model, construct a building energy consumption prediction model based on spatiotemporal graph convolutional network, input the spatiotemporal correlation matrix into the building energy consumption prediction model for training, repeat the training process iteratively until the preset stopping iteration condition is met, and obtain the trained model. The specific steps for training a building energy consumption prediction model are as follows: A building energy consumption prediction model based on a spatiotemporal graph convolutional network is constructed. The model includes an input layer, a hidden layer, and an output layer. The spatiotemporal correlation matrix is input into the building energy consumption prediction model, and after passing through the input layer, it is input into the hidden layer. The hidden layer includes time and spatial dimensions. For time dimension data, causal convolution with different dilation rates is used to capture multi-granular temporal features. For spatial dimension data, the adjacency matrix is generated by the node features to obtain the output of time and spatial dimensions. Then, the output of time and spatial dimensions is fused and input into the output layer. The Softmax classifier outputs the probability distribution of five levels of energy consumption. The classification result with the highest probability is the classification result of building energy consumption. Then, a composite loss function is constructed, and the model parameters are adjusted based on the loss function; The training process of the building energy consumption prediction model is iterated until the composite loss function value meets the preset stopping iteration condition, at which point the training ends and the trained building energy consumption prediction model is obtained. The specific operations in the hidden layer are as follows: (1) In terms of time dimension, from the spatiotemporal correlation matrix Extracting temporal features , , Indicates the first Temporal feature sequence of each node, Set dilation rates for different period sizes. , These correspond to 1-hour, 3-hour, and 6-hour periods, respectively. The time dimension features extracted from each layer of the multi-scale causal dilated convolutional computation model are calculated, and then layer-by-layer computation is performed based on the time dimension features output from each layer. The layer outputs the time feature matrix at each node. The calculation formula is as follows: , in, In the model, the first The time dimension features of the layer output, Presentation layer normalization operation, Indicates the first The layer period is Branch weights, Indicates the first The layer period is The convolution kernel weights, Indicates the number of layers in the model; (2) In the spatial dimension, according to the spatiotemporal correlation matrix The nodes in the model constitute a spatial feature matrix, and the first node in the model is the first node in the spatial feature matrix. The spatial feature matrix of the layer is represented as , , The feature dimension is represented by a dynamic adjacency matrix generated by querying trainable parameters and key trainable parameters. The calculation formula is as follows: , Then, based on the obtained dynamic adjacency matrix, the spatial feature matrix of the next layer is predicted. until the first [number] in the model is obtained. The spatial feature matrix of the layer output This is the output of the spatial dimension. The formula for calculating the next layer of spatial feature matrix is as follows: , in, This represents a non-linear activation function operation. The values can be trained into a matrix; S4. Input the newly collected data into the trained model to obtain the classification results of building energy consumption.
2. The method for training a building energy consumption prediction model according to claim 1, characterized in that, S1 is as follows: Building energy efficiency ratings are classified into Level 1, Level 2, Level 3, Level 4, and Level 5.
3. The method for training a building energy consumption prediction model according to claim 2, characterized in that, S2 is as follows: A grid space is constructed based on the building structure parameters of the building information model. The building structure parameters are static parameters, and the constructed grid space is a static space. Data from IoT sensors is projected onto a static grid space to form a dynamic grid space. Data missing in the grid space is interpolated, including temporal interpolation and spatial interpolation. The interpolated data is then subjected to noise reduction and normalization operations to finally obtain a spatiotemporal correlation matrix containing building structural parameters and data collected by IoT sensors.
4. The method for training a building energy consumption prediction model according to claim 3, characterized in that, The time interpolation operation is as follows: The data from the IoT sensor is converted into periodic parameters using a Fast Fourier Transform (FFT). Then, Fourier-enhanced dynamic time interpolation is performed on the periodic parameters of the IoT sensor data. By capturing periodic factors and non-stationary external variables, the data from the IoT sensor is interpolated. The calculation formula is as follows: , in, express Interpolation at time, Indicates the total number of cycles. Indicates the first One cycle, Indicates the first The frequency of each cycle, Indicates the first Phase of each cycle, express The strength, Indicates the first Interpolation at time, express The weight, express Momentary noise, express The weight, Represents external variables. Indicates the weight of external variables; Simultaneously, a spatiotemporal joint latent variable interpolation method is used to calculate... The conditional probability distribution of the interpolation at each time step is used to generate spatiotemporal joint latent variables by encoding the spatial topology and temporal context through a VAE, and the hidden state of the interpolation at the previous time step is calculated through a graph neural network. , , , in, express Timing interpolation The conditional probability distribution, express Spatiotemporal joint latent variables at time, express The mean at time, express Variance at time, express The hidden state at all times The weights representing the hidden states, The weights of the spatiotemporal joint latent variables are represented. This represents a multilayer perceptron.
5. The method for training a building energy consumption prediction model according to claim 4, characterized in that, space The interpolation operation is as follows: Graph neural network-enhanced interpolation is applied to the building structural parameters of the Building Information Model (BIM). A grid space is constructed based on these BIM parameters, and data from IoT sensors is mapped to this grid space. The center point of each grid cell is designated as a node. If two grid cells are physically connected, an edge is established. The graph neural network aggregates the neighbor information of each node to obtain its hidden state. The graph neural network has L layers, and the grid space contains N nodes. The formula for calculating the hidden state of each node in each layer of the graph neural network is as follows: , in, This represents a non-linear activation function operation. The graph neural network represents the first... Layer weights This indicates a splicing and merging operation. The graph neural network represents the first... The first in the layer The hidden state of each node, The graph neural network represents the first... The first in the layer The hidden state of each node, Represents a node The set of neighboring nodes, express The nodes in Represents a node and nodes Relationship, The graph neural network represents the first... The first in the layer The hidden state of each node; Then, iterating layer by layer, the hidden state of each node in the Lth layer of the graph neural network is obtained. Then, based on the hidden state of the node, interpolation is predicted, and the calculation formula is as follows: , in, Indicates the first Interpolation at each node Indicates the first Spatiotemporal joint latent variables at each node express The weight, The weight represents the hidden state.
6. The method for training a building energy consumption prediction model according to claim 5, characterized in that, The specific steps for generating the spatiotemporal correlation matrix are as follows: The data, after interpolation in both time and space dimensions, undergoes denoising and normalization. The processed data is then aligned, and the data from the IoT sensors is sorted by time series and represented as follows: , Time series data sets The length of the time series is represented; the processed building structure parameters are based on a set of nodes formed by network spatial nodes. Then, the time and space data are time-sliced and aligned to generate a spatiotemporal correlation matrix. Represented as: , in, express elements, express Time of the first The spatiotemporal values at each node.
7. The method for training a building energy consumption prediction model according to claim 6, characterized in that, The calculation process of the composite loss function is as follows: The composite loss function consists of cross-entropy loss, regularization loss, and VAE reconstruction loss; (1) Calculate the cross-entropy loss by using the predicted probability of building energy consumption level and the manually labeled building energy consumption level classification; , in, Represents cross-entropy loss, This represents the total number of input data samples. Indicates the input number of the first... Each data sample is labeled with a building energy consumption level classification. Indicates the predicted input number. The energy efficiency level of each data sample is The probability, These correspond to Level 1, Level 2, Level 3, Level 4, and Level 5 energy efficiency, respectively. (2) The formula for calculating regularization loss is as follows: , in, Indicates the regularization loss. This represents the regularization strength coefficient used to control model complexity. This indicates the number of layers in the network of the model. This indicates that the model is in the time dimension. The trainable weight matrix of a layer network, This indicates that the model is in the spatial dimension of the first... The trainable weight matrix of a layer network, Denotes the Frobenius norm of a matrix. Represents the L2 norm; (3) The formula for calculating the VAE reconstruction loss is as follows: , in, The reconstruction loss function is represented by VAE, which stands for Variational Autoencoder. This represents the spatiotemporal joint latent variables given the time-dimensional data collected by IoT sensors. The posterior distribution of the variable. Describe the posterior distribution Expectations express divergence parameter, express Divergence weighting coefficient Representing spatiotemporal joint latent variables The prior distribution, Indicates the reconstruction loss parameter. This represents the spatiotemporal joint latent variables given the time-dimensional data collected by IoT sensors. The true posterior distribution; (4) The formula for calculating the composite loss function is as follows: , in, Represents the composite loss function. express The weighting coefficients, express The weighting coefficients, express The weighting coefficients.
8. An electronic device, characterized in that, include: A processor and a memory, the processor being configured to run a program stored in the memory, wherein the program, when running, executes a building energy consumption prediction model training method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Building energy consumption optimization method based on artificial intelligence
CN120065746A
Building energy consumption analysis method and system based on artificial intelligence
CN120373655A