Air quality space-time prediction method and device based on hierarchical dynamic graph neural network
By constructing variable graphs and site graphs through hierarchical dynamic graph neural networks, and dynamically learning the spatial-temporal dependencies within and between sites, it solves the problems of existing models in modeling multivariate associations and dynamic changes in pollution propagation, and achieves air quality prediction with higher accuracy and flexibility.
Patent Information
- Application Number
- CN202511154592.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-18
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-08-18
AI Technical Summary
Existing air quality prediction models find it difficult to effectively model the complex correlations between multiple variables within monitoring sites and the dynamic propagation of pollution between sites. Static graphs are also difficult to reflect temporal dynamics, which limits the model's ability to express temporal dependencies.
A hierarchical dynamic graph neural network is used to construct a two-layer dynamic graph structure of variable graph and site graph. The spatial-temporal dependencies within and between sites are learned through the dynamic adjacency matrix. The residual connection mechanism and GRU network are introduced for recursive information update to achieve multi-granularity spatiotemporal feature extraction and prediction.
It significantly improves the ability to capture the nonlinear coupling relationship between pollutants and meteorological variables, enhances the flexibility and accuracy of the model, adapts to changes in different regions and pollutant types, and improves the flexibility and accuracy of predictions.
Smart Images

Figure CN120724852A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of environmental science and technology, and in particular to a method and device for spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network. Background Art
[0002] In order to achieve effective supervision and early warning of air quality, accurate prediction of PM2.5 has become one of the key issues in current environmental monitoring and smart city management.
[0003] Traditional research primarily relies on coupled physical-chemical models such as WRF-CMAQ (Weather Research and Forecasting–Community Multiscale Air Quality) and WRF-Chem (WRF–Chemistry). These methods simulate future air quality conditions by modeling atmospheric physical processes, chemical reaction mechanisms, and pollutant transport pathways. While these methods offer advantages in modeling mechanisms, they suffer from complex parameter configuration, high sensitivity to initial and boundary conditions, and high computational resource consumption. Furthermore, their accuracy is limited in high-temporal and spatial resolution scenarios, making them unable to meet current demands for high accuracy, real-time performance, and scalability.
[0004] To overcome these challenges, data-driven approaches have become a hot topic in PM2.5 concentration forecasting research in recent years. These methods no longer rely on complex modeling of atmospheric physical processes, but instead directly predict future PM2.5 concentrations by mining temporal patterns in historical monitoring data. Common models include traditional statistical methods such as the Autoregressive Integrated Moving Average (ARIMA) model, as well as deep learning-based models such as Recurrent Neural Networks (RNNs), Long Short-Term Memory (LSTMs), Gated Recurrent Units (GRUs), and Transformers. These methods typically treat PM2.5 concentration forecasting as a typical time series modeling problem, focusing primarily on the evolution of features along the temporal dimension. However, modeling solely along the temporal dimension has significant limitations in practical applications. Due to the significant spatial diffusion and long-range transmission characteristics of PM2.5, pollution levels in a given area are often significantly influenced by pollution sources in surrounding and even distant regions. Therefore, PM2.5 concentration prediction should be regarded as a spatiotemporal collaborative modeling problem, which should not only capture the dynamic evolution characteristics over time, but also consider the spatial dependencies between different regions, so as to achieve more accurate prediction results with practical application value.
[0005] In recent years, several patents have explored in-depth research on spatiotemporal modeling in PM2.5 concentration prediction. For example, "CN115629160A: A Method and System for Predicting Air Pollutant Concentration Based on Spatiotemporal Graphs" proposes combining a graph convolutional network (GCN) with an LSTM to achieve joint modeling by leveraging the spatial relationships between monitoring sites and time series characteristics. "CN114694767B: A PM2.5 Concentration Prediction Method Based on a Spatiotemporal Graph Ordinary Differential Equation Network" improves its ability to characterize the evolution of PM2.5 concentration by introducing an ordinary differential equation modeling framework. "CN114662791B: A Long-Term PM2.5 Prediction Method and System Based on Spatiotemporal Attention" incorporates a spatiotemporal attention mechanism, effectively enhancing the model's ability to perceive information at key moments and in key areas. These research results demonstrate that modeling methods that integrate spatial structure and temporal dynamics offer significant advantages in improving prediction accuracy and model generalization.
[0006] In recent years, graph neural networks (GNNs) have become an important tool in spatiotemporal data modeling due to their ability to model complex dependencies between nodes in non-Euclidean spaces. In air quality prediction, existing research typically uses air quality monitoring stations as the minimum modeling unit, constructing a "station graph" to capture spatial structural characteristics. Nodes in the graph represent different monitoring stations, while edges are constructed based on geographic proximity or functional similarity (such as road connections and wind direction paths). Among these methods, the GCNTAG (Graph Convolutional Network with Temporal Attention GRU) model proposed by Su et al. combines graph convolutional networks with gated recurrent units to jointly model unstructured spatial and temporal series information, effectively capturing the long-term spatiotemporal dependencies of air quality. The MasterGNN (Multi-adversarial Spatio-Temporal Recurrent Graph Neural Network) model proposed by Han et al. constructs a heterogeneous spatiotemporal recurrent graph neural network framework and further introduces a multi-adversarial graph learning mechanism to model the cross-modal and cross-spatial autocorrelation between air quality and weather monitoring data, while improving robustness to spatiotemporal noise propagation. These graph neural network-based methods have been widely applied in real-world scenarios such as urban air quality prediction, achieving significant results.
[0007] However, these methods generally overlook the inherent structure and interactions between pollutants and meteorological variables within a site. In real-world environmental monitoring, a single site often simultaneously records multiple meteorological factors (such as temperature, humidity, and wind speed), which exhibit significant coupling and nonlinear interactions. Constructing a graph based solely on site information makes it difficult to fully explore the collaborative patterns between site variables and their driving mechanisms for pollution evolution. To alleviate these issues, some recent studies have introduced attention mechanisms based on the Transformer architecture, such as the SageFormer model, to attempt to model the dependencies between multiple variables in the time series dimension. FourierGNN treats variable dimensions as nodes to construct a variable graph and extracts temporal features between variables through graph convolution. However, these methods generally lack systematic graph structure design, making it difficult to extract graph-level representations of the variable graph. Furthermore, they fail to effectively synergize the variable-level graph structure with the site-level spatial graph structure, limiting overall modeling capabilities.
[0008] In addition, the correlation between variables often changes significantly over time. Static graphs are difficult to reflect this temporal dynamics, which limits the model's ability to express temporal dependencies. Summary of the Invention
[0009] To address the technical issues in existing air quality prediction models, which are insufficient in modeling the complex relationships among multiple variables within monitoring sites and the dynamic propagation of pollution between sites, the present invention provides a method and apparatus for spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network. The technical solution is as follows:
[0010] On the one hand, a method for spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network is provided, characterized in that the method comprises:
[0011] S1. At each time step of the historical time series, feature extraction is performed for each monitoring station to obtain N meteorological variables;
[0012] S2. For each monitoring site, a graph structure between variables is constructed at each time step. A dynamic adjacency matrix is constructed by measuring the trend similarity between variables. Spatial-temporal learning of the graph structure between variables is performed based on the dynamic adjacency matrix.
[0013] S3. At each time step, a graph structure between sites is constructed for each monitoring site. Based on the graph structure between sites, a dynamic adjacency matrix is constructed at each time step. Spatial-temporal learning of the graph structure between sites is performed based on the dynamic adjacency matrix.
[0014] S4. Construct a layered graph coding module based on S1-S3, introduce a residual connection mechanism in the process of stacking multiple layered graph coding modules, and obtain the output result of the layered graph coding module;
[0015] S5. Extract information for each future prediction time step and obtain the time representation of that time step as the input of the decoder stage; use the output of the last layer of the hierarchical graph encoding module as the initial hidden state of the GRU, and recursively update the hidden state based on the information obtained at each prediction time step to obtain the dynamic characteristics of the node state evolution over time;
[0016] S6 and GRU output the hidden state to the prediction module, which generates the predicted value for that time step and completes the spatiotemporal prediction of air quality based on the hierarchical dynamic graph neural network.
[0017] Optionally, in S1, at each time step of the historical time series, feature extraction is performed for each monitoring site to obtain N meteorological variables, including:
[0018] At each time step of the historical time series, for each monitoring site s, the observed values of N meteorological variables including temperature, humidity, wind speed, wind direction and air pressure, as well as the PM2.5 concentration value at that moment, are extracted.
[0019] Optionally, in S2, for each monitoring site, a graph structure between variables is constructed at each time step t, and a dynamic adjacency matrix is constructed by measuring the trend similarity between variables, including:
[0020] For each monitoring site, a graph structure between variables is constructed at each time step;
[0021] Perform moving average processing on the numerical sequence of each variable in the historical time of N variables;
[0022] Based on the smoothed variable time series, calculate the trend similarity between any two variables within the time window;
[0023] Construct an adjacency matrix between variables based on trend similarity; each interval The adjacency matrix is updated in a rolling manner to obtain a dynamic adjacency matrix.
[0024] Optionally, in S2, spatial-temporal learning of the graph structure between variables is performed based on the dynamic adjacency matrix, including:
[0025] Perform convolution operations on variable graph structures based on dynamic adjacency matrices;
[0026] Concatenate the graph convolution outputs at different time steps into a time series as the input of the gated recurrent unit; set the hidden state of the GRU.
[0027] Optionally, in S3, at each time step, a graph structure between sites is constructed for each monitoring site; and based on the graph structure between sites, a dynamic adjacency matrix is constructed at each time step, including:
[0028] At each time step, a graph structure between sites is constructed for all monitoring sites;
[0029] Based on the graph structure between sites, initialize a node embedding matrix and a time embedding matrix;
[0030] Retrieve the time information of each time step from the time embedding matrix through the timestamp; multiply the static embedding matrix of the site and the retrieved time embedding matrix using element-wise multiplication to obtain the enhanced node embedding matrix;
[0031] The enhanced node embedding matrix is further updated using the hidden state of the GRU, and the adjacency matrix is calculated based on the node embedding matrix to obtain a dynamic adjacency matrix.
[0032] Optionally, in S3, spatial-temporal learning of the graph structure between sites is performed based on a dynamic adjacency matrix, including:
[0033] Based on the dynamic adjacency matrix and node attributes in the site graph, diffusive convolution is used to perform convolution operations to extract spatial dependency information;
[0034] The spatial representation sequences at different moments are used as the input of GRU for temporal modeling.
[0035] Optionally, in S4, a layered graph coding module is constructed based on S1-S3, and a residual connection mechanism is introduced in the stacking process of multiple layered graph coding modules to obtain an output result of the layered graph coding module, including:
[0036] A hierarchical graph encoding module is constructed based on S1-S3. The hierarchical graph encoding module integrates the two-level structures of variable graph modeling and site graph modeling, and combines graph convolution with temporal modeling to extract multi-granularity spatial-temporal features.
[0037] The residual connection mechanism is introduced in the process of stacking multiple layered graph coding modules. Let the input of the layered graph coding module at layer l be , the output is ; then the input of the next layer is given by the following formula:
[0038] .
[0039] Optionally, in S5, information is extracted for each future prediction time step, and a time representation of the time step is obtained as input to the decoder stage; the output result of the last layer of the hierarchical graph encoding module is used as the initial hidden state of the GRU, and the hidden state is recursively updated based on the information obtained at each prediction time step to obtain dynamic features of the node state evolution over time, including:
[0040] For each future prediction time step, extract the daily embedding vector and weekly embedding vector from the preset time embedding matrix according to the timestamp, and then concatenate the two to form the time representation of the time step as the input of the decoder stage;
[0041] The output K of the last layer of hierarchical graph encoding module is used as the initial hidden state of GRU; at each prediction time step, the time context vector obtained in the previous step is input into the GRU network, and the hidden state is recursively updated to capture the dynamic characteristics of the node state evolving over time.
[0042] Optionally, in S6, the GRU outputs the hidden state to the prediction module, which generates the predicted value for the time step, completing the spatiotemporal prediction of air quality based on the hierarchical dynamic graph neural network, including:
[0043] The hidden state output by the GRU is fed into the prediction module to generate the predicted value for that time step:
[0044]
[0045] in, Represents the target variable prediction results of each monitoring station in the next 𝐻 time steps.
[0046] On the other hand, a device for spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network is provided. The device is applied to a method for spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network. The device comprises:
[0047] The feature extraction module is used to extract features for each monitoring site at each time step of the historical time series to obtain N meteorological variables;
[0048] The variable graph structure module is used to construct a graph structure between variables at each time step for each monitoring site. It also constructs a dynamic adjacency matrix by measuring the trend similarity between variables. It also performs spatial-temporal learning on the graph structure between variables based on the dynamic adjacency matrix.
[0049] The site graph structure module is used to build an inter-site graph structure for each monitoring site at each time step; and based on the inter-site graph structure, a dynamic adjacency matrix is built at each time step; and the graph structure between sites is subjected to spatial-temporal learning based on the dynamic adjacency matrix;
[0050] A layered graph coding module is used to construct a layered graph coding module based on S1-S3, introduce a residual connection mechanism in the stacking process of multiple layered graph coding modules, and obtain the output result of the layered graph coding module;
[0051] The decoding module is used to extract information for each future prediction time step and obtain the time representation of that time step as the input of the decoder stage. The output of the last layer of the layered graph encoding module is used as the initial hidden state of the GRU. The hidden state is recursively updated based on the information obtained at each prediction time step to obtain the dynamic characteristics of the node state evolution over time.
[0052] The prediction module is used to output the hidden state of GRU to the prediction module, which produces the predicted value of the time step and completes the spatiotemporal prediction of air quality based on the hierarchical dynamic graph neural network.
[0053] On the other hand, a spatiotemporal prediction device for air quality based on a hierarchical dynamic graph neural network is provided, and the spatiotemporal prediction device for air quality based on a hierarchical dynamic graph neural network comprises: a processor; a memory, wherein computer-readable instructions are stored on the memory, and when the computer-readable instructions are executed by the processor, any one of the above-mentioned spatiotemporal prediction methods for air quality based on a hierarchical dynamic graph neural network is implemented.
[0054] On the other hand, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned methods for spatiotemporal prediction of air quality based on hierarchical dynamic graph neural networks.
[0055] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0056] In this embodiment of the present invention, to address the difficulties existing air quality prediction models face in effectively modeling the complex relationships among multiple variables within a site and the dynamic changes in pollution transmission between sites, a layered dynamic graph neural network modeling method is proposed. This method systematically integrates information interaction between the variable layer and the site layer, and introduces a dynamic graph structure to achieve adaptive modeling of spatiotemporal dependencies. Its beneficial effects include:
[0057] (1) By constructing a variable graph within the site, various pollutants and meteorological variables are regarded as nodes in the graph. Graph neural networks are used to deeply explore the nonlinear coupling and complex interaction relationships between variables, effectively capturing the synergy and potential impact of multiple variables, and significantly improving the expression ability and modeling accuracy of single-site characteristics.
[0058] (2) A trainable dynamic graph adjacency matrix mechanism is introduced to achieve dynamic optimization and updating of the site graph structure. This can adapt to the dynamic characteristics of pollution propagation paths and spatial dependencies between sites that change over time, enhance the model's ability to perceive and respond to spatiotemporal changes, and thus improve the flexibility and accuracy of predictions.
[0059] (3) Through a hierarchical structure, the high-dimensional graph-level representation of the variable graph is input into the site graph as node attributes, fusing the multi-granularity information of the variable and site layers to achieve cross-layer information interaction and collaborative modeling. This approach not only enhances the in-depth understanding of pollution diffusion patterns but also improves the model's ability to capture complex spatiotemporal dependencies.
[0060] (4) This method can flexibly adapt to changes in the number of different regions, stations, and pollutant types, making it easy to integrate with existing environmental monitoring systems. At the same time, the adaptive learning mechanism of the dynamic graph structure reduces the reliance on prior knowledge and manual composition, improving the robustness and automation level of the model in complex real-world scenarios, and providing reliable technical support for large-scale deployment and city-level air quality intelligent prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0062] Figure 1 This is a flow chart of a method for spatiotemporal prediction of air quality based on a layered dynamic graph neural network provided by an embodiment of the present invention;
[0063] Figure 2 A schematic diagram of a layered graph established according to an embodiment of the present invention;
[0064] Figure 3 A detailed flow chart of the air quality spatiotemporal prediction method based on a layered dynamic graph neural network provided by an embodiment of the present invention;
[0065] Figure 4 This is a block diagram of an air quality spatiotemporal prediction device based on a layered dynamic graph neural network provided by an embodiment of the present invention;
[0066] Figure 5 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0067] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0068] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as an "exemplary" in the present invention should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of the word "exemplary" is intended to present concepts in a concrete manner. Furthermore, in the embodiments of the present invention, "and / or" can mean both or either of the two.
[0069] In the embodiments of the present invention, sometimes a subscript such as W1 may be written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are the same.
[0070] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0071] The embodiment of the present invention provides a method for spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network. The method can be implemented by a spatiotemporal prediction device for air quality based on a hierarchical dynamic graph neural network. The spatiotemporal prediction device for air quality based on a hierarchical dynamic graph neural network can be a terminal or a server. Figure 1 The flow chart of the air quality spatiotemporal prediction method based on the hierarchical dynamic graph neural network is shown. The processing flow of the method may include the following steps:
[0072] S1. At each time step of the historical time series, feature extraction is performed for each monitoring station to obtain N meteorological variables;
[0073] In a feasible embodiment, the present invention provides a method for spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network. Figure 2 The network structure uses an encoder-decoder to model and predict the concentration of air pollutants (such as PM2.5). The encoder input includes multivariate data (meteorological variables, PM2.5 and other pollutant concentrations) at historical moments and a time encoding vector. The decoder recursively predicts PM2.5 concentrations at future moments based on the encoder's output hidden state and the future time encoding vector.
[0074] In a feasible implementation, in S1, at each time step of the historical time series, feature extraction is performed for each monitoring site to obtain N meteorological variables, including:
[0075] At each time step 𝑡 of the historical time series, for each monitoring station s, the observation values of N meteorological variables including temperature, humidity, wind speed, wind direction and air pressure are extracted , i=1,…,N, and the PM2.5 concentration value at that moment.
[0076] S2. For each monitoring site, a graph structure between variables is constructed at each time step t; a dynamic adjacency matrix is constructed by measuring the trend similarity between variables; and spatial-temporal learning of the graph structure between variables is performed based on the dynamic adjacency matrix;
[0077] In a feasible implementation, in S2, for each monitoring site, a graph structure between variables is constructed at each time step t, and a dynamic adjacency matrix is constructed by measuring the trend similarity between variables, including:
[0078] For each monitoring site s (s∈[0,S], where S represents the total number of sites), a graph structure between variables is constructed at each time step 𝑡 ;
[0079] in, It is a node in the graph, corresponding to the N meteorological variables of the monitoring site. Each node The attribute is the observed value of the variable at the current time step ; is the set of edges; It is a dynamic adjacency matrix, which indicates the strength of the dependency relationship between different nodes;
[0080] Perform moving average processing on the numerical sequence of each variable in the historical time of N variables , to remove high-frequency noise and extract stable trend features;
[0081] Based on the smoothed variable time series , calculate the trend similarity between any two variables in the time window, and use this as the basis for constructing the adjacency matrix between variables The basis for
[0082] Construct an adjacency matrix between variables based on trend similarity; each interval Step rolling update adjacency matrix to obtain dynamic adjacency matrix .
[0083] In one feasible implementation, in S2, the spatial-temporal learning of the graph structure between variables based on the dynamic adjacency matrix includes:
[0084] Based on dynamic adjacency matrix , according to the following formula (1) the variable graph structure Perform convolution operation:
[0085] (1)
[0086] in, is the adjacency matrix with self-loops added; for degree matrix of ; is the learnable graph convolution weight; is a nonlinear activation function; is the representation of the updated variable node; the adjacency matrix is used to guide the information transfer between nodes, so that each variable node can aggregate the feature information of its neighboring nodes, thereby obtaining a high-order representation that includes structural perception capabilities.
[0087] Concatenate the graph convolution outputs at different time steps t=1,…,T into a time series As the input of the gated recurrent unit; let the hidden state of GRU be , and its iterative calculation formula is:
[0088] (2).
[0089] S3. At each time step, for each monitoring site {1, 2, …, S}, a graph structure between sites is constructed; based on the graph structure between sites, a dynamic adjacency matrix is constructed at each time step; and based on the dynamic adjacency matrix, spatial-temporal learning of the graph structure between sites is performed;
[0090] In one feasible implementation, in S3, at each time step, a graph structure between sites is constructed for each monitoring site; and based on the graph structure between sites, a dynamic adjacency matrix is constructed at each time step, including:
[0091] At each time step 𝑡, a graph structure between sites is constructed for all monitoring sites {1,2,…,S} ;in Represents a monitoring site, whose attributes are determined by the hidden state of GRU Indicates the comprehensive environmental status of the site;
[0092] Initialize a node embedding matrix based on the graph structure between sites (S is the number of monitoring sites, is the embedding dimension) and a time embedding matrix (f is the time sampling rate, is the embedding dimension);
[0093] Embedding matrix from time by timestamp Retrieve the temporal information for each time step from ; use element-wise multiplication (Hadamard product) to embed the station's static embedding matrix and the retrieved temporal embedding matrix Multiply them together to get the enhanced node embedding matrix ;
[0094] use Further update the enhanced node embedding matrix and , and calculate the adjacency matrix based on the node embedding matrix , get the dynamic adjacency matrix:
[0095] (3).
[0096] In one feasible implementation, in S3, the spatial-temporal learning of the graph structure between sites is performed based on the dynamic adjacency matrix, including:
[0097] Based on dynamic adjacency matrix , and node attributes in the site graph ;
[0098] Use dilated convolution to perform convolution operations to extract spatial dependency information In order to fully capture the long-distance spatial dependency, a J-order diffusion convolution is used to multiply the node features with the forward and reverse transfer matrices, as expressed in the following formula (4):
[0099] (4).
[0100] in, is the learning weight corresponding to each order of diffusion; represents the maximum order of diffusion; represents the transfer matrix after j steps of forward diffusion, ; represents the transfer matrix after back diffusion j steps ; and are the initial-degree and in-degree diagonal matrices respectively;
[0101] Sequence the space representation at different moments As the input of GRU for time series modeling, the expression is as follows:
[0102] (5).
[0103] In one feasible implementation, the present invention employs a variable-level subgraph modeling mechanism to construct a variable graph within each monitoring site. Each meteorological variable is treated as a node in the graph, explicitly modeling the dependencies between variables. By performing graph convolution on the variable graph, a comprehensive representation of the site's internal structure is extracted. This representation serves as the feature of the site node and is then fed into the higher-level site graph for spatial modeling. This hierarchical graph design (variable graph → site graph) enables more fine-grained and structured spatial feature extraction.
[0104] This paper also designs a dynamic graph structure learning mechanism: Due to changes in the environment, we believe that the correlations between different nodes are also constantly changing, making the use of a fixed adjacency matrix inappropriate. Therefore, our method introduces a time-dependent adaptive graph structure learning mechanism. At both the variable graph and site graph levels, the adjacency matrix at each moment is dynamically generated based on the changing trends of historical data, node status, and time embedding.
[0105] S4. Construct a layered graph coding module based on S1-S3, introduce a residual connection mechanism in the stacking process of multiple layered graph coding modules, and obtain the output result of the layered graph coding module.
[0106] In one feasible implementation, the layered graph encoding module integrates a two-level structure of variable graph modeling and site graph modeling, and combines graph convolution with temporal modeling to extract multi-granular spatial-temporal features. To further enhance the model's expressiveness and training stability, a residual connection mechanism is introduced when stacking multiple layered graph encoding modules, effectively preserving the original input features while integrating higher-order features.
[0107] In one feasible implementation, in S4, a layered graph coding module is constructed based on S1-S3, and a residual connection mechanism is introduced in the stacking process of multiple layered graph coding modules to obtain the output result of the layered graph coding module, including:
[0108] A hierarchical graph encoding module is constructed based on S1-S3. The module integrates the two-level structures of variable graph modeling and site graph modeling, and combines graph convolution with temporal modeling to extract multi-granularity spatial-temporal features.
[0109] The residual connection mechanism is introduced in the process of stacking multiple layered graph coding modules. Let the input of the layered graph coding module at layer l be , the output is ; then the input of the next layer is given by the following formula:
[0110] (6).
[0111] S5. Extract information for each future prediction time step and obtain the time representation of that time step as the input of the decoder stage; use the output of the last layer of the hierarchical graph encoding module as the initial hidden state of the GRU, and recursively update the hidden state based on the information obtained at each prediction time step to obtain the dynamic characteristics of the node state evolving over time.
[0112] In one possible implementation, in real-world scenarios, meteorological variables for future time steps are not yet observed and therefore cannot be relied upon as model inputs. To ensure feasibility and generalizability of the model in real-world deployments, this method uses only temporal information as input for future time step predictions, without relying on any future meteorological observations.
[0113] In one possible implementation, for each future prediction time step , extract the daily embedding vector from the preset time embedding matrix according to the timestamp and Zhou embedding vector , and then splice the two together , which constitutes the temporal representation of that time step as the input to the decoder stage;
[0114] The output K of the last layer of hierarchical graph encoding module is used as the initial hidden state of GRU . Subsequently, at each prediction time step , the time context vector obtained in the previous step Input into the GRU network and recursively update the hidden state , capturing the dynamic characteristics of node state evolution over time:
[0115] (7).
[0116] S6 and GRU output the hidden state to the prediction module, which generates the predicted value for that time step and completes the spatiotemporal prediction of air quality based on the hierarchical dynamic graph neural network.
[0117] In one feasible implementation, in S6, the GRU outputs the hidden state to the prediction module, which generates the predicted value for the time step, completing the spatiotemporal prediction of air quality based on the hierarchical dynamic graph neural network, including:
[0118] The hidden state of the GRU output Input to the prediction module (such as a fully connected layer, linear regression layer, or other mapping function) to generate the predicted value for that time step:
[0119] (8)
[0120] in, Represents the target variable prediction results of each monitoring station in the next 𝐻 time steps. The detailed process of the present invention is as follows Figure 3 shown.
[0121] In an embodiment of the present invention, a multi-granularity spatiotemporal modeling architecture based on a hierarchical dynamic graph neural network is first provided. The architecture constructs a two-layer dynamic graph structure of a variable graph and a site graph, which are used to model the nonlinear correlation between multiple variables within the monitoring site and the spatial dependence between sites, respectively, to achieve multi-level information fusion and spatiotemporal feature expression.
[0122] Secondly, a hierarchical information interaction and collaborative modeling method for variable graphs and site graphs is provided. The high-dimensional graph-level representation of the variable graph is used as the node feature input of the site graph to achieve effective information fusion between the variable layer and the site layer, thereby enhancing the comprehensive understanding of pollution diffusion laws and prediction accuracy.
[0123] To address the challenges of existing technologies, the introduction of a dynamic adjacency matrix has become an effective modeling tool. This allows the model to adaptively adjust the graph structure at different time steps or samples, thereby capturing the complex, time-varying interactions between pollutants and meteorological variables. This mechanism not only captures the rapid changes in the coupling relationships between variables caused by sudden pollution events, but also helps model long-term dependencies such as seasonal variations and climate trends.
[0124] In contrast, the hierarchical graph neural network modeling framework proposed in this paper integrates the nonlinear synergistic relationships between variables within a site with the spatial structural connections between sites. Within each monitoring site, a "variable graph" is constructed, treating multiple pollutants and meteorological variables as nodes in the graph. A graph convolutional network (GCN) is used to model the complex interactions between variables and extract a high-dimensional graph-level representation. This graph representation of the variable graph is then used as the attribute input for nodes in the "site graph." A graph structure is further constructed at the site level, and a graph neural network is used to deeply explore the spatial dependencies and propagation characteristics between sites, thereby achieving multi-level modeling of the pollution evolution process.
[0125] Secondly, an adaptive learning method for a dynamic graph adjacency matrix is provided. By dynamically adjusting the graph structure connection between the variable graph and the site graph through a trainable dynamic graph adjacency matrix, the variable relationship and spatial propagation path that change over time can be adaptively captured, thereby improving the flexibility and expressiveness of the model.
[0126] By dynamically optimizing the graph structure's connectivity during model training, adaptive modeling of potential dependencies between monitoring sites is achieved. This mechanism adjusts adjacency relationships based on different time steps or sample characteristics, thereby improving the model's perception and responsiveness to changes in spatiotemporal structure. By incorporating dynamic graphs, the model can more accurately capture pollution transmission paths and dynamic interaction patterns between regions, effectively improving the flexibility and accuracy of air quality predictions and providing a more intelligent graph structure modeling solution for environmental monitoring and urban management.
[0127] Figure 4 This is a block diagram of an air quality spatiotemporal prediction device 300 based on a hierarchical dynamic graph neural network according to an exemplary embodiment. The device 300 is used for a method for spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network. Figure 4 The device includes a feature extraction module 310, a variable graph structure module 320, a site graph structure module 330, a layered graph encoding module 340, a decoding module 350, and a prediction module 360.
[0128] A feature extraction module 310 is used to perform feature extraction for each monitoring site at each time step of the historical time series to obtain N meteorological variables;
[0129] The variable graph structure module 320 is used to construct a graph structure between variables at each time step for each monitoring site; construct a dynamic adjacency matrix by measuring the trend similarity between variables; and perform space-time learning on the graph structure between variables based on the dynamic adjacency matrix;
[0130] The site graph structure module 330 is used to construct an inter-site graph structure for each monitoring site at each time step; and based on the inter-site graph structure, construct a dynamic adjacency matrix at each time step; and perform spatio-temporal learning on the inter-site graph structure based on the dynamic adjacency matrix;
[0131] A layered graph coding module 340 is configured to construct a layered graph coding module based on S1-S3, introduce a residual connection mechanism in the stacking process of multiple layered graph coding modules, and obtain an output result of the layered graph coding module;
[0132] The decoding module 350 is used to extract information for each future prediction time step and obtain the time representation of that time step as the input of the decoder stage; the output of the last layer of the layered graph encoding module is used as the initial hidden state of the GRU, and the hidden state is recursively updated based on the information obtained at each prediction time step to obtain the dynamic characteristics of the node state evolution over time;
[0133] The prediction module 360 is used for GRU to output the hidden state to the prediction module, and the prediction module generates the predicted value of the time step to complete the spatiotemporal prediction of air quality based on the hierarchical dynamic graph neural network.
[0134] Optionally, in S1, at each time step of the historical time series, feature extraction is performed for each monitoring site to obtain N meteorological variables, including:
[0135] At each time step of the historical time series, for each monitoring site s, the observed values of N meteorological variables including temperature, humidity, wind speed, wind direction and air pressure, as well as the PM2.5 concentration value at that moment, are extracted.
[0136] Optionally, in S2, for each monitoring site, a graph structure between variables is constructed at each time step t, and a dynamic adjacency matrix is constructed by measuring the trend similarity between variables, including:
[0137] For each monitoring site, a graph structure between variables is constructed at each time step;
[0138] Perform moving average processing on the numerical sequence of each variable in the historical time of N variables;
[0139] Based on the smoothed variable time series, calculate the trend similarity between any two variables within the time window;
[0140] Construct an adjacency matrix between variables based on trend similarity; each interval The adjacency matrix is updated in a rolling manner to obtain a dynamic adjacency matrix.
[0141] Optionally, in S2, spatial-temporal learning of the graph structure between variables is performed based on the dynamic adjacency matrix, including:
[0142] Perform convolution operations on variable graph structures based on dynamic adjacency matrices;
[0143] Concatenate the graph convolution outputs at different time steps into a time series as the input of the gated recurrent unit; set the hidden state of the GRU.
[0144] Optionally, in S3, at each time step, a graph structure between sites is constructed for each monitoring site; and based on the graph structure between sites, a dynamic adjacency matrix is constructed at each time step, including:
[0145] At each time step, a graph structure between sites is constructed for all monitoring sites;
[0146] Based on the graph structure between sites, initialize a node embedding matrix and a time embedding matrix;
[0147] Retrieve the time information of each time step from the time embedding matrix through the timestamp; multiply the static embedding matrix of the site and the retrieved time embedding matrix using element-wise multiplication to obtain the enhanced node embedding matrix;
[0148] The enhanced node embedding matrix is further updated using the hidden state of the GRU, and the adjacency matrix is calculated based on the node embedding matrix to obtain a dynamic adjacency matrix.
[0149] Optionally, in S3, spatial-temporal learning of the graph structure between sites is performed based on a dynamic adjacency matrix, including:
[0150] Based on the dynamic adjacency matrix and node attributes in the site graph, diffusive convolution is used to perform convolution operations to extract spatial dependency information;
[0151] The spatial representation sequences at different moments are used as the input of GRU for temporal modeling.
[0152] Optionally, in S4, a layered graph coding module is constructed based on S1-S3, and a residual connection mechanism is introduced in the stacking process of multiple layered graph coding modules to output K, including:
[0153] A hierarchical graph encoding module is constructed based on S1-S3. The hierarchical graph encoding module integrates the two-level structures of variable graph modeling and site graph modeling, and combines graph convolution with temporal modeling to extract multi-granularity spatial-temporal features.
[0154] The residual connection mechanism is introduced in the process of stacking multiple layered graph coding modules. Let the input of the layered graph coding module at layer l be , the output is ; then the input of the next layer is given by the following formula:
[0155] .
[0156] Optionally, in S5, information is extracted for each future prediction time step, and a time representation of the time step is obtained as input to the decoder stage; the output K of the last layer of the hierarchical graph encoding module is used as the initial hidden state of the GRU, and the hidden state is recursively updated based on the information obtained at each prediction time step to obtain dynamic features of the node state evolution over time, including:
[0157] For each future prediction time step, extract the daily embedding vector and weekly embedding vector from the preset time embedding matrix according to the timestamp, and then concatenate the two to form the time representation of the time step as the input of the decoder stage;
[0158] The output K of the last layer of hierarchical graph encoding module is used as the initial hidden state of GRU; at each prediction time step, the time context vector obtained in the previous step is input into the GRU network, and the hidden state is recursively updated to capture the dynamic characteristics of the node state evolving over time.
[0159] Optionally, in S6, the GRU outputs the hidden state to the prediction module, which generates the predicted value for the time step, completing the spatiotemporal prediction of air quality based on the hierarchical dynamic graph neural network, including:
[0160] The hidden state output by the GRU is fed into the prediction module to generate the predicted value for that time step:
[0161]
[0162] in, Represents the target variable prediction results of each monitoring station in the next 𝐻 time steps.
[0163] In the embodiment of the present invention, (1) by constructing a variable graph within the site, multiple pollutants and meteorological variables are regarded as nodes in the graph, and a graph neural network is used to deeply explore the nonlinear coupling and complex interaction relationships between variables, effectively capturing the synergy and potential impact between multiple variables, and significantly improving the expression ability and modeling accuracy of single-site characteristics.
[0164] (2) A trainable dynamic graph adjacency matrix mechanism is introduced to achieve dynamic optimization and updating of the site graph structure. This can adapt to the dynamic characteristics of pollution propagation paths and spatial dependencies between sites that change over time, enhance the model's ability to perceive and respond to spatiotemporal changes, and thus improve the flexibility and accuracy of predictions.
[0165] (3) Through a hierarchical structure, the high-dimensional graph-level representation of the variable graph is input into the site graph as node attributes, fusing the multi-granularity information of the variable and site layers to achieve cross-layer information interaction and collaborative modeling. This approach not only enhances the in-depth understanding of pollution diffusion patterns but also improves the model's ability to capture complex spatiotemporal dependencies.
[0166] (4) This method can flexibly adapt to changes in the number of different regions, stations, and pollutant types, making it easy to integrate with existing environmental monitoring systems. At the same time, the adaptive learning mechanism of the dynamic graph structure reduces the reliance on prior knowledge and manual composition, improving the robustness and automation level of the model in complex real-world scenarios, and providing reliable technical support for large-scale deployment and city-level air quality intelligent prediction.
[0167] Figure 5 is a schematic diagram of the structure of an air quality spatiotemporal prediction device based on a layered dynamic graph neural network provided by an embodiment of the present invention, such as Figure 5As shown, the air quality spatiotemporal prediction device based on the hierarchical dynamic graph neural network may include the above Figure 4 The air quality spatiotemporal prediction device based on a hierarchical dynamic graph neural network is shown. Optionally, the air quality spatiotemporal prediction device 410 based on a hierarchical dynamic graph neural network may include a first processor 2001.
[0168] Optionally, the air quality spatiotemporal prediction device 410 based on a hierarchical dynamic graph neural network may further include a memory 2002 and a transceiver 2003 .
[0169] The first processor 2001, the memory 2002 and the transceiver 2003 may be connected via a communication bus.
[0170] The following combination Figure 5 The components of the air quality spatiotemporal prediction device 410 based on a hierarchical dynamic graph neural network are specifically introduced:
[0171] The first processor 2001 is the control center of the hierarchical dynamic graph neural network-based spatiotemporal air quality prediction device 410 and can be a single processor or a collective term for multiple processing elements. For example, the first processor 2001 can be one or more central processing units (CPUs), or application-specific integrated circuits (ASICs), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more digital signal processors (DSPs) or one or more field programmable gate arrays (FPGAs).
[0172] Optionally, the first processor 2001 can perform various functions of the air quality spatiotemporal prediction device 410 based on the hierarchical dynamic graph neural network by running or executing a software program stored in the memory 2002 and calling data stored in the memory 2002.
[0173] In a specific implementation, as an embodiment, the first processor 2001 may include one or more CPUs, such as Figure 5 CPU0 and CPU1 are shown in FIG.
[0174] In a specific implementation, as an embodiment, the air quality spatiotemporal prediction device 410 based on a hierarchical dynamic graph neural network may also include multiple processors, such as Figure 51 and 2. The first processor 2001 and the second processor 2004 are shown in FIG. Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0175] The memory 2002 is used to store the software program for executing the solution of the present invention, and is controlled by the first processor 2001 for execution. The specific implementation method can refer to the above method embodiment and will not be repeated here.
[0176] Optionally, the memory 2002 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2002 may be integrated with the first processor 2001 or exist independently and access the interface circuit ( Figure 5 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0177] The transceiver 2003 is used to communicate with a network device or a terminal device.
[0178] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Figure 5 The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.
[0179] Optionally, the transceiver 2003 can be integrated with the first processor 2001 or can exist independently and communicate with the air quality spatiotemporal prediction device 410 based on a hierarchical dynamic graph neural network through an interface circuit ( Figure 5(not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0180] It should be noted that Figure 5 The structure of the air quality spatiotemporal prediction device 410 based on a hierarchical dynamic graph neural network shown in the figure does not constitute a limitation on the router. The actual knowledge structure recognition device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0181] In addition, the technical effects of the air quality spatiotemporal prediction device 410 based on a hierarchical dynamic graph neural network can refer to the technical effects of the air quality spatiotemporal prediction method based on a hierarchical dynamic graph neural network described in the above method embodiment, and will not be repeated here.
[0182] It should be understood that the first processor 2001 in the embodiment of the present invention may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc.
[0183] It should also be understood that the memory in the embodiments of the present invention may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0184] The above embodiments can be implemented in whole or in part via software, hardware (e.g., circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions or computer programs. When loaded or executed on a computer, the processes or functions described in accordance with the embodiments of the present invention are fully or partially performed. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable sensor. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired means (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server or data center that contains a collection of one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. The semiconductor media can be a solid-state drive.
[0185] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. A and B can be singular or plural. Furthermore, the character " / " as used herein generally indicates an "or" relationship between the associated objects, but it may also indicate an "and / or" relationship. For specific understanding, please refer to the context.
[0186] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0187] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0188] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0189] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0190] If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for causing a computer device (such as a personal computer, server, or network device) to execute all or part of the steps of the methods described in various embodiments of the present invention.
[0191] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for spatiotemporal prediction of air quality based on hierarchical dynamic graph neural network, characterized in that: The method comprises: S1. At each time step of the historical time series, feature extraction is performed for each monitoring station to obtain N meteorological variables; S2. For each monitoring site, a graph structure between variables is constructed at each time step. A dynamic adjacency matrix is constructed by measuring the trend similarity between variables. Spatial-temporal learning of the graph structure between variables is performed based on the dynamic adjacency matrix. S3. At each time step, a graph structure between sites is constructed for each monitoring site. Based on the graph structure between sites, a dynamic adjacency matrix is constructed at each time step. Spatial-temporal learning of the graph structure between sites is performed based on the dynamic adjacency matrix. S4. Construct a layered graph coding module based on S1-S3, introduce a residual connection mechanism in the process of stacking multiple layered graph coding modules, and obtain the output result of the layered graph coding module; S5. Extract information for each future prediction time step and obtain the time representation of that time step as the input of the decoder stage; use the output of the last layer of the hierarchical graph encoding module as the initial hidden state of the GRU, and recursively update the hidden state based on the information obtained at each prediction time step to obtain the dynamic characteristics of the node state evolution over time; S6 and GRU output the hidden state to the prediction module, which generates the predicted value for that time step and completes the spatiotemporal prediction of air quality based on the hierarchical dynamic graph neural network.
2. The air quality spatiotemporal prediction method based on a hierarchical dynamic graph neural network according to claim 1 is characterized in that: In S1, at each time step of the historical time series, feature extraction is performed for each monitoring site to obtain N meteorological variables, including: At each time step of the historical time series, for each monitoring site s, the observed values of N meteorological variables including temperature, humidity, wind speed, wind direction and air pressure, as well as the PM2.5 concentration value at that moment, are extracted.
3. The air quality spatiotemporal prediction method based on a hierarchical dynamic graph neural network according to claim 2, characterized in that: In S2, for each monitoring site, a graph structure between variables is constructed at each time step t, and a dynamic adjacency matrix is constructed by measuring the trend similarity between variables, including: For each monitoring site, a graph structure between variables is constructed at each time step; Perform moving average processing on the time series of each variable in the historical time of N variables; Based on the variable time series after moving average processing, calculate the trend similarity between any two variables within the time window; Construct an adjacency matrix between variables based on trend similarity; each interval The adjacency matrix is updated in a rolling manner to obtain a dynamic adjacency matrix.
4. The air quality spatiotemporal prediction method based on a hierarchical dynamic graph neural network according to claim 3 is characterized in that: In S2, the graph structure between variables is spatially and temporally learned based on the dynamic adjacency matrix, including: Perform convolution operations on variable graph structures based on dynamic adjacency matrices; Concatenate the graph convolution outputs at different time steps into a time series as the input of the gated recurrent unit; set the hidden state of the GRU.
5. The air quality spatiotemporal prediction method based on a hierarchical dynamic graph neural network according to claim 4 is characterized in that: In S3, at each time step, a graph structure between sites is constructed for each monitoring site; Based on the graph structure between sites, a dynamic adjacency matrix is constructed at each time step, including: At each time step, a graph structure between sites is constructed for all monitoring sites; Based on the graph structure between sites, initialize a node embedding matrix and a time embedding matrix; Retrieve the time information of each time step from the time embedding matrix through the timestamp; multiply the static embedding matrix of the site and the retrieved time embedding matrix using element-wise multiplication to obtain the enhanced node embedding matrix; The enhanced node embedding matrix is further updated using the hidden state of the GRU, and the adjacency matrix is calculated based on the node embedding matrix to obtain a dynamic adjacency matrix.
6. The air quality spatiotemporal prediction method based on a hierarchical dynamic graph neural network according to claim 5, characterized in that: In S3, the spatial-temporal learning of the graph structure between sites is performed based on the dynamic adjacency matrix, including: Based on the dynamic adjacency matrix and node attributes in the site graph, diffusive convolution is used to perform convolution operations to extract spatial dependency information; The spatial representation sequences at different moments are used as the input of GRU for temporal modeling.
7. The air quality spatiotemporal prediction method based on a layered dynamic graph neural network according to claim 6, characterized in that: In S4, a layered graph coding module is constructed based on S1-S3, and a residual connection mechanism is introduced in the stacking process of multiple layered graph coding modules to obtain the output result of the layered graph coding module, including: A hierarchical graph encoding module is constructed based on S1-S3. The hierarchical graph encoding module integrates the two-level structures of variable graph modeling and site graph modeling, and combines graph convolution with temporal modeling to extract multi-granularity spatial-temporal features. The residual connection mechanism is introduced in the process of stacking multiple layered graph coding modules. Let the input of the layered graph coding module at layer l be , the output is ; then the input of the next layer is given by the following formula: 。 8. The method for spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network according to claim 7, characterized in that: In S5, information is extracted for each future prediction time step, and the time representation of that time step is obtained as the input of the decoder stage. The output of the last layer of the layered graph encoding module is used as the initial hidden state of the GRU, and the hidden state is recursively updated based on the information obtained at each prediction time step to obtain the dynamic characteristics of the node state evolution over time, including: For each future prediction time step, extract the daily embedding vector and weekly embedding vector from the preset time embedding matrix according to the timestamp, and then concatenate the two to form the time representation of the time step as the input of the decoder stage; The output K of the last layer of hierarchical graph encoding module is used as the initial hidden state of GRU; at each prediction time step, the time context vector obtained in the previous step is input into the GRU network, and the hidden state is recursively updated to capture the dynamic characteristics of the node state evolving over time.
9. The air quality spatiotemporal prediction method based on a hierarchical dynamic graph neural network according to claim 7, characterized in that: In S6, the GRU outputs the hidden state to the prediction module, which then generates the predicted value for that time step, completing the spatiotemporal prediction of air quality based on the hierarchical dynamic graph neural network, including: The hidden state output by the GRU is fed into the prediction module to generate the predicted value for that time step: ; in, Represents the target variable prediction results of each monitoring station in the next 𝐻 time steps.
10. A device for spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network, wherein the device is used to implement the method for spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network according to any one of claims 1 to 9, characterized in that: The device comprises: The feature extraction module is used to extract features for each monitoring site at each time step of the historical time series to obtain N meteorological variables; The variable graph structure module is used to construct a graph structure between variables at each time step for each monitoring site. It also constructs a dynamic adjacency matrix by measuring the trend similarity between variables. It also performs spatial-temporal learning on the graph structure between variables based on the dynamic adjacency matrix. The site graph structure module is used to build an inter-site graph structure for each monitoring site at each time step; and based on the inter-site graph structure, a dynamic adjacency matrix is built at each time step; and the graph structure between sites is subjected to spatial-temporal learning based on the dynamic adjacency matrix; A layered graph coding module is used to construct a layered graph coding module based on S1-S3, introduce a residual connection mechanism in the stacking process of multiple layered graph coding modules, and obtain the output result of the layered graph coding module; The decoding module is used to extract information for each future prediction time step and obtain the time representation of that time step as the input of the decoder stage. The output of the last layer of the layered graph encoding module is used as the initial hidden state of the GRU. The hidden state is recursively updated based on the information obtained at each prediction time step to obtain the dynamic characteristics of the node state evolution over time. The prediction module is used to output the hidden state of GRU to the prediction module, which produces the predicted value of the time step and completes the spatiotemporal prediction of air quality based on the hierarchical dynamic graph neural network.
Citation Information
Patent Citations
Traffic flow prediction method based on space-time hypergraph neural network
CN114944053A
Air pollutant concentration prediction method and system based on space-time diagram
CN115629160A
Traffic flow prediction method based on hierarchical dynamic residual map convolutional network
CN116110232A
Multivariate time series prediction method based on graph neural network and Transform
CN117113054A
Rail transit station short-time passenger flow prediction method and system based on spatial-temporal characteristics
CN118690930A
Cited By
Tidal station water level prediction method based on hybrid adaptive graph structure
CN121071615A