Multi-site multi-pollutant prediction method and device based on gatv2 and time feature extraction

By using GATv2 and a temporal feature extraction module, a dynamic adjacency matrix and spatiotemporal feature fusion were constructed, which solved the problems of insufficient periodic fluctuations and spatial dependence in multi-site atmospheric pollutant prediction, and achieved efficient and accurate multi-site pollutant concentration prediction.

CN120218320BActive Publication Date: 2025-12-26BEIJING INSTITUTE OF PETROCHEMICAL TECHNOLOGY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510276777.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-12-26
Estimated Expiration
2045-03-10

AI Technical Summary

Technical Problem

Existing technologies cannot effectively extract periodic fluctuation features in multi-site, multi-feature air pollutant prediction, lack adjacency matrices to model spatial dependencies between sites, have high model complexity, and are insufficient in handling feature differences between heterogeneous sites, thus affecting prediction performance and scalability.

Method used

By employing an improved graph attention network (GATv2) and a temporal feature extraction module, a dynamic adjacency matrix is ​​constructed to capture the spatial relationships between multiple sites. Combined with the Inception structure of fast Fourier transform and multi-kernel dilated convolution, temporal features are extracted to achieve spatiotemporal feature fusion, thereby improving prediction accuracy and stability.

Benefits of technology

It significantly improves the accuracy and stability of multi-site and multi-pollutant forecasting, can adapt to complex meteorological conditions and cross-regional forecasting, has good scalability and real-time performance, and enhances the model's ability to model the transmission of information from multiple sites.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120218320B_ABST
    Figure CN120218320B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of pollution early warning, in particular to a multi-site multi-pollutant prediction method and device based on GATv2 and time feature extraction. The method comprises the following steps: obtaining historical data of multi-site pollutant monitoring; generating an adjacency matrix between multi-sites based on the historical data; the adjacency matrix is used for representing the relationship and dependency between different sites; extracting first features based on the adjacency matrix and the historical data through a GATv2 model; capturing time features in the historical data based on a time feature extraction module to obtain second features; splicing the first features and the second features to obtain space-time features; and inputting the space-time features into a preset full connection layer to obtain a prediction result. In this way, the multi-site multi-pollutant can be more accurately predicted.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of pollution early warning, and particularly relates to a multi-site multi-pollutant prediction method and device based on GATv2 and time feature extraction. BACKGROUND

[0002] In recent years, with the rapid development of industrialization and urbanization, air pollution has become a global focus. Atmospheric pollutants, such as fine particulate matter (PM2.5), nitrogen dioxide (NO2), ozone (O3), etc., have caused serious impact on human health and ecological environment. Therefore, accurately predicting the concentration changes of atmospheric pollutants is of great significance for environmental monitoring, pollution early warning and policy making. SUMMARY

[0003] Therefore, embodiments of the present application are dedicated to providing a multi-site multi-pollutant prediction method and device based on GATv2 and time feature extraction for pollution early warning.

[0004] The present application provides a multi-site multi-pollutant prediction method based on GATv2 and time feature extraction, comprising:

[0005] obtaining historical data of multi-site pollutant monitoring;

[0006] generating an adjacency matrix between the multi-sites based on the historical data; the adjacency matrix is used to represent the relationship and dependency between different sites;

[0007] extracting first features based on the adjacency matrix and the historical data through a GATv2 model;

[0008] capturing time features in the historical data based on a time feature extraction module to obtain second features;

[0009] splicing the first features and the second features to obtain spatio-temporal features;

[0010] inputting the spatio-temporal features into a preset fully connected layer to obtain a prediction result.

[0011] In some embodiments, generating an adjacency matrix between the multi-sites based on the historical data comprises:

[0012] constructing a first sub-adjacency matrix based on the historical data for geographical location features;

[0013] constructing a second sub-adjacency matrix based on the historical data for meteorological condition similarity;

[0014] constructing a third sub-adjacency matrix based on the historical data for pollution source distribution characteristics;

[0015] The first sub-adjacency matrix, the second sub-adjacency matrix and the third sub-adjacency matrix are weighted and added to obtain an adjacency matrix.

[0016] In some embodiments, the GATv2 model is used to dynamically learn adjacency relationship weights through a multi-head attention mechanism, and outputs site features after multi-head splicing or averaging processing.

[0017] In some embodiments, the time feature extraction module adopts an Inception structure of fast Fourier transform and multi-core dilated convolution to capture time features.

[0018] In some embodiments, the time features include lag features, rolling statistical features and periodic features.

[0019] In some embodiments, the prediction result includes prediction results of concentrations of various pollutants at multiple sites.

[0020] The application also provides a multi-site multi-pollutant prediction device based on GATv2 and time feature extraction, comprising:

[0021] An acquisition module is configured to acquire historical data of multi-site pollutant monitoring.

[0022] A generation module is configured to generate an adjacency matrix between multiple sites based on the historical data; the adjacency matrix is used to represent relationships and dependencies between different sites.

[0023] An extraction module is configured to extract first features based on the adjacency matrix and the historical data through a GATv2 model, and capture time features in the historical data based on a time feature extraction module to obtain second features.

[0024] A splicing module is configured to splice the first features and the second features to obtain spatio-temporal features.

[0025] A prediction module is configured to input the spatio-temporal features into a preset fully connected layer to obtain a prediction result.

[0026] The application also provides an electronic device, comprising:

[0027] A processor and a memory for storing programs executable by the processor.

[0028] The processor is configured to realize the multi-site multi-pollutant prediction method based on GATv2 and time feature extraction by running programs in the memory.

[0029] The application also provides a computer readable storage medium, which stores a computer program, and the computer program enables a processor to execute the multi-site multi-pollutant prediction method based on GATv2 and time feature extraction when the processor runs.

[0030] The application also provides a computer program product, which comprises a computer program, and the computer program implements the multi-site multi-pollutant prediction method based on GATv2 and time feature extraction when the processor runs.

[0031] The multi-site multi-pollutant prediction method based on GATv2 and time feature extraction provided by the application first acquires historical data of multi-site pollutant monitoring; generates an adjacency matrix between the multi-sites based on the historical data; the adjacency matrix is used to represent the relationship and dependency between different sites; extracts first features based on the adjacency matrix and the historical data through a GATv2 model; captures time features in the historical data based on a time feature extraction module to obtain second features; splices the first features and the second features to obtain spatiotemporal features; inputs the spatiotemporal features into a preset full connection layer to obtain a prediction result. Through the adjacency matrix, the spatial correlation between the sites can be explicitly represented, including geographical position, meteorological condition similarity, and pollution source distribution and other factors. Explicit modeling of such relationships enables the model to better understand the mutual influence between the sites, thereby improving the prediction accuracy. The time feature extraction module can extract features of multiple time scales from the historical data, including short-term fluctuations, long-term trends, and periodic changes (such as daily cycles and seasonal cycles). Such multi-scale feature capturing capability enables the model to comprehensively understand the temporal dynamics of pollutant concentrations, making up for the problem of insufficient periodic feature extraction of traditional single time series models such as LSTM. Through comprehensive modeling of spatiotemporal features, the present solution can more accurately capture the variation rules of atmospheric pollutant concentrations, significantly improving the prediction accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0032] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description of embodiments of the present application, when taken in conjunction with the accompanying drawings. The drawings provided in the specification and the contents of the specification are to provide further understanding of the embodiments of the present application, and constitute a part of the specification, which explain the present application together with the embodiments of the present application, but do not constitute a limitation of the present application. In the drawings, the same reference numerals generally designate the same components or steps.

[0033] Figure 1 FIG. 1 is a flowchart of a multi-site multi-pollutant prediction method based on GATv2 and time feature extraction provided by an embodiment of the present application.

[0034] Figure 2is a part flow schematic diagram of the method provided by an embodiment of the present application.

[0035] Figure 3 is a structural schematic diagram of a multi-site multi-pollutant prediction device based on GATv2 and time feature extraction provided by an embodiment of the present application.

[0036] Figure 4 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0038] Summary of the application

[0039] In recent years, with the increasing attention to air pollution problems, the traditional air pollutant prediction method gradually shows limitations. For example, the prediction method based on a single model or a single site is difficult to capture the complex spatio-temporal dependence and cross-site information transmission. In addition, the change of pollutant concentration is affected by multiple factors, such as meteorological conditions, geographical location, pollution source distribution, and pollution influence coefficient, etc., which leads to significant differences in pollution characteristics between different regions. Therefore, multi-site, multi-feature air pollutant prediction needs a solution that can effectively handle spatio-temporal dependence and enhance cross-site information transmission.

[0040] Traditional spatio-temporal prediction models usually model both spatial and temporal characteristics simultaneously, leading to complex and difficult-to-optimize models, especially when the spatial dependency and temporal sequence characteristics differ greatly. The existing CNN-LSTM model predicts the concentration of PM2.5 daily average in Beijing the next day, which combines the advantages of CNN and LSTM models. CNN is used to extract inherent features from input data required for PM2.5 concentration prediction, especially spatial specificity features in input features of different monitoring stations. LSTM is used to capture long-term dependencies of time series data, which can handle long-term trends in air quality and weather data. Regarding the CNN part, it includes 6 CNNs, each extracting features related to the monitoring station it is located in, and arranged in order of feature frequency, from the target station to other stations. The input dimension of each CNN is different according to the performance of the feature at different stations. This way makes CNN able to extract unique features for each station. Regarding the LSTM part, the time series of features output by CNN are input into LSTM, which is used to integrate these features, reflect the long-term history of time series data, and provide long-term dependency information for the final PM2.5 concentration prediction. In summary, this study effectively improves the performance of multi-station prediction of atmospheric pollutants based on spatio-temporal dependency models, especially when considering air quality and weather data. Its method has certain expansion potential in the future application in other air pollutant prediction and complex environmental modeling fields.

[0041] The existing method mainly based on the information transmission of the target station and its adjacent stations, and the feature extraction ability of the monitoring stations in the remote area or independent stations is weak.

[0042] The CNN part in the existing scheme designs multiple sub-models, each focusing on feature extraction for a specific station, which leads to high dimension of input features, increasing the complexity of model training and optimization.

[0043] The existing scheme mainly relies on LSTM for long-term dependency capture in time series modeling, but the extraction ability of periodic and seasonal fluctuation characteristics is weak. For example, PM2.5 concentration is usually significantly affected by seasonal changes, weekly cycles, and other periodic factors, but this model cannot effectively extract these periodic fluctuation features, resulting in insufficient prediction accuracy.

[0044] The existing scheme fails to fully consider spatial dependency features such as adjacency matrix, distance, geographical features, influence coefficient, etc., leading to ineffective modeling of cross-station multi-feature spatio-temporal dependency, affecting multi-station prediction performance and model expansion ability.

[0045] In summary, the existing scheme has the problems of being unable to extract periodic fluctuations, insufficient modeling of cross-site features, and high model complexity in multi-site, multi-feature air pollutant prediction.

[0046] To solve the above problems, in view of the shortcomings of traditional models in multi-site, multi-feature air pollutant prediction, such as being unable to extract periodic fluctuations, lacking an adjacency matrix to model the spatial dependence between sites, not fully utilizing distance features and geographic features, and insufficient ability to handle feature differences between heterogeneous sites, the present application proposes a spatio-temporal feature fusion air pollutant prediction model GATv2Net. The present application can:

[0047] 1. Fully model the spatial dependence of multiple sites: through the improved graph attention network (GATv2), a dynamic adjacency matrix is constructed using distance features, geographic features, and pollution influence coefficients between sites, effectively extracting complex spatial correlation between multiple sites, overcoming the problem of insufficient dependence on adjacency matrix in traditional methods.

[0048] 2. Capture periodic fluctuation features: with the multi-scale decomposition capability of the TimesNet model, periodic and trend features are extracted from historical time series, improving the model's prediction ability for long-term and short-term pollutant fluctuations, and making up for the problem of insufficient extraction of periodic features by traditional LSTM models.

[0049] 3. Multi-feature fusion and heterogeneous data modeling: through GATv2 dynamic modeling of feature differences between heterogeneous sites, combined with TimesNet's efficient capture of nonlinear relationships between multiple pollutant features (such as PM2.5, NO2, O3, etc.), multi-site, multi-feature collaborative prediction is achieved.

[0050] 4. Improve prediction accuracy and stability: considering both spatial and temporal characteristics, GATv2 extracts spatial characteristics, and TimesNet captures temporal characteristics, achieving efficient combination of spatio-temporal features, thereby significantly improving the prediction accuracy and stability of air pollutant concentration, especially in complex weather conditions and cross-regional prediction tasks.

[0051] 5. Enhance model scalability and real-time performance: the present model proposes a new framework for multi-site, multi-feature air pollutant prediction, with good scalability, flexible adaptation to new sites or additional pollutant features. Through efficient network structure design, it reduces computational cost and supports multi-site real-time prediction applications.

[0052] After introducing the basic principles of the present application, the various non-limiting embodiments of the present application will be specifically introduced with reference to the accompanying drawings.

[0053] Exemplary method

[0054] Figure 1 is a flowchart of a multi-site multi-pollutant prediction method based on GATv2 and time feature extraction provided by an embodiment of the present application. As shown in the figure, the method comprises the following contents. Figure 1

[0055] Step S110, obtaining historical data of multi-site pollutant monitoring;

[0056] Specifically, historical atmospheric pollutant concentration data is collected from multiple monitoring sites, including but not limited to concentration values of pollutants such as PM2.5, PM10, NO2, SO2, O3, CO, etc., and relevant meteorological data (such as temperature, humidity, wind speed, wind direction, etc.) is also collected.

[0057] In actual application, standardized monitoring data can be obtained from national or local environmental monitoring departments, or data can be collected in real time through a sensor network. The data is usually stored in the form of time series, and each time point corresponds to the pollutant concentration and meteorological parameters of one or more sites. The original data is cleaned, including processing missing values, outliers, and aligning time stamps. In this way, the basic data for model training can be provided, and the input for subsequent feature extraction and prediction can be provided. The spatio-temporal information contained in the historical data is the key to achieving accurate prediction.

[0058] Step S120, generating an adjacency matrix between multiple sites based on the historical data; the adjacency matrix is used to represent the relationship and dependency between different sites;

[0059] Specifically, an adjacency matrix is constructed according to factors such as the geographical location, meteorological conditions and pollution source distribution of the sites in the historical data, which is used to represent the relationship and dependency between different sites.

[0060] Step S130, extracting first features based on the adjacency matrix and the historical data through a GATv2 model;

[0061] Specifically, the historical data of each site is taken as node features, and the adjacency matrix is taken as a graph structure for input. GATv2 dynamically calculates the attention weight between nodes through a multi-head attention mechanism, which can flexibly capture the complex relationship between sites. The output of GATv2 is a feature vector after spatial relationship modeling, and the output features of each node fuse the information of its neighbor nodes. The attention weight of GATv2 can be dynamically adjusted according to the input data, overcoming the limitations of static attention in traditional graph neural networks. In this way, the spatial dependency features between sites are extracted, and the modeling ability of the model for cross-site information transmission is enhanced. The generated spatial features provide a basis for subsequent time feature fusion.

[0062] Step S140, capturing time features in the historical data based on a time feature extraction module to obtain second features;​

[0063] Specifically, the time feature extraction module is used to extract the time sequence features from the historical data, including lag features, rolling statistical features, and periodic features.

[0064] At step S150, the first feature and the second feature are spliced to obtain a spatio-temporal feature.

[0065] Specifically, the spatial feature (first feature) extracted by GATv2 and the time feature (second feature) obtained by the time feature extraction module are spliced to generate a spatio-temporal fusion feature. The spatial feature and the time feature are spliced by dimension to generate a comprehensive feature vector. Through the splicing operation, the effective integration of spatial and temporal information is ensured, and more rich feature representation is provided for the subsequent prediction task. The deep fusion of spatial features and temporal features is realized, so that the model can consider the spatial dependence between sites and the dynamic changes of time series at the same time. The modeling ability of the model for complex spatio-temporal data is improved, and the accuracy and stability of the prediction are enhanced.

[0066] At step S160, the spatio-temporal feature is input into a preset fully connected layer to obtain a prediction result.

[0067] The fully connected layer can further process and extract features from the spatio-temporal feature to generate the final prediction result. The prediction result can be the pollutant concentration value at a certain time point or multiple time points in the future. The model is trained and optimized through a loss function (such as mean square error) to ensure the accuracy of the prediction result.

[0068] The above steps realize efficient and accurate prediction of atmospheric pollutant concentration through integration of multi-site data, construction of adjacency matrix, extraction of spatial and temporal features, and fusion of spatio-temporal features. Each step plays a key role in the overall process and together constitutes a complete spatio-temporal feature modeling framework, significantly improving the prediction performance and generalization ability of the model.

[0069] In some embodiments, generating an adjacency matrix between multiple sites based on the historical data comprises:

[0070] Based on the historical data, a first sub-adjacency matrix is constructed for geographical location features.

[0071] Based on the historical data, a second sub-adjacency matrix is constructed for meteorological condition similarity.

[0072] Based on the historical data, a third sub-adjacency matrix is constructed for pollution source distribution characteristics.

[0073] The first sub-adjacency matrix, the second sub-adjacency matrix, and the third sub-adjacency matrix are weighted and added to obtain the adjacency matrix.

[0074] Specifically, for the geographical location characteristics of multiple sites, the Euclidean distance between each site is calculated, and the first sub-adjacency matrix is constructed according to the distance information. The geographical coordinates (longitude, latitude, altitude) of each site are extracted from historical data. Distance calculation: the distance between any two sites is calculated using the Euclidean distance formula: In some embodiments, a distance threshold θ can be set, and for site pairs with a distance less than θ, a larger weight is given; for site pairs with a distance greater than θ, a smaller weight (such as 0) or directly set to 0 is given to reduce noise. The geographical location feature directly affects the mutual influence strength between sites, and sites in close proximity usually have stronger pollution transmission relationships. The first sub-adjacency matrix can effectively capture the spatial proximity between sites, providing a basis for subsequent spatial feature extraction.

[0075] For the meteorological condition similarity of multiple sites, the similarity of each site in meteorological features is calculated, and the second sub-adjacency matrix is constructed according to the similarity information. The meteorological features of each site, such as temperature, humidity, wind speed, and wind direction, are extracted from historical data. Similarity calculation: the similarity of any two sites in meteorological features is calculated using the correlation coefficient (such as Pearson correlation coefficient): The weight of the adjacency matrix is given according to the similarity value. The higher the similarity, the greater the weight. Meteorological condition similarity reflects the mutual influence between sites under meteorological background, especially under the influence of wind direction and wind speed, the transmission path and strength of pollutants will be significantly affected. The second sub-adjacency matrix can dynamically capture the meteorological correlation between sites, enhancing the adaptability of the model to complex meteorological conditions.

[0076] For the pollution source distribution characteristics of multiple sites, the correlation of each site in pollution source distribution is calculated, and the third sub-adjacency matrix is constructed according to the correlation information. The pollution source distribution information around each site, such as industrial areas, traffic-intensive areas, construction sites, etc., is extracted from historical data. According to the type and distribution range of pollution sources, the correlation between sites is calculated. For example, if two sites are located in traffic-intensive areas, a higher correlation weight is given. According to the correlation of pollution source distribution, the weight of the adjacency matrix is given. Pollution source distribution characteristics directly affect the pollution transmission relationship between sites, especially in similar pollution source environments, the concentration changes of pollutants at sites often have similarity. The third sub-adjacency matrix can capture the pollution source correlation between sites, enhancing the modeling ability of the model to pollution source distribution.

[0077] The first sub-adjacency matrix, the second sub-adjacency matrix, and the third sub-adjacency matrix are weighted and added to generate the final adjacency matrix. According to the importance of geographical location characteristics, meteorological condition similarity, and pollution source distribution characteristics, different weights α, β, and γ are given to each sub-adjacency matrix.

[0078] Adjacency matrix fusion:

[0079] A = a * A(1) + b * A(2) + g * A(3)

[0080] where A is the final adjacency matrix, a + b + g = 1.

[0081] A(1) is the first sub-adjacency matrix; A(2) is the second sub-adjacency matrix; A(3) is the third sub-adjacency matrix;

[0082] The final adjacency matrix is normalized to ensure that its weight values are within a reasonable range (such as between 0 and 1). By using weighted addition, the sub-adjacency matrices of different features are fused into a comprehensive adjacency matrix, which can fully reflect the complex relationships between stations.

[0083] The distribution of weights can be adjusted according to the actual application scenario, enhancing the model's emphasis on different features and improving the accuracy and generalization ability of the prediction.

[0084] Through the above steps, three sub-adjacency matrices are constructed based on geographical location features, meteorological condition similarity, and pollution source distribution characteristics. By weighted addition of these sub-adjacency matrices, the final adjacency matrix is generated. This process not only fully captures the spatial relationships between stations, but also dynamically adjusts the weights of the adjacency matrix, enhancing the model's adaptability to complex spatio-temporal environments. The final adjacency matrix provides a solid foundation for subsequent spatial feature extraction (such as through the GATv2 model), significantly improving the performance of multi-station atmospheric pollutant prediction.

[0085] The GATv2 model is used to dynamically learn the adjacency relationship weights through the multi-head attention mechanism, and output the station features after multi-head concatenation or averaging processing.

[0086] GATv2 (Graph Attention Network v2) is an improved graph neural network model specifically designed for modeling node relationships in graph-structured data. It introduces a multi-head attention mechanism to dynamically learn the relationship weights between nodes, allowing it to more effectively capture complex structural information in graphs. In this technical solution, the GATv2 model is used to extract spatial features from multi-station atmospheric pollutant monitoring data, enhancing the model's ability to model the mutual influence between stations. The multi-head attention mechanism is one of the core technologies of GATv2, allowing the model to learn the relationships between nodes from multiple perspectives, thereby improving the richness and flexibility of feature extraction. Through the above multi-head attention mechanism and aggregation operation, the GATv2 model finally outputs an updated feature vector for each station. These feature vectors combine the features of each station itself and its neighbor stations, allowing a more comprehensive reflection of the spatial dependence relationships between stations.

[0087] In some embodiments, the time feature extraction module employs Fast Fourier Transform (FFT) and multi-kernel dilated convolution Inception structure to capture time features. The time feature extraction module is a key component in the multi-site multi-pollutant prediction method, used to capture the dynamic characteristics of time series from historical data. This module achieves efficient time feature extraction through Fast Fourier Transform (FFT) and multi-kernel dilated convolution Inception structure, which can significantly improve the model's understanding and prediction ability of time series data. Fast Fourier Transform (FFT) is used to convert time series data from time domain to frequency domain and extract its periodic characteristics. Specifically, FFT is applied to each site's historical pollutant concentration sequence to calculate its frequency spectrum. The dominant frequencies with the largest amplitudes in the frequency spectrum are identified, which correspond to the main periodic characteristics of the time series (such as daily and seasonal cycles). These dominant frequencies and their corresponding average amplitudes are extracted as the core periodic characteristics of the time series.

[0088] The multi-kernel dilated convolution Inception structure is used to capture the long and short-term dependencies of time series while maintaining low computational cost. Specifically, multiple dilated convolution kernels are designed, each with different dilation rates to expand the receptive field and capture features at different time scales. The two-dimensional time series data after FFT transformation is input into the multi-kernel dilated convolution layer, which processes the data in parallel through convolution kernels with different dilation rates to extract local and global features. The Inception structure is used to fuse features of different scales to generate comprehensive time feature representations.

[0089] Through FFT and multi-kernel dilated convolution, the periodicity, short-term fluctuations, and long-term trends of time series can be captured simultaneously, significantly improving the model's ability to model complex time series. The Inception structure design enables the model to extract rich feature information while maintaining efficient computation. The time feature extraction module provides high-quality time features for spatio-temporal feature fusion, significantly improving the accuracy and stability of multi-site multi-pollutant prediction.

[0090] The time features include lag features, rolling statistical features, and periodic features. Time features are a key component in time series modeling, used to capture the dynamic changes in time series. In multi-site multi-pollutant prediction, the extraction of time features can significantly improve the model's understanding and prediction ability of pollutant concentration trends.

[0091] Lag feature definition: Shift the time series data forward or backward by a certain number of time steps to generate new feature columns. Used to capture short-term dependencies in the time series. In some embodiments, a suitable lag step (e.g., 1 hour, 6 hours, 24 hours) can be selected, and the historical pollutant concentration data is shifted forward by the corresponding step. The generated lag features can be directly used as inputs to the model, helping the model understand recent changes in pollutant concentrations.

[0092] Rolling statistics feature definition: Calculate statistical values such as mean, standard deviation, maximum, minimum, etc. within a sliding window on the time series to capture local trends and fluctuations in the time series. In some embodiments, a suitable sliding window size (e.g., 3 hours, 6 hours, 24 hours) can be selected, and the statistical values within the window at each time point are calculated. The generated rolling statistics features can help the model understand the local change patterns of the time series.

[0093] Periodic feature definition: Extract periodic patterns (e.g., daily, weekly, seasonal) in the time series through periodic transformation of time information. Used to capture periodic change patterns in the time series. In some embodiments, information such as year, month, day, hour, day of the week, etc. can be extracted from the timestamp. Use sine and cosine functions to transform time information into periodic features.

[0094] In this way, through the extraction of lag features, rolling statistics features, and periodic features, the short-term dependencies, local trends, and periodic changes of the time series can be comprehensively captured, significantly improving the modeling ability of the model on the time series. These time features can help the model better adapt to different time scale prediction tasks, from short-term (e.g., 1 hour) to long-term (e.g., 72 hours) prediction. The introduction of time features provides rich information for spatiotemporal feature fusion, significantly improving the accuracy and stability of multi-site multi-pollutant prediction.

[0095] The prediction results include: the prediction results of each pollutant concentration of the multi-site. The prediction results are the final output of the multi-site multi-pollutant prediction method, which provides decision support for environmental monitoring and pollution warning. In this technical solution, the prediction results include the prediction values of each pollutant concentration of the multi-site, which can comprehensively reflect the future trend of pollutant concentration changes.

[0096] The following will be combined Figure 2 to further illustrate the scheme provided in this application:

[0097] I. Correlation analysis; Mutual information (MI) is a statistical measure that quantifies the dependence between two random variables X and Y. In multi-site feature selection, MI can effectively evaluate the correlation between different sites. In multi-site data, different sites may exhibit complex correlations due to differences in geographical location, meteorological conditions, or pollution source distribution. Through MI, the degree of dependence between sites can be accurately quantified. If the MI between two sites is high, it indicates that they have a strong correlation in pollutant concentration or meteorological changes.

[0098] II. Preprocessing of multi-site data set

[0099] In the preprocessing of multi-site data, first, clean the six main atmospheric pollutants (PM2.5, PM10, NO2, SO2, O3, CO) and meteorological data (temperature, humidity, wind speed, etc.), including handling missing values, outliers, and timestamp alignment. Then, use normalization or standardization methods to unify the dimension of features, ensuring the consistency of input data. For time characteristics, construct lag features, rolling statistics features, and periodic features.

[0100] III. Generating adjacency matrix between sites

[0101] When predicting atmospheric pollutants in multiple sites, constructing the adjacency matrix of the model is a crucial step. The adjacency matrix A is used to represent the relationship and dependence between sites. When constructing the adjacency matrix, the following key factors need to be considered:

[0102] 1. Geographical location feature. Calculate the Euclidean distance between sites through geographical coordinates. Sites with closer distances usually have stronger mutual influence. Set a distance threshold threshld, and set the site pairs beyond the threshold to zero to reduce noise. Geographical location feature A ij The formula is as follows:

[0103]

[0104] By introducing three-dimensional coordinates (latitude, longitude, height), the calculation of distance can more realistically represent the actual geographical distance, especially in areas with significant elevation differences. The Euclidean distance calculation formula is as follows.

[0105]

[0106] 2. Meteorological condition similarity. Use correlation to quantify the similarity of two sites in meteorological features. Site pairs with high similarity can be given greater weights. Meteorological conditions have temporal variability, and the adjacency matrix can be dynamically adjusted according to meteorological conditions at different times.

[0107] 3. Pollution source distribution characteristics. Different sites may be in the same range of pollution sources such as industrial areas, traffic-intensive areas, etc. The adjacency matrix is weighted by the pollution source distribution characteristics.

[0108] For the above three characteristics, each characteristic corresponds to a sub-adjacency matrix, and the matrix size is N x N, where N is the number of sites. The above three matrices are fused into an overall adjacency matrix A by weighted summation, where α, β, γ are hyperparameters, and the weights reflect the importance of different characteristics. The GATv2 model can fully learn the spatial dependence between sites and improve the accuracy of atmospheric pollutant prediction.

[0109] A = αA geo + βA meteo + γA source

[0110] A geo is the geographical location feature; A meteo is the meteorological condition similarity; A source is the pollution source distribution characteristics.

[0111] Four, model construction

[0112] 1. The data of each site not only depends on its own historical data, but also is related to the air quality of surrounding sites. For the existing technology mentioned in 1.2 (CNN-LSTM model), it ignores the mutual influence between sites and cannot effectively use the spatial characteristics described in the adjacency matrix. The original graph attention network (GAT, Graph Attention Network) is a deep learning model based on graph structure data, which models the node relationship in the adjacency matrix through self-attention mechanism. However, the GATConv layer of GAT has the problem of static attention, that is, the topology of the adjacency matrix is fixed during training, which cannot be dynamically adjusted, thereby limiting the modeling ability of the node relationship. The GATv2 used in the present application improves the original GAT, and each node can dynamically focus on any node in the graph.

[0113] By inputting the feature vector X of each site and the fused adjacency matrix, GATv2 dynamically learns the adjacency relationship weight through multi-head attention mechanism, and the output features are processed through multi-head splicing or averaging to generate updated site features.

[0114] 2、Based on the spatial feature extracted by GATv2, the sequence rule of data is extracted through time feature. The time feature extraction module is based on the Inception structure of fast Fourier transform (FFT) and multi-core dilated convolution, which can efficiently capture the time features of multi-site time series. Using fast Fourier transform, first, the one-dimensional time series data is converted to frequency domain to extract its main periodic characteristics. The specific steps are to calculate the frequency spectrum of the time series, identify the several dominant frequencies with the largest amplitude in the frequency components, and these frequencies correspond to the main periodic characteristics of the time series. Then, return the main periodic values and the average amplitude of the corresponding frequency components as the core features of the input time series. On the expanded two-dimensional time series data, multiple dilated convolutions are used for processing. Dilated convolution expands the receptive field by inserting holes in the convolution kernel, so that the model can capture more context information while extracting local features. Multiple dilated convolutions effectively improve the ability to capture long and short-term dependencies of time series while keeping low computational cost. This processing method enhances the model's ability to understand complex time series data.

[0115] 3、In the spatio-temporal fusion stage of the model, GATv2 and the time feature module are integrated to improve the accurate prediction ability of multi-site pollutant concentration. The spatial features extracted by GATv2 and the time features extracted by the time module are combined together, and this process is completed through feature splicing to ensure the effective integration of spatial and temporal information. Then, the fused features are input into the fully connected layer to output the prediction results of multi-site pollutant concentration at future time points. This model design based on spatio-temporal fusion can capture the spatial dependence between monitoring stations and the dynamic change characteristics of time series at the same time, realizing the accurate prediction of multi-site pollutant concentration.

[0116] In summary, the application proposes a multi-site pollutant concentration prediction method combining GATv2 and a time feature module, which can effectively capture the spatial dependence and time series characteristics between sites. The GATv2 model overcomes the limitations of the fixed attention mechanism of the original GAT model by dynamically adjusting the adjacency matrix, improving the spatial feature extraction capability. The time feature module extracts the periodic changes of multi-site time series based on FFT and multi-core dilated convolution, further enhancing the model's grasp of long-term and short-term trends. This method can reduce the dependence on single-site historical data, improve the generalization ability and prediction accuracy of the model, and adapt to multi-site pollutant prediction tasks in complex, multi-dimensional and heterogeneous data environments. By combining GATv2 and the time feature module, this technology can effectively capture complex spatio-temporal dependencies and periodic changes, significantly improving the accuracy and stability of multi-site pollutant prediction. The GATv2 model dynamically learns the adjacency matrix to accurately model the spatial relationships between sites, while the time feature module uses FFT and multi-core dilated convolution to extract the long-term periodicity of pollutant concentration, improving the ability to capture long-term trends and seasonal changes. In addition, the modular design of the model allows it to be extended to multi-pollutant, multi-site tasks, with stronger generalization ability and interpretability, providing a flexible and efficient framework for spatio-temporal characteristic modeling.

[0117] Exemplary apparatus

[0118] The device embodiment of the present application can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiment of the present application, please refer to the method embodiments of the present application.

[0119] Figure 3 Fig. 1 shows a block diagram of a multi-site multi-pollutant prediction device based on GATv2 and time feature extraction according to an embodiment of the present application. As shown in the figure, Figure 4 The device comprises:

[0120] The acquisition module 31 is configured to acquire historical data of multi-site pollutant monitoring.

[0121] The generation module 32 is configured to generate an adjacency matrix between multi-sites based on the historical data; the adjacency matrix is used to represent the relationship and dependence between different sites.

[0122] The extraction module 33 is configured to extract first features based on the adjacency matrix and the historical data through a GATv2 model, and capture time features in the historical data based on a time feature extraction module to obtain second features.

[0123] The splicing module 34 is configured to splice the first features and the second features to obtain spatio-temporal features.

[0124] The prediction module 35 is used to input the spatiotemporal features into a preset fully connected layer to obtain the prediction result.

[0125] Exemplary electronic device

[0126] Below, for reference Figure 4 This describes an electronic device according to embodiments of the present application. Figure 4 A block diagram of an electronic device according to an embodiment of this application is illustrated.

[0127] like Figure 4 As shown, the electronic device 400 includes one or more processors 410 and memory 420.

[0128] The processor 410 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 400 to perform desired functions.

[0129] The memory 420 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 410 may execute the program instructions to implement the multi-site, multi-pollutant prediction methods based on GATv2 and temporal feature extraction described in the various embodiments of this application above, and / or other desired functions. Various contents, such as category correspondences, may also be stored in the computer-readable storage medium.

[0130] In one example, the electronic device 400 may also include an input device 430 and an output device 440, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).

[0131] In addition, the input device 430 may also include, for example, a keyboard, mouse, interface, etc. The output device 440 can output various information to the outside, including analysis results, etc. The output device 440 may include, for example, a display, speaker, printer, and communication network and its connected remote output devices, etc.

[0132] Of course, for the sake of simplicity, Figure 4 Only some of the components of the electronic device relevant to this application are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.

[0133] Exemplary computer program product and computer readable storage medium

[0134] In addition to the methods and devices described above, embodiments of the present application can also be a computer program product including computer program instructions that, when run by a processor, cause the processor to perform steps of the multi-site multi-pollutant prediction method based on GATv2 and temporal feature extraction according to various embodiments of the present application described in the above “Exemplary Methods” section of the specification.

[0135] The computer program instructions can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, etc., and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server.

[0136] In addition, embodiments of the present application can also be a computer readable storage medium having stored thereon computer program instructions that, when run by a processor, cause the processor to perform steps of the multi-site multi-pollutant prediction method based on GATv2 and temporal feature extraction according to various embodiments of the present application described in the above “Exemplary Methods” section of the specification.

[0137] The computer readable storage medium can be any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0138] The above description is given for illustrative and descriptive purposes. Furthermore, this description is not intended to limit embodiments of the present application to the forms disclosed herein. Although several example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, changes, additions, and sub-combinations thereof.

Claims

1. A multi-site multi-pollutant prediction method based on GATv2 and time feature extraction, characterized in that, The method comprises: obtaining historical data of multi-site pollutant monitoring; generating an adjacency matrix between the multi-sites based on the historical data; the adjacency matrix is used to represent the relationship and dependency between different sites; extracting first features based on the adjacency matrix and the historical data through a GATv2 model; a time feature extraction module is used to capture time features in the historical data to obtain second features; splicing the first features and the second features to obtain spatio-temporal features; inputting the spatio-temporal features into a preset full connection layer to obtain a prediction result; the time feature extraction module adopts an Inception structure of fast Fourier transform and multi-core dilated convolution to capture time features; generating an adjacency matrix between the multi-sites based on the historical data comprises: based on the historical data, a first sub-adjacency matrix is constructed for geographical location features; based on the historical data, a second sub-adjacency matrix is constructed for meteorological condition similarity; based on the historical data, a third sub-adjacency matrix is constructed for pollution source distribution characteristics; the first sub-adjacency matrix, the second sub-adjacency matrix and the third sub-adjacency matrix are weighted and added to obtain the adjacency matrix.

2. The multi-site multi-pollutant prediction method based on GATv2 and temporal feature extraction of claim 1, wherein, The GATv2 model is used to dynamically learn adjacency relationship weights through a multi-head attention mechanism, and output site features after multi-head splicing or average processing.

3. The multi-site multi-pollutant prediction method based on GATv2 and temporal feature extraction of claim 1, wherein, The time features include lag features, rolling statistical features and periodic features.

4. The multi-site multi-pollutant prediction method based on GATv2 and temporal feature extraction of claim 1, wherein, The prediction result includes prediction results of various pollutant concentrations of the multi-sites.

5. A multi-site multi-pollutant prediction device based on GATv2 and temporal feature extraction, characterized in that, The method comprises: an obtaining module is used to obtain historical data of multi-site pollutant monitoring; a generating module is used to generate an adjacency matrix between the multi-sites based on the historical data; the adjacency matrix is used to represent the relationship and dependency between different sites; an extracting module is used to extract first features based on the adjacency matrix and the historical data through a GATv2 model; a time feature extraction module is used to capture time features in the historical data to obtain second features; the time feature extraction module adopts an Inception structure of fast Fourier transform and multi-core dilated convolution to capture time features; a splicing module is used to splice the first features and the second features to obtain spatio-temporal features; a prediction module is used to input the spatio-temporal features into a preset full connection layer to obtain a prediction result; generating an adjacency matrix between the multi-sites based on the historical data comprises: based on the historical data, a first sub-adjacency matrix is constructed for geographical location features; based on the historical data, a second sub-adjacency matrix is constructed for meteorological condition similarity; based on the historical data, a third sub-adjacency matrix is constructed for pollution source distribution characteristics; the first sub-adjacency matrix, the second sub-adjacency matrix and the third sub-adjacency matrix are weighted and added to obtain the adjacency matrix.

6. An electronic device, comprising: The method comprises: a processor and a memory for storing programs executable by the processor; the processor is used to realize the multi-site multi-pollutant prediction method based on GATv2 and time feature extraction by running the programs in the memory.

7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, which, when executed by the processor, causes the processor to perform the multi-site multi-pollutant prediction method based on GATv2 and time feature extraction as claimed in any one of claims 1 to 4.

8. A computer program product comprising a computer program which, when executed by a processor, implements the multi-site multi-pollutant prediction method based on GATv2 and time feature extraction as claimed in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Air quality prediction method for mining space-time attention mechanism based on multiple relations

    CN119204352A