Regional carbon emission prediction method and system based on carbon emission flow and big data analysis
By dividing the region into sub-regions and adopting specific data processing and prediction algorithms, the problem of complex prediction models in the prior art is solved, and efficient and accurate regional carbon emission prediction is achieved.
Patent Information
- Application Number
- CN202410494380.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-04-24
AI Technical Summary
The existing regional carbon emission prediction methods are complex models, and the lack of data affects the prediction accuracy, and differentiated predictions are not possible for different regions.
By dividing the target area into multiple sub-regions, determining the primary information set and the secondary information set based on Spearman coefficients, using Stacking and Blending algorithms for data training, constructing a sub-region carbon emission prediction model, and completing the missing data through the K-nearest neighbor algorithm.
A simple prediction model is realized, the lack of data does not affect the prediction accuracy, and differentiated predictions can be made for different regions, improving the accuracy and efficiency of carbon emission prediction.
Smart Images

Figure CN118485172B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a regional carbon emission prediction method based on carbon emission flow and big data analysis, and in particular to a regional carbon emission prediction method and system based on carbon emission flow and big data analysis. Background Art
[0002] Climate change, as a common challenge faced by all mankind, has had a profound impact on human life, ecology and economy. Electricity carbon emissions account for about 40% of the total carbon emissions in society. The power industry has a strong correlation with energy activities and carbon emissions. Dynamic prediction of regional carbon emissions through real-time electricity data can not only achieve high-frequency, high-precision, and high-resolution predictions, but also promote regional electrification and carbon reduction target planning, and achieve effective control of regional carbon emissions.
[0003] The existing regional carbon emission prediction methods include macro-statistical method and method based on electricity data to predict regional carbon emissions.
[0004] Although both prediction methods can predict regional carbon emission data to a certain extent, they still have the following defects:
[0005] 1. The existing regional carbon emission prediction methods require a large number of data types and quantities, and the prediction model is relatively complex. Once the data is missing, it will affect the accuracy of the prediction.
[0006] 2. The method of predicting regional carbon emissions based on electricity data is relatively rough. It does not take into account the energy structure, economic data and other information in the region. It is impossible to make differentiated predictions for different regions, and it is difficult to conduct impact analysis of carbon emission factors and achieve accurate prediction of regional carbon emissions.
[0007] The information disclosed in this background technology section is only intended to increase the understanding of the overall background of the application, and should not be regarded as acknowledging or suggesting in any form that the information constitutes the prior art already known to ordinary technicians in this field. Summary of the invention
[0008] The purpose of the present invention is to overcome the shortcomings of the prior art that the prediction model is relatively complex, data missing affects the prediction accuracy, and it is impossible to make differentiated predictions for different regions. A regional carbon emission prediction method and system based on carbon emission flow and big data analysis is provided, which has a simple prediction model, data missing does not affect the prediction accuracy, and can make differentiated predictions for different regions.
[0009] To achieve the above objectives, the technical solution of the present invention is:
[0010] A regional carbon emission prediction method based on carbon emission flow and big data analysis, characterized by comprising:
[0011] The regional carbon emission prediction method comprises the following steps:
[0012] S1. Regional division: divide the target area into multiple sub-areas, and determine the primary information set and secondary information set of each sub-area based on the Spearman coefficient of the power carbon emissions of each sub-area and the total carbon emissions of the sub-area;
[0013] S2, correlation analysis, ranking the correlation of the features that affect carbon emissions in the sub-information sets of each sub-region;
[0014] S3. Construct a sub-region carbon emission prediction model, select all features of the main information set of each sub-region and several features with high correlation rankings of the secondary information set, perform data training based on the different main information set and secondary information set features of the sub-region, and obtain the carbon emission prediction model of each sub-region after the training is completed;
[0015] S4. Perform simulation calculations based on the constructed carbon emission prediction models for each sub-region, input the characteristic data of each sub-region into the corresponding carbon emission prediction model, obtain the sub-region carbon emission prediction results and accumulate them to form the carbon emission prediction results for the target region.
[0016] The S1 comprises the following steps:
[0017] Each sub-region is divided into different administrative regions, and the Spearman coefficient p of the power carbon emission of each sub-region and the total carbon emission of the sub-region is calculated respectively. The expression of the value of the Spearman coefficient p is:
[0018]
[0019] in,
[0020] In the above formula, n is the number of samples, i is the sample number, c is i is the average grid carbon emission factor of sub-region i, Q i is the load power of sub-area i, K i is the total carbon emissions of the sub-region;
[0021] When |p|>0.7, the region is labeled as Class A; when 0.3<|p|<0.7, the region is labeled as Class B; when |p|<0.3, the region is labeled as Class C;
[0022] Based on the Spearman coefficient p, each sub-region is labeled with three types of labels: A (carbon emissions are strongly correlated with electricity), B (carbon emissions are moderately correlated with electricity), and C (carbon emissions are weakly correlated with electricity).
[0023] The main information set of the sub-region of the Class A tag includes regional carbon emissions, load power, and grid emission factors; the main information set of the sub-region of the Class B tag includes regional carbon emissions, load power, grid emission factors, and non-electric energy data; the main information set of the sub-region of the Class C tag includes regional carbon emissions and non-electric energy data, and the main information sets are all necessary features;
[0024] The secondary information set of the Class A tag includes non-electric energy data, economic data, and meteorological data; the secondary information set of the Class B tag includes economic data and meteorological data; the secondary information set of the Class C tag includes load power, power grid emission factor, economic data, and meteorological data;
[0025] Each sample data included in the primary information set is essential data that cannot be missing, and each sample data included in the secondary information set is non-essential data that can be missing.
[0026] In S2, for the missing sample data in the secondary information set, the data samples are preprocessed and completed using the K-nearest neighbor algorithm, and then the relevance of the preprocessed and completed secondary information set features is ranked using the maximum information coefficient.
[0027] In the preprocessing completion, the missing sample data is selected as the current prediction point, the Minkowski distance between the known points in the data set and the current prediction point is calculated, and the points are sorted in ascending order of distance. The k points with the smallest distance to the current prediction point are selected, and the frequency of occurrence of the categories of the first k points is counted. The category with the highest frequency of occurrence of the first k points is returned as the prediction classification of the current point. The Minkowski distance between two n-dimensional variables a(x11,x12,..,x1n) and b(x21,x22,..,x2n) is defined as:
[0028]
[0029] In the above formula, d 12 is the Minkowski distance, x 1k and x 2k is the number of k-th samples of two n-dimensional variables, and p is the variable parameter;
[0030] Then perform two-dimensional network segmentation on variables X and Y, and divide the data space into a×b grids. The frequency of data points falling in the (x, y) grid is an estimate of P(x, y). The expression of the data point frequency is:
[0031]
[0032] In the above formula, P(x,y) is the frequency of data points falling in the (x,y) grid, N (x,y) is the number of cells that fall into the (x, y) grid, N (i,j) is the number of cells that fall into the (i, j) grid;
[0033] Mutual information represents the amount of information contained in variables X and Y and the degree of mutual correlation. The expression for the mutual information representing the amount of information contained in variables X and Y and the degree of mutual correlation is:
[0034]
[0035] In the formula, I(X, Y) is the mutual information, which represents the amount of information and the degree of correlation between variables X and Y. F(x, y) is the joint probability density function. F(x) and F(y) are the marginal probability density functions of variables X and Y, respectively. The normalized result is used to detect the correlation between variables X and Y. The value is in the interval [0, 1]. The MIC formula of the two variables X and Y in the set is:
[0036] In the above formula, MIC(X, Y) is the maximum information coefficient of variables X and Y, L is the grid-restricted variable, N(i, j) is the data scale, and the value of the constant θ is set according to experience or scale.
[0037] The S3 comprises the following steps:
[0038] S3.1. Based on the different labels of the sub-regions, different prediction algorithms are selected for data training to obtain the carbon emission prediction base model of each sub-region and the carbon emission prediction model to be determined of each sub-region. When the sub-region label is Class A or Class C, proceed to S3.2; when the sub-region label is Class B, proceed to S3.3;
[0039] S3.2. For the A and C label areas, all the features of the main information set and several features of the secondary information set of each sub-area are selected, and carbon emission prediction is carried out through the Stacking algorithm:
[0040] The sub-region information is divided into a meta-training set and a meta-testing set on the meta-learner, and the meta-training set is divided into a base training set and a base test set on the base learner. The base learners are trained and predicted. X convolutional neural network architectures are selected as base learners. The model is trained on the K-1 fold using the K-fold cross-validation method and verified on the K-th fold. Each base learner is trained K times, and a total of xK times are trained to generate all base models and prediction results. A prediction model is made on the meta-learner based on the prediction data of the base learners. Y convolutional neural network architectures are selected as meta-learners. The training results of each learner are averaged to obtain the final classification result of the meta-testing set. Then, S3.4 is entered.
[0041] S3.3. For the B-label area, carbon emission prediction is carried out through the Blending algorithm:
[0042] The original information data of the sub-region is divided into a training data set, a verification data set, and a test data set, and a blending model framework is built to form a first-stage model. The first-stage model is trained using the training data set, and the verification data set and the test data set are respectively used to run on the trained first-stage model to obtain the output results of the two. The feature vector composed of the output results of the verification data set is used as the training set of the second-stage model, and the test data set results obtained by the first-stage model are used as the test data set of the second-stage model to obtain the final classification result of the model, and then enter S3.4;
[0043] S3.4. Evaluate the carbon emissions of each sub-region. To determine whether the prediction base model meets the accuracy requirements, the accuracy and reliability of the prediction results of each sub-region are evaluated by MAPE. The expression of MAPE is:
[0044]
[0045] In the above formula, MAPE is the accuracy and reliability of the prediction results, n is the sample size, i is the sample number, is the predicted value of the i-th sample, y i is the actual value of the i-th sample. If it meets the accuracy requirements, the prediction base model to be determined will be used as the sub-region carbon emission prediction model for prediction. If it does not meet the accuracy requirements, the number of features will be expanded, and the top w+1 features in the secondary information set will be selected for retraining.
[0046] The regional carbon emission prediction result in S4 is the sum of the prediction results obtained by each sub-region through its own carbon emission prediction model. The expression of the regional carbon emission prediction result is:
[0047]
[0048] In the above formula, is the regional carbon emission prediction result, is the carbon emission prediction result for the i-th sub-region, and n is the number of sub-regions.
[0049] The carbon emission factor in the main information set is obtained based on the electricity carbon emission flow. The grid emission factor of the sub-region is the average carbon emission factor of sub-region i in a certain time period T. The expression of the average carbon emission factor of sub-region i is:
[0050]
[0051] In the above formula, c i is the average grid carbon emission factor of sub-region i, is the direct carbon emissions of power plants directly connected to sub-region i, is the indirect carbon emission injected into the carbon emission flow of sub-region i, Q iis the load power of sub-area i, Q out is the power flow out of sub-area i.
[0052] A regional carbon emission prediction system based on carbon emission flow and big data analysis, the prediction system comprising a regional division module, a correlation analysis module, a model building module and a simulation calculation module;
[0053] A region division module, used to perform the aforementioned operations of dividing the target region into multiple sub-regions, labeling each sub-region, and forming a primary information set and a secondary information set for each sub-region according to different labels;
[0054] Each sub-region is divided into different administrative regions, and the Spearman coefficient p of the power carbon emission of each sub-region and the total carbon emission of the sub-region is calculated respectively. The expression of the value of the Spearman coefficient p is:
[0055]
[0056] in,
[0057] In the above formula, n is the number of samples, i is the sample number, c is i is the average grid carbon emission factor of sub-region i, Q i is the load power of sub-area i, K i is the total carbon emissions of the sub-region;
[0058] When |p|>0.7, the region is labeled as Class A; when 0.3<|p|<0.7, the region is labeled as Class B; when |p|<0.3, the region is labeled as Class C;
[0059] Based on the Spearman coefficient p, each sub-region is labeled with three types of labels: A (carbon emissions are strongly correlated with electricity), B (carbon emissions are moderately correlated with electricity), and C (carbon emissions are weakly correlated with electricity).
[0060] The main information set of the sub-region of the Class A tag includes regional carbon emissions, load power, and grid emission factors; the main information set of the sub-region of the Class B tag includes regional carbon emissions, load power, grid emission factors, and non-electric energy data; the main information set of the sub-region of the Class C tag includes regional carbon emissions and non-electric energy data, and the main information sets are all necessary features;
[0061] The secondary information set of the Class A tag includes non-electric energy data, economic data, and meteorological data; the secondary information set of the Class B tag includes economic data and meteorological data; the secondary information set of the Class C tag includes load power, power grid emission factor, economic data, and meteorological data;
[0062] Each sample data included in the primary information set is essential data that cannot be missing, and each sample data included in the secondary information set is non-essential data that can be missing.
[0063] It is used to divide the target area into multiple sub-areas, label each sub-area, and form a primary information set and a secondary information set for each sub-area according to different labels;
[0064] A correlation analysis module, used to perform the aforementioned operation of ranking the correlation of the features affecting carbon emissions in the sub-information sets of each sub-region by using the KNN-MIC algorithm;
[0065] For the missing sample data in the secondary information set, the data samples are preprocessed and completed using the K-nearest neighbor algorithm, and then the relevance of the preprocessed and completed secondary information set features is ranked using the maximum information coefficient;
[0066] The model building module is used to execute the aforementioned selection of all features of the main information set of each sub-region and several features with high correlation rankings of the secondary information set, and to perform data training based on the different main information set and secondary information set features of the sub-region. After the training is completed, the carbon emission prediction model of each sub-region is obtained. The specific operations include:
[0067] S3.1. Based on the different labels of the sub-regions, different prediction algorithms are selected for data training to obtain the carbon emission prediction base model of each sub-region and the carbon emission prediction model to be determined of each sub-region. When the sub-region label is Class A or Class C, proceed to S3.2; when the sub-region label is Class B, proceed to S3.3;
[0068] S3.2. For the A and C label areas, all the features of the main information set and several features of the secondary information set of each sub-area are selected, and carbon emission prediction is carried out through the Stacking algorithm:
[0069] The sub-region information is divided into a meta-training set and a meta-testing set on the meta-learner, and the meta-training set is divided into a base training set and a base test set on the base learner. The base learners are trained and predicted. X convolutional neural network architectures are selected as base learners. The model is trained on the K-1 fold using the K-fold cross-validation method and verified on the K-th fold. Each base learner is trained K times, and a total of xK times are trained to generate all base models and prediction results. A prediction model is made on the meta-learner based on the prediction data of the base learners. Y convolutional neural network architectures are selected as meta-learners. The training results of each learner are averaged to obtain the final classification result of the meta-testing set. Then, S3.4 is entered.
[0070] S3.3. For the B-label area, carbon emission prediction is carried out through the Blending algorithm:
[0071] The original information data of the sub-region is divided into a training data set, a verification data set, and a test data set, and a blending model framework is built to form a first-stage model. The first-stage model is trained using the training data set, and the verification data set and the test data set are respectively used to run on the trained first-stage model to obtain the output results of the two. The feature vector composed of the output results of the verification data set is used as the training set of the second-stage model, and the test data set results obtained by the first-stage model are used as the test data set of the second-stage model to obtain the final classification result of the model, and then enter S3.4;
[0072] S3.4. Evaluate the carbon emissions of each sub-region. To determine whether the prediction base model meets the accuracy requirements, the accuracy and reliability of the prediction results of each sub-region are evaluated by MAPE. The expression of MAPE is:
[0073]
[0074] In the above formula, MAPE is the accuracy and reliability of the prediction results, n is the sample size, i is the sample number, is the predicted value of the i-th sample, y i is the actual value of the i-th sample. If it meets the accuracy requirements, the prediction base model to be determined will be used as the sub-region carbon emission prediction model for prediction. If it does not meet the accuracy requirements, the number of features will be expanded, and the top w+1 features in the secondary information set will be selected for retraining.
[0075] The simulation calculation module is used to perform the simulation calculation based on the aforementioned constructed carbon emission prediction models for each sub-region, input the characteristic data of each sub-region into the corresponding carbon emission prediction model, obtain the sub-region carbon emission prediction results and accumulate them to form the regional carbon emission prediction results. The specific operations include:
[0076] The regional carbon emission prediction result in S4 is the sum of the prediction results obtained by each sub-region through its own carbon emission prediction model. The expression of the regional carbon emission prediction result is:
[0077]
[0078] In the above formula, is the regional carbon emission prediction result, is the carbon emission prediction result for the i-th sub-region, and n is the number of sub-regions.
[0079] The carbon emission factor in the main information set is obtained based on the electricity carbon emission flow. The grid emission factor of the sub-region is the average carbon emission factor of sub-region i in a certain time period T. The expression of the average carbon emission factor of sub-region i is:
[0080]
[0081] In the above formula, c i is the average grid carbon emission factor of sub-region i, is the direct carbon emissions of power plants directly connected to sub-region i, is the indirect carbon emission injected into the carbon emission flow of sub-region i, Q i is the load power of sub-area i, Q out is the power flow out of sub-area i.
[0082] A regional carbon emission prediction device based on carbon emission flow and big data analysis, wherein the memory is used to store computer program code and transmit the computer program code to the processor; the processor is used to execute a regional carbon emission prediction method based on carbon emission flow and big data analysis according to the instructions in the computer program code.
[0083] Compared with the prior art, the present invention has the following beneficial effects:
[0084] 1. In the regional carbon emission prediction method based on carbon emission flow and big data analysis of the present invention, the target area is divided into several sub-areas, and the data of each sub-area is collected respectively. According to the amount of data in different sub-areas, different algorithms are used for training respectively to obtain the carbon emission prediction model of each sub-area. Therefore, this design can obtain different prediction models according to different data types, so as to perform differentiated predictions for different regions.
[0085] 2. In the regional carbon emission prediction method based on carbon emission flow and big data analysis of the present invention, each sub-region is labeled. Different labels of sub-regions reflect different energy consumption characteristics. After labeling, the amount of data and calculation required for prediction can be minimized while ensuring the prediction accuracy of the model. Therefore, this design can effectively reduce the difficulty of solving through labeling, and shorten the regional carbon emission prediction time.
[0086] 3. In the regional carbon emission prediction method based on carbon emission flow and big data analysis of the present invention, the Stacking algorithm and the Blending algorithm are used to carry out carbon emission prediction according to the data in the main information set of each sub-region. When the data in the main information set of the sub-region is small, the model accuracy is improved by the Stacking algorithm. When the data in the main information set of the sub-region is large, the prediction speed is improved by the Blending algorithm. Therefore, this design can use different algorithms to carry out carbon emission prediction according to different sample data volumes, effectively improving the comprehensive effect of the carbon emission prediction method.
[0087] 4. In the regional carbon emission prediction method based on carbon emission flow and big data analysis of the present invention, the input data is divided into a main information set and a secondary information set. The main information set is the necessary data that cannot be missing, and the secondary information set is the non-essential data that can be missing. When the non-essential data is missing, the data sample can be pre-processed and supplemented by the K-nearest neighbor algorithm to improve the prediction accuracy when some data is missing. Therefore, this design can pre-process and supplement the data sample, effectively improving the prediction accuracy when the data is missing. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] Figure 1 It is a flow chart of the prediction method in the present invention.
[0089] Figure 2 It is a structural block diagram of the prediction system in the present invention.
[0090] Figure 3 This is a flow chart of Example 1.
[0091] Figure 4 It is a structural block diagram of the regional carbon emission prediction device in the present invention. DETAILED DESCRIPTION
[0092] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0093] The principle of the present invention is as follows:
[0094] In the present invention, the main information set data of the A and C label areas are relatively small, and the Stacking algorithm is used to carry out carbon emission prediction, while the main information set data of the B label area is relatively large, and the Blending algorithm is used to carry out carbon emission prediction.
[0095] Embodiment 1:
[0096] See also Figure 1 and Figure 3 , a regional carbon emission prediction method based on carbon emission flow and big data analysis, characterized by comprising:
[0097] The regional carbon emission prediction method comprises the following steps:
[0098] S1. Regional division: divide the target area into multiple sub-areas, and determine the primary information set and secondary information set of each sub-area based on the Spearman coefficient of the power carbon emissions of each sub-area and the total carbon emissions of the sub-area;
[0099] S2, correlation analysis, ranking the correlation of the features that affect carbon emissions in the sub-information sets of each sub-region;
[0100] S3. Construct a sub-region carbon emission prediction model, select all features of the main information set of each sub-region and several features with high correlation rankings of the secondary information set, perform data training based on the different main information set and secondary information set features of the sub-region, and obtain the carbon emission prediction model of each sub-region after the training is completed;
[0101] S4. Perform simulation calculations based on the constructed carbon emission prediction models for each sub-region, input the characteristic data of each sub-region into the corresponding carbon emission prediction model, obtain the sub-region carbon emission prediction results and accumulate them to form the target area carbon emission prediction results;
[0102] The S1 comprises the following steps:
[0103] Each sub-region is divided into different administrative regions, and the Spearman coefficient p of the power carbon emission of each sub-region and the total carbon emission of the sub-region is calculated respectively. The expression of the value of the Spearman coefficient p is:
[0104]
[0105] in,
[0106] In the above formula, n is the number of samples, i is the sample number, c is i is the average grid carbon emission factor of sub-region i, Q i is the load power of sub-area i, K i is the total carbon emissions of the sub-region;
[0107] When |p|>0.7, the region is labeled as Class A; when 0.3<|p|<0.7, the region is labeled as Class B; when |p|<0.3, the region is labeled as Class C;
[0108] Based on the Spearman coefficient p, each sub-region is labeled with three types of labels: A (carbon emissions are strongly correlated with electricity), B (carbon emissions are moderately correlated with electricity), and C (carbon emissions are weakly correlated with electricity).
[0109] The main information set of the sub-region of the Class A tag includes regional carbon emissions, load power, and grid emission factors; the main information set of the sub-region of the Class B tag includes regional carbon emissions, load power, grid emission factors, and non-electric energy data; the main information set of the sub-region of the Class C tag includes regional carbon emissions and non-electric energy data, and the main information sets are all necessary features;
[0110] The secondary information set of the Class A tag includes non-electric energy data, economic data, and meteorological data; the secondary information set of the Class B tag includes economic data and meteorological data; the secondary information set of the Class C tag includes load power, power grid emission factor, economic data, and meteorological data;
[0111] Each sample data included in the primary information set is essential data that cannot be missing, and each sample data included in the secondary information set is non-essential data that can be missing.
[0112] In S2, for the missing sample data in the secondary information set, the data samples are preprocessed and completed using the K-nearest neighbor algorithm, and then the relevance of the preprocessed and completed secondary information set features is ranked using the maximum information coefficient.
[0113] In the preprocessing completion, the missing sample data is selected as the current prediction point, the Minkowski distance between the known points in the data set and the current prediction point is calculated, and the points are sorted in ascending order of distance. The k points with the smallest distance to the current prediction point are selected, and the frequency of occurrence of the categories of the first k points is counted. The category with the highest frequency of occurrence of the first k points is returned as the prediction classification of the current point. The Minkowski distance between two n-dimensional variables a(x11,x12,..,x1n) and b(x21,x22,..,x2n) is defined as:
[0114]
[0115] In the above formula, d 12 is the Minkowski distance, x 1k and x 2k is the number of k-th samples of two n-dimensional variables, and p is the variable parameter;
[0116] Then perform two-dimensional network segmentation on variables X and Y, and divide the data space into a×b grids. The frequency of data points falling in the (x, y) grid is an estimate of P(x, y). The expression of the data point frequency is:
[0117]
[0118] In the above formula, P(x,y) is the frequency of data points falling in the (x,y) grid, N (x,y) is the number of cells that fall into the (x, y) grid, N (i,j) is the number of cells falling into the (i, j) grid;
[0119] Mutual information represents the amount of information contained in variables X and Y and the degree of mutual correlation. The expression for the mutual information representing the amount of information contained in variables X and Y and the degree of mutual correlation is:
[0120]
[0121] In the formula, I(X, Y) is the mutual information, which represents the amount of information and the degree of correlation between variables X and Y. F(x, y) is the joint probability density function. F(x) and F(y) are the marginal probability density functions of variables X and Y, respectively. The normalized result is used to detect the correlation between variables X and Y. The value is in the interval [0, 1]. The MIC formula of the two variables X and Y in the set is:
[0122]
[0123] In the above formula, MIC(X, Y) is the maximum information coefficient of variables X and Y, L is the grid-restricted variable, N(i, j) is the data scale, and the value of the constant θ is set according to experience or scale.
[0124] The S3 comprises the following steps:
[0125] S3.1. Based on the different labels of the sub-regions, different prediction algorithms are selected for data training to obtain the carbon emission prediction base model of each sub-region and the carbon emission prediction model to be determined of each sub-region. When the sub-region label is Class A or Class C, proceed to S3.2; when the sub-region label is Class B, proceed to S3.3;
[0126] S3.2. For the A and C label areas, all the features of the main information set and several features of the secondary information set of each sub-area are selected, and carbon emission prediction is carried out through the Stacking algorithm:
[0127] The sub-region information is divided into a meta-training set and a meta-testing set on the meta-learner, and the meta-training set is divided into a base training set and a base test set on the base learner. The base learners are trained and predicted. X convolutional neural network architectures are selected as base learners. The model is trained on the K-1 fold using the K-fold cross-validation method and verified on the K-th fold. Each base learner is trained K times, and a total of xK times are trained to generate all base models and prediction results. A prediction model is made on the meta-learner based on the prediction data of the base learners. Y convolutional neural network architectures are selected as meta-learners. The training results of each learner are averaged to obtain the final classification result of the meta-testing set. Then, S3.4 is entered.
[0128] S3.3. For the B-label area, carbon emission prediction is carried out through the Blending algorithm:
[0129] The original information data of the sub-region is divided into a training data set, a verification data set, and a test data set, and a blending model framework is built to form a first-stage model. The first-stage model is trained using the training data set, and the verification data set and the test data set are respectively used to run on the trained first-stage model to obtain the output results of the two. The feature vector composed of the output results of the verification data set is used as the training set of the second-stage model, and the test data set results obtained by the first-stage model are used as the test data set of the second-stage model to obtain the final classification result of the model, and then enter S3.4;
[0130] S3.4. Evaluate the carbon emissions of each sub-region. To determine whether the prediction base model meets the accuracy requirements, the accuracy and reliability of the prediction results of each sub-region are evaluated by MAPE. The expression of MAPE is:
[0131]
[0132] In the above formula, MAPE is the accuracy and reliability of the prediction results, n is the sample size, i is the sample number, is the predicted value of the i-th sample, y i is the actual value of the i-th sample. If it meets the accuracy requirements, the prediction base model to be determined will be used as the sub-region carbon emission prediction model for prediction. If it does not meet the accuracy requirements, the number of features will be expanded, and the top w+1 features in the secondary information set will be selected for retraining.
[0133] The regional carbon emission prediction result in S4 is the sum of the prediction results obtained by each sub-region through its own carbon emission prediction model. The expression of the regional carbon emission prediction result is:
[0134]
[0135] In the above formula, is the regional carbon emission prediction result, is the carbon emission prediction result for the i-th sub-region, and n is the number of sub-regions.
[0136] The carbon emission factor in the main information set is obtained based on the electricity carbon emission flow. The grid emission factor of the sub-region is the average carbon emission factor of sub-region i in a certain time period T. The expression of the average carbon emission factor of sub-region i is:
[0137]
[0138] In the above formula, c i is the average grid carbon emission factor of sub-region i, is the direct carbon emissions of power plants directly connected to sub-region i, is the indirect carbon emission injected into the carbon emission flow of sub-region i, Q iis the load power of sub-area i, Q out is the power flow out of sub-area i.
[0139] Embodiment 2:
[0140] A regional carbon emission prediction method based on carbon emission flow and big data analysis;
[0141] S1, divide the target area into sub-areas A1, A2, and A3 according to administrative management, label the sub-areas, and form respective primary information sets and secondary information sets according to different labels;
[0142] Based on the Spearman coefficient p of the electricity carbon emissions of each sub-region and the total carbon emissions of the sub-region, each sub-region is labeled with three labels: A (carbon emissions are strongly correlated with electricity), B (carbon emissions are moderately correlated with electricity), and C (carbon emissions are weakly correlated with electricity); the values of the Spearman coefficient p are:
[0143]
[0144] in,
[0145] In the formula, c is the average grid carbon emission factor of the sub-region, Q is the load power of the sub-region, and K is the total carbon emission of the sub-region; when |p|>0.7, the region is labeled as Class A; when 0.3<|p|<0.7, the region is labeled as Class B; when |p|<0.3, the region is labeled as Class B;
[0146] Among them, the grid emission factors of sub-areas A1, A2, and A3 need to be obtained based on the electricity carbon emission flow, which is the average carbon emission factor for a period of time T, and are:
[0147]
[0148] Where ci is the average grid carbon emission factor of sub-region i, is the direct carbon emissions of power plants directly connected to sub-region i, is the indirect carbon emission injected into the carbon emission flow of sub-region i, Q i is the load power of sub-area i, Q out is the power flow out of sub-area i;
[0149] For the missing sample data in the secondary information set, the K-nearest neighbor algorithm (KNN) is used to preprocess and complete the data samples; the Minkowski distance between the points in the known data set and the current prediction point is calculated, sorted in ascending order of distance, and the k points with the smallest distance to the current prediction point are selected. The frequency of the categories of the first k points is counted, and the category with the highest frequency of the first k points is returned as the prediction classification of the current point; two n-dimensional variables a(x 11 ,x12 ,..,x 1n ) and b(x 21 ,x 22 ,..,x 2n ) is defined as:
[0150]
[0151] In the formula, p takes the value of 1, that is, Manhattan distance is used to sort the points in the data set and the missing sample points in ascending order;
[0152] S2. Conduct MIC correlation analysis and rank the characteristics of sub-regional information concentrations that affect carbon emissions;
[0153] Through MIC correlation analysis, the correlation ranking of the features in the sub-region sub-information set is performed; the variables X and Y are segmented into two-dimensional networks, and the data space is divided into a×b grids. The frequency of data points falling in the (x, y) grid is an estimate of P(x, y), then:
[0154]
[0155] Mutual information represents the amount of information and the degree of correlation between variables X and Y, which is:
[0156]
[0157] In the formula, I(X, Y) is the mutual information, which represents the amount of information and the degree of correlation between variables X and Y. F(x, y) is the joint probability density function. F(x) and F(y) are the marginal probability density functions of variables X and Y, respectively. The normalized result is used to detect the correlation between variables X and Y. The value is in the interval [0, 1]. The MIC formula of the two variables X and Y in the set is:
[0158]
[0159] Where B is the grid limit variable, N (i,j) is the data scale; the value of constant θ is 0.55;
[0160] S3, selecting the features of the main information set and several features of the secondary information set, using the Stacking algorithm for training, and evaluating the accuracy of the carbon emission prediction model of each sub-region to obtain the carbon emission prediction model of each sub-region;
[0161] After ranking the features that affect carbon emissions in the sub-regional information sets by relevance, select the top two features in the main information set and the sub-information set;
[0162]
[0163] The sub-region information is divided into a meta-training set and a meta-testing set on the meta-learner, and the meta-training set is divided into a base training set and a base test set on the base learner;
[0164] Assume that there are 100 data sets in each sub-area A1 and A3 information set. Randomly divide the 100 data sets in each sub-area into two piles, one with 80 groups as the meta-training set and the other with 20 groups as the meta-test set.
[0165] The training set in the meta-learner is divided into a training set and a test set by k-fold cross-validation. Here, k=4, that is, 20 groups in the meta-training set are selected as the base test set each time, and the remaining 60 groups are selected as the base training set; x algorithm models are selected as base learners, where x=3, namely Random Forest, XGBoost, and LightGBM. Each algorithm uses 3 folds (60 groups of data) to train the model and verifies it on the 4th fold (20 groups of data); 4-fold cross-validation is performed until the complete 4 folds are completed. Each base learner algorithm is trained 4 times, for a total of 12 times, to generate all base models and prediction results;
[0166] Based on the prediction data of the base learner, a prediction model is built on the meta-learner. Y algorithm models are selected as meta-learners. Here, y=2, which are Linear Regression and Logistic Regression respectively. The training results of each learner are averaged to obtain the final classification result of the meta-test set.
[0167] Assume that the sub-area A2 information set has 100 sets of data, and randomly divide the 100 sets of data into three piles, one pile of 60 sets as the training data set, one pile of 20 sets as the verification data set, and one pile of 20 sets as the test data set;
[0168] Build a blending model framework to form the first-stage model. Train the first-stage model with 60 sets of data in the training data set. After the training is completed, use the validation data set and the test data set to run on the trained first-stage model to obtain the output results of both. Use the feature vector composed of the output results of the validation data set as the training set of the second-stage model, and use the test data set results obtained by the first-stage model as the test data set of the second-stage model to obtain the final classification result of the model.
[0169] Evaluate the accuracy of the carbon emission prediction model for each sub-region. If the accuracy meets the requirements, use the model for prediction. If not, expand the number of features or adjust the integration method and re-predict.
[0170] MAPE is used to evaluate the accuracy and reliability of the prediction results of sub-areas A1, A2, and A3 respectively;
[0171]
[0172] In the formula, n=100 is the sample size, is the predicted value of the i-th sample, y i is the actual value of the i-th sample; obtain the root mean square errors MAPE1, MAPE2, and MAPE3 of the prediction results of sub-areas A1, A2, and A3; set the model accuracy requirement to 5%. When the root mean square errors of the prediction results of sub-areas A1, A2, and A3 are less than 5%, it indicates that the model accuracy meets the requirements; if it does not meet the requirements, expand the number of features and re-predict, and change "select the main information set features and the top 2 features of the secondary information set" to "select the main information set features and the top 3 features of the secondary information set";
[0173] S4. Input the characteristic data of each sub-region into their respective carbon emission prediction models, and obtain the carbon emission prediction results of sub-regions A1, A2, and A3 respectively. Then the regional carbon emission prediction result is:
[0174]
[0175] Embodiment 3:
[0176] See also Figure 2 , a regional carbon emission prediction system based on carbon emission flow and big data analysis, the prediction system includes a regional division module, a correlation analysis module, a model construction module and a simulation calculation module;
[0177] The region division module is used to divide the target region into multiple sub-regions, label each sub-region, and form a primary information set and a secondary information set for each sub-region according to different labels;
[0178] A correlation analysis module is used to rank the relevance of the features that affect carbon emissions in the sub-regional information sets;
[0179] The model building module is used to select all the features of the main information set of each sub-region and several features with high correlation rankings in the secondary information set, and perform data training based on the different main information set and secondary information set features of the sub-region. After the training is completed, the carbon emission prediction model of each sub-region is obtained;
[0180] The simulation calculation module is used to perform simulation calculations using the constructed sub-region carbon emission prediction model, accumulate the carbon emission prediction results of all sub-regions, and output the regional carbon emission prediction results.
[0181] Embodiment 4:
[0182] See also Figure 4, a regional carbon emission prediction device based on carbon emission flow and big data analysis, the memory is used to store computer program code and transfer the computer program code to the processor; the processor is used to execute the regional carbon emission prediction method based on carbon emission flow and big data analysis according to the instructions in the computer program code.
[0183] The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiment. Any equivalent modifications or changes made by ordinary technicians in this field based on the contents disclosed by the present invention should be included in the protection scope recorded in the claims.
Claims
1. A regional carbon emission prediction method based on carbon emission flow and big data analysis, characterized in that include: The regional carbon emission prediction method comprises the following steps: S1. Regional division: divide the target area into multiple sub-areas, and determine the primary information set and secondary information set of each sub-area based on the Spearman coefficient of the power carbon emissions of each sub-area and the total carbon emissions of the sub-area; S2, correlation analysis, ranking the correlation of the features that affect carbon emissions in the sub-information sets of each sub-region; S3. Construct a sub-region carbon emission prediction model, select all features of the main information set of each sub-region and several features with high correlation rankings of the secondary information set, perform data training based on the different main information set and secondary information set features of the sub-region, and obtain the carbon emission prediction model of each sub-region after the training is completed; S4. Perform simulation calculations based on the constructed carbon emission prediction models for each sub-region, input the characteristic data of each sub-region into the corresponding carbon emission prediction model, obtain the sub-region carbon emission prediction results and accumulate them to form the target area carbon emission prediction results; The S1 comprises the following steps: Each sub-region is divided into different administrative regions, and the Spearman coefficient p of the power carbon emission of each sub-region and the total carbon emission of the sub-region is calculated respectively. The expression of the value of the Spearman coefficient p is: in, In the above formula, n is the number of samples, i is the sample number, c is i is the average grid carbon emission factor of sub-region i, Q i is the load power of sub-area i, K i is the total carbon emissions of the sub-region; When |p|>0.7, the region is labeled as Class A; when 0.3<|p|<0.7, the region is labeled as Class B; when |p|<0.3, the region is labeled as Class C; Based on the Spearman coefficient p, each sub-region is labeled with three types of labels: A, B, and C; The main information set of the sub-region of the Class A tag includes regional carbon emissions, load power, and grid emission factors; the main information set of the sub-region of the Class B tag includes regional carbon emissions, load power, grid emission factors, and non-electric energy data; the main information set of the sub-region of the Class C tag includes regional carbon emissions and non-electric energy data, and the main information sets are all necessary features; The secondary information set of the Class A tag includes non-electric energy data, economic data, and meteorological data; the secondary information set of the Class B tag includes economic data and meteorological data; the secondary information set of the Class C tag includes load power, power grid emission factor, economic data, and meteorological data; Each sample data included in the primary information set is essential data that cannot be missing, and each sample data included in the secondary information set is non-essential data that can be missing; In S2, for the missing sample data in the secondary information set, the data samples are preprocessed and completed using the K-nearest neighbor algorithm, and then the relevance ranking of the preprocessed and completed secondary information set features is performed using the maximum information coefficient; In the preprocessing completion, the missing sample data is selected as the current prediction point, the Minkowski distance between the known points in the data set and the current prediction point is calculated, and the points are sorted in ascending order of distance. The k points with the smallest distance to the current prediction point are selected, and the frequency of occurrence of the categories of the first k points is counted. The category with the highest frequency of occurrence of the first k points is returned as the prediction classification of the current point. The Minkowski distance between two n-dimensional variables a(x11,x12,..,x1n) and b(x21,x22,..,x2n) is defined as: In the above formula, d 12 is the Minkowski distance, x 1k and x 2k is the number of k-th samples of two n-dimensional variables, and p is the variable parameter; Then perform two-dimensional network segmentation on variables X and Y, and divide the data space into a×b grids. The frequency of data points falling in the (x, y) grid is an estimate of P(x, y). The expression of the data point frequency is: In the above formula, P(x,y) is the frequency of data points falling in the (x,y) grid, N (x,y) is the number of cells that fall into the (x, y) grid, N (i,j) is the number of cells falling into the (i, j) grid; Mutual information represents the amount of information and the degree of correlation between variables X and Y. The expression for the mutual information representing the amount of information and the degree of correlation between variables X and Y is: In the formula, I(X, Y) is the mutual information, which represents the amount of information and the degree of correlation between variables X and Y. F(x, y) is the joint probability density function. F(x) and F(y) are the marginal probability density functions of variables X and Y, respectively. The normalized result is used to detect the correlation between variables X and Y. The value is in the interval [0, 1]. The MIC formula of the two variables X and Y in the set is: In the above formula, MIC(X, Y) is the maximum information coefficient of variables X and Y, L is the grid-restricted variable, N(i, j) is the data scale, and the value of the constant θ is set according to experience or scale.
2. The method for regional carbon emission prediction based on carbon emission flow and big data analysis according to claim 1 is characterized in that: The S3 comprises the following steps: S3.
1. Based on the different labels of the sub-regions, different prediction algorithms are selected for data training to obtain the carbon emission prediction base model of each sub-region and the carbon emission prediction model to be determined of each sub-region. When the sub-region label is Class A or Class C, proceed to S3.2; when the sub-region label is Class B, proceed to S3.3; S3.
2. For the A and C label areas, all the features of the main information set and several features of the secondary information set of each sub-area are selected, and carbon emission prediction is carried out through the Stacking algorithm: The sub-region information is divided into a meta-training set and a meta-testing set on the meta-learner, and the meta-training set is divided into a base training set and a base test set on the base learner. The base learners are trained and predicted. X convolutional neural network architectures are selected as base learners. The model is trained on the K-1 fold using the K-fold cross-validation method and verified on the K-th fold. Each base learner is trained K times, and a total of xK times are trained to generate all base models and prediction results. A prediction model is made on the meta-learner based on the prediction data of the base learners. Y convolutional neural network architectures are selected as meta-learners. The training results of each learner are averaged to obtain the final classification result of the meta-testing set. Then, S3.4 is entered. S3.
3. For the B-label area, carbon emission prediction is carried out through the Blending algorithm: The original information data of the sub-region is divided into a training data set, a validation data set, and a test data set, and a blending model framework is built to form a first-stage model. The first-stage model is trained using the training data set, and the validation data set and the test data set are respectively used to run on the trained first-stage model to obtain the output results of the two. The feature vector composed of the output results of the validation data set is used as the training set of the second-stage model, and the test data set results obtained by the first-stage model are used as the test data set of the second-stage model to obtain the final classification result of the model, and then enter S3.4; S3.
4. Evaluate the carbon emissions of each sub-region. To determine whether the prediction base model meets the accuracy requirements, the accuracy and reliability of the prediction results of each sub-region are evaluated by MAPE. The expression of MAPE is: In the above formula, MAPE is the accuracy and reliability of the prediction results, n is the sample size, i is the sample number, is the predicted value of the i-th sample, y i is the actual value of the i-th sample. If it meets the accuracy requirements, the prediction base model to be determined will be used as the sub-region carbon emission prediction model for prediction. If it does not meet the accuracy requirements, the number of features will be expanded, and the top w+1 features in the secondary information set will be selected for retraining.
3. The method for regional carbon emission prediction based on carbon emission flow and big data analysis according to claim 2 is characterized by: The regional carbon emission prediction result in S4 is the sum of the prediction results obtained by each sub-region through its own carbon emission prediction model. The expression of the regional carbon emission prediction result is: In the above formula, is the regional carbon emission prediction result, is the carbon emission prediction result for the i-th sub-region, and n is the number of sub-regions.
4. The method for regional carbon emission prediction based on carbon emission flow and big data analysis according to claim 1 is characterized in that: The carbon emission factor in the main information set is obtained based on the electricity carbon emission flow. The grid emission factor of the sub-region is the average carbon emission factor of sub-region i in a certain time period T. The expression of the average carbon emission factor of sub-region i is: In the above formula, c i is the average grid carbon emission factor of sub-region i, is the direct carbon emissions of power plants directly connected to sub-region i, is the indirect carbon emission injected into the carbon emission flow of sub-region i, Q i is the load power of sub-area i, Q out is the power flow out of sub-area i.
5. A regional carbon emission prediction system based on carbon emission flow and big data analysis, characterized by: The prediction system includes a region division module, a correlation analysis module, a model construction module and a simulation calculation module; The region division module is used to divide the target region into multiple sub-regions, label each sub-region, and form a primary information set and a secondary information set for each sub-region according to different labels; A correlation analysis module is used to rank the relevance of the features that affect carbon emissions in the sub-regional information sets; The model building module is used to select all the features of the main information set of each sub-region and several features with high correlation rankings in the secondary information set, and perform data training based on the different main information set and secondary information set features of the sub-region. After the training is completed, the carbon emission prediction model of each sub-region is obtained; The simulation calculation module is used to perform simulation calculations using the constructed sub-region carbon emission prediction model, accumulate the carbon emission prediction results of all sub-regions, and output the regional carbon emission prediction results.
6. A regional carbon emission prediction device based on carbon emission flow and big data analysis, characterized in that: The memory is used to store computer program code and transmit the computer program code to the processor; The processor is used to execute the regional carbon emission prediction method based on carbon emission flow and big data analysis according to any one of claims 1 to 4 according to the instructions in the computer program code.
Citation Information
Patent Citations
Regional carbon emission prediction method and system
CN117495640A
Cited By
Evaluation method for low-carbon city development under multi-condition constraint
CN119599205A
Cold region university campus functional region carbon emission prediction method based on deep learning and image recognition
CN121073240A