Method for predicting carbon emission of coal-fired power plant based on IPSO-LSTM model

Through the carbon emission prediction method of coal-fired power plants based on IPSO-LSTM model, the data quality and model interpretability problems are solved, and high-precision and interpretable carbon emission prediction are achieved.

CN119539570APending Publication Date: 2025-02-28STATE GRID XINJIANG ELECTRIC POWER CO ECONOMIC TECH RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411539252.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

Among the existing carbon emission forecasting technologies, data quality problems are prominent, and the deep learning model is poorly interpretable, which limits its widespread adoption in practical applications.

Method used

The carbon emission prediction method of coal-fired power plants based on the IPSO-LSTM model is adopted. By building a full-life cycle carbon emission index system, historical data is obtained, important indicators are screened, training data sets are constructed, and the LSTM hyperparameters are optimized using improved particle swarm algorithms to improve prediction accuracy and model interpretability.

Benefits of technology

It improves data quality and prediction accuracy, enhances the interpretability of the model, and solves the problem that data integrity and consistency affect prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119539570A_ABST
    Figure CN119539570A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of carbon emission of coal-fired power plants, and discloses the following steps: S1, constructing a full-life-cycle carbon emission index system of a transformer substation; and S2, obtaining historical data of each index in the full life cycle carbon emission index system of the coal-fired power plant, calculating the importance degree of each index, and screening out important indexes according to the importance degree of each index. The method for predicting the carbon emission of the coal-fired power plant based on the IPSO-LSTM model has the advantages of being high in data quality, accurate in measured value and the like, and solves the problems that in the prior art, the data quality problem is prominent, and the accuracy of a prediction model is directly influenced by the integrity and consistency of data due to the fact that the carbon emission data is wide in source and diversified in form. And the problems of poor interpretability of the model, especially the deep learning model, although the precision is high, the wide application of the deep learning model in practical application is limited due to the complex structure and difficulty in explaining the internal mechanism are solved.
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 of coal-fired power plants, and in particular to a method for predicting carbon emission of coal-fired power plants based on an IPSO-LSTM model. Background Art

[0002] As the global climate change problem becomes increasingly serious, carbon emissions have become the focus of global attention. Governments, enterprises and international organizations have taken measures to promote the implementation of carbon emission reduction policies. Carbon emission forecasting, as an important tool for formulating and evaluating these emission reduction strategies, is gradually becoming a key task. By accurately predicting future carbon emissions, decision makers can formulate more effective policies, enterprises can optimize production processes, and all sectors of society can better participate in emission reduction actions. Carbon emission forecasting has multiple meanings in policy making and corporate operations. First, it provides a scientific basis for the government to formulate long-term carbon emission reduction strategies to ensure the achievement of emission reduction targets. Second, it plays an important role in the carbon trading market. By predicting carbon emissions, it helps determine carbon quotas and carbon prices and promotes the effective operation of market mechanisms. In addition, carbon emission forecasting can also help companies identify high-emission links, optimize energy use, reduce carbon footprints, and ultimately find a balance between achieving environmental and economic benefits.

[0003] At present, carbon emission prediction technologies include statistical models, machine learning models and deep learning models. Traditional statistical methods such as time series analysis and regression analysis are based on historical data and use mathematical models for prediction. With the development of data science, machine learning and deep learning technologies such as support vector machines (SVM), random forests (RF), long short-term memory networks (LSTM) and convolutional neural networks (CNN) have performed well in processing complex nonlinear data, significantly improving the accuracy of predictions.

[0004] However, despite the great progress made in carbon emission forecasting technology, it still faces several technical barriers. First, the data quality problem is prominent. Since carbon emission data comes from a wide range of sources and in various forms, the integrity and consistency of the data directly affect the accuracy of the forecasting model. Secondly, the interpretability of the model is poor, especially the deep learning model. Although it has high accuracy, it is difficult to explain the internal mechanism due to its complex structure, which limits its widespread adoption in practical applications. Finally, the generalization ability of the carbon emission forecasting model also needs to be further improved, and its applicability and stability in different regions, industries and time periods still need to be verified. Summary of the invention

[0005] 1. Technical issues to be resolved

[0006] In view of the shortcomings of the prior art, the present invention provides a method for predicting carbon emissions from coal-fired power plants based on the IPSO-LSTM model, which has the advantages of high data quality and accurate numerical calculations, and solves the outstanding data quality problem in the prior art. Since carbon emission data comes from a wide range of sources and in various forms, the integrity and consistency of the data directly affect the accuracy of the prediction model. In addition, the interpretability of the model is poor, especially the deep learning model, which has high accuracy, but due to its complex structure, it is difficult to explain the internal mechanism, which limits its widespread adoption in practical applications.

[0007] (II) Technical solution

[0008] The technical solution of the present invention to solve the above technical problem is as follows: A method for predicting carbon emissions from coal-fired power plants based on the IPSO-LSTM model, comprising the following steps:

[0009] S1. Construct a carbon emission indicator system for the entire life cycle of a substation;

[0010] S2. Obtain the historical data of each indicator in the carbon emission indicator system of the coal-fired power plant throughout its life cycle, calculate the importance of each indicator, and select the important indicators according to the importance of each indicator;

[0011] S3. Obtain historical data of carbon emissions, construct a first training data set and a second training data set based on the historical data of carbon emissions and various important indicators, input the first training data set and the second training data set into the pre-built IPSO-LSTM network model for training in sequence, and optimize the long short-term memory network hyperparameters using the improved particle swarm algorithm during the training of the first training data set;

[0012] S4. Use the trained IPSO-LSTM network model to predict carbon emissions from coal-fired power plants.

[0013] The beneficial effects of the present invention are as follows: by constructing a carbon emission index system for the entire life cycle of a substation, historical data of each indicator in the carbon emission index system for the entire life cycle of a coal-fired power plant is obtained, important data is screened out according to each indicator, and then the important historical indicator data is used to construct a first training data set and a second training data set, and then the first data set and the second data set are trained in sequence through the IPSO-LSTM network model, and the improved particle swarm algorithm is used to optimize the long short-term memory network hyperparameters, thereby completing the training of the IPSO-LSTM network model, and finally the carbon emissions of the coal-fired power plant can be predicted based on the trained IPSO-LSTM model.

[0014] This method of predicting carbon emissions from coal-fired power plants based on the IPSO-LSTM model has the advantages of high data quality and accurate measurement values.

[0015] Based on the above technical solution, the present invention can also be improved as follows.

[0016] Further, in step S2, the importance of each indicator is calculated using the improved CRITIC method, and the improved CRITIC method includes:

[0017] S21 normalizes the feature vector data. The normalization method is shown in the following formula:

[0018]

[0019] In the above formula, s k represents the historical data of indicator k; x k represents the standardized s k ; maxs k 、mins k Respectively represent the maximum and minimum values ​​of the historical data of indicator k; k = 1, 2, ..., m, where m is the number of indicators;

[0020] S22, x k Perform mutation processing to calculate the difference

[0021]

[0022] In the above formula, σ k represents the standard deviation of indicator k; Represents x1 to x m The average value of k Indicates the difference of index k; for x k Perform conflict resolution and calculate the degree of conflict:

[0023]

[0024]

[0025] In the above formula, c k represents the conflict degree of index k; r kl represents the correlation coefficient between index k and index l, l = 1, 2, ..., m; x l Represents the historical data of indicator l after normalization;

[0026] S23, based on c k d k Calculate the importance of indicator i:

[0027]

[0028] In the above formula, A k Indicates the importance of indicator k.

[0029] The beneficial effect of adopting the above further scheme is that by using the improved CRITIC method to calculate the importance of each indicator, the calculation data can be prioritized, thereby improving the priority processing of the prediction data set.

[0030] Further, in step S3, the IPSO-LSTM neural network model is trained using the first training data set as follows:

[0031] S31: Determine a hyperparameter range that needs to be adjusted in the LSTM neural network model based on the Bayesian optimization, where the hyperparameter range includes a learning rate, the number and size of LSTM layers, and an input sequence length;

[0032] S32: Establish an objective function, and perform performance evaluation on the LSTM neural network model based on the objective function and a hyperparameter combination of the LSTM neural network model;

[0033] S33: Build a Bayesian optimizer, use the Bayesian optimization algorithm to search for the optimal hyperparameter combination, and evaluate the next set of hyperparameter combinations based on the performance of the current LSTM neural network model in subsequent iterative training;

[0034] S34: Use each hyperparameter combination selected by Bayesian optimization to train the LSTM neural network model, and use the validation dataset to evaluate the performance of the trained LSTM neural network model;

[0035] S35: Iterative optimization is performed based on the performance evaluation results of different hyperparameter combinations to obtain a hyperparameter combination that improves the performance of the LSTM energy flow prediction model in subsequent iterations;

[0036] S32: Establish an objective function, and perform performance evaluation on the LSTM neural network model based on the objective function and a hyperparameter combination of the LSTM neural network model;

[0037] S33: Build a Bayesian optimizer, use the Bayesian optimization algorithm to search for the optimal hyperparameter combination, and evaluate the next set of hyperparameter combinations based on the performance of the current LSTM neural network model in subsequent iterative training;

[0038] S34: Use each hyperparameter combination selected by Bayesian optimization to train the LSTM neural network model, and use the validation dataset to evaluate the performance of the trained LSTM neural network model;

[0039] S35: Perform iterative optimization based on the performance evaluation results of different hyperparameter combinations to obtain the hyperparameter combination that improves the performance of the LSTM energy flow prediction model in subsequent iterations.

[0040] The beneficial effect of adopting the above further scheme is that the training data set is used to quickly calculate the subsequent prediction carbon emission target function, thereby efficiently obtaining the calculation results.

[0041] Furthermore, the step of obtaining historical data of each indicator in the carbon emission indicator system of the coal-fired power plant throughout its life cycle in step 2 includes:

[0042] S41: The optimization of the optimal carbon emission objective function is used as the fitness of the improved particle swarm algorithm; the expression for population initialization is:

[0043] z k+1 =cos(k*arccosz k )

[0044]

[0045] where z k is an intermediate chaotic variable, and zk∈[1,1], x k is a population variable, and x k ∈[x min ,x max ];

[0046] The fitness expression of each particle is:

[0047] fitnee(i)=f(x i )

[0048] In formula (16), f(x i ) is the objective function of the optimization problem;

[0049] The expression for updating the velocity of each particle is:

[0050] v i,t+1 =ωv i,t +Levy(s)[c1(pbest i,t -x i,t )+c2(gbest t -x i,t )]

[0051] In formula (17), ω is the inertia coefficient, Levy(s) is the Levy flight strategy, c1 and c2 are acceleration factors, and x i,t is the position of the particle at the current moment, v i,t The velocity of the particle at the current moment, v i,t+1 is the updated velocity of the particle;

[0052] The expression for the position of a particle is

[0053] x i,t+1 =x i,t +vi,t+1

[0054] where x i,t+1 is the updated particle position, x i,t is the position of the particle at the current moment, v i,t+1 The updated velocity of the particle.

[0055] S43: The historical data of the carbon emissions at the current moment and the result of the previous neuron output are input into the forget gate, and after passing through the sigmoid layer, a value f in the interval [0,1] is output. t , f t Multiply the cell state at the previous moment point by point to determine the retained value from the cell state at the previous moment to the cell state at the current moment;

[0056] S43: Inputting the historical data of carbon emissions input at the current moment and the result of the previous neuron output into the sigmoid function layer in the input gate to obtain an output value, and updating the current unit state based on the output value;

[0057] S44: The historical data of carbon emissions input at the current moment and the result of the previous neuron output are input into the sigmoid function layer in the output gate to obtain the value O(t) in the interval [0,1], and the updated current unit state is converted into an output value in the interval [-1,1] through the tanh function layer, and the output value is multiplied by O(t) to obtain the photovoltaic power generation power prediction data and the charging station charging load power prediction data;

[0058] The expression of the forget gate is:

[0059] f t =σ(W f *[h t-1 ,x t ]+b f )

[0060] σ is the activation function; W f Input weight for forget gate; b f is the bias term of the forget gate;

[0061] The expression of the input gate is:

[0062] i t =σ(W i ·[h t-1 ,x t ]+b i )

[0063]

[0064] Among them, σ(*) is the sigmoid function, h t-1is the hidden node output value at the previous moment, x t is the node input at the current moment, b i is the input gate bias term, b c is the unit state bias term, tanh is the activation function, Update the value for the cell state;

[0065] The expression for updating the cell status is:

[0066]

[0067] f t is the forget gate, C t Update the value for the current cell state, C t-1 is the cell state at the previous moment; the expression of the output gate is:

[0068] o t =σ(W o ·[h t-1 ,x t ]+b o )

[0069] h t =o t ×tan(C t )

[0070] o t is the output value of the output gate, W o is the weight of the output gate, b o is the bias of the output gate, h t is the hidden node output at the current moment, tan(C t ) is the updated value of the current unit state after conversion by the tanh function.

[0071] The beneficial effect of adopting the above further scheme is that by obtaining historical carbon emission data, it is possible to obtain approximate existing measurement data, and by comparing the two, the accuracy of existing prediction data can be further improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0073] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0074] In the embodiment, Figure 1 A method for predicting carbon emissions from coal-fired power plants based on the IPSO-LSTM model is provided. The method comprises the following steps:

[0075] S1. Construct a carbon emission indicator system for the entire life cycle of a substation;

[0076] S2. Obtain the historical data of each indicator in the carbon emission indicator system of the coal-fired power plant throughout its life cycle, calculate the importance of each indicator, and select the important indicators according to the importance of each indicator;

[0077] S3. Obtain historical data of carbon emissions, construct a first training data set and a second training data set based on the historical data of carbon emissions and various important indicators, input the first training data set and the second training data set into the pre-built IPSO-LSTM network model for training in sequence, and optimize the long short-term memory network hyperparameters using the improved particle swarm algorithm during the training of the first training data set;

[0078] S4. Use the trained IPSO-LSTM network model to predict carbon emissions from coal-fired power plants;

[0079] In step S2, the importance of each indicator is calculated using the improved CRITIC method, which includes:

[0080] S21 normalizes the feature vector data. The normalization method is shown in the following formula:

[0081]

[0082] In the above formula, s k represents the historical data of indicator k; x k represents the standardized s k ; maxs k 、mins k Respectively represent the maximum and minimum values ​​of the historical data of indicator k; k = 1, 2, ..., m, where m is the number of indicators;

[0083] S22, x k Perform mutation processing to calculate the difference

[0084]

[0085] In the above formula, σ k represents the standard deviation of index k; x represents the range from x1 to x m The average value of k Indicates the difference of index k; for x k Perform conflict resolution and calculate the degree of conflict:

[0086]

[0087] In the above formula, c k represents the conflict degree of index k; r kl represents the correlation coefficient between index k and index l, l = 1, 2, ..., m; x l Represents the historical data of indicator l after normalization;

[0088] S23, based on c k d k Calculate the importance of indicator i:

[0089]

[0090] In the above formula, A k Indicates the importance of indicator k;

[0091] By using the improved CRITIC method to calculate the importance of each indicator, the calculation data can be prioritized and the priority of the prediction data set can be improved;

[0092] In step S3, the IPSO-LSTM neural network model is trained using the first training data set as follows:

[0093] S31: Determine the range of hyperparameters that need to be adjusted in the LSTM neural network model based on Bayesian optimization. The range of hyperparameters includes learning rate, number and size of LSTM layers, and input sequence length.

[0094] S32: Establish an objective function, and evaluate the performance of the LSTM neural network model based on the objective function and the hyperparameter combination of the LSTM neural network model;

[0095] S33: Build a Bayesian optimizer, use the Bayesian optimization algorithm to search for the optimal hyperparameter combination, and evaluate the next set of hyperparameter combinations based on the performance of the current LSTM neural network model in subsequent iterative training;

[0096] S34: Use each hyperparameter combination selected by Bayesian optimization to train the LSTM neural network model, and use the validation dataset to evaluate the performance of the trained LSTM neural network model;

[0097] S35: Iterative optimization is performed based on the performance evaluation results of different hyperparameter combinations to obtain a hyperparameter combination that improves the performance of the LSTM energy flow prediction model in subsequent iterations;

[0098] S32: Establish an objective function, and evaluate the performance of the LSTM neural network model based on the objective function and the hyperparameter combination of the LSTM neural network model;

[0099] S33: Build a Bayesian optimizer, use the Bayesian optimization algorithm to search for the optimal hyperparameter combination, and evaluate the next set of hyperparameter combinations based on the performance of the current LSTM neural network model in subsequent iterative training;

[0100] S34: Use each hyperparameter combination selected by Bayesian optimization to train the LSTM neural network model, and use the validation dataset to evaluate the performance of the trained LSTM neural network model;

[0101] S35: Iterative optimization is performed based on the performance evaluation results of different hyperparameter combinations to obtain a hyperparameter combination that improves the performance of the LSTM energy flow prediction model in subsequent iterations;

[0102] The training data set is used to quickly calculate the subsequent carbon emission prediction objective function, thereby efficiently obtaining the calculation results;

[0103] The steps for obtaining historical data of each indicator in the carbon emission indicator system of the coal-fired power plant throughout its life cycle in step 2 include:

[0104] S41: The optimization of the optimal carbon emission objective function is used as the fitness of the improved particle swarm algorithm; the expression for population initialization is:

[0105] z k+1 =cos(k*arccosz k )

[0106]

[0107] where z k is an intermediate chaotic variable, and zk∈[1,1], x k is a population variable, and x k ∈[x min ,x max ];

[0108] The fitness expression of each particle is:

[0109] fitnee(i)=f(x i )

[0110] In formula (16), f(x i ) is the objective function of the optimization problem;

[0111] The expression for updating the velocity of each particle is:

[0112] v i,t+1 =ωv i,t +Levy(s)[c1(pbest i,t -x i,t )+c2(gbest t -xi,t )]

[0113] In formula (17), ω is the inertia coefficient, Levy(s) is the Levy flight strategy, c1 and c2 are acceleration factors, and x i,t is the position of the particle at the current moment, v i,t The velocity of the particle at the current moment, v i,t+1 is the updated velocity of the particle;

[0114] The expression for the position of a particle is

[0115] x i,t+1 =x i,t +v i,t+1

[0116] where x i,t+1 is the updated particle position, x i,t is the position of the particle at the current moment, v i,t+1 is the updated velocity of the particle;

[0117] S43: The historical data of carbon emissions at the current moment and the result of the previous neuron output are input into the forget gate, and after passing through the sigmoid layer, a value f in the interval [0,1] is output. t , f t Multiply the cell state at the previous moment point by point to determine the retained value from the cell state at the previous moment to the cell state at the current moment;

[0118] S43: Input the historical data of carbon emissions input at the current moment and the result of the previous neuron output into the sigmoid function layer in the input gate to obtain the output value, and update the current unit state based on the output value;

[0119] S44: The historical data of carbon emissions input at the current moment and the result of the previous neuron output are input into the sigmoid function layer in the output gate to obtain the value O(t) in the interval [0,1], and the updated current unit state is converted into an output value in the interval [-1,1] through the tanh function layer, and the output value is multiplied by O(t) to obtain the photovoltaic power generation power prediction data and the charging station charging load power prediction data;

[0120] The expression of the forget gate is:

[0121] f t =σ(W f *[h t-1 ,x t ]+b f )

[0122] σ is the activation function; W f Input weight for forget gate; b fis the bias term of the forget gate;

[0123] The expression of the input gate is:

[0124] i t =σ(W i ·[h t-1 ,x t ]+b i )

[0125]

[0126] Among them, σ(*) is the sigmoid function, h t-1 is the hidden node output value at the previous moment, x t is the node input at the current moment, b i is the input gate bias term, b c is the unit state bias term, tanh is the activation function, Update the value for the cell state;

[0127] The expression for updating the cell status is:

[0128]

[0129] f t is the forget gate, C t Update the value for the current cell state, C t-1 is the cell state at the previous moment; the expression of the output gate is:

[0130] o t =σ(W o ·[h t-1 ,x t ]+b o )

[0131] h t =o t ×tan(C t )

[0132] o t is the output value of the output gate, W o is the weight of the output gate, b o is the bias of the output gate, h t is the hidden node output at the current moment, tan(C t ) is the updated value of the current unit state after conversion by the tanh function;

[0133] By obtaining historical carbon emission data, we can obtain approximate existing measurement data, and by comparing the two, we can further improve the accuracy of existing forecast data.

[0134] Working principle:

[0135] Step 1: Build a carbon emission indicator system for the entire life cycle of a substation, obtain historical data on each indicator in the carbon emission indicator system for the entire life cycle of a coal-fired power plant, calculate the importance of each indicator, and select important indicators based on the importance of each indicator;

[0136] Step 2: Obtain historical data on carbon emissions, build a first training data set and a second training data set based on the historical data of carbon emissions and various important indicators, input the first training data set and the second training data set into the pre-built IPSO-LSTM network model for training in sequence, and use the improved particle swarm algorithm to optimize the long short-term memory network hyperparameters during the training of the first training data set;

[0137] Step 3: Use the trained IPSO-LSTM network model to predict carbon emissions from coal-fired power plants.

[0138] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0139] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for predicting carbon emissions from coal-fired power plants based on the IPSO-LSTM model, characterized in that: The steps include: S1. Construct a carbon emission indicator system for the entire life cycle of a substation; S2. Obtain the historical data of each indicator in the carbon emission indicator system of the coal-fired power plant throughout its life cycle, calculate the importance of each indicator, and select the important indicators according to the importance of each indicator; S3. Obtain historical data of carbon emissions, construct a first training data set and a second training data set based on the historical data of carbon emissions and various important indicators, input the first training data set and the second training data set into the pre-built IPSO-LSTM network model for training in sequence, and optimize the long short-term memory network hyperparameters using the improved particle swarm algorithm during the training of the first training data set; S4. Use the trained IPSO-LSTM network model to predict carbon emissions from coal-fired power plants.

2. The method for predicting carbon emissions from coal-fired power plants based on the IPSO-LSTM model according to claim 1 is characterized in that: In step S2, the importance of each indicator is calculated using the improved CRITIC method, and the improved CRITIC method includes: S21 normalizes the feature vector data. The normalization method is shown in the following formula: In the above formula, s k represents the historical data of indicator k; x k represents the standardized s k ; max s k 、min s k Respectively represent the maximum and minimum values ​​of the historical data of indicator k; k = 1, 2, ..., m, where m is the number of indicators; S22, x k Perform mutation processing to calculate the difference In the above formula, σ k represents the standard deviation of indicator k; Represents x1 to x m The average value of k Indicates the difference of index k; for x k Perform conflict resolution and calculate the degree of conflict: In the above formula, c k represents the conflict degree of index k; r kl represents the correlation coefficient between index k and index l, l = 1, 2, ..., m; x l Represents the historical data of indicator l after normalization; S23, based on c k d k Calculate the importance of indicator i: In the above formula, A k Indicates the importance of indicator k.

3. The method for predicting carbon emissions from coal-fired power plants based on the IPSO-LSTM model according to claim 1 is characterized in that: In step S3, the IPSO-LSTM neural network model is trained using the first training data set as follows: S31: Determine a hyperparameter range that needs to be adjusted in the LSTM neural network model based on the Bayesian optimization, where the hyperparameter range includes a learning rate, the number and size of LSTM layers, and an input sequence length; S32: Establish an objective function, and perform performance evaluation on the LSTM neural network model based on the objective function and a hyperparameter combination of the LSTM neural network model; S33: Build a Bayesian optimizer, use the Bayesian optimization algorithm to search for the optimal hyperparameter combination, and evaluate the next set of hyperparameter combinations based on the performance of the current LSTM neural network model in subsequent iterative training; S34: Use each hyperparameter combination selected by Bayesian optimization to train the LSTM neural network model, and use the validation dataset to evaluate the performance of the trained LSTM neural network model; S35: Iterative optimization is performed based on the performance evaluation results of different hyperparameter combinations to obtain a hyperparameter combination that improves the performance of the LSTM energy flow prediction model in subsequent iterations; S32: Establish an objective function, and perform performance evaluation on the LSTM neural network model based on the objective function and a hyperparameter combination of the LSTM neural network model; S33: Build a Bayesian optimizer, use the Bayesian optimization algorithm to search for the optimal hyperparameter combination, and evaluate the next set of hyperparameter combinations based on the performance of the current LSTM neural network model in subsequent iterative training; S34: Use each hyperparameter combination selected by Bayesian optimization to train the LSTM neural network model, and use the validation dataset to evaluate the performance of the trained LSTM neural network model; S35: Perform iterative optimization based on the performance evaluation results of different hyperparameter combinations to obtain the hyperparameter combination that improves the performance of the LSTM energy flow prediction model in subsequent iterations.

4. The method for predicting carbon emissions from coal-fired power plants based on the IPSO-LSTM model according to claim 1 is characterized in that: The step of obtaining the historical data of each indicator in the carbon emission indicator system of the coal-fired power plant throughout its life cycle in step 2 includes: S41: The optimization of the optimal carbon emission objective function is used as the fitness of the improved particle swarm algorithm; the expression for population initialization is: With k+1 =something(fuck) k ) where z k is an intermediate chaotic variable, and zk∈[1,1], x k is a population variable, and x k ∈[x min ,x max ]; The fitness expression of each particle is: fitnee(i)=f(x i ) In formula (16), f(x i ) is the objective function of the optimization problem; The expression for updating the velocity of each particle is: v i,t+1 =ωv i,t +Levy(s)[c1(pbest i,t -x i,t )+c2(gbest t -x i,t )] In formula (17), ω is the inertia coefficient, Levy(s) is the Levy flight strategy, c1 and c2 are acceleration factors, and x i,t is the position of the particle at the current moment, v i,t The velocity of the particle at the current moment, v i,t+1 is the updated velocity of the particle; The expression for the position of a particle is x i,t+1 =x i,t +v i,t+1 where x i,t+1 is the updated particle position, x i,t is the position of the particle at the current moment, v i,t+1 The updated velocity of the particle. S43: The historical data of the carbon emissions at the current moment and the result of the previous neuron output are input into the forget gate, and after passing through the sigmoid layer, a value f in the interval [0,1] is output. t , f t Multiply the cell state at the previous moment point by point to determine the retained value from the cell state at the previous moment to the cell state at the current moment; S43: Inputting the historical data of carbon emissions input at the current moment and the result of the previous neuron output into the sigmoid function layer in the input gate to obtain an output value, and updating the current unit state based on the output value; S44: The historical data of carbon emissions input at the current moment and the result of the previous neuron output are input into the sigmoid function layer in the output gate to obtain the value O(t) in the interval [0,1], and the updated current unit state is converted into an output value in the interval [-1,1] through the tanh function layer, and the output value is multiplied by O(t) to obtain the photovoltaic power generation power prediction data and the charging station charging load power prediction data; The expression of the forget gate is: f t =σ(W f *[h t-1 ,x t ]+b f ) σ is the activation function; W f Input weight for forget gate; b f is the bias term of the forget gate; The expression of the input gate is: i t =σ(W i ·[h t-1 ,x t ]+b i ) Among them, σ(*) is the sigmoid function, h t-1 is the hidden node output value at the previous moment, x t is the node input at the current moment, b i is the input gate bias term, b c is the unit state bias term, tanh is the activation function, Update the value for the cell state; The expression for updating the cell status is: f t is the forget gate, C t Update the value for the current cell state, C t-1 is the cell state at the previous moment; the expression of the output gate is: the t =σ(W o ·[h t-1 ,x t ]+b o ) h t =o t ×tan(C t ) o t is the output value of the output gate, W o is the weight of the output gate, b o is the bias of the output gate, h t is the hidden node output at the current moment, tan(C t ) is the updated value of the current unit state after conversion by the tanh function.