A PM2.5 Prediction System and Method Based on Dynamic Weighting and Anomaly Correction
The PM2.5 prediction model with dynamic weighting and anomaly correction solves the problems of incomplete spatiotemporal correlation modeling and improper handling of outliers in existing models, achieving more accurate PM2.5 prediction and characterization of multi-dimensional pollution transmission paths, and improving the model's adaptability and interpretability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 湖南省气象信息中心
- Filing Date
- 2026-03-31
- Publication Date
- 2026-06-30
AI Technical Summary
Existing PM2.5 prediction models rely too heavily on a single Euclidean distance to construct a spatiotemporal correlation map, ignoring the dynamic correlation between meteorological conditions and precursor pollutants. This results in insufficient accuracy in spatial feature extraction, a lack of adaptive outlier handling mechanisms, strong noise sensitivity, and poor dynamic adaptability, making it difficult to meet the needs of refined air pollution prevention and control.
A PM2.5 prediction model with dynamic weighting and anomaly correction is adopted. A dynamic weighted adjacency matrix is constructed by integrating dynamic Euclidean distance between cities, meteorological parameters and the correlation of precursor pollutants. An isolated forest algorithm is used for outlier adaptive correction to form a closed-loop feedback mechanism and optimize the quality of spatiotemporal map.
It improves the spatial modeling accuracy and robustness of PM2.5 prediction, can adapt to multi-dimensional meteorological driving effects and pollution transmission paths, enhances the model's anti-interference ability and real-time adaptability, and provides multi-dimensional decision-making basis.
Smart Images

Figure CN122310049A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of interdisciplinary technology of air pollution prevention and control and intelligent environmental monitoring, and in particular to a PM2.5 prediction system and method based on dynamic weighting and anomaly correction. Background Technology
[0002] With rapid urbanization and increased industrial emissions, fine particulate matter (PM2.5) pollution has become a significant threat to public health and environmental safety. Accurate prediction of PM2.5 concentrations is a core prerequisite for developing air pollution prevention and control strategies and optimizing emergency response measures.
[0003] Currently, hybrid models based on graph neural networks (GNN) and long short-term memory networks (LSTM) (such as the GLPM model) are the mainstream spatiotemporal prediction methods for PM2.5 ("Spatiotemporal prediction" refers to a prediction method that considers both dynamic changes over time and spatial relationships, aiming to achieve accurate prediction of target phenomena by analyzing the evolution of data in both time and space dimensions). However, it has the following two shortcomings.
[0004] I. Incomplete Spatiotemporal Correlation Modeling: Existing models (such as the GLPM model) rely excessively on the single factor of Euclidean distance between cities when constructing spatiotemporal correlation maps, neglecting the influence of dynamic factors such as meteorological conditions and pollutant diffusion patterns. This makes it difficult for the model to accurately depict the actual diffusion patterns of PM2.5, resulting in insufficient accuracy in spatial feature extraction and systematic biases in the prediction results.
[0005] 1. Lack of meteorological dynamics: The synergistic effect of real-time meteorological parameters such as wind speed, wind direction, and air pressure on PM2.5 diffusion is not considered (for example, the intensity of cross-city transport of pollutants is significantly enhanced under downwind conditions).
[0006] 2. Neglecting pollution correlation: The correlation characteristics of precursor pollutants (such as NO2 and SO2) were not included. Precursor pollutants are important chemical precursors to PM2.5 formation, and their concentration changes directly affect the formation rate and scale of PM2.5, specifically in the following two aspects: a. Atmospheric chemical mechanisms: The driving role of NO2: NO2 from vehicle exhaust and industrial emissions reacts with hydroxyl radicals in the atmosphere to produce nitric acid, which then combines with ammonia to form ammonium nitrate particles. This process accounts for 30%-40% of secondary PM2.5 formation. The conversion pathway of SO2: SO2 from coal combustion and industrial emissions is oxidized to sulfuric acid, which combines with ammonia or metal ions in the atmosphere to form sulfate particles. This process accounts for 20%-30% of secondary PM2.5 formation. Synergistic effects: The synergistic oxidation of NO2 and SO2 accelerates the formation rate of PM2.5, especially under stable weather conditions where the chemical reactions are more intense. If the model does not incorporate the concentration correlation characteristics of NO2 and SO2, it is equivalent to ignoring key chemical driving factors, making it unable to accurately simulate the secondary formation process of PM2.5. In pollution transport and stable weather scenarios, the prediction error is significantly amplified. b. Spatial correlation of pollution transmission: The intercity transport of precursor pollutants directly affects the PM2.5 concentration in recipient cities. For example, SO2 emitted by a thermal power plant in upstream city A is transported to downstream city B under the influence of southeasterly winds. It reacts chemically with NO2 emitted from local traffic sources in downstream city B, causing a sharp increase in the PM2.5 concentration in downstream city B. If the model does not include the correlation between NO2 and SO2 concentrations between cities, it will be unable to capture this regional pollution transmission pattern, leading to predictions that deviate from reality.
[0007] 3. Static weighting defects: Using a fixed-weight adjacency matrix, the weights cannot be adjusted according to dynamic factors such as meteorological conditions and pollutant concentrations, resulting in inaccurate spatial correlation and an inability to adapt to the spatiotemporal heterogeneity of PM2.5 diffusion (such as seasonal changes and abrupt changes in diffusion patterns caused by extreme weather events).
[0008] 2. Difficulty in effectively handling outliers: Existing models lack effective mechanisms for handling outliers in monitoring data, resulting in problems such as high noise sensitivity, significant global impact, and poor dynamic adaptability. This severely weakens the model's robustness, especially during sudden pollution outbreaks or drastic changes in meteorological conditions, leading to a significant increase in prediction errors.
[0009] 1. High sensitivity to noise: Anomalies caused by sensor failures, data transmission errors, extreme weather events (such as sandstorms) can directly contaminate the spatiotemporal graph node features and edge weights, interfering with the spatial feature extraction capabilities of GCN.
[0010] 2. Significant global impact: Traditional outlier handling methods usually employ simple removal or fixed threshold correction of outliers. However, these methods are prone to data distortion (such as missing important pollution events) or insufficient correction (such as failing to distinguish the degree of anomaly), thereby compromising the integrity and temporal consistency of the spatiotemporal map and ultimately reducing the modeling accuracy of the LSTM model for the temporal evolution of PM2.5 concentration. 3. Lack of dynamic adaptability: Existing models (such as the GLPM model) handle outliers independently from the spatiotemporal graph construction process, failing to form a dynamic closed-loop feedback mechanism. This leads to a gradual deterioration in the quality of the spatiotemporal graph as outliers accumulate. This is specifically reflected in the following three aspects: a. Disconnect between outlier handling and spatiotemporal graph construction: Outlier detection and correction are only performed once during the data preprocessing stage (such as simple removal or fixed threshold correction), and subsequent spatiotemporal graph construction relies entirely on the preprocessed static data. Example problem: If sensors in a city frequently falsely report pollution peaks during the rainy season, traditional methods only correct the first outlier; subsequent similar outliers will still be input into the graph construction module, leading to persistent errors in the adjacency matrix weights. b. Gradual deterioration of spatiotemporal map quality: Uncorrected outliers propagate through the spatiotemporal map and amplify errors. These errors accumulate exponentially over time, eventually causing the spatiotemporal map to completely deviate from the true pollution distribution pattern. At the node level, abnormal PM2.5 concentration values distort node features, misleading the Graph Neural Network (GCN) to extract incorrect spatial correlation features (such as misjudging the direction of pollution transmission). At the edge level, outliers distort the weights of pollution correlations between cities (such as overestimating the intensity of intercity transmission under stable weather conditions), destroying the physical meaning of the spatiotemporal map.
[0011] c. Model Failure in Dynamic Scenarios: In scenarios involving sudden weather changes (such as abrupt wind direction changes) or pollution events (such as sudden factory leaks), outliers occur frequently and are complexly distributed. Traditional methods, lacking dynamic correction capabilities, cannot adapt to the real-time changes in spatiotemporal maps. For example, in scenarios involving sudden wind speed changes, if the wind speed suddenly increases from 2 m / s to 8 m / s, the intensity of cross-city pollutant transport should significantly increase. However, traditional models still use the outlier correction strategy for low wind speed scenarios, leading to lagging prediction results. In pollution peak scenarios, when the number of outliers surges, traditional methods may experience problems such as "insufficient correction" (missing serious outliers) or "overcorrection" (falsely deleting normal data) due to the failure of the fixed threshold correction strategy.
[0012] In summary, existing PM2.5 prediction models suffer from two major drawbacks: incomplete spatiotemporal correlation modeling and difficulty in effectively handling outliers. The former relies excessively on a single distance factor, neglecting dynamic correlations such as meteorological conditions and pollutant diffusion patterns, resulting in insufficient accuracy in spatial feature extraction. The latter exhibits high noise sensitivity and poor dynamic adaptability, weakening the model's robustness. These shortcomings cause the models to perform poorly in scenarios such as pollution transport simulation and static weather forecasting, making it difficult to meet the practical needs of refined air pollution prevention and control. Summary of the Invention
[0013] The purpose of this invention is to overcome the shortcomings of the prior art and provide a PM2.5 prediction system and method based on dynamic weighting and anomaly correction. It solves the problems in the prior art where PM2.5 prediction models rely too much on a single Euclidean distance to construct a spatiotemporal correlation map, ignore the dynamic correlation between meteorological and precursor pollutants, resulting in incomplete spatial modeling, and lack an adaptive anomaly correction mechanism, leading to noise sensitivity, significant global impact, and poor dynamic adaptability.
[0014] The technical solution of this invention is: a PM2.5 prediction model based on dynamic weighting and anomaly correction, comprising a data preprocessing module, an adjacency matrix construction module, a spatiotemporal graph construction module, a spatial feature extraction module, a spatiotemporal feature fusion module, and an outlier adaptive correction module, which are connected in a data flow from front to back; the outlier adaptive correction module and the spatiotemporal graph construction module are connected in a data flow, thereby forming a closed-loop data flow connection path of "spatiotemporal graph construction module - multimodal spatiotemporal feature fusion module - outlier adaptive correction module - spatiotemporal graph construction module"; The data preprocessing module performs data cleaning and normalization on the raw data; The adjacency matrix construction module integrates dynamic Euclidean distance between cities, meteorological parameters, and correlation of precursor pollutants to calculate the dynamic weighted adjacency matrix between cities; The spatiotemporal graph construction module is used to construct a node feature matrix and combine the node feature matrix with a dynamic weighted adjacency matrix to construct a spatiotemporal graph with cities as nodes and the dynamic weighted adjacency matrix as the diffusion relationship. The spatial feature extraction module aggregates neighbor node information through graph convolution operations to extract the spatial association feature matrix between cities; The spatiotemporal feature fusion module performs multimodal joint modeling of the spatial correlation feature matrix between cities and PM2.5 concentration time series data, and finally outputs spatiotemporal fusion features to simultaneously characterize the spatial diffusion role and temporal dynamics of pollution. The outlier adaptive correction module calculates node scores using the isolated forest algorithm, and identifies outlier nodes by comparing them with an adaptive threshold. It then categorizes outlier nodes based on their degree of abnormality and adopts differentiated correction strategies. The corrected data is re-input into the spatiotemporal graph construction module, and the quality of the spatiotemporal graph is optimized through closed-loop feedback.
[0015] A further technical solution of the present invention is as follows: the adjacency matrix construction module includes a dynamic distance weighting submodule, a meteorological parameter weighting submodule, a precursor pollutant weighting submodule, and a multi-factor fusion submodule; the dynamic distance weighting submodule dynamically adjusts the dynamic Euclidean distance between cities based on the correlation of precursor pollutants and meteorological conditions, and then realizes the dynamic distance normalization weight of cities through the change of dynamic Euclidean distance; the meteorological parameter weighting submodule calculates the meteorological parameter normalization weight based on three parameters: wind speed, wind direction, and air pressure; the precursor pollutant weighting submodule calculates the precursor pollutant correlation normalization weight based on the Pearson correlation coefficient of NO2 and SO2 concentrations; the multi-factor fusion submodule dynamically fuses the dynamic distance normalization weight of cities, the meteorological parameter normalization weight, and the precursor pollutant correlation normalization weight through three trainable coefficients to generate a dynamic weighted adjacency matrix.
[0016] A further technical solution of the present invention is as follows: the outlier adaptive correction module includes an anomaly detection submodule, an anomaly classification submodule, an anomaly correction submodule, and a closed-loop feedback submodule; the anomaly detection submodule receives the node feature matrix, calculates the score of each node, and determines the anomaly node based on the comparison between the adaptive threshold and the score; the anomaly classification submodule classifies the anomaly node into "minor anomaly" and "serious anomaly" according to the degree of anomaly; the anomaly correction submodule adjusts only the edge weights between the node and its surrounding nodes for minor anomalies, and disconnects the node connection and corrects the features for serious anomalies; the closed-loop feedback submodule is used to re-input the corrected data into the spatiotemporal graph construction module to form a closed-loop feedback mechanism of "detection-correction-re-detection".
[0017] The technical solution of this invention is: a PM2.5 prediction method based on dynamic weighting and anomaly correction. Based on the above-mentioned PM2.5 prediction model based on dynamic weighting and anomaly correction, the steps are as follows: S01. Data Input and Preprocessing: This step involves cleaning and normalizing various types of raw data for the region to be predicted. This step is based on the "Data Preprocessing Module". S02. Constructing a dynamic weighted adjacency matrix: Integrating three core factors—dynamic Euclidean distance between cities, meteorological parameters, and correlation of precursor pollutants—the factors are first normalized to convert them into weights of a uniform scale. Then, the three factors are fused using trainable coefficients to construct a dynamic weighted adjacency matrix. This step is based on the "adjacency matrix construction module". S03. Spatiotemporal Graph Construction and Spatial Feature Extraction: Constructing the Node Feature Matrix Based on node feature matrix With dynamic weighted adjacency matrix By combining these methods, a spatiotemporal graph is constructed. This graph is then input into a graph neural network to extract spatial features, and the output is a feature matrix of spatial relationships between cities. This step is implemented sequentially through the "Spatiotemporal Graph Construction Module" and the "Spatial Feature Extraction Module".
[0018] S04. Multimodal Spatiotemporal Feature Fusion: This method involves multimodal joint modeling of the inter-city spatial correlation feature matrix and PM2.5 concentration time series data. First, the sampling frequencies of the inter-city spatial correlation feature matrix and the PM2.5 concentration time series data are unified. Then, an LSTM network is used to capture the temporal evolution of PM2.5 concentration. Finally, the inter-city spatial correlation feature matrix is concatenated with the captured temporal features to output the spatiotemporal fusion feature. The operations in this step are implemented based on the "multimodal spatiotemporal feature fusion module". S05. Adaptive Outlier Correction: Node scores are calculated using the Isolation Forest algorithm, and outlier nodes are identified by comparing adaptive thresholds with the scores. Outlier nodes are classified according to their degree of abnormality, and differentiated correction strategies are adopted. The corrected data is re-input into the spatiotemporal graph construction module to form a closed-loop feedback mechanism of "detection-correction-re-detection". This step is based on the "Adaptive Outlier Correction Module".
[0019] A further technical solution of the present invention is that step S02 specifically includes the following sub-steps: A. Calculate the normalized weights of dynamic Euclidean distances between cities based on Formula 1. ; Formula 1: in, These represent the historical maximum and minimum values of the dynamic Euclidean distance for all cities. For time steps, Represents city The dynamic Euclidean distance between them; Represents city The original Euclidean distance between them For dynamic adjustment coefficients; As a meteorological condition adjustment factor, For precursor pollutant-related adjustment factors; These are the wind speed weighting coefficient, wind direction weighting coefficient, and air pressure weighting coefficient, respectively. For the city Real-time wind speed between For the city The azimuth of the connecting line, For the city Real-time wind direction; For the city The real-time air pressure difference between them The reference air pressure difference (can be taken as 0 hPa, representing the ideal state where the air pressures of the two cities are equal); for Weighting coefficients for Weighting coefficients For the city between Pearson correlation coefficient of concentration For the city between Pearson correlation coefficient of concentration; B. Calculate the normalized weights of meteorological parameters based on Formula 2. ; Formula 2: in, For the city Real-time wind speed between These are the historical minimum and maximum wind speeds, respectively. These are the historical minimum and maximum values for wind direction, respectively. These are the historical minimum and maximum values of air pressure, respectively. Cities Normalized values of real-time wind speed, real-time wind direction, and real-time air pressure difference. These are the weighting coefficients for wind speed, wind direction, and air pressure, respectively. C. Calculate the normalized weights of precursor pollutant associations using Formula 3. ; Formula 3: in, This is the notation for the Sigmoid function; D. Through trainable coefficients The three types of weights are dynamically fused to generate a dynamic weighted adjacency matrix as shown in Formula 4; Formula 4: in, All are training coefficients. And it satisfies the normalization constraint: ;in, Controlling the normalized weights of dynamic Euclidean distances between cities The fusion strength; Control meteorological parameter normalization weights The fusion strength; Control of precursor pollutant correlation normalization weights The fusion strength; For the city The final adjacency weight between them.
[0020] A further technical solution of the present invention is that step S03 specifically includes the following sub-steps: A. Spatiotemporal graph construction: The multi-source data normalized in step S01 is integrated into a node feature matrix according to city and feature dimensions. The dynamic weighted adjacency matrix calculated in step S02 is combined with Construct a dynamically weighted adjacency matrix with cities as nodes. A dynamically weighted spacetime graph with edge weights; B. Spatial Feature Extraction: The dynamically weighted spatiotemporal graph is input into a graph neural network. Neighboring nodes are aggregated through graph convolution operations, and the spatial correlation feature matrix between cities is output. ; Dimensions , As a hidden layer dimension, the feature vector of each node represents the city's "diffusion role" in global spatial association. The "diffusion role" refers to the city's functional positioning in the spatial diffusion of PM2.5, including three categories: "pollution hotspot", "transmission channel" and "recipient city".
[0021] A further technical solution of the present invention is: step S04 specifically includes the following sub-steps: A. Time series alignment: aligning the spatial correlation feature matrix between cities PM2.5 concentration time series data Aligned by time steps, forming a spatiotemporal joint input tensor. ; B. Temporal Feature Extraction: The spatiotemporal joint input tensor is input into an LSTM network to capture the temporal evolution of PM2.5 concentration and output the hidden state sequence. ; C. Spatiotemporal Feature Fusion: The spatial correlation feature matrix between cities and the hidden state sequence are concatenated along the channel dimension, and the spatiotemporal fusion feature is output through a fully connected layer. Its expression is shown in Formula 5; Formula 5: Where ReLU is the activation function. Here, represents the bias vector of the fully connected layer; Concat is the concatenation operation. This is the weight matrix for the fully connected layer.
[0022] A further technical solution of the present invention is: step S05 specifically includes the following steps: A. Anomaly detection: Analyzing the node feature matrix In the input anomaly detection module, the score for each node is calculated using the Isolation Forest algorithm. Identify outliers in PM2.5 concentrations or meteorological parameters; based on adaptive thresholds. ,determination The nodes that are abnormal nodes are output as the set of abnormal nodes: Adaptive threshold The settings are as shown in Formula 6; Formula 6: in, For adaptive threshold, This is a normal set of nodes, i.e., after passing through the Isolation Forest algorithm, the score is... The set of nodes, This is the median score for normal individuals. The interquartile range for the score of normal nodes.
[0023] B. Anomaly Classification: Anomaly nodes are classified into two categories according to the degree of anomaly: minor anomalies and severe anomalies, as shown in Formula 7. Formula 7: in, For the threshold increment, Rate the nodes; C. Anomaly Correction: For minor anomalies, only the edge weights between the node and its surrounding nodes are adjusted, as shown in Formula 8; for severe anomalies, node connections are disconnected and features are corrected: first select... Calculate the feature mean from 10 adjacent normal nodes. Combined with LSTM predictions Generate the correction value; the operation is shown in Formula 9. Formula 8: in, These are the edge weights before and after the correction, respectively. The attenuation coefficient; Formula 9: in, To correct the node features, The mean value of the features of neighboring normal nodes. As the confidence level weight, For nodes In time LSTM predictions of PM2.5 concentration For nodes The number of directly connected normal nodes, where N is the number of nodes. The set of directly connected normal nodes. For nodes Directly connected normal nodes In time The normalized eigenvectors; D. Dynamic Update: The corrected node features and edge weights are re-input into the spatiotemporal graph construction module, forming a closed-loop feedback mechanism of "detection-correction-re-detection".
[0024] Compared with the prior art, the present invention has the following advantages: 1. Dynamic weighted adjacency matrix design overcomes the limitations of traditional spatiotemporal correlation modeling: Multi-factor fusion modeling: It constructs a dynamic weighted adjacency matrix by fusing dynamic Euclidean distance between cities, meteorological parameters and the correlation of precursor pollutants, which solves the problem of traditional models relying too much on a single static Euclidean distance; Multidimensional meteorological coupling mechanism: It uses a dynamic weighted coupling mechanism of real-time meteorological parameters to finely model the multidimensional meteorological driving effects of PM2.5 diffusion; Precursor pollutant association feature fusion: It introduces the Pearson correlation coefficient of the concentrations of the two most important precursor pollutants to simulate the secondary chemical reactions of PM2.5 generation and improve the accuracy of pollution transmission path characterization. Dynamic weight fusion mechanism: By dynamically fusing three types of weights through trainable coefficients, the model can automatically learn the importance of spatial proximity, meteorological conditions and pollutant associations in different scenarios.
[0025] 2. Multimodal spatiotemporal feature fusion to achieve collaborative modeling of space and time: Spatial Modalities: Graph neural networks are used to extract high-order spatial correlation features between cities. Neighbor node information is aggregated through graph convolution to capture the topological features of PM2.5 diffusion (such as cross-city transmission paths and pollution hotspot aggregation patterns), thus representing the "spatial diffusion role" of cities in the regional pollution network. Temporal modality: An LSTM network is used to model the temporal evolution of PM2.5 concentration. The dynamic characteristics of pollution events (such as daily periodic fluctuations, pollution peak duration, and abnormal impulse response) are captured through long short-term memory units to characterize the temporal dynamics of pollution. Multimodal co-modeling: This approach deeply integrates the static correlation features of spatial modalities with the dynamic evolution features of temporal modalities through channel-dimensional splicing and fusion with fully connected layers. Achievements include: Ⅰ. Enhanced complementarity: Spatial modalities provide a "geographical blueprint" for pollution propagation, while temporal modalities supplement the "temporal script" of pollution events. Together, they reveal the spatiotemporal coupling patterns of PM2.5 concentrations; for example, cross-city transport is dominated by sea-land breezes in summer, while local accumulation is dominant during stable winter weather. Ⅱ. Improved anti-interference capability: The temporal filtering characteristics of LSTM suppress spatial noise (such as instantaneous sensor anomalies), and the spatial constraints of graph neural networks prevent overfitting of time series (such as misjudging seasonal fluctuations as trends). Ⅲ. Enhanced physical mechanism aging: The fused features simultaneously characterize both "spatial diffusion roles" (e.g., city A is a pollution hotspot) and "time-sensitive features" (e.g., increased emissions during morning and evening rush hours), providing multi-dimensional decision-making support for pollution source tracing and emergency management.
[0026] 3. Adaptive outlier correction enhances model robustness: Dynamic anomaly detection: Node scores are calculated based on the isolated forest algorithm, and anomaly nodes are identified in real time by combining adaptive thresholds, avoiding misjudging normal fluctuations by fixed thresholds; Differential correction strategy: For minor anomalies, noise propagation is suppressed by attenuating edge weights, and weak correlations are preserved to maintain the integrity of the spatiotemporal graph. For severe anomalies, node connections are disconnected and features are corrected. The LSTM prediction value is combined with the mean of neighboring nodes to balance temporal continuity and spatial consistency.
[0027] Closed-loop optimization mechanism: The corrected data is re-input into the spatiotemporal graph construction module to form a closed-loop feedback of "detection-correction-re-detection" to avoid the accumulation of outliers that lead to the deterioration of spatiotemporal graph quality.
[0028] 4. Explicitizing physical meaning improves model interpretability: Diffusion Role Visualization: The spatial correlation feature matrix directly outputs the functional positioning of cities in the pollution network, providing an intuitive basis for spatial governance; Chemically driven correlation quantification: explicit simulation of precursor pollutants through correlation weighting of precursor pollutants ( The synergistic oxidation effect of ( ) enhances the model's ability to explain the mechanism of pollution formation; Meteorological impacts can be traced: The weighting terms of wind speed, wind direction, and air pressure in the dynamic adjustment coefficient can be analyzed separately, making it easy to trace the contribution of meteorological conditions to the forecast results; Multi-scenario adaptation: through hyperparameters (such as...) Dynamically adjust the intensity of anomaly correction to adapt to complex scenarios such as pollution events and sudden weather changes; Real-time performance guarantee: The closed-loop feedback mechanism supports online updates and is suitable for real-time PM2.5 forecasting and emergency management at the urban agglomeration scale.
[0029] The present invention will be further described below with reference to the figures and embodiments. Attached Figure Description
[0030] Figure 1 This is a structural diagram of the model of the present invention; Figure 2 This is a flowchart of the method of the present invention. Detailed Implementation
[0031] Example 1:
[0032] The PM2.5 prediction model based on dynamic weighting and anomaly correction includes, from front to back, a data preprocessing module, an adjacency matrix construction module, a spatiotemporal graph construction module, a spatial feature extraction module, a spatiotemporal feature fusion module, and an outlier adaptive correction module. The outlier adaptive correction module and the spatiotemporal graph construction module are connected by data flow, thus forming a closed-loop data flow connection path of "spatiotemporal graph construction module - multimodal spatiotemporal feature fusion module - outlier adaptive correction module - spatiotemporal graph construction module". The data preprocessing module cleans and normalizes the raw data to provide input data in a unified format for subsequent models. The adjacency matrix construction module integrates dynamic distances between cities, meteorological parameters, and correlations of precursor pollutants to calculate a dynamic weighted adjacency matrix between cities, characterizing the spatiotemporal correlation strength of PM2.5 diffusion; The spatiotemporal graph construction module combines the dynamic weighted adjacency matrix with the node feature matrix to construct a spatiotemporal graph with cities as nodes and the dynamic weighted adjacency matrix as the diffusion relationship. The spatial feature extraction module aggregates neighbor node information through graph convolution operations to extract the spatial association feature matrix between cities; The spatiotemporal feature fusion module performs multimodal joint modeling of the spatial correlation feature matrix between cities and PM2.5 concentration time series data, and finally outputs spatiotemporal fusion features to simultaneously characterize the spatial diffusion role and temporal dynamics of pollution. The outlier adaptive correction module calculates node scores using the isolated forest algorithm, and identifies outlier nodes by comparing them with an adaptive threshold. It then categorizes outlier nodes based on their degree of abnormality and adopts differentiated correction strategies. The corrected data is re-input into the spatiotemporal graph construction module, and the quality of the spatiotemporal graph is optimized through closed-loop feedback.
[0033] A further technical solution of the present invention is as follows: the data preprocessing module includes a dynamic distance weighting submodule, a meteorological parameter weighting submodule, a precursor pollutant weighting submodule, and a multi-factor fusion submodule; the dynamic distance weighting submodule dynamically adjusts the dynamic Euclidean distance between cities based on the correlation of precursor pollutants and meteorological conditions, and then realizes the dynamic distance normalization weight of cities through the change of dynamic Euclidean distance; the meteorological parameter weighting submodule calculates the meteorological parameter normalization weight based on three parameters: wind speed, wind direction, and air pressure; the precursor pollutant weighting submodule calculates the precursor pollutant correlation normalization weight based on the Pearson correlation coefficient of NO2 and SO2 concentrations; the multi-factor fusion submodule dynamically fuses the dynamic distance normalization weight of cities, the meteorological parameter normalization weight, and the precursor pollutant correlation normalization weight through three trainable coefficients to generate a dynamic weighted adjacency matrix.
[0034] A further technical solution of the present invention is as follows: the outlier adaptive correction module includes an anomaly detection submodule, an anomaly classification submodule, an anomaly correction submodule, and a closed-loop feedback submodule; the anomaly detection submodule receives the node feature matrix, calculates the score of each node, and determines the anomaly node based on the comparison between the adaptive threshold and the score; the anomaly classification submodule classifies the anomaly node into "minor anomaly" and "serious anomaly" according to the degree of anomaly; the anomaly correction submodule adjusts only the edge weights between the node and its surrounding nodes for minor anomalies, and disconnects the node connection and corrects the features for serious anomalies; the closed-loop feedback submodule is used to re-input the corrected data into the spatiotemporal graph construction module to form a closed-loop feedback mechanism of "detection-correction-re-detection".
[0035] The technical solution of this invention is: a PM2.5 prediction method based on dynamic weighting and anomaly correction, the steps of which are as follows: S01. Data Input and Preprocessing: This step involves cleaning and normalizing various types of raw data from the region to be predicted, providing input data in a unified format for subsequent models. The operations in this step are implemented using the "Data Preprocessing Module".
[0036] The raw data includes: PM2.5 concentration: real-time monitoring values from environmental monitoring stations; intercity distance: calculated based on urban latitude and longitude coordinates; meteorological parameters: real-time data including wind speed, wind direction, and wind pressure; precursor pollutant correlation data: monitoring values of PM2.5 precursor pollutants (NO2 and SO2) concentrations.
[0037] The data cleaning process filters out invalid data and fills in missing data, outputting a complete and logically consistent raw dataset. Filtering out invalid data removes obvious errors (such as negative PM2.5 concentrations), duplicate records, and extreme outliers (such as PM2.5 > 1000 μg / m³). 3 Among these, filling in missing values involves using linear interpolation to fill in data gaps caused by sensor malfunctions or transmission interruptions.
[0038] The normalization process is used to normalize indicators of different dimensions (such as PM2.5 concentration in μg / m³). 3 Wind speed (unit: m / s) is uniformly mapped to the [0,1] interval to eliminate the impact of scale differences on model training.
[0039] S02. Constructing a Dynamically Weighted Adjacency Matrix: Combining the multi-factor synergistic characteristics of PM2.5 diffusion, this step integrates three core factors: dynamic distance between cities, meteorological parameters, and correlation with precursor pollutants. First, normalization is used to convert each factor into weights of a uniform scale. Then, trainable coefficients are used to fuse the three factors to construct a dynamically weighted adjacency matrix. The operations in this step are implemented using the "Adjacency Matrix Construction Module."
[0040] This step specifically includes the following sub-steps: A. Calculate the normalized weights of dynamic Euclidean distances between cities based on Formula 1. ; The higher the value, the stronger the correlation between the dynamic Euclidean distance between cities and PM2.5 diffusion; Formula 1: ; in, These are the historical maximum and minimum values of the dynamic Euclidean distance between all city pairs (any two cities can form a "city pair"). For time steps, Represents city The dynamic Euclidean distance between them (its value is dynamically adjusted through meteorological parameters or precursor pollutant diffusion conditions); Represents city The original Euclidean distance between them This is a dynamic adjustment coefficient (used to quantify the correction of actual Euclidean distances between cities by meteorological conditions and precursor pollutant diffusion). Meteorological condition adjustment factors (used to quantify the inhibitory / enhancing effects of wind speed, wind direction, and air pressure on PM2.5 dispersion, through dynamic adjustment) (This reflects the real-time adjustment of PM2.5 transmission efficiency by meteorological conditions). Precursor pollutant correlation adjustment factors (used to quantify the synchronous changes in precursor pollutant (NO2, SO2) concentrations among different cities, and through dynamic correction) (This enhances the model's ability to depict scenarios with high cross-city transmission potential). These are the wind speed weighting coefficient, wind direction weighting coefficient, and air pressure weighting coefficient, respectively. For the city Real-time wind speed (i.e., PM2.5 from urban areas) to the city (Combined wind speed along the transmission path). For the city The azimuth of the connecting line, For the city Real-time wind direction; For the city The real-time air pressure difference between them The reference air pressure difference (can be taken as 0 hPa, representing the ideal state where the air pressures of the two cities are equal); for Weighting coefficients for Weighting coefficients For the city between Pearson correlation coefficient of concentration (within the range of [-1, 1]). For the city between Pearson correlation coefficient of concentration (within the range of [-1, 1]).
[0041] B. Integrate the three parameters of wind speed, wind direction, and air pressure, and calculate the normalized weights of meteorological parameters based on Formula 2. ; The larger the value, the more significant the combined impact of meteorological conditions between cities on PM2.5 diffusion; Formula 2: in, For the city Real-time wind speeds between cities (i.e., urban wind speeds calculated through spatial interpolation or weighted averaging) (Representative wind speed between) These are the historical minimum and maximum wind speeds, respectively. These are the historical minimum and maximum values of wind direction (which need to be converted to continuous values in [0, 2π) or [0, 360°)). These are the historical minimum and maximum values of air pressure, respectively. Cities Normalized values of real-time wind speed, real-time wind direction, and real-time air pressure difference. These are the weighting coefficients for wind speed, wind direction, and air pressure, respectively.
[0042] C. Based on the Pearson correlation coefficients of NO2 and SO2 concentrations, the normalized weights of precursor pollutant associations were calculated using Formula 3. ; Formula 3: in, This is the notation for the Sigmoid function (the Sigmoid function is a well-known mathematical expression used to convert any real number...). Mapped to the [0,1] interval).
[0043] D. Through trainable coefficients The three types of weights are dynamically fused to generate a dynamic weighted adjacency matrix as shown in Formula 4; Formula 4: in, All are training coefficients. And it satisfies the normalization constraint: ;in, Controlling the normalized weights of dynamic Euclidean distances between cities The intensity of fusion reflects the importance of spatial proximity; Control meteorological parameter normalization weights The intensity of fusion reflects the influence of meteorological conditions; Control of precursor pollutant correlation normalization weights The fusion intensity reflects the impact of the synchronicity of precursor pollutants; For the city The final adjacency weight between them.
[0044] S03. Spatiotemporal Graph Construction and Spatial Feature Extraction: Based on Node Feature Matrix With dynamic weighted adjacency matrix By combining these methods, a spatiotemporal graph is constructed. This graph is then input into a graph neural network to extract spatial features, and the output is a feature matrix of spatial relationships between cities. The operations in this step are implemented sequentially through the "Spatiotemporal Graph Construction Module" and the "Spatial Feature Extraction Module".
[0045] This step specifically includes the following sub-steps: A. Spatiotemporal graph construction: The multi-source data normalized in step S01 is integrated into a node feature matrix according to city and feature dimensions. (This includes normalized values of PM2.5 concentrations, three types of meteorological parameters, and precursor pollutant correlation data for each city, with a dimension of N×F, where N is the number of cities and F is the feature dimension), combined with the dynamic weighted adjacency matrix calculated in step S02. Construct a dynamically weighted adjacency matrix with cities as nodes. A dynamically weighted spatiotemporal graph with edge weights.
[0046] B. Spatial Feature Extraction: The dynamically weighted spatiotemporal graph is input into a graph neural network (GCN) containing multi-layer graph convolutions. Neighboring nodes are aggregated through multi-layer graph convolution operations, and the spatial association feature matrix between cities is output. ; Dimensions , As a hidden layer dimension, the feature vector of each node represents the city's "diffusion role" in global spatial association. The "diffusion role" refers to the city's functional positioning in the spatial diffusion of PM2.5, including three categories: "pollution hotspot", "transmission channel" and "recipient city". "Pollution hotspot" refers to a city with high PM2.5 concentration and significant diffusion impact on surrounding cities. "Transmission channel" refers to a city that becomes an essential path for cross-city transmission of pollutants due to meteorological conditions (such as wind direction and wind speed) or topography. "Recipient city" refers to a city that is significantly affected by pollution from neighboring cities, but has weak diffusion capacity (such as a city located in a basin or under stable weather conditions).
[0047] S04. Multimodal Spatiotemporal Feature Fusion: The inter-city spatial correlation feature matrix (output from step S03) and PM2.5 concentration time series data (data obtained from normalization in step S01) are jointly modeled using multimodal methods. First, the sampling frequencies of the inter-city spatial correlation feature matrix and the PM2.5 concentration time series data are unified. Then, an LSTM network is used to capture the temporal evolution of PM2.5 concentration. Finally, the inter-city spatial correlation feature matrix and the captured temporal features are concatenated to output the spatiotemporal fusion feature. This approach simultaneously characterizes the spatial diffusion role of pollution (e.g., "pollution hotspots," "transmission channels," or "recipient cities") and its temporal dynamics (e.g., "pollution peak periods"), providing a high-dimensional representation for downstream prediction tasks. The operations in this step are implemented based on the "multimodal spatiotemporal feature fusion module."
[0048] This step specifically includes the following sub-steps: A. Time series alignment: Aligning the spatial correlation feature matrix between cities ( ) and PM2.5 concentration time series data ( Aligned by time steps, forming a spatiotemporal joint input tensor. If there are differences in time sampling rates (e.g., meteorological data is 10 min / time, PM2.5 is 20 min / time), linear interpolation or sliding window averaging should be used to align to a uniform time granularity.
[0049] B. Temporal Feature Extraction: The aligned data (spatiotemporal joint input tensor) is input into an LSTM network to capture the temporal evolution of PM2.5 concentration and output the hidden state sequence. ( Dimension Determined experimentally, such as 128 or 256). C. Spatiotemporal Feature Fusion: The spatial correlation feature matrix between cities and the hidden state sequence are concatenated along the channel dimension, and the spatiotemporal fusion feature is output through a fully connected layer. ( , (where is the final output dimension of the spatiotemporal fusion feature), and its expression is shown in Formula 5; Formula 5: Where ReLU is the activation function. Here, is the bias vector of the fully connected layer (initialized to 0 or a small random number, optimized through gradient descent), and Concat is the concatenation operation (i.e., concatenating the bias vectors of the fully connected layer). and (Concatenate along the feature dimensions to form a spatiotemporal fusion feature matrix). This is the weight matrix of the fully connected layer (used to map the spatiotemporal fusion features after concatenation to a low-dimensional fusion feature space).
[0050] S05. Adaptive Outlier Correction: Node scores (representing cities in the spatiotemporal graph) are calculated using the Isolation Forest algorithm. Anomalies are identified by comparing adaptive thresholds with these scores. Anomalies are categorized based on their degree of abnormality and differentiated correction strategies are applied. The corrected data is then re-input into the spatiotemporal graph construction module, forming a closed-loop feedback mechanism of "detection-correction-re-detection." The operations in this step are implemented using the "Adaptive Outlier Correction Module."
[0051] Specifically, the following steps are included: A. Anomaly detection: Analyzing the node feature matrix In the input anomaly detection module, the score for each node is calculated using the Isolation Forest algorithm. Identify outliers in PM2.5 concentrations or meteorological parameters; based on adaptive thresholds. ,determination The nodes that are abnormal nodes are output as the set of abnormal nodes: Adaptive threshold The settings are as shown in Formula 6; Formula 6: in, For adaptive threshold, For the normal set of nodes (i.e., after passing through the Isolation Forest algorithm, the score) (the set of nodes) The median score of normal (i.e.) All ratings are sorted numerically from smallest to largest, and the middle value is used. Interquartile range of scores for normal nodes ( ; The lower quartile (25th percentile) represents 25% of the data are less than this value; The upper quartile (75th percentile) represents 75% of the data is less than this value.
[0052] B. Anomaly Classification: Anomaly nodes are classified into two categories according to the degree of anomaly: minor anomalies and severe anomalies, as shown in Formula 7. Formula 7: in, For the threshold increment, Rate the nodes.
[0053] C. Anomaly Correction: For minor anomalies, only the edge weights between the node and its surrounding nodes are adjusted, as shown in Formula 8; for severe anomalies, node connections are disconnected and features are corrected: first select... Calculate the feature mean from 10 adjacent normal nodes. Combined with LSTM predictions Generate a correction value; when the anomaly is caused by temporary noise, restore the node connection after correction; if the anomaly is caused by structural changes, keep the node disconnected; the operation is as shown in Formula 9. Formula 8: in, These are the edge weights before and after the correction, respectively. (Calculated from Formula 4) This is the attenuation coefficient (used to control the magnitude of edge weight adjustment). Formula 9: in, To correct the node characteristics (i.e., abnormal nodes with "severe anomalies") In time The final corrected feature vector). The mean of the features of neighboring normal nodes (i.e., the relationship between the node and the node in the space-time graph). Directly connected neighboring nodes that have not been identified as abnormal in time (characteristic mean) The confidence weight (a hyperparameter between 0 and 1, such as 0.7) is used to balance the importance of the LSTM prediction and the mean of neighboring nodes; if the LSTM model has strong time series modeling capabilities (e.g., accurate prediction of pollution trends), the confidence weight can be increased. (e.g., 0.8); if the spatial correlation of neighboring nodes is more reliable (e.g., stable diffusion patterns under stable weather conditions), the value can be reduced. (e.g., 0.5) For nodes In time LSTM predictions of PM2.5 concentration For nodes The number of directly connected normal nodes, where N is the number of nodes. The set of directly connected normal nodes. For nodes Directly connected normal nodes In time The normalized eigenvectors.
[0054] D. Dynamic Update: The corrected node features and edge weights are re-input into the spatiotemporal graph construction module, forming a closed-loop feedback mechanism of "detection-correction-re-detection".
[0055] Instructions on how to output predicted PM2.5 concentration values: Spatiotemporal fusion features in Formula 5 As input to the predicted values, a hidden regression layer (such as a fully connected layer with an activation function) is input to generate predicted PM2.5 concentration values.
[0056] Meteorological condition adjustment factor in Formula 1 Design notes for the sub-formula: Its denominator is a linear combination of the constant 1 and three meteorological parameter terms, where: ①. The constant term 1 serves as the baseline value for the denominator, ensuring that the denominator is always greater than or equal to 1, thus avoiding the problem of the denominator being too small. Too large; ②. This refers to the wind speed term, which is a core driving factor in PM2.5 dispersion; as wind speed increases, this term increases. Decrease shorten; ③. This is the wind direction term, which determines the direction of pollutant transport. The value range is [-1, 1]. When the wind direction is consistent with the direction of the line connecting the city, this term is considered a wind direction term. When cos=1, the value of this term is at its maximum. Decrease Shorten; when the wind direction is opposite to the direction of the city's line of sight. When cos=-1, the value of this term is at its minimum. Increase extend; ④. This is the pressure term; the pressure difference reflects the intensity of vertical convection in the atmosphere. The greater the pressure difference, the more unstable the atmosphere, and the stronger the PM2.5 diffusion capacity. (City The air pressure is higher than in the city. When ), the value of this item is positive. Decrease Shorten; when (City The air pressure is lower than that of the city. When ), the value of this item is negative. Increase extend.
[0057] Precursor pollutant association adjustment factor in Formula 1 Design Description: It is formed by directly adding the constant term 1 and the correlation coefficients of the two precursor pollutants, where: ①. The constant term 1 serves as a baseline value, representing the scenario of "no precursor pollutant association"; ②. for Correlation coefficient term, It is a key precursor to PM2.5 formation; when (Two cities) When the concentration is positively correlated, this term has a positive value. Increase Extend; when (Two cities) When the concentration is negatively correlated, the value of this term is negative, but due to the existence of the constant term 1, Shrink but not less than 1, to avoid shorten to less than ; ③. for Correlation coefficient term, It is a minor precursor to PM2.5 formation; when (Two cities) When the concentration is positively correlated, this term has a positive value. Increase Extend; when (Two cities) When the concentration is negatively correlated, the value of this term is negative, but due to the existence of the constant term 1, Shrink but not less than 1, to avoid shorten to less than .
[0058] Design notes regarding Formula 2: The aim is to quantify the synergistic impact of meteorological conditions on PM2.5 diffusion through multi-parameter fusion and dynamic weighting mechanisms, thereby addressing the shortcomings of traditional methods that neglect meteorological dynamics. Its first to (Wind speed) (wind direction), The air pressure was normalized to eliminate the dimensional differences between different types of parameters. Then, through weighted combination, the influence of different gas phase parameters on PM2.5 diffusion was adapted. Finally, the mathematical rationality and interpretability of the results were ensured by the constraint that the weight sum is 1.
[0059] Design notes regarding Formula 3: The aim is to incorporate the correlation of precursor pollutants into the calculation of the dynamic weighted adjacency matrix, thereby more accurately simulating the generation and diffusion of PM2.5; Among them Indicates to The concentration Pearson correlation coefficient is used for Sigmoid mapping, where... Indicates to The Pearson correlation coefficients of concentrations were subjected to Sigmoid mapping, and the mapping results were summed and averaged to obtain the normalized weights of the precursor pollutant correlations. .
[0060] Design notes regarding Formula 4: Its aim is to address the shortcomings of traditional models that over-rely on a single Euclidean distance and neglect the correlation between meteorological conditions and precursor pollutants by dynamically weighting and fusing multiple factors, thereby improving the completeness and accuracy of spatial correlation modeling. Specifically: ①. Normalized weights for dynamic Euclidean distances between cities This method is used to quantify the spatial proximity between cities, but the original Euclidean distance is dynamically adjusted based on meteorological conditions (wind speed, wind direction, air pressure) and precursor pollutant correlations (NO2, SO2 correlation). For example, if the wind speed is high and the wind direction is the same between two cities, even if the actual distance is far, the weight of the dynamically adjusted normalized distance may increase (enhancing the correlation). Concentration is highly positively correlated, and the dynamically adjusted normalized distance weight may increase (reflecting chemically driven pollution transport). ②. Normalized weights of meteorological parameters This is used to quantify the synergistic effects of meteorological conditions (wind speed, wind direction, and air pressure) on PM2.5 dispersion. For example, under stable weather conditions (low wind speed, high air pressure), the weight of meteorological parameters may decrease, and the focus shifts to the correlation with precursor pollutants. ③. Normalized weights of precursor pollutant correlation For modeling and The spatiotemporal correlation of concentration reflects the synergistic chemical effects of PM2.5 formation. For example, if two cities... The simultaneous increase in concentration may indicate a stronger correlation weight among precursor pollutants, suggesting a potential risk of secondary PM2.5 formation. ④. Trainable coefficients The model is given a dynamic adjustment mechanism, which allows it to automatically learn the importance of each factor in different scenarios through model training. For example, in industrial urban clusters, the correlation weight of precursor pollutants may be given higher weight; in coastal cities, the weight of meteorological parameters may dominate the adjacency matrix (significantly affected by sea and land breezes).
[0061] Design notes regarding Formula 5: Its aim is to deeply integrate spatial diffusion patterns (extracted by graph neural networks) with temporal dynamic evolution (captured by LSTM) through multimodal feature fusion, thereby solving the problem of the separation between spatial and temporal modeling in traditional methods and improving the comprehensiveness and accuracy of PM2.5 concentration prediction; among which: ①. Spatial Relationship Feature Matrix Between Cities Used to capture the PM2.5 diffusion relationship between cities (e.g., pollution from city A is transported to city B via southeasterly winds) and reflect the functional positioning of cities in the regional pollution network (e.g., "pollution buffer zone under calm and stable weather conditions"). ②. Hidden State Sequence It is the output of the LSTM network, which contains the temporal dynamics of PM2.5 concentration (such as daily periodicity and the duration of pollution peaks). ③. Concat operation provides a "global correlation perspective" for spatial features (such as intercity transmission paths) and a "local evolution perspective" for temporal features (such as short-term fluctuations). For example, if the PM2.5 concentration in a city suddenly increases, spatial features can pinpoint the source of pollution (transmission from neighboring cities), and temporal features can determine whether it is related to morning or evening rush hours. ④. Weight matrix of fully connected layer Used to map the concatenated high-dimensional features to low-dimensional fused features. To reduce redundancy and enhance generalization ability; ⑤. Bias vector of fully connected layer Used to compensate for feature distribution bias and improve the model's adaptability to complex scenarios; ⑥. The ReLU activation function introduces a nonlinear transformation, enhancing the model's ability to model nonlinear relationships. For example, the interaction between spatial and temporal features may exhibit a "threshold effect" (such as a sharp increase in intercity transmission intensity when wind speed exceeds 5 m / s).
[0062] Design notes regarding Formula 6: Its aim is to dynamically generate anomaly detection thresholds through an unsupervised learning mechanism, overcoming the limitations of traditional methods that rely on fixed thresholds or manual annotation, and improving the robustness of the model in complex contamination scenarios; among which: ①. Median score of normal range Compared to the mean, it is not sensitive to outliers, avoiding the distortion of threshold calculation by extreme scores (such as individual extremely high scores caused by sudden pollution events); ②. Interquartile range of normal node scores It can measure the dispersion of data distribution. The higher the IQR, the more dispersed the data is, and the outlier threshold needs to be relaxed accordingly. ③. The formula is obtained through " The combined design of "" dynamically adjusts the threshold, which can cover the fluctuation range of normal scores and capture minor anomalies; ④. Its output adaptive threshold It dynamically adjusts according to the real-time changes in normal node scores, adapting to the abnormal distribution characteristics of different time periods and cities. For example, in pollution peak scenarios, if the overall normal node scores are high, Increase, adaptive threshold Automatic elevation to avoid misjudging normal fluctuations as abnormal; in calm and stable weather conditions, if normal scores are concentrated, Decrease, adaptive threshold Automatically reduces sensitivity to minor anomalies; ⑤. Its adaptive threshold for output It serves as the benchmark for Formula 7 (anomaly classification rules), thus providing a prerequisite for implementing differentiated correction strategies for anomaly nodes.
[0063] Design notes regarding Formula 8: The purpose is to use a decay coefficient for anomalous nodes that exhibit "minor anomalies". This reduces edge weights. Since minor anomalies may be transient noise (such as sensor jitter) rather than genuine contamination mutations, preserving weak associations avoids over-correction that could compromise the integrity of the spatiotemporal graph.
[0064] Design notes regarding Formula 9: The aim is to address the limitations of a single data source in correcting "severe anomalies" by integrating multi-source information and dynamically assigning weights, thereby improving the robustness, physical plausibility, and scenario adaptability of the correction results; among which: ①. LSTM Predicted Values ( It is used to capture the temporal evolution of PM2.5 concentration (such as short-term fluctuations and long-term trends) and reflect the dynamic characteristics of pollution; ②. Mean value of features of neighboring normal nodes Used to provide spatial correlation constraints to ensure that the corrected features conform to the local normal state (such as the regional pollution distribution under stable weather conditions).
Claims
1. A PM2.5 prediction model based on dynamic weighting and anomaly correction, characterized by: It includes a data preprocessing module, an adjacency matrix construction module, a spatiotemporal graph construction module, a spatial feature extraction module, a spatiotemporal feature fusion module, and an outlier adaptive correction module, which are connected in sequence from front to back. The outlier adaptive correction module is connected to the spatiotemporal graph construction module in a data flow, thus forming a closed-loop data flow connection path of "spatiotemporal graph construction module - multimodal spatiotemporal feature fusion module - outlier adaptive correction module - spatiotemporal graph construction module". The data preprocessing module performs data cleaning and normalization on the raw data; The adjacency matrix construction module integrates dynamic Euclidean distance between cities, meteorological parameters, and correlation of precursor pollutants to calculate the dynamic weighted adjacency matrix between cities; The spatiotemporal graph construction module is used to construct a node feature matrix and combine the node feature matrix with a dynamic weighted adjacency matrix to construct a spatiotemporal graph with cities as nodes and the dynamic weighted adjacency matrix as the diffusion relationship. The spatial feature extraction module aggregates neighbor node information through graph convolution operations to extract the spatial association feature matrix between cities; The spatiotemporal feature fusion module performs multimodal joint modeling of the spatial correlation feature matrix between cities and PM2.5 concentration time series data, and finally outputs spatiotemporal fusion features to simultaneously characterize the spatial diffusion role and temporal dynamics of pollution. The outlier adaptive correction module calculates node scores using the isolated forest algorithm, and identifies outlier nodes by comparing them with an adaptive threshold. It then categorizes outlier nodes based on their degree of abnormality and adopts differentiated correction strategies. The corrected data is re-input into the spatiotemporal graph construction module, and the quality of the spatiotemporal graph is optimized through closed-loop feedback.
2. The PM2.5 prediction model based on dynamic weighting and anomaly correction as described in claim 1, characterized in that: The adjacency matrix construction module includes a dynamic distance weighting submodule, a meteorological parameter weighting submodule, a precursor pollutant weighting submodule, and a multi-factor fusion submodule. The dynamic distance weighting submodule dynamically adjusts the dynamic Euclidean distance between cities based on the correlation of precursor pollutants and meteorological conditions, and then dynamically adjusts the normalized weights of the dynamic distance between cities by changing the dynamic Euclidean distance. The meteorological parameter weighting submodule calculates the normalized weights of meteorological parameters based on three parameters: wind speed, wind direction, and air pressure. The precursor pollutant weighting submodule calculates the normalized weights of precursor pollutant associations based on the Pearson correlation coefficients of NO2 and SO2 concentrations; the multi-factor fusion submodule dynamically fuses the normalized weights of dynamic distance between cities, meteorological parameters, and precursor pollutant associations through three trainable coefficients to generate a dynamic weighted adjacency matrix.
3. The PM2.5 prediction model based on dynamic weighting and anomaly correction as described in claim 2, characterized in that: The outlier adaptive correction module includes an anomaly detection submodule, an anomaly classification submodule, an anomaly correction submodule, and a closed-loop feedback submodule. The anomaly detection submodule receives the node feature matrix, calculates the score of each node, and determines the anomaly node based on the comparison between the adaptive threshold and the score. The anomaly classification submodule classifies the anomaly nodes into "minor anomalies" and "severe anomalies" according to the degree of anomaly. For minor anomalies, the anomaly correction submodule only adjusts the edge weights between the node and its surrounding nodes; for severe anomalies, it disconnects the node and corrects the features. The closed-loop feedback submodule is used to re-input the corrected data into the spatiotemporal graph construction module, forming a closed-loop feedback mechanism of "detection-correction-re-detection".
4. A PM2.5 prediction method based on dynamic weighting and anomaly correction, applied to the PM2.5 prediction model based on dynamic weighting and anomaly correction as described in any one of claims 1-3, characterized in that the steps are as follows: as follows: S01. Data Input and Preprocessing: This step involves cleaning and normalizing various types of raw data in the region to be predicted. This step is based on the "Data Preprocessing Module". S02. Constructing a dynamic weighted adjacency matrix: Integrating three core factors—dynamic Euclidean distance between cities, meteorological parameters, and correlation of precursor pollutants—the factors are first normalized to convert them into weights of a uniform scale. Then, the three factors are fused using trainable coefficients to construct a dynamic weighted adjacency matrix. This step is based on the "adjacency matrix construction module". S03. Spatiotemporal Graph Construction and Spatial Feature Extraction: Constructing the Node Feature Matrix Based on node feature matrix With dynamic weighted adjacency matrix By combining these methods, a spatiotemporal graph is constructed. This graph is then input into a graph neural network to extract spatial features, and the output is a feature matrix of spatial relationships between cities. This step is implemented sequentially through the "Spatiotemporal Graph Construction Module" and the "Spatial Feature Extraction Module". S04. Multimodal Spatiotemporal Feature Fusion: This method involves multimodal joint modeling of the inter-city spatial correlation feature matrix and PM2.5 concentration time series data. First, the sampling frequencies of the inter-city spatial correlation feature matrix and the PM2.5 concentration time series data are unified. Then, an LSTM network is used to capture the temporal evolution of PM2.5 concentration. Finally, the inter-city spatial correlation feature matrix is concatenated with the captured temporal features to output the spatiotemporal fusion feature. The operations in this step are based on the "multimodal spatiotemporal feature fusion module". S05. Outlier Adaptive Correction: Node scores are calculated using the Isolation Forest algorithm, and outlier nodes are identified by comparing adaptive thresholds with these scores. Abnormal nodes are classified according to their degree of abnormality, and differentiated correction strategies are adopted. The corrected data is re-input into the spatiotemporal graph construction module to form a closed-loop feedback mechanism of "detection-correction-re-detection". This step is based on the "outlier adaptive correction module".
5. The PM2.5 prediction method based on dynamic weighting and anomaly correction as described in claim 4, characterized in that: S Step 02 specifically includes the following sub-steps: A. Calculate the normalized weights of dynamic Euclidean distances between cities based on Formula 1. ; Official 1: in, These represent the historical maximum and minimum values of the dynamic Euclidean distance for all cities. For time steps, Represents city The dynamic Euclidean distance between them; Represents city The original Euclidean distance between them For dynamic adjustment coefficients; As a meteorological condition adjustment factor, For precursor pollutant-related adjustment factors; These are the wind speed weighting coefficient, wind direction weighting coefficient, and air pressure weighting coefficient, respectively. For the city Real-time wind speed between For the city The azimuth of the connecting line, For the city Real-time wind direction; For the city The real-time air pressure difference between them The reference air pressure difference (can be taken as 0 hPa, representing the ideal state where the air pressures of the two cities are equal); for Weighting coefficients for Weighting coefficients For the city between Pearson correlation coefficient of concentration For the city between Pearson correlation coefficient of concentration; B. Calculate the normalized weights of meteorological parameters based on Formula 2. ; Official 2: in, For the city Real-time wind speed between These are the historical minimum and maximum wind speeds, respectively. These are the historical minimum and maximum values for wind direction, respectively. These are the historical minimum and maximum values of air pressure, respectively. Cities Normalized values of real-time wind speed, real-time wind direction, and real-time air pressure difference. These are the weighting coefficients for wind speed, wind direction, and air pressure, respectively. C. Calculate the normalized weights of precursor pollutant associations using Formula 3. ; Official 3: in, This is the notation for the Sigmoid function; D. Through trainable coefficients The three types of weights are dynamically fused to generate a dynamic weighted adjacency matrix as shown in Formula 4; Official 4: in, All are training coefficients. And it satisfies the normalization constraint: ;in, Controlling the normalized weights of dynamic Euclidean distances between cities The fusion strength; Control meteorological parameter normalization weights The fusion strength; Control of precursor pollutant correlation normalization weights The fusion strength; For the city The final adjacency weight between them.
6. The PM2.5 prediction method based on dynamic weighting and anomaly correction as described in claim 5, characterized in that: Step S03 specifically includes the following sub-steps: A. Spatiotemporal graph construction: The multi-source data normalized in step S01 is integrated into a node feature matrix according to city and feature dimensions. The dynamic weighted adjacency matrix calculated in step S02 is combined with Construct a dynamically weighted adjacency matrix with cities as nodes. A dynamically weighted spacetime graph with edge weights; B. Spatial Feature Extraction: The dynamically weighted spatiotemporal graph is input into a graph neural network. Neighboring nodes are aggregated through graph convolution operations, and the spatial correlation feature matrix between cities is output. ; Dimensions , As a hidden layer dimension, the feature vector of each node represents the city's "diffusion role" in global spatial association. The "diffusion role" refers to the city's functional positioning in the spatial diffusion of PM2.5, including three categories: "pollution hotspot", "transmission channel" and "receptor city".
7. The PM2.5 prediction method based on dynamic weighting and anomaly correction as described in claim 6, characterized in that: S Step 04 specifically includes the following sub-steps: A. Time series alignment: aligning the spatial correlation feature matrix between cities PM2.5 concentration time series data Aligned by time steps, forming a spatiotemporal joint input tensor. ; B. Temporal Feature Extraction: The spatiotemporal joint input tensor is input into an LSTM network to capture the temporal evolution of PM2.5 concentration and output the hidden state sequence. ; C. Spatiotemporal Feature Fusion: The spatial correlation feature matrix between cities and the hidden state sequence are concatenated along the channel dimension, and the spatiotemporal fusion feature is output through a fully connected layer. Its expression is shown in Formula 5; Official 5: Where ReLU is the activation function. Here, represents the bias vector of the fully connected layer; Concat is the concatenation operation. This is the weight matrix of the fully connected layer.
8. The PM2.5 prediction method based on dynamic weighting and anomaly correction as described in claim 7, characterized in that: Step S05 specifically includes the following steps: A. Anomaly detection: Analyzing the node feature matrix In the input anomaly detection module, the score for each node is calculated using the Isolation Forest algorithm. Identify outliers in PM2.5 concentrations or meteorological parameters; based on adaptive thresholds. ,determination The nodes that are abnormal nodes are output as the set of abnormal nodes: Adaptive threshold The settings are as shown in Formula 6; Official 6: in, For adaptive threshold, This is a normal set of nodes, i.e., after passing through the Isolation Forest algorithm, the score is... The set of nodes, This is the median score for normal individuals. Interquartile range for normal node scores; B. Anomaly Classification: Anomaly nodes are classified into two categories according to the degree of anomaly: minor anomalies and severe anomalies, as shown in Formula 7. Official 7: in, For the threshold increment, Rate the nodes; C. Anomaly Correction: For minor anomalies, only the edge weights between the node and its surrounding nodes are adjusted, as shown in Formula 8; for severe anomalies, node connections are disconnected and features are corrected: first select... Calculate the feature mean from 10 adjacent normal nodes. Combined with LSTM predictions Generate the correction value; the operation is shown in Formula 9. Official 8: in, These are the edge weights before and after the correction, respectively. The attenuation coefficient; Official 9: in, To correct the node features, The mean value of the features of neighboring normal nodes. As the confidence level weight, For nodes In time LSTM predictions of PM2.5 concentration For nodes The number of directly connected normal nodes, where N is the number of nodes. The set of directly connected normal nodes. For nodes Directly connected normal nodes In time The normalized eigenvectors; D. Dynamic Update: The corrected node features and edge weights are re-input into the spatiotemporal graph construction module, forming a closed-loop feedback mechanism of "detection-correction-re-detection".