Construction method of carbon emission prediction model based on artificial intelligence
By employing a two-layer optimization fusion strategy combining sliding window segmentation and LSTM-attention model with causal tree model, the problems of multi-source data fusion and the impact of extreme events in carbon emission prediction are solved, improving prediction accuracy and stability, quantifying the causal relationship between process parameters and carbon emissions, and providing decision support for enterprises to optimize production.
Patent Information
- Application Number
- CN202510349183.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-03-24
AI Technical Summary
Existing carbon emission prediction and management methods face challenges such as difficulties in integrating heterogeneous multi-source data, inconsistent carbon footprint certification standards, the inability of black-box models to explain the impact of extreme climate events, and the accumulation of prediction errors over long time series.
A sliding window is used to segment time-series data, and derived features are calculated. A carbon emission prediction model is constructed by combining an LSTM-attention model and a causal tree model through a two-layer optimization fusion strategy. Data is collected by industrial IoT sensors, and data preprocessing and noise optimization are performed to construct an LSTM-attention model and a causal tree model. The marginal effect of process parameters on carbon emissions is quantified by variational inference and Shapley value decomposition.
It improves the model's robustness and generalization ability to noisy data, enhances its adaptability to abnormal scenarios, achieves synergistic optimization of the predicted trend and the impact of process parameters, and provides interpretable emission reduction strategy support.
Smart Images

Figure CN120297470B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the field of greenhouse gas prediction, and in particular to a construction method of a carbon emission prediction model based on artificial intelligence. BACKGROUND
[0002] In recent years, artificial intelligence and big data technology have deeply empowered the field of carbon emission prediction and management, forming a multi-level technical system. In terms of prediction models, the gray prediction method is constructed through accumulation generation and gray equation, which preliminarily realizes the qualitative analysis of carbon emission trend. With the increase of data complexity, machine learning and deep learning models have gradually become mainstream.
[0003] However, despite the significant technological progress, current carbon emission prediction and management still faces multiple bottlenecks. The heterogeneity of multi-source data leads to difficulty in fusion, and the standard system of carbon footprint certification and green electricity traceability has not been unified, which increases the difficulty of enterprise cooperation in carbon reduction. Pure data-driven black box models are difficult to attribute the influence of extreme climate events, and there is still error accumulation when processing long time series. The above problems need to be solved urgently. SUMMARY
[0004] The application aims to provide a construction method of a carbon emission prediction model based on artificial intelligence.
[0005] To achieve the above-mentioned purpose, the application is implemented according to the following technical solutions:
[0006] The application provides a construction method of a carbon emission prediction model based on artificial intelligence, which includes:
[0007] A. Collecting enterprise production data for preprocessing to obtain time series data, wherein the enterprise production data includes carbon emission data and production data;
[0008] B. Obtaining sample data by using a sliding window to divide based on the time series data, calculating the derived features of the sample data, aligning the time series data and the derived features according to the window, obtaining a feature data set, and dividing the feature data set into a training set, a validation set and a test set;
[0009] C. Inputting the training set into an LSTM-attention model for training to generate a time series prediction model, inputting the validation set into the time series prediction model, optimizing the attention layer weight parameters based on the prediction error, simultaneously extracting process parameters and carbon emission data from the training set and inputting them into a causal tree model, extracting distribution parameters through a variational inference algorithm, and obtaining marginal effect coefficients of the process parameters based on the distribution parameters;
[0010] D According to the carbon emission trend prediction result output by the time series prediction model and the marginal effect coefficient of the process parameter output by the causal tree model, a carbon emission prediction model is constructed by weighted fusion based on a double-layer optimization fusion strategy, and a visual prediction chart is output. The root mean square error is used to optimize the carbon emission prediction model using the test set.
[0011] As a further method, the method of collecting enterprise production data for preprocessing to obtain time series data, including: enterprise production data includes carbon emission data and production data, the production data includes real-time collection of enterprise production equipment device model, running state, process parameters using industrial internet of things sensors and association of product batch and yield, collection of production link equipment energy consumption data, carbon emission data and carbon emission standard, obtaining device carbon emission factor according to device type and carbon emission standard, forming a set of original data with time stamp, cleaning the original data set, merging repeated records based on batch number and time stamp, generating a time axis with a fixed interval of 15 minutes, aggregating and sampling high-frequency data in the original data set according to the time axis, and associating low-frequency data to the nearest time point on the time axis; if there is no corresponding low-frequency data at a certain time point, use the adjacent value to fill, and obtain the time series data.
[0012] Further, the method of aligning the time series data with the derived features according to the window to obtain the feature data set, comprising:
[0013] Based on the sampling interval of the time series data, the size of the sliding window is set to 30 sampling intervals, the time series data is cut into fixed sample length based on the sampling interval, the identification of each sample window is generated in sequence, and the derived features are calculated for each sample window;
[0014] Based on the carbon emission standard and the carbon emission factor, the associated fields directly related to the carbon emission prediction in the sample are screened out, the Pearson correlation coefficient of the remaining fields and the carbon emission data is calculated, the indirectly associated fields with an absolute value greater than 30% of the correlation coefficient are retained, the associated fields and the indirectly associated fields are taken as the basic fields of the sample, and the original time series features are obtained based on the basic fields.
[0015] After aligning the original time series features and the derived features according to the sample window identification, they are merged into the same data table, each row represents a sample, and each column represents the basic field of the sample, and the feature data set is obtained.
[0016] Further, the method of calculating the derived features for each sample window, comprising:
[0017] Based on the time series data, the sample data is obtained by using the sliding window division, based on the device running state of the sample data, the actual running time is obtained, the planned production time is determined combined with the product batch, and the time utilization rate is obtained by dividing the actual running time of the device by the planned production time.
[0018] The actual production speed is determined according to the equipment running state, actual running time and yield, the theoretical production speed is obtained based on the equipment model, and the performance utilization rate is obtained by dividing the actual production speed of the equipment by the theoretical production speed;
[0019] The yield rate is obtained based on the product batch statistics good product number and divided by the yield, the product of the yield rate, the time utilization rate and the performance utilization rate is calculated to obtain the comprehensive efficiency of the equipment; the unit product energy consumption is obtained by using the energy consumption data divided by the yield, and the unit product carbon emission amount is obtained by multiplying the unit product energy consumption by the carbon emission factor.
[0020] Further, the method of dividing the feature data set into a training set, a validation set and a test set comprises:
[0021] The feature data set is subjected to noise optimization and hierarchical division;
[0022] The noise optimization comprises calculating the mean and variance of the time series data in the feature data set, taking the mean value of the time series data as the mean value of the Gaussian distribution noise, selecting 27% of the variance of the original time series data as the variance of the Gaussian distribution noise, and superimposing the Gaussian distribution noise on the time series data based on the formula X' = X + ∈·N(0, σ 2 ) to obtain enhanced time series data, wherein X' represents the enhanced time series data, X represents the time series data, ∈ represents the intensity coefficient, N(0, σ 2 ) represents the probability distribution;
[0023] The data hierarchy is divided according to the production shift, and for each hierarchy, the training set, the validation set and the test set are generated in the ratio of 7:2:1.
[0024] Further, the method of inputting the training set into the LSTM-attention model for training to generate a time series prediction model comprises:
[0025] The training set is converted into a three-dimensional tensor, the three-dimensional tensor comprising the number of samples, the time step and the number of features, the carbon emission target value is set as the output data based on the carbon emission data of the training set, and the three-dimensional tensor and the carbon emission target value are subjected to maximum and minimum normalization, and the normalized three-dimensional tensor is taken as the input data of the LSTM-attention model;
[0026] Two layers of bidirectional LSTM units are stacked, the basic data of each time step in the input data is extracted, the position encoding is generated for each time step in the input data through a sine function, the position encoding and the basic data are added element by element, the time step sequence fused with the position encoding is input into the bidirectional LSTM for processing to obtain a hidden state sequence containing feature information of each time step, and the attention weight matrix of the hidden state sequence is calculated, and the formula of the attention matrix is:
[0027]
[0028] where β n,τ,τ′ is the attention weight of time step τ to τ' in the nth sample, Query n,τ is the query vector of the nth sample, time step τ, Key n,τ is the key vector of the nth sample, time step τ, PosBias τ,τ′ is the position bias of time step τ to τ' in the nth sample, d k is the scaling factor corresponding to the dimension, k is the abbreviation of Key, T is the total number of time steps, τ and τ' are the time step indices, τ" is the time step index in the summation;
[0029] The attention output is obtained by weighting the key time steps of the hidden state sequence based on the attention weight matrix, and the 1-dimensional carbon emission prediction value is obtained by mapping and converting the attention output through a linear activation function. The time series prediction model is constructed.
[0030] The validation set is converted into a three-dimensional tensor and normalized, and then input into the time series prediction model to obtain the average absolute error between the prediction result of the validation set and the target value of carbon emission. The error is used to perform a back propagation algorithm to derive the gradient of each parameter in the attention weight matrix. The time step weight parameter is adjusted according to the gradient direction and size.
[0031] Further, the method for inputting the process parameters and carbon emission data extracted based on the training set into the causal tree model and extracting the distribution parameters through a variational inference algorithm to obtain the marginal effect coefficient of the process parameters includes:
[0032] Based on the training set data table, the process parameters and the carbon emission of each column are extracted as sample features, and each row of data is extracted as a sample. A decision tree is constructed, and the decision tree is iterated. Each time the decision tree is iterated, 67% of the total number of samples is randomly selected as the sample for the time being. The square root of the total number of sample features for the time being is obtained to obtain the number of features.
[0033] The actual value range and the intermediate value of adjacent values are included in the candidate threshold list through a splitting algorithm for the process parameters. The current sample is divided into a treatment group and a control group according to the candidate threshold. The distribution parameters and regression coefficients of the causal effect strength are obtained based on the treatment group and the control group through a variational inference algorithm. The variational inference formula is:
[0034]
[0035] where measures the approximation degree of the variational distribution to the true posterior and the data fitting degree, m is the sample index, x m is the process parameter data of the mth sample, t m is the treatment variable of the mth sample, y mcarbon emission result of the mth sample, k m latent variable of the mth sample, mathematical expectation of the variational distribution, f(x m ,t m |k m ) represents a joint distribution of process parameters and processing variables, f(y m |t m ,k m ) represents a conditional distribution of carbon emission results, and r(k m |x m ,t m ,y m ) represents a variational distribution.
[0036] According to the mean difference of the two groups of carbon emissions, the mean difference is calibrated using the regression coefficient, the causal effect strength of the candidate threshold is obtained using the product of the regression coefficient and the mean difference, the causal effect strength of the candidate threshold is compared, the threshold that maximizes the difference in carbon emissions between the treatment group and the control group is selected for node splitting, and after the single decision tree training is completed, the prediction values of all decision trees are arithmetically averaged to obtain the causal effect estimate value.
[0037] A perturbation is applied to the process parameters based on the existing values, the unit product carbon emissions before and after the perturbation are predicted by the causal forest model, the difference before and after the perturbation is obtained, the perturbation is repeated until the standard deviation of the average change rate of the difference is less than one percent, and the marginal effect coefficient is obtained. The Shapley value decomposition method is used to traverse all process parameter combinations to calculate the marginal contribution of each process parameter to the carbon emission prediction value when the parameter is added to the parameter combination. Based on the average value of the marginal contribution of the process parameters, the Shapley value is obtained. According to the size of the Shapley value, the process node is selected as the root node, and the samples are recursively divided so that each leaf node corresponds to the average unit product carbon emissions under the process parameter combination. The splitting conditions from the root node to each leaf node are concatenated into a decision path to construct a causal tree model.
[0038] Further, the method for constructing a carbon emission prediction model based on a double-layer optimization fusion strategy includes:
[0039] Based on the time series prediction model, the carbon emission trend prediction result is output, the process parameter marginal effect coefficient is output using the causal tree model, a multi-objective optimization function is designed using the double-layer optimization fusion strategy, the multi-objective optimization function is solved using the sequential least squares method, the weight of the time series prediction result and the weight of the causal tree model result are obtained, the time series prediction result and the process parameter influence of the causal tree model are added according to the weights, and the carbon emission prediction value is obtained. A carbon emission prediction model is constructed, and the formula of the multi-objective optimization function is:
[0040]
[0041] wherein n is the total number of samples, is the predicted value of the i-th sample, is the true value of the i-th sample, m is the number of process parameters, and β j is the marginal effect coefficient of the j-th process parameter, a is a weight used to balance the prediction accuracy and causal stability, and ω1, ω2 are the weights of the time series prediction result and the weight of the causal tree model result.
[0042] A visual prediction chart is output using the carbon emission prediction model, and the carbon emission prediction model is optimized based on the test set by root mean square error.
[0043] The second aspect of the present application provides a system of a carbon emission prediction model based on artificial intelligence, comprising:
[0044] A data acquisition model is used to collect enterprise production data for preprocessing to obtain time series data, wherein the enterprise production data includes carbon emission data and production data.
[0045] A data processing module is used to obtain sample data by using a sliding window to divide the time series data, calculate the derived features of the sample data, align the time series data and the derived features according to the window, obtain a feature data set, and divide the feature data set into a training set, a validation set and a test set.
[0046] A model training module is used to input the training set into an LSTM-attention model for training to generate a time series prediction model, input the validation set into the time series prediction model, optimize the attention layer weight parameters based on the prediction error, extract process parameters and carbon emission data from the training set and input them into a causal tree model, extract distribution parameters by using a variational inference algorithm, and obtain marginal effect coefficients of the process parameters based on the distribution parameters.
[0047] A model construction module is used to construct a carbon emission prediction model by weighted fusion based on a double-layer optimization fusion strategy according to the carbon emission trend prediction result output by the time series prediction model and the marginal effect coefficients of the process parameters output by the causal tree model, output a visual result, and optimize the carbon emission prediction model by root mean square error using the test set.
[0048] Compared with the prior art, the embodiments of the present application have at least the following advantages or beneficial effects:
[0049] (1) The present application uses a sliding window to cut the time series data and calculate the derived features, combines with Gaussian noise injection to enhance data diversity, improves the robustness of the model to noisy data, and at the same time, divides the training set, the validation set and the test set in layers to ensure the stability and generalization ability of the model training.
[0050] (2) The application realizes the synergistic optimization of prediction trend and process parameter influence by constructing an LSTM-attention model and a time series prediction model, combining marginal effect analysis of a causal tree model, and a double-layer optimization fusion strategy, while ensuring prediction accuracy and enhancing the adaptability of the model to abnormal scenarios.
[0051] (3) The application quantifies the marginal effect of process parameters on carbon emissions based on variational inference and Shapley value decomposition of the causal tree model, reveals the causal relationship between parameter adjustment and carbon emission changes, and provides interpretable decision support for enterprises to optimize production processes and develop emission reduction strategies. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 A flowchart of the steps of the construction method of the carbon emission prediction model based on artificial intelligence in the embodiments of the application. DETAILED DESCRIPTION
[0053] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the application.
[0054] Referring to Figure 1 The application provides a construction method of a carbon emission prediction model based on artificial intelligence, which comprises:
[0055] A collection of enterprise production data for pretreatment to obtain time series data, the enterprise production data including carbon emission data and production data;
[0056] Specifically, the method for collecting enterprise production data for pretreatment to obtain time series data comprises: the enterprise production data includes carbon emission data and production data, the production data including real-time collection of device model, running state and process parameters of enterprise production equipment using industrial internet of things sensors and association of product batch and yield, collection of production link device energy consumption data, carbon emission data and carbon emission standards, obtaining of device carbon emission factors according to device type and carbon emission standards, formation of a raw data set with a time stamp, cleaning of the raw data set, merging of repeated records based on batch number and time stamp, generation of a time axis with a fixed interval of 15 minutes, aggregation sampling of high-frequency data in the raw data set according to the time axis, and association of low-frequency data to the nearest time point on the time axis; if there is no corresponding low-frequency data at a certain time point, the adjacent value is filled to obtain the time series data.
[0057] In one specific embodiment, based on the production data collected in the hot rolling workshop of a steel enterprise, K-type thermocouple sensors are installed in the middle, upper and lower parts of the heating furnace cavity to monitor the heating uniformity by collecting temperature every 10 seconds, a magneto-electric speed sensor is installed on the main shaft of the rolling mill to collect the rolling speed every second, an ultrasonic gas flow meter is installed on the natural gas pipeline to record the fuel consumption rate at an interval of every second, the production line automatically numbers each batch of billets and records the production time information, and the yield rate is collected; an infrared gas analyzer is used to monitor the CO2 concentration of the exhaust gas of the heating furnace, and the emission is calculated based on the flow collection, the carbon emission factor of 0.85 tons of CO2 / MW·h is used to convert the energy consumption into carbon emissions according to the “China Steel Production Greenhouse Gas Emission Accounting Method and Reporting Guide”, and a raw data set with a time stamp is formed;
[0058] The raw data set is hashed and de-duplicated, abnormal values are removed using the 3σ principle, the time axis is reconstructed at an interval of 15 minutes, the temperature, rolling speed and fuel consumption are aggregated at an interval of 15 minutes, and the batch information and other low-frequency data are filled with the previous data when there is no update, and 20160 time series data are obtained.
[0059] B. Based on the time series data, a sliding window is used to divide the sample data, the derived features of the sample data are calculated, the time series data and the derived features are aligned according to the window, a feature data set is obtained, and the feature data set is divided into a training set, a validation set and a test set;
[0060] Specifically, the method of aligning the time series data and the derived features according to the window to obtain the feature data set comprises: based on the sampling interval of the time series data, setting the sliding window size to 30 sampling intervals, moving the window based on the sampling interval to cut the time series data into fixed sample lengths, generating an identification for each sample window in sequence, and calculating the derived features for each sample window.
[0061] Based on the carbon emission standard and the carbon emission factor, the correlation fields directly related to the carbon emission prediction in the sample are selected, the Pearson correlation coefficients of the remaining fields and the carbon emission data are calculated, the indirect correlation fields with an absolute value of the correlation coefficient greater than 30% are retained, the correlation fields and the indirect correlation fields are used as the basic fields of the sample, and the original time series features are obtained based on the basic fields and the sample data.
[0062] After aligning the original time series features and the derived features according to the sample window identification, they are merged into the same data table, each row represents a sample, and each column represents the basic fields of the sample, and the feature data set is obtained.
[0063] In one specific embodiment, based on the 15-minute sampling interval of the time series data, the sliding window size is set to 30 sampling intervals, i.e. 7.5 hours, which can basically contain a production shift, 20131 samples are generated, 26 features are screened out by combining the carbon emission standard and the Pearson correlation coefficient, including 5 directly related, 2 indirectly related, and 19 original time series features, the original time series features and the derived features are aligned and merged into the same data table according to the sample window identifier, each row represents a sample, and each column represents the basic field of the sample, and the feature data set is obtained.
[0064] Specifically, for each sample window, the method for calculating the derived features includes: obtaining sample data based on time series data using sliding window segmentation, obtaining actual running time based on the device running state of the sample data, determining the planned production time in combination with the product batch, and obtaining the time utilization rate by dividing the actual running time of the device by the planned production time;
[0065] Determining the actual production speed according to the device running state, the actual running time and the yield, obtaining the theoretical production speed based on the device model, and obtaining the performance utilization rate by dividing the actual production speed of the device by the theoretical production speed;
[0066] Based on the product batch, the number of good products is counted and divided by the yield to obtain the good product rate, the product of the good product rate, the time utilization rate and the performance utilization rate is calculated to obtain the device comprehensive efficiency; the unit product energy consumption is obtained by dividing the energy consumption data by the yield, and the unit product carbon emission amount is obtained by multiplying the unit product energy consumption by the carbon emission factor.
[0067] In one specific embodiment, based on the device running state of the sample data, the heating furnace running time is 6.5 hours, the planned production time is 7.5 hours in combination with the product batch, the time utilization rate is 85% by dividing the actual running time of the device by the planned production time;
[0068] Determining the actual production speed of 80 tons / hour according to the device running state, the actual running time of 6.5 hours and the yield of 520 tons, obtaining the theoretical production speed of 100 tons / hour based on the device model, and obtaining the performance utilization rate of 80% by dividing the actual production speed of the device by the theoretical production speed;
[0069] Based on the product batch, the number of good products is counted and divided by the yield of 520 tons to obtain the good product rate of 95%, and the product of the good product rate, the time utilization rate and the performance utilization rate is calculated to obtain the OEE of 64.6%;
[0070] The unit energy consumption is obtained by dividing the energy consumption data by the yield of 520 tons, i.e. 6.25 m 3 / ton, and the unit carbon emission amount is obtained by multiplying the unit product energy consumption by the carbon emission factor of 0.85 tons CO2 / MWh.
[0071] Specifically, the method for dividing the feature data set into a training set, a validation set, and a test set comprises: noise optimization and hierarchical division of the feature data set; the noise optimization comprises calculating the mean and variance of the time series data in the feature data set, taking the mean of the time series data as the mean of the Gaussian distribution noise, and selecting 27% of the variance of the original time series data as the variance of the Gaussian distribution noise; and the Gaussian distribution noise is superimposed on the time series data based on the formula X' = X + ∈·N(0, σ 2 ) to obtain enhanced time series data, wherein X' represents the enhanced time series data, X represents the time series data, ∈ represents the intensity coefficient, and N(0, σ 2 ) represents the probability distribution.
[0072] According to the production shift division data hierarchy, for each hierarchy, a training set, a validation set, and a test set are generated in a ratio of 7:2:1.
[0073] In a specific embodiment, the temperature is noise-optimized, the Gaussian noise formula X' = X + ∈·N(0, σ 2 ) is adopted, the mean is taken as the temperature mean 1200°C, the variance is 27, the noise amplitude is controlled by the intensity coefficient ∈ = 0.1, the original temperature value 1210°C is enhanced to 1208.5°C to simulate the measurement error, and meanwhile, the hierarchical division is performed based on the 3-shift production shift, for each hierarchy, the division is performed in a ratio of 7:2:1, and the training set has 14092 samples, the validation set has 4026 samples, and the test set has 2013 samples, covering different shift data and ensuring the model generalization.
[0074] C The training set is input into the LSTM-attention model for training to generate a time series prediction model, the validation set is input into the time series prediction model, the attention layer weight parameters are optimized based on the prediction error, the process parameters and carbon emission data of the training set are extracted and input into the causal tree model, the distribution parameters are extracted by the variational inference algorithm, and the process parameter marginal effect coefficient is obtained based on the distribution parameters;
[0075] Specifically, the method for inputting the training set into the LSTM-attention model for training to generate a time series prediction model comprises: converting the training set into a three-dimensional tensor, the three-dimensional tensor comprising a sample number, a time step, and a feature number; setting a carbon emission target value as output data based on the carbon emission data of the training set; and performing maximum and minimum normalization on the three-dimensional tensor and the carbon emission target value, and taking the normalized three-dimensional tensor as input data of the LSTM-attention model.
[0076] stacking two layers of bidirectional LSTM units to extract the base data of each time step in the input data, generating position encoding for each time step in the input data through a sine function, adding the position encoding and the base data element by element, inputting the time step sequence fused with the position encoding into the bidirectional LSTM for processing to obtain a hidden state sequence containing feature information of each time step, calculating an attention weight matrix of the hidden state sequence, and the formula of the attention matrix is:
[0077]
[0078] wherein β n,τ,τ′ is the attention weight of time step τ to τ' in the nth sample, Query n,τ is the query vector of time step τ in the nth sample, Key n,τ is the key vector of time step τ in the nth sample, PosBias τ,τ′ is the position bias of time step τ to τ' in the nth sample, d k is the scaling factor corresponding to the dimension, k is the abbreviation of Key, T is the total number of time steps, τ and τ' are time step indexes, and τ" is the time step index in the summation.
[0079] weighting the key time steps of the hidden state sequence based on the attention weight matrix to obtain an attention output, mapping and converting the attention output through a linear activation function to obtain a 1-dimensional carbon emission prediction value, and constructing a time series prediction model.
[0080] After the validation set is converted into a three-dimensional tensor and normalized, the validation set prediction result and the mean absolute error of the carbon emission target value are obtained by inputting the validation set into the time series prediction model, the gradient of each parameter in the attention weight matrix is derived based on the error by executing the back propagation algorithm, and the time step weight parameter is adjusted according to the gradient direction and size.
[0081] In one specific embodiment, the training set is converted into a three-dimensional tensor, input data with an input dimension of 14092 sample numbers of the training set x 30 time steps x 26 features is constructed, the output target value of the corresponding sample is set to 15 tons of CO2 / hour based on the CO2 emission per unit time in the training set, and the input data and the output data are normalized by maximum and minimum after being input into the LSTM-attention model.
[0082] The training parameters of the LSTM-attention model are set to a learning rate of 0.001, an Adam optimizer, 100 epochs of iteration, and a loss function wherein N is the number of samples in the validation set, is the model prediction value, y i is the true value.
[0083] The model adopts two stacked 128-unit bidirectional LSTM layers to capture temporal dependencies and extract the base data at each time step of the input data. Position encodings are generated for each time step of the input data using the sine and cosine functions, as shown in the following formula:
[0084]
[0085] where pos is the time step position, i is the feature dimension index, d model is the total feature dimension of the model.
[0086] The first, second, and so on time steps are sequentially extracted from the sample. Among the 26-dimensional features, the 0th and 1st dimensions are calculated using the sine function, and the 2nd and 3rd dimensions are calculated using the cosine function, alternating between the two. The generated position encoding (30, 26) is added element-wise to the base data, and the time step sequence with the fused position encoding is input into the bidirectional LSTM for processing to obtain a hidden state sequence containing feature information for each time step. For example, the attention weight of time step 5 with respect to time step 10 in sample 1 is calculated, and the attention weight β 1,5,10 ≈0.00389 is obtained. The closer the weight value is to 1, the larger it is. An attention matrix is constructed based on the attention weight, and the key time step "high-speed running stage" of the hidden state sequence is weighted based on the attention weight matrix to obtain an attention output [0.1233, 0.0450, -0.1546, 0.1023, 0.0022, 0.0058, 0.0173, -0.0878, 0.1013, -0.0624]. The attention output is mapped and converted through a ReLU linear activation function, and the output is connected to a fully connected layer. Finally, a 1-dimensional carbon emission prediction value of 0.734 tons CO2 / hour is output, and a time series prediction model is constructed.
[0087] After the 4026 samples of the normalized validation set are converted into a three-dimensional tensor, they are input into the trained time series prediction model to obtain carbon emission prediction results. The mean absolute error (MAE) is 0.38 tons CO2 / hour through the loss function. Based on the calculated error, the backpropagation algorithm is executed to deduce the temperature feature of the time step in the 15th sample in the attention weight matrix, which contributes more to the error. The gradient value of the corresponding weight parameter is about 0.02 through the chain rule of differentiation, and the weight of the time step is reduced.
[0088] Specifically, the process parameters and carbon emission data of the training set are extracted and input into the causal tree model, the distribution parameters are extracted through the variational inference algorithm, and the method for obtaining the marginal effect coefficient of the process parameters based on the distribution parameters includes: extracting the process parameters and the carbon emission per unit product of each column as sample features based on the training set data table, extracting each row of data as a sample, constructing a decision tree, and iterating the decision tree, wherein 67% of the total number of samples is randomly selected as the sample at each iteration, and the square root of the total number of sample features at this iteration is obtained as the number of features;
[0089] The actual value range and the intermediate value of the adjacent value are included in the candidate threshold list, the current sample is divided into a treatment group and a control group according to the candidate threshold, the distribution parameters and the regression coefficient of the causal effect strength are obtained based on the treatment group and the control group through the variational inference algorithm, and the variational inference formula is:
[0090]
[0091] wherein The approximation degree of the variational distribution to the true posterior and the data fitting degree are measured, m is the sample index, x m is the process parameter data of the mth sample, t m is the treatment variable of the mth sample, y m is the carbon emission result of the mth sample, k m is the latent variable of the mth sample, is the mathematical expectation of the variational distribution, f(x m ,t m |k m ) represents the joint distribution of the process parameters and the treatment variable, f(y m |t m ,k m ) represents the conditional distribution of the carbon emission result, and r(k m |x m ,t m ,y m ) represents the variational distribution.
[0092] According to the mean difference of the two groups of carbon emissions, the mean difference is calibrated using the regression coefficient, and the causal effect strength of the candidate threshold is obtained using the product of the regression coefficient and the mean difference. The causal effect strength of the candidate threshold is compared, the threshold that maximizes the difference between the treatment group and the control group is selected for node splitting, and after the single decision tree training is completed, the predicted values of all decision trees are arithmetically averaged to obtain the causal effect estimate value.
[0093] The process parameters are disturbed on the basis of the existing values, the unit product carbon emissions before and after the disturbance are predicted by the causal forest model, the difference before and after the disturbance is obtained, the disturbance is repeated until the standard deviation of the average change rate of the difference is less than one percent, the marginal effect coefficient is obtained, the Shapley value decomposition method is used to traverse all process parameter combinations, the marginal contribution of each process parameter to the carbon emission prediction value when the parameter is added to the parameter combination is calculated, the Shapley value is obtained based on the average value of the marginal contribution of the process parameter, the process node is selected as the root node according to the size of the Shapley value, the sample is recursively divided, and the unit product carbon emissions under the process parameter combination of each leaf node are averaged. The splitting condition from the root node to each leaf node is concatenated into a decision path to construct a causal tree model.
[0094] It needs to be explained that in the variational inference of the causal tree model, the hidden variable k m represents the influence coefficient of a certain process parameter on carbon emissions, that is, the regression coefficient. Through the variational inference algorithm, we approximate the posterior distribution of the hidden variable k m Assume that k m obeys a certain prior distribution, and then use the variational distribution to approximate the true posterior distribution of k m , and by optimizing the variational parameters μ, σ, the difference between the variational distribution and the true posterior is minimized. The final k m is the marginal effect coefficient of the process parameter, which is used to quantify the impact of changes in the process parameter on carbon emissions.
[0095] In a specific embodiment, temperature, speed, fuel consumption, OEE parameters and unit product carbon emissions are extracted from the training set as sample features, each row of data is extracted as a sample, a decision tree is constructed, 9432 samples are selected for the current iteration, and temperature and fuel consumption are obtained as sample features for splitting. The process parameters such as temperature are traversed in the value range 1000-1300℃, and the intermediate values 1050℃ and 1100℃ are generated as candidate threshold values. According to the threshold value, the treatment group with temperature greater than 1100℃ and the control group with temperature less than 1100℃ are divided, the treatment group carbon emission average is 12 tons / hour, and the control group carbon emission average is 10 tons / hour. Based on the treatment group and the control group, the distribution parameters of the causal effect intensity are obtained by the variational inference algorithm, the mean μ=1.5 and the standard deviation σ=0.2, the regression coefficient k m =1.8, the causal effect intensity of the candidate threshold value is obtained using the product of the regression coefficient and the mean difference 2 tons / hour, and the threshold value 1100℃ with the largest difference is determined as the splitting node by comparing the causal effect intensity of the candidate threshold value. After completing the training of the single decision tree, the arithmetic mean of the 100 decision tree prediction values is obtained to estimate the production process causal effect value in the steel hot rolling production scenario, which is 13.6 tons / hour;
[0096] It needs to be explained that the marginal effect coefficient obtained by the disturbance experiment is used as the input of the causal tree model, which can be used to correct the time series prediction results. The Shapley value is derived from cooperative game theory, and the core idea is to fairly allocate the contribution of each participant to the overall result. In the causal tree model, the Shapley value attributes the change in carbon emissions to specific process parameters. For example, in the steel hot rolling scenario, the temperature contributes 0.12 tons / hour and the speed contributes 0.08 tons / hour. This allows engineers to intuitively understand how temperature and speed jointly affect carbon emissions and avoid making the model a black box. After quantifying the parameter contribution, high-impact parameters can be optimized first. For example, if the Shapley value of temperature is significantly higher than that of speed, focus on temperature control in the production process to improve emission reduction efficiency. In a multi-parameter interactive production process, the Shapley value can decompose the joint effect of parameters. Even if temperature and speed change simultaneously, the independent contribution of each to carbon emissions can be clearly shown. Finally, the Shapley value and the decision path of the causal tree model are combined. For process parameters ranked in descending order of Shapley value, the process parameter with the largest Shapley value is selected as the root node of the causal tree model to ensure that the splitting condition has the greatest impact on carbon emissions.
[0097] In a specific embodiment, in the initial production scenario, the temperature is 1200℃, and the unit product carbon emission is 10 tons / hour. A disturbance is applied to the temperature, and when the temperature rises to 1201℃, the causal forest model predicts that the carbon emission is 10.08 tons / hour, with a difference of 0.08 tons / hour. Repeat the disturbance to adjust the temperature to 1202℃ and 1199℃, calculate the average rate of change of the difference, and until the standard deviation is less than 1%, the marginal effect coefficient is 0.08 tons CO2 per degree. If only the speed is adjusted, the marginal contribution of the speed is 0.05 tons CO2 per hour. By traversing the process parameter combination to calculate the marginal contribution, the Shapley value is obtained, such as the combination of temperature and speed, the temperature contribution is 0.4, and the total contribution is 0.6 after adding the speed, the speed marginal contribution is 0.2. Based on the average value of the marginal contribution, the Shapley value is calculated: temperature 0.45, fuel consumption 0.32, and speed 0.23. Take the temperature with the largest Shapley value as the root node, recursively divide the samples, and set the temperature greater than 1100℃ and the fuel consumption greater than 50m 3 / hour, corresponding to the average value of 12 tons / hour. The above splitting conditions are connected in series to form a decision path to construct a causal tree model.
[0098] D Based on the carbon emission trend prediction results output by the time series prediction model and the process parameter marginal effect coefficient output by the causal tree model, a carbon emission prediction model is constructed by weighted fusion based on a double-layer optimization fusion strategy, and a visual prediction chart is output. The root mean square error is used to optimize the carbon emission prediction model using the test set.
[0099] It needs to be explained that the search range of alpha can be initially defined as [0.1, 0.3, 0.5, 0.6, 0.8] according to business needs, for each alpha value, a multi-objective optimization function is solved by combining the sequence least squares method, the root mean square error on the validation set is calculated, and the alpha value that minimizes the root mean square error is selected, thus determining alpha = 0.6, the search range and search accuracy of alpha can be gradually improved in subsequent calculations, the sequence least squares method iteratively optimizes by fixing other variables of the multi-objective optimization function each time and updating a single weight, gradually approaching the minimum value of the objective function, this iterative strategy can handle non-convex and nonlinear problems of complex functions, a numerical value is initialized for omega1, omega2, other variables are fixed, and a single weight is optimized in turn, for example, omega2 is fixed first, the partial derivative of omega1 is calculated and updated; omega1 and omega2 are fixed, and iteration is repeated until the objective function converges, finally omega1 and omega2 are obtained, so that the prediction model can pay attention to both prediction accuracy and causal stability, and realize the weighted fusion of time series prediction results and causal tree model results.
[0100] Specifically, the method for constructing a carbon emission prediction model based on a double-layer optimization fusion strategy through weighted fusion includes: outputting a carbon emission trend prediction result based on a time series prediction model, using a causal tree model to output a process parameter marginal effect coefficient, designing a multi-objective optimization function through a double-layer optimization fusion strategy, solving the multi-objective optimization function using a sequence least squares method, obtaining a weight of the time series prediction result and a weight of the causal tree model result, adding the process parameter influence of the time series prediction result and the causal tree model according to the weights, obtaining a carbon emission prediction value, and constructing a carbon emission prediction model. The formula of the multi-objective optimization function is:
[0101]
[0102] Where n is the total number of samples, is the prediction value of the i-th sample, is the true value of the i-th sample, m is the number of process parameters, and beta j is the marginal effect coefficient of the j-th process parameter, alpha is used to balance the weight of prediction accuracy and causal stability, omega1 and omega2 are the weight of the time series prediction result and the weight of the causal tree model result;
[0103] A visual prediction chart is output using the carbon emission prediction model, and the carbon emission prediction model is optimized based on the test set through the root mean square error.
[0104] In a specific embodiment, the carbon emission trend prediction result output by the time series prediction model is 0.734 tons of CO2 / hour, the marginal effect coefficient of the rolling mill roll speed output by the causal tree model is 0.08 tons of CO2 per degree, the multi-objective optimization function is designed by using a double-layer optimization fusion strategy, α is set to 0.6, the multi-objective optimization function is constructed based on the total number of samples 14092, the multi-objective optimization function is solved by using the sequence least square method, the weight ω1 of the time series prediction result is 0.7 and the weight ω2 of the causal tree model result is 0.3, the time series prediction result and the process parameter influence of the causal tree model are added according to the weights, and the carbon emission prediction value is obtained as 0.5378 tons of CO2 / hour, and the carbon emission prediction model is constructed;
[0105] The carbon emission prediction model is used to output a visual result;
[0106] The test set is input into the carbon emission prediction model, the root mean square error is calculated as 0.071 tons / hour, the expected accuracy 0.05 tons / hour is not reached, and the prediction model is optimized by adjusting α, ω1 and ω2.
[0107] The second aspect of the application also provides a method for constructing a carbon emission prediction model based on artificial intelligence, comprising: a data acquisition model, which acquires enterprise production data for preprocessing to obtain time series data, wherein the enterprise production data includes carbon emission data and production data;
[0108] A data processing module, which uses a sliding window to divide the time series data to obtain sample data, calculates the derived features of the sample data, aligns the time series data with the derived features according to the window, obtains a feature data set, and divides the feature data set into a training set, a validation set and a test set;
[0109] A model training module, which inputs the training set into an LSTM-attention model for training to generate a time series prediction model, inputs the validation set into the time series prediction model, optimizes the attention layer weight parameters based on the prediction error, extracts process parameters and carbon emission data from the training set and inputs them into a causal tree model, extracts distribution parameters by using a variational inference algorithm, and obtains the marginal effect coefficient of the process parameters based on the distribution parameters;
[0110] A model construction module, which constructs a carbon emission prediction model based on a double-layer optimization fusion strategy by weighted fusion according to the carbon emission trend prediction result output by the time series prediction model and the marginal effect coefficient of the process parameters output by the causal tree model, outputs a visual prediction chart, and optimizes the carbon emission prediction model by using the test set through root mean square error.
[0111] The above merely illustrates and describes the structure of the present application, and those skilled in the art can make various modifications or supplements to the described specific embodiments or adopt similar ways to replace, as long as the modifications or supplements do not deviate from the structure of the present application or exceed the scope defined by the present claims, and should belong to the protection scope of the present application.
Claims
1. A method for constructing a carbon emission prediction model based on artificial intelligence, characterized by, The method comprises the following steps: A: collecting enterprise production data for preprocessing to obtain time series data, wherein the enterprise production data comprises carbon emission data, equipment operation data, energy consumption data and yield data; B: obtaining sample data based on the time series data using a sliding window segmentation, calculating derived features of the sample data, aligning the time series data and the derived features according to the window to obtain a feature dataset, and dividing the feature dataset into a training set, a validation set and a test set; C: inputting the training set into an LSTM-attention model for training to generate a time series prediction model, inputting the validation set into the time series prediction model, optimizing the attention layer weight parameters based on the prediction error, extracting process parameters and carbon emission data from the training set, and obtaining a causal effect estimate value through a variational inference algorithm, applying a disturbance to the process parameters based on the existing values, predicting the unit product carbon emission before and after the disturbance through a causal forest model, obtaining a difference value, repeating the disturbance until the standard deviation of the average change rate of the difference value is less than one percent, obtaining a marginal effect coefficient, using a Shapley value decomposition method to traverse all process parameter combinations, calculating the marginal contribution of each process parameter to the carbon emission prediction value when the parameter is added to the parameter combination, obtaining a Shapley value based on the average of the marginal contribution of the process parameters, selecting a process node as a root node according to the size of the Shapley value, recursively dividing the sample, so that each leaf node corresponds to the average unit product carbon emission under the process parameter combination, concatenating the splitting conditions from the root node to each leaf node into a decision path, constructing a causal tree model, and obtaining the marginal effect coefficient of the process parameter based on the causal tree model and the causal effect estimate value; D: based on the carbon emission trend prediction result output by the time series prediction model and the marginal effect coefficient of the process parameter output by the causal tree model, constructing a carbon emission prediction model through weighted fusion based on a double-layer optimization fusion strategy, outputting a visual result, and optimizing the carbon emission prediction model using the test set through a root mean square error. 2.The method of claim 1, wherein, The method for collecting enterprise production data for preprocessing to obtain time series data comprises: The enterprise production data comprises carbon emission data, equipment operation data, energy consumption data and yield data, and the equipment model, running state and process parameters of the enterprise production equipment are collected in real time using an industrial Internet of Things sensor, and the product batch and yield are associated, the equipment energy consumption data, carbon emission data and carbon emission standard are collected, the equipment carbon emission factor is obtained according to the equipment type and the carbon emission standard, the original data set with a time stamp is formed, the original data set is cleaned, the repeated records are merged based on the batch number and the time stamp, the time axis is generated at a fixed interval of 15 minutes, the high-frequency data in the original data set is aggregated and sampled according to the time axis, and the low-frequency data is associated with the nearest time point on the time axis; if there is no corresponding low-frequency data at a certain time point, the adjacent value is filled, and the time series data is obtained. 3.The method of claim 1, wherein, The method for aligning the time series data and the derived features according to the window to obtain the feature dataset comprises: Based on the sampling interval of the time series data, the size of the sliding window is set to 30 sampling intervals, the window is sequentially moved based on the sampling interval to cut the time series data into fixed sample length, and an identification is sequentially generated for each sample window. For each sample window, the derived features are calculated; Based on the carbon emission standard and the carbon emission factor, the associated fields in the sample directly related to the carbon emission prediction are screened out, the Pearson correlation coefficients of the remaining fields and the carbon emission data are calculated, and the indirectly associated fields with an absolute correlation coefficient greater than 30% are retained. The associated fields and the indirectly associated fields are used as the basic fields of the sample, and the original time series features are obtained by extracting the sample data based on the basic fields. The original time series features and the derived features are aligned and merged into the same data table according to the sample window identification, each row represents a sample, and each column represents a basic field of the sample, and a feature data set is obtained. 4.The method of claim 3, wherein, The method for calculating the derived features for each sample window includes: Based on the sampling interval of the time series data, the size of the sliding window is set to 30 sampling intervals, the window is sequentially moved based on the sampling interval to cut the time series data into fixed sample length, and an identification is sequentially generated for each sample window. For each sample window, the derived features are calculated; According to the device running state, the actual running time and the yield, the actual production speed is determined, the theoretical production speed is obtained based on the device model, and the performance utilization rate is obtained by dividing the actual production speed by the theoretical production speed; Based on the product batch statistics, the number of good products is obtained and divided by the yield to obtain the good product rate, and the product of the good product rate, the time utilization rate and the performance utilization rate is obtained to obtain the comprehensive efficiency of the device; the unit product energy consumption is obtained by using the energy consumption data divided by the yield, and the unit product carbon emission amount is obtained by multiplying the unit product energy consumption by the carbon emission factor. 5.The method of constructing an artificial intelligence-based carbon emission prediction model according to claim 1, wherein, The method for dividing the feature data set into a training set, a validation set and a test set includes: Noise optimization and hierarchical division are performed on the feature data set; The noise optimization comprises calculating the mean and variance of the time series data in the feature data set, taking the mean of the time series data as the mean of the Gaussian distributed noise, selecting 27% of the variance of the original time series data as the variance of the Gaussian distributed noise, and superimposing the Gaussian distributed noise on the time series data based on the formula X'=X+∈·N(0,σ 2 ) to obtain enhanced time series data, wherein X' represents the enhanced time series data, X represents the time series data, ∈ represents the intensity coefficient, N(0,σ 2 ) represents the probability distribution; According to the production shift division data level, for each level, the training set, the validation set and the test set are generated in a ratio of 7:2:
1. 6.The method of constructing an artificial intelligence-based carbon emission prediction model according to claim 1, wherein, The method for inputting the training set into the LSTM-attention model for training to generate a time series prediction model includes: The training set is converted into a three-dimensional tensor, the three-dimensional tensor includes the number of samples, the time step and the number of features, the carbon emission target value is set as the output data based on the carbon emission data of the training set, the three-dimensional tensor and the carbon emission target value are subjected to maximum and minimum normalization, and the normalized three-dimensional tensor is used as the input data of the LSTM-attention model; Two layers of bidirectional LSTM units are stacked, the basic data of each time step in the input data is extracted, the position encoding of each time step in the input data is generated by a sine function, the position encoding and the basic data are added element by element, the time step sequence fused with the position encoding is input into the bidirectional LSTM for processing, the hidden state sequence containing the feature information of each time step is obtained, and the attention weight matrix of the hidden state sequence is calculated. The formula of the attention weight matrix is: where β n,τ,τ′ is the attention weight of time step τ to τ' in the n-th sample, Query n,τ is the query vector of the n-th sample, time step τ, Key n,τ is the key vector of the n-th sample, time step τ, PosBias τ,τ′ is the position bias of time step τ to τ', d k is the scaling factor, k is the abbreviation of Key, T is the total number of time steps, τ and τ' are the time step indices, τ" is the time step index in the summation; The attention output is obtained by weighting key time steps of the hidden state sequence based on an attention weight matrix, the attention output is mapped and converted through a linear activation function, a 1-dimensional carbon emission prediction value is obtained, and a time series prediction model is constructed; The validation set is converted into a three-dimensional tensor and normalized, and then input into the time series prediction model to obtain the average absolute error between the prediction result of the validation set and the target value of carbon emission, and the gradient of each parameter in the attention weight matrix is derived based on the error by executing a back propagation algorithm, and the time step weight parameter is adjusted according to the gradient direction and size. 7.The method of claim 1, wherein, The method for obtaining the causal effect estimation value comprises: Based on the training set data table, the process parameters and the carbon emission per unit product of each column are extracted as sample features, and each row of data is extracted as a sample, a decision tree is constructed, and the decision tree is iterated, and 67% of the total number of samples is randomly selected as the sample at each time of iteration, and the square root of the total number of sample features at each time of iteration is obtained to obtain the number of features; The actual value range and the intermediate value of adjacent values are included in the candidate threshold list, the current sample is divided into a treatment group and a control group according to the candidate threshold, the distribution parameters and the regression coefficient of the causal effect strength are obtained based on the treatment group and the control group by using a variational inference algorithm, and the formula of the variational inference algorithm is: wherein measures the approximation of the variational distribution to the true posterior and the data fit, m is a sample index, x m is the process parameter data of the mth sample, t m is the process variable of the mth sample, y m is the carbon emission result of the mth sample, k m is the latent variable of the mth sample, is the mathematical expectation of the variational distribution, f(x m , t m | k m ) represents the joint distribution of the process parameter and the process variable, f(y m | t m , k m ) represents the conditional distribution of the carbon emission result, r(k m | x m , t m , y m ) represents the variational distribution; The regression coefficient is used to calibrate the mean difference between the two groups of carbon emissions, and the product of the regression coefficient and the mean difference is used to obtain the causal effect strength of the candidate threshold, the causal effect strengths of the candidate thresholds are compared, the threshold that maximizes the difference between the carbon emissions of the treatment group and the control group is selected for node splitting, and after the single decision tree training is completed, the prediction values of all decision trees are arithmetically averaged to obtain the causal effect estimation value. 8.The method of claim 1, wherein, The method for constructing a carbon emission prediction model by using a weighted fusion based on a double-layer optimization fusion strategy comprises: The time series prediction model is used to output a carbon emission trend prediction result, the process parameter marginal effect coefficient is output by using the causal tree model, a multi-objective optimization function is designed by using a double-layer optimization fusion strategy, the multi-objective optimization function is solved by using a sequential least squares method, the weight of the time series prediction result and the weight of the causal tree model result are obtained, the carbon emission prediction value is obtained by adding the time series prediction result and the process parameter influence of the causal tree model according to the weights, the carbon emission prediction model is constructed, and the formula of the multi-objective optimization function is: where n is the total number of samples, is the predicted value of the i-th sample, is the true value of the i-th sample, m is the number of process parameters, β j is the marginal effect coefficient of the j-th process parameter, α is the weight used to balance the prediction accuracy and causal stability, ω1, ω2 are the weights of the time series prediction result and the weight of the causal tree model result; A visual prediction chart is output by using the carbon emission prediction model, and the carbon emission prediction model is optimized based on the test set by using the root mean square error.
9. A system of an artificial intelligence-based carbon emission prediction model to perform the method of constructing an artificial intelligence-based carbon emission prediction model according to any one of claims 1 to 8, characterized in that, The system comprises: A data acquisition model is used to collect enterprise production data for preprocessing to obtain time series data, and the enterprise production data comprises carbon emission data, equipment operation data, energy consumption data and yield data; A data processing module is used to divide the time series data into sample data by using a sliding window, calculate the derived features of the sample data, align the time series data and the derived features according to the window to obtain a feature data set, and divide the feature data set into a training set, a validation set and a test set; The model training module inputs the training set into the LSTM-attention model for training to generate a time series prediction model, inputs the validation set into the time series prediction model, optimizes the attention layer weight parameters based on the prediction error, extracts process parameters and carbon emission data from the training set, and obtains causal effect estimates through a variational inference algorithm, applies perturbations to the process parameters based on existing values, predicts the unit product carbon emissions before and after the perturbations through the causal forest model, obtains the difference before and after the perturbations, repeats the perturbations until the standard deviation of the average change rate of the difference is less than one percent, obtains marginal effect coefficients, uses a Shapley value decomposition method to traverse all process parameter combinations, calculates the marginal contribution of each process parameter to the carbon emission prediction value when the parameter is added to the parameter combination, obtains the Shapley value based on the average of the marginal contribution of the process parameters, selects the process node as the root node according to the size of the Shapley value, recursively divides the samples so that each leaf node corresponds to the average unit product carbon emissions under the process parameter combination, concatenates the splitting conditions from the root node to each leaf node into a decision path, constructs a causal tree model, and obtains the marginal effect coefficients of the process parameters based on the causal tree model and the causal effect estimates; The model construction module constructs a carbon emission prediction model based on the carbon emission trend prediction results output by the time series prediction model and the marginal effect coefficients of the process parameters output by the causal tree model through a weighted fusion based on a double-layer optimization fusion strategy, outputs visual prediction results, and optimizes the carbon emission prediction model using the test set through a root mean square error.
Citation Information
Patent Citations
Method for predicting carbon emission during manufacturing of target order and system adopting method
CN118569439A
Attention mechanism-based near-algae-bloom outbreak prediction method
CN118629509A
Iron and steel enterprise carbon footprint prediction method based on integration algorithm
CN118797313A
Carbon emission prediction system, method and computer program product
CN119204721A