Building operation energy consumption carbon emission prediction method and system based on collaborative Bayesian and parameter convolution optimization random forest

By using a method that combines collaborative Bayesian and parametric convolution to optimize random forests, this study addresses the inaccuracy of building energy consumption and carbon emission prediction in high-dimensional data processing in existing technologies. It achieves higher accuracy and more stable prediction results, making it suitable for building operation energy consumption and carbon emission management and control.

CN121525977APending Publication Date: 2026-02-13INST OF URBAN ENVIRONMENT CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511717690.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Existing methods for predicting building energy consumption and carbon emissions have limited accuracy when dealing with high-dimensional and variable data, and are unable to address complex and nonlinear issues related to building operation energy consumption and carbon emissions.

Method used

We employ a method that combines collaborative Bayesian and parametric convolution to optimize random forests. By using a Bayesian model to impart probabilistic robustness to the original features, parametric convolution is used to uncover deep relationships between factors to enhance features, and the random forest model is optimized to achieve high-precision regression prediction.

Benefits of technology

It improves the accuracy and stability of building operation energy consumption and carbon emission prediction, and can better handle high-dimensional and complex data, providing prediction results that are more in line with reality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121525977A_ABST
    Figure CN121525977A_ABST
Patent Text Reader

Abstract

The invention discloses a building operation energy consumption carbon emission prediction method and system based on cooperation of Bayesian and parameter convolution optimization random forest, and relates to the technical field of building carbon emission management, and the method comprises the steps: obtaining dependent variable data and independent variable data needed by building operation energy consumption carbon emission prediction; inputting the independent variable data into the trained naive Bayesian model to obtain a primary probability feature representation, performing feature enhancement through parameter convolution operation, and outputting an enhanced depth feature representation; the enhanced depth feature representation is used as input, hyper-parameters of the random forest model are adjusted and optimized, and an optimized random forest model is obtained; the optimized random forest model can effectively solve the problem of high-dimensional and complex data processing in the prediction process, and the prediction accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of building carbon emission management, in particular to a building operation energy consumption carbon emission prediction method and system based on a random forest optimized by Bayesian and parameter convolution. BACKGROUND

[0002] With the increasingly serious global climate change problem, building carbon emissions account for a significant proportion of global greenhouse gas emissions, and the prediction and optimization of building operation energy consumption carbon emissions have become an important topic in building energy saving research. The building energy consumption prediction method of related technologies, such as regression analysis and prediction based on physical models, is difficult to cope with complex, multi-dimensional and nonlinear building operation energy consumption carbon emission problems.

[0003] At present, as an integrated learning method, the random forest has achieved good results in the prediction field, but its accuracy is still limited when dealing with high-dimensional and variable data. In order to further improve the prediction accuracy, optimizing the random forest model has become the key to solving this problem.

[0004] Therefore, it is of great research significance and application value to propose an optimized random forest model for predicting building operation energy consumption carbon emissions. SUMMARY

[0005] The application aims to provide a building operation energy consumption carbon emission prediction method and system based on a random forest optimized by Bayesian and parameter convolution, which gives the original features probability robustness through the Bayesian model, and then uses parameter convolution to mine the deep relationship between factors for feature enhancement and correction, and finally uses the optimized random forest to complete high-precision regression prediction, so as to be widely applied in building operation energy consumption carbon emission management control.

[0006] To achieve the above-mentioned purpose, the application provides the following solutions: In a first aspect, the application provides a building operation energy consumption carbon emission prediction method based on a random forest optimized by Bayesian and parameter convolution, comprising: obtaining dependent variable data and independent variable data required for building operation energy consumption carbon emission prediction; wherein the dependent variable data is building operation energy consumption carbon emission, and the independent variable data is influence factor data of building operation energy consumption carbon emission, including building energy consumption population, regional per capita GDP, urban three-dimensional compactness index, refrigeration degree day, building age and latitude and longitude.

[0007] The independent variable data is input into the trained Naive Bayes model, and a primary probability feature representation is output; the Naive Bayes model is trained with the independent variable data to be trained as input and the categories generated by discretization of the dependent variable data as target; the primary probability feature is a K-dimensional probability vector, and the elements thereof represent the posterior probability of the sample belonging to each category.

[0008] The primary probability feature representation is enhanced by a parameter convolution operation, and a deep enhanced feature representation is output.

[0009] The deep enhanced feature representation is taken as input, and the corresponding dependent variable data is taken as output target, and the hyperparameters of the random forest model are optimized, and an optimized random forest model is obtained.

[0010] For the independent variable data to be predicted, the Naive Bayes model, the parameter convolution operation and the optimized random forest model are used to output the predicted value of the dependent variable data.

[0011] In a second aspect, the application provides a building operation energy consumption carbon emission prediction system based on the cooperation of Bayesian and parameter convolution optimization of random forest, comprising: a data acquisition module, a Bayesian module, a parameter convolution module, a random forest module and a prediction module.

[0012] The data acquisition module is used to acquire the dependent variable data and the independent variable data required for building operation energy consumption carbon emission prediction; wherein the dependent variable data is the building operation energy consumption carbon emission, and the independent variable data is the influence factor data of the building operation energy consumption carbon emission, and the influence factor data includes: building energy consumption population, regional per capita GDP, urban three-dimensional compact index, refrigeration degree day, building age and latitude and longitude.

[0013] The Bayesian module is used to input the independent variable data into the trained Naive Bayes model, and output a primary probability feature representation; the Naive Bayes model is trained with the independent variable data to be trained as input and the categories generated by discretization of the dependent variable data as target; the primary probability feature is a K-dimensional probability vector, and the elements thereof represent the posterior probability of the sample belonging to each category.

[0014] The parameter convolution module is used to enhance the primary probability feature representation by a parameter convolution operation, and output a deep enhanced feature representation.

[0015] The random forest module is used to take the deep enhanced feature representation as input, and take the corresponding dependent variable data as output target, and optimize the hyperparameters of the random forest model, and obtain an optimized random forest model.

[0016] The prediction module is used to output the predicted value of the dependent variable data for the independent variable data to be predicted via the Naive Bayes model, the parameter convolution operation and the optimized random forest model.

[0017] In a third aspect, the present application provides a computer device, comprising: a memory, a processor to store a computer program on the memory and executable on the processor, and the processor executes the computer program to implement the steps of the building operation energy consumption carbon emission prediction method of the collaborative Bayesian and parameter convolution optimization random forest.

[0018] In a fourth aspect, the present application provides a computer readable storage medium, having stored thereon a computer program, which, when executed by a processor, implements the steps of the building operation energy consumption carbon emission prediction method of the collaborative Bayesian and parameter convolution optimization random forest.

[0019] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the building operation energy consumption carbon emission prediction method of the collaborative Bayesian and parameter convolution optimization random forest.

[0020] According to the specific embodiments provided by the present application, the present application discloses the following technical effects: The present application provides a building operation energy consumption carbon emission prediction method and system of the collaborative Bayesian and parameter convolution optimization random forest. The independent variable data is input into the trained naive Bayesian model, and the primary probability feature representation is output. The primary probability feature representation provides a robust probability prior for subsequent analysis. The primary probability feature representation is enhanced through parameter convolution operation, and the enhanced deep feature representation is output to mine the local pattern and deep relationship between probability features and capture complex feature interaction. The key hyperparameters of the optimized random forest model are tuned to enable the model to fully learn the complex nonlinear relationship from the enhanced deep feature representation, while ensuring training efficiency and result stability. The model exhibits higher stability during data processing, making the prediction result more consistent with the actual situation, effectively solving the problem of high-dimensional and complex data processing in the prediction process. BRIEF DESCRIPTION OF DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0022] Figure 1 The application environment diagram of a building operation energy consumption carbon emission prediction method of the collaborative Bayesian and parameter convolution optimization random forest in an embodiment of the present application; Figure 2A flowchart of a building operation energy consumption carbon emission prediction method of a random forest optimized by cooperation of Bayesian and parameter convolution provided by an embodiment of the present application is provided. Figure 3 A structural diagram of a parameter convolution operation provided by an embodiment of the present application is provided. Figure 4 A functional module diagram of a building operation energy consumption carbon emission prediction system of a random forest optimized by cooperation of Bayesian and parameter convolution provided by an embodiment of the present application is provided. Figure 5 A structural diagram of a computer device provided by an embodiment of the present application is provided.

[0023] Reference signs: 1-data acquisition module; 2-Bayesian module; 3-parameter convolution module; 4-random forest module; 5-prediction module. DETAILED DESCRIPTION

[0024] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0025] The above purposes, features and advantages of the present application can be more obvious and easy to understand. The present application will be described in further detail below with reference to the drawings and specific embodiments.

[0026] The building operation energy consumption carbon emission prediction method of a random forest optimized by cooperation of Bayesian and parameter convolution provided by the embodiments of the present application can be applied to, for example Figure 1The application environment shown is illustrated. Terminal 101 communicates with server 102 via a network. A data storage system can store the data that server 102 needs to process. The data storage system can be set up independently, integrated into server 102, or placed in the cloud or on another server. Terminal 101 can send independent and dependent variable data of building operation energy consumption and carbon emission data to server 102. Server 102 receives the independent and dependent variable data of building operation energy consumption and carbon emission data, inputs the independent variable data into a trained Naive Bayes model, and outputs a primary probability feature representation. The Naive Bayes model is trained using the independent variable data to be trained as input and the categories generated by discretizing the dependent variable data as the target. The primary probability feature is a K-dimensional probability vector, whose elements represent the posterior probability of a sample belonging to each category. The primary probability feature representation is enhanced by parametric convolution operation, and the enhanced deep feature representation is output. Using the enhanced deep feature representation as input and the corresponding dependent variable data as the output target, the hyperparameters of the random forest model are tuned to obtain an optimized random forest model. For the independent variable data to be predicted, the predicted value of the dependent variable data is output through the Naive Bayes model, parametric convolution operation, and optimized random forest model. Server 102 can feed back the obtained prediction results to terminal 101. Furthermore, in some embodiments, the building operation energy consumption and carbon emission prediction method using collaborative Bayesian and parametric convolutional optimized random forest can also be implemented separately by server 102 or terminal 101. For example, terminal 101 can directly perform collaborative Bayesian and parametric convolutional optimized random forest prediction on the independent and dependent variable data of the building operation energy consumption and carbon emission data to be processed. Alternatively, server 102 can obtain the independent and dependent variable data of the building operation energy consumption and carbon emission data to be processed from the data storage system and perform collaborative Bayesian and parametric convolutional optimized random forest prediction on the dataset to be processed.

[0027] The terminal 101 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 102 can be implemented using a standalone server or a server cluster composed of multiple servers, or it can be a cloud server.

[0028] In one exemplary embodiment, such as Figure 2As shown, a method for predicting building operation energy consumption and carbon emissions using collaborative Bayesian and parametric convolutional optimized random forests is provided. This method is executed by computer equipment, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 Taking server 102 as an example, the explanation includes the following steps 201 to 205. Wherein: Step 201: Obtain the dependent and independent variable data required for predicting building operation energy consumption and carbon emissions; wherein, the dependent variable data is the building operation energy consumption and carbon emissions, and the independent variable data is the data of factors affecting the building operation energy consumption and carbon emissions, including: building energy-consuming population, regional per capita GDP, urban vertical compactness index, cooling degree-day, building year, and latitude and longitude.

[0029] Step 202: Input the independent variable data into the trained Naive Bayes model and output the primary probability feature representation; the Naive Bayes model is trained with the independent variable data to be trained as input and the categories generated by discretizing the dependent variable data as the target; the primary probability feature is a K-dimensional probability vector, whose elements represent the posterior probability of the sample belonging to each category.

[0030] Step 203: Enhance the primary probabilistic feature representation through parametric convolution operation, and output the enhanced deep feature representation.

[0031] Step 204: Using the enhanced deep feature representation as input and the corresponding dependent variable data as output target, the hyperparameters of the random forest model are tuned to obtain the optimized random forest model.

[0032] Step 205: For the independent variable data to be predicted, the predicted value of the dependent variable data is output through the Naive Bayes model, parametric convolution operation and optimized random forest model.

[0033] By implementing steps 201 to 205 above, the independent variable data is input into the trained Naive Bayes model, which outputs a primary probabilistic feature representation. This primary probabilistic feature representation provides a robust probabilistic prior for subsequent analysis. The primary probabilistic feature representation is then augmented through parametric convolution operations, outputting an augmented deep feature representation to uncover local patterns and deep relationships between probabilistic features, capturing complex feature interactions. By fine-tuning the key hyperparameters of the optimized random forest model, the model can fully learn complex nonlinear relationships from the augmented deep feature representation, while ensuring training efficiency and result stability. This model exhibits higher stability during data processing, making the prediction results more consistent with reality and effectively solving the problem of high-dimensional and complex data processing in the prediction process.

[0034] The building operation energy consumption and carbon emission prediction method proposed in this application, referred to as RFBPC (Bayesian and Parametric Convolutional Optimization of RandomForest), is based on the core idea of ​​constructing a cascaded generalized mapping function. It uses a Bayesian model to give the original features probabilistic robustness, then uses parametric convolution to mine the deep relationships between factors for feature enhancement and correction, and finally uses the optimized random forest to complete high-precision regression prediction.

[0035] The generalized framework of the method can be expressed as finding an optimal composite mapping function. This allows the building's energy consumption and carbon emissions index Y to be predicted with the highest accuracy from the independent variable X: .

[0036] in, This refers to the composition of functions. For Bayesian (pre-trained) mapping, For parametric convolution feature enhancement mapping, This is the optimized random forest regression mapping.

[0037] Specifically, the dataset consisting of building operation energy consumption and carbon emissions and its four major influencing factors is cleaned, missing values ​​are removed, and outliers are processed to remove noise, missing values, and outliers, thereby ensuring the quality of the data used for model training.

[0038] Optionally, the factors influencing the building's energy consumption include: building-related factors, representing the building's energy-consuming population; socio-economic factors, representing the region's per capita GDP; microclimate factors, representing the city's vertical compactness index; regional environmental factors, representing cooling degree days; and spatiotemporal covariate factors, representing the building's year and latitude / longitude.

[0039] Optionally, the data format for the building's operational energy consumption and carbon emissions is gridded data with a 1km resolution.

[0040] In one specific implementation, the method for obtaining gridded data with a resolution of 1km is as follows: Step 301: Calculate the carbon emissions from building operation energy consumption in the provincial-level administrative region.

[0041] Step 302: Using the national provincial building energy consumption panel data and the energy balance sheet, conduct statistical analysis of building energy consumption panel data. Based on the interaction between the data and the four major influencing factors of building operation energy consumption carbon emissions, construct the statistical calculation equations of provincial-scale building energy consumption carbon emission variables and provincial influencing factors using the partial least squares method.

[0042] The data collected on the four major factors influencing building operation energy consumption and carbon emissions are: the urban three-dimensional compactness index calculated based on the law of universal gravitation, the regional population (or the building energy-consuming population), the regional per capita GDP, and the cooling degree days.

[0043] Step 303: Substitute the city-level influencing factor values ​​into the constructed partial least squares equation to obtain the city-level building operation energy consumption and carbon emissions.

[0044] Step 304: Based on the Cubist model, construct a city-level model of building operation energy consumption and carbon emissions and city-level influencing factors, and substitute the influencing factor values ​​at the 1km grid scale into the constructed Cubist model to obtain the gridded building operation energy consumption and carbon emissions at the 1km resolution (or the kilometer grid building operation energy consumption and carbon emissions).

[0045] This application employs the above steps and, based on a downscaling model, obtains gridded building operation energy consumption and carbon emissions at a 1km resolution. By progressively refining the data from the provincial level to the municipal level and then to the 1km resolution gridded data, and through the integration of multi-scale data, comprehensive consideration of various influencing factors, and the application of advanced statistical and machine learning methods, it is possible to generate high-precision, high-resolution building operation energy consumption and carbon emissions data. This data can more accurately reflect the spatial distribution differences of building operation energy consumption and carbon emissions, providing high-precision data support for urban planning, policy making, and environmental assessment.

[0046] In another exemplary embodiment of this application, the calculation formula for the primary probability feature representation in step 202 is: .

[0047] in, For the sample The primary probabilistic feature representation is a K-dimensional probability vector that reflects the posterior probability of a sample belonging to each latent class. This is a Bayesian implementation of the mapping from the original feature space to the probability space. The discretization of the dependent variable data generates categories, providing a robust probabilistic prior P={P} for subsequent analysis. i}_i=1,2,...,N.

[0048] This application inputs the independent variable X into a pre-trained Naive Bayes model. Based on the feature conditional independence assumption, this model learns the relationship between features and categories (generated by discretization of the target variable). The joint probability distribution between the features. This step achieves the mapping from the original feature space to the probability space. .

[0049] In another exemplary embodiment of this application, the Naive Bayes model employs the Naive Bayes classifier from Scikit-learn.

[0050] In another exemplary embodiment of this application, in order to enhance the understanding of complex data patterns and uncover potential interaction relationships between features, step 203 above is replaced by steps 401 to 402: Step 401: Reshape the primary probabilistic feature representation into a two-dimensional feature map.

[0051] Step 402: The enhanced depth feature representation is obtained by sliding the convolution kernel across the two-dimensional feature map. The calculation formula for the enhanced depth feature representation is as follows: .

[0052] in, For the enhanced deep feature representation, For parametric convolution feature enhancement mapping, This represents the convolution operation, where σ is a non-linear activation function. It is a two-dimensional feature map. For convolution kernel, This is a bias term.

[0053] The primary probabilistic feature representation is input to the convolutional module with parameter P. First, the probability vector sequence is reshaped into a two-dimensional feature map. This module uses convolution kernels. Perform sliding calculations on it to achieve mapping. It aims to uncover local patterns and deep relationships between probabilistic features. Through convolution operations, it effectively overcomes the independence assumption of Naive Bayes, captures complex feature interactions, and corrects possible biases from the previous step.

[0054] like Figure 3 As shown, feature enhancement is performed through parametric convolution operations. The specific steps are as follows: Standardization: Standardize all features to ensure that different features are processed at the same scale. Convolution window selection: Select 1. 3. Convolution Window for Feature Convolution. Convolution Settings: Set the feature dimensions of the two convolution enhancement parameters. Input the variable feature parameters into the convolution window. Initialize random convolution kernels using a Lecun normal distribution. Convolution Operation: Use "same padding" to ensure the convolution result has the same size as the input features. Convolution Result Set: The features output after convolutional layer processing will become the input data for further modeling.

[0055] In the above parametric convolution operation, features are standardized to eliminate the influence of dimensions and ensure that different features are processed at the same scale. A one-dimensional convolution kernel is set, and the convolution window size is 1. 3. Set the output feature dimensions of the two convolutional layers to m1 and m2 (preferably, m1=48, m2=12); perform convolution operations on the input features using the "same padding" method to ensure that the convolutional result has the same size as the input features, keeping the feature dimensions unchanged. Concatenate the enhanced features after convolution with the standardized features to obtain the independent variable convolutional features, which are used as input data for further modeling and subsequent model training.

[0056] The core purpose of parametric convolution in this application is to capture potential data features in building operation energy consumption and carbon emission prediction by enhancing feature dimensionality, especially those features related to spatiotemporal variations. Convolution operations can effectively capture complex relationships between features.

[0057] During training, the system uses training data and parametric convolutions for training. After training, features are extracted from both the training and test data using parametric convolutions. The extracted features are typically the outputs of convolutional or fully connected layers, which serve as input to subsequent models (such as random forests). These features contain important patterns and information from the input data, improving the predictive performance of subsequent models.

[0058] By stacking multiple convolutional and pooling layers, parametric convolution can extract higher-level and more complex features. Finally, the extracted features are passed through a fully connected layer for classification or regression, and ultimately for prediction. The output of the fully connected layer is: .

[0059] in, h The feature vector extracted by the convolutional layer. W f and b f These are the weights and biases for the fully connected layer.

[0060] This application utilizes a Bayesian algorithm to achieve intelligent feature preprocessing and enhancement. This algorithm transforms the original independent variables into a primary feature representation with explicit probabilistic meaning, capturing the strength of the association between features and potential categories. Traditional methods typically rely on raw feature values ​​or manually designed statistics, which struggle to effectively characterize the inherent uncertainty of features. Compared to traditional methods, the Bayesian algorithm used in this application can automatically generate a probabilistic feature code without complex feature engineering. This allows subsequent convolutional neural networks and random forests to learn based on this more robust and information-rich representation, improving the entire pipeline's resistance to data noise and uncertainty.

[0061] This application utilizes parametric convolution for feature extraction. Parametric convolution can automatically learn and extract key features from raw data: the complex interactions of multi-dimensional features. These features help the model more accurately capture the driving forces of building energy consumption and carbon emissions, thereby improving prediction accuracy. Traditional methods often rely on expert knowledge or manual feature design, such as manually extracting relationships between variables like temperature and humidity from raw data, which often requires extensive domain knowledge and experience. Compared to traditional methods, this application uses parametric convolution, which can automatically learn complex features in raw data without manual intervention. This allows parametric convolution to uncover some subtle latent relationships and improve the efficiency of feature extraction.

[0062] In another exemplary embodiment of this application, the enhanced deep features H are used as input to train a parameter-optimized random forest model. The optimized random forest model integrates T decision trees. The mapping is achieved by aggregating the prediction results of all trees and performing a final regression, specifically as follows: .

[0063] in, This represents the final predicted value of the optimized random forest model for sample i. Let i be the enhanced depth feature representation corresponding to sample i. This is the optimized random forest regression mapping. Let be the prediction function of the t-th decision tree.

[0064] In another exemplary embodiment of this application, the hyperparameters of the random forest model include the number of trees, learning rate, random state, and number of parallel computing tasks.

[0065] The random forest model achieves optimal performance by tuning its key hyperparameters, including but not limited to: the number of trees (n_estimators), the learning rate, the random state, and the number of parallel computing tasks (n_jobs). This optimized configuration allows the model to fully learn complex nonlinear relationships from augmented features, while ensuring training efficiency and result stability.

[0066] During random forest model training, the training data (including extracted features and target variables) is used to fit the random forest model. After each training iteration, methods such as cross-validation are used to evaluate the model's performance. The model's performance is monitored based on the evaluation results (such as R², RMSE, etc.) to determine whether further iterations are needed. After each iteration, the model's performance metrics on the validation or test set are calculated to check its generalization ability. The performance of the current model is compared with that of previous models to confirm whether there has been an improvement.

[0067] Data stratification: When performing cross-validation, the dataset is first stratified according to the category label, that is, data of the same category are distributed to different training and validation sets in a certain proportion.

[0068] Data partitioning: The stratified dataset is divided into several subsets based on the number of folds set by the user (e.g., 50% or 100%). In each iteration, one subset is selected as the validation set, and the remaining subset is used as the training set.

[0069] Iterative validation: In each iteration, the model is trained and tested using a validation set, and the model's performance (such as accuracy, F1 score, etc.) is recorded. This hierarchical operation maintains the same proportion of each class in the dataset during each training and testing cycle.

[0070] The above process is the complete workflow of training, validating, and evaluating the performance of the random forest model. This application ensures consistent model performance across different data subsets and reduces bias caused by data partitioning through data stratification and cross-validation; improves model training efficiency through parallel training and optimized splitting; and checks the model's generalization ability through performance evaluation and comparative analysis.

[0071] In another exemplary embodiment of this application, the performance of the optimized random forest model is verified using the coefficient of determination and root mean square error.

[0072] Specifically, to confirm the effectiveness of the model, the performance metrics of the coefficient of determination (R²) and root mean square error (RMSE) were used to verify the model's performance metrics. The model was compared with the unoptimized random forest model and traditional models (such as XGBoost (eXtremeGradient Boosting) model) to verify the accuracy improvement of the co-optimized model in complex data environments.

[0073] Predictions were made using test set data on both the trained model (i.e., the optimized random forest model) and a trained comparison model (such as the unoptimized random forest model or XGBoost model). The prediction results for each model were obtained and used for performance evaluation. The following parameters are used to illustrate the relationship between predicted and true values: Specifically, a strategy combining 10-fold cross-validation and fixed partitioning is used to optimize the random forest model. Perform performance testing. Transfer the dataset. Randomly divided into training sets (85%) and test set (15%). In Ten-fold cross-validation was performed to evaluate the robustness of the model. Finally, using... Training the final model and in The coefficient of determination R² and root mean square error RMSE are calculated to quantify its generalization ability: R² is a metric used to measure the goodness of fit of a model, reflecting the proportion of change in the dependent variable explained by the independent variable. Its value ranges from [0, 1]. The closer R² is to 1, the better the model fits the data. The formula is: .

[0074] in, The actual value (or true value); The mean of the true values ​​in the test set; N is the predicted value. test This represents the number of samples in the test set.

[0075] RMSE is a commonly used metric for evaluating the prediction error of a regression model, measuring the deviation between the predicted value and the actual (or true) value. The calculation formula is: .

[0076] in, The actual value (or true value); This is a predicted value; n This represents the sample size.

[0077] The optimized random forest model that has passed performance verification Deployed in actual building energy management systems for use with new samples Predicting building operation energy consumption and carbon emissions: .

[0078] in, For the predicted value of the new sample, This is the final mapping of the composite mapping function. This is a new sample.

[0079] This application utilizes the collaborative optimization of Naive Bayes model, parametric convolution operation, and random forest algorithm to accurately model and predict high-dimensional and complex building energy consumption and carbon emission data. It aims to solve the problem of insufficient accuracy of existing building energy consumption and carbon emission prediction models when dealing with high-dimensional nonlinear data, and to provide a more accurate and efficient method for predicting building operation energy consumption and carbon emissions by collaborative Bayes and parametric convolution optimized random forest, so as to be widely used in building operation energy consumption and carbon emission management and control.

[0080] The following example illustrates this application using the overall implementation process of a building operation energy consumption and carbon emission prediction method based on a specific collaborative Bayesian and parametric convolutional optimized random forest approach.

[0081] Step 1: Calculate building operation energy consumption and carbon emissions data at five-year intervals from 1995 to 2020. The data format is 1km resolution gridded data, including dependent variable data (building operation energy consumption and carbon emissions) and multiple independent variable data (such as latitude and longitude, urban vertical compactness index, regional population (or building energy-consuming population), regional per capita GDP, and cooling degree days).

[0082] This embodiment selects City A, located in a hot summer and warm winter region, and cleans the data, including removing missing values ​​and outliers.

[0083] Step two involves Bayesian pre-training to generate probabilistic features. The independent variable data from the training set is input into the pre-trained Naive Bayes model. Based on the assumption of feature independence, this model outputs a probability distribution about the latent class for each sample, thus transforming the original independent variables into a primary probabilistic feature representation. This step injects probabilistic priors into the model, enhancing the robustness of the input features.

[0084] Step three involves inputting the initial probabilistic feature representations obtained in step two into a parametric convolution for deep feature extraction. This network further captures local patterns and deep interactions between probabilistic features through one-dimensional convolutional kernels and operations such as "identical padding," outputting more expressive independent variable convolutional features.

[0085] Step four: Based on the features extracted in step three, construct the final random forest model optimized by collaborative Bayesian and parameter convolution. Divide the data into training and testing sets (85% for training and 15% for testing). Use 10-fold cross-validation to record the optimal parameter combination for each iteration to obtain the optimal solution.

[0086] Step 5: Use the test set data to predict the trained model, calculate the R² value and RMSE of the predicted values ​​compared to the true values ​​to evaluate the model's performance. Compare the model with traditional unoptimized random forest and XGBoost models to verify the advantages of this method and further validate the model's applicability. As shown in Table 1, the optimized random forest model shows improvements in R² and RMSE compared to the unoptimized random forest and XGBoost models. The optimized random forest model has an R² of 0.92, which is better than the XGBoost model (0.86) and the unoptimized random forest model (0.88), and an RMSE of 1617 kg, which is better than the XGBoost model (2083 kg) and the unoptimized random forest model (1900 kg). The results show that the optimized random forest model of this application has higher accuracy in predicting building energy consumption and carbon emissions compared to traditional models.

[0087] Table 1 Performance metrics of each model

[0088] This application's embodiments utilize an optimized random forest model to accurately predict building energy consumption and carbon emissions, providing effective support for building energy conservation and carbon emission management in practical applications. The optimized random forest model, through fine-tuning of parameters and optimization algorithms, can more accurately capture the intrinsic relationships and dynamic changes between variables when processing complex, multi-dimensional environmental variable data, providing a precise analytical method for research in urban ecology and sustainable development.

[0089] Based on the same inventive concept, this application also provides a building operation energy consumption and carbon emission prediction system using the cooperative Bayesian and parametric convolution optimized random forest method described above. The solution provided by this system is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more embodiments of the building operation energy consumption and carbon emission prediction system using the cooperative Bayesian and parametric convolution optimized random forest method described below can be found in the limitations of the building operation energy consumption and carbon emission prediction method using the cooperative Bayesian and parametric convolution optimized random forest method described above, and will not be repeated here.

[0090] In one exemplary embodiment, such as Figure 4 As shown, a building operation energy consumption and carbon emission prediction system with collaborative Bayesian and parametric convolution optimized random forest is provided, including: data acquisition module 1, Bayesian module 2, parametric convolution module 3, random forest module 4, and prediction module 5.

[0091] The data acquisition module 1 is used to acquire the dependent variable data and independent variable data required for predicting building operation energy consumption and carbon emissions; wherein, the dependent variable data is the building operation energy consumption and carbon emissions, and the independent variable data is the data of factors affecting the building operation energy consumption and carbon emissions, including: building energy-consuming population, regional per capita GDP, urban vertical compactness index, cooling degree-day, building year, and latitude and longitude.

[0092] Bayes module 2 is used to input the independent variable data into the trained Naive Bayes model and output the primary probability feature representation; the Naive Bayes model is trained with the independent variable data to be trained as input and the categories generated by discretizing the dependent variable data as the target; the primary probability feature is a K-dimensional probability vector, whose elements represent the posterior probability of the sample belonging to each category.

[0093] Parametric convolution module 3 is used to enhance the primary probabilistic feature representation through parametric convolution operations, outputting an enhanced deep feature representation. Parametric convolution module 3 automatically learns key features from the data and generates feature vectors, thereby enhancing the model's ability to understand complex data patterns.

[0094] The Random Forest module 4 is used to fine-tune the hyperparameters of the random forest model, taking the enhanced deep feature representation as input and the corresponding dependent variable data as the output target, resulting in an optimized random forest model. Furthermore, model performance is improved through cross-validation and hyperparameter optimization. The optimized random forest model is used to make predictions on the test set to obtain prediction results and verify model performance. The performance of the trained model is evaluated, optimized, and its actual predictive ability is quantified using key performance indicators such as R² (coefficient of determination) and root mean square error (RMSE) to quantify the model's predictive ability on the test dataset. The optimized random forest model is compared with other models (such as the unoptimized random forest model and the XGBoost model) to analyze its advantages in predicting building energy consumption and carbon emissions.

[0095] Prediction module 5 is used to output the predicted value of the dependent variable data through a Naive Bayes model, parametric convolution operation and optimized random forest model for the independent variable data to be predicted.

[0096] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 5 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data for predicting building energy consumption and carbon emissions using cooperative Bayesian and parametric convolutional optimized random forest methods. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for predicting building energy consumption and carbon emissions using cooperative Bayesian and parametric convolutional optimized random forest methods.

[0097] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0098] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0099] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0100] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0101] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0102] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0103] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0104] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0105] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for predicting building operation energy consumption and carbon emissions using collaborative Bayesian and parametric convolutional optimized random forests, characterized in that, include: Obtain the dependent and independent variable data required for predicting building operation energy consumption and carbon emissions; wherein, the dependent variable data is the building operation energy consumption and carbon emissions, and the independent variable data is the data of factors affecting the building operation energy consumption and carbon emissions, including: building energy-consuming population, regional per capita GDP, urban vertical compactness index, cooling degree-day, building year, and latitude and longitude. The independent variable data is input into the trained Naive Bayes model, and the output is a primary probability feature representation; the Naive Bayes model is trained with the independent variable data to be trained as input and the categories generated by discretizing the dependent variable data as the target; the primary probability feature is a K-dimensional probability vector, and its elements represent the posterior probability of the sample belonging to each category; The primary probabilistic feature representation is enhanced by parametric convolution, and the enhanced deep feature representation is output. Using the enhanced deep feature representation as input and the corresponding dependent variable data as the output target, the hyperparameters of the random forest model are tuned to obtain the optimized random forest model. For the independent variable data to be predicted, the predicted value of the dependent variable data is output through the Naive Bayes model, parametric convolution operation and optimized random forest model.

2. The building operation energy consumption and carbon emission prediction method using collaborative Bayesian and parametric convolutional optimized random forest as described in claim 1, characterized in that, The calculation formula for the primary probability feature representation is as follows: ; in, For the sample The primary probability features are represented as follows: This is a Bayesian implementation of the mapping from the original feature space to the probability space. Let P be the category generated by discretizing the dependent variable data, and P be the probability prior.

3. The building operation energy consumption and carbon emission prediction method using collaborative Bayesian and parametric convolutional optimized random forest as described in claim 1, characterized in that, The primary probabilistic feature representation is enhanced through parametric convolution, outputting an enhanced deep feature representation, specifically including: The primary probabilistic feature representation is reshaped into a two-dimensional feature map; The enhanced depth feature representation is obtained by sliding the convolution kernel across the two-dimensional feature map. The calculation formula for the enhanced depth feature representation is as follows: ; in, For the enhanced deep feature representation, For parametric convolution feature enhancement mapping, This represents the convolution operation, where σ is a non-linear activation function. It is a two-dimensional feature map. For convolution kernel, This is a bias term.

4. The building operation energy consumption and carbon emission prediction method using collaborative Bayesian and parametric convolutional optimized random forest as described in claim 1, characterized in that, The optimized random forest model integrates T decision trees. The mapping is achieved by aggregating the prediction results of all trees and performing a final regression, specifically as follows: ; in, This represents the final predicted value of the optimized random forest model for sample i. Let i be the enhanced depth feature representation corresponding to sample i. This is the optimized random forest regression mapping. Let be the prediction function of the t-th decision tree.

5. The building operation energy consumption and carbon emission prediction method using collaborative Bayesian and parametric convolutional optimized random forest as described in claim 1, characterized in that, The hyperparameters of the random forest model include the number of trees, learning rate, random states, and number of parallel computing tasks.

6. The building operation energy consumption and carbon emission prediction method using collaborative Bayesian and parametric convolutional optimized random forest as described in claim 1, characterized in that, The performance of the optimized random forest model was verified using the coefficient of determination and root mean square error.

7. A building operation energy consumption and carbon emission prediction system using collaborative Bayesian and parametric convolutional optimized random forest, characterized in that, include: The data acquisition module is used to acquire dependent and independent variable data required for predicting building operation energy consumption and carbon emissions. The dependent variable data is the building operation energy consumption and carbon emissions, and the independent variable data is the data of factors affecting the building operation energy consumption and carbon emissions. The data of factors affecting the building energy consumption and carbon emissions includes: building energy-consuming population, regional per capita GDP, urban vertical compactness index, cooling degree-day, building year, and latitude and longitude. The Bayes module is used to input independent variable data into a trained Naive Bayes model and output a primary probability feature representation. The Naive Bayes model is trained with the independent variable data to be trained as input and the categories generated by discretizing the dependent variable data as the target. The primary probability feature is a K-dimensional probability vector, whose elements represent the posterior probability of a sample belonging to each category. The parametric convolution module is used to enhance the primary probabilistic feature representation through parametric convolution operations and output the enhanced deep feature representation. The Random Forest module is used to fine-tune the hyperparameters of the Random Forest model by taking the enhanced deep feature representation as input and the corresponding dependent variable data as the output target, so as to obtain the optimized Random Forest model. The prediction module is used to output the predicted value of the dependent variable data from the independent variable data to be predicted through a Naive Bayes model, parametric convolution operation, and an optimized random forest model.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the building operation energy consumption and carbon emission prediction method using collaborative Bayesian and parametric convolutional optimized random forest as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the building operation energy consumption and carbon emission prediction method using collaborative Bayesian and parametric convolutional optimized random forest as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the building operation energy consumption and carbon emission prediction method using collaborative Bayesian and parametric convolutional optimized random forest as described in any one of claims 1-6.