A method and device for predicting the concentration of PM2.5 in the atmosphere, and a medium
Patent Information
- Application Number
- CN202410811196.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2026-10-27
AI Technical Summary
[0004]本发明实施例提供一种大气中PM2.5浓度的预测方法、装置、设备及介质,可以解决现有技术中,存在的现阶段的EMD和VMD等方法由于难以挖掘到PM2.5浓度时间序列中的特征信息,因而对于PM2.5浓度的预测精度较低的问题
[0030]本发明通过周期趋势分解算法分解出PM2.5浓度数据的时间序列的周期序列、趋势序列及残差序列,并将与PM2.5浓度变化相似的影响因子浓度数据的时间序列和周期序列、趋势序列及残差序列分别对门控循环神经网络模型进行训练,使得训练后的门控循环神经网络模型更偏向于PM2.5浓度数据的时间序列内周期性和趋势性的识别,以容易挖掘到PM2.5浓度数据的时间序列中周期性和趋势性的特征信息,从而确定空气中PM2.5的浓度,对PM2.5浓度进行精准的预测。
Smart Images

Figure CN122986293A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of air pollutant prediction technology, and in particular to a method, apparatus, equipment and medium for predicting PM2.5 concentration in the atmosphere. Background Technology
[0002] In recent years, the number of private cars has continued to grow, fossil energy consumption has increased daily, and air pollution has become increasingly serious, especially PM2.5 pollution, which has severely disrupted people's daily lives. Therefore, PM2.5 concentration prediction has become one of the key research topics. Currently, PM2.5 concentration prediction is mainly divided into three categories: machine learning methods, machine learning combination methods based on Empirical Mode Decomposition (EMD), and machine learning combination methods based on Variational Mode Decomposition (VMD). Because PM2.5 time series exhibits significant non-stationarity and non-linearity, a single machine learning prediction method cannot deeply mine the feature information of the series. Typically, the prediction accuracy of such methods is low, and their usability is limited. Although the latter two methods utilize EMD and VMD decomposition algorithms to extract features within the PM2.5 concentration time series, they each have their drawbacks. The EMD algorithm is prone to over-decomposition, increasing the random error of the prediction model; the VMD algorithm requires manual parameter tuning, often failing to obtain the optimal parameter combination, thus limiting the improvement in prediction performance.
[0003] Therefore, given the strong periodicity and trend inherent in PM2.5 concentration time series, current methods such as EMD and VMD have low prediction accuracy for PM2.5 concentration because they struggle to extract the characteristic information from the PM2.5 concentration time series. Summary of the Invention
[0004] This invention provides a method, apparatus, device, and medium for predicting PM2.5 concentration in the atmosphere, which can solve the problem that existing methods such as EMD and VMD have low prediction accuracy for PM2.5 concentration because they are difficult to extract feature information from the time series of PM2.5 concentration.
[0005] This invention provides a method for predicting PM2.5 concentration in the atmosphere, comprising the following steps:
[0006] Obtain time series data of PM2.5 concentration in the study area over a fixed period and identify influencing factors similar to changes in PM2.5 concentration;
[0007] The PM2.5 concentration data time series is decomposed using a periodic trend decomposition algorithm to obtain the periodic sequence, trend sequence, and residual sequence of the PM2.5 concentration data time series; the time series of the concentration data of the influencing factors within the same time period are obtained; and a gated recurrent neural network model is trained based on the nonlinear relationship between the periodic sequence, trend sequence, and residual sequence and the time series of the concentration data of the influencing factors to determine the weights and biases between neurons in the gated recurrent neural network model, and the model parameters are tuned to obtain the trained gated recurrent neural network model.
[0008] The periodic, trend, and residual time series of PM2.5 concentration data are input into a trained gated recurrent neural network model to obtain the periodic, trend, and residual predicted values of PM2.5. The periodic, trend, and residual predicted values of PM2.5 are then averaged over the time domain to obtain the predicted value of PM2.5 concentration in the atmosphere of the study area.
[0009] Preferably, the acquisition of the influencing factors similar to changes in PM2.5 concentration includes:
[0010] The daily average mass concentrations of PM2.5, PM10, SO2, NO2, CO, and O3 in the atmosphere were obtained for a fixed time period. At the same time, the daily average values of precipitation, relative humidity, northerly wind speed, and dew point temperature were also obtained for the same fixed time period.
[0011] The chi-square test algorithm was used to screen the chi-square values χ for PM2.5, PM10, SO2, NO2, CO, O3, precipitation, relative humidity, northerly wind speed, and dew point temperature. 2 Factors greater than the probability of rejection P are considered as influencing factors similar to changes in PM2.5 concentration.
[0012] Preferably, the decomposition of the time series of PM2.5 concentration data includes:
[0013] The high-pass filter within the periodic trend decomposition algorithm with weighted regression as the smoothing method is used to decompose the time series of PM2.5 concentration data to obtain the periodic series of the PM2.5 concentration data time series.
[0014] The PM2.5 concentration data time series is decomposed using a low-pass filter within a periodic trend decomposition algorithm with weighted regression as the smoothing method to obtain the trend series of the PM2.5 concentration data time series.
[0015] The PM2.5 concentration data time series was decomposed using a periodic trend decomposition algorithm with weighted regression as the smoothing method to obtain the residual series of the PM2.5 concentration data time series.
[0016] Preferably, the obtained trained gated recurrent neural network model includes:
[0017] The time series of influencing factor concentration data within the same time period is obtained. The periodic series, trend series, and residual series are input into the gated recurrent neural network model along with the time series of influencing factor concentration data within the same time period. The gated recurrent neural network model learns the nonlinear relationship between the time series of influencing factor concentration data and the periodic series, trend series, and residual series, and uses it to update the weights and bias terms between neurons in the gated recurrent neural network model.
[0018] Meanwhile, the gated recurrent neural network model uses the time series, periodic series, trend series and residual series of influencing factor concentration data to optimize the selection of hyperparameters of the gated recurrent neural network, and obtains the trained gated recurrent neural network model.
[0019] Preferably, the hyperparameters include:
[0020] Number of hidden layers, number of hidden units, and learning rate.
[0021] This invention also provides a device for predicting PM2.5 concentration in the atmosphere, comprising:
[0022] The meteorological module is used to obtain time series data of PM2.5 concentration in the atmosphere of the study area over a fixed period of time, as well as influencing factors similar to the changes in PM2.5 concentration.
[0023] The model training module uses a periodic trend decomposition algorithm to decompose the time series of PM2.5 concentration data, obtaining the periodic sequence, trend sequence, and residual sequence of the PM2.5 concentration data time series; it also obtains the time series of the concentration data of the influencing factors within the same time period; and it trains the gated recurrent neural network model based on the nonlinear relationship between the periodic sequence, trend sequence, and residual sequence and the time series of the concentration data of the influencing factors, respectively, to determine the weights and biases between neurons in the gated recurrent neural network model, and optimizes the model parameters to obtain the trained gated recurrent neural network model.
[0024] The prediction module inputs the periodic, trend, and residual sequences of PM2.5 concentration data into a trained gated recurrent neural network model to obtain the periodic, trend, and residual predicted values of PM2.5. The periodic, trend, and residual predicted values of PM2.5 are then averaged over the time domain to obtain the predicted value of PM2.5 concentration in the atmosphere of the study area.
[0025] This invention also provides an electronic device, including a memory and a processor;
[0026] The memory is used to store computer programs;
[0027] When the processor executes the computer program stored in the memory, it implements the steps of a method for predicting PM2.5 concentration in the atmosphere as described above.
[0028] This invention also provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the steps of a method for predicting PM2.5 concentration in the atmosphere as described above.
[0029] This invention provides a method, apparatus, device, and medium for predicting PM2.5 concentration in the atmosphere. Compared with the prior art, its advantages are as follows:
[0030] This invention uses a periodic trend decomposition algorithm to extract the periodic sequence, trend sequence, and residual sequence of PM2.5 concentration data from a time series. Then, it trains a gated recurrent neural network model with the time series, periodic sequence, trend sequence, and residual sequence of influencing factor concentration data that are similar to PM2.5 concentration changes. This makes the trained gated recurrent neural network model more adept at identifying the periodicity and trend within the PM2.5 concentration data time series, making it easier to extract periodic and trend features from the PM2.5 concentration data time series, thereby determining the PM2.5 concentration in the air and making accurate predictions of PM2.5 concentration.
[0031] Furthermore, this invention uses the chi-square test algorithm to screen influencing factors similar to changes in PM2.5 concentration, thereby reducing the influence of factors unrelated to changes in PM2.5 concentration.
[0032] Moreover, this invention uses the Bayesian optimization algorithm to optimize the hyperparameters of the gated recurrent neural network model, eliminating the need for manual parameter tuning, thus greatly improving the optimization speed compared to traditional grid search. Attached Figure Description
[0033] Figure 1 A schematic diagram of the predictor training process for a method, apparatus, device, and medium for predicting PM2.5 concentration in the atmosphere, provided in an embodiment of the present invention;
[0034] Figure 2 A schematic diagram of the prediction process of a method, apparatus, device and medium for predicting PM2.5 concentration in the atmosphere provided in an embodiment of the present invention;
[0035] Figure 3(a) is a schematic diagram of the Trend time series after decomposition of PM2.5 concentration data of a method, device, equipment and medium for predicting PM2.5 concentration in the atmosphere provided by an embodiment of the present invention.
[0036] Figure 3(b) is a schematic diagram of the seasonal time series of PM2.5 concentration data after decomposition, which is a method, device, equipment and medium for predicting PM2.5 concentration in the atmosphere provided by an embodiment of the present invention.
[0037] Figure 3(c) is a schematic diagram of the residual time series after decomposition of PM2.5 concentration data of a method, device, equipment and medium for predicting PM2.5 concentration in the atmosphere provided by an embodiment of the present invention.
[0038] Figure 4(a) is a line graph showing the predicted and actual values of the Trend component of a method, device, equipment and medium for predicting PM2.5 concentration in the atmosphere provided by an embodiment of the present invention.
[0039] Figure 4(b) is a line graph showing the predicted and actual values of the seasonal component of a method, apparatus, device and medium for predicting PM2.5 concentration in the atmosphere provided by an embodiment of the present invention.
[0040] Figure 4(c) is a line graph showing the predicted and actual values of the Residual component of a method, apparatus, device and medium for predicting PM2.5 concentration in the atmosphere provided by an embodiment of the present invention.
[0041] Figure 5 This is a line graph illustrating the PM2.5 concentration prediction results of a method, apparatus, device, and medium for predicting PM2.5 concentration in the atmosphere, provided as an embodiment of the present invention. Detailed Implementation
[0042] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0043] See Figures 1-5 This invention provides a method for predicting PM2.5 concentration in the atmosphere, comprising the following steps:
[0044] Step 1: Determining the input factors for the prediction model involves using the chi-square test algorithm to screen factors whose chi-square value is greater than the probability of rejection P. These factors are considered to be characteristic variables similar to changes in PM2.5 concentration and are used as input factors for the prediction model.
[0045] Step 2: PM2.5 concentration time series feature extraction. This involves decomposing the PM2.5 concentration time series using a periodic trend decomposition algorithm with weighted regression as the smoothing method. The STL internally includes high-pass and low-pass filter algorithms. The high-pass filter outputs the periodic component, and the low-pass filter outputs the trend component. Finally, the periodic and trend features within the PM2.5 concentration time series are extracted, and the decomposed subsequences are more stable than the original series.
[0046] Step 3: Predictive model training involves inputting the decomposed periodic sequence, trend sequence, and residual sequence, along with the input factor time series, into the gated recurrent neural network model. The model then begins to learn the nonlinear relationships between them and updates the weights and biases between neurons.
[0047] Step 4: Model parameter tuning involves optimizing the hyperparameters of the gated recurrent neural network, including the number of hidden layers, the number of hidden units, the learning rate, and other hyperparameters, to solve the problem of model determinism.
[0048] Step 5: Model prediction involves inputting a factor sequence with the same dimensions, length, and time intervals as the model training process to obtain predicted values for PM2.5 concentrations.
[0049] Specifically:
[0050] This study used daily air pollutant concentration data and meteorological data from January 1, 2017 to June 30, 2021 for experimental verification in a certain area. A total of 1642 sets of data were collected. The air pollutant concentration data came from the Chaohu station of the China National Environmental Monitoring Centre (https: / / www.cnemc.cn / sssj / ), including daily average concentrations of PM2.5, PM10, SO2, NO2, CO, and O3. The meteorological data came from the China Meteorological Administration website (http: / / data.cma.cn / data / online / t / 1), including daily average values of precipitation, relative humidity, northerly wind speed, and dew point temperature. The specific steps are as follows:
[0051] Step 1: Extract the input factors of the prediction model using the chi-square test. The results are shown in Table 1. It can be seen that the chi-square test results for precipitation, relative humidity, northerly wind speed, PM10, SO2, NO2, CO, and O3 are significantly different. 2 The value is much larger than the P value, indicating that the above eight factors are strongly correlated with changes in PM2.5 concentration, while the χ² value of dew point temperature... 2 The value is less than the P value, indicating that the correlation between dew point temperature and PM2.5 concentration change is not obvious. Therefore, precipitation, relative humidity, northerly wind speed, PM10, SO2, NO2, CO and O3 are selected as factors affecting PM2.5 concentration change.
[0052] Table 1. Results of the chi-square test
[0053]
[0054]
[0055] Step 2: Using the STL algorithm, decompose the time series data of PM2.5 concentration and its influencing factors. The Trend, Seasonal, and Residual time series plots of the decomposed PM2.5 concentration data are shown below. Figure 3(a) , 3(b) As shown in 3(c).
[0056] Step 3: Using the BO-GRU algorithm, the first 1569 sets of data in the Trend, Seasonal, and Residual components are trained respectively, and the PM2.5 concentration for the following 73 days is predicted. The prediction results for each component are as follows: Figure 4(a) , 4(b) As shown in Figure 4(c), the predicted values of each part are integrated to obtain the predicted value of PM2.5 concentration.
[0057] To evaluate the predictive performance of the predictor, two sets of comparative experiments were designed. The first set of experiments used a hybrid model based on STL and Long Short-Term Memory (LSTM) to predict PM2.5 concentration and compared the results with the single LSTM prediction model. The second set of experiments used a Bayes-GRU predictor to predict PM2.5 concentration and compared the results with the single GRU prediction model. The purpose of the first set of experiments was to study the impact of STL on the predictive performance of the proposed model, and the purpose of the second set of experiments was to study the impact of Bayesian optimization on the prediction performance. The PM2.5 concentration prediction method of this invention and the prediction results of the models in the two sets of comparative experiments are as follows: Figure 5 As shown.
[0058] Table 2 shows the evaluation index results of the PM2.5 concentration prediction method and the comparison method of the present invention. It can be seen that the STL-Bayes-GRU method has the lowest root mean square error, mean absolute error, and mean absolute percentage error. Compared with the first group of models, the STL-LSTM predictor has higher prediction accuracy. If the predictor is replaced from LSTM to Bayes-GRU, the root mean square error and mean absolute error are reduced by 90.28% and 88.81% respectively, and the prediction accuracy is greatly improved. Compared with the second group of models, it is again shown that the Bayes-GRU model has high prediction accuracy. After adding STL, the prediction accuracy of the Bayes-GRU model is further improved.
[0059] Table 2 Evaluation Indicators of Prediction Methods
[0060] LSTM 27.9445 20.5642 23.904% GRU 25.9303 20.3796 21.780% STL-LSTM 18.6632 13.8636 15.462% Bayes-GRU 3.2737 2.9697 3.835% STL-Bayes-GRU 1.8139 1.5516 1.977%
[0061] The advantages of this invention are: higher prediction accuracy; the chi-square test reduces the influence of data dimensionality and irrelevant factors, eliminating concerns about model overfitting; the Bayesian optimization algorithm achieves hyperparameter optimization of the model without manual parameter tuning, and the optimization speed is faster than traditional grid search.
[0062] This invention is a PM2.5 concentration prediction method based on a combination of Seasonal and Trend Decomposition using LOESS (STL) and deep learning. Specifically, it utilizes the STL decomposition algorithm to decompose the PM2.5 concentration time series into periodic, trend, and residual components, extracting the periodic and trend features within the PM2.5 concentration sequence. To prevent overfitting, the method filters the model input variables, using a chi-square test to extract factors strongly correlated with PM2.5 concentration as model input features. Then, the decomposed subsequences and the feature sequences are input into a Gate Recurrent Unit (GRU), and a Bayesian optimization algorithm is introduced to fine-tune the GRU model.
[0063] Furthermore, compared to EMD and VMD, STL yields fewer components, which avoids over-decomposition, reduces computational complexity, and improves model fitting speed. Moreover, the Bayesian optimization algorithm requires fewer iterations and is faster than the traditional grid search algorithm.
[0064] This invention also provides a device for predicting PM2.5 concentration in the atmosphere, comprising:
[0065] The meteorological module is used to obtain time series of PM2.5 concentration data in the study area over a fixed period of time, as well as influencing factors similar to changes in PM2.5 concentration.
[0066] The model training module uses a periodic trend decomposition algorithm to decompose the time series of PM2.5 concentration data, obtaining the periodic sequence, trend sequence, and residual sequence of the PM2.5 concentration data time series; it also obtains the time series of the concentration data of the influencing factors within the same time period; and it trains the gated recurrent neural network model based on the nonlinear relationship between the periodic sequence, trend sequence, and residual sequence and the time series of the concentration data of the influencing factors, respectively, to determine the weights and biases between neurons in the gated recurrent neural network model, and optimizes the model parameters to obtain the trained gated recurrent neural network model.
[0067] The prediction module inputs the periodic, trend, and residual sequences of PM2.5 concentration data into a trained gated recurrent neural network model to obtain the periodic, trend, and residual predicted values of PM2.5. The periodic, trend, and residual predicted values of PM2.5 are then averaged over the time domain to obtain the predicted value of PM2.5 concentration in the atmosphere of the study area.
[0068] This invention also provides an electronic device, including a memory and a processor.
[0069] Memory is used to store computer programs.
[0070] When the processor executes a computer program stored in memory, it implements the steps of the above-described method for predicting PM2.5 concentration in the atmosphere.
[0071] This invention also provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the steps of the above-described method for predicting PM2.5 concentration in the atmosphere.
[0072] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A method for predicting PM2.5 concentration in the atmosphere, characterized in that, Includes the following steps: Obtain time series data of PM2.5 concentration in the study area over a fixed period and identify influencing factors similar to changes in PM2.5 concentration; The PM2.5 concentration data time series is decomposed using a periodic trend decomposition algorithm to obtain the periodic sequence, trend sequence, and residual sequence of the PM2.5 concentration data time series; the time series of the concentration data of the influencing factors within the same time period are obtained; and a gated recurrent neural network model is trained based on the nonlinear relationship between the periodic sequence, trend sequence, and residual sequence and the time series of the concentration data of the influencing factors to determine the weights and biases between neurons in the gated recurrent neural network model, and the model parameters are tuned to obtain the trained gated recurrent neural network model. The periodic, trend, and residual time series of PM2.5 concentration data are input into a trained gated recurrent neural network model to obtain the periodic, trend, and residual predicted values of PM2.
5. The periodic, trend, and residual predicted values of PM2.5 are then averaged over the time domain to obtain the predicted value of PM2.5 concentration in the atmosphere of the study area.
2. The method for predicting PM2.5 concentration in the atmosphere according to claim 1, characterized in that, The acquisition of influencing factors similar to changes in PM2.5 concentration includes: The daily average mass concentrations of PM2.5, PM10, SO2, NO2, CO, and O3 in the atmosphere were obtained for a fixed time period. At the same time, the daily average values of precipitation, relative humidity, northerly wind speed, and dew point temperature were also obtained for the same fixed time period. The chi-square test algorithm was used to screen the chi-square values χ for PM2.5, PM10, SO2, NO2, CO, O3, precipitation, relative humidity, northerly wind speed, and dew point temperature. 2 Factors greater than the probability of rejection P are considered as influencing factors similar to changes in PM2.5 concentration.
3. The method for predicting PM2.5 concentration in the atmosphere according to claim 1, characterized in that, The decomposition of the time series of PM2.5 concentration data includes: The high-pass filter within the periodic trend decomposition algorithm with weighted regression as the smoothing method is used to decompose the time series of PM2.5 concentration data to obtain the periodic series of the PM2.5 concentration data time series. The PM2.5 concentration data time series is decomposed using a low-pass filter within a periodic trend decomposition algorithm with weighted regression as the smoothing method to obtain the trend series of the PM2.5 concentration data time series. The PM2.5 concentration data time series was decomposed using a periodic trend decomposition algorithm with weighted regression as the smoothing method to obtain the residual series of the PM2.5 concentration data time series.
4. The method for predicting PM2.5 concentration in the atmosphere according to claim 1, characterized in that, The obtained trained gated recurrent neural network model includes: The time series of influencing factor concentration data within the same time period is obtained. The periodic series, trend series, and residual series are input into the gated recurrent neural network model along with the time series of influencing factor concentration data within the same time period. The gated recurrent neural network model learns the nonlinear relationship between the time series of influencing factor concentration data and the periodic series, trend series, and residual series, and uses it to update the weights and bias terms between neurons in the gated recurrent neural network model. Meanwhile, the gated recurrent neural network model uses the time series, periodic series, trend series and residual series of influencing factor concentration data to optimize the selection of hyperparameters of the gated recurrent neural network, and obtains the trained gated recurrent neural network model.
5. The method for predicting PM2.5 concentration in the atmosphere according to claim 4, characterized in that, The hyperparameters include: Number of hidden layers, number of hidden units, and learning rate.
6. A device for predicting PM2.5 concentration in the atmosphere, characterized in that, include: The meteorological module is used to obtain time series data of PM2.5 concentration in the atmosphere of the study area over a fixed period of time, as well as influencing factors similar to the changes in PM2.5 concentration. The model training module uses a periodic trend decomposition algorithm to decompose the time series of PM2.5 concentration data, obtaining the periodic sequence, trend sequence, and residual sequence of the PM2.5 concentration data time series; it also obtains the time series of the concentration data of the influencing factors within the same time period; and it trains the gated recurrent neural network model based on the nonlinear relationship between the periodic sequence, trend sequence, and residual sequence and the time series of the concentration data of the influencing factors, respectively, to determine the weights and biases between neurons in the gated recurrent neural network model, and optimizes the model parameters to obtain the trained gated recurrent neural network model. The prediction module inputs the periodic, trend, and residual sequences of PM2.5 concentration data into a trained gated recurrent neural network model to obtain the periodic, trend, and residual predicted values of PM2.
5. The periodic, trend, and residual predicted values of PM2.5 are then averaged over the time domain to obtain the predicted value of PM2.5 concentration in the atmosphere of the study area.
7. An electronic device, characterized in that, include: Memory and processor; The memory is used to store computer programs; When the processor executes the computer program stored in the memory, it implements the steps of the method for predicting PM2.5 concentration in the atmosphere as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the steps of a method for predicting PM2.5 concentration in the atmosphere as described in any one of claims 1 to 5.