A PM2.5 concentration prediction method based on spatiotemporal fusion deep learning

CN122949977APending Publication Date: 2026-10-20GUIZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611068029.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0006]1.时空特征融合能力不足:传统时序模型(如LSTM)虽能捕捉时间依赖,但其对空间信息的融合方式较为简单或静态(如文献1),难以精准模拟风场等动态因素驱动的PM2.5空间传输过程;而基于图网络的单站点预测方法(如文献2)则完全忽视了多站点间的空间关联

Benefits of technology

[0050]1.动态时空融合能力强:本发明通过Transformer时序建模与动态风场图神经网络空间建模的协同工作,既捕获了PM2.5浓度的长时序依赖关系,又实现了风场驱动的动态空间关联建模,精准适配 PM2.5 颗粒物传输的物理特性,显著提升了预测的准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention discloses a PM2.5 concentration prediction method based on spatiotemporal fusion deep learning, belonging to the field of environmental monitoring and intelligent prediction technology. The method includes: collecting and preprocessing multi-site multi-dimensional time-series data and spatial geographic data to construct a spatiotemporal input matrix and a static spatial correlation matrix; capturing long-term temporal dependencies through a Transformer encoder to obtain temporal feature representations; introducing a dynamic wind field adjustment mechanism to construct a dynamic graph structure and obtaining spatial feature representations through a graph neural network; deeply fusing temporal and spatial features to output the PM2.5 concentration prediction results for future multiple steps; training the model using a weighted loss function and a learning rate warm-up strategy; and generating and outputting heavy pollution event early warning information based on the prediction results. This invention can deeply fuse spatiotemporal features, accurately capture PM2.5 heavy pollution events, achieve stable training, and adapt to early warning requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of environmental monitoring and intelligent prediction technology, specifically to a PM2.5 concentration prediction method based on spatiotemporal fusion deep learning. Background Technology

[0002] As a core pollutant affecting air quality, accurate prediction of PM2.5 concentration is a key technological support for ambient air quality monitoring, pollution prevention and control, and public health protection. With the large-scale construction of the national automatic atmospheric monitoring network, a monitoring data system covering multiple stations, high frequency, and multiple dimensions has been formed, including multi-source heterogeneous information such as measured PM2.5 concentration data, meteorological observation data, and station spatial geographic data.

[0003] Existing PM2.5 concentration prediction methods are mainly divided into two categories: physical models and statistical models. Physical models (such as chemical transport models (CTMs) and WRF-Chem) are based on atmospheric dynamics and physicochemical reaction mechanisms, but they are computationally complex and have high parameter uncertainties. Statistical models, especially machine learning methods, are widely used due to their high computational efficiency. In the field of statistical models, methods based on Long Short-Term Memory (LSTM) networks have attracted much attention due to their excellent time series modeling capabilities. For example, in "LSTM Algorithm Based on Spatiotemporal Correlation and its Application in PM2.5 Concentration Prediction" (hereinafter referred to as Reference 1), published in Computer Applications and Software in June 2021 by Zhao Yanming, a TS_LSTM algorithm that integrates spatial correlation was proposed. This algorithm calculates local and global spatial correlation coefficients based on factors such as wind force, wind direction, and geographical distance, and embeds them into the forget and remember gates of the LSTM, thus achieving a preliminary fusion of the time dependence and spatial correlation of PM2.5 concentration. However, its static spatial correlation calculation method mainly relies on fixed geographical and meteorological average factors, and its graph structure is predefined and fixed, making it unable to dynamically adapt to the real-time evolution of PM2.5 transmission correlations between stations caused by factors such as wind field changes. In addition, its spatial information fusion method is relatively simple, and its ability to model complex spatiotemporal dynamic interactions is limited.

[0004] With the development of deep learning technology, methods based on graph neural networks (GNNs) and Transformer architectures have been introduced into the field of spatiotemporal sequence prediction. Zhang et al., in their paper "Temporal Difference-Based GraphTransformer Networks For Air Quality PM2.5 Prediction: A Case Study in China" (hereinafter referred to as Reference 2), proposed a PM2.5 prediction method based on Temporal Difference Graph Transformer Networks (TDGTN). This method constructs a time-segment-based graph structure for each monitoring station and utilizes an improved self-attention mechanism to capture temporal dependencies, achieving better performance than traditional LSTM and the original Transformer in single-site prediction. However, this approach mainly targets a single monitoring station, and the constructed graph structure aims to connect different time steps, without addressing the spatial interactions between multiple stations. Therefore, this method cannot utilize the spatial correlation information provided by multi-site monitoring networks and lacks the ability to characterize regional PM2.5 concentration distribution and transport processes.

[0005] In summary, the existing technology has the following main shortcomings:

[0006] 1. Insufficient spatiotemporal feature fusion capability: Although traditional time series models (such as LSTM) can capture time dependence, their method of fusion of spatial information is relatively simple or static (such as reference 1), making it difficult to accurately simulate the PM2.5 spatial transmission process driven by dynamic factors such as wind fields; while single-site prediction methods based on graph networks (such as reference 2) completely ignore the spatial correlation between multiple sites.

[0007] 2. Weak ability to capture PM2.5 heavy pollution events: Existing models mostly use global fitting accuracy (such as mean square error) as the optimization target. When the distribution of PM2.5 data is unbalanced (high concentration samples are scarce), the model training tends to prioritize adapting to the extremely high proportion of low concentration PM2.5 data. This results in low prediction accuracy and high false negative rate for the low proportion of PM2.5 heavy pollution extreme events, and there is a significant time lag in peak prediction.

[0008] 3. Poor adaptability of model training and inference: PM2.5 monitoring data has high noise and strong fluctuation characteristics. Traditional optimization strategies are prone to gradient oscillation or non-convergence when facing such data, resulting in unstable model training. At the same time, there is a lack of stable training mechanisms for PM2.5 pollution early warning scenarios, which makes it difficult to meet the emergency response needs of environmental management departments.

[0009] 4. Insufficient utilization of multi-source features: The model fails to fully integrate meteorological physical mechanisms (such as the influence of wind direction and wind speed on PM2.5 diffusion) with spatiotemporal data features, resulting in insufficient physical rationality prediction of PM2.5 concentration changes. Summary of the Invention

[0010] The purpose of this invention is to solve the above-mentioned problems by providing a PM2.5 concentration prediction method based on spatiotemporal fusion deep learning that can deeply integrate spatiotemporal features, accurately capture PM2.5 heavy pollution events, and is stable in training and adaptable to early warning requirements.

[0011] To achieve the above-mentioned objectives, the present invention provides the following technical solution:

[0012] The present invention provides a PM2.5 concentration prediction method based on spatiotemporal fusion deep learning, comprising the following steps:

[0013] Step S1: Multi-source data acquisition and preprocessing

[0014] Multidimensional time-series data and spatial geographic data from multiple atmospheric monitoring stations were collected, including core PM2.5 indicators, meteorological auxiliary characteristics, and station spatial information; the data were preprocessed to construct a spatiotemporal input matrix and a dynamic spatial relationship matrix;

[0015] Specifically, it includes:

[0016] Data collection: The core forecast indicator is PM2.5 concentration (unit: μg / m³); auxiliary features include PM10 concentration, SO2, NO2 and other pollutant indicators, as well as meteorological data such as 2-meter air temperature, relative humidity, 10-meter wind direction, 10-meter wind speed, precipitation, and surface air pressure; station spatial information includes latitude, longitude, and altitude.

[0017] Data preprocessing: Missing values ​​were filled using a combination of grouped forward imputation and linear interpolation; outliers in PM2.5 concentration were detected using the 3σ rule and replaced with valid values ​​from neighboring time periods; numerical features were standardized, and data leakage was avoided based on training set statistics; sine-cosine decomposition was performed on wind direction data to generate wd_sin and wd_cos features; time period coding features were constructed, including hour_sin, hour_cos, month_sin, and month_cos.

[0018] Spatiotemporal matrix construction: Data is reorganized according to the station-time dimension to form a spatiotemporal input matrix; the horizontal distance between stations is calculated based on the Harvey sine formula, and an initial spatial relationship matrix is ​​constructed by combining the altitude difference; the static spatial correlation matrix is ​​obtained by normalization through the Gaussian kernel function.

[0019] Step S2, Temporal Feature Modeling Based on Transformer

[0020] The temporal dimension features of PM2.5 concentration are extracted using a temporal projection and spatiotemporal coding module. Long-term temporal dependencies are captured by a Transformer encoder to obtain the temporal feature representation H(tem) of each station.

[0021] Specifically, it includes:

[0022] Temporal feature projection: The original temporal features (including historical PM2.5 concentration, meteorological data, time coding, etc.) are mapped to a high-dimensional feature space through a two-layer fully connected network, and the nonlinear expressive power of the features is enhanced by LayerNorm normalization and GELU activation function.

[0023] Spatiotemporal coding: Construct a temporal location coding matrix and use a sine-cosine function to generate temporal location features; use a spatial location encoder to map the station spatial features (latitude, longitude, altitude) into spatial embeddings with the same dimensions as the temporal features, and superimpose them with the temporal features to achieve initial spatiotemporal fusion;

[0024] Long-term time-series dependency modeling: The input sequence, which integrates the initial spatiotemporal features, is fed into the Transformer encoder. The multi-layer multi-head self-attention mechanism is used to capture the dependency relationship of PM2.5 concentration at different time steps, and the time-series feature representation H(tem) of each station is output.

[0025] Step S3, Spatial modeling based on dynamic wind field diagram neural network

[0026] A dynamic wind field adjustment mechanism is introduced, an adaptive dynamic graph structure is constructed, and the interaction of PM2.5 concentration-related features between stations is realized through message passing, resulting in a spatial feature representation H(spa).

[0027] Specifically, it includes:

[0028] Dynamic graph generation: Based on wind speed and direction data, a dynamic weight adjustment factor is constructed. When the wind speed is greater than 2.0 km / h, the connection weight of adjacent stations is enhanced to adapt to the physical characteristics of PM2.5 diffusion with airflow. The direction factor is calculated by the consistency of wind direction between stations, and higher connection weight is given to downwind stations to form a dynamically adjusted spatial adjacency matrix.

[0029] Spatial message passing: The temporal feature representation H(tem) is input into the dynamic graph neural network as the node feature. The PM2.5 related features of adjacent stations are aggregated through graph convolution operation, and the intermediate spatial features are obtained by combining the features of the station itself. The spatial correlation weight parameter is introduced to adaptively adjust the contribution of different stations to the PM2.5 concentration.

[0030] Spatial feature optimization: The aggregated spatial features are nonlinearly transformed by a fully connected layer, and then processed by LayerNorm normalization and Dropout regularization to output the spatial feature representation H(spa);

[0031] Step S4: Spatiotemporal fusion and multi-step PM2.5 concentration prediction

[0032] By deeply fusing the temporal feature representation H(tem) and the spatial feature representation H(spa), the prediction head outputs the PM2.5 concentration prediction results for multiple future steps, thus achieving long-term multi-step prediction.

[0033] Specifically, it includes:

[0034] Feature fusion: Temporal and spatial features are fused by splicing. The spliced ​​high-dimensional features are mapped to a unified feature space through a fusion projection layer, and the feature interaction capability is enhanced by an activation function.

[0035] Multi-step prediction structure: Construct a prediction head based on a fully connected layer. After inputting fused features, it directly outputs the PM2.5 concentration prediction sequence for the next PRED_LEN steps (configurable to 24, 48, 72 hours, etc.), avoiding error accumulation caused by recursive prediction.

[0036] Residual correction: The PM2.5 lag feature (such as PM2.5_lag_24) is introduced as a benchmark value. The prediction results are superimposed with the benchmark value to achieve residual correction, which further improves the accuracy of PM2.5 concentration prediction.

[0037] Step S5: Model training based on weighted loss and preheating strategy

[0038] We construct a weighted loss function adapted to the needs of PM2.5 pollution early warning, and adopt a learning rate warm-up strategy and gradient pruning mechanism to improve the model training stability and the prediction performance of PM2.5 heavy pollution events.

[0039] Specifically, it includes:

[0040] Weighted loss function construction: Based on the mean absolute error (MAE) loss, samples with PM2.5 concentrations exceeding the warning threshold (e.g., 50 μg / m³) are assigned higher weights (weighting factor is 2.0-3.0).

[0041] Learning rate scheduling: A linear warm-up strategy is used for the first 3 training cycles, with the learning rate gradually increasing from 0 to the baseline learning rate (1e-4), and then a constant learning rate is maintained during training; the AdamW optimizer is used in combination with weight decay to achieve regularization and avoid model overfitting.

[0042] Stable training mechanism: Gradient accumulation steps (2) are used to alleviate the problem of limited batch size; gradient is clipped (maximum norm is 1.0) to avoid gradient explosion; early stopping mechanism (patience value is 10) is set to stop training based on the PM2.5 concentration prediction loss of the validation set to prevent overfitting;

[0043] Step S6: Multi-dimensional assessment and PM2.5 pollution early warning output

[0044] Using regression and classification dual-dimensional evaluation indicators, combined with PM2.5 concentration prediction results, we generate heavy pollution event early warning information and output PM2.5 concentration prediction sequences and early warning levels.

[0045] Specifically, it includes:

[0046] Multi-dimensional assessment: Regression indicators include R², MAE, RMSE, and MAPE to assess the overall accuracy of PM2.5 prediction; classification indicators include recall, precision, F1 score, and Critical Success Index (CSI) to assess the ability to capture heavy PM2.5 pollution events; time-series indicators include lead time and lag bias to assess the time response performance of PM2.5 concentration peak prediction.

[0047] Pollution warning generation: Based on the comparison between the predicted PM2.5 concentration and the warning threshold (e.g., 50 μg / m³), a PM2.5 heavy pollution event warning signal is generated; the warning lead time is determined by combining the peak advance, and the warning level (general, moderate, severe) is output.

[0048] Output results: The output includes the predicted PM2.5 concentration for the next PRED_LEN step, the 95% confidence interval, the warning signal for heavy pollution events, and the warning lead time.

[0049] Compared with the prior art, the present invention has significant advantages, as can be seen from the above technical solution:

[0050] 1. Strong dynamic spatiotemporal fusion capability: This invention captures the long-term temporal dependence of PM2.5 concentration and realizes dynamic spatial correlation modeling driven by wind field by working together with Transformer temporal modeling and dynamic wind field neural network spatial modeling. It accurately adapts to the physical characteristics of PM2.5 particulate matter transport and significantly improves the accuracy of prediction.

[0051] 2. Accurate capture of severe PM2.5 pollution events: This invention employs a weighted loss function to enhance the training priority of extreme PM2.5 concentration events, effectively solving the data imbalance problem. Combined with the strong feature representation capabilities of spatiotemporal fusion, it significantly improves the recall rate of severe PM2.5 pollution events, reduces the risk of missed reports, and shortens the peak prediction lag time, thus gaining a valuable time window for PM2.5 pollution emergency response.

[0052] 3. Stable training and good generalization: This invention effectively solves the problem of training instability caused by high-noise PM2.5 data by introducing a comprehensive training mechanism such as learning rate warm-up, gradient pruning, and early stopping; it improves the convergence speed and generalization ability of the model, enabling it to better adapt to multi-site, long-term PM2.5 concentration prediction scenarios and PM2.5 concentration prediction tasks in different cities.

[0053] 4. Strong early warning practicality: This invention constructs a regression-classification-time series multi-dimensional assessment system, which outputs PM2.5 concentration prediction results while providing early warning signals and lead time, directly meeting the PM2.5 pollution prevention and control decision-making needs of environmental management departments. Attached Figure Description

[0054] Figure 1 is a flowchart of the present invention;

[0055] Figure 2 is a block diagram of the technical structure of the present invention;

[0056] Figure 3 is a schematic diagram of the neural network spatial modeling of the dynamic wind field diagram of the present invention. Detailed Implementation

[0057] The following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a PM2.5 concentration prediction method based on spatiotemporal fusion deep learning proposed in accordance with the present invention.

[0058] Example 1:

[0059] A method for predicting PM2.5 concentration at multiple sites in Guiyang City over 72 hours based on spatiotemporal fusion deep learning includes the following steps:

[0060] Step S1: Multi-source data acquisition and preprocessing

[0061] Data collection: Hourly monitoring data from 2015 to 2024 were collected from nine atmospheric monitoring stations in Guiyang City (1439A, 1440A, 1441A, etc.). The core indicator was PM2.5 concentration, and auxiliary data included PM10 concentration, SO2 and other pollutant indicators, as well as meteorological data such as 2-meter air temperature, relative humidity, 10-meter wind direction, 10-meter wind speed, and precipitation. Spatial data of the stations included latitude, longitude, and altitude.

[0062] Data preprocessing: Missing values ​​were filled using site-grouped forward imputation; for consecutive missing values ​​exceeding 4 hours, linear interpolation was used; PM2.5 concentration outliers were detected using the 3σ rule and replaced with neighboring values ​​within the ±3σ range; all numerical features were standardized using StandardScaler, and the mean and standard deviation were calculated based on an 80% training set; wind direction data were converted to radians and wd_sin and wd_cos were calculated; time-encoding features such as hour_sin, hour_cos, month_sin, month_cos, day_sin, and day_cos were generated to adapt to the intraday and seasonal variation patterns of PM2.5 concentration.

[0063] Spatiotemporal matrix construction: Data is reorganized according to the "site-time" dimension to form a spatiotemporal input matrix X; the horizontal distance between sites is calculated based on the Harvey sine formula, and the altitude difference is converted to kilometers by dividing by 1000 to construct an initial spatial relationship matrix. The static spatial correlation matrix S (9×9 dimensions) is obtained by normalizing it through the Gaussian kernel function (σ is 0.5 times the average distance), which is adapted to the spatial transmission characteristics of PM2.5 in Guiyang City.

[0064] Step S2, Temporal Feature Modeling Based on Transformer

[0065] Temporal feature projection: The original temporal features (including historical PM2.5 concentration, other pollutants, meteorology, time coding, etc., totaling 31 dimensions) are mapped through a two-layer fully connected network (the first layer outputs 64 dimensions, and the second layer outputs 32 dimensions). In between, LayerNorm normalization and GELU activation are applied, and the Dropout probability is set to 0.1 to highlight the temporal evolution features of PM2.5 concentration.

[0066] The calculation formula is as follows:

[0067] 1) Raw input:

[0068] 2) Linear projection: , where d model Linear(*) represents the model feature dimension, and Linear(*) represents a single-layer fully connected mapping.

[0069] Spatiotemporal coding: The maximum length of the temporal location coding is set to 10,000, generating temporal location features consistent with the temporal feature dimension (32 dimensions); the spatial location encoder is a two-layer fully connected network (inputting 3-dimensional spatial features and outputting 32-dimensional spatial embeddings), which is superimposed with the temporal features to achieve initial fusion, laying the foundation for PM2.5 spatiotemporal feature modeling;

[0070]

[0071]

[0072] Long-term time-series dependency modeling: The Transformer encoder has 2 layers, the multi-head attention network has 4 heads, and the feedforward network has 128 dimensions. It outputs the temporal feature representation H(tem) (32 dimensions) for each station, accurately capturing the long-term time-series dependency of PM2.5 concentration. The specific calculation formula is as follows:

[0073] Temporal feature reshaping: Integrating site dimensions to adapt to multi-head attention computing.

[0074]

[0075] 1) Multi-head self-attention (temporally dependent capture)

[0076]

[0077]

[0078] 2)

[0079] 3) Residual connectivity and layer normalization

[0080]

[0081] 4) Feedforward Network (FFN)

[0082]

[0083] 5) Final time series feature output

[0084]

[0085] Step S3, Spatial modeling based on dynamic wind field diagram neural network

[0086] Dynamic graph generation: Wind speed data is taken as a 24-hour moving average, and the wind speed gating factor (sigmoid (ws_avg- 2.0)) is calculated; the directional consistency factor is calculated based on the wind direction difference between stations, and multiplied with the elements of the static spatial correlation matrix S obtained in step S1 to obtain the dynamic adjacency matrix, which accurately depicts the spatial transmission path of PM2.5 with the airflow;

[0087] Spatial message passing: H(tem) is input as a node feature into a dynamic graph neural network, and PM2.5 related features of adjacent stations are aggregated through graph convolution operation. The spatial correlation weight parameter is initialized to 0.1, which is used to adaptively adjust the contribution of different stations to the PM2.5 concentration of the target station.

[0088] Spatial feature optimization: The aggregated spatial features are processed by a fully connected layer (32D → 32D), LayerNorm normalization and Dropout (0.1), and the output spatial feature representation H (spa) (32D) is obtained.

[0089] The specific calculation formula is as follows: 1) Basic definition

[0090] Let the number of monitoring stations be N, and the batch size be B.

[0091] Station i Latitude and Longitude: Lon i ,lat i

[0092] Wind speed: v i

[0093] Wind direction cosine / sine:

[0094] European distance between stations:

[0095]

[0096] α: Self-loop weights (a customizable hyperparameter, α can be set to 0.5~1)

[0097] 2) Cosine-weighted wind direction (core physics term) represents the contribution of wind blowing from i to j:

[0098] 3) Wind speed weighting:

[0099] 4) Adaptive Gaussian space kernel

[0100]

[0101] Where σ km It is the adaptive spatial bandwidth (calculated from latitude and longitude).

[0102] 5) Initial construction of dynamic adjacency matrix

[0103]

[0104] 6) Weak edge threshold pruning

[0105]

[0106] 7) Symmetryization + Self-loop

[0107]

[0108] 8) Graph normalization (symmetric normalized Laplace):

[0109] 9) Final output (dynamic wind field spatial matrix)

[0110]

[0111] Step S4: Spatiotemporal fusion and multi-step PM2.5 concentration prediction

[0112] Feature fusion: H(tem) and H(spa) are concatenated into a 64-dimensional feature, which is then mapped through a fusion projection layer (64-dimensional → 32-dimensional). The feature interaction is enhanced by the GELU activation function, thus fully integrating the spatiotemporal correlation information of PM2.5 concentration.

[0113] Multi-step prediction structure: The prediction head is a three-layer fully connected network (32-dimensional → 64-dimensional → 32-dimensional → 72-dimensional), which directly outputs the PM2.5 concentration prediction sequence for the next 72 hours, avoiding the accumulation of recursive errors;

[0114] Residual correction: The PM2.5_lag_24 feature is introduced as a benchmark value. The prediction result of the prediction head is added to the benchmark value to achieve residual correction and obtain the final prediction result, which further improves the prediction accuracy of PM2.5 concentration.

[0115] The specific calculation formula is as follows:

[0116] Feature fusion: Within the multi-layer spatiotemporal module, the temporal feature Htem and the spatial feature Hspa are fused by channel splicing. The spliced ​​high-dimensional features are mapped to a unified feature space through a 1×1 convolutional fusion layer, thus completing the deep interaction between temporal and spatial correlation information.

[0117] 1) Original input: Temporal features:

[0118] Spatial characteristics:

[0119] 2) Channel splicing:

[0120]

[0121] 3) Dimensional transformation + 1×1 convolution fusion:

[0122]

[0123] Final spatiotemporal feature refinement: The model ends with a 1×1 convolutional layer to further refine and calibrate the overall spatiotemporal features, strengthening the key spatiotemporal representations related to PM2.5 concentration.

[0124]

[0125] FusionConv is an unbiased 1×1 convolution used for feature calibration.

[0126] A prediction head based on two-dimensional convolution is constructed, which includes feature convolution, layer normalization, GELU activation and final prediction convolution, and directly outputs a configurable length of future multi-step PM2.5 concentration sequence, avoiding the error accumulation caused by recursive prediction.

[0127] 1) Feature Mapping Convolution:

[0128] 2) Layer normalization + GELU activation:

[0129] 3) Final prediction convolution (direct output after multiple steps)

[0130]

[0131] Where L is the input timing length, and the output... This refers to the predicted PM2.5 values ​​over multiple steps in the future.

[0132] Step S5: Model training based on weighted loss and warm-up strategy

[0133] Weighted loss function: The basic loss function is MAE, and samples with PM2.5 concentrations exceeding 50 μg / m³ are assigned a weight of 2.0 to enhance the model's ability to predict PM2.5 heavy pollution events;

[0134] Learning rate scheduling: The baseline learning rate is set to 1e-4, and a linear warm-up is used for the first 3 cycles, gradually increasing from 0 to the baseline learning rate; the optimizer is AdamW, with a weight decay coefficient of 1e-4;

[0135] Stable training mechanism: gradient accumulation steps are set to 2, gradient clipping maximum norm is 1.0; early stop patience value is set to 10, based on the validation set PM2.5 concentration prediction MAE monitoring;

[0136] Step S6: Multi-dimensional assessment and PM2.5 pollution early warning output

[0137] Multi-dimensional assessment: Regression indicators include R², MAE, RMSE, and MAPE to assess the overall accuracy of PM2.5 concentration prediction; classification indicators include recall, precision, F1, and CSI (warning threshold 50 μg / m³) to assess the ability to capture PM2.5 heavy pollution events; time-series indicators include peak lead and lag bias to assess the time response performance of PM2.5 concentration peak prediction.

[0138] Pollution warning generation: When the predicted PM2.5 concentration exceeds 50 μg / m³, a warning is triggered. The warning level is determined based on the peak advance: ≥2 hours in advance is a general warning, 1-2 hours in advance is a relatively severe warning, and less than 1 hour in advance is a serious warning.

[0139] Output results: The output includes the predicted PM2.5 concentration for the next 72 hours for 9 stations, the 95% confidence interval, the heavy pollution warning signal, and the warning lead time.

[0140] Example 2: Multi-city migration adaptation (Shijiazhuang site)

[0141] A method for predicting PM2.5 concentration at multiple sites in Shijiazhuang over 72 hours based on spatiotemporal fusion deep learning includes the following steps:

[0142] The method is basically the same as Example 1, except that the parameters are adjusted to suit the PM2.5 transmission characteristics of northern cities:

[0143] Step S1: Multi-source data acquisition and preprocessing

[0144] When generating the dynamic graph, a seasonal factor is introduced. In winter (November-February), the wind speed threshold factor is adjusted to 1.5 km / h to enhance the spatial correlation strength of PM2.5 under low temperature conditions and adapt to the characteristics of easy accumulation of PM2.5 in northern winters. The rest is the same as in Example 1.

[0145] Step S2, Temporal Feature Modeling Based on Transformer

[0146] Same as Example 1;

[0147] Step S3, Spatial modeling based on dynamic wind field diagram neural network

[0148] When transmitting spatial messages, the weight of pollution source distribution is increased, and higher spatial aggregation weight is given to sites near industrial areas to adapt to the distribution characteristics of PM2.5 pollution sources in northern industrial cities. The rest is the same as in Example 1.

[0149] Step S4: Spatiotemporal fusion and multi-step PM2.5 concentration prediction

[0150] Same as Example 1;

[0151] Step S5: Model training based on weighted loss and warm-up strategy

[0152] The PM2.5 heavy pollution threshold of the weighted loss function was adjusted to 115 μg / m³ (corresponding to the PM2.5 heavy pollution standard in northern cities), and the weighting factor was increased to 2.5. The rest is the same as in Example 1.

[0153] Step S6: Multi-dimensional assessment and PM2.5 pollution early warning output

[0154] Similar to Example 1, PM2.5 concentration prediction and early warning for the Shijiazhuang station was achieved over 72 hours.

[0155] Example 3: Lightweight prediction for a small number of monitoring stations (single station in Haikou). This example demonstrates a lightweight deployment for scenarios with a small number of monitoring stations (only one).

[0156] A method for predicting PM2.5 concentration at a single site in Haikou over 72 hours based on spatiotemporal fusion deep learning includes the following steps:

[0157] Step S1: Multi-source data acquisition and preprocessing

[0158] Same as Example 1;

[0159] Step S2, Temporal Feature Modeling Based on Transformer

[0160] Same as Example 1;

[0161] Step S3, Spatial modeling based on dynamic wind field diagram neural network

[0162] Skipping the neural network spatial modeling module of the multi-dynamic wind field map, the temporal feature representation H(tem) is directly used as the fusion feature, and the rest is the same as in Example 1, which is adapted to the scenario of a single site without spatial correlation data.

[0163] Step S4: Spatiotemporal fusion and multi-step PM2.5 concentration prediction

[0164] The prediction head is simplified to a two-layer fully connected network (32-dimensional → 32-dimensional → 48-dimensional), and the prediction step size for PM2.5 concentration is adjusted to 48 hours. The rest is the same as in Example 1; this is adapted to the characteristics of small fluctuations in PM2.5 concentration in island cities.

[0165] Step S5: Model training based on weighted loss and warm-up strategy

[0166] The batch size was adjusted to 16, the training cycles were reduced to 15, the warm-up cycles were adjusted to 2, and the rest were the same as in Example 1; thus improving the model training efficiency.

[0167] Step S6: Multi-dimensional assessment and PM2.5 pollution early warning output

[0168] Similar to Example 1, a 48-hour prediction of PM2.5 concentration at a single site in Haikou was achieved.

[0169] Experiment 1: Ablation experiment to verify the effectiveness of the core module

[0170] Ablation experiments were conducted using the dataset and hyperparameter settings from Example 1:

[0171] Removing the dynamic wind field map neural network module (retaining only Transformer time-series modeling): the recall rate of PM2.5 heavy pollution events decreased to 28.3%, and the lag bias increased to 3.2 hours, demonstrating the role of dynamic spatial modeling in improving the capture and time response performance of PM2.5 heavy pollution events.

[0172] Removing the weighted loss function (using the standard MAE loss): PM2.5 pollution event recall decreased to 26.7%, and the Critical Success Index (CSI) decreased to 0.172, confirming the strengthening effect of the weighted loss on the prediction of PM2.5 extreme concentration events.

[0173] Removing the learning rate warm-up strategy (directly using the baseline learning rate): Gradient oscillations occurred during the training process, and the MAE of PM2.5 concentration prediction on the validation set increased by 12.3%, demonstrating the importance of the warm-up strategy in ensuring training stability.

[0174] Experiment 2: Comparative Experiment and Performance Benchmark

[0175] On the dataset of Example 1, the present invention was compared with the mainstream PM2.5 concentration prediction model, and the results are shown in Table 1 (PM2.5 concentration 72-hour prediction performance).

[0176]

[0177] Conclusion: This invention slightly outperforms existing models in overall PM2.5 concentration prediction accuracy (R²=0.76, MAE=9.15μg / m³), and demonstrates outstanding performance in capturing heavy PM2.5 pollution events (Recall=37.1%, CSI=0.207) and time response performance (Lag Bias=2.15 hours). The Recall is 36% higher than that of LSTM, and the Lag Bias is 0.92 hours shorter than that of LSTM, fully demonstrating the technical advantages of this invention and enabling it to more accurately support PM2.5 pollution control decisions.

[0178] The above are merely preferred embodiments of the present invention and do not impose any limitations on the present invention. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the technical solution of the present invention shall still fall within the scope of the technical solution of the present invention.

Claims

1. A PM2.5 concentration prediction method based on spatiotemporal fusion deep learning, characterized in that, Includes the following steps: Step S1, Multi-source data acquisition and preprocessing: Collect multi-dimensional time-series data and spatial geographic data from multiple atmospheric monitoring stations, perform preprocessing operations on the data, and construct a spatiotemporal input matrix and a dynamic spatial correlation matrix; Step S2, Temporal feature modeling based on Transformer: The temporal dimension features of PM2.5 concentration are extracted using the temporal projection and spatiotemporal coding module, and long-term temporal dependencies are captured by the Transformer encoder to obtain the temporal feature representation of each station; Step S3, Spatial modeling based on dynamic wind field graph neural network: Based on wind speed and wind direction data, construct dynamic weight adjustment factors to form a dynamically adjusted spatial adjacency matrix. Input the temporal feature representation obtained in step S2 as node features into the dynamic graph neural network. Realize the interaction of PM2.5 related features between stations through message passing to obtain spatial feature representation. Step S4, Spatiotemporal Fusion and Multi-Step PM2.5 Concentration Prediction: The temporal feature representation obtained in Step S2 and the spatial feature representation obtained in Step S3 are deeply fused, and the prediction results of future multi-step PM2.5 concentration are output through the prediction head; Step S5, Model Training: Construct a weighted loss function and use a learning rate warm-up strategy and gradient clipping mechanism to train the model. The weighted loss function uses the mean absolute error as the base loss and assigns higher weights to samples with PM2.5 concentrations exceeding the preset warning threshold. Step S6, Multi-dimensional assessment and PM2.5 pollution early warning output: Using regression and classification dual-dimensional assessment indicators, heavy pollution event early warning information is generated and output based on PM2.5 concentration prediction results.

2. The PM2.5 concentration prediction method based on spatiotemporal fusion deep learning according to claim 1, characterized in that, Step S1, the multi-source data acquisition and preprocessing method, includes: Data collection: The core forecast indicator is PM2.5 concentration; auxiliary features include PM10, SO2, and NO2 pollutant indicators, as well as meteorological data such as temperature, relative humidity, wind direction, wind speed, precipitation, and air pressure; station spatial information includes latitude, longitude, and altitude. Data preprocessing: Missing values ​​were filled using a combination of grouped forward imputation and linear interpolation; outliers in PM2.5 concentration were detected and replaced using the 3σ rule; numerical features were standardized based on training set statistics; sine-cosine decomposition was performed on wind direction data; and time-period encoded features were constructed. Spatiotemporal matrix construction: Data is reorganized according to the station-time dimension to form a spatiotemporal input matrix; an initial spatial relationship matrix is ​​constructed based on the horizontal distance and altitude difference between stations, and a static spatial correlation matrix is ​​obtained by normalization through a Gaussian kernel function.

3. The PM2.5 concentration prediction method based on spatiotemporal fusion deep learning according to claim 1, characterized in that, Step S2, the Transformer-based temporal feature modeling method, includes: Temporal feature projection: The original temporal features are mapped to a high-dimensional feature space through a two-layer fully connected network, and the nonlinear expressive power of the features is enhanced by layer normalization and GELU activation function; Spatiotemporal coding: A temporal location coding matrix is ​​generated using a sine-cosine function; the spatial location encoder maps the spatial features of the site to spatial embeddings, which are then superimposed with the temporal features to achieve initial spatiotemporal fusion. Long-term temporal dependency modeling: The input sequence, which integrates the initial spatiotemporal features, is fed into the Transformer encoder. The dependencies at different time steps are captured through a multi-layer multi-head self-attention mechanism, and the temporal feature representation of each station is output.

4. The PM2.5 concentration prediction method based on spatiotemporal fusion deep learning according to claim 1, characterized in that, Step S3, the spatial modeling method based on dynamic wind field map neural network, includes: Dynamic graph generation: Based on wind speed and direction data, a dynamic weight adjustment factor is constructed, and the connection weight of adjacent stations is enhanced when the wind speed is greater than 2.0 km / h; the direction factor is calculated by the consistency of wind direction between stations, and higher connection weight is given to stations in the downwind direction, forming a dynamically adjusted spatial adjacency matrix. Spatial message passing: Temporal feature representation is input into a dynamic graph neural network as node feature. The PM2.5 related features of adjacent stations are aggregated through graph convolution operation, and intermediate spatial features are obtained by combining the features of the station itself. Spatial correlation weight parameters are introduced to adaptively adjust the contribution of different stations to the PM2.5 concentration. Spatial feature optimization: The aggregated spatial features are nonlinearly transformed by a fully connected layer, and then processed by layer normalization and Dropout regularization to output the spatial feature representation.

5. The PM2.5 concentration prediction method based on spatiotemporal fusion deep learning according to claim 1, characterized in that, Step S4, the spatiotemporal fusion and multi-step PM2.5 concentration prediction method, includes: Feature fusion: Temporal and spatial features are fused by splicing. The spliced ​​high-dimensional features are mapped to a unified feature space through a fusion projection layer, and the feature interaction capability is enhanced by an activation function. Multi-step prediction structure: Construct a prediction head based on a fully connected layer, and directly output the PM2.5 concentration prediction sequence with a preset step size after inputting fused features; Residual correction: The PM2.5 lag characteristic is introduced as a benchmark value, and the prediction results are superimposed with the benchmark value to achieve residual correction.

6. The PM2.5 concentration prediction method based on spatiotemporal fusion deep learning according to claim 1, characterized in that, In step S5, during model training: the weighted loss function assigns a weight factor of 2.0 to 3.0 to samples with PM2.5 concentrations exceeding 75 μg / m³; The learning rate scheduling adopts a linear warm-up strategy for the first 3 training cycles, gradually increasing the learning rate from 0 to the baseline learning rate, and then maintaining a constant learning rate during training; the optimizer uses AdamW combined with weight decay. The stable training mechanism uses a gradient accumulation step count of 2, a gradient clipping maximum norm of 1.0, and an early stopping mechanism patience value of 10.

7. The PM2.5 concentration prediction method based on spatiotemporal fusion deep learning according to claim 1, characterized in that, Step S6, the multi-dimensional assessment and PM2.5 pollution early warning output method, includes: Multi-dimensional evaluation: R², mean absolute error, root mean square error, and mean absolute percentage error are used as regression indicators to evaluate the overall prediction accuracy; recall, precision, F1 score, and critical success index are used as classification indicators to evaluate the ability to capture heavy pollution events; peak lead and lag bias are used as time series indicators to evaluate the time response performance of peak prediction. Pollution early warning generation: Heavy pollution event early warning signals are generated based on the comparison between predicted PM2.5 concentration and early warning threshold, and the early warning level is determined by combining the peak advance. Output results: The output includes the predicted PM2.5 concentration for each future step, the 95% confidence interval, the warning signal for heavy pollution events, and the warning lead time.

8. A PM2.5 concentration prediction method based on spatiotemporal fusion deep learning according to any one of claims 1 to 7, characterized in that: The warning levels are divided according to the lead time to the peak: ≥2 hours in advance is a general warning, 1 to 2 hours in advance is a relatively severe warning, and less than 1 hour in advance is a serious warning.

9. A PM2.5 concentration prediction method based on spatiotemporal fusion deep learning according to any one of claims 1 to 7, characterized in that: The preset step size is configured as 24 hours, 48 ​​hours, or 72 hours.

10. The PM2.5 concentration prediction method based on spatiotemporal fusion deep learning according to claim 1, characterized in that: For a single monitoring station scenario, skip the dynamic wind field diagram neural network spatial modeling module in step S3, and directly use the temporal feature representation obtained in step S2 as the fusion feature in step S4 for subsequent processing.