Building industry carbon emission prediction method and system based on random forest algorithm

By combining random forest and LSTM models, the traditional method's shortcomings in capturing nonlinear features and timing dependence are solved, and the accuracy and adaptability of carbon emission prediction in the construction industry are improved, and more reliable prediction tools are provided.

CN119250845AActive Publication Date: 2025-01-03XIHUA UNIV +1

Patent Information

Application Number
CN202411757914.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-01-03
Estimated Expiration
2044-12-03

Smart Images

  • Figure CN119250845A_ABST
    Figure CN119250845A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of building industry carbon emission prediction, in particular to a building industry carbon emission prediction method and system based on a random forest algorithm, and the method comprises the steps: obtaining building industry carbon emission historical data; based on a random forest regression model, carrying out influence factor importance degree sorting on historical data of carbon emission in the building industry, extracting a characteristic data set of carbon emission correlation, and dividing the characteristic data set into a training set and a test set; inputting the training set into a preset LSTM model for calculation, evaluating an LSTM prediction result through the test set, and outputting the trained LSTM model; and combining the random forest regression model with the completely trained LSTM model, and completing carbon emission prediction of the existing building through the combined model. The invention aims to improve the accuracy and reliability of building industry carbon emission prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of carbon emission prediction in the construction industry, and in particular to a method and system for predicting carbon emission in the construction industry based on a random forest algorithm. Background Art

[0002] Carbon emission prediction in the construction industry is a key link in achieving the goal of carbon neutrality. With the rapid development of the construction industry, its carbon emissions show complex nonlinear characteristics and time series dependence. Accurately predicting carbon emissions in the construction industry is crucial to formulating effective emission reduction strategies. At present, traditional carbon emission prediction methods in the construction industry have multiple limitations. First, simple models such as linear regression are difficult to capture the nonlinear characteristics of carbon emission data, resulting in large deviations in the prediction results. Secondly, although time series analysis methods (such as ARIMA) take into account time series characteristics, they have limited modeling capabilities for long-term dependencies. In addition, traditional carbon emission prediction methods in the construction industry are usually difficult to adapt to the dynamic changes in carbon emission data in the construction industry, and cannot adjust the prediction strategy in time, resulting in poor long-term prediction results. Based on this, in order to improve the accuracy and reliability of carbon emission prediction in the construction industry, we provide a hybrid model method that combines random forest regression and long short-term memory network. Summary of the invention

[0003] The purpose of the present invention is to provide a method and system for predicting carbon emissions in the construction industry based on a random forest algorithm. The method combines the advantages of random forest and LSTM to overcome the limitations of traditional methods. Random forest effectively performs feature selection and importance sorting, improving the interpretability and prediction efficiency of the model; the LSTM model makes full use of historical data, captures long-term dependencies, and improves the accuracy of time series prediction. The combination of the two not only improves the prediction accuracy, but also enhances the robustness and adaptability of the model, providing a reliable tool for the accurate prediction and effective management of carbon emissions in the construction industry.

[0004] The present invention is achieved through the following technical solutions: A method for predicting carbon emissions in the construction industry based on a random forest algorithm, the method comprising the following steps: Obtain historical data on carbon emissions from the construction industry; Based on the random forest regression model, the importance of influencing factors of historical data on carbon emissions in the construction industry is ranked, and the feature data set related to carbon emissions is extracted and divided into training set and test set; The training set is input into the preset LSTM model for calculation, and the LSTM prediction results are evaluated through the test set, and the trained LSTM model is output; The random forest regression model is combined with the fully trained LSTM model to complete the carbon emission prediction of existing buildings through the combined model.

[0005] Optionally, the acquiring of historical data on carbon emissions from the construction industry further includes preprocessing, and the preprocessing specifically includes: normalizing the historical data on carbon emissions from the construction industry.

[0006] Optionally, the random forest regression model specifically takes maximizing carbon emission reduction potential as the optimization goal, and its calculation formula is:

[0007] in, is the objective function, is the total time period, is the number of building types, , , and are the weight coefficients of the i-th type of building, is the time attenuation coefficient, is the cumulative carbon emission effect coefficient, is the time variable, is the index of building type, is the integration variable, For the Class building in The construction area at the moment, For the Class building in The total output value of the construction industry at that time, For the Class building in The level of construction industry development at the moment, For the Class building in The number of employees at any given time, For the Class building in Energy intensity at the moment. Optionally, the constraints of the random forest regression model are:

[0008]

[0009]

[0010]

[0011]

[0012]

[0013]

[0014] in, , Respectively The minimum and maximum construction areas of the buildings of this type, , Respectively The minimum and maximum values ​​of the total output value of the building type, , Respectively The minimum and maximum values ​​of the building development level of the class, , Respectively The minimum and maximum number of people employed in this type of construction, , Respectively Minimum and maximum values ​​of energy intensity of buildings of this type, is the growth rate parameter, is the midpoint parameter, is the exponential growth rate, For the Energy intensity growth index for buildings of this type, , and are the resource weights of construction area, total output value and number of employees, is the total available resources.

[0015] Optionally, the LSTM model has a structural composition calculation formula as follows:

[0016]

[0017]

[0018]

[0019]

[0020]

[0021] in, is the sigmoid activation function, , and are the outputs of the forget gate, input gate, and output gate respectively. , , and are the weight matrices of each gate, , , and are the biases of each gate, for The hidden state of the moment, for Input at the moment, for The cell state at a moment in time, is the candidate memory cell state.

[0022] Optionally, during the training process of the LSTM model, the LSTM model is optimized by using the Adam optimization algorithm, and the specific process is as follows: Randomly initialize the weight matrix , , , and bias , , , ; For each time step , the LSTM model performs forward propagation; Solve the error between the output value and the true value of the LSTM model based on the loss function; Calculate the gradient of the loss function with respect to each parameter; Calculate the first-order moment estimate and second-order moment estimate of the LSTM model gradient; Perform bias correction on the first-order moment estimate and second-order moment estimate of the LSTM model gradient; Iteratively update the parameters of the LSTM model; Repeat the above steps until the maximum number of iterations is reached, and then output the trained LSTM model.

[0023] Optionally, the loss function adopts a cross entropy loss function.

[0024] The construction industry carbon emission prediction system based on random forest algorithm includes: Data acquisition module, which obtains historical data on carbon emissions in the construction industry; The feature extraction module ranks the importance of factors affecting the historical data of carbon emissions in the construction industry based on the random forest regression model, extracts feature data sets related to carbon emissions, and divides them into training sets and test sets; The model training module inputs the training set into the preset LSTM model for calculation, evaluates the LSTM prediction results through the test set, and outputs the trained LSTM model; The model combination module combines the random forest regression model with the fully trained LSTM model, inputs the relevant parameters of the existing buildings into the combined model calculation, and completes the carbon emission prediction of the existing buildings.

[0025] The technical solution of the present invention has at least the following advantages and beneficial effects: This invention combines the advantages of random forest and LSTM to overcome the limitations of traditional methods. Random forest effectively performs feature selection and importance sorting, improving the model's interpretability and prediction efficiency; the LSTM model makes full use of historical data, captures long-term dependencies, and improves the accuracy of time series prediction. The combination of the two not only improves the prediction accuracy, but also enhances the robustness and adaptability of the model, providing a reliable tool for the accurate prediction and effective management of carbon emissions in the construction industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A schematic diagram of the flow chart of the method for predicting carbon emissions in the construction industry based on the random forest algorithm provided by the present invention. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0028] like Figure 1 As shown, the present invention provides one embodiment: a method for predicting carbon emissions in the construction industry based on a random forest algorithm, the method comprising the following steps: Obtain historical data on carbon emissions from the construction industry; Based on the random forest regression model, the importance of influencing factors of historical data on carbon emissions in the construction industry is ranked, and the feature data set related to carbon emissions is extracted and divided into training set and test set; The training set is input into the preset LSTM model for calculation, and the LSTM prediction results are evaluated through the test set, and the trained LSTM model is output; The random forest regression model is combined with the fully trained LSTM model to complete the carbon emission prediction of existing buildings through the combined model.

[0029] In this embodiment, the acquisition of the historical data of carbon emissions from the construction industry further includes preprocessing, and the preprocessing specifically includes: normalizing the historical data of carbon emissions from the construction industry.

[0030] In practice, this embodiment uses Min-Max for normalization to scale the eigenvalues ​​to between 0 and 1: ,in, and are the minimum and maximum values ​​of the feature column respectively. is the original data.

[0031] Specifically, the random forest model consists of multiple decision trees, and the features used in the training of each decision tree are randomly selected: ,in, It is for The predicted value of samples, is the prediction function of the b-th decision tree, is the number of decision trees. Grid search is used to find the best model parameters. For each parameter combination, cross validation is used to evaluate the model performance: ,in, represents the model parameters, M is the number of samples, MSE is the mean square error, is the true value, is the predicted value. Feature importance is assessed by observing the impact of each feature on the model’s predictive performance: ,in, represents the importance of the 𝑗th feature in the 𝑏th decision tree. Feature importance can be visualized using a bar chart, where the length of each bar represents the importance of the feature: ,in, is the bar chart representation of the j-th feature. In this embodiment, the random forest regression model specifically takes maximizing the carbon emission reduction potential as the optimization goal. In the objective function of maximizing the carbon emission reduction potential, multiple factors need to be considered, including construction area, total output value of the construction industry, level of development of the construction industry, number of employees, energy intensity, etc. The calculation formula is:

[0032] in, is the objective function, is the total time period, is the number of building types, , , and are the weight coefficients of the i-th type of building, is the time attenuation coefficient, is the cumulative carbon emission effect coefficient, is the time variable, is the index of the building type, is the integration variable, For the Class Building The construction area at the moment, For the Class Building The total output value of the construction industry at that time, For the Class building in The level of construction industry development at the moment, For the Class building in The number of employees at any given time, For the Class building in Energy intensity at the moment. The constraints are:

[0033]

[0034]

[0035]

[0036]

[0037]

[0038]

[0039] in, , Respectively The minimum and maximum construction areas of the buildings of this type, , Respectively The minimum and maximum values ​​of the total output value of the building type, , Respectively The minimum and maximum values ​​of the building development level of the class, , Respectively The minimum and maximum number of people employed in this type of construction, , Respectively Minimum and maximum values ​​of energy intensity of buildings of this type, is the growth rate parameter, is the midpoint parameter, is the exponential growth rate, For the Energy intensity growth index for buildings of this type, , and are the resource weights of construction area, total output value and number of employees, is the total available resources.

[0040] In the specific application of this embodiment, the LSTM model has a structure consisting of a forget gate, an input gate, an update cell state, an output gate, and a hidden state, and its calculation formulas are:

[0041]

[0042]

[0043]

[0044]

[0045]

[0046] in, is the sigmoid activation function, , and are the outputs of the forget gate, input gate, and output gate respectively. , , and are the weight matrices of each gate, , , and are the biases of each gate, for The hidden state of the moment, for Input at the moment, for The cell state at a moment in time, is the candidate memory cell state.

[0047] During the training process of the LSTM model, the LSTM model is optimized using the Adam optimization algorithm. The specific process is as follows: Randomly initialize the weight matrix , , , and bias , , , ; For each time step , the LSTM model performs forward propagation according to the above formula; Solve the error between the output value and the true value of the LSTM model based on the loss function; Calculate the gradient of the loss function with respect to each parameter; Calculate the first-order moment estimate and second-order moment estimate of the LSTM model gradient;

[0048]

[0049] Perform bias correction on the first-order moment estimate and second-order moment estimate of the LSTM model gradient;

[0050]

[0051] Iteratively update the parameters of the LSTM model;

[0052] Repeat the above steps until the maximum number of iterations is reached, and then output the trained LSTM model.

[0053] in, is the gradient at time t, , are the first-order moment estimate and the second-order moment estimate, respectively. , are the first-order moment estimate and the second-order moment estimate after bias correction, respectively. , are the hyperparameters, is the learning rate, is a numerical stability constant, is the element-wise square of the gradient, used to estimate the second moment of the gradient.

[0054] In implementation, the loss function adopts a cross entropy loss function.

[0055] Based on the above embodiment, this embodiment can also be applied to the following construction industry carbon emission prediction system based on random forest algorithm, which includes: Data acquisition module, which obtains historical data on carbon emissions in the construction industry; The feature extraction module ranks the importance of factors affecting the historical data of carbon emissions in the construction industry based on the random forest regression model, extracts feature data sets related to carbon emissions, and divides them into training sets and test sets; The model training module inputs the training set into the preset LSTM model for calculation, evaluates the LSTM prediction results through the test set, and outputs the trained LSTM model; The model combination module combines the random forest regression model with the fully trained LSTM model, inputs the relevant parameters of the existing buildings into the combined model calculation, and completes the carbon emission prediction of the existing buildings.

[0056] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for predicting carbon emissions in the construction industry based on a random forest algorithm, characterized in that: The steps of the method include: Obtain historical data on carbon emissions from the construction industry; Based on the random forest regression model, the importance of influencing factors of historical data on carbon emissions in the construction industry is ranked, and the feature data set related to carbon emissions is extracted and divided into training set and test set; The training set is input into the preset LSTM model for calculation, and the LSTM prediction results are evaluated through the test set, and the trained LSTM model is output; The random forest regression model is combined with the fully trained LSTM model to complete the carbon emission prediction of existing buildings through the combined model.

2. The method for predicting carbon emissions in the construction industry based on the random forest algorithm according to claim 1 is characterized in that: The method of obtaining the historical data of carbon emissions from the construction industry also includes preprocessing, and the preprocessing specifically includes: normalizing the historical data of carbon emissions from the construction industry.

3. The method for predicting carbon emissions in the construction industry based on the random forest algorithm according to claim 1 is characterized in that: The random forest regression model specifically takes maximizing carbon emission reduction potential as the optimization goal, and its calculation formula is: in, is the objective function, is the total time period, is the number of building types, , , and are the weight coefficients of the i-th type of building, is the time attenuation coefficient, is the cumulative carbon emission effect coefficient, is the time variable, is the index of building type, is the integration variable, For the Class Building The construction area at the moment, For the Class Building The total output value of the construction industry at that time, For the Class Building The level of construction industry development at the moment, For the Class Building The number of employees at any given time, For the Class Building Energy intensity at the moment.

4. The method for predicting carbon emissions in the construction industry based on the random forest algorithm according to claim 3 is characterized in that: The constraints of the random forest regression model are: in, , Respectively The minimum and maximum construction areas of the buildings of this type, , Respectively The minimum and maximum values ​​of the total output value of the building type, , Respectively The minimum and maximum values ​​of the building development level of the class, , Respectively The minimum and maximum number of people employed in this type of construction, , Respectively Minimum and maximum values ​​of energy intensity of buildings of this type, is the growth rate parameter, is the midpoint parameter, is the exponential growth rate, For the Energy intensity growth index for buildings of this type, , and are the resource weights of construction area, total output value and number of employees, is the total available resources.

5. The method for predicting carbon emissions in the construction industry based on the random forest algorithm according to claim 4 is characterized in that: The structural composition calculation formula of the LSTM model is as follows: in, is the sigmoid activation function, , and are the outputs of the forget gate, input gate, and output gate respectively. , , and are the weight matrices of each gate, , , and are the biases of each gate, for The hidden state of the moment, for Input at the moment, for The cell state at a moment in time, is the candidate memory cell state.

6. The method for predicting carbon emissions in the construction industry based on the random forest algorithm according to claim 5 is characterized in that: During the training process of the LSTM model, the LSTM model is optimized by the Adam optimization algorithm, and the specific process is as follows: Randomly initialize the weight matrix , , , and bias , , , ; For each time step , the LSTM model performs forward propagation; Solve the error between the output value and the true value of the LSTM model based on the loss function; Calculate the gradient of the loss function with respect to each parameter; Calculate the first-order moment estimate and second-order moment estimate of the LSTM model gradient; Perform bias correction on the first-order moment estimate and second-order moment estimate of the LSTM model gradient; Iteratively update the parameters of the LSTM model; Repeat the above steps until the maximum number of iterations is reached, and then output the trained LSTM model.

7. The method for predicting carbon emissions in the construction industry based on the random forest algorithm according to claim 6 is characterized in that: The loss function adopts the cross entropy loss function.

8. The construction industry carbon emission prediction system based on random forest algorithm is characterized by: include: Data acquisition module, which obtains historical data on carbon emissions in the construction industry; The feature extraction module ranks the importance of factors affecting the historical data of carbon emissions in the construction industry based on the random forest regression model, extracts feature data sets related to carbon emissions, and divides them into training sets and test sets; The model training module inputs the training set into the preset LSTM model for calculation, evaluates the LSTM prediction results through the test set, and outputs the trained LSTM model; The model combination module combines the random forest regression model with the fully trained LSTM model, inputs the relevant parameters of the existing buildings into the combined model calculation, and completes the carbon emission prediction of the existing buildings.

Citation Information

Patent Citations

  • Building carbon emission dynamic optimization management and control system and method based on machine learning

    CN115526112A

  • RF-meta model-based agricultural mulch film degradation period prediction method and device

    WO2024234733A1

Cited By

  • Carbon emission prediction method and device in building operation stage, medium and equipment

    CN120013069A

  • Method for predicting carbon emission of transportation carrier in high-altitude area

    CN120031211A

  • Construction process carbon emission prediction method for intelligent manufacturing

    CN120542609A

  • Construction process carbon emission prediction method for intelligent manufacturing

    CN120542609B

  • Forestry disease and pest risk prediction method and system based on big data

    CN121352501A