Artificial intelligence-based dynamic assessment method and system for building carbon emissions
By combining deep Bayesian neural networks and variational autoencoders with building information models, dynamic and accurate assessment of building carbon emissions is achieved, solving the problem of inaccurate assessment results in existing technologies and improving the interpretability and management efficiency of the assessment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FUJIAN POLYTECHNIC OF INFORMATION TECH
- Filing Date
- 2026-06-23
- Publication Date
- 2026-07-21
AI Technical Summary
Existing building carbon emission assessment methods fail to reflect real-time dynamic characteristics, ignore sensor noise and environmental fluctuations, resulting in inaccurate assessment results. Furthermore, they lack correlation analysis between abnormal carbon emissions and building attributes, making effective management difficult.
A deep Bayesian neural network is used to generate a carbon emission probability distribution. A dynamic threshold comparator and a variational autoencoder are combined to reconstruct latent features. Attention fusion is performed using a building information model to achieve dynamic and accurate carbon emission assessment.
It improves the dynamism and accuracy of carbon emission assessments, reduces the probability of false alarms and missed alarms, provides interpretable assessment indicators, and supports refined management and anomaly diagnosis.
Smart Images

Figure CN122434559A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of building carbon emission assessment and artificial intelligence technology, specifically to a method and system for dynamic assessment of building carbon emissions based on artificial intelligence. Background Technology
[0002] Carbon emission assessment during building operation is crucial for achieving energy conservation and emission reduction goals. Current technologies for building carbon emission accounting often employ methods based on multiplying annual total energy consumption by a fixed carbon emission factor, failing to reflect the real-time dynamic characteristics of building operation. With the development of building automation systems and IoT technologies, some methods have begun to utilize real-time energy consumption data for hourly carbon emission calculations and use empirically set fixed thresholds for anomaly detection. However, these methods treat the conversion from energy consumption to carbon emissions as a deterministic process, ignoring sensor noise, environmental fluctuations, and the inherent uncertainties of the model itself, resulting in assessment results that fail to accurately reflect the reliability of instantaneous carbon emissions. Regarding abnormal carbon emission detection, fixed threshold methods struggle to adapt to changes in load characteristics across different seasons and functional areas, frequently leading to false alarms or missed alarms. When an abnormal period is identified, existing solutions typically only output alarms, lacking automatic extraction of deep features from abnormal energy consumption segments and failing to effectively integrate these features with the static attributes of the building itself. This results in assessment indicators reflecting carbon emission values in isolation, failing to reveal the intrinsic relationship between abnormal carbon emissions and their causes, thus hindering maintenance personnel from efficiently tracing and diagnosing the root causes of anomalies.
[0003] To address the aforementioned issues, a method is needed that can dynamically and uncertainly model real-time building operation data and adaptively identify periods of abnormal carbon emissions. Simultaneously, after identifying anomalies, it is necessary to automatically extract potential features from historical energy consumption segments and organically integrate these dynamic potential features with the inherent static parameters in the building information model (BIM) to obtain dynamic evaluation indicators that characterize the relationship between abnormal carbon emissions and building attributes, providing a basis for the dynamic and refined management of building carbon emissions. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for dynamic assessment of building carbon emissions based on artificial intelligence. It generates carbon emission probability distribution in real time through a deep Bayesian neural network and combines it with a dynamic threshold comparator to achieve adaptive identification of abnormal carbon emission periods with uncertainty perception. At the same time, it uses a variational autoencoder to reconstruct the potential features of abnormal energy consumption segments and performs attention fusion with static parameters of the building information model to obtain a dynamic assessment index that can reflect the correlation between abnormal patterns and building attributes, thereby improving the dynamism, accuracy and interpretability of carbon emission assessment during the building operation phase.
[0005] The objective of this invention can be achieved through the following technical solutions:
[0006] This invention provides an artificial intelligence-based method for dynamic assessment of building carbon emissions, comprising: acquiring real-time energy consumption data sequences and real-time environmental perception data sequences during building operation; synchronously inputting the real-time energy consumption data sequences and the real-time environmental perception data sequences into a pre-trained deep Bayesian neural network to generate instantaneous carbon emission probability distributions for each functional area of the building; triggering a dynamic threshold comparator based on the instantaneous carbon emission probability distributions, the dynamic threshold comparator outputting an abnormal carbon emission period identifier exceeding a threshold; using the abnormal carbon emission period identifier to index the corresponding historical energy consumption segments, and reconstructing the latent feature space of the historical energy consumption segments through a variational autoencoder; and performing attention-weighted fusion of the latent feature space with the static parameters of a building information model to obtain a dynamic assessment index for building carbon emissions. This method captures the complex nonlinear relationship between energy consumption and environmental conditions through a deep Bayesian network, outputting a probability distribution rather than a single estimate, thereby quantifying the uncertainty of the assessment itself. Furthermore, by automatically identifying abnormal carbon emission periods and reconstructing historical segments, it focuses on the key features that contribute most to abnormal carbon emissions, ultimately integrating inherent building attributes to achieve a dynamic and accurate comprehensive assessment of carbon emissions.
[0007] As a preferred technical solution of the present invention, the steps of obtaining the real-time energy consumption data sequence and the real-time environmental perception data sequence during the building operation phase are as follows: extracting the instantaneous values of sub-items of energy consumption for electricity, heating, cooling, and lighting from the building automation system according to a fixed sampling period to form the real-time energy consumption data sequence; simultaneously collecting instantaneous monitoring values of temperature, humidity, carbon dioxide concentration, and personnel flow rate from the wireless sensor network deployed on each floor of the building to form the real-time environmental perception data sequence; aligning the real-time energy consumption data sequence and the real-time environmental perception data sequence according to the same timestamp to form a pair of dual-sequence inputs. Preferably, when extracting instantaneous values of sub-item energy consumption from the building automation system, the system uses the open database connection interface of the building automation system to read the cumulative positive active energy value of the electricity meter, the flow rate and supply / return water temperature difference of the heat meter, the flow rate and supply / return water temperature difference of the cold meter, and the instantaneous power value of the lighting circuit every minute. The cumulative value of the electricity meter is differentially calculated to obtain the power consumption increment. The product of the flow rate of the heat meter or cold meter and the supply / return water temperature difference is divided by the time interval to obtain the instantaneous value of heating or cooling power. This instantaneous value is then assembled with the instantaneous value of lighting power according to the timestamp to form a vector of instantaneous values of sub-item energy consumption. This ensures the accurate alignment and unified expression of multi-source heterogeneous energy consumption data in the time dimension.
[0008] As a preferred embodiment of the present invention, the step of synchronously inputting the real-time energy consumption data sequence and the real-time environmental perception data sequence into a pre-trained deep Bayesian neural network to generate the instantaneous carbon emission probability distribution of each functional area of the building specifically comprises: multiplying each energy consumption value in the real-time energy consumption data sequence by the corresponding power grid carbon emission factor of the functional area to obtain a preliminary carbon emission estimate; using the real-time environmental perception data sequence as a conditional feature and inputting it into the hidden layer of the deep Bayesian neural network, wherein the hidden layer outputs the mean parameter and variance parameter of a Gaussian distribution; performing a residual connection between the preliminary carbon emission estimate and the mean parameter, and then performing random sampling through the variance parameter to generate the instantaneous carbon emission probability distribution of each functional area. Preferably, the temperature, humidity, carbon dioxide concentration, and personnel flow rate in the real-time environmental perception data sequence are normalized to obtain a normalized conditional vector. This normalized conditional vector is then concatenated with the hidden layer output state from the previous time step and sequentially passed through a first fully connected layer, a batch normalization layer, a dropout layer, and a second fully connected layer. The second fully connected layer outputs two branches: the first branch outputs the mean parameter, and the second branch outputs the logarithm of the variance parameter. This enhances the network's robustness to input noise while capturing temporal dependencies. More preferably, variational inference is used to optimize the lower bound of evidence during the training process of the deep Bayesian neural network, and the prediction uncertainty is estimated using the Monte Carlo dropout method after each training cycle. This ensures that the model provides a reliable uncertainty measurement capability while providing a carbon emission distribution.
[0009] As a preferred embodiment of the present invention, the step of triggering a dynamic threshold comparator based on the instantaneous carbon emission probability distribution specifically includes: extracting the expected carbon emission value and the upper bound of the confidence interval for each time point from the instantaneous carbon emission probability distribution; comparing the expected carbon emission value with a pre-set baseline carbon emission threshold, and simultaneously comparing the upper bound of the confidence interval with the baseline carbon emission threshold; when the expected carbon emission value or the upper bound of the confidence interval is greater than the baseline carbon emission threshold, the dynamic threshold comparator outputs an abnormal carbon emission period identifier corresponding to the current time point; storing the abnormal carbon emission period identifier as a binary vector in chronological order, where the value of each binary bit represents whether the corresponding sampling period is an abnormal period. Preferably, before the comparison, the hourly carbon emission values of all non-holiday periods in the past thirty days are extracted from the building's historical operating data, and their average value and standard deviation are calculated. The average value plus twice the standard deviation is used as the baseline carbon emission threshold, and the threshold is recalculated according to the seasonal cycle and stored in the threshold buffer, thereby realizing the automatic adaptation of the threshold to the building's own operating rules and seasonal changes, and reducing the false alarm rate.
[0010] As a preferred technical solution of the present invention, the step of reconstructing the latent feature space by using the historical energy consumption segment corresponding to the abnormal carbon emission period identifier index and a variational autoencoder specifically includes: extracting the corresponding energy consumption subsequence from the real-time energy consumption data sequence based on the binary bits with a value of one in the binary vector to form the historical energy consumption segment; inputting the historical energy consumption segment into the encoder network of the variational autoencoder, the encoder network outputting the mean vector and log-variance vector of the latent variables; sampling from the normal distribution defined by the mean vector and log-variance vector of the latent variables to obtain a low-dimensional embedding vector as the latent feature space. Preferably, the encoder network of the variational autoencoder consists of a three-layer convolutional neural network and a two-layer fully connected network. The convolutional neural network is used to extract the temporal local features of the historical energy consumption segment, and the fully connected network is used to map the convolutional features to the latent variable distribution parameters, thereby preserving the core pattern information of energy consumption during abnormal periods in a compact latent space.
[0011] As a preferred technical solution of the present invention, the step of performing attention-weighted fusion of the latent feature space and the static parameters of the building information model specifically includes: extracting static parameters such as building area, heat transfer coefficient of the building envelope, window-to-wall ratio, and rated power of the air conditioning system for each functional area from the building information model, and concatenating them into a static feature vector; mapping the low-dimensional embedding vector and the static feature vector to the same dimensional space through linear transformation to obtain a query matrix, a key-value matrix, and a numerical matrix; calculating the dot product similarity between the query matrix and the key-value matrix, dividing it by the square root of the dimension of the dimensional space, and then processing it through a normalized exponential function to obtain the attention weight; weighting and summing the attention weight and the numerical matrix to obtain the intermediate result of attention-weighted fusion, and then mapping the intermediate result to a scalar through a fully connected layer as a dynamic assessment index for building carbon emissions. This fusion method enables static building attributes to dynamically select and enhance the latent features most explanatory to the current abnormal carbon emission patterns. The assessment index reflects both real-time operational anomalies and the characteristics of the building itself, significantly improving its comprehensiveness and sensitivity. Preferably, after the attention-weighted fusion, the weighted fusion vector on the time series is further smoothed by a gated loop unit, and then the smoothed vector is input into a fully connected layer to suppress the interference of instantaneous noise spikes on the evaluation index and output a stable and time-coherent dynamic evaluation result.
[0012] This invention also includes an AI-based dynamic assessment system for building carbon emissions. The system includes a memory, a processor, and a computer program stored in the memory and running on the processor. When executing the computer program, the processor implements the steps of the aforementioned AI-based dynamic assessment method for building carbon emissions. This system organically integrates deep Bayesian networks, variational autoencoders, and attention fusion mechanisms, enabling it to run in real-time on edge computing nodes or cloud servers. It automatically completes the entire process from multi-source data acquisition to dynamic assessment indicator output, providing quantitative decision support for refined management and anomaly diagnosis of building carbon emissions.
[0013] The beneficial effects of this invention are:
[0014] Real-time energy consumption data sequences and real-time environmental perception data sequences are synchronously input into a deep Bayesian neural network. The hidden layers output the mean and variance parameters of a Gaussian distribution, which are then combined with preliminary carbon emission estimates through residual connections and randomly sampled to generate an instantaneous carbon emission probability distribution for each functional area. This probability distribution not only provides the expected carbon emission value at the current moment but also provides an upper bound on the confidence interval, thereby quantifying the prediction uncertainty caused by sensor noise, environmental fluctuations, and insufficient model knowledge. Based on this, a dynamic threshold comparator simultaneously compares the expected carbon emission value with the baseline carbon emission threshold and the upper bound of the confidence interval with the baseline carbon emission threshold. When any one of these exceeds the baseline threshold, an abnormal carbon emission period identifier is output. The baseline threshold is adaptively updated seasonally based on the statistical distribution of hourly carbon emission values over the past thirty days (excluding holidays), allowing the anomaly criteria to dynamically adjust with changes in building operation modes and environmental conditions. This multi-condition threshold discrimination method based on probability distribution enables the system to remain stable within normal fluctuation ranges and respond promptly when truly abnormal high carbon emissions occur, reducing the probability of false alarms and false negatives caused by deterministic models and improving the robustness of abnormal carbon emission period identification.
[0015] For historical energy consumption segments marked as anomalous, a variational autoencoder is used for reconstruction. The encoder network consists of a three-layer convolutional neural network and a two-layer fully connected network. It extracts the mean vector and log-variance vector of latent variables from the segments and constructs a low-dimensional embedding vector in the latent feature space through reparameterization. This embedding vector compresses the temporal local features and higher-order statistical properties of the energy consumption waveform during anomalous periods, filtering out redundancy and noise in the original data. Subsequently, the low-dimensional embedding vector is mapped to query matrices, key matrices, and numerical matrices, respectively, using static feature vectors extracted from the Building Information Model (BIM) such as building area, building envelope heat transfer coefficient, window-to-wall ratio, and rated power of the air conditioning system. Attention weights are calculated using a scaled dot product attention mechanism, enabling the fusion process to automatically focus on the building attributes most relevant to the current anomalous pattern. The fused weighted vector contains the relationship between dynamic anomalous latent factors and building static features, and is then nonlinearly mapped to generate a scalar-form dynamic assessment index for building carbon emissions. This indicator differs from the simple numerical value of carbon emissions. It can reflect the comprehensive severity of the current abnormal carbon emission pattern under specific building physical characteristics, making the assessment results more interpretable and directly applicable to horizontal comparisons between different functional areas and tracing the causes of anomalies. Attached Figure Description
[0016] The invention will now be further described with reference to the accompanying drawings.
[0017] Figure 1 This is a flowchart of an AI-based dynamic assessment method for building carbon emissions.
[0018] Figure 2 This is a flowchart of aligning real-time energy consumption data sequences with real-time environmental perception data sequences to generate dual-sequence inputs;
[0019] Figure 3 This is a schematic diagram of the variational autoencoder network structure;
[0020] Figure 4 This is a flowchart of a dynamic assessment method for building carbon emissions based on attention fusion and gating loop units. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] See Figure 1This invention provides an artificial intelligence-based method for dynamic assessment of building carbon emissions, comprising: acquiring real-time energy consumption data sequences and real-time environmental perception data sequences during building operation; synchronously inputting the real-time energy consumption data sequences and the real-time environmental perception data sequences into a pre-trained deep Bayesian neural network to generate instantaneous carbon emission probability distributions for each functional area of the building; triggering a dynamic threshold comparator based on the instantaneous carbon emission probability distributions, wherein the dynamic threshold comparator outputs an abnormal carbon emission period identifier exceeding a threshold; using the abnormal carbon emission period identifier to index the corresponding historical energy consumption segment, and reconstructing the latent feature space of the historical energy consumption segment through a variational autoencoder; and performing attention-weighted fusion of the latent feature space with the static parameters of a building information model to obtain a dynamic assessment index for building carbon emissions.
[0023] In specific implementation, please refer to Figure 2 The building automation system provides data access services through an open database connection interface, with a sampling period set to one minute. Every minute, the building automation system reads the cumulative positive active energy value of the electricity meters, the flow rate and supply / return water temperature difference of the heat meters, the flow rate and supply / return water temperature difference of the cold meters, and the instantaneous power value of the lighting circuits. The cumulative positive active energy value of the electricity meters is differentially calculated to obtain the power consumption increment within one minute. The differential calculation method is as follows: subtract the cumulative positive active energy value read in the previous minute from the current cumulative positive active energy value of the electricity meters; the difference is the power consumption increment within that minute. The product of the flow rate and supply / return water temperature difference of the heat meters is divided by the time interval to obtain the instantaneous heating power value. The instantaneous heating power value is calculated based on the following formula:
[0024]
[0025] in, This represents the instantaneous value of heating power, in kilowatts. This indicates the instantaneous flow rate of the heat meter, expressed in cubic meters per hour. This indicates the instantaneous temperature difference between the supply and return water of the heat meter, expressed in degrees Celsius. The time interval is one minute. The instantaneous cooling power is obtained by dividing the product of the cooling meter's flow rate and the supply / return water temperature difference by the time interval. The calculation of the instantaneous cooling power is similar to that of the heating power: multiply the cooling meter's flow rate by the supply / return water temperature difference and then divide by the time interval, which is also one minute. The instantaneous power value of the lighting circuit is directly read from the lighting circuit power meter without conversion. The power consumption increment, instantaneous heating power value, instantaneous cooling power value, and instantaneous lighting circuit power value are assembled into a vector of instantaneous energy consumption values by timestamp, with each vector corresponding to a sampling time. All the instantaneous energy consumption value vectors from the sampling times are arranged in chronological order to form a real-time energy consumption data sequence. Simultaneously, instantaneous monitoring values of temperature, humidity, carbon dioxide concentration, and personnel flow rate are collected from a wireless sensor network deployed on each floor of the building, forming a real-time environmental sensing data sequence. The wireless sensor network comprises temperature sensors, humidity sensors, carbon dioxide concentration sensors, and infrared counters for personnel flow distributed across each floor. All these sensors transmit their measurements to an edge gateway via a wireless communication protocol. The edge gateway reports the instantaneous sensor values for that minute every minute, serving as instantaneous monitoring values for temperature, humidity, carbon dioxide concentration, and personnel flow. All environmental monitoring values are arranged chronologically to form a real-time environmental sensing data sequence.
[0026] Real-time energy consumption data sequences and real-time environmental sensing data sequences are aligned with the same timestamp to form paired dual-sequence inputs. Based on minutes, the vector of instantaneous energy consumption values with the same timestamp is concatenated with instantaneous temperature monitoring values, instantaneous humidity monitoring values, instantaneous carbon dioxide concentration monitoring values, and instantaneous personnel flow rate monitoring values to form an input sample, and then arranged in chronological order to form dual-sequence inputs.
[0027] In practical implementation, the deep Bayesian neural network is constructed using a recurrent structure. At each time step, this recurrent structure receives an energy consumption value from the real-time energy consumption data sequence and an environmental vector from the real-time environmental perception data sequence corresponding to that time step, outputting the instantaneous carbon emission probability distribution for the building's functional area at that time step. Before network processing, each energy consumption value in the real-time energy consumption data sequence is multiplied by the corresponding power grid carbon emission factor for that functional area to obtain a preliminary carbon emission estimate. The power grid carbon emission factor is determined based on the power grid carbon emission report for the building's location; this factor is a fixed value that distinguishes different power supply areas.
[0028] Temperature, humidity, carbon dioxide concentration, and personnel flow rate in the real-time environmental sensing data sequence are normalized to obtain a normalized condition vector. The normalization process uses min-max normalization, mapping the instantaneous values of each sensing data point to the [0,1] interval. The boundary values of the normalization parameters are determined by the maximum and minimum values of the corresponding sensing quantities in the building's historical operational data. The normalized instantaneous values of temperature, humidity, carbon dioxide concentration, and personnel flow rate are then concatenated sequentially to form the normalized condition vector.
[0029] At each time step, the normalized conditional vector is concatenated with the state vector output by the hidden layer from the previous time step to obtain the combined input. The state vector output by the hidden layer from the previous time step is a vector formed by concatenating the mean branch and variance branch of the output of the second fully connected layer from the previous time step. At the first time step, the state vector output by the hidden layer from the previous time step is initialized to a zero vector.
[0030] The combined input passes sequentially through a first fully connected layer, a batch normalization layer, a dropout layer, and a second fully connected layer. The first fully connected layer has 512 neurons and uses the ReLU activation function. The batch normalization layer performs batch normalization on the output of the first fully connected layer; the normalized statistics are estimated from mini-batch data during training and the global statistics of the training set are used during inference. The dropout layer randomly zeros the output elements of the first fully connected layer with a probability of 0.2 during training. During inference, the dropout layer has no effect, but all connection weights are scaled proportionally to the dropout probability. The second fully connected layer has 256 neurons and no activation function. The second fully connected layer outputs two branches: the first branch outputs the mean parameter, and the second branch outputs the logarithm of the variance parameter. The variance parameter is obtained by taking the exponent of the log-variance parameter and its value is always positive.
[0031] The mean parameter is residually concatenated with the preliminary carbon emission estimate at the current time step. This concatenation is achieved by element-wise summing of the mean parameter and the preliminary carbon emission estimate to obtain the corrected mean parameter. The corrected mean parameter and the variance parameter together define a Gaussian distribution. From this Gaussian distribution, the instantaneous carbon emission probability distribution for this time step is generated through random sampling. Random sampling employs a reparameterization technique; the sampled value is obtained by adding the standard deviation of the variance parameter to the corrected mean parameter and multiplying it by random noise drawn from the standard normal distribution.
[0032] The training process of a deep Bayesian neural network employs variational inference to optimize the lower bound of evidence. The expression for the lower bound of evidence is:
[0033]
[0034] in, Indicates the lower bound of evidence; This represents the total number of time steps in the input sequence; Indicates the first The actual carbon emission observation value at a time step is obtained by multiplying the energy consumption value at that time step in the real-time energy consumption data sequence by the power grid carbon emission factor of the corresponding functional area. Indicates the first The corrected mean parameter of the output of the time-step deep Bayesian neural network; Indicates the first The variance parameter of the output of the time-step deep Bayesian neural network; Indicated by For the mean, A Gaussian distribution with variance at point The probability density; Represents the approximate posterior distribution With parameter prior distribution Kullback-Leibler divergence between them; This represents the set of all learnable parameters in a deep Bayesian neural network. Prior distribution. Assuming a standard normal distribution, each parameter's prior independent distribution follows a Gaussian distribution with zero mean and one variance. Approximate posterior distribution. A Gaussian distribution is adopted for the factors. The approximate posterior mean of each parameter is obtained by point estimation, and the approximate posterior variance is controlled by a learnable parameter, initialized to 0.01. The Adam optimizer is used during training, with a learning rate of 0.001 and a batch size of 32. Training is iteratively performed until the lower bound of evidence converges. After each training epoch, the prediction uncertainty is estimated using the Monte Carlo dropout method. Specifically, for each sequence in the validation dataset, a dropout layer is enabled and forward propagation is repeated 50 times. The variance of the prediction mean is calculated as a measure of prediction uncertainty. Training stops when the prediction uncertainty no longer decreases significantly.
[0035] In practice, the input to the dynamic threshold comparator is the instantaneous carbon emission probability distribution of each functional region generated by the deep Bayesian neural network. The instantaneous carbon emission probability distribution is characterized by a Gaussian distribution at each time step, from which the expected carbon emission value and the upper bound of the confidence interval for that time point are extracted. The expected carbon emission value is taken as the mean parameter of the Gaussian distribution, i.e., the corrected mean parameter output by the deep Bayesian neural network. The upper bound of the confidence interval is set as the expected carbon emission value plus twice the standard deviation, where the standard deviation is obtained by taking the square root of the variance parameter output by the deep Bayesian neural network.
[0036] The baseline carbon emission threshold is generated before comparing the expected carbon emissions with the baseline carbon emission threshold. Hourly carbon emissions for all non-holiday periods within the past thirty days are extracted from the building's historical operational data. Non-holiday periods include Saturdays, Sundays, and statutory holidays, which are determined according to the national holiday schedule. Hourly carbon emissions are calculated on an hourly basis, with each hourly carbon emission value obtained by summing all minute-level preliminary carbon emission estimates within that hour. The preliminary carbon emission estimates are calculated by multiplying the instantaneous values of individual energy consumption by the corresponding functional area's grid carbon emission factor. A sample dataset is created from the extracted hourly carbon emissions for all non-holiday periods over the past thirty days, and the mean and standard deviation of the sample data are calculated. The formula for calculating the mean is the sum of all hourly carbon emissions in the sample divided by the sample size. The formula for calculating the standard deviation is the square root of the sum of the squares of the differences between each hourly carbon emission value and the mean, divided by the sample size minus one.
[0037] The baseline carbon emission threshold is calculated using the following formula:
[0038]
[0039] in, Indicates the baseline carbon emission threshold, in kilograms of carbon dioxide equivalent; This represents the average hourly carbon emissions over the past thirty days, excluding holidays, expressed in kilograms of carbon dioxide equivalent. This represents the standard deviation of hourly carbon emissions over the past thirty days (excluding holidays), expressed in kilograms of CO2 equivalent. The coefficient 2 is set to twice the standard deviation because, assuming hourly carbon emissions approximately follow a normal distribution, the probability of a value falling outside this range (plus or minus two standard deviations) is approximately 4.6%. Carbon emissions outside this range can be considered statistically abnormal fluctuations. Using this boundary as a baseline carbon emission threshold allows for the detection of genuine anomalies while maintaining a low false alarm rate.
[0040] The calculated baseline carbon emission thresholds are stored in a threshold cache. This cache is deployed in the memory of the building carbon emission assessment system, using a key-value pair storage structure. The key is the current season identifier, and the value is the corresponding baseline carbon emission threshold. The baseline carbon emission thresholds are recalculated according to the seasonal cycle, which is divided into spring, summer, autumn, and winter, with the dividing points being the spring equinox, summer solstice, autumn equinox, and winter solstice each year. At midnight on the first day of each new season, the system extracts the hourly carbon emission values from the building's historical operational data (excluding holidays) for the most recent 30 days, recalculates the average and standard deviation, and updates the baseline carbon emission thresholds and the corresponding seasonal key values in the threshold cache.
[0041] The dynamic threshold comparator receives the expected carbon emissions value and the upper bound of the confidence interval at each time step and reads the current baseline carbon emissions threshold from the threshold buffer. It compares the expected carbon emissions value with the baseline carbon emissions threshold, and simultaneously compares the upper bound of the confidence interval with the baseline carbon emissions threshold. When the expected carbon emissions value is greater than the baseline carbon emissions threshold, or the upper bound of the confidence interval is greater than the baseline carbon emissions threshold, the dynamic threshold comparator outputs an anomalous carbon emissions period identifier for the current time point. If the expected carbon emissions value is less than or equal to the baseline carbon emissions threshold and the upper bound of the confidence interval is less than or equal to the baseline carbon emissions threshold, the identifier for that time point is non-anomaly. The anomalous carbon emissions period identifiers are stored as a binary vector in chronological order. The length of the binary vector is equal to the total number of sampling periods within the evaluation period, with each binary bit corresponding to one sampling period. When the dynamic threshold comparator outputs an anomalous identifier for a certain sampling period, that bit in the binary vector is set to 1; when it outputs a non-anomaly identifier, that bit is set to 0. New bits are dynamically appended to the binary vector as the evaluation time increases.
[0042] In specific implementation, please refer to Figure 3 The variational autoencoder (VAE) receives its input from a binary vector output by a dynamic threshold comparator. Based on the bits in the binary vector that are one, a corresponding energy consumption subsequence is extracted from the real-time energy consumption data sequence. The binary vector and the real-time energy consumption data sequence correspond one-to-one by time index, with each bit corresponding to one sampling period. The process iterates through all positions in the binary vector; when a bit at a certain position is one, the instantaneous energy consumption value vector corresponding to that index is extracted from the real-time energy consumption data sequence. All extracted instantaneous energy consumption value vectors are arranged in their original time order to form a historical energy consumption segment. A historical energy consumption segment corresponds to a continuous or multiple adjacent periods of abnormal carbon emissions covering the energy consumption subsequence.
[0043] The variational autoencoder's encoder network consists of three convolutional neural network (CNN) layers and two fully connected network layers. The specific configuration of the three CNN layers is as follows: the first CNN layer contains 64 convolutional kernels with a kernel size of 3 and a stride of 1, using the ReLU activation function; the second CNN layer contains 128 convolutional kernels with a kernel size of 3 and a stride of 1, using the ReLU activation function; and the third CNN layer contains 256 convolutional kernels with a kernel size of 3 and a stride of 1, using the ReLU activation function. A one-dimensional max-pooling layer with a pooling window size of 2 and a stride of 2 is added after each CNN layer. The three CNN layers are used to extract temporal local features from historical energy consumption segments; the lower-layer convolutional kernels capture short-term energy consumption fluctuation patterns, while the higher-layer convolutional kernels capture energy consumption trend changes over longer periods. The input to the convolutional neural network is a historical energy consumption segment, the shape of which is the sequence length multiplied by the dimension of the individual energy consumption items. The dimension of the individual energy consumption items is 4, corresponding to the incremental power consumption, the instantaneous value of heating power, the instantaneous value of cooling power, and the instantaneous power value of the lighting circuit.
[0044] The encoder network consists of two fully connected layers following a three-layer convolutional neural network. The output feature maps of the three convolutional neural networks are flattened into one-dimensional vectors and input into the first fully connected layer. This first fully connected layer contains 128 neurons and uses the ReLU activation function. The second fully connected layer contains two parallel output layers: one outputs the mean vector of the latent variables (32-dimensional), and the other outputs the log-variance vector of the latent variables (also 32-dimensional). The variance vector of the latent variables is obtained by taking the exponent of each element in the log-variance vector.
[0045] We sample from a normal distribution defined by the mean vector and log-variance vector of the latent variables to obtain low-dimensional embedding vectors in the latent feature space. The sampling operation employs a reparameterization technique and is performed according to the following formula:
[0046]
[0047] in, This represents a low-dimensional embedding vector with a dimension of 32; This represents the mean vector of the latent variables output by the encoder network, with a dimension of 32; This represents the log-variance vector of the latent variables output by the encoder network, with a dimension of 32. Represents an element-wise exponential function; Let represent a random noise vector sampled from a standard normal distribution, with a dimension of 32, where each element independently follows a Gaussian distribution with a mean of zero and a variance of one. This represents element-wise multiplication. A reparameterization technique is employed to make the sampling process differentiable with respect to the encoder network parameters, thus supporting end-to-end gradient backpropagation training.
[0048] The variational autoencoder also includes a decoder network, which consists of two fully connected layers and three deconvolutional neural networks. The decoder network receives low-dimensional embedding vectors as input and outputs reconstructed historical energy consumption fragments. The training objective of the variational autoencoder is to maximize the lower bound of evidence, which comprises two terms: reconstruction loss and latent space regularization. The reconstruction loss is the mean squared error between the reconstructed energy consumption sequence and the original historical energy consumption fragments, and the latent space regularization is the Kullback-Leibler divergence between the approximate posterior distribution of the low-dimensional embedding vectors and the standard normal prior distribution. During training, the Adam optimizer is used with a learning rate of 0.0005 and a batch size of 16, iteratively training until the lower bound of evidence no longer increases. After training, the decoder network does not participate in subsequent steps; only the encoder network is retained for extracting the low-dimensional embedding vectors of the historical energy consumption fragments.
[0049] In specific implementation, please refer to Figure 4 The Building Information Model (BIM) is stored on a server as a database, containing static attribute data for each functional area of the building. Four static parameters are extracted from the BIM for each functional area: building area, building envelope heat transfer coefficient, window-to-wall ratio, and rated power of the air conditioning system. These static parameters are recorded numerically: building area is in square meters, building envelope heat transfer coefficient is in watts per square meter (Kelvin), window-to-wall ratio is a dimensionless ratio, and rated power of the air conditioning system is in kilowatts (kW). The four extracted static parameters are concatenated into a four-dimensional vector in a fixed order: building area, building envelope heat transfer coefficient, window-to-wall ratio, and rated power of the air conditioning system. This vector serves as the static feature vector. The static feature vector remains unchanged for the same functional area throughout the evaluation period.
[0050] The low-dimensional embedding vectors are extracted segment by segment from historical energy consumption data using a variational autoencoder network, with one low-dimensional embedding vector corresponding to each historical energy consumption segment. When multiple anomalous carbon emission periods exist within the evaluation timeframe, resulting in the extraction of multiple historical energy consumption segments, all historical energy consumption segments are arranged in their original chronological order, and the extracted low-dimensional embedding vectors also form a sequence in the same chronological order. The low-dimensional embedding vectors have a dimension of 32.
[0051] The low-dimensional embedding vector at each time step in the low-dimensional embedding vector sequence is fused with the static feature vector using attention-weighted fusion. At each time step, the low-dimensional embedding vector is multiplied by a first learnable weight matrix to obtain the query matrix. The first learnable weight matrix has a shape of 32 rows and 64 columns, and the low-dimensional embedding vector is a 32-dimensional row vector. The product result is a 64-dimensional row vector, which is one row of the query matrix, corresponding to the query vector of one time step.
[0052] Multiplying the static feature vector by the second learnable weight matrix yields the key-value matrix. The second learnable weight matrix has a shape of 4 rows and 64 columns, while the static feature vector is a 4-dimensional row vector. The product is a 64-dimensional row vector, i.e., the key-value matrix. Since the static feature vector is a single vector, the key-value matrix contains only a single 64-dimensional key vector.
[0053] Multiplying the low-dimensional embedding vector by the third learnable weight matrix yields the numerical matrix. The third learnable weight matrix has a shape of 32 rows and 64 columns, while the low-dimensional embedding vector is a 32-dimensional row vector. The product is a 64-dimensional row vector, which is one row of the numerical matrix. The numerical vectors from all time steps constitute the numerical matrix.
[0054] Calculate the dot product similarity between the query matrix and the key-value matrix. The query matrix has a dimension of time steps multiplied by 64, and the key-value matrix has a dimension of 1 multiplied by 64. Multiply the query matrix by the transpose of the key-value matrix, i.e., multiply the query matrix by the transpose of the key-value vector, to obtain a dot product similarity matrix with the shape of time steps multiplied by 1. Divide each element in the dot product similarity matrix by the square root of the dimension of the same dimensional space. The dimension of the same dimensional space is 64, and its square root is 8. After the division operation, apply a normalized exponential function to each element of the dot product similarity matrix. The normalized exponential function is performed on the dimension corresponding to the key-value matrix. Since the key-value matrix contains only one key vector, the output value of the normalized exponential function is always 1. When the system is set to process multiple functional areas or multiple static feature vectors, the normalized exponential function is normalized on the dimension of the key. The attention weight is the dot product similarity after processing by the normalized exponential function.
[0055] The attention weights are weighted and summed with the numerical matrix to obtain the intermediate result of attention-weighted fusion. The weighted summation is performed as follows: each row of the numerical matrix corresponds to a numerical vector at a given time step. The numerical vectors at each time step are multiplied by their corresponding attention weights, and then summed. Since the attention weights at each time step are scalars, the weighted summation is equivalent to using the numerical vector at that time step directly as the weighted fusion vector. The intermediate result of attention-weighted fusion is a 64-dimensional vector sequence, with a sequence length consistent with the number of time steps in the low-dimensional embedding vector sequence.
[0056] The weighted fusion vector sequence is temporally smoothed using a gated recurrent unit (GLU). The GLU consists of an update gate and a reset gate, with an input dimension of 64 and a hidden state dimension of 64. The GLU processes the weighted fusion vector sequence temporally, receiving the weighted fusion vector of the current time step and the hidden state of the previous time step at each time step, and outputting the hidden state vector of the current time step. The GLU processing is performed according to the following formula:
[0057]
[0058] in, Indicates the first The hidden state vector output by the time-step gated loop unit has a dimension of 64. Indicates the first The hidden state vector output by the time-step gated loop unit has a dimension of 64. Indicates the first The update gate vector for each time step has a dimension of 64. It is calculated by combining the weighted fusion vector of the current time step and the hidden state vector of the previous time step through a learnable fully connected layer and a sigmoid activation function. The value of each element is in the range of [0,1]. Indicates the first The candidate hidden state vector at each time step has a dimension of 64 and is calculated by combining the weighted fusion vector of the current time step with the hidden state vector of the previous time step adjusted by the reset gate through a learnable fully connected layer and a tanh activation function. This represents element-wise multiplication. The initial hidden state of the gated loop unit. Set it to an all-zero vector.
[0059] The smoothed vector output from each time step of the gated recurrent unit is input into the fully connected layer. The fully connected layer has an input dimension of 64 and an output dimension of 1, with no activation function. The fully connected layer outputs a scalar, which is the building carbon emission dynamic assessment index for the corresponding time step. The building carbon emission dynamic assessment index numerically reflects the carbon emission risk level of a building during the current period of abnormal carbon emissions, considering both static attributes and dynamic energy consumption anomalies. A higher value indicates a higher degree of carbon emission anomaly in the assessed object during that period.
[0060] In some embodiments, the aforementioned AI-based dynamic assessment system for building carbon emissions includes a memory, a processor, and a computer program stored in the memory and running on the processor. The memory is a random access memory or a non-volatile storage medium, and the processor is a general-purpose central processing unit or a graphics processing unit. When the processor executes the computer program, it implements the steps of the AI-based dynamic assessment method for building carbon emissions described in the foregoing embodiments. The system acquires real-time energy consumption data sequences through a building automation system interface, acquires real-time environmental perception data sequences through a wireless sensor network gateway, and preloads static parameters of the building information model into memory. The processor sequentially executes deep Bayesian neural network inference, dynamic threshold comparator operations, variational autoencoder encoding, attention fusion, and gating loop unit smoothing processing, ultimately generating a dynamic assessment index for building carbon emissions at the output.
[0061] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. A dynamic assessment method for building carbon emissions based on artificial intelligence, characterized in that, include: Acquire real-time energy consumption data sequences and real-time environmental perception data sequences during the building operation phase; The real-time energy consumption data sequence and the real-time environmental perception data sequence are synchronously input into a pre-trained deep Bayesian neural network to generate the instantaneous carbon emission probability distribution of each functional area of the building. Based on the instantaneous carbon emission probability distribution, a dynamic threshold comparator is triggered, and the dynamic threshold comparator outputs an abnormal carbon emission period identifier that exceeds the threshold. The historical energy consumption segments corresponding to the abnormal carbon emission period identifiers are used, and the latent feature space of the historical energy consumption segments is reconstructed by a variational autoencoder. The potential feature space is fused with the static parameters of the building information model using attention weighting to obtain a dynamic assessment index for building carbon emissions.
2. The method for dynamic assessment of building carbon emissions based on artificial intelligence according to claim 1, characterized in that, The specific steps for obtaining real-time energy consumption data sequences and real-time environmental perception data sequences during building operation are as follows: The instantaneous values of energy consumption for electricity, heating, cooling, and lighting are extracted from the building automation system at a fixed sampling period to form the real-time energy consumption data sequence. Simultaneously, instantaneous monitoring values of temperature, humidity, carbon dioxide concentration, and personnel flow rate are collected from the wireless sensor network deployed on each floor of the building, forming the real-time environmental perception data sequence. The real-time energy consumption data sequence and the real-time environmental perception data sequence are aligned with the same timestamp to form a pair of dual-sequence inputs.
3. The method for dynamic assessment of building carbon emissions based on artificial intelligence according to claim 1, characterized in that, The specific steps for synchronously inputting the real-time energy consumption data sequence and the real-time environmental perception data sequence into a pre-trained deep Bayesian neural network to generate the instantaneous carbon emission probability distribution of each functional area of the building are as follows: Multiply each energy consumption value in the real-time energy consumption data sequence by the corresponding power grid carbon emission factor of the functional area to obtain a preliminary carbon emission estimate. The real-time environmental perception data sequence is used as a conditional feature and input into the hidden layer of a deep Bayesian neural network. The hidden layer outputs the mean and variance parameters of a Gaussian distribution. The preliminary carbon emission estimate is linked with the mean parameter by residual connection, and then random sampling is performed using the variance parameter to generate the instantaneous carbon emission probability distribution for each functional area.
4. The method for dynamic assessment of building carbon emissions based on artificial intelligence according to claim 3, characterized in that, The deep Bayesian neural network employs variational inference to optimize the lower bound of evidence during training, and estimates the prediction uncertainty using the Monte Carlo dropout method after each training cycle.
5. The method for dynamic assessment of building carbon emissions based on artificial intelligence according to claim 1, characterized in that, Based on the instantaneous carbon emission probability distribution, the step of triggering a dynamic threshold comparator and having the dynamic threshold comparator output an abnormal carbon emission period identifier exceeding the threshold is as follows: Extract the expected carbon emission value and the upper bound of the confidence interval for each time point from the instantaneous carbon emission probability distribution; The expected carbon emission value is compared with a pre-set baseline carbon emission threshold, and the upper bound of the confidence interval is compared with the baseline carbon emission threshold. When the expected carbon emission value or the upper bound of the confidence interval is greater than the baseline carbon emission threshold, the dynamic threshold comparator outputs the abnormal carbon emission period identifier corresponding to the current time point. The abnormal carbon emission period identifiers are stored as binary vectors in chronological order, where the value of each binary bit represents whether the corresponding sampling period is an abnormal period.
6. The method for dynamic assessment of building carbon emissions based on artificial intelligence according to claim 5, characterized in that, The specific steps of using the historical energy consumption segments corresponding to the abnormal carbon emission period identifier index and reconstructing the latent feature space of the historical energy consumption segments through a variational autoencoder are as follows: Based on the binary bits with a value of one in the binary vector, the corresponding energy consumption subsequence is extracted from the real-time energy consumption data sequence, and the energy consumption subsequence constitutes the historical energy consumption segment. The historical energy consumption segment is input into the encoder network of the variational autoencoder, and the encoder network outputs the mean vector and log-variance vector of the latent variables. A low-dimensional embedding vector in the latent feature space is obtained by sampling from the normal distribution defined by the mean vector and log-variance vector of the latent variables.
7. The method for dynamic assessment of building carbon emissions based on artificial intelligence according to claim 6, characterized in that, The encoder network of the variational autoencoder consists of a three-layer convolutional neural network and a two-layer fully connected network. The convolutional neural network is used to extract the temporal local features of historical energy consumption segments.
8. The method for dynamic assessment of building carbon emissions based on artificial intelligence according to claim 6, characterized in that, The specific steps for obtaining dynamic assessment indicators of building carbon emissions by performing attention-weighted fusion of the latent feature space and the static parameters of the building information model are as follows: Static parameters such as building area, heat transfer coefficient of building envelope, window-to-wall ratio, and rated power of air conditioning system for each functional area are extracted from the building information model and then concatenated into a static feature vector. The low-dimensional embedding vector and the static feature vector are respectively mapped to the same dimensional space through linear transformation to obtain the query matrix and the key matrix; Calculate the dot product similarity between the query matrix and the key matrix, and use the dot product similarity as the attention weight after processing with a normalized exponential function; The attention weights are weighted and summed with the low-dimensional embedding vector to obtain a weighted fusion vector. The weighted fusion vector is then mapped to a scalar through a fully connected layer. The scalar is a dynamic assessment index for building carbon emissions.
9. The method for dynamic assessment of building carbon emissions based on artificial intelligence according to claim 6, characterized in that, After the attention-weighted fusion, the weighted fusion vector on the time series is further smoothed by a gated loop unit, and then the smoothed vector is input into the fully connected layer.
10. An AI-based dynamic assessment system for building carbon emissions, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the AI-based dynamic assessment method for building carbon emissions as described in any one of claims 1 to 9.