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

By combining a hybrid model of random forests and LSTM, the problem that traditional methods are difficult to capture the nonlinear characteristics and timing dependence of carbon emission data in the construction industry is solved, and higher prediction accuracy and model adaptability are achieved.

CN119250845BActive Publication Date: 2025-03-25XIHUA UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional carbon emission prediction methods in the construction industry are difficult to capture the nonlinear characteristics and timing dependence of carbon emission data, resulting in large deviations in the prediction results and difficult to adapt to the dynamic changes of the data.

Method used

A mixed model based on random forest algorithm and long and short-term memory network (LSTM) is used. Random forests are used for feature selection and importance sorting, while LSTM is used to capture long-term dependencies, improving prediction accuracy and model robustness and adaptability.

Benefits of technology

It improves the accuracy and reliability of carbon emission forecasts in the construction industry, enhances the interpretability and prediction efficiency of the model, and can better adapt to the dynamic changes of the data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250845B_ABST
    Figure CN119250845B_ABST
Patent Text Reader

Abstract

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, wherein the steps of the method include: obtaining historical data of carbon emission in the construction industry; sorting the importance of influencing factors of the historical data of carbon emission in the construction industry based on a random forest regression model, extracting a feature data set of carbon emission correlation, and dividing it into a training set and a test set; inputting the training set into a preset LSTM model for calculation, and evaluating the LSTM prediction result through a test set, and outputting a trained LSTM model; combining the random forest regression model with the fully trained LSTM model, and completing the carbon emission prediction of existing buildings through the combined model. The present invention aims to improve the accuracy and reliability of carbon emission prediction in the construction industry.
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:

[0005] A method for predicting carbon emissions in the construction industry based on a random forest algorithm, the method comprising the following steps:

[0006] Obtain historical data on carbon emissions from the construction industry;

[0007] 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;

[0008] 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;

[0009] 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.

[0010] 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.

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

[0012]

[0013] 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 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.

[0014] Optionally, the constraints of the random forest regression model are:

[0015]

[0016]

[0017]

[0018]

[0019]

[0020]

[0021]

[0022] 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.

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

[0024]

[0025]

[0026]

[0027]

[0028]

[0029]

[0030] 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.

[0031] 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:

[0032] Randomly initialize the weight matrix , , , and bias , , , ;

[0033] For each time step , the LSTM model performs forward propagation;

[0034] Solve the error between the output value and the true value of the LSTM model based on the loss function;

[0035] Calculate the gradient of the loss function with respect to each parameter;

[0036] Calculate the first-order moment estimate and second-order moment estimate of the LSTM model gradient;

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

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

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

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

[0041] The construction industry carbon emission prediction system based on random forest algorithm includes:

[0042] Data acquisition module, which obtains historical data on carbon emissions in the construction industry;

[0043] 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;

[0044] 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;

[0045] 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.

[0046] The technical solution of the present invention has at least the following advantages and beneficial effects:

[0047] 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 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. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] 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

[0049] 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.

[0050] 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:

[0051] Obtain historical data on carbon emissions from the construction industry;

[0052] 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;

[0053] 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;

[0054] 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.

[0055] 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.

[0056] 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.

[0057] 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.

[0058] 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:

[0059]

[0060] 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.

[0061] The constraints are:

[0062]

[0063]

[0064]

[0065]

[0066]

[0067]

[0068]

[0069] 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.

[0070] 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:

[0071]

[0072]

[0073]

[0074]

[0075]

[0076]

[0077] 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.

[0078] During the training process of the LSTM model, the LSTM model is optimized using the Adam optimization algorithm. The specific process is as follows:

[0079] Randomly initialize the weight matrix , , , and bias , , , ;

[0080] For each time step , the LSTM model performs forward propagation according to the above formula;

[0081] Solve the error between the output value and the true value of the LSTM model based on the loss function;

[0082] Calculate the gradient of the loss function with respect to each parameter;

[0083] Calculate the first-order moment estimate and second-order moment estimate of the LSTM model gradient;

[0084]

[0085]

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

[0087]

[0088]

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

[0090]

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

[0092] 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.

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

[0094] 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:

[0095] Data acquisition module, which obtains historical data on carbon emissions in the construction industry;

[0096] 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;

[0097] 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;

[0098] 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.

[0099] 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; Combine the random forest regression model with the fully trained LSTM model to complete the carbon emission prediction of existing buildings through the combined model; 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 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 The number of employees at any given time, For the Class Building Energy intensity at the moment; 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; 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.

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: 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.

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 loss function adopts the cross entropy loss function.

5. 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; 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; 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; 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.

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