Carbon emission prediction method and system based on artificial intelligence
Through the carbon emission prediction method based on artificial intelligence, combining the convolutional neural network and the long short-term memory network to process the spatiotemporal relationship, and optimizing the model through the genetic algorithm, the problem of large deviation in carbon emission prediction in the existing technology is solved, and a more accurate prediction is achieved. Carbon emissions forecast.
Patent Information
- Application Number
- CN202410875502.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-10-01
AI Technical Summary
Existing technologies fail to effectively consider future influencing factors of various industries in carbon emission forecasting, resulting in large deviations in forecast values and reduced accuracy.
Adopt a carbon emission prediction method based on artificial intelligence, collect historical data related to carbon emissions for preprocessing, build an initial carbon emission prediction model, combine convolutional neural networks and long short-term memory networks to process spatiotemporal relationships, and optimize the model through genetic algorithms , achieving more accurate carbon emission predictions.
It improves the prediction accuracy of carbon emission data and takes into account factors affecting various industries in the future, making the prediction results more accurate.
Smart Images

Figure CN118735546A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of carbon emission prediction, and in particular relates to a carbon emission prediction method and system based on artificial intelligence. Background Art
[0002] In recent years, global warming has been recognized as one of the most pressing challenges to the world's environmental problems, and carbon emissions are considered to be the most important factor affecting global temperature changes. Therefore, predicting carbon emissions is of great significance for controlling carbon emissions.
[0003] At present, when predicting the carbon emissions of the target area in the future statistical time period, the predicted carbon emissions growth rate of the target area is mainly obtained by calculating the target expected data in the previous statistical time period, and this growth rate is used as the basis for calculation to obtain the predicted value of carbon emissions in the target area in the future statistical time period. Although this calculation method can obtain the predicted value of carbon emissions in the target area, the above calculation method does not take into account the factors that affect carbon emissions in various industries in the future during the calculation process, resulting in a large deviation in the final predicted value, which greatly reduces the accuracy of carbon emission data prediction in the target area. Summary of the invention
[0004] In order to solve the above technical problems, the present invention proposes a carbon emission prediction method and system based on artificial intelligence to solve the problems existing in the above-mentioned prior art.
[0005] To achieve the above object, the present invention provides a carbon emission prediction method based on artificial intelligence, comprising the following steps:
[0006] Collecting historical data of parameters related to carbon emissions, and preprocessing the historical data to obtain preprocessed data;
[0007] Dividing the preprocessed data to obtain a training set and a validation set;
[0008] Constructing an initial carbon emission prediction model, and training the initial carbon emission prediction model using the training set to obtain a training model;
[0009] Verifying the training model through the verification set, obtaining a carbon emission prediction model after verification, optimizing the carbon emission prediction model, and obtaining an optimal carbon emission prediction model;
[0010] Carbon emission prediction is performed based on the optimal carbon emission prediction model.
[0011] Preferably, the method for preprocessing the historical data includes:
[0012] Based on the 3σ principle, outliers are identified on the historical data to obtain outliers, the outliers are deleted to obtain cleaned values, and the cleaned values are normalized to obtain preprocessed data.
[0013] Preferably, the method for constructing an initial carbon emission prediction model comprises: constructing an initial carbon emission prediction model based on a convolutional neural network and a long short-term memory network;
[0014] When constructing the initial carbon emission prediction model, the appropriate network structure and hyperparameters are selected based on the cross-validation method.
[0015] Preferably, the method for training the initial carbon emission prediction model using the training set includes:
[0016] The model is trained based on the sliding window method;
[0017] During the training process, the error function is used to measure the difference between the predicted value and the true value, and the parameters of the model are updated based on the back propagation algorithm.
[0018] Preferably, the method for optimizing the carbon emission prediction model includes: optimizing the carbon emission prediction model based on a genetic algorithm.
[0019] The present invention also provides a carbon emission prediction system based on artificial intelligence, comprising:
[0020] Data collection module, used to collect historical data on carbon emission related parameters;
[0021] A data processing module, connected to the data acquisition module, is used to pre-process the historical data to obtain pre-processed data, and divide the pre-processed data to obtain a training set and a verification set;
[0022] an optimal carbon emission prediction model construction module, connected to the data preprocessing module, for constructing an initial carbon emission prediction model, training the initial carbon emission prediction model through the training set to obtain a training model; verifying the training model through the verification set, obtaining a carbon emission prediction model after verification, optimizing the carbon emission prediction model to obtain an optimal carbon emission prediction model;
[0023] The prediction module is connected to the optimal carbon emission prediction model construction module and performs carbon emission prediction based on the optimal carbon emission prediction model.
[0024] Preferably, the data processing module includes a preprocessing submodule and a partitioning submodule;
[0025] The preprocessing submodule is used to preprocess the historical data to obtain preprocessed data;
[0026] The partitioning submodule is used to partition the preprocessed data to obtain a training set and a validation set.
[0027] Preferably, the preprocessing submodule includes a data cleaning unit and a normalization unit;
[0028] The data cleaning unit is used to identify abnormal values of the historical data based on the 3σ principle to obtain abnormal values, and delete the abnormal values to obtain cleaning values;
[0029] The normalization unit is used to perform normalization processing on the cleaning value to obtain preprocessing data.
[0030] Compared with the prior art, the present invention has the following advantages and technical effects:
[0031] The present invention discloses a carbon emission prediction method and system based on artificial intelligence, and the method includes the following steps: collecting historical data of parameters related to carbon emissions and preprocessing them to obtain preprocessed data; dividing the preprocessed data to obtain a training set and a verification set; constructing an initial carbon emission prediction model, training the initial carbon emission prediction model through the training set to obtain a training model; verifying the training model through the verification set, obtaining a carbon emission prediction model after verification, optimizing the carbon emission prediction model to obtain an optimal carbon emission prediction model; and predicting carbon emissions based on the optimal carbon emission prediction model. The present invention uses historical data of carbon emission related parameters as prediction parameters, takes into account factors affecting carbon emissions in various industries in the future, and makes the predicted carbon emission data more accurate. The present invention combines a convolutional neural network and a long short-term memory network to construct a prediction model, wherein the convolutional neural network is used to extract spatial features in the input data, and the long short-term memory network is used to capture time series features in the input data. The combination of these two networks can better handle the spatiotemporal relationship in carbon emission prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0033] Figure 1 This is a flow chart of a carbon emission prediction method based on artificial intelligence according to an embodiment of the present invention;
[0034] Figure 2 A comparison diagram of the predicted results and the measured results of an embodiment of the present invention;
[0035] Figure 3 This is a structural diagram of the optimal carbon emission prediction model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0037] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0038] Embodiment 1
[0039] like Figure 1 As shown, this embodiment provides a carbon emission prediction method based on artificial intelligence, comprising the following steps:
[0040] Collect historical data of parameters related to carbon emissions, pre-process the historical data, and obtain pre-processed data;
[0041] The preprocessed data is divided into training set and validation set by 10-fold cross validation method;
[0042] Constructing an initial carbon emission prediction model, and training the initial carbon emission prediction model through a training set to obtain a training model;
[0043] The training model is verified through the verification set. After the verification, the carbon emission prediction model is obtained. The carbon emission prediction model is optimized to obtain the optimal carbon emission prediction model;
[0044] Carbon emissions are predicted based on the optimal carbon emissions prediction model. The prediction results are as follows: Figure 2 As shown, through Figure 2 It can be seen that the method of the present invention has a small error and can be implemented.
[0045] Furthermore, the method for preprocessing historical data includes:
[0046] Based on the 3σ principle, outliers are identified on historical data to obtain outliers, outliers are deleted to obtain cleaned values, and cleaned values are normalized to obtain preprocessed data.
[0047] The method for identifying outliers based on the 3σ principle is as follows:
[0048] Calculate mean and standard deviation: Calculate the mean and standard deviation of a data column.
[0049] Identify outliers: Compare the value of each data point to the mean and see if it deviates by more than 3 standard deviations. If a data point deviates by more than 3 standard deviations, it is considered an outlier.
[0050] Furthermore, the method for constructing an initial carbon emission prediction model includes: constructing an initial carbon emission prediction model based on a convolutional neural network and a long short-term memory network;
[0051] The method of extracting spatial features based on convolutional neural network is as follows:
[0052] The preprocessed historical data is input, and the convolution operation uses a convolution kernel (or filter) to perform a convolution operation on the input historical data to generate spatial features of the historical data.
[0053] Select the convolution kernel size: Select an appropriate convolution kernel size based on the characteristics of the historical data. In this embodiment, a larger convolution kernel is selected to cover a larger receptive field.
[0054] This embodiment can gradually extract high-level spatial features from the original data by stacking multiple convolutional layers.
[0055] This embodiment uses the ReLU activation function after each convolutional layer to introduce nonlinearity and increase the expressive power of the network.
[0056] The pooling layer is set up as follows:
[0057] By reducing the spatial size of the feature map through methods such as maximum pooling or average pooling, the computational complexity and number of parameters can be reduced. Despite the reduction in dimensionality, the pooling operation can effectively retain important feature information.
[0058] Feature aggregation: After the convolutional and pooling layers, a fully connected layer is used to aggregate the learned features to obtain spatial features.
[0059] The following is the temporal feature extraction process in LSTM, where (t) represents the time step, (x_t) is the input data, (h_t) is the hidden state, and (c_t) is the cell state:
[0060] Forget Gate: The Forget Gate controls whether the information in the previous cell state (c_{t-1}) should be retained or forgotten. Its calculation formula is as follows:
[0061] [f_t=\sigma(W_f\cdot[h_{t-1},x_t]+b_f)]
[0062] Where (\sigma) is the sigmoid function, (W_f) is the weight matrix of the forget gate, (b_f) is the bias vector, and ([h_{t-1},x_t]) is the concatenation of the hidden state of the previous time step (h_{t-1}) and the input of the current time step (x_t).
[0063] Input Gate: The input gate determines which parts of the new input (x_t) will update the cell state (c_t). Its calculation formula is as follows:
[0064] [i_t=\sigma(W_i\cdot[h_{t-1},x_t]+b_i)]
[0065] Updating the CellState: Use the input gate to update the cell state (c_t):
[0066] [\tilde{c}t=\tanh(W_c\cdot[h{t-1},x_t]+b_c)]
[0067] Among them, (\tilde{c}_t) is the candidate cell state, (\tanh) is the hyperbolic tangent function, (W_c) is the weight matrix for updating the cell state, and (b_c) is the bias vector.
[0068] Output Gate: The output gate determines which parts of the hidden state (h_t) will be output to the next time step. Its calculation formula is as follows:
[0069] [o_t=\sigma(W_o\cdot[h_{t-1},x_t]+b_o)]
[0070] Updating the Hidden State: Use the output gate to update the hidden state (h_t):
[0071] [h_t=o_t\cdot\tanh(c_t)]
[0072] Among them, (o_t) is the output of the output gate, and (\tanh(c_t)) is the tanh function of the current cell state.
[0073] The combination of these gating units enables LSTM to effectively capture and utilize long-term dependencies in time series data, thereby extracting temporal features and making accurate predictions.
[0074] When constructing the initial carbon emission prediction model, the appropriate network structure and hyperparameters are selected based on the cross-validation method.
[0075] The method for selecting appropriate network structure and hyperparameters based on cross-validation is:
[0076] Define the network structure: Construct multiple candidate network structures based on convolutional neural networks and long short-term memory networks. The network structure includes different numbers of layers, different types of layers (such as fully connected layers, convolutional layers, recurrent layers, etc.), and different activation functions and regularization techniques.
[0077] Hyperparameter tuning: For each network structure, a set of hyperparameter ranges are set. Hyperparameters include learning rate, batch size, number of iterations, number of hidden units, etc.
[0078] Cross-validation: Use cross-validation to evaluate the performance of each network structure under different hyperparameters. This includes training multiple subsets obtained through 10-fold cross-validation, using one subset as the validation set each time and the rest as the training set to evaluate the stability and generalization ability of the model.
[0079] Performance evaluation: record the performance indicators of each network structure under different hyperparameters, such as accuracy, loss function value, F1 score, etc. to prevent overfitting.
[0080] Select the optimal structure: Based on the results of cross-validation, select the network structure with the best performance.
[0081] Furthermore, the method of training the initial carbon emission prediction model through the training set includes:
[0082] The model is trained based on the sliding window method;
[0083] During the training process, the error function is used to measure the difference between the predicted value and the true value, and the parameters of the model are updated based on the back propagation algorithm.
[0084] The window is determined as follows:
[0085] Determine the window size: Determine an appropriate window size based on the size of the data set. This size is dynamically changing.
[0086] Initialize pointers: Set two pointers, usually one is the left pointer left and the other is the right pointer right, which define the range of the data set currently considered. At the beginning, these two pointers can be located at the beginning of the data set.
[0087] Window sliding: As data is gradually input, the right pointer moves to the right, expanding the window range until a certain stop condition is reached, such as the window contains enough data points or reaches a preset size limit. In this process, the model parameters are updated according to the data in the window.
[0088] Record intermediate results: During the window sliding process, record the performance indicators of the model, such as loss function value, accuracy, etc. These can be used as the basis for adjusting the window size and shape later.
[0089] Adjust the window size and shape: If the performance indicators of the model do not meet expectations, you can adjust the size or shape of the window according to the model running results. For example, if you find that the model performs poorly under a certain size window, you can try to reduce or expand the window, or change the shape of the window to adapt to the distribution of the data.
[0090] The loss function expression in training is:
[0091]
[0092] Where (K) is the total number of categories, y is the true label value (usually represented by one-hot encoding), and y′ is the probability distribution predicted by the model. In this formula, the subscript i traverses all possible categories, calculates the contribution of each category, and sums them up to get the total loss value. When the total loss value is less than the judgment threshold, the training ends.
[0093] Furthermore, the method for optimizing the carbon emission prediction model includes: optimizing the carbon emission prediction model based on a genetic algorithm.
[0094] Furthermore, the optimization process includes:
[0095] First, the objective function is set with the goal of minimizing the difference between the predicted value and the measured value;
[0096] Encode each carbon emission prediction model as a chromosome in the genetic algorithm;
[0097] A set of initial individuals is randomly generated as a population; the individuals represent possible models or combinations of model parameters.
[0098] The fitness of each individual is evaluated using the defined objective function, which can be done through cross-validation or other evaluation methods.
[0099] Through tournament selection, individuals with higher fitness are selected from the population to serve as parents for the next generation.
[0100] Select two individuals and generate new individuals through crossover operations (such as single-point crossover, multi-point crossover, etc.).
[0101] The newly generated individuals are mutated to maintain the diversity of the population and explore a wider search space. The specific method is to complete the mutation by fine-tuning the gene values.
[0102] The selection, crossover and mutation operations are repeated to generate a new population until the maximum number of iterations is reached.
[0103] The individual with the highest fitness is selected from the final population as the optimal model.
[0104] This embodiment also provides a carbon emission prediction system based on artificial intelligence, including:
[0105] Data collection module, used to collect historical data on carbon emission related parameters;
[0106] The data processing module is connected to the data acquisition module and is used to preprocess the historical data to obtain preprocessed data, and divide the preprocessed data to obtain a training set and a verification set;
[0107] The optimal carbon emission prediction model construction module is connected to the data preprocessing module and is used to construct an initial carbon emission prediction model. The initial carbon emission prediction model is trained through the training set to obtain the training model; the training model is verified through the verification set, and the carbon emission prediction model is obtained after the verification. The carbon emission prediction model is optimized to obtain the optimal carbon emission prediction model. The structure of the optimal carbon emission prediction model is as follows: Figure 3 As shown;
[0108] The prediction module is connected with the optimal carbon emission prediction model construction module, and performs carbon emission prediction based on the optimal carbon emission prediction model.
[0109] Further, the data processing module includes a preprocessing submodule and a partitioning submodule;
[0110] The preprocessing submodule is used to preprocess the historical data to obtain preprocessed data;
[0111] The partitioning submodule is used to partition the preprocessed data to obtain the training set and the validation set.
[0112] Further, the preprocessing submodule includes a data cleaning unit and a normalization unit;
[0113] The data cleaning unit is used to identify outliers in historical data based on the 3σ principle to obtain outliers, and delete outliers to obtain cleaned values;
[0114] The normalization unit is used to perform normalization processing on the cleaning value to obtain preprocessed data.
[0115] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A carbon emission prediction method based on artificial intelligence, characterized in that: The following steps are involved: Collecting historical data of parameters related to carbon emissions, and preprocessing the historical data to obtain preprocessed data; Dividing the preprocessed data to obtain a training set and a validation set; Constructing an initial carbon emission prediction model, and training the initial carbon emission prediction model using the training set to obtain a training model; Verifying the training model through the verification set, obtaining a carbon emission prediction model after verification, optimizing the carbon emission prediction model, and obtaining an optimal carbon emission prediction model; Carbon emission prediction is performed based on the optimal carbon emission prediction model.
2. The carbon emission prediction method based on artificial intelligence according to claim 1 is characterized in that: The method for preprocessing the historical data includes: Based on the 3σ principle, outliers are identified on the historical data to obtain outliers, the outliers are deleted to obtain cleaned values, and the cleaned values are normalized to obtain preprocessed data.
3. The carbon emission prediction method based on artificial intelligence according to claim 1 is characterized in that: The method for constructing an initial carbon emission prediction model includes: constructing an initial carbon emission prediction model based on a convolutional neural network and a long short-term memory network; When constructing the initial carbon emission prediction model, the appropriate network structure and hyperparameters are selected based on the cross-validation method.
4. The carbon emission prediction method based on artificial intelligence according to claim 1 is characterized in that: The method for training the initial carbon emission prediction model by using the training set includes: The model is trained based on the sliding window method; During the training process, the error function is used to measure the difference between the predicted value and the true value, and the parameters of the model are updated based on the back propagation algorithm.
5. The carbon emission prediction method based on artificial intelligence according to claim 1 is characterized in that: The method for optimizing the carbon emission prediction model includes: optimizing the carbon emission prediction model based on a genetic algorithm.
6. A carbon emission prediction system based on artificial intelligence, characterized in that: include: Data collection module, used to collect historical data on carbon emission related parameters; A data processing module, connected to the data acquisition module, is used to pre-process the historical data to obtain pre-processed data, and divide the pre-processed data to obtain a training set and a verification set; an optimal carbon emission prediction model construction module, connected to the data preprocessing module, for constructing an initial carbon emission prediction model, training the initial carbon emission prediction model through the training set to obtain a training model; verifying the training model through the verification set, obtaining a carbon emission prediction model after verification, optimizing the carbon emission prediction model to obtain an optimal carbon emission prediction model; The prediction module is connected to the optimal carbon emission prediction model construction module and performs carbon emission prediction based on the optimal carbon emission prediction model.
7. The carbon emission prediction system based on artificial intelligence according to claim 6 is characterized in that: The data processing module includes a preprocessing submodule and a partitioning submodule; The preprocessing submodule is used to preprocess the historical data to obtain preprocessed data; The partitioning submodule is used to partition the preprocessed data to obtain a training set and a validation set.
8. The carbon emission prediction system based on artificial intelligence according to claim 6, characterized in that: The preprocessing submodule includes a data cleaning unit and a normalization unit; The data cleaning unit is used to identify abnormal values of the historical data based on the 3σ principle to obtain abnormal values, and delete the abnormal values to obtain cleaning values; The normalization unit is used to perform normalization processing on the cleaning value to obtain preprocessing data.
Citation Information
Patent Citations
Carbon emission prediction method based on deep learning
CN115526296A
Carbon emission prediction system and method based on hybrid neural network model
CN116843083A
Combined heuristic carbon emission optimization method based on Pareto strategy
CN117236523A
Carbon emission prediction method and system for power industry
CN117493987A
Cited By
Carbon emission prediction method and system based on artificial intelligence
CN119647696A
Construction process carbon emission prediction method for intelligent manufacturing
CN120542609A
