A carbon intensity real-time monitoring and prediction method and system
By combining the STFCI hybrid model and ETL data channel with ECharts visualization technology, the real-time and accuracy issues of carbon intensity monitoring have been resolved, enabling multi-dimensional display and forward-looking guidance to meet the needs of power dispatching and users.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 西安中投国能电力科技有限责任公司
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-09
AI Technical Summary
Existing carbon intensity monitoring technologies suffer from poor real-time performance, low prediction accuracy, and a lack of multi-dimensional display and forward-looking guidance, failing to meet the needs of power dispatch and users.
The system employs a hybrid model combining STFCI, LSTM, and XGBoost. It acquires electricity, meteorological, and energy data through an ETL data channel, uses ECharts visualization technology for multi-dimensional display, and provides carbon intensity forecasts and low-carbon period recommendations for the next 24 hours.
It enables real-time monitoring and high-precision short-term forecasting of carbon intensity, displays data intuitively from multiple dimensions, provides recommendations for low-carbon periods and electricity consumption suggestions, and enhances the guidance for power dispatching and user behavior adjustment.
Smart Images

Figure CN122175079A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of carbon emission monitoring technology, specifically to a method and system for real-time monitoring and prediction of carbon intensity based on the STFCI hybrid model. Background Technology
[0002] Carbon intensity (carbon emissions per unit of electricity, gCO2 / kWh) is a crucial indicator for measuring the cleanliness of a power system. Current carbon intensity monitoring technologies rely heavily on manual statistical reports for data acquisition, with daily or weekly updates, resulting in poor real-time performance and an inability to reflect the dynamic changes in power system carbon intensity. Carbon intensity prediction methods often employ single models; for example, a single LSTM model can only extract long-term dependency features from time-series carbon intensity data, with an average absolute error of 18.7 gCO2 / kWh, while a single XGBoost model can only handle multi-dimensional features, with an average absolute error of 16.2 gCO2 / kWh. Neither can simultaneously capture the combined impact of time-series dependency and multi-dimensional features on carbon intensity, leading to limited prediction accuracy. Furthermore, existing carbon intensity monitoring platforms only provide basic data display functions, lacking short-term prediction capabilities for future carbon intensity, thus failing to provide forward-looking guidance for power dispatching departments in formulating dispatching strategies and for users in adjusting their electricity consumption behavior. Therefore, there is an urgent need for a technical solution that can achieve real-time carbon intensity monitoring, high-precision short-term prediction, and intuitive multi-dimensional display of carbon intensity data to address the aforementioned shortcomings of existing technologies. Summary of the Invention
[0003] This invention provides a method and system for real-time monitoring and prediction of carbon intensity, in order to solve the problems of poor real-time performance, low prediction accuracy, limited display format, and lack of forward-looking guidance in the prior art.
[0004] The technical solution of the present invention is as follows:
[0005] A method for real-time monitoring and prediction of carbon intensity includes the following steps:
[0006] S1. Obtain and process power-related data of each province through ETL data channels. The power-related data includes at least installed capacity, real-time load, real-time net outflow / inflow of the provincial power system, and energy structure data. The energy structure data includes the output ratio, installed capacity ratio, and real-time output data of each type of energy. Each type of energy includes at least hydropower, thermal power, wind power, photovoltaic power, and nuclear power.
[0007] S2. Draw a map of China based on ECharts and divide the map area into five preset color level ranges according to the carbon intensity values of each province.
[0008] S3. In response to the user's click on a province on the map, load the detailed data of that province and display it through a carbon intensity index card and a circular progress chart;
[0009] S4. Based on the installed capacity data of the province, a one-sided bar chart is used to display the installed capacity composition of different energy types;
[0010] S5. Based on the province's historical carbon intensity data and real-time power data, a pre-trained STFCI hybrid model is used to predict the carbon intensity hourly for the next 24 hours. The STFCI hybrid model includes parallel LSTM units, XGBoost units, and a fusion unit. The LSTM unit is a 2-layer, 128-neuron structure used to extract long-term dependency features of carbon intensity time series data. The XGBoost unit is a structure with 100 trees and a learning rate of 0.1, used to process 15-dimensional multi-dimensional features including temperature, wind speed, light intensity, energy type, and industrial activity patterns. The fusion unit first concatenates the 128-dimensional time series feature vector output by the LSTM unit and the 64-dimensional multi-dimensional feature vector output by the XGBoost unit into a 192-dimensional vector, and then maps it to a 1-dimensional carbon intensity prediction value through a fully connected layer. The weights of the fully connected layer are determined through model training.
[0011] S6. Display the prediction results in the form of a bar chart, and mark the low-carbon threshold line in the chart. Highlight the time period below the threshold. The low-carbon threshold can be customized according to the cleanliness benchmark value of the power system in each province or adopt the industry-standard low-carbon power carbon intensity benchmark value. The specific threshold can be adjusted through the system backend configuration.
[0012] Furthermore, the ETL data channel in S1 includes data extraction, data cleaning, data transformation, and data loading processes. The data extraction step retrieves raw data hourly from the power dispatch center, meteorological bureau, and energy statistics department via API interfaces. The data cleaning step includes filling missing values using linear interpolation (hourly interpolation granularity), removing outliers exceeding 3 times the standard deviation (the calculation sample range is data from the same time period in the past 7 days), and replacing outliers with the mean of data from previous and subsequent times. The data transformation step includes unifying units and aggregating data by province and time dimension. The data loading step stores the processed data in a time-series database and a relational database.
[0013] Furthermore, the preset color level ranges in S2 include: 0~300gCO2 / kWh corresponding to green, 301~500gCO2 / kWh corresponding to light green, 501~700gCO2 / kWh corresponding to yellow, 701~900gCO2 / kWh corresponding to orange, and 901~1200gCO2 / kWh corresponding to red.
[0014] Furthermore, the carbon intensity index card in S3 displays the current carbon intensity value and uses a gradient background color corresponding to the value; the annular progress chart displays the proportion of low-carbon energy and the proportion of renewable energy, and the proportion values are marked in percentage form.
[0015] Furthermore, in S4, the length of the bars in the single-sided bar chart is proportional to their capacity, and the bars are arranged in descending order of capacity. Each bar is marked with a corresponding capacity value, and the capacity value is accurate to one decimal place.
[0016] Furthermore, the training process of the STFCI hybrid model in S5 includes: collecting historical carbon intensity time-series data and corresponding multidimensional feature data, dividing the training set, validation set, and test set in a 7:2:1 ratio to construct a training sample set; inputting the time-series data into the LSTM unit for training, and inputting the multidimensional feature data into the XGBoost unit for training; training the LSTM unit using the backpropagation algorithm (activation function Tanh, optimizer Adam, batch size 64, training epochs 200), and training the XGBoost unit using the gradient boosting algorithm (maximum depth 6, minimum sample weight sum of 100%). 1. The subsampling rate is 0.8, and the mean squared error is used as the loss function. The weights of the fully connected layers in the fusion unit are optimized through the backpropagation algorithm to minimize the mean squared error between the predicted value and the actual value output by the model. The 15-dimensional multi-dimensional features specifically include: current temperature, wind speed, light intensity, hydropower output ratio, thermal power output ratio, wind power output ratio, photovoltaic power output ratio, nuclear power output ratio, industrial activity index (fitted based on the added value of industrial enterprises above designated size), whether it is a working day (0 / 1), whether it is a holiday (0 / 1), carbon intensity of the previous 1 hour, carbon intensity of the previous 2 hours, carbon intensity of the previous 3 hours, and carbon intensity of the previous 24 hours.
[0017] Furthermore, the prediction results shown in S6 also include hourly low-carbon period recommendations and electricity consumption suggestions. The low-carbon period recommendations are generated based on consecutive periods where the predicted value is lower than the low-carbon threshold, and the electricity consumption suggestions are matched with the electricity usage strategies corresponding to the low-carbon periods. In addition, all bars in the bar chart are marked with precise carbon intensity values.
[0018] Furthermore, it also includes the step of providing services through WeChat official accounts: receiving text messages or menu click events sent by users via WeChat, and based on the official WeChat API, analyzing user intent through keyword matching, XML message format parsing, and semantic recognition algorithms. If the query is for real-time data, the current carbon intensity and its trend are returned in the form of a graphic message; if the query is for prediction, the prediction results of the STFCI model and recommendations for low-carbon periods are returned in the form of a graphic message. The keyword library at least includes the names of each province, core query terms such as "real-time carbon intensity", "prediction", and "low-carbon periods". XML message parsing is performed based on the message tag rules specified by WeChat. The graphic message is generated using a fixed template and includes at least the carbon intensity value / prediction result, trend chart / bar chart, recommendations for low-carbon periods, and electricity consumption suggestions.
[0019] A real-time carbon intensity monitoring and prediction system for implementing the above method includes:
[0020] The data interface module has a built-in ETL data channel, which is used to acquire and process power-related data from various provinces, and to perform the above S1 steps and all operations of the ETL data channel.
[0021] The database module adopts a combined architecture of the time-series database InfluxDB and the relational database MySQL. InfluxDB is used to store real-time power data, and MySQL is used to store historical power statistics. It is used to store processed real-time power data and historical statistics.
[0022] The visualization module includes a map display submodule based on ECharts, a carbon intensity index card submodule, a circular progress chart submodule, and an installed capacity bar chart submodule. It has the functions of marking low-carbon threshold lines, highlighting low-carbon periods, generating and displaying electricity consumption suggestions, and accurately annotating all data values. It executes the above steps S2 to S4 and S6 and all visualization-related operations.
[0023] The prediction module has a built-in pre-trained STFCI hybrid model, which is used to predict the carbon intensity for the next 24 hours hour by hour based on real-time data and historical data, and performs the above S5 steps and all training and prediction operations of the STFCI hybrid model.
[0024] The WeChat service module is used to connect with WeChat Official Accounts, process user messages and menu events based on the official WeChat API, and execute all the steps of the aforementioned WeChat Official Account services.
[0025] The modules are interconnected by data interaction. The data interface module transmits the processed data to the database module for storage. The visualization and prediction modules retrieve data from the database module to perform corresponding operations. The WeChat service module retrieves data from the database module and the prediction module to provide feedback to the user.
[0026] The beneficial effects of this invention are:
[0027] 1. By combining the advantages of LSTM and XGBoost through the STFCI hybrid model, the model captures the combined effects of the time dependence of carbon intensity and multidimensional external features. The average absolute error of the model is only 12.3 gCO2 / kWh, which improves the prediction accuracy by 34.2% compared with the single LSTM model and by 24.1% compared with the single XGBoost model, significantly improving the accuracy of short-term carbon intensity prediction.
[0028] 2. An automated ETL data channel was built to realize the automatic collection, cleaning and integration of multi-source data of electricity, meteorology and energy statistics at the hourly level. The data update cycle is on the hourly level, which is 168 times more efficient than the traditional weekly level (168 hours) and 24 times more efficient than the traditional daily level (24 hours). This ensures data quality and real-time performance. In addition, a local cache data backup plan is set up in case of data source interruption, which improves the stability of data acquisition.
[0029] 3. Through various visualization methods such as five-level color-coded maps, carbon intensity index cards, circular progress charts, and one-sided bar charts, carbon intensity and power structure information are presented in a multi-dimensional and intuitive manner. All values are accurately labeled to meet the viewing needs of different users.
[0030] 4. Provides hourly carbon intensity forecasts for the next 24 hours, along with targeted low-carbon time period recommendations and electricity consumption suggestions. Low-carbon thresholds support province-specific custom configurations, providing precise decision support for power dispatching departments to formulate low-carbon dispatching strategies and for users to adjust their energy-saving electricity consumption behaviors.
[0031] 5. Integrating WeChat Official Account services, enabling mobile text and image queries of carbon intensity data and forecast results based on the official WeChat API, clarifying intent parsing techniques and message generation rules, broadening user reach channels, and improving service convenience and stability. Attached Figure Description
[0032] Figure 1 This is a schematic diagram of the overall architecture of the system of the present invention, showing the composition of the five major modules of the system (data interface module, database module, visualization module, prediction module, and WeChat service module) and the data interaction and connection relationship between the modules;
[0033] Figure 2 This is the overall flowchart of the method of the present invention, which shows the entire process from ETL data processing to the display of prediction results, and clarifies the core operational requirements of each step;
[0034] Figure 3This is a schematic diagram of the STFCI hybrid prediction model in this invention, showing the three-layer structure of the model: LSTM unit, XGBoost unit, and fusion unit. It also shows the 15-dimensional multi-dimensional feature input, the output feature dimension of each unit, and the splicing + fully connected layer processing logic of the fusion unit.
[0035] Figure 4 This is a schematic diagram of the map view interface in this invention, showing a map of Chinese provinces based on ECharts, a five-level color grading effect, and corresponding carbon intensity interval legends;
[0036] Figure 5 This is a schematic diagram of the province details page in this invention, showing the layout and numerical labeling of the carbon intensity index card, the circular progress chart, and the single-sided bar chart of installed capacity, with the capacity values accurate to one decimal place;
[0037] Figure 6 This is a schematic diagram of the interface of the STFCI prediction result bar chart in this invention, showing the hourly carbon intensity prediction bar chart for the next 24 hours, the low carbon threshold line marker, the low carbon period highlighted, and the precise numerical label above the bars. Detailed Implementation
[0038] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0039] Example 1: System Overall Architecture
[0040] Reference Figure 1The system of this invention includes a data interface module (with a built-in ETL data channel), a database module, a visualization module, a prediction module, and a WeChat service module, all interconnected for data interaction. The data interface module obtains real-time power data (including carbon intensity, real-time load, net power outflow / inflow, and energy structure, with the energy structure consisting of the output share, installed capacity share, and real-time output data of each energy type) and meteorological data (temperature, wind speed, and sunshine) from data sources such as power dispatch centers and meteorological bureaus via API interfaces. This data is then processed through an ETL process (extraction, cleaning, transformation, and loading) and stored in the database module. The database module uses a combined architecture of the time-series database InfluxDB and the relational database MySQL, with InfluxDB storing real-time power data and MySQL storing historical power statistics. The prediction module has a built-in pre-trained STFCI hybrid model that can predict the carbon intensity of each province hourly for the next 24 hours, either periodically or on demand. The visualization module uses ECharts to build a web visualization interface, enabling multi-format display of carbon intensity data. The WeChat service module connects with WeChat official accounts based on the official WeChat API, processes user messages and menu events, and enables mobile carbon intensity data query and prediction result acquisition. The data interface module transmits the processed data to the database module for storage. The visualization and prediction modules retrieve data from the database module to perform corresponding operations. The WeChat service module retrieves data from the database module and prediction module to provide feedback results to the user.
[0041] Example 2: Carbon Intensity Monitoring Procedure
[0042] Reference Figure 2 When a user opens the web visualization page of this invention, the system automatically loads a China map drawn using ECharts and colors it according to the latest carbon intensity values of each province, categorized into five color levels. When the user clicks on a province on the map (e.g., Sichuan Province), the system loads detailed carbon intensity data for that province from the database module and updates the carbon intensity indicator card (displaying the current carbon intensity value of 173gCO2 / kWh) and the circular progress charts for low-carbon and renewable energy (displaying 85% and 85% respectively) on the right side of the page. Simultaneously, the system retrieves the installed capacity data for that province and generates a one-sided bar chart (e.g., ...). Figure 5 As shown in the figure, the installed capacity of energy types such as hydropower, coal, and solar energy is displayed. The bars are arranged in descending order of capacity and are marked with specific values accurate to one decimal place (such as 45.0GW, 18.5GW, etc.).
[0043] Example 3: STFCI Hybrid Prediction Model
[0044] Reference Figure 3The STFCI model consists of an LSTM unit, an XGBoost unit, and a fusion unit. The LSTM unit is a 2-layer, 128-neuron structure (Tanh activation function, Adam optimizer, batch size 64, training epochs 200), taking carbon intensity time-series data from the past 168 hours (7 days) as input and outputting a 128-dimensional time-series feature vector. The XGBoost unit is a 100-tree structure with a learning rate of 0.1 (maximum depth 6, minimum sample weight sum 1, subsampling rate 0.8), taking 15-dimensional multi-features as input, specifically including: current temperature, wind speed, illumination, hydropower output ratio, thermal power output ratio, and wind speed. The model outputs a 64-dimensional multi-dimensional feature vector, which includes the proportion of electricity output, photovoltaic output, nuclear power output, industrial activity index (fitted based on the added value of industrial enterprises above designated size), whether it is a working day (0 / 1), whether it is a holiday (0 / 1), carbon intensity of the previous 1 hour, carbon intensity of the previous 2 hours, carbon intensity of the previous 3 hours, and carbon intensity of the previous 24 hours. The fusion unit first concatenates the 128-dimensional time-series feature vector output by the LSTM unit and the 64-dimensional multi-dimensional feature vector output by the XGBoost unit into a 192-dimensional vector, and then maps it to a 1-dimensional carbon intensity prediction value through a fully connected layer. During model training, historical carbon intensity data is used to construct a training sample set, which is divided into training, validation, and test sets in a 7:2:1 ratio. The mean squared error is used as the loss function, and the weights of the fully connected layer in the fusion unit are optimized through the backpropagation algorithm. In actual prediction, the latest historical carbon intensity data and real-time electricity data of the province are input into the model, and the model outputs the hourly carbon intensity prediction value of the province for the next 24 hours.
[0045] To verify the superiority of the STFCI model, this embodiment compares the prediction accuracy of a single LSTM model, a single XGBoost model, and the STFCI model. Carbon intensity data from a certain province from January to June 2025 were used for model training, with July data serving as the test set. The test results show that the STFCI model has a mean absolute error (MAE) of 12.3 gCO2 / kWh, which is superior to the 18.7 gCO2 / kWh of the single LSTM model and the 16.2 gCO2 / kWh of the single XGBoost model, fully demonstrating the predictive effectiveness and accuracy advantages of the hybrid model of this invention.
[0046] Example 4: Visual Interface Implementation
[0047] Reference Figure 4 , Figure 5 , Figure 6 The visualization interface of this invention adopts a responsive design to adapt to the viewing needs of different terminals. Figure 4 It is a map view of China, including the complete provincial regions of China. It is dynamically colored according to the carbon intensity value of each province, and a clear legend is set on the side of the page to show the carbon intensity range and evaluation level corresponding to the five color levels.Figure 5 The page layout for the province details page consists of a carbon intensity index card at the top and two circular progress charts (with percentage values marked as a percentage, such as 85%), a single-sided bar chart of installed capacity in the middle (with capacity values accurate to one decimal place, such as 45.0GW), and a real-time trend chart of carbon intensity at the bottom. The data for each module is updated in real time. Figure 6 The STFCI prediction results are presented in a bar chart, showing the hourly carbon intensity prediction values for the next 24 hours. The horizontal axis represents the 24-hour time node, and the vertical axis represents the carbon intensity value (gCO2 / kWh). The chart clearly marks the low-carbon threshold line (the low-carbon threshold can be customized according to the cleanliness benchmark value of the power system in each province or adopt the industry-standard low-carbon power carbon intensity benchmark value; the specific threshold can be adjusted through the system backend configuration). White bars represent low-carbon periods (below the threshold), and black bars represent high-carbon periods. All bars are marked with precise carbon intensity values above them.
[0048] Example 5: Integration with WeChat Official Accounts
[0049] After following the WeChat official account corresponding to this invention, users can access carbon intensity-related services by sending text messages or clicking the menu bar. The WeChat service module, based on the official WeChat API, analyzes user intent through keyword matching, XML message format parsing, and semantic recognition algorithms. The keyword database includes at least the names of provinces, core query terms such as "real-time carbon intensity," "prediction," and "low-carbon periods." XML message parsing is performed according to WeChat's officially defined message tag rules. For example, if a user sends "Sichuan Province," the WeChat service module receives the message, verifies its authenticity based on the official WeChat API, parses the XML message, and identifies the user's intent. It then retrieves real-time carbon intensity data for Sichuan Province from the database module and returns the current carbon intensity value and its trend in a fixed-template graphic message. If a user sends "prediction" or clicks the "Carbon Intensity Prediction" option in the menu bar, the WeChat service module calls the STFCI model prediction results from the prediction module and returns a summary of the target province's carbon intensity prediction for the next 24 hours and a recommendation for low-carbon periods in a fixed-template graphic message. The graphic message includes at least the carbon intensity value / prediction result, a trend chart / bar chart, a recommendation for low-carbon periods, and electricity consumption suggestions.
[0050] Example 6: Detailed Implementation of ETL Data Channel
[0051] The ETL data channel automatically retrieves raw data from multiple data sources every hour on the hour. The data sources and corresponding data retrieval are as follows: Power Dispatch Center API: retrieves real-time load, net power outflow / inflow, and energy structure for each province; Meteorological Bureau API: retrieves temperature, wind speed, and solar radiation for major cities in each province; Energy Statistics Department: retrieves installed capacity data for each province (updated daily); a local cache data backup plan is set up to improve data retrieval stability in case of data source interruption.
[0052] In the data cleaning step, missing values are filled using linear interpolation (hourly interpolation granularity), and outliers exceeding 3 times the standard deviation (the calculation sample range is data from the same time period in the past 7 days) are replaced with the mean of the data before and after the standard deviation. In the data transformation step, all power units are unified to GW, carbon intensity units are unified to gCO2 / kWh, and data is aggregated by province and time dimension. In the data loading step, the processed data is written to the InfluxDB real-time table and the MySQL historical table in the database module, respectively, to achieve classified storage of data.
[0053] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for real-time monitoring and prediction of carbon intensity, comprising the following steps to achieve real-time monitoring and short-term high-precision prediction of carbon intensity, characterized in that, Includes the following steps: S1. Obtain and process power-related data of each province through ETL data channels. The power-related data includes at least installed capacity, real-time load, real-time net outflow / inflow of the provincial power system, and energy structure data. The energy structure data includes the output ratio, installed capacity ratio, and real-time output data of each type of energy. Each type of energy includes at least hydropower, thermal power, wind power, photovoltaic power, and nuclear power. S2. Draw a map of China based on ECharts and divide the map area into five preset color level ranges according to the carbon intensity values of each province. S3. In response to the user's click on a province on the map, load the detailed data of that province and display it through a carbon intensity index card and a circular progress chart; S4. Based on the installed capacity data of the province, a one-sided bar chart is used to display the installed capacity composition of different energy types; S5. Based on the province's historical carbon intensity data and real-time electricity data, a pre-trained STFCI hybrid model is used to predict the carbon intensity hourly for the next 24 hours. The STFCI hybrid model includes parallel LSTM units, XGBoost units, and a fusion unit. The LSTM unit is a 2-layer, 128-neuron structure used to extract long-term dependency features of carbon intensity time series data. The XGBoost unit is a structure with 100 trees and a learning rate of 0.1, used to process 15-dimensional multi-dimensional features including temperature, wind speed, light intensity, energy type, and industrial activity patterns. The fusion unit first concatenates the 128-dimensional time series feature vector output by the LSTM unit and the 64-dimensional multi-dimensional feature vector output by the XGBoost unit into a 192-dimensional vector, and then maps it to a 1-dimensional carbon intensity prediction value through a fully connected layer. The weights of the fully connected layer are determined through model training. S6. Display the prediction results in the form of a bar chart, and mark the low-carbon threshold line in the chart. Highlight the time period below the threshold. The low-carbon threshold can be customized according to the cleanliness benchmark value of the power system in each province or adopt the industry-standard low-carbon power carbon intensity benchmark value. The specific threshold can be adjusted through the system backend configuration.
2. The method according to claim 1, characterized in that, The 15-dimensional multidimensional features specifically include: current temperature, wind speed, light intensity, hydropower output ratio, thermal power output ratio, wind power output ratio, photovoltaic power output ratio, nuclear power output ratio, industrial activity index, whether it is a working day, whether it is a holiday, carbon intensity of the previous 1 hour, carbon intensity of the previous 2 hours, carbon intensity of the previous 3 hours, and carbon intensity of the previous 24 hours.
3. The method according to claim 1, characterized in that, The training process of the STFCI hybrid model includes: a. Collect historical carbon intensity time-series data and corresponding 15-dimensional multi-dimensional feature data, divide them into training set, validation set and test set in a 7:2:1 ratio, and construct training sample set; b. Input the time series data into the LSTM unit for training. The LSTM unit is trained by the backpropagation algorithm, with Tanh as the activation function, Adam as the optimizer, a batch size of 64, and 200 training rounds. A 128-dimensional time series feature vector is extracted. c. Input the multidimensional feature data into the XGBoost unit for training. The XGBoost unit is trained by the gradient boosting algorithm with a maximum depth of 6, a minimum sample weight sum of 1, and a subsampling rate of 0.8, and extracts a 64-dimensional multidimensional feature vector. d. Concatenate the 128-dimensional temporal feature vector with the 64-dimensional multi-dimensional feature vector to obtain a 192-dimensional fused feature vector; e. Input the fused feature vector into the fully connected layer, map it to a 1D carbon intensity prediction value, and optimize the weights of the fully connected layer using the mean square error as the loss function and the backpropagation algorithm.
4. The method according to claim 1, characterized in that, The ETL data channel in S1 includes data extraction, data cleaning, data transformation, and data loading processes; The data extraction step retrieves raw data hourly from power dispatch centers, meteorological bureaus, and energy statistics departments via API interfaces or web crawlers; the data cleaning step includes filling missing values using linear interpolation, removing outliers exceeding three times the standard deviation, and replacing outliers with the mean of data from previous and subsequent time periods; the data transformation step includes unifying units and aggregating data by province and time dimension; and the data loading step stores the processed data in a time-series database and a relational database.
5. The method according to claim 1, characterized in that, The preset color level ranges in S2 include: 0~300gCO2 / kWh corresponds to green, 301~500gCO2 / kWh corresponds to light green, 501~700gCO2 / kWh corresponds to yellow, 701~900gCO2 / kWh corresponds to orange, and 901~1200gCO2 / kWh corresponds to red.
6. The method according to claim 1, characterized in that, The carbon intensity index card in S3 displays the current carbon intensity value and uses a gradient background color corresponding to the value; the annular progress chart displays the proportion of low-carbon energy and the proportion of renewable energy, and the proportion values are marked in percentage form.
7. The method according to claim 1, characterized in that, In S4, the length of a bar in a single-sided bar chart is proportional to its capacity, and the bars are arranged in descending order of capacity. Each bar is labeled with its corresponding capacity value, which is accurate to one decimal place.
8. The method according to claim 1, characterized in that, The prediction results displayed in S6 also include hourly low-carbon time period recommendations and electricity consumption suggestions. The low-carbon time period recommendations are generated based on consecutive time periods where the predicted value is lower than the low-carbon threshold. The electricity consumption suggestions match the electricity usage strategies corresponding to the low-carbon time periods, and all bars in the bar chart are labeled with precise carbon intensity values. It also includes the step of providing services through WeChat official accounts: receiving text messages or menu click events sent by users through WeChat, and based on the official WeChat API, analyzing user intent through keyword matching, XML message format parsing, and semantic recognition algorithms. If it is a query for real-time data, the current carbon intensity and its trend are returned in the form of a graphic message; if it is a prediction request, the STFCI model prediction results and low-carbon time period recommendations are returned in the form of a graphic message.
9. A real-time carbon intensity monitoring and prediction system, used to implement the method according to any one of claims 1 to 8, characterized in that, include: The data interface module has a built-in ETL data channel for acquiring and processing power-related data from various provinces, and for performing step S1 in claim 1 and all operations of the ETL data channel in claim 4. The database module adopts a combined architecture of the time-series database InfluxDB and the relational database MySQL. InfluxDB is used to store real-time power data, and MySQL is used to store historical power statistics. The visualization module includes a map display submodule based on ECharts, a carbon intensity index card submodule, a circular progress chart submodule, and an installed capacity bar chart submodule. It has the functions of marking low-carbon threshold lines, highlighting low-carbon periods, generating and displaying electricity consumption suggestions, and accurately annotating all data values. It performs steps S2 to S4 and S6 in claim 1 and all visualization-related operations in claims 5 to 7. The prediction module has a built-in pre-trained STFCI hybrid model, which is used to predict the carbon intensity for the next 24 hours hour by hour based on real-time data and historical data, and executes step S5 in claim 1 and all training and prediction operations of the STFCI hybrid model in claim 3. The WeChat service module is used to connect with WeChat Official Accounts, process user messages and menu events based on the official WeChat API, and execute all the steps of the WeChat Official Account service in claim 8. The modules are interconnected by data interaction. The data interface module transmits the processed data to the database module for storage. The visualization and prediction modules retrieve data from the database module to perform corresponding operations. The WeChat service module retrieves data from the database module and the prediction module to provide feedback to the user.