Building operation carbon emission prediction method and system based on graph neural network

Through a graph-based neural network method, combined with dynamic correlation graphs and timing convolutional networks, the problem of insufficient carbon emission prediction accuracy and interpretation in the existing technology is solved, and more efficient carbon emission prediction and model interpretation are achieved.

CN119761544APending Publication Date: 2025-04-04ANHUI UNIVERSITY OF ARCHITECTURE
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411590197.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The existing carbon emission prediction methods for building operation are difficult to capture the dynamic relationship between data, lack transparency and interpretation, which limits its prediction accuracy and application scope.

Method used

Using a graph neural network-based method, the energy consumption and environmental parameter data of building is collected and preprocessed, carbon emission accounting and correlation analysis are used using the emission factor method to generate dynamic correlation graph sequences, and predictions are made with the TCN-GCN algorithm, and explanations are made using SHAP and GNNEExplainer tools.

Benefits of technology

It improves the accuracy of carbon emission prediction, can accurately capture the dynamic relationship between complex timing and multi-dimensional data, and provides clear explanation paths, enhancing user trust and understanding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119761544A_ABST
    Figure CN119761544A_ABST
Patent Text Reader

Abstract

The invention discloses a building operation carbon emission prediction method based on a graph neural network, and the method comprises the following steps: S1, collecting building energy consumption and indoor and outdoor environment parameter data, and carrying out the data preprocessing; s2, carrying out carbon emission accounting and correlation analysis on the preprocessed data by adopting an emission factor method; s3, capturing a dynamic evolution relationship among variables in the carbon emission time sequence by using a dynamic correlation graph generation method according to the data output in the step S2, and generating a dynamic correlation graph sequence; s4, building operation carbon emission prediction is carried out by using a TCN-GCN algorithm based on the dynamic correlation graph; and S5, quantifying the importance of the features and the graph structure in prediction by adopting SHAP and GNNE * plan tools, so as to explain a carbon emission time sequence prediction result. The invention also discloses a building operation carbon emission prediction system based on the graph neural network. According to the method, the carbon emission prediction precision can be improved, and building operation carbon emission prediction can be comprehensively explained from multiple perspectives.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of building operation carbon emission prediction, and in particular to a building operation carbon emission prediction method and system based on graph neural network. Background Art

[0002] Operational carbon emission prediction is an important part of building carbon emission management. However, existing building operation carbon emission prediction methods often fail to capture the multiple and dynamic relationships between various influencing factors. In addition, existing methods lack effective explanatory power and are difficult to quantify the impact of various variables on carbon emission prediction, making the model difficult for users to understand and trust.

[0003] In recent years, researchers have begun to try to use various data-driven models to process complex multi-dimensional data to improve prediction accuracy. However, existing models still have the following shortcomings in predicting building carbon emissions:

[0004] (1) Unable to fully capture the dynamic relationship between data: Traditional model building methods often assume that there is a fixed relationship between data, while actual building carbon emission data is often time-series and the relationship between them is dynamically changing. This static assumption limits the model's predictive ability.

[0005] (2) Lack of transparency and explainability: The “black box” problem of deep learning models, especially in carbon emission forecasting, makes it difficult for users and regulators to understand and interpret model output results, limiting its scope of application.

[0006] The above problems show that the existing technical means have room for improvement in terms of the accuracy, dynamic modeling capabilities and interpretability of carbon emission prediction. Therefore, an innovative method that can both improve prediction accuracy and provide a clear interpretation path is urgently needed to solve the above problems. Summary of the invention

[0007] The technical problem to be solved by the present invention is to provide a method and system for predicting carbon emissions from building operations based on graph neural networks, which can improve the accuracy of carbon emission prediction and comprehensively explain the carbon emission prediction from building operations from multiple perspectives.

[0008] In order to solve the above technical problems, a technical solution adopted by the present invention is to provide a method for predicting carbon emissions from building operations based on a graph neural network, comprising the following steps:

[0009] S1: Collect building energy consumption and indoor and outdoor environmental parameter data, and perform data preprocessing;

[0010] S2: Use the emission factor method to calculate carbon emissions and conduct correlation analysis on the preprocessed data;

[0011] S3: using the data output from step S2 to capture the dynamic evolution relationship between variables in the carbon emission time series using a dynamic correlation graph generation method, and generating a dynamic correlation graph sequence;

[0012] S4: Prediction of building operation carbon emissions using TCN-GCN algorithm based on dynamic correlation graph;

[0013] S5: SHAP and GNNExplainer tools are used to quantify the importance of features and graph structures in prediction and to explain the carbon emission time series prediction results.

[0014] In a preferred embodiment of the present invention, in step S1, the building energy consumption data includes electricity, natural gas and water, and the indoor and outdoor environmental parameter data includes temperature, relative humidity, PM 2.5 Concentration, PM 10 concentration, TVOC concentration, eCO2 concentration.

[0015] In a preferred embodiment of the present invention, in step S1, the data preprocessing process includes missing value filling, outlier repair, and data alignment.

[0016] In a preferred embodiment of the present invention, in step S2, the emission factor method is used to calculate carbon emissions, and the formula is as follows:

[0017]

[0018] In the formula, E total Represents the total carbon emissions, E i represents the consumption of the i-th energy source, EF i is the corresponding carbon emission factor.

[0019] In a preferred embodiment of the present invention, in step S2, the method for performing correlation analysis on the data after carbon emission accounting includes:

[0020] Through correlation analysis, we select input variables that have a strong correlation with carbon emissions, and use the Pearson correlation coefficient to quantify the correlation between each variable and carbon emissions. The calculation formula is as follows:

[0021]

[0022] In the formula, ρ x,y represents the Pearson correlation coefficient between variables x and y, x i and i denote the i-th observation value, and is the mean of x and y, and n is the total number of observations.

[0023] In a preferred embodiment of the present invention, the specific steps of step S3 include:

[0024] S301: Data input: The data after correlation analysis outputted from step S2 is expressed in matrix form:

[0025]

[0026] In the formula, T represents the time step, n represents the number of variables, and x t,i represents the value of the i-th variable at time t;

[0027] S302: Data division: Use the sliding window method to divide the time series data into multiple time periods. Set the size of the sliding window to W and the sliding step to S. The data subset in each window is expressed as:

[0028]

[0029] In the formula, k is the window start time index, W is the window size, and multiple subset data containing dynamic relationships are generated through overlapping sampling of windows;

[0030] S303: Graph construction: For each data subset X in the window k , calculate the correlation matrix between variables. Here, the Pearson correlation coefficient is used to calculate the variable x i With x j The correlation between:

[0031]

[0032] The resulting correlation matrix is ​​represented as:

[0033]

[0034] S304: Graph sparseness: Filter the edges of the graph by threshold θ, as shown in Formula 7, when the correlation coefficient R between variables i and j in time window t is t If (i, j) exceeds the set threshold, the edge is retained, otherwise it is removed;

[0035]

[0036] S305: Output: The output is a dynamic correlation graph sequence [A1, A2, ..., A m ], each A k It corresponds to a time window and reflects the dynamic correlation between variables within the time period.

[0037] In a preferred embodiment of the present invention, the specific steps of step S4 include:

[0038] S401: Multivariate time series X tInput a multi-layer perceptron to obtain the initial representation z (1) , and obtain the adjacency matrix through the dynamic correlation graph algorithm

[0039]

[0040] Where DCG is the dynamic correlation graph algorithm;

[0041] S402: Using the temporal convolution module To capture multi-scale representations in the time dimension:

[0042]

[0043] In the formula, z ( l ) is the input of layer 1;

[0044] S403: Temporal convolution module The output ξ is input to the graph convolution module In the adjacency matrix Also input to the graph convolution module In the graph convolution module, information propagation and selection are performed. The output z′ (l+1) for:

[0045]

[0046] S404: Use residual connection to convert the initial input z (l) Directly passed to the next layer, that is, the output of each TCN-GCN module is composed of the initial input z (l) and graph convolutional modules The output z′ (l+1) Composition, i.e. z (l+1) =z (l) +z′ (l+1) ;

[0047] S405: Use skip connection to convert the initial input z (l) , Temporal Convolution Module The output ξ of the last layer of graph convolution module The output z′ (l+1) Passed to the final output:

[0048]

[0049] Where L is the total number of TCG-GCN layers, is a simple predictor.

[0050] Furthermore, the temporal convolution module uses two dilated initial layers of dilated convolutions, and the dilated initial layers use a set of standard dilated one-dimensional convolution filters to extract temporal features. For node i, the dilated convolution is defined as:

[0051]

[0052] Where e is the expansion factor, z i ∈R T Given a one-dimensional sequence input, f 1×k ∈R k is a one-dimensional convolution filter kernel of size k, ★ is the convolution symbol;

[0053] Both hole initial layers consist of 4 filters, and the hole initial layer definition is:

[0054] ω' i =concat(z i ★f 1×2 , z i ★f 1×3 , z i ★f 1×6 , z i ★f 1×7 ) (13)

[0055] Where contat is the concatenation operator;

[0056] The outputs of the two hole initial layers are input into different activation functions respectively. One hole initial layer is followed by a hyperbolic tangent activation function (μ), and the output is ω 1,i , another hole initial layer followed by a sigmoid activation function (σ), the output is ω 2,i , the two are element-wise multiplied and then output to control the amount of information transmitted:

[0057] ω i =σ(ω' 1,i )⊙μ(ω' 2,i ) (14)

[0058] Where ⊙ is the Hadamard product; ω i It is the temporal convolution output of node i, which is then fed into the graph convolution module.

[0059] Furthermore, the graph convolution module includes information propagation, information selection, and graph convolution output;

[0060] The information propagation step is used to transmit node information, and the formula is:

[0061]

[0062] Where ω is the original input state, β∈[0,1] is a preset hyperparameter; A is the adjacency matrix generated by the dynamic correlation graph algorithm, and I is the identity matrix; D is a diagonal matrix, k∈[1, K] is the current transmission layer, and K is the total number of iterations;

[0063] The information selection step is used to adjust the correlation between features and filter out useless information. The formula is:

[0064]

[0065] Where W (k) is the attention matrix corresponding to the kth propagation layer, H out It is the output layer of the graph convolution module;

[0066] In the last graph convolution module 1, the output of the nth temporal convolution and the dynamic correlation matrix A(t) of scale t are fed into the mix-hop propagation layer, defined as:

[0067] H l out =G l (ω (l,(n-1)t+1:nt) ,A(t)) (17)

[0068] In the formula, G l represents the mix-hop propagation layer of layer 1, H l out is the graph convolution output of layer 1.

[0069] In order to solve the above technical problems, another technical solution adopted by the present invention is to provide a building operation carbon emission prediction system based on graph neural network, comprising:

[0070] Data collection and preprocessing module, used to collect building energy consumption and indoor and outdoor environmental parameter data, and perform data preprocessing;

[0071] A carbon emission accounting and correlation analysis module, used to perform carbon emission accounting and correlation analysis on the data preprocessed by the data acquisition and preprocessing module using an emission factor method;

[0072] A dynamic correlation graph generation module is used to capture the dynamic evolution relationship between variables in the carbon emission time series using the dynamic correlation graph generation method using the data output after the correlation analysis to generate a dynamic correlation graph sequence;

[0073] TCN-GCN algorithm module, used to predict building operation carbon emissions using the TCN-GCN algorithm based on dynamic correlation graph;

[0074] The prediction results and analysis module is used to quantify the importance of features and graph structures in prediction using SHAP and GNNExplainer tools, and to explain the carbon emission time series prediction results.

[0075] The beneficial effects of the present invention are:

[0076] (1) This paper proposes a building operation carbon emission prediction framework based on the TCN-GCN algorithm of dynamic correlation graph and multi-perspective comprehensive interpretation method. By combining dynamic correlation graph and time series convolutional network, the model can accurately capture the dynamic relationship between complex time series and multi-dimensional data, thereby improving the prediction accuracy;

[0077] (2) The present invention also proposes a multi-perspective building carbon emission prediction model interpretation method that combines SHAP and GNNExplainer, which enables users to understand and quantify the impact of various variables on carbon emission prediction, which helps in making carbon emission management decisions. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 It is a framework diagram of a building operation carbon emission prediction method and system based on graph neural network of the present invention;

[0079] Figure 2 is a schematic diagram of the dynamic correlation graph generation process;

[0080] Figure 3 It is the flow chart of the TCN-GCN algorithm;

[0081] Figure 4 It is a heat map of carbon emission correlation analysis in the application example of the present invention;

[0082] Figure 5 is a schematic diagram of sample data of model input parameters in the application example;

[0083] Figure 6 is a visualization diagram representing a dynamic correlation graph in the application example;

[0084] Figure 7 is a comparison chart of prediction results in the application example;

[0085] Figure 8 is a SHAP analysis diagram of the application example;

[0086] Fig. 9 is the GNNExplainer analysis diagram of the application example. DETAILED DESCRIPTION

[0087] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0088] See also Figure 1 , the embodiment of the present invention includes:

[0089] A method for predicting carbon emissions from building operations based on graph neural networks, comprising the following steps:

[0090] S1: Collect building energy consumption and indoor and outdoor environmental parameter data, and perform data preprocessing;

[0091] The building energy consumption data includes electricity, natural gas and water consumption, and the indoor and outdoor environmental parameter data includes temperature, relative humidity, PM 2.5 Concentration, PM 10 concentration, TVOC concentration, eCO2 concentration.

[0092] The data preprocessing process includes missing value filling, outlier repair, and data alignment. The specific process is as follows:

[0093] (1) Missing value filling

[0094] S101: Missing Value Detection: Scan the dataset through Python script, identify missing values ​​and analyze their distribution pattern and degree of missingness.

[0095] S102: Linear interpolation: For the case where 1 to 2 values ​​are missing continuously, the mean of the adjacent data before and after is used for interpolation filling. The formula is:

[0096]

[0097] S103: Time series decomposition and exponential smoothing: For a large amount of missing data, the time series is first decomposed into three components: trend (T), seasonality (S), and residual (R); then simple exponential smoothing is applied to each component for filling, the formula is:

[0098] Y t =T t +S t +R t (2)

[0099] Trend component T t Calculated by moving average method, the formula is:

[0100]

[0101] Wherein, m=2k+1 is the window size of the moving average.

[0102] The seasonal component St represents the periodic fluctuation in the time series, and the formula is:

[0103]

[0104] Where p is the number of observations in the period.

[0105] The residual component Rt represents the part not explained by trend and seasonality, and the formula is:

[0106] R t =Y t -S t -T t (5)

[0107] Then exponential smoothing is applied to each component for filling, and the smoothing formula is:

[0108]

[0109] Finally, the imputed trend, seasonality, and residual components are reorganized into approximate original data using the following reorganization formula:

[0110]

[0111] (2) Outlier repair

[0112] S111: Identification of outlier types

[0113] Negative values ​​are usually measurement errors or recording anomalies in energy consumption data;

[0114] A high Z-score value indicates that the observation deviates significantly from the central trend of the data set.

[0115] S112: Z-score calculation, the calculation formula is:

[0116]

[0117] Where X is the observed value, μ is the sample mean, and σ is the sample standard deviation.

[0118] S113: Outlier Marking

[0119] Mark negative values ​​and observations with Z-score > 3 in the dataset.

[0120] S114: Outlier handling strategy

[0121] For marked outliers, the same filling method as missing values ​​is used.

[0122] (3) Data alignment

[0123] Depending on the actual situation of the data, apply the following steps:

[0124] S121: Select a suitable time window and calculate the average value within the window to perform data resampling.

[0125] S122: Ensure that the timestamps of the sensor data are aligned, fill in missing values, or mark abnormal values.

[0126] S123: After alignment, data verification is performed to ensure data quality and consistency.

[0127] S2: Use the emission factor method to calculate carbon emissions and conduct correlation analysis on the preprocessed data;

[0128] S201: Carbon emissions are calculated using the emission factor method, the formula is as follows:

[0129]

[0130] In the formula, E total Represents the total carbon emissions, E i represents the consumption of the i-th energy source, EF i is the corresponding carbon emission factor.

[0131] S202: Methods for performing correlation analysis on data after carbon emission accounting include:

[0132] Through correlation analysis, we select input variables with strong correlation with carbon emissions, and use the Pearson correlation coefficient to quantify the relationship between each variable and the total carbon emissions E. total The correlation between them is calculated as follows:

[0133]

[0134] In the formula, ρ x,y represents the Pearson correlation coefficient between variables x and y, x i and i denote the i-th observation value, and is the mean of x and y, and n represents the total number of observations. For example, variable x can be an environmental factor (such as outdoor temperature, humidity, PM2.5 concentration, etc.) or energy consumption data (such as electricity consumption, natural gas usage); variable y is the total carbon emission data, which is calculated by the emission factor method in step S201.

[0135] S3: The data output from step S2 is used to capture the dynamic evolution relationship between variables in the carbon emission time series using a dynamic correlation graph generation method to generate a dynamic correlation graph sequence, such as Figure 2 As shown, the specific steps include:

[0136] S301: Data input: The input data includes various time series data recorded during the operation of the building, such as energy consumption and environmental parameter data. All input data should be organized in a time series format, and the timestamps should be aligned so that they can be processed uniformly in subsequent steps. The data after correlation analysis output from step S2 is represented in matrix form:

[0137]

[0138] In the formula, T represents the time step, n represents the number of variables, and x t,i represents the value of the i-th variable at time t;

[0139] S302: Data division: In order to capture the dynamic changes of variables over time, the sliding window method is used to divide the time series data into multiple time periods. The size of the sliding window is set to w and the sliding step is set to S. The data subset in each window is expressed as:

[0140]

[0141] In the formula, k is the window start time index, W is the window size, and multiple subset data containing dynamic relationships are generated through overlapping sampling of windows;

[0142] S303: Graph construction: For each data subset X in the window k , calculate the correlation matrix between variables. Here, Pearson correlation coefficient is used to calculate variable x i With x j The correlation between:

[0143]

[0144] The resulting correlation matrix is ​​represented as:

[0145]

[0146] S304: Graph sparseness: Filter the edges of the graph (non-zero elements in the correlation matrix) by threshold θ, as shown in Formula 15. When the correlation coefficient R between variables i and j in the time window t is t If (i, j) exceeds the set threshold, the edge is retained, otherwise it is removed;

[0147]

[0148] S305: Output: The output is a dynamic correlation graph sequence [A1, A2, ..., A m ], each A kCorresponding to a time window, it reflects the dynamic correlation between variables within the time period. This graph sequence will be used as the input of the graph convolution module (GCN) to extract the temporal correlation features between variables.

[0149] S4: Using the DCG-based TCN-GCN algorithm to predict building operation carbon emissions, such as Figure 3 As shown, the specific steps include:

[0150] S401: Multivariate time series X t Input a multi-layer perceptron to obtain the initial representation z (1) , and obtain the adjacency matrix through the dynamic correlation graph algorithm

[0151]

[0152] Where DCG is the dynamic correlation graph algorithm;

[0153] S402: Using the temporal convolution module To capture multi-scale representations in the time dimension:

[0154]

[0155] In the formula, z (l) is the input of layer 1;

[0156] S403: Temporal convolution module The output ξ is input to the graph convolution module In the example, the output of the DCG algorithm is a series of adjacency matrices Also input to the graph convolution module In the graph convolution module, information propagation and selection are performed. The output z′ (l+1) for:

[0157]

[0158] S404: Use residual connection to convert the initial input z (l) Directly passed to the next layer, that is, the output of each TCN-GCN module is composed of the initial input z (l) and graph convolutional modules The output z′ (l+1) Composition, i.e. z (l+1) =z (l) +z′ (l+1) ;

[0159] S405: Use skip connection to convert the initial input z (l) , Temporal Convolution Module The output ξ of the last layer of graph convolution module The output z′ (l+1) Passed to the final output:

[0160]

[0161] Where L is the total number of TCG-GCN layers, is a simple predictor that can be implemented with a fully connected layer.

[0162] Furthermore, the temporal convolution module uses dilated convolutions of two dilated initial layers, and the dilated initial layers use a set of standard dilated 1D convolution filters for temporal feature extraction. For node i, the dilated convolution is defined as:

[0163]

[0164] Where e is the expansion factor, z i ∈R T Given a one-dimensional sequence input, f 1×k ∈R k is a one-dimensional convolution filter kernel of size k, ★ is the convolution symbol;

[0165] Both hole initial layers are composed of 4 filters, and the filter sizes are 1×2, 1×3, 1×6 and 1×7 respectively to cover all possible time signal periods. The hole initial layer definition is:

[0166] ω′ i =concat(z i ★f 1×2 , z i ★f 1×3 , z i ★f 1×6 , z i ★f 1×7 ) (twenty one)

[0167] Where contat is the concatenation operator; the outputs of the four filters of different sizes are truncated to the same length with reference to the output of the largest filter and concatenated in the channel dimension.

[0168] The outputs of the two hole initial layers are input into different activation functions respectively. One hole initial layer is followed by a hyperbolic tangent activation function (μ), and the output is ω' 1,i , another hole initial layer followed by a sigmoid activation function (σ), the output is ω' 2,i The two are element-wise multiplied and then output to control the amount of information transmitted:

[0169] ωi =σ(ω' 1,i )⊙μ(ω' 2,i ) (twenty two)

[0170] Where ⊙ is the Hadamard product. ω i It is the temporal convolution output of node i, which will be fed into the graph convolution module.

[0171] Furthermore, the graph convolution module includes information propagation, information selection, and graph convolution output;

[0172] The information propagation step is used to transmit node information, and the formula is:

[0173]

[0174] Where ω is the original input state, β∈[0,1] is a preset hyperparameter; A is the adjacency matrix generated by the dynamic correlation graph algorithm, and I is the identity matrix; D is a diagonal matrix, k∈[1, K] is the current transmission layer, and K is the total number of iterations;

[0175] The information selection step is used to adjust the correlation between features and filter out useless information. The formula is:

[0176]

[0177] Where W (k) is the attention matrix corresponding to the kth propagation layer, H out It is the output layer of the graph convolution module;

[0178] In the last graph convolution module 1, the output of the nth temporal convolution and the dynamic correlation matrix A(t) of scale t are fed into the mix-hop propagation layer, defined as:

[0179] H l out =G l (ω (l,(n-1)t+1:nt) ,A(t)) (25)

[0180] In the formula, G l Indicates the mix-hop propagation layer of layer 1. l out is the graph convolution output of layer 1.

[0181] S5: To solve the "black box" problem of deep learning models, SHAP and GNNExplainer tools are used to quantify the importance of features and graph structures in predictions and to explain the carbon emission time series prediction results. The specific steps are as follows:

[0182] S501: SHAP Method

[0183] The SHAP method is used to calculate the contribution of each input feature to the model prediction result. The calculation formula is:

[0184]

[0185] In the formula, φ i (f) is the Shapley value of feature i for model prediction, F is the feature set, S is the feature subset that does not contain feature i, f(x s∪{i} ) is the predicted value of the model containing feature i, f(x s ) is the predicted value of the model without feature i.

[0186] S502: GNNExplainer Method

[0187] GNNExplainer is used to interpret the prediction results of the graph neural network and identify the subgraph with the most mutual information. This allows us to identify the edges that have the greatest impact on the prediction results. This method determines important nodes and edges by solving the following optimization problem. The optimization problem formula is:

[0188]

[0189] In the formula, G s is a subgraph, X s is the node feature mask, Y is the prediction result. H represents entropy, MI(Y,(G s , X s )) represents the mutual information between the subgraph and the prediction result.

[0190] The present invention also provides a building operation carbon emission prediction system based on graph neural network, including:

[0191] Data collection and preprocessing module, used to collect building energy consumption and indoor and outdoor environmental parameter data, and perform data preprocessing;

[0192] A carbon emission accounting and correlation analysis module, used to perform carbon emission accounting and correlation analysis on the data preprocessed by the data acquisition and preprocessing module using an emission factor method;

[0193] A dynamic correlation graph generation module is used to capture the dynamic evolution relationship between variables in the carbon emission time series using the dynamic correlation graph generation method using the data output after the correlation analysis to generate a dynamic correlation graph sequence;

[0194] TCN-GCN algorithm module, used to predict building operation carbon emissions using the TCN-GCN algorithm based on dynamic correlation graph;

[0195] The prediction results and analysis module is used to quantify the importance of features and graph structures in prediction using SHAP and GNNExplainer tools, and to explain the carbon emission time series prediction results.

[0196] A building operation carbon emission prediction system based on graph neural network in this example can execute a building operation carbon emission prediction method based on graph neural network provided by the present invention, and can execute any combination of implementation steps of the method example, and has the corresponding functions and beneficial effects of the method.

[0197] The following is a specific description of the effect of the method of the present invention by taking residential buildings in a certain area as an example.

[0198] The energy consumption and indoor and outdoor environmental parameter data of the residence in 2019 were collected, and a deep learning algorithm was used to train and establish a carbon emission prediction model for residential building operation. The energy consumption data includes electricity, natural gas and water, and the indoor and outdoor environmental parameter data includes temperature, relative humidity, PM 2.5 Concentration, PM 10 Concentration, TVOC concentration, eCO2 concentration. The collected data are summarized in Table 1.

[0199] Table 1. Overview of collected data samples

[0200]

[0201] After preprocessing the collected raw data, carbon emission accounting was performed to obtain the carbon emission data of the building in 2019. On this basis, carbon emission correlation analysis was performed. The analysis results are as follows: Figure 4 The ranking is based on the Pearson correlation coefficient between the parameters and carbon emissions: natural gas > outdoor temperature > indoor relative humidity > indoor temperature > outdoor PM 2.5 >Outdoor PM 10 >Outdoor eCO2>Outdoor relative humidity>Indoor eCO2>Indoor TVOCs>Electricity>Outdoor TVOCs>Indoor PM 2.5 > water. For the parameter pairs that showed perfect correlation (outdoor eCO2 and outdoor TVOCs, outdoor PM 2.5 and outdoor PM 10 , indoor eCO2 and indoor TVOCs, natural gas and carbon emissions), and only one of each pair was retained. Finally, considering the missing data and relevance, residential electricity consumption, outdoor relative humidity, outdoor PM 2.5 The eight parameters of concentration, outdoor temperature, outdoor eCO2 concentration, indoor relative humidity, indoor temperature, and residential carbon emissions are used as the input sample data of the model, such as Figure 5 shown.

[0202] The above dataset is used as the data used for model training and prediction, and dynamic correlation graphs are generated as the graph input data of the model. The visualization results are as follows Figure 6 As shown in the figure, ah represents (a) electricity, (b) outdoor eCO2 concentration, (c) outdoor relative humidity, (d) outdoor temperature, (e) indoor relative humidity, (f) indoor temperature, and (g) outdoor PM PM 2.5 concentrations, (h) residential CO2 emissions. In the first row, the daily correlation matrix over a 7-day period shows significant short-term fluctuations between parameters (such as a and b, e and f). The second row shows the correlation matrix over a five-week period, where the correlation pattern is more stable than on the daily scale. Some parameter correlations (e.g., a and d, b and c) remain relatively consistent, reflecting trends towards stable interactions on medium timescales. In the third row, the correlation matrix over a 6-month period further shows a stable correlation pattern, with several groups of parameters (such as a, h, d, and g) consistently showing high or low correlations, suggesting that long-term trends may be influenced by seasonal factors.

[0203] Eight time series prediction models are selected for comparison with the model (DCG-based TCN-GCN) proposed in this invention. The relative square root error (RSE) and empirical correlation coefficient (Corr) are used as evaluation indicators. The comparison results are shown in Table 2. Figure 7The forecast results of all models (AR (Auto-Regressive)-Autoregressive model, DT (Decision Tree)-Decision Tree, SVM (Support Vector Machine)-Support Vector Machine, FNN (Feedforward Neural Network)-Feedforward Neural Network, GPR (Gaussian Process Regression)-Gaussian Process Regression, Sageformer-Sageformer model, TPA-LSTM (Temporal Pattern Attention Long Short-Term Memory)-Time Pattern Attention Long Short-Term Memory Network, MT-GNN (Multivariate Time Series Graph Neural Network)-Multivariate Time Series Graph Neural Network, DCG-based TCN-GCN (Dynamic Correlation Graph-based Temporal Convolutional Network-Graph Convolutional Network)-Dynamic Correlation Graph-based Temporal Convolutional Network-Graph Convolutional Network) are displayed 4 days in advance. Specifically, this case sets the input sequence to 192, and selects the forecast values ​​of the selected days for visualization. Each timestamp is predicted using the historical data of the four days before the timestamp. As shown in the figure, the trend of the predicted value of the method proposed in the present invention is highly consistent with the true value.

[0204] Table 2. Model performance comparison table

[0205]

[0206]

[0207] Finally, SHAP and GNNExplainer tools are used to quantify the importance of features and graph structures in prediction. The analysis results are as follows: Figure 8 and Fig. 9 As shown. Figure 8 In the figure, the feature importance plot on the left arranges the features by their average absolute SHAP value, indicating their average impact on the prediction. Indoor temperature, indoor humidity, and outdoor temperature have the greatest impact on carbon emissions prediction. The summary plot on the right combines the importance of the features and the individual predictive effects, using color coding (low values ​​in blue, high values ​​in red) to illustrate the impact of the features. The results show that the higher the indoor temperature, indoor humidity, and outdoor temperature values, the more negative the SHAP values ​​are, indicating that these features are negatively correlated with carbon emissions. Fig. 9Includes two panels: the left shows the importance of features, and the right shows the importance of graph edges. Due to the limited attribute information in the node labels, the importance of node features is not so obvious. However, the right panel highlights the importance of edges, where darker edges indicate a greater impact on carbon emissions prediction. Key edges - such as between indoor temperature and outdoor PM2.5, and between outdoor temperature and electricity consumption - emphasize the substantial impact of environmental factors on carbon emissions. This reflects the characteristics of real-world energy use: changes in outdoor temperature will directly lead to adjustments in indoor temperature, thereby affecting overall energy demand.

[0208] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for predicting carbon emissions from building operations based on graph neural networks, characterized in that: The following steps are involved: S1: Collect building energy consumption and indoor and outdoor environmental parameter data, and perform data preprocessing; S2: Use the emission factor method to calculate carbon emissions and conduct correlation analysis on the preprocessed data; S3: using the data output from step S2 to capture the dynamic evolution relationship between variables in the carbon emission time series using a dynamic correlation graph generation method, and generating a dynamic correlation graph sequence; S4: Prediction of building operation carbon emissions using TCN-GCN algorithm based on dynamic correlation graph; S5: SHAP and GNNExplainer tools are used to quantify the importance of features and graph structures in prediction and to explain the carbon emission time series prediction results.

2. The method for predicting building operation carbon emissions based on graph neural network according to claim 1 is characterized in that: In step S1, the building energy consumption data includes electricity, natural gas and water, and the indoor and outdoor environmental parameter data includes temperature, relative humidity, PM 2.5 Concentration, PM 10 concentration, TVOC concentration, eCO2 concentration.

3. The method for predicting building operation carbon emissions based on graph neural network according to claim 1 is characterized in that: In step S1, the data preprocessing process includes missing value filling, outlier repair, and data alignment.

4. The method for predicting building operation carbon emissions based on graph neural network according to claim 1 is characterized in that: In step S2, the emission factor method is used to calculate carbon emissions, and the formula is as follows: In the formula, E total Represents the total carbon emissions, E i represents the consumption of the i-th energy source, EF i is the corresponding carbon emission factor.

5. The method for predicting building operation carbon emissions based on graph neural network according to claim 1 is characterized in that: In step S2, the method for performing correlation analysis on the data after carbon emission accounting includes: Through correlation analysis, we select input variables that have a strong correlation with carbon emissions, and use the Pearson correlation coefficient to quantify the correlation between each variable and carbon emissions. The calculation formula is as follows: In the formula, ρ x,y represents the Pearson correlation coefficient between variables x and y, x i and i denote the i-th observation value, and is the mean of x and y, and n is the total number of observations.

6. The method for predicting building operation carbon emissions based on graph neural network according to claim 1 is characterized in that: The specific steps of step S3 include: S301: Data input: The data after correlation analysis output from step S2 is expressed in matrix form: In the formula, T represents the time step, n represents the number of variables, and x t,i represents the value of the i-th variable at time t; S302: Data division: Use the sliding window method to divide the time series data into multiple time periods. Set the size of the sliding window to W and the sliding step to S. The data subset in each window is expressed as: In the formula, k is the window start time index, W is the window size, and multiple subset data containing dynamic relationships are generated through overlapping sampling of windows; S303: Graph construction: For each data subset X in the window k , calculate the correlation matrix between variables. Here, the Pearson correlation coefficient is used to calculate the variable x i With x j The correlation between: The resulting correlation matrix is ​​represented as: S304: Graph sparseness: Filter the edges of the graph by threshold θ, as shown in Formula 7, when the correlation coefficient R between variables i and j in time window t is t If (i, j) exceeds the set threshold, the edge is retained, otherwise it is removed; S305: Output: The output is a dynamic correlation graph sequence [A1, A2, ..., A m ], each A k It corresponds to a time window and reflects the dynamic correlation between variables within the time period.

7. The method for predicting building operation carbon emissions based on graph neural network according to claim 1 is characterized in that: The specific steps of step S4 include: S401: Multivariate time series X t Input a multi-layer perceptron to obtain the initial representation z (1) , and obtain the adjacency matrix through the dynamic correlation graph algorithm Where DCG is the dynamic correlation graph algorithm; S402: Using the temporal convolution module To capture multi-scale representations in the time dimension: In the formula, z (l) is the input of layer 1; S403: Temporal convolution module The output ξ is input to the graph convolution module In the adjacency matrix Also input to the graph convolution module In the graph convolution module, information propagation and selection are performed. The output z′ (l+1) for: S404: Use residual connection to convert the initial input z (l) Directly passed to the next layer, that is, the output of each TCN-GCN module is composed of the initial input z (l) and graph convolutional modules The output z′ (l+1) Composition, i.e. z (l+1) =z (l) +z′ (l+1) ; S405: Use skip connection to convert the initial input z (l) , Temporal Convolution Module The output ξ of the last layer of graph convolution module The output z′ (l+1) Passed to the final output: Where L is the total number of TCG-GCN layers, is a simple predictor.

8. The method for predicting building operation carbon emissions based on graph neural network according to claim 3 is characterized in that: The temporal convolution module uses two dilated initial layers of dilated convolution. The dilated initial layers use a set of standard dilated one-dimensional convolution filters to extract temporal features. For node i, the dilated convolution is defined as: Where e is the expansion factor, z i ∈R T For a given one-dimensional sequence input, f 1×k ∈R k is a one-dimensional convolution filter kernel of size k, ★ is the convolution symbol; Both hole initial layers consist of 4 filters, and the hole initial layer definition is: ω′ i =concat(from i ★f 1×2 ,from i ★f 1×3 ,from i ★f 1×6 ,from i ★f 1×7 ) (13) Where contat is the concatenation operator; The outputs of the two hole initial layers are input into different activation functions respectively. One hole initial layer is followed by a hyperbolic tangent activation function (μ), and the output is ω′ 1,i ; Another empty initial layer is followed by a sigmoid activation function (σ), and the output is ω′ 2,i , the two are element-wise multiplied and then output to control the amount of information transmitted: oh i =σ(ω′ 1,i )⊙μ(ω′ 2,i ) (14) Where ⊙ is the Hadamard product; ω i It is the temporal convolution output of node i, which is then fed into the graph convolution module.

9. The method for predicting building operation carbon emissions based on graph neural network according to claim 3 is characterized in that: The graph convolution module includes information propagation, information selection, and graph convolution output; The information propagation step is used to transmit node information, and the formula is: Where ω is the original input state, β∈[0,1] is a preset hyperparameter; A is the adjacency matrix generated by the dynamic correlation graph algorithm, and I is the identity matrix; D is a diagonal matrix, k∈[1, K] is the current transmission layer, and K is the total number of iterations; The information selection step is used to adjust the correlation between features and filter out useless information. The formula is: Where W (k) is the attention matrix corresponding to the kth propagation layer, H out It is the output layer of the graph convolution module; In the last graph convolution module 1, the output of the nth temporal convolution and the dynamic correlation matrix A(t) of scale t are fed into the mix-hop propagation layer, defined as: H l out =G l (ω (l,(n-1)t+1:nt) ,A(t)) (17) In the formula, G l represents the mix-hop propagation layer of layer 1, H l out is the graph convolution output of layer 1.

10. A building operation carbon emission prediction system based on graph neural network, characterized in that: include: Data collection and preprocessing module, used to collect building energy consumption and indoor and outdoor environmental parameter data, and perform data preprocessing; A carbon emission accounting and correlation analysis module, used to perform carbon emission accounting and correlation analysis on the data preprocessed by the data acquisition and preprocessing module using an emission factor method; A dynamic correlation graph generation module is used to capture the dynamic evolution relationship between variables in the carbon emission time series using the dynamic correlation graph generation method using the data output after the correlation analysis to generate a dynamic correlation graph sequence; TCN-GCN algorithm module, used to predict building operation carbon emissions using the TCN-GCN algorithm based on dynamic correlation graph; The prediction results and analysis module is used to quantify the importance of features and graph structures in prediction using SHAP and GNNExplainer tools, and to explain the carbon emission time series prediction results.

Citation Information

Cited By

  • Carbon emission time sequence data prediction method and device and storage medium

    CN120893639A