An Ozone Forecasting Method Based on Multi-Model Fusion
By employing a multi-model fusion approach, combining meteorological data and feature engineering, and utilizing SVM, KNN, RF, and LSTM algorithms for ozone concentration prediction, and correcting through multiple linear relationships, the problem of inaccurate ozone forecasting in existing technologies has been solved, achieving efficient and accurate ozone concentration prediction.
Patent Information
- Application Number
- CN202211719039.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-12-30
AI Technical Summary
Existing ozone forecasting methods rely on a large amount of input data. However, obtaining actual data is difficult and computationally expensive. The prediction results of a single model are highly uncertain, making it difficult to accurately predict ozone concentrations.
A multi-model fusion approach was adopted, including data preprocessing, feature engineering, model training, evaluation and correction. SVM, KNN, RF and LSTM algorithms were used to predict ozone concentration in combination with meteorological data, and the model results were corrected by multiple linear relationships.
It improves the accuracy of ozone concentration prediction, reduces reliance on precursor pollutant emission data, lowers computational costs, and enhances prediction reliability.
Smart Images

Figure CN116047629B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ambient air quality forecasting technology, and in particular to an ozone forecasting method based on multi-model fusion. Background Technology
[0002] Ozone can be divided into stratospheric ozone and tropospheric ozone. Stratospheric ozone exists naturally in the upper atmosphere, forming a protective layer 6-30 miles above the Earth's surface, protecting us from harmful ultraviolet radiation from the sun. Tropospheric ozone, also known as ground-level ozone, is produced by the photochemical reaction of nitrogen oxides and volatile organic compounds (VOCs) in the atmosphere under solar radiation. Emissions from industrial and power facilities, vehicle exhaust, gasoline vapors, and chemical solvents are the main sources of nitrogen oxides and VOCs. In addition, VOCs released from biological sources (living organisms or biological processes) also contribute to ground-level ozone.
[0003] In recent years, the concentration of ozone in the troposphere has been increasing year by year. As a strong oxidant, ozone poses a significant threat to human health and the environment. However, ozone pollution is complex. In addition to its high-altitude and long-distance transport, its chemical formation mechanism is also very complex. Its conversion relationship with precursors (NOx and VOCs) is non-linear, making it difficult to formulate effective pollution control measures in advance.
[0004] Currently, real-time ozone concentration pollution calculation models mainly include deterministic models (chemical transport models) and statistical models (machine learning, etc.). Deterministic models typically utilize three-dimensional network Eulerian chemical models (also called regional photochemical smog models). These models employ mass-conserving atmospheric diffusion equations and use a finite-difference three-dimensional grid as their framework, simulating both gaseous and particulate pollutants. The meteorological data required for these models primarily comes from meteorological models (such as MM5 and WRF). Statistical models mainly utilize extensive historical pollution monitoring data and concurrent meteorological observations to analyze the statistical relationships between ozone pollution concentrations and meteorological and related factors, establishing multi-parameter models ranging from simple to complex. Common ozone forecasting methods include multiple linear regression models, support vector machines, decision trees, random forests, and artificial neural networks.
[0005] Current ozone forecasting relies heavily on a large amount of input data, including meteorological data and precursor pollutant emission inventories. However, obtaining actual data is difficult, the computational cost is high, and the calculation results are highly uncertain. Furthermore, it is difficult to obtain accurate prediction data using a single model.
[0006] Therefore, a method is needed to predict ozone concentrations relatively accurately. Summary of the Invention
[0007] The purpose of this invention is to provide an ozone forecasting method based on multi-model fusion in order to solve the problems mentioned above.
[0008] The technical solution adopted in this invention is as follows: An ozone forecasting method based on multi-model fusion, mainly including the following steps:
[0009] S1, Data Preprocessing: Collect local meteorological data and ozone concentration data, and perform necessary preprocessing operations on the data;
[0010] S2, Feature Engineering, conducts correlation analysis between local ozone concentration and meteorological data and time dimension, and determines the feature items to participate in algorithm modeling based on the ranking of the correlation coefficients between each meteorological factor and ozone concentration.
[0011] S3, Model Training: Based on the selected feature items, four algorithms—SVM, KNN, RF, and LSTM—are used to train the model on the historical data.
[0012] S4: Model evaluation. The trained model is used to predict the validation set data, and the model evaluation algorithm is used to evaluate the prediction results of the four models.
[0013] S5: Model prediction. Select the top three models based on the model evaluation results, and use each of the three models to make predictions on the data to be predicted.
[0014] S6: Model correction. The top three models in the model evaluation are used to establish a multiple linear relationship between the model prediction results and the measured ozone concentration in the validation set. The coefficients are solved and the prediction results for the data to be predicted are corrected.
[0015] Furthermore, the feature variables selected during the model training process in step S3 include temperature, humidity, wet-bulb temperature, wind speed, pressure change, hour, and month, with ozone concentration as the target variable.
[0016] Furthermore, step S1, data preprocessing, specifically includes data integration, missing value imputation, and outlier handling.
[0017] Furthermore, step S2, feature engineering, mainly includes the correlation between temperature, humidity, wet-bulb temperature, wind speed, pressure changes and ozone concentration, as well as the seasonal and diurnal variation trends of ozone concentration, and the standardization of continuous features (temperature, humidity, wet-bulb temperature, wind speed, pressure changes) and the encoding of discrete features (hours, months).
[0018] Furthermore, the calculation method for the model evaluation index k in step S4 is as follows:
[0019]
[0020] Where y real Represents the actual observed value, y predLet represent the predicted value, and n represent the number of data points in the validation set used for evaluation. The closer the calculated value of k is to 1, the better the model's predictive performance.
[0021] Furthermore, the model correction process in step S6 is as follows:
[0022] y corrected = a*y1+b*y2+c*y3+d
[0023] Where a, b, c, and d are obtained by establishing a multivariate linear relationship between the model prediction results and the measured ozone concentration in the validation set, and y1, y2, and y3 are the prediction results of the top three models for the current moment.
[0024] Furthermore, missing value imputation specifically refers to replacing missing values with data from the same column of the previous row. When there are more than 3 consecutive missing values, they are replaced with the average value of the features at the same time in the past week. Outlier handling specifically refers to clustering the feature vectors, selecting cluster centers, giving a distance range, and calculating the number of contained points within the distance range starting from the cluster center. When the number of points is less than a certain threshold, the current point is determined to be an outlier and is removed from the model training.
[0025] Furthermore, the correlation between any two features can be calculated using the following expression:
[0026]
[0027] Where (x1, x2, ..., x) n ),(y1, y2, ..., y n ) represents two n-dimensional vectors to be calculated.
[0028] Furthermore, the standardized feature data conforms to a standard normal distribution, i.e., the mean is 0 and the standard deviation is 1, making it easier for the model to reach convergence. The standardization transformation process is as follows:
[0029]
[0030] Where x is the variable to be transformed, x * Let n be the transformed variable, and n be the vector dimension.
[0031] Furthermore, since treating discrete features like month and hour directly as continuous variables in model training would directly affect model performance, and directly encoding these two features with one-hot encoding would lead to too many feature variables and an overly sparse matrix, increasing model training time, the current discrete feature values can be replaced by the average of the target variable with the same feature values. This reduces the dependence of feature values on the target variable and increases the diversity of feature values, creating more diverse encoded values and stabilizing the impact of outliers.
[0032] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0033] It is easy to operate and data is easy to acquire. It does not require the collection of a large amount of precursor pollutant emission data. Most ozone pollution situations can be predicted using only meteorological data, greatly improving the accuracy of prediction and making up for the shortcomings of large deviations in prediction results based on a single model. Attached Figure Description
[0034] Figure 1 This is an overall flowchart of an ozone forecasting method based on multi-model fusion.
[0035] Figure 2 This is a scatter plot of meteorological data (temperature) and ozone concentration in Wuxi City in Example 1;
[0036] Figure 3 This is a scatter plot of meteorological data (humidity) and ozone concentration in Wuxi City in Example 1.
[0037] Figure 4 This is a scatter plot of meteorological data (wet-bulb temperature) and ozone concentration in Wuxi City from Example 1.
[0038] Figure 5 This is a scatter plot of meteorological data (air pressure changes) and ozone concentration in Wuxi City from Example 1.
[0039] Figure 6 This is a trend distribution chart of ozone concentration in Wuxi City over a time dimension (months) in Example 1;
[0040] Figure 7 This is a trend distribution chart of ozone concentration in Wuxi City over time (hours) in Example 1;
[0041] Figure 8 This is a comparison chart of the ozone concentration prediction results and the measured ozone concentrations of the three algorithm models in Example 1.
[0042] Figure 9 This is a comparison chart of the predicted ozone concentration and the measured ozone concentration after model calibration in Example 1. Detailed Implementation
[0043] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0044] Example 1:
[0045] This embodiment uses data from Wuxi City between January 1, 2020 and December 31, 2021 as historical data for model training and evaluation, and uses data from January 2022 to June 2022 as the data to be predicted to demonstrate the ozone concentration prediction results of this invention.
[0046] An ozone forecasting method based on multi-model fusion, the overall flowchart of which is as follows: Figure 1 As shown, the main steps include:
[0047] S1: Data preprocessing, collecting local meteorological data and ozone concentration data, and performing necessary preprocessing operations on the data;
[0048] S11: Data integration. Meteorological data (temperature, humidity, wet-bulb temperature, wind speed, air pressure changes), time (month, hour), and ozone concentration data are integrated into a single master table in chronological order. A data example is shown in Table 1.
[0049]
[0050] Table 1
[0051] S12: Missing value imputation. Missing values are replaced by data from the same column of the previous row. When there are more than 3 consecutive missing values, they are replaced by the average value of the features at the same time in the past week. The changes before and after missing value imputation are shown in Table 2:
[0052]
[0053] Table 2
[0054] S13: Outlier handling. Cluster the feature vectors, select cluster centers, and given a distance range, calculate the number of contained points within the distance range starting from the cluster centers. When the number of points is less than a certain threshold, the current point is determined to be an outlier and is removed from the model training.
[0055] Before removing outliers, the data dimension was (6891, 8), and after removing outliers, the data dimension was (6577, 8).
[0056] S2: Feature engineering, conduct correlation analysis between local ozone concentration and meteorological data and time dimension, and determine the feature items to participate in algorithm modeling based on the ranking of the correlation coefficients between various meteorological factors and ozone concentration.
[0057] S21: Correlation Analysis:
[0058] The correlation analysis scatter plot between meteorological factors and ozone concentration is shown below. Figure 2-5 As shown, where Figure 2 This is a scatter plot of ozone concentration versus temperature. Figure 3 This is a scatter plot of ozone concentration versus wet-bulb temperature. Figure 4 This is a scatter plot of ozone concentration versus humidity. Figure 5 This is a scatter plot of ozone concentration versus atmospheric pressure. The correlation between meteorological factors and ozone concentration can be calculated using the following expression:
[0059]
[0060] Where (x1, x2, ..., x) n ),(y1, y2, ..., y n ) represents two n-dimensional vectors to be calculated.
[0061] The correlation coefficients c between various meteorological factors and ozone concentration are shown in Table 3. Temperature, wet-bulb temperature, and wind speed are positively correlated with ozone concentration, while humidity and air pressure changes are positively correlated with ozone concentration.
[0062] Feature c temperature 0.51 wet-bulb temperature 0.31 humidity -0.56 air pressure change -0.35 wind speed 0.18
[0063] Table 3
[0064] The trend distribution of ozone concentration over time is as follows: Figure 6-7 As shown, where Figure 6 This is a statistical chart showing the trend of ozone concentration over the months. Figure 7 This is a statistical graph showing the trend of ozone concentration over hours. From... Figure 6 As can be seen, due to better sunshine and stronger solar radiation in spring and summer, ozone concentrations are higher in spring and summer than in autumn and winter, with the average ozone concentration reaching its highest in June. Figure 7 As can be seen, the ozone concentration gradually decreases from 0 to 6 hours at night, gradually increases from 7 to 16 hours after sunrise, and then gradually decreases again after sunset, which is completely consistent with the theoretical diurnal variation characteristics of ozone.
[0065] S22: Continuous feature standardization. Standardized feature data conforms to a standard normal distribution, i.e., the mean is 0 and the standard deviation is 1, making it easier for the model to converge. The standardization transformation process is as follows:
[0066]
[0067] Where x is the variable to be transformed, x * Here are the transformed variables, and n is the vector dimension. The standardized continuous features are shown in Table 4, taking temperature and humidity as examples:
[0068]
[0069] Table 4
[0070] S23: Discrete Feature Encoding. Since discrete features like month and hour are directly treated as continuous variables in model training, it directly impacts model performance. However, one-hot encoding of these two features leads to too many feature variables and an overly sparse matrix, increasing training time. Therefore, the current discrete feature values can be replaced by the average of other target variables with the same feature values. This reduces the dependence of feature values on the target variable and increases feature value diversity, creating more diverse encoded values and stabilizing the impact of outliers. The discrete feature encoding is shown in Table 5, using month and hour as examples:
[0071]
[0072] Table 5
[0073] S3: Model Training. Based on the correlation ranking between meteorological factors and ozone concentration calculated in step S21, features with c > 0.3 are selected for model training. The final selected features are temperature, humidity, wet-bulb temperature, and air pressure change. Four algorithms—SVM, KNN, RF, and LSTM—are used to train the model on the historical data training set. The training data includes data from 2020 and 2021, with a data frequency of 3 hours. The final features used in model training are temperature, humidity, wet-bulb temperature, air pressure change, month, and hour. Parameter tuning is used to minimize model error. The features used in model training are shown in Table 6.
[0074]
[0075] Table 6
[0076] S4: Model Evaluation. The trained model is used to predict data on the validation set. A model evaluation algorithm is employed to evaluate the prediction results of the four models. The evaluation metric k is calculated as follows:
[0077]
[0078] Where y real Represents the actual observed value, y pred denoted by , represents the predicted value, and 'n' represents the number of data points in the validation set used for evaluation. The closer the calculated value of 'k' is to 1, the better the model's prediction performance. Table 7 shows the evaluation results of the four algorithms—SVM, KNN, RF, and LSTM—on the validation set in this embodiment.
[0079] Model k SVM 0.79 KNN 0.83 RF 0.84 LSTM 0.69
[0080] Table 7
[0081] S5: Model Prediction. The data to be predicted is selected from January to June 2022. The top three models in the model evaluation results are selected. According to Table 7, the selected models are SVM, KNN, and RF. The three models are used to make predictions on the data to be predicted. Some prediction results are shown in Table 8 below:
[0082]
[0083] Table 8
[0084] S6: Model Refinement. Using the top three models from the model evaluation, a multiple linear relationship is established between the model predictions on the validation set and the measured ozone concentrations on the validation set. The coefficients are solved, and the predictions for the target data are then refined. Model refinement is performed using the following expression:
[0085] y correctsd = a*y1+b*y2+c*y3+d
[0086] Where a, b, c, and d are obtained by establishing a multivariate linear relationship between the model prediction results and the measured ozone concentration in the validation set, and y1, y2, and y3 are the prediction results of the top three models for the current moment.
[0087] By establishing a multiple linear regression relationship between the prediction results of the SVM, KNN, and RF algorithms on the validation set and the actual observation results, the resulting coefficients are as follows:
[0088] a = 0.941
[0089] b = 0.015
[0090] c = 0.026
[0091] d = 3.536
[0092] The calibration model was used to correct the prediction results for the data to be predicted. The correlation coefficients between the model prediction results and the actual observed values before and after calibration are shown in Table 9. For the specific calculation formula, please refer to S21.
[0093]
[0094] Table 9
[0095] As can be seen from the correlation table, the prediction results of the three models are highly correlated with the actual observations. After correction, the correlation between the results and the actual observations is improved, and the prediction accuracy is further improved.
[0096] Model correction can also be achieved by establishing a multiple linear regression model of the data to be predicted over the past week and then rolling the correction to obtain more reliable prediction results.
[0097] The above prediction results demonstrate that the ozone prediction and correction model provided by this invention can effectively predict most ozone pollution situations using only historical meteorological data, without requiring the collection of large amounts of precursor pollutant emission data. This overcomes the shortcomings of large biases in predictions based on a single model, and the accuracy of the corrected model is greatly improved. As the historical database accumulates and the diversity of ozone variations increases, the prediction results of subsequent models will also be enhanced.
[0098] It should be noted that this invention only uses data from Wuxi City from 2020 to 2022 as an example for illustration. This invention is also applicable to forecasting ozone conditions in other regions and at different times. Any improvements and modifications based on the ideas and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for ozone prediction based on multi-model fusion, characterized in that, Mainly includes the following steps: S1, data preprocessing, collect the local meteorological data and ozone concentration data, and carry out necessary preprocessing operation on the data, preprocessing includes data integration, missing value filling, outlier processing; S2, feature engineering, correlation analysis of local ozone concentration and meteorological data and time dimension, according to the correlation coefficient ranking of each meteorological factor and ozone concentration, determine the feature items participating in algorithm modeling; S3, model training, according to the selected feature items, four kinds of algorithm models of SVM, KNN, RF and LSTM are used to train the historical data; S4: model evaluation, the trained model is used to predict the validation set data, and the model evaluation algorithm is used to evaluate the prediction results of the four models; S5: model prediction, select the top three models in the model evaluation results, and use three kinds of models to predict the data to be predicted; S6: model correction, the top three models in the model evaluation results are used to establish a multiple linear relationship between the model prediction results of the validation set and the measured ozone concentration of the validation set, and the coefficients are solved to correct the prediction results of the data to be predicted. The model correction process of step S6 is as follows: ; Wherein, a, b, c, d are obtained by establishing a multiple linear relationship between the model prediction results of the validation set and the measured ozone concentration of the validation set, y1, y2, y3 are the prediction results of the top three models for the current time. 2.The ozone forecasting method based on multi-model fusion according to claim 1, characterized in that, The feature variables selected in step S3 model training include temperature, humidity, wet bulb temperature, wind speed, pressure change, hour, month, and target variable is ozone concentration. 3.The ozone forecasting method based on multi-model fusion according to claim 1, characterized in that, Step S1 data preprocessing specifically includes data integration, missing value filling, and outlier processing. 4.The ozone forecasting method based on multi-model fusion according to claim 1, characterized in that, Step S2 feature engineering mainly includes the correlation of temperature, humidity, wet bulb temperature, wind speed, pressure change and ozone concentration, the seasonal variation trend of ozone concentration and the daily variation trend of ozone, and the standardization of continuous features (temperature, humidity, wet bulb temperature, wind speed, pressure change) and the encoding of discrete features (hour, month). 5.The ozone forecasting method based on multi-model fusion according to claim 1, characterized in that, The calculation method of model evaluation index k in step S4 is: ; where y real represents the true observation value, y pred represents the predicted value, and n represents the number of data in the validation set participating in the evaluation; the closer the calculation result of k is to 1, the better the prediction effect of the model. 6.The ozone forecasting method based on multi-model fusion according to claim 3, characterized in that, The missing value filling specifically refers to replacing the missing value with the previous row and column data, and when the continuous missing value exceeds 3, the average value of the same time features in the past week is used to replace it; The outlier processing specifically refers to clustering the feature vectors, selecting the cluster center, and giving a distance range, taking the cluster center as the starting point, and calculating the number of points contained in the distance range in turn, when the number of points is less than a certain threshold, the current point is determined as an outlier and is removed, not participating in the training of the model.
7. The ozone forecasting method based on multi-model fusion according to claim 4, characterized in that, The correlation between any two features is calculated by the following expression: ; Where (x1, x2, ..., x) n ),(y1, y2, ..., y n ) represents two n-dimensional vectors to be calculated. 8.The ozone forecasting method based on multi-model fusion according to claim 4, characterized in that, The standardized feature data conforms to the standard normal distribution, that is, the mean is 0 and the standard deviation is 1, so that the model is easier to reach the convergence state, and the standardization conversion process is as follows: ; Where x is the variable to be converted, x* is the converted variable, and n is the vector dimension.
Citation Information
Patent Citations
Atmospheric O3 concentration prediction method based on comparison and optimization of multiple models
CN111489015A