A method, device and medium for predicting provincial carbon emissions based on adaptive multi-scale decomposition
The carbon emission prediction method, which optimizes carbon emission prediction through adaptive multi-scale decomposition and fairness-aware loss function, solves the problems of multi-scale characteristics and spatiotemporal correlation in carbon emission prediction among cities within a province. It achieves high-precision and fair carbon emission prediction, and supports scientific carbon quota allocation and emission reduction responsibility division.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-03-24
AI Technical Summary
Existing carbon emission forecasting methods have failed to effectively capture the multi-scale characteristics and spatiotemporal correlations between cities within a province, leading to systematic biases in forecasting results in some areas and affecting the fairness of carbon quota allocation and emission reduction responsibilities.
An adaptive multi-scale decomposition method is used to decompose carbon emission data. Combined with a multi-head attention mechanism and a temporal convolutional network, a generative adversarial network is used to generate high-precision carbon emission predictions. A multi-scale fairness-perceived loss function is introduced to optimize the model and ensure the fairness of the prediction results across regions.
It has achieved provincial carbon emission forecasting with both high accuracy and fairness, improving the accuracy of forecast results and fairness among regions, and providing reliable data support for carbon quota allocation and emission reduction responsibility division.
Smart Images

Figure CN121279618B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of air quality forecasting technology, and in particular to a method, apparatus, equipment and medium for predicting provincial carbon emissions based on adaptive multi-scale decomposition. Background Technology
[0002] The significant differences in economic development stages, industrial structures, energy consumption patterns, and urbanization levels among cities within a province result in complex multi-scale (daily fluctuations, monthly trends, seasonal cycles) and spatial heterogeneity in carbon emission data. Simultaneously, provincial policy formulation must balance forecast accuracy with regional equity to avoid imbalances in emission reduction pressure in some areas due to forecast bias. Current carbon emission forecasting methods primarily follow three technical routes: first, traditional statistical methods, such as autoregressive integral moving average models and seasonal decomposition time-series models, rely on linear assumptions and struggle to capture the nonlinear and multi-scale characteristics of carbon emission data; second, classic machine learning methods, such as support vector machines, random forests, and gradient boosting decision trees, while capable of fitting some nonlinear relationships, lack effective modeling of spatiotemporal correlations, are suitable for single-region forecasts, and are difficult to adapt to multi-city scenarios within a province; and third, deep learning methods, such as long short-term memory networks, gated recurrent units, and Transformer architectures, some of which introduce attention mechanisms to improve sequence modeling capabilities, but often employ a uniform, one-size-fits-all model structure without fully considering regional heterogeneity.
[0003] However, existing methods often use uniform model parameters and structures to process data from all cities within a province, ignoring the specific characteristics of carbon emissions in each city. This leads to systematic biases in predictions for regions with unique industrial structures or abnormal stages of economic development. Furthermore, relying on fixed decomposition scales or single-time-dimensional modeling fails to adaptively capture complementary information from daily fluctuations, monthly trends, and seasonal cycles, making it difficult to balance accurate short-term predictions with long-term trend assessments. Additionally, focusing solely on overall prediction accuracy without quantifying the fairness of regional distribution of prediction results may result in persistent overestimation or underestimation of carbon emissions in some areas, affecting the fairness of carbon quota allocation and emission reduction responsibility division. Therefore, there is an urgent need for a provincial carbon emission prediction method based on adaptive multi-scale decomposition to simultaneously consider regional differences and the fairness of prediction result distribution in provincial carbon emission prediction. Summary of the Invention
[0004] The main objective of this application is to provide a provincial carbon emission prediction method, apparatus, equipment, and medium based on adaptive multi-scale decomposition, aiming to solve the technical problem of how to achieve both high accuracy and fairness in provincial carbon emission prediction.
[0005] To achieve the above objectives, this application proposes a provincial carbon emission prediction method based on adaptive multi-scale decomposition, comprising:
[0006] Obtain carbon emission data for the forecast period from various cities within the province;
[0007] The carbon emission data is preprocessed to obtain standardized carbon emission data;
[0008] The standardized carbon emission data is input into a preset carbon emission prediction model to obtain the carbon emission prediction values for each city during the prediction period. The preset carbon emission prediction model includes a generator and a discriminator. The generator is an encoder-decoder architecture with a multi-head attention mechanism embedded, and the discriminator is a temporal convolutional network.
[0009] The carbon emission predictions are summarized to obtain the provincial-level carbon emission prediction results.
[0010] In one embodiment, before the step of inputting the standardized carbon emission data into a preset carbon emission prediction model to obtain the predicted carbon emission values for each city during the predicted period, the method includes:
[0011] Collect historical daily carbon emission data from various cities within the province;
[0012] Construct an initial carbon emission prediction model;
[0013] The historical daily carbon emission data is cleaned, aligned, and normalized to obtain a standardized carbon emission sequence.
[0014] The standardized carbon emission sequence was decomposed using an adaptive multi-scale decomposition method to obtain multi-scale decomposed components;
[0015] Spatiotemporal feature fusion is performed on the multi-scale decomposition components to obtain an enhanced feature matrix;
[0016] The initial carbon emission prediction model is optimized based on the enhanced feature matrix and the multi-scale fair perception loss function to obtain the preset carbon emission prediction model.
[0017] In one embodiment, the step of decomposing the standardized carbon emission sequence using an adaptive multi-scale decomposition method to obtain multi-scale decomposed components includes:
[0018] Initialize the parameter set of the adaptive multi-scale decomposition module, wherein the parameter set includes the number of decomposition layers, the number of convolutional kernels per layer, and the initial learning rate;
[0019] The standardized carbon emission sequence is converted into a three-dimensional input tensor, the dimensions of which include the number of cities, the time step, and the feature dimension.
[0020] The three-dimensional input tensor is input into the first convolutional layer of the adaptive multi-scale decomposition module to extract short-term fluctuation features, thus obtaining the first layer decomposition components.
[0021] The first layer of decomposed components is downsampled to obtain the first intermediate sequence;
[0022] The first intermediate sequence is input into the second convolutional layer to extract the mid-term periodic features, resulting in the second layer decomposition components;
[0023] The second layer of decomposed components is downsampled to obtain the second intermediate sequence;
[0024] The second intermediate sequence is input into the third convolutional layer to extract long-term trend features, resulting in the third layer decomposition components;
[0025] The first layer of decomposition components, the second layer of decomposition components, and the third layer of decomposition components are integrated to form a multi-scale decomposition component that includes short-term, medium-term, and long-term characteristics.
[0026] In one embodiment, the step of performing spatiotemporal feature fusion on the multi-scale decomposition components to obtain an enhanced feature matrix includes:
[0027] The initial weights of each component are obtained by assigning weights to the short-term fluctuation component, medium-term cycle component, and long-term trend component in the multi-scale decomposition components.
[0028] The time-dependent modeling of the various components is performed using a multi-head self-attention mechanism to obtain the feature contribution of each attention head.
[0029] Based on the feature contribution and the initial weight, a weighted sum is performed to obtain the time-enhanced features of each component.
[0030] A spatial correlation map is constructed based on the geographical adjacency and industrial correlation of cities within the province.
[0031] The temporal enhancement features are mapped onto the spatial association graph and calculated using a graph convolutional network to obtain the spatial enhancement features for each component.
[0032] The temporal enhancement features and the spatial enhancement features are calculated using the sigmoid function to obtain the fusion gating coefficients;
[0033] The temporal enhancement features and the spatial enhancement features are weighted and fused according to the fusion gating coefficient to obtain the single-scale spatiotemporal fusion features corresponding to each type of component;
[0034] The single-scale spatiotemporal fusion features corresponding to the short-term fluctuation component, medium-term cycle component, and long-term trend component are concatenated along the channel dimension to obtain the enhanced feature matrix.
[0035] In one embodiment, the step of optimizing the initial carbon emission prediction model based on the enhanced feature matrix combined with a multi-scale fairness-perceived loss function to obtain a preset carbon emission prediction model includes:
[0036] The enhanced feature matrix is divided into a training subset and a test subset according to a preset ratio. The training subset is used for model parameter updates, and the test subset is used for model performance verification.
[0037] Initialize the hyperparameters of the initial carbon emission prediction model, wherein the hyperparameters include the hidden layer dimension of the generator, the convolution kernel size of the discriminator, and the learning rate of the optimizer;
[0038] The training subset is input into the generator of the initial carbon emission prediction model to generate the first simulated carbon emission sequence;
[0039] The first simulated carbon emission sequence and the real carbon emission sequences in the training subset are input into the discriminator to obtain the classification probability.
[0040] The total loss value between the first simulated carbon emission sequence and the real carbon emission sequence is calculated by calling the multi-scale fair perception loss function based on the classification probability.
[0041] The total loss value is fed back to the initial carbon emission prediction model using the backpropagation algorithm to update the parameters of the generator and discriminator.
[0042] When the number of iterations reaches the preset number, the test subset is input into the currently optimized model to generate a second simulated carbon emission sequence;
[0043] The average error was calculated by comparing the second simulated carbon emission sequence with the real sequence in the test subset;
[0044] When the average error in consecutive preset rounds is less than a preset error threshold, the current optimized model is determined as the preset carbon emission prediction model.
[0045] In one embodiment, the step of calculating the total loss value between the first simulated carbon emission sequence and the real carbon emission sequence by calling a multi-scale fairness-perceived loss function based on the classification probability includes:
[0046] The adversarial loss value is calculated using the binary cross-entropy algorithm based on the classification probability.
[0047] The multi-scale fair perception loss function is called to calculate the error between the first simulated carbon emission sequence and the real carbon emission sequence step by step using the average absolute percentage error formula, and then the average value of all errors is taken to obtain the prediction error loss value.
[0048] The simulated carbon emission sequence and the real carbon emission sequence are grouped by day. The first daily Gini coefficient and the second daily Gini coefficient are calculated for the two groups of sequences for each day. The absolute difference between the two groups of Gini coefficients for each day is taken, and the average of all daily differences is calculated as the daily fair loss value.
[0049] The first simulated carbon emission sequence and the actual carbon emission sequence are summarized monthly to obtain the total simulated carbon emissions and the total actual carbon emissions for each month.
[0050] The first monthly Gini coefficient and the second monthly Gini coefficient are calculated for the simulated total carbon emissions and the actual total carbon emissions, respectively. The absolute difference between the two sets of Gini coefficients is taken for each month, and the average of all monthly differences is then calculated as the monthly fair loss value.
[0051] The prediction error loss value, the daily fairness loss value, and the monthly fairness loss value are weighted and summed according to preset weights to obtain the total loss value of the multi-scale fairness perception loss function.
[0052] The total loss value is obtained by associating the adversarial loss value with the total loss value of each component.
[0053] In one embodiment, the daily carbon emission forecast values for each city during the forecast period are obtained based on the carbon emission forecast values.
[0054] The daily carbon emission forecast values are validated, abnormal forecast values that exceed the preset reasonable emission range are removed, and the average of the forecast values of adjacent days in the same city is used to fill the abnormal positions to obtain the validated daily forecast values.
[0055] The verified daily forecast values are summarized by city and the sum of all verified daily forecast values for each city during the forecast period is calculated to obtain the total carbon emission forecast value for each city during the forecast period.
[0056] The total carbon emissions forecasts for all cities are summed to obtain the total carbon emissions forecast for the period to be predicted at the provincial level.
[0057] The verified daily forecast values, total carbon emission forecast values, and total carbon emission forecast results at the provincial level for each city are extracted and organized to obtain structured data, wherein the structure of the structured data is date-city-daily forecast value-city total-province total.
[0058] The structured data is format-standardized to generate provincial-level carbon emission prediction results, which include data sources, prediction periods, statistical dimensions, and specific prediction values.
[0059] Furthermore, to achieve the above objectives, this application also proposes a provincial carbon emission prediction device based on adaptive multi-scale decomposition, wherein the provincial carbon emission prediction device based on adaptive multi-scale decomposition includes:
[0060] The acquisition module is used to acquire carbon emission data for the forecast period from various cities within the province.
[0061] The preprocessing module is used to preprocess the carbon emission data to obtain standardized carbon emission data;
[0062] The prediction module is used to input the standardized carbon emission data into a preset carbon emission prediction model to obtain the carbon emission prediction values for each city during the prediction period. The preset carbon emission prediction model includes a generator and a discriminator. The generator is an encoder-decoder architecture with an embedded multi-head attention mechanism, and the discriminator is a temporal convolutional network.
[0063] The results module is used to summarize the carbon emission prediction values to obtain the provincial-level carbon emission prediction results.
[0064] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the provincial carbon emission prediction method based on adaptive multi-scale decomposition as described above.
[0065] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the provincial carbon emission prediction method based on adaptive multi-scale decomposition as described above.
[0066] This application acquires and standardizes carbon emission data from various cities within a province, then inputs it into a pre-defined carbon emission prediction model composed of a multi-head attention-encoder-decoder generator and a temporal convolutional discriminator. The model outputs predicted values for each city and then aggregates them into a provincial result. During the model training phase, adaptive multi-scale decomposition and spatiotemporal feature fusion are employed, and daily-monthly Gini coefficient fairness loss is used for joint optimization. This achieves regionally differentiated, fair, and highly accurate carbon emission prediction, balancing prediction accuracy and regional fairness. It provides credible and interpretable data support for the scientific allocation of provincial carbon quotas and the division of emission reduction responsibilities. Attached Figure Description
[0067] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0068] Figure 1 This is a flowchart illustrating the first embodiment of the provincial carbon emission prediction method based on adaptive multi-scale decomposition in this application.
[0069] Figure 2 This is a comparison chart of regional prediction errors in the first embodiment of the provincial carbon emission prediction method based on adaptive multi-scale decomposition in this application;
[0070] Figure 3 This is a regional error span diagram of the first embodiment of the provincial carbon emission prediction method based on adaptive multi-scale decomposition in this application.
[0071] Figure 4 This is a regional error standard deviation map of the first embodiment of the provincial carbon emission prediction method based on adaptive multi-scale decomposition in this application.
[0072] Figure 5 This is a box plot showing the error distribution of the first embodiment of the provincial carbon emission prediction method based on adaptive multi-scale decomposition in this application.
[0073] Figure 6 This is a flowchart illustrating the second embodiment of the provincial carbon emission prediction method based on adaptive multi-scale decomposition in this application.
[0074] Figure 7 This is a flowchart illustrating the third embodiment of the provincial carbon emission prediction method based on adaptive multi-scale decomposition in this application.
[0075] Figure 8 This is a schematic diagram of the module structure of the provincial carbon emission prediction device based on adaptive multi-scale decomposition in this application.
[0076] Figure 9 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the provincial carbon emission prediction method based on adaptive multi-scale decomposition in the embodiments of this application.
[0077] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0078] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0079] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0080] The significant differences in economic development stages, industrial structures, energy consumption patterns, and urbanization levels among cities within a province result in complex multi-scale (daily fluctuations, monthly trends, seasonal cycles) and spatial heterogeneity in carbon emission data. Simultaneously, provincial policy formulation must balance forecast accuracy with regional equity to avoid imbalances in emission reduction pressure in some areas due to forecast bias. Current carbon emission forecasting methods primarily follow three technical routes: first, traditional statistical methods, such as autoregressive integral moving average models and seasonal decomposition time-series models, rely on linear assumptions and struggle to capture the nonlinear and multi-scale characteristics of carbon emission data; second, classic machine learning methods, such as support vector machines, random forests, and gradient boosting decision trees, while capable of fitting some nonlinear relationships, lack effective modeling of spatiotemporal correlations, are suitable for single-region forecasts, and are difficult to adapt to multi-city scenarios within a province; and third, deep learning methods, such as long short-term memory networks, gated recurrent units, and Transformer architectures, some of which introduce attention mechanisms to improve sequence modeling capabilities, but often employ a uniform, one-size-fits-all model structure without fully considering regional heterogeneity. However, existing methods often use uniform model parameters and structures to process data from all cities within a province, ignoring the specific characteristics of carbon emissions in each city. This leads to systematic biases in predictions for regions with unique industrial structures or abnormal stages of economic development. Furthermore, relying on fixed decomposition scales or single time dimensions for modeling fails to adaptively capture complementary information from daily fluctuations, monthly trends, and seasonal cycles, making it difficult to balance accurate short-term predictions with long-term trend assessments. Additionally, focusing solely on overall prediction accuracy without quantifying the fairness of the distribution of prediction results across regions may result in persistent overestimation or underestimation of carbon emissions in some areas, affecting the impartiality of carbon quota allocation and emission reduction responsibility division.
[0081] Therefore, this application proposes a provincial carbon emission prediction method based on adaptive multi-scale decomposition to solve the above-mentioned problems. The main solution of this application embodiment is as follows: acquire carbon emission data of each city in the province for the period to be predicted; preprocess the carbon emission data to obtain standardized carbon emission data; input the standardized carbon emission data into a preset carbon emission prediction model to obtain the carbon emission prediction value of each city for the period to be predicted, wherein the preset carbon emission prediction model includes a generator and a discriminator, the generator is an encoder-decoder architecture and embeds a multi-head attention mechanism, and the discriminator is a temporal convolutional network; summarize the carbon emission prediction values to obtain the provincial-level carbon emission prediction result.
[0082] Based on the above, this application also provides a provincial carbon emission prediction method based on adaptive multi-scale decomposition, referring to... Figure 1 , Figure 1This is a flowchart illustrating the first embodiment of the provincial carbon emission prediction method based on adaptive multi-scale decomposition of this application. In this embodiment, the provincial carbon emission prediction method based on adaptive multi-scale decomposition includes steps S10 to S40:
[0083] Step S10: Obtain carbon emission data for the forecast period for each city in the province.
[0084] It should be noted that obtaining carbon emission data for the forecast period from various cities within the province is the starting point of the entire forecasting process. Its purpose is to collect comprehensive, accurate, and representative carbon emission data from multiple data sources, providing a solid foundation for subsequent preprocessing and modeling.
[0085] First, identify data sources, including online monitoring systems (CEMS) of key emitting entities, which can collect key indicators such as carbon dioxide concentration and flow rate in real time; data from energy supply companies, such as electricity consumption data from power grid companies and natural gas consumption data from gas companies, which can be used to indirectly calculate carbon emissions; macroeconomic and energy consumption statistics released by statistical departments, which can serve as a basis for supplementation and calibration; and independent monitoring data provided by third-party monitoring agencies to increase the diversity and reliability of the data.
[0086] Next, design corresponding data collection schemes based on the characteristics of the data sources. For units with online monitoring systems, real-time or periodic automatic data collection is achieved through network interfaces (such as APIs or FTP), for example, collecting emission data hourly and storing it in a local database. For data sources that cannot be automated, such as data from some small businesses or third-party monitoring, data is collected manually, strictly adhering to data format specifications to ensure data consistency. Simultaneously, data is periodically synchronized with the data source to ensure the collected data is up-to-date. The synchronization frequency is determined based on the timeliness requirements of the data, such as daily or weekly synchronization.
[0087] The collected data needs to be integrated to form a unified dataset. This includes data cleaning, removing duplicate, erroneous, or missing data records. For missing data, appropriate imputation methods are selected based on the specific situation, such as interpolation or using data from adjacent time periods as substitutes. Next, data alignment is performed, aligning data from different sources according to time and spatial dimensions. For example, hourly emission data is aligned with daily energy consumption data to ensure temporal consistency. Finally, data standardization is performed, converting data in different formats into a unified format for easier subsequent processing. For example, all data units are standardized to tons of carbon dioxide equivalent (TCO). And store the data in a standardized database table.
[0088] The integrated data needs to be validated to ensure its accuracy and completeness. This includes logical validation, checking whether the data conforms to logical relationships, such as whether emissions are proportional to energy consumption and whether there are abnormal fluctuations; range validation, checking whether the data is within a reasonable range, such as whether carbon dioxide concentration is within the normal measurement range and whether emissions are consistent with historical data; and cross-validation, verifying the data's accuracy by comparing it with other data sources or known data, such as comparing the collected emissions data with published statistical data to check for significant differences.
[0089] Finally, the validated data is stored in a secure and reliable database to provide data support for subsequent preprocessing and predictive models. This includes designing a reasonable database structure, including tables, fields, and indexes, to ensure efficient data storage and fast retrieval; regularly backing up the database to prevent data loss or corruption, with backup data stored in a secure location and regular recovery tests performed; and implementing security measures such as data encryption and access control to protect data privacy and security, preventing data leakage or unauthorized access.
[0090] Step S20: Preprocess the carbon emission data to obtain standardized carbon emission data.
[0091] It should be noted that the purpose of preprocessing is to transform the collected raw carbon emission data into more standardized, consistent, and usable data, providing support for subsequent modeling and analysis. The preprocessing process includes steps such as data cleaning, data alignment, data normalization, and data augmentation.
[0092] First, data cleaning is the first step in preprocessing, aiming to remove noise and errors from the data. This includes identifying and deleting duplicate records, correcting or deleting erroneous data points, and filling in missing values. For handling missing values, different methods can be used depending on the specific data; for example, time series interpolation (such as linear interpolation or moving average interpolation) can be used to fill in missing carbon emission data. Furthermore, estimations can be made using data from neighboring cities or similar industries to ensure data integrity.
[0093] Secondly, data alignment unifies data from different sources and with different time granularities to the same temporal and spatial dimensions. This involves converting hourly, daily, or monthly data into a uniform time granularity, such as aligning all data to a daily or monthly time step. Simultaneously, it ensures spatial consistency of the data, for example, by classifying and integrating data by city, industry, or emission source for subsequent analysis.
[0094] Next is data normalization, which is the process of transforming the data to a uniform numerical range, typically using min-max normalization or Z-score standardization. Min-max normalization scales the data to between 0 and 1. Let the nth... The city in the Daily carbon emissions are The formula is:
[0095]
[0096] in, and The first The minimum and maximum carbon emissions for each city. Normalization helps improve the model's convergence speed and prediction accuracy.
[0097] Finally, data augmentation increases the diversity and richness of data by generating additional data points. This can be achieved through methods such as data smoothing, noise injection, or data synthesis. For example, introducing random noise into time series data can simulate fluctuations in the real environment, enhancing the model's robustness to data changes. Furthermore, data smoothing techniques can reduce short-term fluctuations in the data, highlighting long-term trends.
[0098] Through the preprocessing steps described above, carbon emission data is transformed into more standardized, consistent, and usable data, providing a solid foundation for subsequent modeling and analysis. The preprocessed data not only improves model training performance but also enhances the accuracy and reliability of prediction results, providing strong support for provincial carbon emission management and policy formulation.
[0099] Step S30: Input standardized carbon emission data into the preset carbon emission prediction model to obtain the predicted carbon emission values for each city during the prediction period.
[0100] It should be noted that the preset carbon emission prediction model adopts a Generative Adversarial Network (GAN) framework. The model includes a generator and a discriminator. The generator uses an encoder-decoder architecture with an embedded multi-head attention mechanism to generate predicted carbon emission values. The discriminator is a Temporal Convolutional Network (TCN) used to distinguish between real carbon emission data and generated predicted data, ensuring the accuracy and reliability of the prediction results. Within a province, there are significant differences in carbon emissions among cities. Traditional models only aim for small prediction errors for individual cities, which can easily lead to systematic overestimation and underestimation of some cities, resulting in distorted emission distribution among cities and affecting the fairness of carbon quota allocation. The GAN's discriminator constrains the generator's output prediction sequence to closely match the actual situation in terms of overall distribution and inter-city proportions, fundamentally avoiding regional bias. Simultaneously, GAN can naturally integrate prediction accuracy loss and daily-monthly fairness loss, ensuring that the predicted values for each city are reliable while also reflecting the actual emission pattern across the entire province.
[0101] In the implementation process, standardized carbon emission data is first fed into the generator. The encoder of the generator is responsible for feature encoding of the input data, extracting key features. Through a multi-head attention mechanism, the generator can capture the long-term dependencies of carbon emission data from different cities over time and the spatial correlations between cities. The multi-head attention mechanism allows the model to process data from multiple perspectives simultaneously, enhancing the model's ability to model complex spatiotemporal features. The encoder encodes the input data into a fixed-length feature vector, and then the decoder generates predicted carbon emission values based on this feature vector. By progressively constructing the output sequence, the decoder ultimately generates predicted carbon emission values for each city in the future prediction period. The generated predicted values are then fed into the discriminator for evaluation. The discriminator uses a temporal convolutional network (TCN), whose core is to use causal convolution and residual connections to capture local and global features in time series data. TCN can effectively handle long-term dependencies in time series data and avoids the gradient vanishing problem through residual connections. The discriminator aims to distinguish whether the input carbon emission data is actual observed data or predicted data generated by the generator. During training, the generator and discriminator continuously optimize through adversarial training: the generator attempts to produce increasingly realistic prediction data to deceive the discriminator; while the discriminator strives to improve its ability to distinguish between real and generated data. This adversarial mechanism enables the generator to continuously improve its prediction performance, ultimately generating high-quality, highly accurate carbon emission predictions.
[0102] During the model training phase, a multi-scale fairness-perceived loss function was introduced to further improve the fairness and accuracy of the prediction results. This loss function combines daily and monthly Gini coefficient errors to quantify the fairness of the distribution of prediction results across regions. By combining the fairness loss with the traditional mean squared error (MSE), the model not only pursues prediction accuracy during optimization but also ensures the fairness of the distribution of prediction results among different cities, avoiding the systematic underestimation or overestimation of certain cities due to model bias.
[0103] Step S40: Summarize the carbon emission prediction values to obtain the provincial-level carbon emission prediction results.
[0104] It should be noted that this process involves not only simple numerical summation, but also consideration of the spatiotemporal consistency of the data, regional representativeness, and possible error correction, in order to ensure the accuracy and reliability of the provincial forecast results.
[0105] First, carbon emission forecasts from various cities need to be aligned according to a unified temporal and spatial standard. This includes ensuring that the forecast data for all cities covers the same forecast period and maintains consistency in temporal granularity. For example, if the forecasts are in daily or monthly units, the forecast data for all cities needs to be unified to the same time period and temporal granularity for aggregation. Simultaneously, the alignment process also requires checking the integrity of the data to ensure that no data points are omitted or duplicated.
[0106] Next, the aligned data will be aggregated by region. This step typically involves summing the carbon emission forecasts for each city according to administrative regions. For example, the monthly carbon emission forecasts for all cities within a province are simply summed to obtain the provincial-level monthly carbon emission forecast. During the aggregation process, factors such as the economic size, population distribution, and energy consumption structure of each city within the province need to be considered to ensure that the aggregated results accurately reflect the overall carbon emission characteristics of the province. For cities with larger economies or denser populations, their carbon emission forecasts may carry more weight in the aggregation.
[0107] During the aggregation process, error correction is also required for the forecast results. Since the forecast models of each city may contain errors, these errors may accumulate during aggregation, affecting the accuracy of the provincial forecast results. Therefore, an error correction mechanism needs to be introduced, such as adjusting the forecast values by comparing the differences between historical data and forecast data to reduce errors. In addition, statistical methods can be used to smooth the aggregated data to eliminate potential abnormal fluctuations and ensure the stability of the provincial forecast results.
[0108] Finally, the aggregated provincial-level carbon emission forecasts need to be validated and evaluated. This includes comparing the forecasts with historical data to check if they conform to historical trends and seasonal patterns. Furthermore, cross-validation with other independent carbon emission estimation methods (such as top-down macroeconomic models) can further confirm the reliability of the aggregated results. If significant biases are found in the aggregated results, it is necessary to trace back to city-level data, analyze the causes of the biases, and adjust and optimize the forecasting model or aggregation method.
[0109] Furthermore, experiments were conducted in five regions—BE, NL, LU, DE, and HU—to compare the results of the traditional Transformer prediction (Baseline) model and the pre-defined carbon emission prediction (GAN+Fairness) model proposed in this embodiment. Figure 2The regional prediction error comparison chart shows that in the BE region, the baseline is 1717.5%, and the GAN+Fairness is 2106.4%, a slight increase. In the DE region, the baseline is 1153.6%, and the GAN+Fairness is 370.0%, a decrease of approximately 67.9%. In the HU region, the baseline is 1597.6%, and the GAN+Fairness is 500.6%, a decrease of approximately 68.7%. In the NL region, the baseline is 1681.9%, and the GAN+Fairness is 471.9%, a decrease of approximately 71.9%. In the LU region, the baseline is 5677.3%, and the GAN+Fairness is 161.6%, a decrease of over 97%. Overall, except for the BE region, the other four regions have shown significant improvement, especially the LU region, which originally had the highest error, showing the largest decrease. This is a key factor in improving overall fairness. Figure 3 The regional error span map shown reveals that the Baseline model has a regional error span of 4523, while the GAN+Fairness model has an error span of 1944, representing a 57% reduction in error span. This indicates a significant decrease in the difference in prediction results between regions. Furthermore, according to... Figure 4 The regional error standard deviation plot shown reveals that the baseline model has a regional error standard deviation of 1760, while the GAN+Fairness model's standard deviation decreases to 746. Analysis indicates a 57.6% reduction in standard deviation, demonstrating a significant reduction in the dispersion of regional errors and more stable and consistent model predictions. Furthermore, according to... Figure 5 The box plot of the error distribution, with the orange line representing the median, shows that the Baseline model exhibits significant high-end outliers, resulting in severe stretching of the error box and an uneven distribution height. The GAN+Fairness model effectively compresses outliers, significantly reducing the overall height of the box plot, making regional errors more concentrated and stable. Based on the analysis of regional error performance and fairness indicators, the following conclusions can be drawn: the regional error span decreased from 4523 to 1944, a reduction of approximately 57%, indicating a significant convergence of model predictions across different regions. The regional error standard deviation decreased from 1760 to 746, a decrease of approximately 57.6%, indicating a significant reduction in the dispersion of regional errors. The LU region, which previously had the highest error, decreased from 5677% to 162%, an improvement of over 97%, making it a key contributor to improved overall fairness. The error distribution box plot shows that the GAN+Fairness model eliminates extreme biases in high-error regions, making prediction results more concentrated and consistent across regions.
[0110] In summary, the GAN+Fairness model not only improves the overall prediction accuracy but also significantly improves the balance of error distribution between regions, thereby enhancing the stability and fairness of the model in multi-region prediction tasks.
[0111] This embodiment acquires and standardizes carbon emission data from various cities within the province, then inputs it into a pre-defined carbon emission prediction model composed of a multi-head attention-encoder-decoder generator and a temporal convolutional discriminator. The model outputs predicted values for each city and then aggregates them into a provincial result. During the model training phase, adaptive multi-scale decomposition and spatiotemporal feature fusion are employed, and daily-monthly Gini coefficient fairness loss is used for joint optimization. This achieves regionally differentiated, fair, and highly accurate carbon emission prediction, balancing prediction accuracy and regional fairness. It provides reliable and interpretable data support for the scientific allocation of provincial carbon quotas and the division of emission reduction responsibilities.
[0112] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 6 The provincial carbon emission prediction method based on adaptive multi-scale decomposition further includes steps S201-S206 before step S30:
[0113] Step S201: Collect historical daily carbon emission data for each city in the province.
[0114] It should be noted that the time and geographical scope of data collection should be clearly defined first. The time scope should be set to a preset historical period (such as the last 30 days) to ensure complete coverage of seasonal cycles and economic development fluctuation cycles. The geographical scope should cover all administrative cities in the province, including prefecture-level cities, county-level cities and key counties, to avoid omissions of regional data.
[0115] Subsequently, a multi-source data acquisition system was established. Official monitoring data such as industrial enterprise emissions and centralized heating emissions were obtained through the carbon emission monitoring platform of the provincial ecological and environmental authorities. Daily fossil energy (coal, oil, and natural gas) consumption data of each city were extracted from the energy statistics department database and converted into carbon emissions according to emission factors. Daily electricity consumption data of each city was collected by connecting with the smart grid system of the power company. Indirect carbon emissions were calculated by combining the regional power grid emission factors. Special statistical data in the fields of construction and transportation (such as building area, number of motor vehicles and mileage) were collected simultaneously and the corresponding carbon emissions were estimated through industry standard models.
[0116] Next, data spatiotemporal alignment processing is performed. In the time dimension, non-daily data from different sources (such as weekly and monthly statistical data) are converted into daily data through linear interpolation to ensure uniform time granularity. In the spatial dimension, cross-regional emission data (such as emissions related to energy transmission between regions) are classified according to administrative boundaries to clarify the carbon emission responsibility boundaries of each city.
[0117] Next, data cleaning was carried out. Box plots were used to identify abnormal data that exceeded the preset reasonable range (such as the average daily emissions of each city within ±3 standard deviations). By cross-validating with data from adjacent dates and data from cities of the same type in the same region, erroneous data was removed. For missing data, interpolation based on industry development trends and seasonal characteristics was used to fill in the gaps.
[0118] Finally, the data was standardized and organized, and all collected data were converted into standard units (such as tons of carbon dioxide equivalent). A structured database was built according to the structure of "city name-date-total carbon emissions-emissions by sector", forming a complete, continuous and consistent historical daily carbon emission dataset for all cities in the province.
[0119] Step S202: Construct an initial carbon emission prediction model.
[0120] It should be noted that this process requires comprehensive consideration of data characteristics, model architecture, and prediction objectives to ensure that the model can effectively capture the spatiotemporal dynamics of carbon emission data and provide a basic framework for subsequent optimization.
[0121] First, feature analysis is performed on the collected historical daily carbon emission data to extract key features related to carbon emissions, such as time series characteristics (including trends, seasonality, and periodicity), spatial characteristics (such as economic connections and energy structure differences between cities), and external influencing factors (such as meteorological conditions and economic activity levels). Through correlation analysis and principal component analysis, the most influential feature variables for carbon emission prediction are selected, providing a basis for model input.
[0122] Secondly, a suitable model architecture was selected as the foundation for the initial prediction model. Considering the time-series characteristics and spatial heterogeneity of carbon emission data, a Generative Adversarial Network (GAN) framework was adopted. The generator, based on an encoder-decoder architecture and embedding a multi-head attention mechanism, generates carbon emission predictions. The discriminator employs a Temporal Convolutional Network (TCN) to distinguish between real carbon emission data and generated predictions. The encoder part of the generator captures long-term dependencies and spatial relationships between cities through a multi-head attention mechanism, while the decoder progressively generates carbon emission predictions for future periods. The discriminator utilizes causal convolution and residual connections to effectively handle the complex dynamic characteristics of time-series data.
[0123] During model building, model parameters need to be initialized. This includes determining hyperparameters such as the number of layers in the encoder and decoder, the number of hidden units, the number of attention heads, and the learning rate. These parameters are initially adjusted using methods such as cross-validation and grid search to ensure good convergence performance and generalization ability in the early stages of training. Simultaneously, a suitable loss function, such as mean squared error (MSE) or mean absolute error (MAE), is designed to evaluate the generator's prediction accuracy and guide the model training process.
[0124] Step S203 involves cleaning, aligning, and normalizing the historical daily carbon emission data to obtain a standardized carbon emission sequence.
[0125] It should be noted that the data cleaning process begins first. Statistical analysis methods are used to identify outliers in the dataset. By calculating the mean and standard deviation of historical daily carbon emission data for each city, data exceeding a preset reasonable range (mean ± 3 times the standard deviation) are marked as outliers. Cross-validation is performed using concurrent meteorological data, economic activity data, and data from neighboring cities. Outliers confirmed as measurement errors or statistical errors are removed. For missing values in the dataset, different imputation strategies are used based on the duration of the missing values. Short-term missing values (≤3 days) are imputed using linear interpolation, while long-term missing values (>3 days) are imputed using an LSTM interpolation model based on industry emission trends and seasonal characteristics to ensure data continuity. Next, data alignment is performed. In terms of time dimension, the Gregorian calendar day is used as a unified time base. Timestamps from different data sources are calibrated, and non-daily data (such as weekly statistics and hourly monitoring data) are converted to daily data using time aggregation or interpolation. The data is processed to ensure that the carbon emission data of all cities are consistent in terms of time granularity. Spatially, the administrative boundary codes of each city are checked, and data with duplicate statistics or incorrect attribution across regions are corrected to clarify the attribution of carbon emission data for each city and ensure no confusion at the regional level. Finally, normalization is performed to eliminate model training bias caused by differences in the scale of carbon emissions of different cities. The Z-score standardization method is used to calculate the mean and standard deviation of historical daily carbon emission data for each city. Each data point is transformed by the formula (original data - mean of data for that city) / standard deviation of data for that city, mapping the carbon emission data of each city to a preset distribution interval (mean 0, standard deviation 1), while preserving the original data distribution characteristics and relative fluctuations of each city. Finally, a standardized carbon emission sequence with unified dimensions, consistent scale, and no anomalies or missing data is formed, providing a high-quality data input with strong adaptability for subsequent adaptive multi-scale decomposition and feature fusion.
[0126] Step S204: The standardized carbon emission sequence is decomposed using an adaptive multi-scale decomposition method to obtain multi-scale decomposed components.
[0127] It should be noted that this process, by decomposing complex time-series data into components of different time scales, can effectively reveal the short-term, medium-term, and long-term characteristics and trends in carbon emission data, thereby providing more valuable information for subsequent feature extraction and model training.
[0128] Further, step S204 includes: First, initializing the parameter set of the adaptive multi-scale decomposition module, wherein the parameter set includes the number of decomposition layers, the number of convolutional kernels per layer, and the initial learning rate. Specifically, the number of decomposition layers determines how many components of different time scales the model decomposes the data into; the number of convolutional kernels per layer affects the model's ability to capture features at each time scale; and the initial learning rate determines the parameter update speed of the model in the early stages of training. For example, the number of decomposition layers can be set to 3, the number of convolutional kernels per layer can be 64, 32, and 16 respectively, and the initial learning rate can be 0.001. These parameters can be adjusted according to the specific characteristics of the data and experimental results to achieve the best decomposition effect.
[0129] Next, the standardized carbon emission sequences are converted into a three-dimensional input tensor. This process reorganizes the data into a format suitable for deep learning models. The dimensions of the three-dimensional input tensor include the number of cities, the time step, and the feature dimension. Specifically, assuming we have N cities, each city has carbon emission data for T time steps, and each time step has D features (such as carbon emissions, weather conditions, etc.), then the input tensor... The shape is (N, T, D). This three-dimensional structure allows the model to process data from multiple cities simultaneously and capture feature changes in the time series.
[0130] Next, the 3D input tensor is input into the first convolutional layer of the adaptive multi-scale decomposition module to extract short-term fluctuation features, resulting in the first layer of decomposition components. Specifically, the 3D input tensor is input into the first convolutional layer of the adaptive multi-scale decomposition module to extract short-term fluctuation features. The number and size of the convolutional kernels in the first convolutional layer can be set according to the parameter set. For example, the first convolutional layer can use 64 kernels of size 3 with a stride of 1. The convolution operation can be represented as:
[0131]
[0132] in, This is the weight matrix of the first convolutional layer. For bias terms, Indicates the input tensor. ReLU represents the convolution operation. Through convolution, the model can extract short-term fluctuation features from the input data, which reflect changes in carbon emission data over shorter time scales, such as intraday fluctuations.
[0133] Then, the first-level decomposed components are downsampled to obtain the first intermediate sequence. Specifically, after obtaining the first-level decomposed components, they are downsampled to reduce the dimensionality of the data and extract more abstract features. Downsampling can be achieved through max pooling or average pooling. Assuming max pooling is used, with a pooling window size of 2 and a stride of 2, the downsampled first intermediate sequence... It can be represented as:
[0134]
[0135] in This indicates a max pooling operation. The first intermediate sequence after downsampling retains the main information of short-term fluctuation characteristics, while reducing the complexity of the data and providing a simpler input for subsequent feature extraction.
[0136] The first intermediate sequence is then input into the second convolutional layer to extract mid-term periodic features, resulting in the second layer decomposition components. Specifically, the number and size of the convolutional kernels in the second convolutional layer can be set according to the parameter set. For example, the second convolutional layer can use 32 kernels of size 5 with a stride of 1. The convolution operation can be represented as:
[0137]
[0138] in, This is the weight matrix of the second convolutional layer. This is the bias term. Through convolution operations, the model can extract medium-term cyclical features from the input data. These features reflect changes in carbon emission data over medium time scales, such as weekly or monthly periodic variations.
[0139] Next, the second-level decomposed components are downsampled to obtain the second intermediate sequence. Specifically, after obtaining the second-level decomposed components, they are downsampled to further reduce the dimensionality of the data and extract more abstract features. Assuming average pooling is used, with a pooling window size of 2 and a stride of 2, the downsampled second intermediate sequence can be represented as:
[0140]
[0141] in This indicates an average pooling operation. The second intermediate sequence after downsampling retains the main information of the mid-term periodic features while reducing the complexity of the data, providing a simpler input for subsequent feature extraction.
[0142] Then, the second intermediate sequence is input into the third convolutional layer to extract long-term trend features, resulting in the third layer decomposition components. Specifically, the downsampled second intermediate sequence is input into the third convolutional layer to extract long-term trend features. The number and size of the convolutional kernels in the third convolutional layer can be set according to the parameter set. For example, the third convolutional layer can use 16 kernels of size 7 with a stride of 1. The convolution operation can be represented as:
[0143]
[0144] in, This is the weight matrix of the third convolutional layer. This is the bias term. Through convolution operations, the model can extract long-term trend features from the input data. These features reflect changes in carbon emission data over longer time scales, such as annual trends.
[0145] Finally, the first, second, and third-level decomposition components are integrated to form a multi-scale decomposition component that includes short-term, medium-term, and long-term features. Specifically, this step merges features from different time scales so that subsequent models can utilize these features simultaneously for prediction. Integration can be achieved through simple concatenation or through weighted summation. For example, assuming a weighted summation method is used, the integrated multi-scale decomposition component can be represented as:
[0146]
[0147] in, , and These represent the weights of the first, second, and third layers of decomposition components, respectively. , and The module can be adjusted according to actual needs to balance the importance of features at different time scales. Through the above steps, the adaptive multi-scale decomposition module can effectively extract short-term fluctuations, medium-term cycles, and long-term trends from standardized carbon emission sequences and integrate these features into multi-scale decomposition components.
[0148] Step S205: Perform spatiotemporal feature fusion on the multi-scale decomposition components to obtain the enhanced feature matrix.
[0149] It should be noted that the spatiotemporal feature fusion of multi-scale decomposition components aims to combine features from different time scales with spatial information to generate an enhanced feature matrix that comprehensively reflects the dynamics of carbon emissions. This process enhances the model's ability to understand complex carbon emission patterns by capturing the spatiotemporal correlations in the data, thereby improving prediction accuracy and robustness.
[0150] Further, step S205 includes: First, assigning initial weights to the short-term fluctuation component, medium-term cycle component, and long-term trend component in the multi-scale decomposition components. Specifically, the initial weight assignment can be set according to the importance of each component in the carbon emission data. For example, assuming the initial weights of the short-term fluctuation component, medium-term cycle component, and long-term trend component are respectively... , and ,satisfy These weights can be set empirically or learned during the training process. The initial weight settings provide the foundation for subsequent feature fusion.
[0151] Next, a multi-head self-attention mechanism is used to model the temporal dependencies of various components, obtaining the feature contribution of each attention head. Specifically, the multi-head self-attention mechanism can capture the dependencies in the time series from multiple perspectives. Assuming the input sequence is... The multi-head attention mechanism can be represented as:
[0152]
[0153] The formula for calculating each attention point is:
[0154]
[0155] in, , and These are the query matrix, key matrix, and value matrix. , and This represents the weight matrix for each attention head. This represents the output weight matrix. This indicates the number of attention heads. Through the multi-head self-attention mechanism, the model can capture the temporal dependencies of components at different time scales and output the feature contribution of each attention head.
[0156] Next, a weighted sum is performed based on the feature contribution and the initial weights to obtain the time-enhanced features for each component. Assume the feature contribution is... Then time-enhanced features It can be represented as:
[0157]
[0158] in, , and These are the characteristic contributions of short-term volatility components, medium-term cyclical components, and long-term trend components, respectively. , and These are the weighting coefficients representing the characteristic contributions of the short-term volatility component, the medium-term cycle component, and the long-term trend component, respectively.
[0159] Subsequently, a spatial correlation map was constructed based on the geographical adjacency and industrial linkages of cities within the province. Specifically, geographical adjacency can be represented by Euclidean distance or administrative boundaries between cities, while industrial linkages can be represented by industrial similarity or economic ties between cities. The spatial correlation map can be represented as an adjacency matrix, where the elements of the matrix represent the strength of the linkage between cities.
[0160] The temporal enhancement features are then mapped onto the spatial association graph and computed using a graph convolutional network to obtain the spatial enhancement features for each component class. .
[0161] Then, the temporal and spatial augmentation features are calculated using the sigmoid function to obtain the fusion gating coefficients. Specifically, the fusion gating coefficients can be expressed as:
[0162]
[0163] in , It is an exponential function.
[0164] Then, the temporal and spatial enhancement features are weighted and fused based on the fusion gating coefficients to obtain the single-scale spatiotemporal fusion features corresponding to each component class. Single-scale spatiotemporal fusion features It can be represented as:
[0165]
[0166] In this way, the model can dynamically fuse temporal and spatial augmentation features to generate more representative single-scale spatiotemporal fusion features.
[0167] Finally, the single-scale spatiotemporal fusion features corresponding to the short-term fluctuation component, the medium-term cycle component, and the long-term trend component are concatenated along the channel dimension to obtain the enhanced feature matrix. This enhanced feature matrix contains rich spatiotemporal information, providing a more comprehensive input for subsequent prediction models. Through this spatiotemporal feature fusion method, the model can not only capture the temporal trends of carbon emission data but also understand the spatial relationships between cities, thereby generating more accurate and interpretable prediction results.
[0168] Step S206: Optimize the initial carbon emission prediction model based on the enhanced feature matrix and the multi-scale fair perception loss function to obtain the preset carbon emission prediction model.
[0169] It should be noted that the enhanced feature matrix integrates rich information from both temporal and spatial dimensions, providing the model with comprehensive input data. Building upon this, a multi-scale fairness-perceived loss function is introduced to ensure that the prediction results not only meet accuracy requirements but also achieve fairness across regions. This multi-scale fairness-perceived loss function combines daily and monthly Gini coefficient errors to quantify the fairness of the prediction results' distribution across regions. The daily Gini coefficient measures the fairness of short-term fluctuations, while the monthly Gini coefficient reflects the fairness of long-term trends. By weighted fusion of these two Gini coefficient errors and combining them with the traditional mean squared error (MSE), a comprehensive optimization objective is formed. The optimization process employs an alternating training strategy: updating the discriminator while fixing the generator, and updating the generator while fixing the discriminator, ensuring that the model's performance gradually improves during adversarial training.
[0170] Further, step S206 includes: First, dividing the enhanced feature matrix into a training subset and a test subset according to a preset ratio. The training subset is used for updating model parameters, and the test subset is used for validating model performance. Specifically, this process ensures that the model can learn the general features of the data during training, while validating the model's generalization ability through the test subset. Typically, the dataset can be divided into an 80% training subset and a 20% test subset. The training subset is used for updating model parameters, while the test subset is used for validating model performance. This division method effectively avoids model overfitting and ensures the model's performance on unseen data.
[0171] Next, the hyperparameters of the initial carbon emission prediction model are initialized. These hyperparameters include the hidden layer dimension of the generator, the convolutional kernel size of the discriminator, and the learning rate of the optimizer. Specifically, the hidden layer dimension of the generator determines the model's ability to extract features and is typically set to 128 or 256. The convolutional kernel size of the discriminator affects the model's ability to capture local features and is generally set to 3 or 5. The learning rate of the optimizer determines the speed at which the model parameters are updated, and the initial learning rate can be set to 0.001. These hyperparameters can be adjusted based on the model's performance during training to achieve the best training results.
[0172] Next, the training subset is fed into the generator of the initial carbon emission prediction model to generate the first simulated carbon emission sequence. Specifically, the generator is based on an encoder-decoder architecture and incorporates a multi-head attention mechanism to capture long-term dependencies in the time series. The generator's output is the model's prediction of carbon emission data from the training subset; these predictions will be used for subsequent adversarial training.
[0173] Subsequently, the first simulated carbon emission sequence and the real carbon emission sequences from the training subset are input into the discriminator to obtain classification probabilities. Specifically, the discriminator employs a temporal convolutional network (TCN), which can effectively distinguish between real and generated data. The output of the discriminator is the probability that two sequences belong to the real data; this probability is used to calculate the loss function.
[0174] Then, based on the classification probabilities, the multi-scale fairness-perceived loss function is used to calculate the total loss value between the first simulated carbon emission sequence and the real carbon emission sequence. Specifically, the multi-scale fairness-perceived loss function incorporates daily and monthly Gini coefficient errors to quantify the fairness of the prediction results across regions. Further, the step to obtain the total loss value is to calculate the adversarial loss value using the binary cross-entropy algorithm based on the classification probabilities. Specifically, the discriminator's output is the probability that two sequences belong to the real data, denoted as... and These correspond to the probabilities of the real carbon emission sequence and the simulated carbon emission sequence, respectively. The adversarial loss value can be expressed as:
[0175]
[0176] in, This represents the adversarial loss value, used to measure the adversarial training effect between the generator and discriminator in a generative adversarial network. The labels for the samples (1 represents the real sample label, and 0 represents the fake sample label). Indicates the number of samples involved in the calculation. Indicates the index of the sample, from 1 to , Indicates the discriminator on the first The predicted probability of a real sample, that is, the probability that the discriminator judges the sample as a real sample. Indicates the discriminator on the first The predicted probability of a generated fake sample, that is, the probability that the discriminator judges the sample as a fake sample. The natural logarithm function is used to convert probability values into logarithmic form to facilitate loss calculation. The adversarial loss measures the discriminator's ability to distinguish between real and generated data, and also reflects the quality of the data generated by the generator.
[0177] The multi-scale fair perception loss function is used to calculate the error between the first simulated carbon emission series and the actual carbon emission series step by step using the mean absolute percentage error formula. The average of all errors is then taken to obtain the prediction error loss value. The specific calculation formula is as follows:
[0178]
[0179] in, This represents the prediction error loss value. For the first The actual carbon emissions of each sample For the first Simulated carbon emissions for each sample The number of samples used in the calculation. The index of the sample, from 1 to , This is calculated as an absolute value to ensure that the prediction error loss is non-negative.
[0180] The simulated carbon emission series and the actual carbon emission series are grouped by day. The Gini coefficient for the first day and the Gini coefficient for the second day are calculated for each of the two groups for each day. The absolute difference between the two Gini coefficients for each day is taken, and the average of all daily differences is calculated as the daily fair loss value. Specific Gini coefficients... The calculation formula is:
[0181]
[0182] in, For the first The carbon emission values of a sample (such as the predicted or actual carbon emission values of a city), and these samples are arranged in ascending order. The number of samples used in the calculation. The index of the sample, from 1 to Daily fair value It can be represented as:
[0183]
[0184] in, This indicates the number of days involved in the calculation (i.e., the number of days to be evaluated). and They are the first The Gini coefficients of the actual and simulated carbon emission series for a given day are used to characterize the fairness of the distribution of actual and simulated data for that day, respectively. This is calculated as an absolute value to ensure that the daily Gini coefficient difference is non-negative.
[0185] The simulated carbon emission series and the actual carbon emission series are summarized on a monthly basis to obtain the total simulated carbon emission and the total actual carbon emission for each month.
[0186] The Gini coefficient for the first month and the Gini coefficient for the second month are calculated based on the simulated total carbon emissions and the actual total carbon emissions, respectively. The absolute difference between the two sets of Gini coefficients is taken for each month, and then the average of all monthly differences is calculated as the monthly fair loss value. Specifically, it is expressed as follows:
[0187]
[0188] in, This indicates the number of months involved in the calculation (i.e., the number of months to be evaluated). and They are the first The Gini coefficients of the actual and simulated carbon emission series for a given month are used to characterize the fairness of the distribution of actual and simulated data for that month, respectively. Calculated as an absolute value to ensure that the monthly Gini coefficient difference is non-negative.
[0189] The prediction error loss, daily fairness loss, and monthly fairness loss are weighted and summed according to preset weights to obtain the total loss value of the multi-scale fairness-perceived loss function. (Total loss value of each component) It can be represented as:
[0190]
[0191] in , and These are preset weights used to balance the importance of different loss terms.
[0192] The total loss value is obtained by correlating the adversarial loss value with the total loss value of each component. It can be represented as:
[0193]
[0194] in, , which is a weighting coefficient used to balance the importance of adversarial loss and multi-scale fairness perception loss.
[0195] Then, the total loss value is fed back to the initial carbon emission prediction model via backpropagation to update the parameters of the generator and discriminator. This process is the core of model training; by minimizing the total loss value, the model can gradually improve prediction accuracy and fairness.
[0196] When the number of iterations reaches a preset number (usually 1000 rounds, which can be adjusted according to the convergence of the loss), training is paused and performance is verified. A subset of the test data is input into the currently optimized model to generate a second simulated carbon emission sequence. This process is used to verify the model's performance on unseen data and ensure that the model has good generalization ability.
[0197] The average error is then calculated by comparing the second simulated carbon emission series with the real series in the test subset. The model performance is evaluated by calculating the average error (such as mean absolute error or root mean square error) between the second simulated carbon emission series and the real series in the test subset. The smaller the average error, the higher the model's prediction accuracy.
[0198] Finally, when the average error over consecutive preset rounds is less than a preset error threshold, the currently optimized model is designated as the preset carbon emission prediction model. Specifically, the preset error threshold can be set according to actual needs, such as 0.05 or 0.1. The number of consecutive rounds can also be adjusted based on the model's stability and convergence speed, typically set to 5 or 10 rounds. For example, if the average error over 5 consecutive rounds is less than 0.1, it indicates that the model performance is stable and meets the requirements, and the currently optimized model is designated as the preset carbon emission prediction model. If the threshold is not reached, the hyperparameters (such as learning rate and hidden layer dimension) are adjusted, and the training process is re-entered until the performance requirements are met. The final model can be used for accurate carbon emission prediction and trend analysis.
[0199] This embodiment optimizes the initial carbon emission prediction model by dividing the enhanced feature matrix into training and testing subsets and using the training subset. The model is based on a Generative Adversarial Network (GAN), where the generator produces simulated carbon emission sequences, and the discriminator evaluates the sequence's authenticity. The generator and discriminator parameters are optimized using a multi-scale fairness-perceived loss function, combined with adversarial loss and prediction error loss. After a preset number of iterations, the model performance is verified using the testing subset. When the average error remains below a preset threshold for multiple consecutive iterations, the model is selected as the preset carbon emission prediction model. This not only improves prediction accuracy but also ensures prediction fairness across regions, providing scientific and reliable decision support for provincial carbon emission management.
[0200] Based on the first embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 7 The provincial carbon emission prediction method based on adaptive multi-scale decomposition, step S40, further includes steps S301 to S306:
[0201] Step S301: Obtain the daily carbon emission forecast values for each city during the forecast period based on the carbon emission forecast values.
[0202] It should be noted that this process not only needs to ensure the accuracy and reliability of the forecast results, but also needs to interpret and apply the forecast results reasonably in order to support carbon emission management and policy-making at the city level.
[0203] First, the prediction results for each city are obtained from a pre-set carbon emission prediction model. The model outputs a multi-dimensional array containing the predicted carbon emissions for each city during the predicted period. These predictions are generated based on the model's learning and analysis of historical data, reflecting the carbon emission trends of each city in the future. The predictions are obtained by inputting standardized feature data into the trained model, which then performs complex calculations and analyses to output the predicted carbon emissions for each city at each time step (e.g., daily).
[0204] Next, the predicted values output by the model are post-processed to ensure the reasonableness and usability of the prediction results. The post-processing process includes performing an inverse normalization transform on the predicted values (if normalization was performed in the preprocessing stage) and correcting outliers. The purpose of the inverse normalization transform is to restore the predicted values from the standardized range to the original carbon emission levels, so as to better reflect the actual carbon emission situation. Outlier correction is to ensure that there are no obvious errors or unreasonable aspects in the prediction results, such as negative values or excessively high values, which may affect subsequent analysis and applications.
[0205] After obtaining the daily carbon emission forecasts for each city, the results need to be validated and analyzed. This step includes comparative analysis with historical data and an assessment of the reasonableness of the forecasts. By comparing with historical data, the model's forecast accuracy and trend consistency can be observed intuitively. For example, it can be checked whether the forecast values are consistent with the seasonal variations and trends of historical data, and whether there are any significant deviations. In addition, the model's forecasting performance can be quantified by calculating error indices (such as mean squared error or mean absolute error) between the forecast values and historical data, and the model can be adjusted and optimized as necessary.
[0206] To further enhance the usability of the forecast results, visualization analysis can be performed. For example, time-series plots of daily carbon emission forecasts for each city, along with comparison charts with actual data, can visually demonstrate the model's predictive effectiveness. Visual analysis allows for a clearer observation of the model's performance at different time scales and the distribution differences of forecast results across cities. This not only helps identify potential problems with the model but also provides policymakers with more intuitive decision-making support.
[0207] Finally, the obtained daily carbon emission forecasts are applied to city-level carbon emission management and policy-making. For example, based on the forecasts, city managers can formulate emission reduction measures in advance, optimize energy use strategies, and adjust industrial structures to achieve carbon emission control targets. Simultaneously, the forecasts can provide data support for inter-city carbon emission trading and regional coordinated emission reduction, promoting the equitable allocation and collaborative governance of regional carbon emissions. Furthermore, the forecasts can be used to evaluate the effectiveness of existing policies and provide a reference for future policy adjustments.
[0208] Step S302: Verify the validity of the daily carbon emission forecast values, remove abnormal forecast values that exceed the preset reasonable emission range, and fill the abnormal positions with the average of the forecast values of adjacent days in the same city to obtain the verified daily forecast values.
[0209] It should be noted that this process aims to identify and eliminate abnormal predicted values that exceed the reasonable emission range, and to fill these abnormal positions with reasonable methods, thereby obtaining the verified daily predicted values.
[0210] First, determine a pre-defined reasonable emission range. This range is typically set based on historical data and industry standards, reflecting the normal fluctuation range of carbon emissions. For example, a reasonable emission range can be determined by calculating the mean and standard deviation of carbon emissions for each city based on data from the same period over the past few years. Any predicted value outside this range will be considered an outlier.
[0211] Next, the daily carbon emission forecasts for each city are checked one by one. If a forecast is found to exceed the preset reasonable emission range, it is marked as an outlier. For example, if a city's forecast emission for a particular day is significantly higher than its historical high or significantly lower than its historical low, then this forecast may be an outlier.
[0212] Once outliers are identified, they need to be addressed. The approach is to fill in the outlier locations with the average of the predicted values for adjacent dates within the same city. Specifically, if a predicted value for a particular day is flagged as an outlier, the average of the predicted values for the city on the previous and following days can be used to replace the outlier. This method assumes that carbon emissions on adjacent dates typically exhibit some similarity, making it reasonable to use predicted values from adjacent dates to fill in outliers.
[0213] After outliers are filled in, the resulting daily forecasts are validated. These validated forecasts are more stable and reliable, and can better reflect actual carbon emissions. For example, if a city's predicted emissions for a particular day are marked as outliers and filled in, the filled value will be closer to the city's carbon emissions level under normal conditions.
[0214] By performing the above steps to validate the daily carbon emission forecasts and fill in outliers, the accuracy and reliability of the forecast results can be improved. This method not only identifies and handles outliers but also ensures the consistency and continuity of the forecast results over time. The final validated daily forecasts can provide more accurate data support for city-level carbon emission management and policy formulation, contributing to more effective carbon emission control and management.
[0215] Step S303: Summarize the verified daily forecast values by city dimension and calculate the sum of all verified daily forecast values for each city during the forecast period to obtain the total carbon emission forecast value for each city during the forecast period.
[0216] It should be noted that after verifying the validity of the daily carbon emission forecasts and filling in outliers, the next step is to aggregate these verified daily forecasts by city and calculate the sum of all verified daily forecasts for each city during the forecast period, thereby obtaining the total carbon emission forecast for each city during the forecast period. This process transforms daily data into more macro-level aggregate data, providing crucial information for city-level carbon emission management and policy formulation.
[0217] First, the validated daily forecasts are grouped by city. This means extracting all validated daily forecasts for each city separately, forming a city-based dataset. Each city's daily forecast sequence contains the predicted carbon emissions for each day of the forecast period. These values have been validated to ensure the accuracy and reliability of the data.
[0218] Next, the daily forecast series for each city is aggregated and calculated. Specifically, all verified daily forecasts for each city within the forecast period are summed to obtain the total predicted carbon emissions for that city during that period. This aggregation process is a crucial step in transforming daily data into total data, providing a macro-level perspective on carbon emissions and helping policymakers understand the overall carbon emission level of each city within a specific time period.
[0219] During the data aggregation process, it is crucial to ensure the completeness and accuracy of the data. This means checking the daily forecast series for each city to ensure it is complete and free of missing or duplicate data points. If data issues are found, timely corrections are necessary to guarantee the accuracy of the aggregated results. Furthermore, the aggregated results must be checked for reasonableness. For example, comparing the predicted total carbon emissions of different cities and checking for abnormally high or low values, which may require further analysis and verification.
[0220] Ultimately, the projected total carbon emissions for each city during the forecast period can provide crucial information for city-level carbon emission management and policy formulation. For example, these projected values can help city managers assess the effectiveness of current carbon emission control measures and determine whether adjustments to emission reduction targets or new measures are necessary. Furthermore, this data can be used for inter-city carbon emission comparisons and collaborative emission reduction plans, promoting equitable allocation and coordinated governance of carbon emissions within the region.
[0221] By summarizing and verifying the daily forecast values and calculating the total carbon emission forecast value by city dimension through the above steps, we can not only provide macro-level carbon emission data, but also provide scientific and accurate decision support for urban carbon emission management, which helps to promote the city to achieve low-carbon development and address climate change.
[0222] Step S304: Sum the predicted total carbon emissions of all cities to obtain the predicted total carbon emissions for the period to be predicted at the provincial level.
[0223] It should be noted that after calculating the total carbon emissions forecast for each city during the forecast period, the next step is to sum the total carbon emissions forecasts for all cities to obtain the total carbon emissions forecast for the provincial level during the forecast period. This process further integrates city-level carbon emissions data into provincial-level data, providing macro-level decision-making support for provincial carbon emissions management and policy formulation.
[0224] First, we collected total carbon emission forecasts for all cities. This data was obtained through the validity verification, outlier imputation, and city-level aggregation of the daily forecasts for each city, as described in the previous steps. Each city's total carbon emission forecast represents its overall carbon emission level for the forecast period. These data have undergone rigorous processing to ensure their accuracy and reliability.
[0225] Next, the predicted carbon emissions for all cities are summed. This process involves adding the predicted carbon emissions for all cities to obtain the predicted carbon emissions at the provincial level. The purpose of this summation is to integrate scattered city-level data into a macro-level provincial data, thereby providing a comprehensive perspective on carbon emissions. This result reflects the overall carbon emissions of the entire province during the predicted period, providing crucial information for provincial-level carbon emissions management and policy formulation.
[0226] When performing summation calculations, it is essential to ensure the integrity and accuracy of the data. This means checking whether the predicted total carbon emissions for each city have been correctly calculated and included in the summation, ensuring that there are no omissions or duplicates. Simultaneously, the reasonableness of the summation results needs to be checked; for example, comparing the predicted total carbon emissions for different cities to check for any abnormally high or low values. These outliers may require further analysis and verification.
[0227] The final carbon emission forecasts for the forecast period at the provincial level can provide important information for provincial carbon emission management and policy formulation. For example, these results can help provincial managers assess the effectiveness of current carbon emission control measures and whether it is necessary to adjust emission reduction targets or take new emission reduction measures. Simultaneously, these results can also be used for intra-provincial carbon emission comparisons and coordinated emission reduction plans, promoting equitable allocation and collaborative governance of carbon emissions within the region.
[0228] By summing up the predicted total carbon emissions of all cities through the above steps, the predicted total carbon emissions at the provincial level are obtained. This not only provides macro-level carbon emission data, but also provides scientific and accurate decision support for provincial carbon emission management, which helps to promote the province's goals of low-carbon development and addressing climate change.
[0229] Step S305: Extract and organize the verified daily forecast values, total carbon emission forecast values, and total carbon emission forecast results at the provincial level for each city to obtain structured data.
[0230] It should be noted that after calculating the daily forecasts, total carbon emission forecasts, and provincial-level total carbon emission forecasts for each city, the next step is to extract and organize this data into a structured data format. This process aims to integrate the scattered forecast results into a clear, easy-to-analyze, and usable dataset, providing support for subsequent carbon emission management and policy formulation.
[0231] First, the validated daily forecast values for each city are extracted from the database or data storage system. These data have undergone validity checks and outlier handling to ensure their accuracy and reliability. Each city's daily forecast value includes the predicted carbon emissions for each day of the forecast period, and this data will be part of the structured data.
[0232] Next, the total carbon emission forecast for each city is extracted. This data is obtained by aggregating the verified daily forecasts for each city, representing the overall carbon emission level of each city during the forecast period. This total data, along with the daily forecasts, constitutes an important part of the structured data.
[0233] Simultaneously, the total carbon emission forecast at the provincial level is extracted. This data is obtained by summing the total carbon emission forecasts for all cities, reflecting the overall carbon emission situation of the entire province during the forecast period. The provincial total data will serve as macro-level information from the structured data, providing a basis for provincial-level decision-making.
[0234] After extracting this data, it needs to be organized into a structured data format. The structure of the structured data is: Date-City-Daily Forecast-City Total-Provincial Total. Date represents the specific date of the forecast. City represents the name or code of the city to which the data belongs. Daily Forecast represents the predicted carbon emissions for that city on that date. City Total represents the predicted total carbon emissions for that city during the forecast period. Provincial Total represents the predicted total carbon emissions for the entire province during the forecast period. The organization process includes sorting the data by date and city to ensure data completeness and consistency. For example, checking whether the data for each date and city is complete and whether there are any duplicates or omissions. At the same time, it is necessary to ensure that the data format is consistent to facilitate subsequent analysis and use.
[0235] The resulting structured data will be a clear and organized dataset that can be easily used to generate reports, conduct data analysis, or support decision-making. For example, policymakers can quickly understand the carbon emissions of each city on a specific date, as well as the total carbon emissions of the entire province, by viewing structured data. This structured data format not only facilitates storage and management but also supports various data visualization and analysis tools, providing strong support for carbon emission management and policy-making.
[0236] Step S306: Standardize the format of the structured data to generate provincial-level carbon emission prediction results.
[0237] It should be noted that after extracting and organizing the structured data, the next step is to standardize the format of this data to generate provincial-level carbon emission prediction results. This process aims to ensure that the data is formatted uniformly, the information is complete, and it is easy to understand and use, thereby providing high-quality data support for provincial carbon emission management and policy formulation.
[0238] First, the structured data should be standardized. This includes standardizing the date format, the representation of city names or codes, and ensuring consistency in the precision and units of all numerical data. For example, the date format should be standardized as "YYYY-MM-DD", city names should use standardized full names or uniform codes, and carbon emission values should be standardized as tons of CO2 equivalent (…). The data is standardized and rounded to two decimal places. This standardization ensures data compatibility and consistency across different systems and platforms. Then, provincial-level carbon emission forecasts are generated, including data sources, forecast periods, statistical dimensions, and specific forecast values. Data sources clearly indicate the origin of the forecast data, including the model used, the time frame for data collection, and the data preprocessing methods. For example, the data comes from a "carbon emission forecast model based on adaptive multi-scale decomposition," collected from "January 2025 to October 2025," and has undergone validity verification and outlier imputation. The forecast period clearly defines the time range covered by the forecast results. For example, November 2025 to December 2025. Statistical dimensions describe the statistical dimensions of the data, including summaries by date, city, and province. For example, daily forecasts, city totals, and province totals. Specific forecast values provide specific forecast values, including daily city forecasts for each date, total carbon emission forecasts for each city, and total carbon emission forecasts at the provincial level. These values should be presented in tabular or document form to ensure clarity and readability.
[0239] In generating the forecast results, further verification and review of the data are required. This includes checking the completeness and accuracy of the data to ensure no omissions or errors. For example, verifying whether the daily forecast value for each city is consistent with the total for the city, and whether the total for the province equals the sum of the totals for all cities. Furthermore, a reasonableness check is needed to ensure the forecast values are within a reasonable range.
[0240] The final provincial-level carbon emission forecasts should be output in a standardized format, such as a CSV file, Excel spreadsheet, or database table. These files should include clear headings and descriptions so that users can quickly understand and use the data. For example, the first row of a CSV file should contain column headings such as "Date," "City," "Daily Forecast," "City Total," and "Provincial Total," with subsequent rows containing the specific forecast data.
[0241] This embodiment verifies the validity of the daily forecast values output by the model, removes outliers, and fills in the gaps with the average of adjacent dates to ensure data reliability. Next, the verified daily forecast values are aggregated by city, the total carbon emission forecast values for each city are calculated, and then summed to obtain the total forecast result at the provincial level. Finally, these data are organized into a structured date-city-daily forecast-city total-province total format and standardized to generate a complete provincial carbon emission forecast result. This approach not only improves the accuracy and usability of the forecast data but also provides scientific and transparent data support for provincial carbon emission management and policy formulation, contributing to promoting regional low-carbon development and addressing climate change.
[0242] Based on the first embodiment of this application, this application also provides a provincial carbon emission prediction device based on adaptive multi-scale decomposition. Please refer to... Figure 8 The device includes:
[0243] Module 10 is used to acquire carbon emission data for the forecast period from various cities within the province.
[0244] The preprocessing module 20 is used to preprocess carbon emission data to obtain standardized carbon emission data.
[0245] The prediction module 30 is used to input standardized carbon emission data into a preset carbon emission prediction model to obtain the carbon emission prediction values for each city during the prediction period. The preset carbon emission prediction model includes a generator and a discriminator. The generator is an encoder-decoder architecture with an embedded multi-head attention mechanism, and the discriminator is a temporal convolutional network.
[0246] Result module 40 is used to summarize the carbon emission prediction values to obtain the carbon emission prediction results at the provincial level.
[0247] The provincial carbon emission prediction device based on adaptive multi-scale decomposition provided in this application, employing the provincial carbon emission prediction method based on adaptive multi-scale decomposition in the above embodiments, can solve the technical problem of how to achieve both high accuracy and fairness in provincial carbon emission prediction. Compared with the prior art, the beneficial effects of the provincial carbon emission prediction device based on adaptive multi-scale decomposition provided in this application are the same as those of the provincial carbon emission prediction method based on adaptive multi-scale decomposition provided in the above embodiments, and other technical features in the provincial carbon emission prediction device based on adaptive multi-scale decomposition are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0248] In one embodiment, the prediction module 30 is further configured to: collect historical daily carbon emission data from various cities within the province; construct an initial carbon emission prediction model; clean, align, and normalize the historical daily carbon emission data to obtain a standardized carbon emission sequence; decompose the standardized carbon emission sequence using an adaptive multi-scale decomposition method to obtain multi-scale decomposition components; perform spatiotemporal feature fusion on the multi-scale decomposition components to obtain an enhanced feature matrix; and optimize the initial carbon emission prediction model based on the enhanced feature matrix combined with a multi-scale fair perception loss function to obtain a preset carbon emission prediction model.
[0249] In one embodiment, the prediction module 30 is further configured to initialize the parameter set of the adaptive multi-scale decomposition module, wherein the parameter set includes the number of decomposition layers, the number of convolutional kernels per layer, and the initial learning rate; convert the standardized carbon emission sequence into a three-dimensional input tensor, wherein the dimensions of the three-dimensional input tensor include the number of cities, the time step, and the feature dimension; input the three-dimensional input tensor into the first convolutional layer of the adaptive multi-scale decomposition module to extract short-term fluctuation features, obtaining a first-layer decomposition component; perform downsampling processing on the first-layer decomposition component to obtain a first intermediate sequence; input the first intermediate sequence into a second convolutional layer to extract medium-term periodic features, obtaining a second-layer decomposition component; perform downsampling on the second-layer decomposition component to obtain a second intermediate sequence; input the second intermediate sequence into a third convolutional layer to extract long-term trend features, obtaining a third-layer decomposition component; and integrate the first-layer decomposition component, the second-layer decomposition component, and the third-layer decomposition component to form a multi-scale decomposition component including short-term, medium-term, and long-term features.
[0250] In one embodiment, the prediction module 30 is further configured to: assign initial weights to the short-term fluctuation component, medium-term cycle component, and long-term trend component in the multi-scale decomposition components; perform time-dependent modeling on each type of component using a multi-head self-attention mechanism to obtain the feature contribution of each attention head; perform weighted summation based on the feature contribution and the initial weights to obtain the time-enhanced features of each type of component; construct a spatial correlation graph based on the geographical adjacency and industrial correlation of cities within the province; map the time-enhanced features onto the spatial correlation graph and calculate using a graph convolutional network to obtain the spatial-enhanced features of each type of component; calculate the time-enhanced features and the spatial-enhanced features using a sigmoid function to obtain a fusion gating coefficient; perform weighted fusion of the time-enhanced features and the spatial-enhanced features according to the fusion gating coefficient to obtain the single-scale spatiotemporal fusion features corresponding to each type of component; and concatenate the single-scale spatiotemporal fusion features corresponding to the short-term fluctuation component, medium-term cycle component, and long-term trend component according to the channel dimension to obtain an enhanced feature matrix.
[0251] In one embodiment, the prediction module 30 is further configured to: divide the enhanced feature matrix into a training subset and a test subset according to a preset ratio; use the training subset for model parameter updates and the test subset for model performance verification; initialize the hyperparameters of the initial carbon emission prediction model, wherein the hyperparameters include the hidden layer dimension of the generator, the convolutional kernel size of the discriminator, and the learning rate of the optimizer; input the training subset into the generator of the initial carbon emission prediction model to generate a first simulated carbon emission sequence; input the first simulated carbon emission sequence and the real carbon emission sequence in the training subset into the discriminator to obtain a classification probability; and calculate the classification probability based on the classification probability. The multi-scale fairness-perceived loss function is used to calculate the total loss value between the first simulated carbon emission sequence and the real carbon emission sequence. The total loss value is then backpropagated to the initial carbon emission prediction model via a backpropagation algorithm to update the parameters of the generator and discriminator. When the number of iterations reaches a preset number, the test subset is input into the currently optimized model to generate a second simulated carbon emission sequence. The average error is calculated between the second simulated carbon emission sequence and the real sequence in the test subset. When the average error is less than a preset error threshold in a consecutive preset number of rounds, the currently optimized model is determined as the preset carbon emission prediction model.
[0252] In one embodiment, the prediction module 30 is further configured to calculate the adversarial loss value based on the classification probability using a binary cross-entropy algorithm; call the multi-scale fair perception loss function to calculate the error between the first simulated carbon emission sequence and the real carbon emission sequence step by step using the mean absolute percentage error formula, and then take the average of all errors to obtain the prediction error loss value; group the first simulated carbon emission sequence and the real carbon emission sequence by day, calculate the Gini coefficient for the two groups of sequences for each day, take the absolute difference between the two groups of Gini coefficients for each day, and then calculate the difference for all days. The average value is used as the daily fairness loss value; the first simulated carbon emission series and the actual carbon emission series are summarized monthly to obtain the total simulated carbon emissions and the total actual carbon emissions for each month; the monthly Gini coefficient is calculated for the total simulated carbon emissions and the total actual carbon emissions, and the absolute difference between the two sets of Gini coefficients for each month is taken as the average of all monthly differences as the monthly fairness loss value; the prediction error loss value, the daily fairness loss value, and the monthly fairness loss value are weighted and summed according to preset weights to obtain the total loss value of the multi-scale fairness perception loss function. The adversarial loss value is correlated with the total loss value to obtain the total loss value.
[0253] In one embodiment, the result module 40 is further configured to: obtain daily carbon emission forecast values for each city during the forecast period based on the carbon emission forecast values; verify the validity of the daily carbon emission forecast values, remove abnormal forecast values that exceed a preset reasonable emission range, fill the abnormal positions with the average of the forecast values of adjacent dates in the same city, and obtain verified daily forecast values; summarize the verified daily forecast values by city dimension and calculate the sum of all verified daily forecast values for each city during the forecast period to obtain the total carbon emission forecast value for each city during the forecast period; and calculate the total carbon emission forecast value for all cities. The predicted values are summed to obtain the total carbon emission prediction result for the period to be predicted at the provincial level. The verified daily predicted values, the total carbon emission prediction values, and the total carbon emission prediction results at the provincial level for each city are extracted and organized to obtain structured data. The structure of the structured data is date-city-daily predicted value-city total-provincial total. The structured data is then standardized to generate the carbon emission prediction result at the provincial level, which includes the data source, prediction period, statistical dimensions, and specific predicted values.
[0254] This application provides a provincial carbon emission prediction device based on adaptive multi-scale decomposition. The provincial carbon emission prediction device based on adaptive multi-scale decomposition includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the provincial carbon emission prediction method based on adaptive multi-scale decomposition in the above embodiment 1.
[0255] The following is for reference. Figure 9 The diagram illustrates a structural schematic of a provincial carbon emission prediction device based on adaptive multi-scale decomposition suitable for implementing embodiments of this application. The provincial carbon emission prediction device based on adaptive multi-scale decomposition in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 9 The provincial carbon emission prediction device based on adaptive multi-scale decomposition shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0256] like Figure 9As shown, the provincial carbon emission prediction device based on adaptive multi-scale decomposition may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the provincial carbon emission prediction device based on adaptive multi-scale decomposition. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the provincial carbon emission prediction device based on adaptive multi-scale decomposition to communicate wirelessly or wiredly with other devices to exchange data. Although various provincial carbon emission prediction devices based on adaptive multi-scale decomposition are shown in the figures, it should be understood that implementation or possession of all of them is not required. More or fewer of these devices may be implemented alternatively.
[0257] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0258] The provincial carbon emission prediction device based on adaptive multi-scale decomposition provided in this application, employing the provincial carbon emission prediction method based on adaptive multi-scale decomposition in the above embodiments, can solve the technical problem of how to achieve both high accuracy and fairness in provincial carbon emission prediction. Compared with the prior art, the beneficial effects of the provincial carbon emission prediction device based on adaptive multi-scale decomposition provided in this application are the same as those of the provincial carbon emission prediction method based on adaptive multi-scale decomposition provided in the above embodiments, and other technical features in this provincial carbon emission prediction device based on adaptive multi-scale decomposition are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0259] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0260] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0261] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the provincial carbon emission prediction method based on adaptive multi-scale decomposition in the above embodiments.
[0262] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable medium may be any tangible medium containing or storing a program that can be executed by instructions, used by a device, or used in conjunction with it. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0263] The aforementioned computer-readable storage medium may be included in a provincial carbon emission prediction device based on adaptive multi-scale decomposition; or it may exist independently and not assembled into a provincial carbon emission prediction device based on adaptive multi-scale decomposition.
[0264] The aforementioned computer-readable storage medium carries one or more programs that, when executed by the adaptive multi-scale decomposition-based provincial carbon emission prediction device, enable the device to write computer program code for performing the operations of this application in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0265] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using dedicated hardware-based implementations that perform the specified functions or operations, or can be implemented using a combination of dedicated hardware and computer instructions.
[0266] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0267] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described provincial carbon emission prediction method based on adaptive multi-scale decomposition. This solves the technical problem of how to achieve both high accuracy and fairness in provincial carbon emission prediction. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the provincial carbon emission prediction method based on adaptive multi-scale decomposition provided in the above embodiments, and will not be repeated here.
[0268] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the provincial carbon emission prediction method based on adaptive multi-scale decomposition as described above.
[0269] The computer program product provided in this application can solve the technical problem of how to achieve both high accuracy and fairness in provincial carbon emission prediction. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the provincial carbon emission prediction method based on adaptive multi-scale decomposition provided in the above embodiments, and will not be repeated here.
[0270] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A provincial carbon emission prediction method based on adaptive multi-scale decomposition, characterized in that, The method includes: Obtain carbon emission data for the forecast period from various cities within the province; The carbon emission data is preprocessed to obtain standardized carbon emission data; The standardized carbon emission data is input into a preset carbon emission prediction model to obtain the carbon emission prediction values for each city during the prediction period. The preset carbon emission prediction model includes a generator and a discriminator. The generator is an encoder-decoder architecture with a multi-head attention mechanism embedded, and the discriminator is a temporal convolutional network. The carbon emission predictions are summarized to obtain the provincial-level carbon emission prediction results; Before the step of inputting the standardized carbon emission data into a preset carbon emission prediction model to obtain the predicted carbon emission values for each city during the predicted period, the following steps are included: Collect historical daily carbon emission data from various cities within the province; Construct an initial carbon emission prediction model; The historical daily carbon emission data is cleaned, aligned, and normalized to obtain a standardized carbon emission sequence. The standardized carbon emission sequence was decomposed using an adaptive multi-scale decomposition method to obtain multi-scale decomposed components; Spatiotemporal feature fusion is performed on the multi-scale decomposition components to obtain an enhanced feature matrix; The initial carbon emission prediction model is optimized based on the enhanced feature matrix and the multi-scale fair perception loss function to obtain the preset carbon emission prediction model. The step of optimizing the initial carbon emission prediction model based on the enhanced feature matrix and the multi-scale fair perception loss function to obtain the preset carbon emission prediction model includes: The enhanced feature matrix is divided into a training subset and a test subset according to a preset ratio. The training subset is used for model parameter updates, and the test subset is used for model performance verification. Initialize the hyperparameters of the initial carbon emission prediction model, wherein the hyperparameters include the hidden layer dimension of the generator, the convolution kernel size of the discriminator, and the learning rate of the optimizer; The training subset is input into the generator of the initial carbon emission prediction model to generate the first simulated carbon emission sequence; The first simulated carbon emission sequence and the real carbon emission sequences in the training subset are input into the discriminator to obtain the classification probability. The total loss value between the first simulated carbon emission sequence and the real carbon emission sequence is calculated by calling the multi-scale fair perception loss function based on the classification probability. The total loss value is fed back to the initial carbon emission prediction model using the backpropagation algorithm to update the parameters of the generator and discriminator. When the number of iterations reaches the preset number, the test subset is input into the currently optimized model to generate a second simulated carbon emission sequence; The average error was calculated by comparing the second simulated carbon emission sequence with the real sequence in the test subset; When the average error in consecutive preset rounds is less than a preset error threshold, the current optimized model is determined as the preset carbon emission prediction model; The step of calculating the total loss value between the first simulated carbon emission sequence and the real carbon emission sequence by calling the multi-scale fairness-perceived loss function based on the classification probability includes: The adversarial loss value is calculated using the binary cross-entropy algorithm based on the classification probability. The multi-scale fair perception loss function is called to calculate the error between the first simulated carbon emission sequence and the real carbon emission sequence step by step using the average absolute percentage error formula, and then the average value of all errors is taken to obtain the prediction error loss value. The simulated carbon emission sequence and the real carbon emission sequence are grouped by day. The first daily Gini coefficient and the second daily Gini coefficient are calculated for the two groups of sequences for each day. The absolute difference between the two groups of Gini coefficients for each day is taken, and the average of all daily differences is calculated as the daily fair loss value. The first simulated carbon emission sequence and the actual carbon emission sequence are summarized monthly to obtain the total simulated carbon emissions and the total actual carbon emissions for each month. The first monthly Gini coefficient and the second monthly Gini coefficient are calculated for the simulated total carbon emissions and the actual total carbon emissions, respectively. The absolute difference between the two sets of Gini coefficients is taken for each month, and the average of all monthly differences is then calculated as the monthly fair loss value. The prediction error loss value, the daily fairness loss value, and the monthly fairness loss value are weighted and summed according to preset weights to obtain the total loss value of the multi-scale fairness perception loss function. The total loss value is obtained by associating the adversarial loss value with the total loss value of each component.
2. The method as described in claim 1, characterized in that, The step of decomposing the standardized carbon emission sequence using an adaptive multi-scale decomposition method to obtain multi-scale decomposed components includes: Initialize the parameter set of the adaptive multi-scale decomposition module, wherein the parameter set includes the number of decomposition layers, the number of convolutional kernels per layer, and the initial learning rate; The standardized carbon emission sequence is converted into a three-dimensional input tensor, the dimensions of which include the number of cities, the time step, and the feature dimension. The three-dimensional input tensor is input into the first convolutional layer of the adaptive multi-scale decomposition module to extract short-term fluctuation features, thus obtaining the first layer decomposition components. The first layer of decomposed components is downsampled to obtain the first intermediate sequence; The first intermediate sequence is input into the second convolutional layer to extract the mid-term periodic features, resulting in the second layer decomposition components; The second layer of decomposed components is downsampled to obtain the second intermediate sequence; The second intermediate sequence is input into the third convolutional layer to extract long-term trend features, resulting in the third layer decomposition components; The first layer of decomposition components, the second layer of decomposition components, and the third layer of decomposition components are integrated to form a multi-scale decomposition component that includes short-term, medium-term, and long-term characteristics.
3. The method as described in claim 1, characterized in that, The step of fusing spatiotemporal features of the multi-scale decomposition components to obtain an enhanced feature matrix includes: The initial weights of each component are obtained by assigning weights to the short-term fluctuation component, medium-term cycle component, and long-term trend component in the multi-scale decomposition components. The time-dependent modeling of the various components is performed using a multi-head self-attention mechanism to obtain the feature contribution of each attention head. Based on the feature contribution and the initial weight, a weighted sum is performed to obtain the time-enhanced features of each component. A spatial correlation map is constructed based on the geographical adjacency and industrial correlation of cities within the province. The temporal enhancement features are mapped onto the spatial association graph and calculated using a graph convolutional network to obtain the spatial enhancement features for each component. The temporal enhancement features and the spatial enhancement features are calculated using the sigmoid function to obtain the fusion gating coefficients; The temporal enhancement features and the spatial enhancement features are weighted and fused according to the fusion gating coefficient to obtain the single-scale spatiotemporal fusion features corresponding to each type of component; The single-scale spatiotemporal fusion features corresponding to the short-term fluctuation component, medium-term cycle component, and long-term trend component are concatenated along the channel dimension to obtain the enhanced feature matrix.
4. The method as described in claim 1, characterized in that, The step of summarizing the predicted carbon emissions to obtain the provincial-level carbon emission prediction results includes: Based on the carbon emission forecast values, the daily carbon emission forecast values for each city during the forecast period are obtained; The daily carbon emission forecast values are validated, abnormal forecast values that exceed the preset reasonable emission range are removed, and the average of the forecast values of adjacent days in the same city is used to fill the abnormal positions to obtain the validated daily forecast values. The verified daily forecast values are summarized by city and the sum of all verified daily forecast values for each city during the forecast period is calculated to obtain the total carbon emission forecast value for each city during the forecast period. The total carbon emissions forecasts for all cities are summed to obtain the total carbon emissions forecast for the period to be predicted at the provincial level. The verified daily forecast values, total carbon emission forecast values, and total carbon emission forecast results at the provincial level for each city are extracted and organized to obtain structured data, wherein the structure of the structured data is date-city-daily forecast value-city total-province total. The structured data is format-standardized to generate provincial-level carbon emission prediction results, which include data sources, prediction periods, statistical dimensions, and specific prediction values.
5. A provincial carbon emission prediction device based on adaptive multi-scale decomposition, characterized in that, The device includes: The acquisition module is used to acquire carbon emission data for the forecast period from various cities within the province. The preprocessing module is used to preprocess the carbon emission data to obtain standardized carbon emission data; The prediction module is used to input the standardized carbon emission data into a preset carbon emission prediction model to obtain the predicted carbon emission values for each city during the predicted period. The preset carbon emission prediction model includes a generator and a discriminator. The generator is an encoder-decoder architecture with an embedded multi-head attention mechanism, and the discriminator is a temporal convolutional network. The module is also used to collect historical daily carbon emission data from cities within the province; construct an initial carbon emission prediction model; clean, align, and normalize the historical daily carbon emission data to obtain a standardized carbon emission sequence; decompose the standardized carbon emission sequence using an adaptive multi-scale decomposition method to obtain multi-scale decomposed components; and perform spatiotemporal feature fusion on the multi-scale decomposed components to obtain enhanced features. The algorithm is as follows: Based on the enhanced feature matrix, the initial carbon emission prediction model is optimized using a multi-scale fair perception loss function to obtain a preset carbon emission prediction model. It also divides the enhanced feature matrix into a training subset and a test subset according to a preset ratio. The training subset is used for model parameter updates, and the test subset is used for model performance verification. The hyperparameters of the initial carbon emission prediction model are initialized, including the hidden layer dimension of the generator, the convolutional kernel size of the discriminator, and the learning rate of the optimizer. The training subset is input into the generator of the initial carbon emission prediction model to generate a first simulated carbon emission sequence. The first simulated carbon emission sequence and the real carbon emission sequences from the training subset are input into the discriminator to obtain a... The model calculates the total loss between the first simulated carbon emission sequence and the real carbon emission sequence by calling a multi-scale fair perception loss function based on the classification probability. The total loss value is then fed back to the initial carbon emission prediction model via backpropagation to update the parameters of the generator and discriminator. When the number of iterations reaches a preset number, the test subset is input into the currently optimized model to generate a second simulated carbon emission sequence. The average error is calculated between the second simulated carbon emission sequence and the real sequence in the test subset. When the average error is less than a preset error threshold in consecutive preset rounds, the currently optimized model is determined as the preset carbon emission prediction model. The model is also used to apply a binary classification algorithm based on the classification probability. The cross-entropy algorithm is used to calculate the adversarial loss value; the multi-scale fairness-perceived loss function is called to calculate the error between the first simulated carbon emission sequence and the real carbon emission sequence step by step using the mean absolute percentage error formula, and then the average of all errors is taken to obtain the prediction error loss value; the first simulated carbon emission sequence and the real carbon emission sequence are grouped by day, and the first daily Gini coefficient and the second daily Gini coefficient are calculated for the two groups of sequences for each day. The absolute difference between the two groups of Gini coefficients for each day is taken, and then the average of all daily differences is calculated as the daily fairness loss value; the first simulated carbon emission sequence and the real carbon emission sequence are summarized by month to obtain the total simulated carbon emissions and the total real carbon emissions for each month;The first monthly Gini coefficient and the second monthly Gini coefficient are calculated for the simulated total carbon emissions and the actual total carbon emissions, respectively. The absolute difference between the two sets of Gini coefficients is taken for each month, and the average of all monthly differences is calculated as the monthly fairness loss value. The prediction error loss value, the daily fairness loss value, and the monthly fairness loss value are weighted and summed according to preset weights to obtain the total loss value of the multi-scale fairness perception loss function. The adversarial loss value is correlated with the total loss value to obtain the total loss value. The results module is used to summarize the carbon emission prediction values to obtain the provincial-level carbon emission prediction results.
6. A provincial carbon emission prediction device based on adaptive multi-scale decomposition, characterized in that, The device includes: a memory, a processor, and a provincial carbon emission prediction program based on adaptive multi-scale decomposition stored in the memory and running on the processor, the provincial carbon emission prediction program based on adaptive multi-scale decomposition being configured to implement the steps of the provincial carbon emission prediction method based on adaptive multi-scale decomposition as described in any one of claims 1-4.
7. A storage medium, characterized in that, The storage medium stores a provincial carbon emission prediction program based on adaptive multi-scale decomposition. When the provincial carbon emission prediction program based on adaptive multi-scale decomposition is executed by the processor, it implements the steps of the provincial carbon emission prediction method based on adaptive multi-scale decomposition as described in any one of claims 1-4.
Citation Information
Patent Citations
Carbon emission prediction method and device
CN116611576A
Navigation industry carbon emission prediction method based on fusion of multi-scale feature extraction and time sequence dependence analysis
CN120725212A