Air quality spatiotemporal 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 optimizing the graph structure, the problems of multivariate correlations and dynamic changes in pollution propagation in air quality prediction models are solved, achieving high-precision and flexible air quality prediction.
Patent Information
- Application Number
- CN202511154592.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-18
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-08-18
AI Technical Summary
Existing air quality prediction models are unable to effectively model the complex multivariate relationships within monitoring stations and the dynamic spread of pollution between stations. Furthermore, static graphs are unable to reflect temporal dynamics, limiting the model's ability to express time-series dependencies.
A hierarchical dynamic graph neural network approach is adopted to construct a two-layer dynamic graph structure consisting of a variable graph and a site graph. Spatial-temporal learning is performed through a dynamic adjacency matrix, a residual connection mechanism is introduced, and the information interaction between the variable layer and the site layer is integrated to achieve adaptive modeling of spatiotemporal dependencies.
It significantly improves the ability to express features at a single site and the accuracy of modeling, enhances the model's ability to perceive and respond to spatiotemporal changes, improves the flexibility and accuracy of prediction, adapts to changes in different regions and pollutant types, and facilitates integration with existing environmental monitoring systems.
Smart Images

Figure CN120724852B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of environmental science and technology, and in particular to a method and apparatus for spatiotemporal prediction of air quality based on hierarchical dynamic graph neural networks. Background Technology
[0002] To achieve effective air quality monitoring and early warning, accurate PM2.5 prediction has become one of the key issues in current environmental monitoring and smart city management.
[0003] In traditional research, PM2.5 concentration prediction is mainly based on physicochemical coupling 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. Although these methods have certain advantages in mechanism modeling, they generally suffer from problems such as complex parameter configuration, high sensitivity to initial and boundary conditions, and high computational resource consumption. Furthermore, their prediction accuracy is limited in high spatiotemporal resolution prediction scenarios, making it difficult to meet current practical needs for high accuracy, real-time performance, and scalability.
[0004] To overcome the aforementioned problems, data-driven methods have gradually become a hot topic in PM2.5 concentration prediction research in recent years. These methods no longer rely on complex atmospheric physical process modeling, but instead directly predict future PM2.5 concentrations by mining time-series patterns in historical monitoring data. Common models include traditional statistical methods, such as the Autoregressive Integrated Moving Average (ARIMA) model, and deep learning-based models, such as Recurrent Neural Networks (RNNs), Long Short-Term Memory (LSTM) networks, Gated Recurrent Units (GRUs), and Transformers. These methods typically treat PM2.5 concentration prediction as a typical time-series modeling problem, focusing primarily on the evolution of features over time. However, modeling solely from a time perspective has significant limitations in practical applications. Due to the significant spatial diffusion and long-distance transport characteristics of PM2.5, the pollution level in a given area is often significantly influenced by pollution sources in surrounding or even distant regions. Therefore, PM2.5 concentration prediction should be regarded as a spatiotemporal co-modeling problem, which requires capturing the dynamic evolution characteristics over time and considering the spatial dependencies between different regions, so as to achieve more accurate prediction results with practical application value.
[0005] In recent years, numerous patents have explored in-depth research into the spatiotemporal modeling problem in PM2.5 concentration prediction. For example, CN115629160A, "A Method and System for Predicting Air Pollutant Concentration Based on Spatiotemporal Graphs," proposes combining Graph Convolutional Networks (GCNs) with LSTMs to achieve joint modeling using spatial relationships and temporal series features between monitoring stations. CN114694767B, "A PM2.5 Concentration Prediction Method Based on Spatiotemporal Graph Ordinary Differential Equation Networks," enhances the 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," integrates a spatiotemporal attention mechanism, effectively enhancing the model's ability to perceive information from key moments and key areas. These research results demonstrate that modeling methods that integrate spatial structure and temporal dynamic features have significant advantages in improving prediction accuracy and model generalization ability.
[0006] In recent years, Graph Neural Networks (GNNs) have gradually become an important tool in the field of spatiotemporal data modeling due to their ability to model complex dependencies between nodes in non-Euclidean spaces. In air quality prediction tasks, existing research typically uses air quality monitoring stations as the smallest modeling unit, constructing a "station graph" to capture spatial structural features. In this graph, nodes represent different monitoring stations, and edges are constructed based on geographical proximity or functional similarity (such as road connections, wind direction paths, etc.). 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 achieve joint modeling of unstructured spatial and temporal series information, effectively capturing the long-term spatiotemporal dependence characteristics of air quality. Meanwhile, 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, further introducing a multi-adversarial graph learning mechanism to model the cross-modal and cross-spatial autocorrelation relationships between air quality and weather monitoring data, and improve robustness to spatiotemporal noise propagation. These graph neural network-based methods have been widely applied in practical scenarios such as urban air quality prediction, achieving significant results.
[0007] However, the aforementioned methods generally neglect the inherent structural and interactive relationships between pollutants and meteorological variables within a site. In actual environmental monitoring, a single site often records multiple meteorological factors (such as temperature, humidity, and wind speed) simultaneously, and these variables exhibit significant coupling and nonlinear interaction effects. Constructing a graph structure solely based on site information is insufficient to fully explore the synergistic patterns among variables within a site and their driving mechanisms for pollution evolution. To alleviate these problems, some recent studies have introduced attention mechanisms based on the Transformer architecture, such as the SageFormer model, attempting to model the dependencies between multiple variables from a time-series perspective; FourierGNN treats the variable dimension as nodes to construct a variable graph and extracts temporal features between variables through graph convolution. However, these methods typically lack a systematic graph structure design, making it difficult to extract graph-level representations of the variable graph, and failing to achieve effective synergy between the variable-level graph structure and the site-level spatial graph structure, thus limiting overall modeling capabilities.
[0008] In addition, the correlation between variables often changes significantly over time, and static graphs are difficult to reflect this temporal dynamics, limiting the model's ability to express temporal dependencies. Summary of the Invention
[0009] To address the shortcomings of existing air quality prediction models in modeling complex multivariate relationships within monitoring stations and the dynamic propagation of pollution between stations, this invention provides a spatiotemporal air quality prediction method and apparatus based on a hierarchical dynamic graph neural network. The technical solution is as follows:
[0010] On the one hand, a spatiotemporal prediction method for air quality based on a hierarchical dynamic graph neural network is provided, characterized in that the method includes:
[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 station, construct a graph structure between variables at each time step; and construct a dynamic adjacency matrix by measuring the trend similarity between variables; perform spatial-temporal learning on the graph structure between variables based on the dynamic adjacency matrix;
[0013] S3. At each time step, construct a graph structure between monitoring stations for each station; and based on the graph structure between stations, construct a dynamic adjacency matrix at each time step; and perform spatial-temporal learning on the graph structure between stations based on the dynamic adjacency matrix.
[0014] S4. Based on S1-S3, construct a layered graph coding module. In the process of stacking multiple layered graph coding modules, introduce a residual connection mechanism to 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 coding module as the initial hidden state of GRU, and recursively update the hidden state based on the information obtained at each prediction time step to obtain the dynamic features of the node state evolution over time.
[0016] S6 and GRU output the hidden state to the prediction module, which then produces the predicted value for that time step, thus completing the spatiotemporal prediction of air quality based on a 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 station to obtain N meteorological variables, including:
[0018] At each time step of the historical time series, for each monitoring station 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 station, 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 station, construct a graph structure between variables at each time step;
[0021] Perform a moving average on the numerical sequence of each of the N variables over a historical period;
[0022] Based on the smoothed time series of variables, 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 step by step to obtain a dynamic adjacency matrix.
[0024] Optionally, in S2, spatial-temporal learning is performed on the graph structure between variables based on the dynamic adjacency matrix, including:
[0025] Convolution operation on variable graph structure based on dynamic adjacency matrix;
[0026] The graph convolution outputs at different time steps are concatenated into a time series and used as the input to the gated recurrent unit; the hidden state of the GRU is set.
[0027] Optionally, in S3, at each time step, a graph structure between monitoring stations is constructed for each monitoring station; and based on the graph structure between stations, a dynamic adjacency matrix is constructed at each time step, including:
[0028] At each time step, a graph structure is built between all monitoring stations;
[0029] Based on the graph structure between sites, initialize a node embedding matrix and a time embedding matrix;
[0030] The time information for each time step is retrieved from the time embedding matrix using timestamps; the static embedding matrix of the site and the retrieved time embedding matrix are multiplied by element-wise multiplication to obtain the enhanced node embedding matrix;
[0031] The enhanced node embedding matrix is further updated using the hidden state of GRU, and the adjacency matrix is calculated based on the node embedding matrix to obtain the dynamic adjacency matrix.
[0032] Optionally, in S3, spatial-temporal learning of the graph structure between sites is performed based on the dynamic adjacency matrix, including:
[0033] Based on the dynamic adjacency matrix and node attributes in the site graph, a diffraction convolution operation is used to extract spatial dependency information.
[0034] Temporal modeling is performed by using spatial representation sequences at different times as input to GRU.
[0035] Optionally, in S4, a layered graph coding module is constructed based on S1-S3. A residual connection mechanism is introduced during the stacking of multiple layered graph coding modules to obtain the output results of the layered graph coding module, including:
[0036] A hierarchical graph coding module is constructed based on S1-S3; the hierarchical graph coding module integrates two-level structures of variable graph modeling and site graph modeling, and combines graph convolution and temporal modeling to extract multi-granularity spatial-temporal features;
[0037] A residual connection mechanism is introduced during the stacking of multiple layered graph coding modules. Let the input of the l-th layered graph coding module be... The output is The input for the next layer is then given by the following formula:
[0038] .
[0039] Optionally, in S5, information is extracted for each future prediction time step to obtain the temporal representation of that time step as input to the decoder stage; the output of the last layer of the hierarchical graph coding 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 features of the node state evolution over time, including:
[0040] For each future prediction time step, the daily embedding vector and weekly embedding vector are extracted from the preset time embedding matrix based on the timestamp, and then the two are concatenated to form the time representation of that time step, which is used as the input of the decoder stage.
[0041] The output K of the last layer of the graph encoding module is used as the initial hidden state of GRU. At each prediction time step, the temporal context vector obtained in the previous step is input into the GRU network to recursively update the hidden state and capture the dynamic features of the node state evolution over time.
[0042] Optionally, in S6, the GRU outputs the hidden state to the prediction module, which then produces the predicted value for that time step, completing the spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network, including:
[0043] The hidden state output by the GRU is input into the prediction module to generate the predicted value for that time step:
[0044]
[0045] in, This indicates the predicted target variable for each monitoring station in the next K time steps.
[0046] On the other hand, a spatiotemporal air quality prediction device based on a hierarchical dynamic graph neural network is provided. This device is applied to a spatiotemporal air quality prediction method based on a hierarchical dynamic graph neural network. The device includes:
[0047] The feature extraction module is used to extract features for each monitoring station at each time step of the historical time series, and obtain N meteorological variables;
[0048] The variable graph structure module is used to construct the graph structure between variables at each time step for each monitoring station; and to construct a dynamic adjacency matrix by measuring the trend similarity between variables; and to perform spatial-temporal learning on the graph structure between variables based on the dynamic adjacency matrix.
[0049] The site graph structure module is used to construct the graph structure between each monitoring site at each time step; and to construct a dynamic adjacency matrix at each time step based on the graph structure between sites; and to perform spatial-temporal learning on the graph structure between sites based on the dynamic adjacency matrix.
[0050] The layered graph coding module is used to construct a layered graph coding module based on S1-S3. A residual connection mechanism is introduced during the stacking of multiple layered graph coding modules to obtain the output results 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 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 the dynamic features of the node state evolution over time.
[0052] The prediction module is used to output the hidden state of the GRU to the prediction module, and the prediction module produces the predicted value for that time step to complete the spatiotemporal prediction of air quality based on the hierarchical dynamic graph neural network.
[0053] On the other hand, an air quality spatiotemporal prediction device based on a hierarchical dynamic graph neural network is provided. The air quality spatiotemporal prediction device based on a hierarchical dynamic graph neural network includes: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, they implement any of the methods described above for air quality spatiotemporal prediction based on a hierarchical dynamic graph neural network.
[0054] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored therein, the at least one instruction being loaded and executed by a processor to implement any of the above-described methods for spatiotemporal prediction of air quality based on hierarchical dynamic graph neural networks.
[0055] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:
[0056] In this embodiment of the invention, addressing the problem that existing air quality prediction models struggle to effectively model complex multivariate relationships within air quality monitoring stations and the dynamic changes in pollution propagation between stations, this paper proposes a hierarchical dynamic graph neural network modeling method. This method integrates information interaction between the variable layer and the station 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, multiple pollutants and meteorological variables are regarded as nodes in the graph. The graph neural network is used to explore the nonlinear coupling and complex interaction between variables, effectively capturing the synergistic effect and potential impact between multiple variables, and significantly improving the expressive power and modeling accuracy of single site features.
[0058] (2) Introducing a trainable dynamic graph adjacency matrix mechanism enables dynamic optimization and updating of the site graph structure, which can adapt to the dynamic characteristics of pollution propagation paths and spatial dependencies between sites changing over time, enhances the model's ability to perceive and respond to spatiotemporal changes, and thus improves the flexibility and accuracy of prediction.
[0059] (3) By using a hierarchical structure, the high-dimensional graph-level representation of the variable graph is input as node attributes into the site graph, integrating multi-granular information from the variable layer and the site layer to achieve cross-layer information interaction and collaborative modeling. This method 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 different regions, number of stations, and types of pollutants, 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 graph construction, improves the robustness and automation level of the model in complex real-world scenarios, and provides reliable technical support for large-scale deployment and intelligent prediction of city-level air quality. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0062] Figure 1 This is a flowchart of the spatiotemporal prediction method for air quality based on a hierarchical dynamic graph neural network provided in an embodiment of the present invention;
[0063] Figure 2 A schematic diagram of the layered diagram established according to an embodiment of the present invention;
[0064] Figure 3 A detailed flowchart of the spatiotemporal prediction method for air quality based on a hierarchical dynamic graph neural network provided in this embodiment of the invention;
[0065] Figure 4 This is a block diagram of an air quality spatiotemporal prediction device based on a hierarchical dynamic graph neural network provided in an embodiment of the present invention;
[0066] Figure 5 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0067] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0068] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0069] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0070] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0071] This invention provides a spatiotemporal air quality prediction method based on a hierarchical dynamic graph neural network. This method can be implemented by a spatiotemporal air quality prediction device based on a hierarchical dynamic graph neural network, which can be a terminal or a server. For example... Figure 1 The flowchart shown is for a spatiotemporal prediction method for air quality based on a hierarchical dynamic graph neural network. The processing flow of this 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 one feasible implementation, the present invention provides a spatiotemporal prediction method for air quality based on a hierarchical dynamic graph neural network, wherein the hierarchical graph is as follows: Figure 2 As shown, the network structure employs an encoder-decoder architecture to model and predict the concentration of air pollutants (such as PM2.5). The encoder's input includes multivariate data from historical moments (meteorological variables, PM2.5 concentrations, etc.) and time-coded vectors. The decoder, based on the encoder's output hidden state and future time-coded vectors, recursively predicts the PM2.5 concentration at future moments.
[0074] In one feasible implementation, in S1, at each time step of the historical time series, feature extraction is performed for each monitoring station to obtain N meteorological variables, including:
[0075] At each time step t in the historical time series, for each monitoring station s, the observed 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 time.
[0076] S2. For each monitoring station, construct a graph structure between variables at each time step t; and construct a dynamic adjacency matrix by measuring the trend similarity between variables; perform spatial-temporal learning on the graph structure between variables based on the dynamic adjacency matrix;
[0077] In one feasible implementation, in S2, for each monitoring station, 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 station s (s∈[0,S], where S represents the total number of stations), construct a graph structure between variables at each time step . ;
[0079] in, The nodes in the diagram correspond to N meteorological variables for each monitoring station. The attribute is the observed value of the variable at the current time step. ; It is the set of edges; It is a dynamic adjacency matrix, representing the strength of the dependency relationship between different nodes;
[0080] Perform a moving average on the numerical sequence of each of the N variables over a historical period. To remove high-frequency noise and extract stable trend features;
[0081] Based on smoothed variable time series Calculate the trend similarity between any two variables within the given time window, and use this as the basis for constructing the adjacency matrix between variables. The basis;
[0082] Construct an adjacency matrix between variables based on trend similarity; each interval The adjacency matrix is updated step by step to obtain the dynamic adjacency matrix. .
[0083] In one feasible implementation, in S2, spatial-temporal learning of the graph structure between variables is performed based on the dynamic adjacency matrix, including:
[0084] Based on dynamic adjacency matrix According to the following formula (1), the variable graph structure Perform convolution operations:
[0085] (1)
[0086] in, The adjacency matrix with self-loops; for The degree matrix; For learnable graph convolution weights; It is a non-linear activation function; This is the updated representation of the variable nodes; the adjacency matrix is used to guide the information transfer between nodes, enabling each variable node to aggregate the feature information of its neighboring nodes, thereby obtaining a high-order representation with structure awareness.
[0087] The graph convolution outputs at different time steps t=1,…,T are concatenated to form a time series. As input to the gated recurrent unit; let the hidden state of the GRU be... Its iterative calculation formula is:
[0088] (2).
[0089] S3. At each time step, construct a graph structure between monitoring stations {1,2,…,S}; and based on the graph structure between stations, construct a dynamic adjacency matrix at each time step; and perform spatial-temporal learning on the graph structure between stations based on the dynamic adjacency matrix.
[0090] In one feasible implementation, in S3, at each time step, a graph structure between monitoring stations is constructed for each station; and based on the graph structure between stations, a dynamic adjacency matrix is constructed at each time step, including:
[0091] At each time step , construct a graph structure between all monitoring stations {1,2,…,S}. ;in This indicates a monitoring station, whose attributes are determined by the hidden state of the GRU. This indicates the overall environmental condition of the site;
[0092] Based on the graph structure between sites, initialize a node embedding matrix. (S represents the number of monitoring stations,) (for the embedding dimension) and a time embedding matrix (f is the time sampling rate, (for the embedded dimension);
[0093] From the time embedding matrix using timestamps Retrieve time information for each time step; use element-wise multiplication (Hadamard product) to construct the static embedding matrix of the site. and the retrieved temporal embedding matrix Multiplying them yields the enhanced node embedding matrix. ;
[0094] use Further update the enhanced node embedding matrix, and based on the node embedding matrix... And calculate the adjacency matrix based on the node embedding matrix. Obtain the dynamic adjacency matrix:
[0095] (3).
[0096] In one feasible implementation, in S3, spatial-temporal learning of the graph structure between stations is performed based on the dynamic adjacency matrix, including:
[0097] Based on dynamic adjacency matrix and node attributes in the site map ;
[0098] Diffusion convolution is used to perform convolution operations to extract spatial dependency information. To fully capture long-distance spatial dependencies, J-order diffusion convolution is used to multiply the node features with the forward and reverse transition matrices, as expressed in the following formula (4):
[0099] (4).
[0100] in, The learning weights are for each level of diffusion. Indicates the maximum order of diffusion; This represents the transition matrix after j steps of forward diffusion. ; This represents the transition matrix after j steps of back-diffusion. ; and Diagonal matrices with initial and in-degree respectively;
[0101] Spatial representation sequence at different times As input to GRU for timing modeling, the expression is as follows: (5)
[0102] (5).
[0103] In one feasible implementation, this invention designs a variable-level subgraph modeling mechanism, further constructing a variable graph within each monitoring station. 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 reflecting the internal structure of the station is extracted and used as a feature of that station node, inputting it into a higher-level station graph for spatial modeling. This hierarchical graph structure design (variable graph → station graph) achieves finer-grained and more structured spatial feature extraction.
[0104] This invention also designs a dynamic graph structure learning mechanism: because of environmental changes, we believe that the correlation between different nodes is constantly changing, making the method of using a fixed adjacency matrix unsuitable. Therefore, our method introduces a time-dynamically adaptive graph structure learning mechanism. At both the variable graph and site graph levels, the adjacency matrix is dynamically generated at each time step based on historical data trends, node states, and temporal embeddings.
[0105] S4. Based on S1-S3, construct a layered graph coding module. In the process of stacking multiple layered graph coding modules, introduce a residual connection mechanism to obtain the output result of the layered graph coding module.
[0106] In one feasible implementation, the hierarchical graph encoding module integrates a two-level structure of variable graph modeling and site graph modeling, and combines graph convolution and temporal modeling to extract multi-granularity spatial-temporal features. To further enhance the model's expressive power and training stability, a residual connection mechanism is introduced during the stacking of multiple hierarchical graph encoding modules, achieving effective preservation of original input features and fusion of higher-order features.
[0107] In one feasible implementation, in S4, a layered graph coding module is constructed based on S1-S3. A residual connection mechanism is introduced during the stacking of multiple layered graph coding modules to obtain the output result of the layered graph coding module, including:
[0108] A hierarchical graph coding module is constructed based on S1-S3; the module integrates a two-level structure of variable graph modeling and site graph modeling, and combines graph convolution and temporal modeling to extract multi-granularity spatial-temporal features;
[0109] A residual connection mechanism is introduced during the stacking of multiple layered graph coding modules. Let the input of the l-th layered graph coding module be... The output is The input for the next layer is then 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 coding module as the initial hidden state of GRU, and recursively update the hidden state based on the information obtained at each prediction time step to obtain the dynamic features of the node state evolution over time.
[0112] In one feasible implementation, in real-world applications, meteorological variables for future time steps have not yet been observed and therefore cannot be relied upon as model input. To ensure the model's feasibility and generalization ability in real-world deployments, this method uses only time information as input during the prediction process for future time steps, without relying on any future meteorological observations.
[0113] In one feasible implementation, for each future prediction time step Extract the day embedding vector from the preset time embedding matrix based on the timestamp. and week embedding vector Then the two are spliced together. The time representation of that time step serves as the input to the decoder stage;
[0114] The output K of the last layer of the graph coding module is used as the initial hidden state of the GRU. Subsequently, at each prediction time step The time context vector obtained in the previous step Input is fed into the GRU network, and the hidden state is updated recursively. Capture the dynamic characteristics of node state evolution over time:
[0115] (7).
[0116] S6 and GRU output the hidden state to the prediction module, which then produces the predicted value for that time step, thus completing the spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network.
[0117] In one feasible implementation, 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 a hierarchical dynamic graph neural network, including:
[0118] Hidden state of GRU output The input is fed into the prediction module (such as a fully connected layer, a linear regression layer, or other mapping function) to generate the predicted value for that time step:
[0119] (8)
[0120] in, This represents the predicted target variable results for each monitoring station in the next K time steps. The detailed process of this invention is as follows: Figure 3 As shown.
[0121] In this embodiment of the invention, a multi-granularity spatiotemporal modeling architecture based on a hierarchical dynamic graph neural network is first provided. This architecture constructs a two-layer dynamic graph structure of variable graph and site graph, which are used to model the nonlinear correlation of multiple variables within the monitoring site and the spatial dependence between sites, respectively, so as to realize multi-level information fusion and spatiotemporal feature expression.
[0122] Secondly, a hierarchical information interaction and collaborative modeling method for variable maps and site maps is provided. The high-dimensional graph-level representation of the variable map is used as the node feature input of the site map, realizing effective information fusion between the variable layer and the site layer, and enhancing the comprehensive understanding and prediction accuracy of pollution diffusion patterns.
[0123] Addressing the limitations of existing technologies, the introduction of dynamic adjacency matrices has become an effective modeling approach. Dynamic adjacency matrices allow models to adaptively adjust their graph structure at different time steps or for different samples, thereby capturing the complex, time-varying interactions between pollutants and meteorological variables. This mechanism not only characterizes 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 invention integrates the nonlinear collaborative relationships between variables within a monitoring station and the spatial structural connections between stations. Within each monitoring station, a "variable graph" is constructed, treating various pollutants and meteorological variables as nodes in the graph. The complex interaction relationships between variables are modeled using a graph convolutional network (GCN), and a high-dimensional graph-level representation is extracted. Subsequently, the graph representation of the variable graph is used as the attribute input of the nodes in the "station graph," further constructing the graph structure at the station level. The graph neural network is then used to deeply mine the spatial dependencies and propagation characteristics between stations, thereby achieving multi-level modeling of the pollution evolution process.
[0125] Secondly, an adaptive learning method for dynamic graph adjacency matrices is provided. By dynamically adjusting the graph structure connections of the variable graph and the site graph through a trainable dynamic graph adjacency matrix, the adaptive capture of the changes in variable relationships and spatial propagation paths over time is achieved, thereby improving the flexibility and expressive power of the model.
[0126] By dynamically optimizing the graph structure connectivity during model training, adaptive modeling of potential dependencies between monitoring stations is achieved. This mechanism adjusts adjacency relationships based on different time steps or sample characteristics, thereby enhancing the model's ability to perceive and respond to changes in spatiotemporal structure. The introduction of dynamic graphs enables the model to more accurately capture pollution propagation paths and dynamic interaction patterns between regions, effectively improving the flexibility and accuracy of air quality prediction 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 an air quality spatiotemporal prediction method based on a hierarchical dynamic graph neural network. (Refer to...) Figure 4 The device includes a feature extraction module 310, a variable graph structure module 320, a site graph structure module 330, a hierarchical graph encoding module 340, a decoding module 350, and a prediction module 360. Wherein:
[0128] The feature extraction module 310 is used to extract features for each monitoring station at each time step of the historical time series and obtain N meteorological variables;
[0129] The variable graph structure module 320 is used to construct the graph structure between variables at each time step for each monitoring station; and to construct a dynamic adjacency matrix by measuring the trend similarity between variables; and to perform spatial-temporal learning on the graph structure between variables based on the dynamic adjacency matrix.
[0130] The site graph structure module 330 is used to construct the graph structure between each monitoring site at each time step; and to construct a dynamic adjacency matrix at each time step based on the graph structure between sites; and to perform spatial-temporal learning on the graph structure between sites based on the dynamic adjacency matrix.
[0131] The layered graph coding module 340 is used to construct a layered graph coding module based on S1-S3. A residual connection mechanism is introduced during the stacking of multiple layered graph coding modules to obtain the output results 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 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 the dynamic features of the node state evolution over time.
[0133] The prediction module 360 is used to output the hidden state of the GRU to the prediction module, and the prediction module produces the predicted value for that 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 station to obtain N meteorological variables, including:
[0135] At each time step of the historical time series, for each monitoring station 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 station, 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 station, construct a graph structure between variables at each time step;
[0138] Perform a moving average on the numerical sequence of each of the N variables over a historical period;
[0139] Based on the smoothed time series of variables, 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 step by step to obtain a dynamic adjacency matrix.
[0141] Optionally, in S2, spatial-temporal learning is performed on the graph structure between variables based on the dynamic adjacency matrix, including:
[0142] Convolution operation on variable graph structure based on dynamic adjacency matrix;
[0143] The graph convolution outputs at different time steps are concatenated into a time series and used as the input to the gated recurrent unit; the hidden state of the GRU is set.
[0144] Optionally, in S3, at each time step, a graph structure between monitoring stations is constructed for each monitoring station; and based on the graph structure between stations, a dynamic adjacency matrix is constructed at each time step, including:
[0145] At each time step, a graph structure is built between all monitoring stations;
[0146] Based on the graph structure between sites, initialize a node embedding matrix and a time embedding matrix;
[0147] The time information for each time step is retrieved from the time embedding matrix using timestamps; the static embedding matrix of the site and the retrieved time embedding matrix are multiplied by element-wise multiplication to obtain the enhanced node embedding matrix;
[0148] The enhanced node embedding matrix is further updated using the hidden state of GRU, and the adjacency matrix is calculated based on the node embedding matrix to obtain the dynamic adjacency matrix.
[0149] Optionally, in S3, spatial-temporal learning of the graph structure between sites is performed based on the dynamic adjacency matrix, including:
[0150] Based on the dynamic adjacency matrix and node attributes in the site graph, a diffraction convolution operation is used to extract spatial dependency information.
[0151] Temporal modeling is performed by using spatial representation sequences at different times as input to GRU.
[0152] Optionally, in S4, a hierarchical graph coding module is constructed based on S1-S3. A residual connection mechanism is introduced during the stacking of multiple hierarchical graph coding modules, and the output K includes:
[0153] A hierarchical graph coding module is constructed based on S1-S3; the hierarchical graph coding module integrates two-level structures of variable graph modeling and site graph modeling, and combines graph convolution and temporal modeling to extract multi-granularity spatial-temporal features;
[0154] A residual connection mechanism is introduced during the stacking of multiple layered graph coding modules. Let the input of the l-th layered graph coding module be... The output is The input for the next layer is then given by the following formula:
[0155] .
[0156] Optionally, in S5, information is extracted for each future prediction time step to obtain the temporal representation of that time step as input to the decoder stage; the output K of the last layer of the hierarchical graph coding 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 features of the node state evolution over time, including:
[0157] For each future prediction time step, the daily embedding vector and weekly embedding vector are extracted from the preset time embedding matrix based on the timestamp, and then the two are concatenated to form the time representation of that time step, which is used as the input of the decoder stage.
[0158] The output K of the last layer of the graph encoding module is used as the initial hidden state of GRU. At each prediction time step, the temporal context vector obtained in the previous step is input into the GRU network to recursively update the hidden state and capture the dynamic features of the node state evolution over time.
[0159] Optionally, in S6, the GRU outputs the hidden state to the prediction module, which then produces the predicted value for that time step, completing the spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network, including:
[0160] The hidden state output by the GRU is input into the prediction module to generate the predicted value for that time step:
[0161]
[0162] in, This indicates the predicted target variable for each monitoring station in the next K time steps.
[0163] In this embodiment of the invention, (1) by constructing a variable graph inside the site, multiple pollutants and meteorological variables are regarded as nodes in the graph. The graph neural network is used to deeply explore the nonlinear coupling and complex interaction relationship between variables, effectively capturing the synergistic effect and potential impact between multiple variables, and significantly improving the expressive ability and modeling accuracy of single site features.
[0164] (2) Introducing a trainable dynamic graph adjacency matrix mechanism enables dynamic optimization and updating of the site graph structure, which can adapt to the dynamic characteristics of pollution propagation paths and spatial dependencies between sites changing over time, enhances the model's ability to perceive and respond to spatiotemporal changes, and thus improves the flexibility and accuracy of prediction.
[0165] (3) By using a hierarchical structure, the high-dimensional graph-level representation of the variable graph is input as node attributes into the site graph, integrating multi-granular information from the variable layer and the site layer to achieve cross-layer information interaction and collaborative modeling. This method 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 different regions, number of stations, and types of pollutants, 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 graph construction, improves the robustness and automation level of the model in complex real-world scenarios, and provides reliable technical support for large-scale deployment and intelligent prediction of city-level air quality.
[0167] Figure 5 This is a schematic diagram of the structure of an air quality spatiotemporal prediction device based on a hierarchical dynamic graph neural network provided in an embodiment of the present invention, as shown below. Figure 5As shown, the air quality spatiotemporal prediction device based on hierarchical dynamic graph neural networks may include the above-mentioned... Figure 4 The illustrated air quality spatiotemporal prediction device is based on a hierarchical dynamic graph neural network. Optionally, the air quality spatiotemporal prediction device 410 based on the hierarchical dynamic graph neural network may include a first processor 2001.
[0168] Optionally, the air quality spatiotemporal prediction device 410 based on hierarchical dynamic graph neural network may also include a memory 2002 and a transceiver 2003.
[0169] The first processor 2001, memory 2002, and transceiver 2003 can be connected via a communication bus.
[0170] The following is combined Figure 5 A detailed description of each component of the air quality spatiotemporal prediction device 410 based on a hierarchical dynamic graph neural network is provided below:
[0171] The first processor 2001 is the control center of the air quality spatiotemporal prediction device 410 based on a hierarchical dynamic graph neural network. It 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), 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 hierarchical dynamic graph neural network-based air quality spatiotemporal prediction device 410 by running or executing software programs stored in the memory 2002 and calling data stored in the memory 2002.
[0173] In a specific implementation, as one example, the first processor 2001 may include one or more CPUs, for example... Figure 5 CPU0 and CPU1 are shown in the diagram.
[0174] In a specific implementation, as one example, the air quality spatiotemporal prediction device 410 based on a hierarchical dynamic graph neural network may also include multiple processors, for example... Figure 5The first processor 2001 and the second processor 2004 are shown in the diagram. Each of these processors can be a single-core processor or a multi-core processor. Here, a processor can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).
[0175] The memory 2002 is used to store the software program that executes the present invention, and is controlled by the first processor 2001 to execute it. The specific implementation method can be referred 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 capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 2002 may be integrated with the first processor 2001 or may exist independently, and may be connected via the interface circuit of the air quality spatiotemporal prediction device 410 based on a hierarchical dynamic graph neural network. Figure 5 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.
[0177] The transceiver 2003 is used to communicate with network devices or with terminal devices.
[0178] Alternatively, transceiver 2003 may include a receiver and a transmitter. Figure 5 (Not shown separately). The receiver is used to implement the receiving function, and the transmitter is used to implement the transmitting function.
[0179] Optionally, the transceiver 2003 can be integrated with the first processor 2001 or exist independently, and can be connected to the interface circuit of the air quality spatiotemporal prediction device 410 based on a hierarchical dynamic graph neural network. Figure 5(Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.
[0180] It should be noted that, Figure 5 The structure of the air quality spatiotemporal prediction device 410 based on 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, or combine certain components, or have different component arrangements.
[0181] Furthermore, the technical effect of the air quality spatiotemporal prediction device 410 based on hierarchical dynamic graph neural network can be referred to the technical effect of the air quality spatiotemporal prediction method based on hierarchical dynamic graph neural network described in the above method embodiments, and will not be repeated here.
[0182] It should be understood that the first processor 2001 in the embodiments of the present invention may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0183] It should also be understood that the memory in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can 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 can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0184] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable sensors. 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 (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0185] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0186] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply 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 recognize that the units and algorithm steps of the various examples 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 implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0188] The units described as separate components may or may not be physically separate. 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 the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0189] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0190] If the aforementioned 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 part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the 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 variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A spatiotemporal prediction method for air quality based on a hierarchical dynamic graph neural network, characterized in that, The method includes: 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 station, construct a graph structure between variables at each time step; and construct a dynamic adjacency matrix by measuring the trend similarity between variables; perform spatial-temporal learning on the graph structure between variables based on the dynamic adjacency matrix; S3, at each time step , For each monitoring station, a graph structure between stations is constructed; and based on the graph structure between stations, a dynamic adjacency matrix is constructed at each time step; and spatial-temporal learning is performed on the graph structure between stations based on the dynamic adjacency matrix. S4. Based on S1-S3, construct a layered graph coding module. In the process of stacking multiple layered graph coding modules, introduce a residual connection mechanism to 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 coding module as the initial hidden state of GRU, and recursively update the hidden state based on the information obtained at each prediction time step to obtain the dynamic features of the node state evolution over time. S6 and GRU output the hidden state to the prediction module, which then produces the predicted value for that time step, thus completing the spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network. In S2, for each monitoring station, at each time step... t Constructing a graph structure between variables and building a dynamic adjacency matrix by measuring the trend similarity between variables includes: For each monitoring station, construct a graph structure between variables at each time step; right N Each of the variables is processed by a moving average of its time series over a historical period; Based on the time series of variables processed by moving average, 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 step by step to obtain a dynamic adjacency matrix.
2. The air quality spatiotemporal prediction method based on hierarchical dynamic graph neural network according to claim 1, characterized in that, In step S1, at each time step of the historical time series, feature extraction is performed for each monitoring station to obtain N meteorological variables, including: At each time step of the historical time series, for each monitoring station s, data including temperature, humidity, wind speed, wind direction, and air pressure are extracted. N The observed values of each meteorological variable and the PM2.5 concentration value at the corresponding time step.
3. The spatiotemporal air quality prediction method based on hierarchical dynamic graph neural network according to claim 1, characterized in that, In S2, spatial-temporal learning of the graph structure between variables is performed based on the dynamic adjacency matrix, including: Convolution operation on variable graph structure based on dynamic adjacency matrix; The graph convolution outputs at different time steps are concatenated into a time series and used as the input to the gated recurrent unit; the hidden state of the GRU is set.
4. The spatiotemporal air quality prediction method based on hierarchical dynamic graph neural network according to claim 3, characterized in that, In S3, at each time step , For each monitoring station, a graph structure is constructed between the stations; 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 is built between all monitoring stations; Based on the graph structure between sites, initialize a node embedding matrix and a time embedding matrix; The time information for each time step is retrieved from the time embedding matrix using timestamps; the static embedding matrix of the site and the retrieved time embedding matrix are multiplied by element-wise multiplication to obtain the enhanced node embedding matrix; The enhanced node embedding matrix is further updated using the hidden state of GRU, and the adjacency matrix is calculated based on the node embedding matrix to obtain the dynamic adjacency matrix.
5. The spatiotemporal air quality prediction method based on a hierarchical dynamic graph neural network according to claim 4, characterized in that, In step S3, spatial-temporal learning of the graph structure between stations is performed based on the dynamic adjacency matrix, including: Based on the dynamic adjacency matrix and node attributes in the site graph, a diffraction convolution operation is used to extract spatial dependency information. Temporal modeling is performed by using spatial representation sequences at different times as input to GRU.
6. The spatiotemporal air quality prediction method based on a hierarchical dynamic graph neural network according to claim 5, characterized in that, In step S4, a layered graph coding module is constructed based on S1-S3. A residual connection mechanism is introduced during the stacking of multiple layered graph coding modules to obtain the output results of the layered graph coding module, including: A hierarchical graph coding module is constructed based on S1-S3; the hierarchical graph coding module integrates two-level structures of variable graph modeling and site graph modeling, and combines graph convolution and temporal modeling to extract multi-granularity spatial-temporal features; A residual connection mechanism is introduced during the stacking of multiple layered graph coding modules. Let the first... The input to the layer-by-layer graph encoding module is The output is The input for the next layer is then given by the following formula: 。 7. The spatiotemporal air quality prediction method based on a hierarchical dynamic graph neural network according to claim 6, characterized in that, In S5, information is extracted for each future prediction time step to obtain the temporal representation of that time step, which serves as the input to the decoder stage. The output of the last layer of the hierarchical graph coding 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 features of the node state evolution over time, including: For each future prediction time step, the daily embedding vector and weekly embedding vector are extracted from the preset time embedding matrix based on the timestamp, and then the two are concatenated to form the time representation of that time step, which is used as the input of the decoder stage. The output of the last layer of the layered graph encoding module K 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 to recursively update the hidden state and capture the dynamic features of the node state evolution over time.
8. The spatiotemporal air quality prediction method based on a hierarchical dynamic graph neural network according to claim 6, characterized in that, In S6, the GRU outputs the hidden state to the prediction module, which then produces the predicted value for that time step, completing the spatiotemporal prediction of air quality based on a hierarchical dynamic graph neural network, including: The hidden state output by the GRU is input into the prediction module to generate the predicted value for that time step: ; in, This indicates that each monitoring station will be in the future Prediction results of the target variable at each time step.
9. An air quality spatiotemporal prediction device based on a hierarchical dynamic graph neural network, wherein the air quality spatiotemporal prediction device based on the hierarchical dynamic graph neural network is used to implement the air quality spatiotemporal prediction method based on the hierarchical dynamic graph neural network as described in any one of claims 1-8, characterized in that, The device includes: The feature extraction module is used to extract features for each monitoring station at each time step of the historical time series, and obtain N meteorological variables; The variable graph structure module is used to construct the graph structure between variables at each time step for each monitoring station; and to construct a dynamic adjacency matrix by measuring the trend similarity between variables; and to perform spatial-temporal learning on the graph structure between variables based on the dynamic adjacency matrix. The site graph structure module is used at each time step. , For each monitoring station, a graph structure between stations is constructed; and based on the graph structure between stations, a dynamic adjacency matrix is constructed at each time step; and spatial-temporal learning is performed on the graph structure between stations based on the dynamic adjacency matrix. The layered graph coding module is used to construct a layered graph coding module based on S1-S3. A residual connection mechanism is introduced during the stacking of multiple layered graph coding modules to obtain the output results 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 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 the dynamic features of the node state evolution over time. The prediction module is used to output the hidden state of the GRU to the prediction module, and the prediction module produces the predicted value for that time step to complete the spatiotemporal prediction of air quality based on the hierarchical dynamic graph neural network.
Citation Information
Patent Citations
A long-time series PM2.5 prediction method and system based on spatiotemporal attention
CN114662791B
PM2.5 Concentration Prediction Method Based on Spatiotemporal Graph Ordinary Differential Equation Network
CN114694767B
Air pollutant concentration prediction method and system based on space-time diagram
CN115629160A
Traffic flow prediction method based on space-time hypergraph neural network
CN114944053A
Traffic flow prediction method based on hierarchical dynamic residual map convolutional network
CN116110232A