PM2.5 and O3 collaborative prediction method based on STL-VMD-Transform mixed deep learning
By employing a hybrid deep learning approach of STL-VMD-Transformer, the problem of insufficient intrinsic modal analysis of PM2.5 and O3 in existing air quality prediction models is addressed, achieving high-precision prediction of PM2.5 and O3 concentrations and improving the stability and adaptability of forecasts.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHENGDU UNIV OF INFORMATION TECH
- Filing Date
- 2026-01-27
- Publication Date
- 2026-05-08
AI Technical Summary
Existing air quality prediction models are unable to resolve the intrinsic modes of PM2.5 and O3, and ignore their photochemical correlations, resulting in insufficient prediction capabilities and poor forecast stability. Furthermore, existing models are unable to meet the operational forecasting requirements for high timeliness.
We employ a hybrid deep learning approach using STL-VMD-Transformer. Key variables are screened through Spearman correlation analysis, and time series data are decomposed into trend, seasonal, and residual terms using STL and VMD decomposition techniques. Transformer models are then trained to capture the synergistic variation patterns of multiple pollutants, thus constructing an efficient prediction framework.
It achieves high-precision, multi-timescale prediction of PM2.5 and O3 concentrations, improves the interpretability and forecast stability of the model, and can dynamically adapt to pollution changes under different meteorological conditions.
Smart Images

Figure CN121995007A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of air quality prediction, specifically to a PM prediction method based on STL-VMD-Transformer hybrid deep learning. 2.5 A method for predicting O3 in conjunction with other methods. Background Technology
[0002] With the rapid development of urbanization and industrialization, fine particulate matter (PM2.5) has become increasingly important. 2.5 The complex air pollution problem characterized by PM2.5 and ozone (O3) is becoming increasingly prominent. 2.5 Pollution is mostly characterized by a "stable winter" pattern. Under unfavorable diffusion conditions such as temperature inversion, high humidity, and calm winds in the basin, particulate matter from primary emissions and secondary transformations easily accumulates, forming haze pollution. O3 pollution, on the other hand, is of the "photochemical summer" type. It is not directly emitted, but rather consists of precursors (volatile organic compounds VOCs and nitrogen oxides NO). x These two pollutants are products of complex photochemical reactions under high temperatures and strong solar radiation. They not only pose a serious threat to human health and ecosystems, but their formation mechanisms are also intricate, exhibiting significant synergistic and antagonistic effects under specific meteorological conditions. Specifically, O3 formation promotes PM2.5 formation. 2.5 The formation of secondary components exacerbates PM2.5 formation. 2.5 Pollution; high concentrations of PM 2.5 This, in turn, inhibits O3 formation, keeping O3 concentrations at low levels. These two effects, under different meteorological conditions, cause Chengdu's pollution to exhibit typical "summer O3 pattern" and "winter PM2.5 pattern." 2.5 The pollution is characterized by alternating "types" of pollution. Therefore, implementing PM2.5 is crucial. 2.5 Synergistic control of O3 is imperative, and accurate prediction of its concentration changes is a prerequisite for scientific prevention and control, and is also a research hotspot in the current interdisciplinary field of environmental science and information science.
[0003] Numerical models based on atmospheric chemical transport (such as WRF-CMAQ and NAQPMS) can describe the physicochemical processes of atmospheric transport, but they are highly dependent on the accuracy of emission inventories and have enormous computational costs, making them unsuitable for the high-timeliness operational forecasting requirements. Existing statistical or machine learning forecasting methods based on historical data mostly treat the atmospheric environment system as a "black box," meaning they only have inputs and outputs, and cannot effectively analyze and separate the drivers of PM2.5. 2.5 The key intrinsic modes of O3 variation (such as strong seasonal periodicity, long-term trends driven by policies and emission reductions, and stochastic residuals caused by sudden weather events) lack interpretability. This results in insufficient predictive power of models for the "inflection points" of pollution processes (such as the sudden formation and dissipation of pollution) and poor forecast stability. Furthermore, the vast majority of prediction models use PM2.5 as a basis for forecasting. 2.5In isolation, predictions of O3 neglect their intrinsic photochemical connections. For example, PM2.5... 2.5 Some components of particulate matter (such as nitrates and secondary organic aerosols) share common precursors with O3, and the concentration of particulate matter in the atmosphere can also affect the photolysis rate through radiation effects, thereby inhibiting O3 formation. This fragmented prediction can lead to contradictory decision-making processes; for example, in order to reduce PM2.5 concentrations... 2.5 However, the measures taken may exacerbate O3 pollution. Therefore, developing a new generation of intelligent prediction models that can deeply understand and analyze the intrinsic structure of pollution time series and capture the synergistic changes of multiple pollutants is a scientific bottleneck that urgently needs to be overcome in the field of environmental monitoring and forecasting. Summary of the Invention
[0004] To address the aforementioned shortcomings of the prior art, the present invention provides a... To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows: Provides a PM based on STL-VMD-Transformer hybrid deep learning 2.5 The method for predicting O3 in conjunction with other methods includes the following steps: S1: Collect historical data of the target pollutant forecast, as well as historical data of other pollutants and meteorological data from the same period. Perform preprocessing, calculate the correlation between the target pollutant forecast data and other pollutant and meteorological data, and screen out the set of key variables that significantly affect the target pollutant forecast data to obtain the input independent variables. The target pollutant forecast data includes PM2.5. 2.5 Concentration data and O3 concentration data; S2: Construct time series data of historical data for target pollutant prediction, and decompose the time series data into trend, seasonal and residual terms using STL; S3: The residual terms decomposed from STL are further iteratively decomposed using the variational mode decomposition algorithm (VMD) to obtain a set of residuals for a set number of modes; S4: Use the residual set, trend term, and seasonal term as output dependent variables, combine the input independent variables and output dependent variables to form a training dataset, construct a Transformer decoder, input the training dataset into the Transformer decoder, train the Transformer decoder, and output a converged Transformer decoder. S5: Collect new data on other pollutants and meteorological data, input them into the converged Transformer decoder, and use the fully connected layer to output the predicted PM2.5. 2.5 Concentration data and O3 concentration data.
[0005] Further, step S1 includes: S11: Collect historical data of target predicted pollutants, as well as historical data of other pollutants and meteorological data from the same period; S12: Handle missing and outlier values in the historical data, then perform data normalization to obtain the normalized values of the historical data for the target pollutant prediction. Normalized values of historical data for other pollutants and meteorological data during the same period ; S13: Calculate the Spearman correlation coefficient between the target predicted pollutant data and other pollutant data and meteorological data in the same period using normalized values, obtain a symmetric correlation coefficient matrix, and use a heat map to visually display the correlation coefficient matrix. ; in, For PM 2.5 The correlation coefficient between concentration data and O3 concentration data For PM 2.5 The correlation coefficient between concentration data and NO2 concentration data For O3 concentration data and PM 2.5 Correlation coefficient of concentration data The correlation coefficient between O3 concentration data and NO2 concentration data. NO2 concentration data and PM 2.5 Concentration data, The correlation coefficient between NO2 concentration data and O3 concentration data; S14: Filter out the correlation coefficients in the correlation coefficient matrix that are associated with the target predicted pollutant data. And calculate each correlation coefficient. of p value; ; in, For the first j Test statistics for other pollutant data and meteorological data, df For degrees of freedom, For the first j Other pollutant data and meteorological data corresponding p value; S15: Set the significance threshold for the statistical test ,like Then determine the first j If other pollutant data and meteorological data have a significant impact on the target predicted pollutant data, then the first pollutant data will be considered... j Other pollutant data and meteorological data have no significant impact on the target pollutant data prediction; S16: Select other pollutant data and meteorological data that have a significant impact on the target pollutant data, and use them as the key variable set for the target pollutant data. Obtain the normalized values of the historical data of other pollutant data and meteorological data in the key variable set as input independent variables.
[0006] Further, step S2 includes: S21: Set the length of the seasonal cycle P Sliding window width for trend fitting Sliding window width for seasonal fitting ; S22: Using the weighted regression smoothing algorithm LOESS on time series data Smoothing is performed to obtain the initial trend term. ; S23: Calculate time series data With the initial trend term The difference between them yields the detrended sequence. The detrended sequence According to the length of the seasonal cycle P Group the data and extract the data belonging to each group. j Detrended sequence of all time points corresponding to the seasonal position ; S24: Using the weighted regression smoothing algorithm LOESS to smooth the detrended series Smoothing is performed to obtain a smoothed sequence of the seasonal location. and smooth the sequence Expanding to full-length sequence data yields preliminary seasonal terms with periodicity. And satisfy ; S25: Preliminary seasonal terms for different seasonal locations Treating it as a time series, and using the weighted regression smoothing algorithm LOESS to smooth it again in the time direction, a stable periodic seasonal term is obtained. ; S26: Calculate time series data With periodic seasonal items The differences between them yield deseasonal sequences. Then, the weighted regression smoothing algorithm LOESS is used to smooth the deseasonal series. Smoothing is performed to obtain a new trend term. ; S27: Utilizing new trend items and periodic seasonal items Calculate the current residual Define temporary residual scale And calculate the standard deviation corresponding to the current residual. ; ; in, It is a median function; S28: Using standard deviation Calculate the current robust weights W t ; ; in, Use the Bisquare weighting function; S29: Based on robust weights W t Update the weighted regression smoothing algorithm LOESS, return to step S23, and use the trend term. Replace the initial trend item Then execute steps S23-S26 to output new trend items. and periodic seasonal items ; S210: Repeat steps S23-S29 until the trend term and the periodic seasonal term converge or the set number of iterations is reached, then output the final trend term. Seasonal items and residuals .
[0007] Furthermore, the variational mode decomposition algorithm (VMD) decomposes the residual terms. The specific method is as follows: S31: Transfer the residual term As input to the Variational Mode Decomposition (VMD) algorithm And initialize the Variational Mode Decomposition (VMD) algorithm parameters: initial mode : ; initial center frequency of the mode : Initial Lagrange multipliers ; k Assign modal numbers; S32: Input Perform Fourier transform to obtain signal components of different modes Utilizing signal components of different modes Update the modes, as well as update the center frequencies and Lagrange multipliers of the modes; ; in, w The center frequency of the mode. i The modal number is assigned to the current iteration process. For the first n The modality updated in +1 iterations i , For the first n Modalities of the next iteration i , For the first n Lagrange multipliers in the next iteration process, For the first n The iteration process of the nth iteration k The center frequency of each mode For bandwidth constraint strength, For the first n The +1 iteration process updates the... k The center frequency of each mode For the first n The update of the iteration process k One modality, For the first n The Lagrange multipliers updated in the next iteration. Noise tolerance; S33: Determine whether the updated mode in the iterative process satisfies the convergence condition; If satisfied If the iterative decomposition process converges, the signal component of each mode is output, and the result is obtained. K The residual set of each mode Otherwise, the iterative decomposition is considered to have converged, and the iterative decomposition process continues. To achieve convergence tolerance.
[0008] Further, step S4 includes: S41: Set the residuals Trend items and seasonal items As the output dependent variable, the input independent variable and the output dependent variable are combined to form the training dataset; S42: Construct a Transformer decoder, which builds a... N The decoder stack consists of layers, each layer containing a multi-head self-attention mechanism and a feedforward neural network. The multi-head self-attention mechanism includes an attention head that focuses on residual mutations and synergistic effects in the residual set, and an attention head that focuses on the trend term. Attention to the changing cycles in China and Japan and the seasonal factors to focus on Attention should be paid to the duration of the pollution process. S43: Input the training dataset into the Transformer decoder to train it. Using a multi-head self-attention mechanism, obtain the temporal information between the target predicted pollutant data and other pollutant data and meteorological data in the key variable set. Input this information into the feedforward neural network to output the predicted output vector of the Transformer decoder. ; ; in, u This represents the number of predicted output variables of the Transformer decoder. For the predicted output variables of the Transformer decoder; S44: Predict the output magnitude vector Input and output layers, respectively outputting PM 2.5 Predicted values of concentration data and O3 concentration data ; ; in, For the activation function of the fully connected layer, For regularization functions, The activation function for the Gaussian error linear unit; S45: Calculate the predicted value Compared with the measured PM 2.5 Mean square error of concentration data and O3 concentration data Then, a weighted sum is performed to obtain the predicted total loss. ; ; in, For PM 2.5 Prediction weights for concentration data and O3 concentration data; S46: Set the prediction error loss threshold ,like If the training process converges, the Transformer decoder is output. Otherwise, if the training process does not converge, the Transformer decoder continues to be trained until the training process converges and the Transformer decoder is output.
[0009] The beneficial effects of this invention are: quantitative analysis of PM using Spearman correlation coefficient. 2.5This invention investigates the nonlinear correlations between concentration data and O3 concentration data and other air pollutants (NO2, SO2, CO, etc.) and meteorological elements (temperature, wind speed, air pressure, etc.), thereby identifying key variables affecting their concentrations and preparing for subsequent variable parameter input. The invention also introduces the STL-VMD mixing technique, which has adaptive decomposition characteristics, to process the original non-stationary and nonlinear air quality series data (PM2.5, 20 ... 2.5 The air quality data (including concentration data and O3 concentration data) undergoes multi-scale, high-precision decomposition, analyzing it into several sets of modal components with clear physical meaning. These include directional trend terms reflecting long-term changes, seasonal terms reflecting periodic fluctuations, and residual terms encompassing local details and random fluctuations. This decomposition process effectively separates different characteristic information in the air quality evolution process and significantly reduces the complexity and noise interference of the original sequence. Based on this, the powerful capabilities of the Transformer model in sequence modeling and long-term dependency capture are further utilized to construct a deep learning framework suitable for multi-component air quality prediction. During the model training phase, a multi-head self-attention mechanism and a feedforward neural network are used to enable the model to fully learn the spatiotemporal evolution laws and interrelationships inherent in each decomposed sub-sequence. Based on the fully trained Transformer model, the model can predict PM2.5 concentrations for future periods. 2.5 High-precision, multi-timescale prediction of concentration and O3 concentration. Attached Figure Description
[0010] Figure 1 PM based on STL-VMD-Transformer hybrid deep learning 2.5 Flowchart of the O3 co-prediction method. Detailed Implementation
[0011] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0012] like Figure 1 As shown, a PM based on STL-VMD-Transformer hybrid deep learning is presented. 2.5 The method for predicting O3 in conjunction with other methods includes the following steps: S1: Collect historical data of the target predicted pollutants, historical data of other pollutants from the same period, and historical meteorological data, and preprocess them. Calculate the correlation between the target predicted pollutant data and other pollutant data and meteorological data, and screen out the set of key variables that significantly affect the target predicted pollutant data to obtain the input independent variables. Step S1 specifically includes: S11: Collect historical data of the target predicted pollutant, historical data of other pollutants during the same period, and historical meteorological data. The target predicted pollutant data is PM2.5. 2.5 Concentration data and O3 concentration data, and other pollutant data in this embodiment include NO2, SO2, CO concentration data, etc., and meteorological data in the same period, including temperature, wind speed, air pressure data, etc.
[0013] S12: Handle missing and outlier values in the historical data, then perform data normalization to obtain the normalized values of the historical data for the target pollutant prediction. Normalized values of historical data for other pollutants and meteorological data during the same period ; i This embodiment uses the numbering of target predicted pollutant data. i =2, including PM 2.5 Concentration data and O3 concentration data, j Numbering for other pollutant data and meteorological data; S13: Calculate the Spearman correlation coefficient between the target predicted pollutant data and other pollutant data and meteorological data in the same period using normalized values, obtain a symmetric correlation coefficient matrix, and use a heat map to visually display the correlation coefficient matrix. ; in, For PM 2.5 The correlation coefficient between concentration data and O3 concentration data For PM 2.5 The correlation coefficient between concentration data and NO2 concentration data For O3 concentration data and PM 2.5 Correlation coefficient of concentration data The correlation coefficient between O3 concentration data and NO2 concentration data. NO2 concentration data and PM 2.5 Concentration data, The correlation coefficient between NO2 concentration data and O3 concentration data; This embodiment uses the correlation coefficient Taking the calculation method of [data] as an example, the calculation method of the correlation coefficient between various data is explained as follows: ; in,n The number of samples for historical data; S14: Filter out the correlation coefficients in the correlation coefficient matrix that are associated with the target predicted pollutant data. And calculate each correlation coefficient. of p value; ; in, For the first j Test statistics for other pollutant data and meteorological data, df For degrees of freedom, For the first j Other pollutant data and meteorological data corresponding p value; S15: Set the significance threshold for the statistical test ,like Then determine the first j If other pollutant data and meteorological data have a significant impact on the target predicted pollutant data, then the first pollutant data will be considered... j Other pollutant data and meteorological data have no significant impact on the target pollutant data prediction; This embodiment is illustrated by... p The value is used to determine whether the observed correlation is real or merely due to chance (random sampling error), and is usually expressed as... p A value <0.05 is used as the statistical significance threshold, meaning the correlation is statistically significant and truly exists in the population. Finally, combining the various correlation coefficients and... p The values are used to filter out a list of key variables for PM2.5 and O3 concentration data.
[0014] S16: Select other pollutant data and meteorological data that have a significant impact on the target pollutant data, and use them as the key variable set for the target pollutant data. Obtain the normalized values of the historical data of other pollutant data and meteorological data in the key variable set as input independent variables.
[0015] S2: Construct time series data of historical data for target pollutant prediction, and decompose the time series data into trend, seasonal, and residual terms using STL decomposition. Specifically: Construct time series data using historical data of target pollutant prediction. , t To collect time, time series data Perform STL decomposition into trend terms Seasonal items and residuals ,Right now Specifically, it includes the following steps: S21: Set the length of the seasonal cycle P Sliding window width for trend fitting Sliding window width for seasonal fitting ; S22: Using the weighted regression smoothing algorithm LOESS on time series data Smoothing is performed to obtain the initial trend term. ; S23: Calculate time series data With the initial trend term The difference between them yields the detrended sequence. The detrended sequence According to the length of the seasonal cycle P Group the data and extract the data belonging to each group. j Detrended sequence of all time points corresponding to the seasonal position ; S24: Using the weighted regression smoothing algorithm LOESS to smooth the detrended series Smoothing is performed to obtain a smoothed sequence of the seasonal location. and smooth the sequence Expanding to full-length sequence data yields preliminary seasonal terms with periodicity. And satisfy ; S25: Preliminary seasonal terms for different seasonal locations Treating it as a time series, and using the weighted regression smoothing algorithm LOESS to smooth it again in the time direction, a stable periodic seasonal term is obtained. ; Although estimates of location are available for each season, they may not be smooth enough, therefore for each fixed group... j (Phase) Treat the seasonal items at different seasonal positions as a time series, and smooth them again in the time direction using LOESS to obtain a more stable result.
[0016] S26: Calculate time series data With periodic seasonal items The differences between them yield deseasonal sequences. Then, the weighted regression smoothing algorithm LOESS is used to smooth the deseasonal series. Smoothing is performed to obtain a new trend term. ; S27: Utilizing new trend items and periodic seasonal items Calculate the current residual Define temporary residual scale And calculate the standard deviation corresponding to the current residual. ; ; in, It is a median function; S28: Using standard deviation Calculate the current robust weights W t ; ; in, Use the Bisquare weighting function; S29: Based on robust weights W t Update the weighted regression smoothing algorithm LOESS, return to step S23, and use the trend term. Replace the initial trend item Then execute steps S23-S26 to output new trend items. and periodic seasonal items ; S210: Repeat steps S23-S29 until the trend term and the periodic seasonal term converge or the set number of iterations is reached, then output the final trend term. Seasonal items and residuals This embodiment introduces robust weights in the outer loop to enhance robustness against outliers and impulse noise.
[0017] S3: Residual terms derived from STL decomposition The variational mode decomposition algorithm (VMD) is used to perform iterative decomposition to obtain the residual set of a set number of modes. , k Modal numbering, K The number of modes; Variational Mode Decomposition (VMD) algorithm decomposes residual terms The specific method is as follows: S31: Transfer the residual term As input to the Variational Mode Decomposition (VMD) algorithm And initialize the Variational Mode Decomposition (VMD) algorithm parameters: initial mode : ; initial center frequency of the mode : Initial Lagrange multipliers ; k Assign modal numbers; This embodiment will include modal number K Set to 5 to control the bandwidth constraint strength. Noise tolerance .
[0018] S32: Input Perform Fourier transform to obtain signal components of different modes Utilizing signal components of different modes Update the modes, as well as update the center frequencies and Lagrange multipliers of the modes; ; in, w The center frequency of the mode. i The modal number is assigned to the current iteration process. For the first n The modality updated in +1 iterations i , For the first n Modalities of the next iteration i , For the first n Lagrange multipliers in the next iteration process, For the first n The iteration process of the nth iteration k The center frequency of each mode For bandwidth constraint strength, For the first n The +1 iteration process updates the... k The center frequency of each mode For the first n The update of the iteration process k One modality, For the first n The Lagrange multipliers updated in the next iteration. Noise tolerance; S33: Determine whether the updated mode in the iterative process satisfies the convergence condition; If satisfied If the iterative decomposition process converges, the signal component of each mode is output, and the result is obtained. K The residual set of each mode Otherwise, the iterative decomposition is considered to have converged, and the iterative decomposition process continues. To achieve convergence tolerance.
[0019] Most time series data (such as meteorological data, PM) 2.5Both nitrogen and oxygen concentrations (O3 concentration) are non-stationary. This means that their statistical properties (such as mean and variance) change over time. Directly using the raw data makes it difficult for the Transformer model to capture its inherent patterns, easily leading to prediction failures. Before model learning, the complex raw data is deeply preprocessed using STL-VMD decomposition technology, forming multiple quasi-stationary subsequences. This significantly reduces the learning burden on the subsequent Transformer model, enabling it to more accurately and focusedly capture the dependencies within and between each subsequence, thereby improving the model's prediction efficiency and accuracy.
[0020] STL-VMD decomposition technology solves the most challenging problems in time series forecasting, such as nonstationarity, feature mixing, and noise. It provides a clearer, more structured, and easier-to-learn input for subsequent Transformer forecasting models, thus laying a solid foundation for building high-performance and robust PM2.5 and O3 forecasting models.
[0021] S4: Use the residual set, trend term, and seasonal term as output dependent variables, combine the input independent variables and output dependent variables to form a training dataset, construct a Transformer decoder, input the training dataset into the Transformer decoder, train the Transformer decoder, and output a converged Transformer decoder.
[0022] To improve the model's generalization ability, the core network employs a Transformer decoder. During model construction, learnable positional encoding or sine / cosine positional encoding is introduced to explicitly inject temporal information into the model, ensuring its ability to understand the temporal dependencies of the data. A... N The decoder stack consists of layers, each containing a multi-head self-attention mechanism and a feedforward neural network. To address the characteristics of air quality data, the attention mechanism is optimized by adjusting the number of attention heads, enabling the model to focus on dependencies at different time scales in parallel. For example, one head focuses on the diurnal variation cycle, another on the duration of the pollution process, and yet another on abrupt changes and synergistic effects in the residual terms. During decoding and prediction, masked self-attention is used to ensure strict shielding of future information and guarantee the logical correctness of model training. The context vector output by the decoder is mapped through an output layer containing two fully connected layers, ultimately outputting a modulus vector.
[0023] Step S4 specifically includes: S41: Set the residuals Trend items and seasonal items As the output dependent variable, the input independent variable and the output dependent variable are combined to form the training dataset; S42: Construct a Transformer decoder, which builds a... N The decoder stack consists of layers, each layer containing a multi-head self-attention mechanism and a feedforward neural network. The multi-head self-attention mechanism includes an attention head that focuses on residual mutations and synergistic effects in the residual set, and an attention head that focuses on the trend term. Attention to the changing cycles in China and Japan and the seasonal factors to focus on Attention should be paid to the duration of the pollution process. S43: Input the training dataset into the Transformer decoder to train it. Using a multi-head self-attention mechanism, obtain the temporal information between the target predicted pollutant data and other pollutant data and meteorological data in the key variable set. Input this information into the feedforward neural network to output the predicted output vector of the Transformer decoder. ; ; in, u This represents the number of predicted output variables of the Transformer decoder. For the predicted output variables of the Transformer decoder; In order for the model to simultaneously predict PM 2.5 For the PM concentration data and O3 concentration data, we added a customized output layer after the decoder to output PM separately. 2.5 The values of concentration data and O3 concentration data.
[0024] S44: Predict the output magnitude vector Input and output layers, respectively outputting PM 2.5 Predicted values of concentration data and O3 concentration data ; ; in, For the activation function of the fully connected layer, For regularization functions, The activation function for the Gaussian error linear unit; S45: Calculate the predicted value Compared with the measured PM 2.5 Mean square error of concentration data and O3 concentration data Then, a weighted sum is performed to obtain the predicted total loss. ; ; in, For PM 2.5 Prediction weights for concentration data and O3 concentration data; S46: Set the prediction error loss threshold ,like If the training process converges, the Transformer decoder is output. Otherwise, if the training process does not converge, the Transformer decoder continues to be trained until the training process converges and the Transformer decoder is output.
[0025] S5: Collect new data on other pollutants and meteorological data, input them into the converged Transformer decoder, and use the fully connected layer to output the predicted PM2.5. 2.5 Concentration data and O3 concentration data.
[0026] Although the various sub-sequences (trend term, seasonal term, and residual term) after STL-VMD decomposition are jointly input into the Transformer model, their contributions to predicting future pollutant concentrations are not equal, and this contribution changes dynamically over time. The standard attention mechanism of the Transformer model tends to give "equal attention" to all inputs when processing these components, making it difficult to adaptively identify the sub-sequences that play a key dominant role at a specific prediction time. For example, when predicting a pollution event caused by a sudden emission source, the information provided by the high-frequency residual term containing anomalous signals will be far more important than the stationary trend term reflecting long-term changes; conversely, when assessing pollution trends at a climate scale, the trend term becomes the decisive factor.
[0027] Therefore, the baseline Transformer model must be carefully designed and improved. The core objective is to enable its attention mechanism to dynamically and accurately weigh the importance of each subsequence and focus on the core signal most relevant to the current prediction task. Specific improvements will be implemented on two levels: at the model structure level, fully exploring and configuring the inherent potential of the multi-head attention mechanism to enable the model to learn complex interaction patterns between different subsequences in parallel, as well as dependencies across multiple time scales; at the training strategy level, by introducing targeted loss functions or regularization constraints, the model will be directly guided to learn attention distribution patterns with greater physical meaning and predictive power from the optimization objective.
Claims
1. A PM based on STL-VMD-Transformer hybrid deep learning 2.5 The method for predicting O3 in conjunction with O3 is characterized by, Includes the following steps: S1: Collect historical data of the target pollutant forecast, as well as historical data of other pollutants and meteorological data from the same period. Perform preprocessing, calculate the correlation between the target pollutant forecast data and other pollutant and meteorological data, and screen out the set of key variables that significantly affect the target pollutant forecast data to obtain the input independent variables. The target pollutant forecast data includes PM2.
5. 2.5 Concentration data and O3 concentration data; S2: Construct time series data of historical data for target pollutant prediction, and decompose the time series data into trend, seasonal and residual terms using STL; S3: The residual terms decomposed from STL are further iteratively decomposed using the variational mode decomposition algorithm (VMD) to obtain a set of residuals for a set number of modes; S4: Use the residual set, trend term, and seasonal term as output dependent variables, combine the input independent variables and output dependent variables to form a training dataset, construct a Transformer decoder, input the training dataset into the Transformer decoder, train the Transformer decoder, and output a converged Transformer decoder. S5: Collect new data on other pollutants and meteorological data, input them into the converged Transformer decoder, and use the fully connected layer to output the predicted PM2.
5. 2.5 Concentration data and O3 concentration data.
2. The PM based on STL-VMD-Transformer hybrid deep learning as described in claim 1 2.5 The method for predicting O3 in conjunction with O3 is characterized by, Step S1 includes: S11: Collect historical data of target predicted pollutants, as well as historical data of other pollutants and meteorological data from the same period; S12: Handle missing and outlier values in the historical data, then perform data normalization to obtain the normalized values of the historical data for the target pollutant prediction. Normalized values of historical data for other pollutants and meteorological data during the same period ; S13: Calculate the Spearman correlation coefficient between the target predicted pollutant data and other pollutant data and meteorological data in the same period using normalized values, obtain a symmetric correlation coefficient matrix, and use a heat map to visually display the correlation coefficient matrix. ; in, For PM 2.5 The correlation coefficient between concentration data and O3 concentration data For PM 2.5 The correlation coefficient between concentration data and NO2 concentration data For O3 concentration data and PM 2.5 Correlation coefficient of concentration data The correlation coefficient between O3 concentration data and NO2 concentration data. NO2 concentration data and PM 2.5 Concentration data, The correlation coefficient between NO2 concentration data and O3 concentration data; S14: Filter out the correlation coefficients in the correlation coefficient matrix that are associated with the target predicted pollutant data. And calculate each correlation coefficient. of p value; ; in, For the first j Test statistics for other pollutant data and meteorological data, df For degrees of freedom, For the first j Other pollutant data and meteorological data corresponding p value; S15: Set the significance threshold for the statistical test ,like Then determine the first j If other pollutant data and meteorological data have a significant impact on the target predicted pollutant data, then the first pollutant data will be considered... j Other pollutant data and meteorological data have no significant impact on the target pollutant data prediction; S16: Select other pollutant data and meteorological data that have a significant impact on the target pollutant data, and use them as the key variable set for the target pollutant data. Obtain the normalized values of the historical data of other pollutant data and meteorological data in the key variable set as input independent variables.
3. The PM based on STL-VMD-Transformer hybrid deep learning as described in claim 2 2.5 The method for predicting O3 in conjunction with O3 is characterized by, Step S2 includes: S21: Set the length of the seasonal cycle P Sliding window width for trend fitting Sliding window width for seasonal fitting ; S22: Using the weighted regression smoothing algorithm LOESS on time series data Smoothing is performed to obtain the initial trend term. ; S23: Calculate time series data With the initial trend term The difference between them yields the detrended sequence. The detrended sequence According to the length of the seasonal cycle P Group the data and extract the data belonging to each group. j Detrended sequence of all time points corresponding to the seasonal position ; S24: Using the weighted regression smoothing algorithm LOESS to smooth the detrended series Smoothing is performed to obtain a smoothed sequence of the seasonal location. and smooth the sequence Expanding to full-length sequence data yields preliminary seasonal terms with periodicity. And satisfy ; S25: Preliminary seasonal terms for different seasonal locations Treating it as a time series, and using the weighted regression smoothing algorithm LOESS to smooth it again in the time direction, a stable periodic seasonal term is obtained. ; S26: Calculate time series data With periodic seasonal items The differences between them yield deseasonal sequences. Then, the weighted regression smoothing algorithm LOESS is used to smooth the deseasonal series. Smoothing is performed to obtain a new trend term. ; S27: Utilizing new trend items and periodic seasonal items Calculate the current residual Define temporary residual scale And calculate the standard deviation corresponding to the current residual. ; ; in, It is a median function; S28: Using standard deviation Calculate the current robust weights W t ; ; in, Use the Bisquare weighting function; S29: Based on robust weights W t Update the weighted regression smoothing algorithm LOESS, return to step S23, and use the trend term. Replace the initial trend item Then execute steps S23-S26 to output new trend items. and periodic seasonal items ; S210: Repeat steps S23-S29 until the trend term and the periodic seasonal term converge or the set number of iterations is reached, then output the final trend term. Seasonal items and residuals .
4. The PM based on STL-VMD-Transformer hybrid deep learning as described in claim 3 2.5 The method for predicting O3 in conjunction with O3 is characterized by, The variational mode decomposition algorithm (VMD) decomposes the residual terms. The specific method is as follows: S31: Transfer the residual term As input to the Variational Mode Decomposition (VMD) algorithm And initialize the Variational Mode Decomposition (VMD) algorithm parameters: initial mode : ; initial center frequency of the mode : Initial Lagrange multipliers ; k Assign modal numbers; S32: Input Perform Fourier transform to obtain signal components of different modes Utilizing signal components of different modes Update the modes, as well as update the center frequencies and Lagrange multipliers of the modes; ; in, w The center frequency of the mode. i The modal number is assigned to the current iteration process. For the first n The modality updated in +1 iterations i , For the first n Modalities of the next iteration i , For the first n Lagrange multipliers in the next iteration process, For the first n The iteration process of the nth iteration k The center frequency of each mode For bandwidth constraint strength, For the first n The +1 iteration process updates the... k The center frequency of each mode For the first n The update of the iteration process k One modality, For the first n The Lagrange multipliers updated in the next iteration. Noise tolerance; S33: Determine whether the updated mode in the iterative process satisfies the convergence condition; If satisfied If the iterative decomposition process converges, the signal component of each mode is output, and the result is obtained. K The residual set of each mode Otherwise, the iterative decomposition is considered to have converged, and the iterative decomposition process continues. To achieve convergence tolerance.
5. The PM based on STL-VMD-Transformer hybrid deep learning as described in claim 4 2.5 The method for predicting O3 in conjunction with O3 is characterized by, Step S4 includes: S41: Set the residuals Trend items and seasonal items As the output dependent variable, the input independent variable and the output dependent variable are combined to form the training dataset; S42: Construct a Transformer decoder, which builds a... N The decoder stack consists of layers, each layer containing a multi-head self-attention mechanism and a feedforward neural network. The multi-head self-attention mechanism includes an attention head that focuses on residual mutations and synergistic effects in the residual set, and an attention head that focuses on the trend term. Attention to the changing cycles in China and Japan and the seasonal factors to focus on Attention should be paid to the duration of the pollution process. S43: Input the training dataset into the Transformer decoder to train it. Using a multi-head self-attention mechanism, obtain the temporal information between the target predicted pollutant data and other pollutant data and meteorological data in the key variable set. Input this information into the feedforward neural network to output the predicted output vector of the Transformer decoder. ; ; in, u This represents the number of predicted output variables of the Transformer decoder. For the predicted output variables of the Transformer decoder; S44: Predict the output magnitude vector Input and output layers, respectively outputting PM 2.5 Predicted values of concentration data and O3 concentration data ; ; in, For the activation function of the fully connected layer, For regularization functions, The activation function for the Gaussian error linear unit; S45: Calculate the predicted value Compared with the measured PM 2.5 Mean square error of concentration data and O3 concentration data Then, a weighted sum is performed to obtain the predicted total loss. ; ; in, For PM 2.5 Prediction weights for concentration data and O3 concentration data; S46: Set the prediction error loss threshold ,like If the training process converges, the Transformer decoder is output. Otherwise, if the training process does not converge, the Transformer decoder continues to be trained until the training process converges and the Transformer decoder is output.