Method for forecasting concentration and air quality index of various atmospheric pollutants in city
By constructing a feature set containing time, pollutants and meteorological characteristics and using machine learning models for iterative forecasting, the problems of insufficient observation data, limited forecast range and insufficient time resolution in the existing technology are solved, and multi-city and multi-pollution are achieved High precision and high time resolution prediction of objects.
Patent Information
- Application Number
- CN202411586389.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2024-12-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing air pollution forecasting technology has problems such as insufficient observation data, limited forecast scope, limited types of pollutants, insufficient interaction of multiple pollutants and insufficient time resolution, resulting in limited forecast accuracy.
By downloading and extracting the measured ground concentration data of atmospheric pollutants in multiple cities, a feature set containing time, pollutants and meteorological characteristics is constructed, and a machine learning model is used to predict iteratively, and the model parameters are optimized to achieve multi-city, Forecasts of multiple pollutants and high time resolution.
Comprehensive forecast of atmospheric pollutants in multiple cities has been achieved, the types of pollutants have been expanded, the forecast accuracy and time resolution have been improved, and the forecast results can be provided every hour in the next week, significantly improving the accuracy of the forecast.
Smart Images

Figure CN119087550A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of air pollution forecasting, and more specifically to a method for forecasting concentrations of multiple air pollutants and air quality index in a city. Background Art
[0002] At present, air pollution forecasting technologies are mainly divided into two categories: one is the simulation method based on regional air quality models such as the WRF-Chem model. Although this type of method can provide a comprehensive description of chemical and physical processes when predicting air pollution, there is often a large deviation between its forecast results and actual observations. These deviations are mainly attributed to the inaccuracy of emission inventories, the uncertainty of meteorological input data, the imperfection of model physical and chemical processes, and the inherent limitations of numerical model technology. The other type is the data-driven method based on machine learning and deep learning. This type of method is relatively simple, has high computational efficiency, and can quickly generate forecast results. In recent years, it has played a significant role in the early warning of pollutants such as O3. Compared with traditional air quality model forecasts such as WRF-Chem, data-driven methods show obvious advantages in timeliness and forecast accuracy, providing more rapid and effective support for air pollution prevention and control. The shortcomings of existing air pollution forecasting technologies include: due to the uneven distribution of pollutants and meteorological observation sites, observation data in some areas are insufficient or missing. Therefore, existing studies sometimes cannot simultaneously forecast the pollution status of multiple cities in the study area, so the research scope is mostly limited to a single city; the types of pollutants forecasted are limited, mainly focusing on single or small amounts of pollutants such as O3 and PM 2.5 , while ignoring other important pollutants such as PM 10 , SO2, NO2 and CO; only the relationship between meteorology and a few pollutants is considered, and the interaction between multiple pollutants is not fully considered, resulting in limited forecast accuracy; the forecast time range and resolution are limited, mainly concentrated in the next 3 days, and the time resolution is not high, and it is impossible to provide high time resolution forecasts within a week; the forecast accuracy is limited, and the time resolution of meteorological field forecast data products is mostly 3 hours or 6 hours. Therefore, the time resolution of existing forecast research is mostly 3 hours or 6 hours, and the time resolution is limited. Summary of the invention
[0003] The purpose of the present invention is to disclose a method for predicting the concentration of multiple atmospheric pollutants and the air quality index in a city.
[0004] To achieve the above object, the present invention provides a method for predicting the concentration of multiple atmospheric pollutants and air quality index in a city, comprising the following steps:
[0005] Step 1: Download and extract the measured ground concentration data of atmospheric pollutants in multiple cities and the GFS meteorological field data covering the urban agglomeration in the study area, and extract the required characteristic quantities from them;
[0006] Step 2, constructing a complete feature set required for forecasting based on the feature quantities extracted in step 1, the feature set including time-based feature quantities, pollutant feature quantities and meteorological feature quantities extracted from GFS data;
[0007] Step 3: Input the feature set obtained in step 2 into the machine learning model for training, and use the grid search method to optimize the model parameters. After the training is completed, the mature model iteratively predicts the pollutant concentration;
[0008] Step 4, after predicting the pollutant concentration, calculate the air quality index, and obtain the change of the air quality index, and find out the main pollutants affecting the air quality through the corresponding relationship between the air quality index and the pollutants;
[0009] Step 5, draw a line graph of the pollutant concentration data and air quality index data obtained after the feature sets of multiple cities are predicted by the model in step 3, and verify the prediction results of the model by calculating the correlation coefficient between the prediction results and the measured data and evaluating the prediction results of the model through evaluation indicators.
[0010] As a further improvement of the present invention, in step 1, the required feature quantities specifically include:
[0011] The measured ground concentration data of pollutants need to extract the hourly pollutant concentration data of pollutants in the urban agglomeration in the study area; the GFS meteorological field data need to extract the meteorological data at the corresponding grid points of each study city.
[0012] As a further improvement of the present invention, linear interpolation is performed on the GFS meteorological field data so that both the GFS meteorological field data and the pollutant concentration data are hourly data.
[0013] As a further improvement of the present invention, in step 2, the time-related feature quantities include hours, days, weeks and months.
[0014] As a further improvement of the present invention, in step 2, the pollutant characteristic quantity is the time average concentration data of multiple atmospheric pollutants calculated based on the hourly concentration data of pollutants in the previous 6 hours, 12 hours, 18 hours and 24 hours at fixed times, and the fixed times are 1 hour, 2 hours, 3 hours, 4 hours, 5 hours and 6 hours before the forecast time.
[0015] As a further improvement of the present invention, in step 3, the model parameters are optimized using a grid search method. When the mean square error value MSE of the model on the training data set drops to a minimum and no longer drops, the model tends to be mature. MSE is a commonly used measurement variable for measuring the difference between the model prediction value and the actual observation value. Its calculation formula is as follows:
[0016] (1);
[0017] Where n is the number of data points, Y i is the actual observation value of the ith i is the ith predicted value.
[0018] As a further improvement of the present invention, the iterative forecasting process in step 3 is specifically as follows: the pollutant characteristic quantities and meteorological data characteristics preprocessed before the start of the forecast are taken as input, and the concentration data of atmospheric pollutants at 0 o'clock on the first day are obtained according to the forecast to obtain the time-averaged concentration data at that moment, the iteration step length is 1 hour, and the iteration duration is 7 days.
[0019] As a further improvement of the present invention, the machine learning model in step 3 is an XGBoost model.
[0020] As a further improvement of the present invention, the evaluation indexes in step 5 specifically include correlation coefficient r, root mean square error RMSE, mean relative deviation MRB and prediction accuracy FC, which are defined as follows:
[0021] (2);
[0022] (3);
[0023] (4);
[0024] (5);
[0025] In the formula, n represents the number of samples, p i represents the model predicted concentration, o i represents the actual observed concentration, d represents the number of samples whose predicted concentration and observed concentration are both above or below the secondary standard. When the RMSE and MRB values are smaller and the r and FC values are closer to 1, the prediction effect of the model is better.
[0026] Compared with the prior art, the present invention has the following beneficial effects:
[0027] 1. Realize comprehensive forecast of air pollution in multiple cities: By extracting meteorological field data from GFS data, which has high integrity in both time and space, the problem of missing historical meteorological data is overcome. Then, the present invention establishes forecast models for different cities respectively, thereby realizing pollutant forecast in multiple cities.
[0028] 2. Comprehensive pollutant forecast: This invention expands the types of pollutants forecasted, covering O3, PM 2.5 、PM 10, SO2, NO2 and CO and the air quality index AQI, and through iterative forecasting, the forecast data of the concentrations of the six pollutants in the previous time period are used in the forecast of the atmospheric pollutant concentrations at each time period. The forecast results of 6 models are used in one forecast, so the mutual relationship between various atmospheric pollutants is fully considered, thereby effectively improving the forecast accuracy.
[0029] 3. Forecasts with long time range and high time resolution: By linearly interpolating the GFS meteorological data into hourly data, and then using the hourly sample data to train the model, and performing iterative forecasts with a step size of 1 hour, forecasts with hourly time resolution can be achieved. Forecasts with hourly resolution within the next week can be provided, thus improving the time range and time resolution of the forecast.
[0030] 4. Improve forecast accuracy: This forecast model can take into account the complex interactions between the six pollutants and the relationship between pollutants and meteorological conditions, thereby significantly improving forecast accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a flow chart of the forecasting method of the present invention;
[0032] Figure 2 It is a schematic diagram of the iterative forecasting process of the present invention;
[0033] Figure 3 This is a schematic diagram of the hourly concentration forecast of six pollutants in a city for the next seven days and the comparison with the observed values according to the present invention. DETAILED DESCRIPTION
[0034] The present invention is described in detail below in conjunction with the various embodiments shown in the accompanying drawings, but it should be noted that these embodiments are not limitations of the present invention, and any equivalent transformations or substitutions in functions, methods, or structures made by ordinary technicians in the field based on these embodiments are all within the scope of protection of the present invention.
[0035] The process of this forecasting method is as follows Figure 1 As shown, it mainly includes the following links:
[0036] Step 1. Download and extract data
[0037] Download the measured ground concentration data of 6 kinds of atmospheric pollutants in cities across the country for 5 years from 2017 to 2021 and the GFS meteorological field data covering the study area for 5 years from 2017 to 2021, among which the GFS (Global Forecast System) data is a weather data set generated by the operation of the global numerical weather forecast system of the National Center for Environmental Prediction (NCEP) of the United States, and the data set usually has high integrity in time and space. First, the GFS data has temporal integrity. Currently, the GFS historical data from January 15, 2015 to the present can be downloaded, and the data maintains a consistent frequency and format in time. Secondly, the GFS data has spatial integrity, and its data can cover most of the earth's surface except for very few areas in the world (such as parts of the two poles), and the spatial distribution is relatively uniform (such as 0.25° or higher), which also ensures the consistency of data quality worldwide. The time range of the GFS meteorological field data downloaded by the present invention is the meteorological forecast field from 0 hours to 192 hours reported at 12 o'clock universal time every day, with a time resolution of 6 hours.
[0038] Extract the required data information (measured ground concentration data of pollutants, meteorological characteristics data) from the downloaded data for the construction of the model input data set. Among them, the measured ground concentration data of pollutants need to extract the six pollutants (PM 2.5 、PM 10 , SO2, NO2, O3 and CO), and the GFS data are used to extract the meteorological data at the nearest grid point to each study city. The extracted meteorological characteristic quantities required for forecasting include: 700 hPa zonal wind (u_700), meridional wind (v_700), vertical wind (w_700), absolute vorticity (absv_700), 850 hPa zonal wind (u_850), meridional wind (v_850), vertical wind (w_850), absolute vorticity (absv_850), air temperature (t_850), 2 m air temperature (t_2), 2 m dew point temperature (td_2), 2 m relative humidity (rh_2), 10 m zonal wind (u_10), 10 m meridional wind (v_10), sunshine time (sunsd), planetary boundary layer height (pblh), surface air pressure (sp), downward shortwave radiation flux from the surface (dsrf), and precipitation rate (rain). Since the pollutant concentration data is hourly data and the GFS meteorological data is 6-hourly data, it is also necessary to linearly interpolate the GFS meteorological data into hourly data.
[0039] Step 2: Construct the forecast input feature set
[0040] The time-based features, pollutant features and meteorological features extracted from GFS are synthesized to construct a complete input feature set required for forecasting. Among them, the time-based features include month, day, hour and week. The pollutant features are the time average concentration data of various atmospheric pollutants calculated based on the hourly concentration data of pollutants in the previous 6 hours, 12 hours, 18 hours and 24 hours at fixed times. The fixed times are 1 hour, 2 hours, 3 hours, 4 hours, 5 hours and 6 hours before the forecast time.
[0041] Step 3: Call the machine learning model for iterative prediction
[0042] The complete feature set is input into the machine learning XGBoost model for training, and the model parameters are optimized using the grid search method until the mean square error value MSE of the model on the training data set drops to the minimum and no longer decreases, then the model is considered to be mature. MSE is a commonly used measurement variable to measure the difference between the model prediction value and the actual observation value. Its calculation formula is as follows:
[0043] (1);
[0044] Where n is the number of data points, Y i is the actual observation value of the ith i is the ith predicted value.
[0045] Then, the well-trained model is used to iteratively predict the pollutant concentration. The iterative prediction process is as follows: Figure 2 The iteration step is 1h, the iteration duration is 7 days, and the pollutant characteristic quantities preprocessed before the start of the forecast (the time average concentration data of 6 kinds of atmospheric pollutants calculated based on the hourly concentration data of pollutants at 6 hours, 12 hours, 18 hours, and 24 hours before the forecast time 1 hour, 2 hours, 3 hours, 4 hours, 5 hours, and 6 hours before the forecast time) and the extracted GFS meteorological data are Figure 2 The gray rectangle in the Figure 2 The data in the light blue box d1 (a total of 2, the large box represents the pollutant characteristics, and the small box represents the meteorological data characteristics) in the forecast are used as input to predict the concentration data of the six atmospheric pollutants at 00:00 on the first day, and then calculate the time average concentration data of the six atmospheric pollutants at that time ( Figure 2 The second iteration uses the same process to Figure 2 The data in the dark blue box d2 in the model is used as the input forecast and calculation to obtain the pollutant concentration data and time average data at 01:00 on the first day ( Figure 2The hourly concentrations of the six air pollutants are predicted for the next 7 days, or 168 hours.
[0046] Therefore, the iterative forecast in the present invention uses the forecast data of the six atmospheric pollutant concentrations at the previous time in the forecast of atmospheric pollutant concentrations at each time. Therefore, a total of six model forecast results for different pollutants are used in one forecast, thereby fully considering the interaction between various atmospheric pollutants and effectively improving the forecast accuracy. In addition, the present invention also uses a large number of multi-hour average data of pollutant concentrations as input features during the forecast process, rather than relying solely on the pollutant concentrations at the previous time, thereby avoiding too fast error accumulation in the iterative process, so that a relatively accurate forecast can be made when the forecast time is long (>3 days).
[0047] like Figure 2 As shown in the figure, the schematic diagram of the iterative forecast process, the gray rectangles in the figure are the data preprocessed before the iterative forecast, the light blue, dark blue and green rectangles are the data predicted by the 1st, 2nd and 3rd iterations respectively, the data surrounded by the light blue, dark blue and green borders are the data used for the 1st, 2nd and 3rd iteration forecasts respectively, the horizontal axis 00h represents 00:00 on the forecast day, and -24h represents 00:00 on the previous day
[0048] Step 4: Calculate the hourly air quality index AQI
[0049] After forecasting the hourly concentrations of the six air pollutants for the next seven days, the sub-index (IAQI) corresponding to each pollutant concentration is calculated according to the Technical Provisions on Ambient Air Quality Index (AQI) (Trial) (HJ 633-2012) issued by the Ministry of Environmental Protection of China. Among all the calculated sub-indexes, the largest sub-index is determined, which is the final air quality index (AQI), and the hourly changes of the air quality index AQI for the next seven days are obtained. And according to the corresponding relationship between AQI and pollutants, the pollutant with the largest sub-index can be determined, so as to find out the main pollutants affecting air quality.
[0050] Step 5: Prediction results display and verification
[0051] The hourly concentration data of six pollutants and AQI index data for multiple cities in the next seven days predicted by the model are saved in csv format, and the forecast results are displayed graphically. Figure 3 The model prediction results of the hourly concentrations of six pollutants in a city for the next seven days starting from June 21, 2023 are shown. It can be seen that the model can predict the concentration changes of six atmospheric pollutants in each city in the next seven days with a time resolution of hourly.
[0052] The prediction results of the model are evaluated using statistical evaluation indicators, including correlation coefficient (r), root mean square error (RMSE), mean relative bias (MRB) and prediction accuracy (FC), which are defined as follows:
[0053] (2);
[0054] (3);
[0055] (4);
[0056] (5);
[0057] In the formula, n represents the number of samples, p i represents the model predicted concentration, o i Represents the actual observed concentration, d represents the number of samples where both the predicted concentration and the observed concentration exceed or do not exceed the secondary standard. Among these evaluation parameters, MRB and RMSE are mainly used to evaluate the error level of model prediction, and r and FC are used to evaluate the accuracy of model prediction. The smaller the RMSE and MRB values are, and the closer the r and FC values are to 1, the better the prediction effect of the model. By comparing the hourly data of pollutant concentration of this forecasting method with the measured data, it can be obtained that the forecasting effect of this forecasting method is better and more accurate, such as Figure 3 The correlation coefficient r between the O3 forecast results and the measured data of a certain city in China reached 0.94, and the RMSE was 26.53 μg∙m -3 , MRB is 16.02%.
[0058] The system has been automated. When running, you only need to enter the specified start date, and the system will automatically run and generate hourly forecast results for six types of air pollutants and the air quality index AQI for multiple cities in the study area for seven consecutive days from the start date, and store data and display images. The entire process is fully automated, and the program runs in no more than 1 hour, ensuring efficient and timely forecast services.
[0059] In the process of model training and iterative forecasting with the concentration of pollutants to be forecasted as the target, the present invention uses the average characteristic quantity of the concentration of the six pollutants in the previous time as the model input, so as to fully consider the influence of the concentration of the six pollutants on the pollutants to be forecasted in the next time. In addition, the present invention also uses a large number of multi-hour average data of pollutant concentrations as input features in the forecasting process, rather than relying solely on the pollutant concentration of the previous time, so as to avoid too fast error accumulation in the iterative process. If only the pollutant concentration of the previous time is used as input, then the wrong forecast of one time will have a significant impact on the forecast of the next time. This technology uses various multi-hour average data of the six pollutants in multiple times as input, which can significantly reduce the accumulation speed of iterative errors, so that a relatively accurate forecast can be made when the forecast time is long (>3 days).
[0060] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A method for predicting the concentration of multiple atmospheric pollutants and air quality index in a city, characterized in that: The following steps are involved: Step 1: Download and extract the measured ground concentration data of atmospheric pollutants in multiple cities and the GFS meteorological field data covering the urban agglomeration in the study area, and extract the required characteristic quantities from them; Step 2, constructing a complete feature set required for forecasting based on the feature quantities extracted in step 1, the feature set including time-based feature quantities, pollutant feature quantities and meteorological feature quantities extracted from GFS data; Step 3: Input the feature set obtained in step 2 into the machine learning model for training, and use the grid search method to optimize the model parameters. After the training is completed, the mature model iteratively predicts the pollutant concentration; Step 4, after predicting the pollutant concentration, calculate the air quality index, and obtain the change of the air quality index, and find out the main pollutants affecting the air quality through the corresponding relationship between the air quality index and the pollutants; Step 5, draw a line graph of the pollutant concentration data and air quality index data obtained after the feature sets of multiple cities are predicted by the model in step 3, and verify the prediction results of the model by calculating the correlation coefficient between the prediction results and the measured data and evaluating the prediction results of the model through evaluation indicators.
2. The method for predicting the concentration of multiple air pollutants and air quality index in a city according to claim 1, characterized in that: In step 1, the required feature quantities specifically include: The measured ground concentration data of pollutants need to extract the hourly pollutant concentration data of pollutants in the urban agglomeration in the study area; the GFS meteorological field data need to extract the meteorological data at the corresponding grid points of each study city.
3. The method for predicting the concentration of multiple air pollutants and air quality index in a city according to claim 2, characterized in that: Linear interpolation is performed on the GFS meteorological field data to make them and the pollutant concentration data hourly data.
4. The method for predicting the concentration of multiple air pollutants and air quality index in a city according to claim 1, characterized in that: In step 2, the time-related feature quantities include hours, days, weeks and months.
5. The method for predicting the concentration of multiple air pollutants and air quality index in a city according to claim 1, characterized in that: In step 2, the pollutant characteristic quantities are the time-averaged concentration data of various atmospheric pollutants calculated based on the hourly concentration data of pollutants in the 6 hours, 12 hours, 18 hours, and 24 hours before the fixed time, and the fixed time is 1 hour, 2 hours, 3 hours, 4 hours, 5 hours, and 6 hours before the forecast time.
6. The method for predicting the concentration of multiple air pollutants and air quality index in a city according to claim 1, characterized in that: In step 3, the model parameters are optimized using the grid search method. When the mean square error value MSE of the model on the training data set drops to the minimum and no longer drops, the model tends to be mature. MSE is a commonly used measurement variable to measure the difference between the model prediction value and the actual observation value. Its calculation formula is as follows: (1); Where n is the number of data points, Y i is the actual observation value of the ith i is the ith predicted value.
7. The method for predicting the concentration of multiple air pollutants and air quality index in a city according to claim 1, characterized in that: The iterative forecasting process in step 3 is specifically as follows: the pollutant characteristic quantities and meteorological data characteristics preprocessed before the start of the forecast are taken as input, and the concentration data of atmospheric pollutants at 0 o'clock on the first day are obtained according to the forecast to obtain the time-averaged concentration data at that moment. The iteration step is 1 hour and the iteration duration is 7 days.
8. The method for predicting the concentration of multiple air pollutants and air quality index in a city according to claim 1, characterized in that: The machine learning model in step 3 is an XGBoost model.
9. The method for predicting the concentration of multiple air pollutants and air quality index in a city according to claim 1, characterized in that: The evaluation indicators in step 5 specifically include correlation coefficient r, root mean square error RMSE, mean relative deviation MRB and prediction accuracy FC, which are defined as follows: (2); (3); (4); (5); In the formula, n represents the number of samples, p i represents the model predicted concentration, o i represents the actual observed concentration, d represents the number of samples whose predicted concentration and observed concentration are both above or below the secondary standard. When the RMSE and MRB values are smaller and the r and FC values are closer to 1, the prediction effect of the model is better.
Citation Information
Patent Citations
Air quality forecast service system based on meteorological service platform
CN105631537A
Decision tree index-based neural network air quality prediction method
CN110363347A
Atmospheric PM2.5 concentration prediction method based on comparison of multiple models
CN110852493A
Atmospheric particle concentration monitoring method and system based on geographic information system
CN113869389A
Urban pollutant concentration prediction method based on multi-site space-time correlation
CN113947238A
