Method capable of enhancing capability of capturing spatial-temporal characteristics in atmospheric pollutant propagation process
By using the encoder with the time-space attention mechanism during the propagation of atmospheric pollutants, the problem of insufficient spatiotemporal feature capture capability in the prior art is solved, and a more accurate spatial and temporal feature extraction and data processing capability optimization of the atmospheric pollutant transmission process is achieved.
Patent Information
- Application Number
- CN202411968885.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-30
AI Technical Summary
The prior art lacks space-time feature capture capability during the propagation of atmospheric pollutants, has high computational complexity, lacks geospatial structural information, and cannot fully capture multi-scale features.
The encoder based on the time-space attention mechanism is adopted to map the time characteristics and spatial characteristics through linear layers, calculate the spatial and temporal correlation matrix, perform normalization and activation processing, generate spatial and temporal attention weights, and enhance the capture ability of atmospheric data's space-time relationship.
It has improved the ability to capture the spatio-temporal characteristics of the atmospheric pollutant propagation process, optimized the complex data processing capabilities, and achieved more accurate spatio-temporal characteristics extraction of the atmospheric pollutant propagation process.
Smart Images

Figure CN119886442A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data and artificial intelligence technology, and in particular to a method capable of enhancing the ability to capture the spatiotemporal characteristics of the propagation process of atmospheric pollutants. Background Art
[0002] PM2.5 monitoring is essential for preventing air pollution. Atmospheric forecasting is affected by many factors, including meteorological conditions, local characteristics, and environmental topography, and the spread of air pollutants is closely related to spatiotemporal factors. However, most forecasting methods usually lack consideration of spatiotemporal relationships and only treat air quality and environmental parameters as separate variables, ignoring long-term characteristics and complex correlations. Therefore, it is of great significance to adopt a deep learning framework that can mine correlations in long-term data and integrate spatial geographic information and time series information.
[0003] With the establishment of a large number of air quality monitoring stations, the data has the basis for analysis by deep learning methods, among which deep learning methods are widely used due to their ability to process long time series data. The LSTM-FC model was proposed for pollutant prediction at specific stations; LSTM combined with CNN was used to predict PM2.5 concentration; and ConvNet and Dense bidirectional GRU were combined to predict PM2.5 concentration. These models have achieved good prediction results in specific environments, but time series data usually have problems with noise and mixing of long-term and short-term information, and the temporal characteristics cannot be fully mined. In addition, existing research mainly focuses on the prediction of air pollution at a single monitoring point, and the spatial correlation between stations is not considered, resulting in the failure to reflect the law of pollutant propagation and insufficient explanatory power.
[0004] In the existing technology, some researchers use encoders built based on the attention mechanism to capture the spatiotemporal characteristics of the propagation process of atmospheric pollutants. However, the traditional attention mechanism has the problems of high computational complexity, lack of geospatial structure information and inability to fully capture multi-scale characteristics. Summary of the invention
[0005] In order to solve the technical problems raised in the above background technology, a method is provided to enhance the ability to capture the spatiotemporal characteristics of the atmospheric pollutant propagation process, which can optimize the processing capability of complex data and enhance the ability to capture the spatiotemporal relationship of atmospheric data, so as to fully capture multi-scale characteristics.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is:
[0007] A method for enhancing the ability to capture the spatiotemporal characteristics of the atmospheric pollutant propagation process comprises the following steps:
[0008] S100, constructing an encoder based on the time-space attention mechanism, mapping the time features and the space features through the linear layer of the encoder, and obtaining the query matrix and key matrix of the spatial features and the query matrix and key matrix of the time features respectively;
[0009] S200, multiplying the query matrix of spatial features and the transposed matrix of the key matrix to obtain a spatial correlation matrix, and multiplying the query matrix of temporal features and the transposed matrix of the key matrix to obtain a temporal correlation matrix;
[0010] S300, respectively normalizing the obtained spatial correlation matrix and the temporal correlation matrix, and further adjusting the normalized spatial correlation matrix and the temporal correlation matrix using a Tanh activation function, so that the correlation weights can more accurately capture the key features and spatiotemporal relationships;
[0011] S400, multiplying the adjusted spatial correlation matrix with the original data matrix to obtain a spatial feature representation matrix, and multiplying the adjusted temporal correlation matrix with the original data matrix to obtain a temporal feature representation matrix, so as to strengthen the influence of variables with high spatial and temporal correlation in the final feature representation;
[0012] S500, obtain the spatial attention weight by calculating the spatial feature representation matrix, obtain the temporal attention weight by calculating the temporal feature representation matrix, and weight the obtained spatial attention weight and temporal attention weight to enhance the temporal and spatial features in the atmospheric data.
[0013] Furthermore, in step S200, the query matrix and the transposed matrix of the key matrix are multiplied by the following formula:
[0014] A=QK T
[0015] Where Q is the query matrix, K is the key matrix, and A is the temporal correlation matrix or spatial correlation matrix obtained after multiplication.
[0016] Furthermore, in step S300, the obtained time correlation matrix or spatial correlation matrix is normalized by the following formula:
[0017]
[0018] In the formula, S ij represents the elements of the original time correlation matrix or spatial correlation matrix, Represents the elements of the normalized temporal correlation matrix or spatial correlation matrix.
[0019] Furthermore, in step S300, the normalized spatial correlation matrix and the temporal correlation matrix are further adjusted by the following formula:
[0020]
[0021] Where α is an adjustable scaling factor used to control the sensitivity of the activation function; are the elements of the adjusted spatial correlation matrix and temporal correlation matrix.
[0022] Furthermore, in step S400, the adjusted spatial correlation matrix or temporal correlation matrix is multiplied by the original data matrix using the following formula:
[0023] H=S adj X
[0024] In the formula, S adj is the adjusted time correlation matrix or spatial correlation matrix, X is the original data matrix, and H is the adjusted spatial feature representation matrix or time feature representation matrix obtained by multiplication.
[0025] Further, in step S500, the spatial attention weight or the temporal attention weight α is calculated by the following formula: ij :
[0026] α ij =softmax(A ij )
[0027] In the formula, A ij is the element of the temporal correlation matrix or the spatial correlation matrix, and softmax(.) is the exponential normalization function.
[0028] Further, in step S500, H' t represents the temporal attention weight, represents the spatial attention weight, and the spatial attention weight and the temporal attention weight are weighted and summed according to the following formula:
[0029]
[0030] Where T is the number of time steps, and H' is the comprehensive representation of the weights of spatiotemporal features after weighted summation.
[0031] Due to the adoption of the above technical solution, the present invention has the following beneficial effects:
[0032] The present invention provides a method capable of enhancing the ability to capture the spatiotemporal characteristics of the atmospheric pollutant propagation process. The time-space attention mechanism is used to simultaneously extract the attention weights of the time characteristics and the spatial characteristics, thereby optimizing the processing capability of complex data. The method also enhances the ability to capture the spatiotemporal relationship of atmospheric data by assigning different time and space weights to the input data, thereby improving the ability to capture global and local features. The SoftMax activation function is replaced by the Tanh with a value range of (-1, 1) to avoid confusing negative correlation and weak correlation, thereby achieving more accurate spatiotemporal feature extraction of the atmospheric pollutant propagation process. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A flowchart of an air pollution prediction method according to a preferred embodiment of the present invention;
[0034] Figure 2 It is a structural diagram of an encoder in a preferred embodiment of the present invention;
[0035] Figure 3 (a) is the structure diagram of the attention mechanism of the prior art. Figure 3 (b) is a structural diagram of the time-space attention mechanism of a preferred embodiment of the present invention;
[0036] Figure 4 A flow chart of a method for enhancing the ability to capture the spatiotemporal characteristics of the atmospheric pollutant propagation process in a preferred embodiment of the present invention;
[0037] Figure 5 A structural diagram of a decoder in a preferred embodiment of the present invention;
[0038] Figure 6 This is a structural diagram of GCN in a preferred embodiment of the present invention;
[0039] Figure 7 This is a structural diagram of LSTM in a preferred embodiment of the present invention;
[0040] Figure 8 It is a schematic diagram of the decomposition result of performing time-frequency domain decomposition on the divided data set using the time-frequency domain decomposition technology of wavelet transform data according to an embodiment of the present invention;
[0041] Fig. 9 The graph structure constructed for 10 fixed monitoring stations in Guilin area using the air pollution prediction method of the present invention;
[0042] Fig.10 A comparison chart of the predicted results and the actual results of the prediction of the eight middle school stations using the air pollution prediction method of the present invention;
[0043] Fig.11A comparison chart of the predicted results and the actual results of the prediction of the Lingui site using the air pollution prediction method of the present invention;
[0044] Fig.12 This is the ablation comparison diagram of the No. 8 Middle School site;
[0045] Fig.13 This is a comparison chart of ablation at the Lingui site. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0048] Please also see Figures 1 to 7 A preferred embodiment of the present invention provides an air pollution prediction method, comprising the following steps:
[0049] S1, data preprocessing: clean the atmospheric pollutant data in the prediction area and divide them into training set, test set and validation set.
[0050] In this embodiment, the air pollutant data specifically includes PM2.5, PM10, CO, NO2, SO2, O3 and meteorological variable data obtained from each monitoring station in the area to be predicted. In the process of cleaning the air pollutant data in the area to be predicted in step S1, the missing values and abnormal values caused by aging and failure of the monitoring equipment are processed by linear interpolation to retain data characteristics and improve calculation efficiency.
[0051] S2, use wavelet transform data time-frequency domain decomposition technology to decompose the divided data set in time-frequency domain.
[0052] The temporal correlation of data is often obscured. As a technology for decomposing data in the time-frequency domain, wavelet transform has a good effect in the frequency division of time-series data, overcomes the limitation of fixed window size, and extracts all and local information in the time-frequency domain. Specifically, in step S2, the divided data set is decomposed into low-frequency components and high-frequency components, and the formula is defined as follows:
[0053]
[0054]
[0055] In the formula, x[n] represents the original pollutant data, CA1[k] and CD1[k] are the low-frequency and high-frequency parts after the first decomposition, CA2[k] and CD2[k] are the low-frequency and high-frequency parts after CA1[k] is decomposed again; h[kn] and g[kn] represent the low-pass and high-pass filter coefficients, respectively, k is the time index, and n is each point in the data; CA1[n] represents the low-frequency part.
[0056] The original data is decomposed using the wavelet transform data time-frequency domain decomposition technology (scale 3) to obtain a series of high- and low-frequency variables: CA1, CD1, CA2, CD2, CA3, and CD3. Among them, the low-frequency variable CA1 obtained by decomposing the original data represents the overall trend of pollutant concentrations, such as seasonal changes and long-term pollution levels; the high-frequency variable CD1 reflects rapid changes in pollutants, such as day-night differences and weather influences. CA2, which is further decomposed from CA1, represents a more detailed medium-term trend, such as monthly changes; CD2 reflects medium-term fluctuations. Finally, CA3, which is decomposed from CA2, represents a longer-term trend and influencing factors of a longer time scale; CD3 reflects short-term fluctuations and captures smaller changes. The decomposed variables make it easier for the model to extract spatial dependencies and long-term relationships.
[0057] S3, constructs the decomposed data into graph structure data.
[0058] In this embodiment, in step S3, the monitoring stations in the area to be predicted are regarded as graph nodes, the adjacency relationship between the stations is regarded as the edge of the graph, the pollutant parameters constitute the node features, and the distance information between adjacent monitoring stations is used to construct the graph structure. Specifically, the method for constructing the graph structure data is as follows:
[0059] Given a graph G = (V, A, X, W), V is the node set, A is the adjacency matrix, X is the feature matrix, W is the weight matrix, where V = {v 1, v2,…,v N}, X∈R N×D , N is the number of nodes, D is the feature dimension, and node v i The eigenvector of i , A={A 11 ,A 12 ,…,A ij}, if A ij =1 means node v i and v jThere are edges between them, nodes are connected according to wind direction, and nodes with the same wind direction are connected; the weight matrix W is defined according to the distance between sites. The closer the distance d, the greater the weight. That is, the weight of the site edge is defined as the correlation coefficient of the distance, see formula (3):
[0060]
[0061] Where W i,j is the weight of node i and node j, and d i,j The actual distance between node i and node j.
[0062] S4, construct a graph convolutional neural network composite model, the graph convolutional neural network composite model includes an encoder and a decoder, the encoder is an encoder built based on the attention mechanism, and the decoder is composed of GCN and LSTM.
[0063] The encoder is a deep learning module that converts input data into a more concise representation that contains key features. The encoder of the embodiment of the present invention is established based on the time-space attention mechanism, which can extract the time-space relationship weight of the input data. The time-space relationship weight is a numerical value used to measure the mutual influence between the time and space dimensions, which indicates the degree of influence of data at a certain time point or spatial position on another time or position.
[0064] The decoder is a deep learning module that converts the abstract representation generated by the encoder into raw data form or generates new data. For atmospheric data, the decoder can convert complex spatiotemporal features into accurate predictions. The decoder of this embodiment is composed of GCN and LSTM. In the simulation of atmospheric pollution transmission process, GCN is used to capture the mutual influence between nodes on the pollution transmission surface, and LSTM focuses on the influence of pollutant concentration at a specific moment on the future prediction moment.
[0065] Among them, GCN performs convolution operations on the nodes of the graph, integrates the feature information of neighboring nodes, and processes complex spatial relationships and dynamic data related to pollutant diffusion, thereby improving the accuracy and adaptability of model prediction. The structural diagram of GCN is shown in the figure. Figure 6 As shown, the workflow is shown in equations (4)-(6).
[0066] g θ *x=U gθ U T x#(4)
[0067]
[0068]
[0069] Among them, from the spectral convolution formula (4) through the Chebyshev polynomial T k(x) = 2xT k-1 (x)-T k-2 (x) and superimpose multi-layer graph convolutional networks to obtain a new expression formula (5), and finally adopt Transform The gradient explosion problem in spatial propagation is solved, and finally the final graph convolution formula (6) is obtained. The input of the l-th layer network is H (l) , To add the self-connected adjacency matrix, is the degree matrix, w (l) is the parameter to be trained, σ is the corresponding activation function; H (l+1) is the output feature. The spectral convolution formula (4) is the existing technology, where g θ is the convolution kernel function, and x is the input.
[0070] LSTM is a special recursive neural network that can avoid the problem of gradient disappearance or explosion and retain long-term information. It contains input layer, hidden layer and output layer. The structure is as follows: Figure 7 As shown in Figure 2, the specific propagation process is as follows:
[0071] f t =σ(w f [h t-1 ,x t ]+b f )#(7)
[0072] i t =σ(w i [h t-1 ,x t ]+b i )#(8)
[0073] o t =σ(w o [h t-1 ,x t ]+b o )#(9)
[0074]
[0075]
[0076] h t =o t *tanh(C t )#(12)
[0077] where f t 、i t , o t , are the outputs of the forget gate, input gate, output gate and candidate memory unit, respectively.f 、w i 、w o are the weight matrices of the three gates, w c is the weight matrix of the candidate memory unit, b f 、b i 、b o 、b c is the bias term, C t and h t Represent the memory cell state update and hidden state update respectively.
[0078] S5: training the graph convolutional neural network composite model according to the graph structure data and a preset loss function until the loss function converges.
[0079] For each iteration of training, first, an encoder is used to capture the temporal and spatial features in the graph structure data. In the prior art, some researchers use encoders built based on the attention mechanism to capture the temporal and spatial characteristics of the atmospheric pollutant propagation process. However, the traditional attention mechanism has the problems of high computational complexity, lack of geographic spatial structure information, and inability to fully capture multi-scale features. In order to solve this problem, the embodiment of the present invention provides a method for enhancing the ability to capture the temporal and spatial features of the atmospheric pollutant propagation process, which specifically includes the following steps:
[0080] S100, mapping the temporal features and the spatial features through the linear layer of the encoder to obtain the query matrix and key matrix of the spatial features and the query matrix and key matrix of the temporal features respectively.
[0081] S200, multiply the query matrix of spatial features and the transposed matrix of the key matrix to obtain a spatial correlation matrix, and multiply the query matrix of temporal features and the transposed matrix of the key matrix to obtain a temporal correlation matrix. Specifically, the transposed matrix of the query matrix and the key matrix can be multiplied by the following formula:
[0082] A=QK T
[0083] Where Q is the query matrix, K is the key matrix, and A is the temporal correlation matrix or spatial correlation matrix obtained after multiplication.
[0084] S300, respectively normalize the obtained spatial correlation matrix and temporal correlation matrix, and use the Tanh activation function to further adjust the normalized spatial correlation matrix and temporal correlation matrix, so that the correlation weights can more accurately capture key features and spatiotemporal relationships.
[0085] Specifically, the obtained time correlation matrix or spatial correlation matrix is normalized by the following formula:
[0086]
[0087] Where S represents the original time correlation matrix or spatial correlation matrix, S ij represents the elements of the original time correlation matrix or spatial correlation matrix, Represents the elements of the normalized temporal correlation matrix or spatial correlation matrix.
[0088] The normalized spatial correlation matrix and temporal correlation matrix are further adjusted by the following formula:
[0089]
[0090] Where α is an adjustable scaling factor used to control the sensitivity of the activation function; is the adjusted spatiotemporal correlation matrix element.
[0091] S400, multiplying the adjusted spatial correlation matrix with the original data matrix to obtain a spatial feature representation matrix, and multiplying the adjusted temporal correlation matrix with the original data matrix to obtain a temporal feature representation matrix, so as to strengthen the influence of variables with high correlation in time and space in the final feature representation.
[0092] Specifically, the adjusted spatial correlation matrix or temporal correlation matrix is multiplied by the original data matrix using the following formula:
[0093] H=S adj X
[0094] In the formula, S adj is the adjusted time correlation matrix or spatial correlation matrix, X is the original data matrix, and H is the adjusted spatial feature representation matrix or time feature representation matrix obtained by multiplication.
[0095] S500, obtain the spatial attention weight by calculating the spatial feature representation matrix, obtain the temporal attention weight by calculating the temporal feature representation matrix, and weight the obtained spatial attention weight and temporal attention weight to enhance the temporal and spatial features in the atmospheric data.
[0096] Specifically, the spatial attention weight or temporal attention weight α is calculated by the following formula: ij :
[0097] α ij =sofmtmax(A ij )
[0098] In the formula, A ij is an element of the time correlation matrix or the spatial correlation matrix. In subsequent calculations, H' t represents the temporal attention weight, represents the spatial attention weight; softmax(.) is the exponential normalization function.
[0099] The spatial attention weight and the temporal attention weight are weighted and summed according to the following formula to enhance the temporal and spatial features in the atmospheric data:
[0100]
[0101] Where H' t is the time weight, is the spatial weight, T is the number of time steps, and H' is the comprehensive representation of the spatiotemporal feature weights after weighted summation.
[0102] Secondly, the GCN of the decoder is used to extract the encoded spatial features, and the LSTM is used to mine the encoded temporal features to obtain the final prediction value. Specifically, it includes the following steps:
[0103] Original signal X i First, enter the space-time block of GCN, and use GCN to extract the original signal X of the input GCN through graph convolution i Extract the spatial features H of the spatial weight matrix A t , then the original signal X i With spatial characteristics H t Connect to get the GCN output with integrated attention weights, l is the index of the neural network layer. The GCN output forms the input of the LSTM, denoted as Input lstm =[X i ,H (l+1) ], as shown in formula (14), the sequence modeling is shown in formula (15), and the GCN with integrated attention weight is output to LSTM for processing, as shown in formula (16); finally, the prediction result is obtained by combining the processing result of LSTM with the fully connected layer:
[0104]
[0105]
[0106]
[0107] In the formula, Represents the output of LSTM at time t; represents the hidden layer state of LSTM at time t, Represents the hidden layer state of LSTM at time t-1; Represents the output weight of GCN at time t; input t Represents the original input data, input t =Xi =[x1,x2,…x t ].
[0108] Finally, the predicted value is compared with the label value and the loss function value is calculated, and the iteration is continued until the model reaches the optimal value, that is, the loss function value is minimized, and the model training is completed. This embodiment uses the loss function of the prior art to train the model. In order to omit space, the loss function is not described in detail.
[0109] S6, inputting the pollutant variables obtained in real time from the area to be predicted into the graph convolutional neural network composite model of step S5, and obtaining the prediction results of the target monitoring station in the future preset time period after calculation.
[0110] The effect of the air pollution prediction method based on the graph convolutional neural network composite model of wavelet transform of the present invention is explained below with a specific embodiment.
[0111] The dataset is derived from 61 monitoring stations in Guilin from 2020 to 2023, including 51 micro-monitoring stations and 10 fixed stations, covering PM2.5, PM10, CO, NO2, SO2, O3 and meteorological variables (see Table 1). The characteristics of this dataset are as follows: significant atmospheric turbulence, complex climate, and diverse pollution propagation.
[0112] Table 1
[0113]
[0114] In order to deal with missing values and outliers caused by aging and failure of monitoring equipment, this paper uses linear interpolation to retain data characteristics and improve computational efficiency. The data set is divided into 60% training set, 20% validation set and 20% test set.
[0115] The time-frequency domain decomposition technology of wavelet transform data (SWT) is used to decompose the divided data set in the time-frequency domain, decomposing the original data into high-frequency variables and low-frequency variables to represent the changes in the input data that affect the spread of pollutants at different frequency scales. The decomposition results of the input data are shown in Figure 2. Figure 8 shown.
[0116] The graph structure constructed for the 10 fixed monitoring stations in Guilin is as follows: Fig. 9 shown.
[0117] In atmospheric prediction, the selection of hyperparameters affects the performance and accuracy of the model, so it is particularly important to select appropriate hyperparameters. In this embodiment, the batch size, dropout, learning rate, epoch number and decomposition scale are mainly set. The specific values are shown in Table 2.
[0118] In terms of evaluation indicators, this paper uses three indicators: root mean square error (RMSE), mean absolute error (MAE) and symmetric mean absolute percentage error (SMAPE). The smaller the values of the above three evaluation indicators, the more accurate the results.
[0119] Table 2. Hyperparameter definitions
[0120]
[0121] The present invention uses atmospheric monitoring data from April 2020 to March 2023 to train the SWT-GCN-LSTM model, and uses data from August 1 to 15, 2023 to evaluate the performance. Fig.10 and Fig.11 The comparison between the prediction results and the actual results of the No. 8 Middle School and Lingui stations is shown respectively, with the maximum relative errors of PM2.5 being 0.10 and 0.15 respectively. The prediction effect of the No. 8 Middle School station is better than that of the Lingui station, which has more missing data and outliers, but performs well overall and can accurately capture the local mutations and long time series of the data.
[0122] The ablation experiment aims to verify that each module is effective for prediction accuracy. This example constructs three ablation models: SWT-GCN, SWT-LSTM, and GCN-LSTM: SWT-GCN removes the time information extraction module, SWT-LSTM removes the spatial information extraction module, and GCN-LSTM removes the frequency separator. Under the same training parameters, PM2.5 data is selected for performance demonstration. Fig.12 and Fig.13 The observed values and predicted values of the Bazhong site and the Lingui site are shown respectively, and the quantitative evaluation results of each ablation model are given in Table 3. At the Bazhong site, box 1 shows that although SWT-LSTM has temporal characteristics, it is not able to capture local mutations; box 2 shows that GCN-LSTM performs best among the latter three, but due to the lack of time domain frequency division, it is difficult to accurately capture mutations and temporal relationships; box 3 points out that SWT-GCN can capture some mutations, but is not sensitive to temporal changes. Similar problems also occurred at the Lingui site, but due to the insertion of blank data and the processing of more bad values, the performance of the un-frequency-divided GCN-LSTM was significantly worse, which further proves the necessity and effectiveness of the time-frequency domain decomposition in this paper.
[0123] Ablation experiments show that each module of SWT-GCN-LSTM is effective. Frequency separation improves the sensitivity of the model to mutations, GCN extracts spatial features, and LSTM extracts temporal features.
[0124] Table 3. Quantitative results of ablation experiments
[0125]
[0126] The present invention also selects the Random Forest, SVR, RNN, LSTM, and Transformer models of the prior art to compare with the SWT-GCN-LSTM proposed in this embodiment to verify its superiority. Tables 4 and 5 show the prediction accuracy of the six models for PM2.5 at two sites and different time steps (1, 4, 8, 24h). The results show that the prediction performance of SWT-GCN-LSTM is the best. Models such as RNN and LSTM can capture the temporal nature of data, so the prediction effect on medium and short time steps (1, 4, 8h) is better than that of Random Forest and SVR non-time series models, but the "catastrophic forgetting" problem occurs on longer steps (24h), resulting in poor prediction results. Although the Transform model is not as good as RNN and LSTM in short time steps (1, 4h), it performs well in other long time steps. This is because Transform introduces an attention mechanism, has better prediction stability, and avoids the problem of "catastrophic forgetting". The SWT-GCN-LSTM model achieved the best prediction accuracy at all time steps because it showed better prediction performance and applicability by separating entangled signals in the data, extracting correlations in complex time series data, and combining spatial and temporal information.
[0127] Table 4. Quantitative results of the comparative experiment at the No. 8 Middle School site
[0128]
[0129] Table 5. Quantitative results of the comparative experiment at Lingui site
[0130]
[0131]
[0132] By comparing with a series of deep learning models, it can be concluded that the SWT-GCN-LSTM model constructed by the present invention has better prediction performance, which may be attributed to three reasons: first, the mixed signals in the original data are separated, making the temporal variation law of the variables clearer, making it easier to identify the correlation between them; second, the spatial information of pollutant data and meteorological data is obtained through the GCN module, and the spatial position relationship is considered; third, the model better integrates GCN and LSTM through the space-time attention mechanism, which improves the flexibility of the model.
[0133] Using GCN and LSTM models alone has its own advantages and disadvantages: GCN is good at extracting spatial relationships, but has limitations in processing temporal dependencies; LSTM can capture time series features, but ignores spatial correlation. Therefore, how to combine the advantages of both has become the focus of research. The present invention designs an attention mechanism to extract the temporal and spatial weights of atmospheric data respectively, and pass these weights to the model, thereby effectively enhancing the model's ability to extract spatiotemporal relationships during the propagation of atmospheric pollutants.
[0134] The attention mechanism enhances the model's ability to capture spatiotemporal relationships by assigning different time and space weights to the input data, and achieves more accurate spatiotemporal feature extraction of the atmospheric pollutant propagation process. Table 6 shows the quantitative results of GCN-LSTM and separate GCN and LSTM models in prediction. Although GCN and LSTM performed well, GCN-LSTM significantly improved its ability to extract spatiotemporal relationships of atmospheric data by using the spatiotemporal attention mechanism, and performed best in the evaluation indicators of each site, indicating that the model has excellent generalization ability and stability. Although the ablation experiment shows that GCN-LSTM does not perform as well as SWT-GCN-LSTM, GCN-LSTM performs better than separate GCN and LSTM, verifying the effectiveness of the improved attention mechanism. This mechanism helps the model capture the spatial relationship between sites and the dependency of time series data.
[0135] Table 6. Quantitative results
[0136]
[0137]
[0138] GCN can automatically learn the spatial relationship between sites through the adjacency matrix and graph structure, extract the feature similarity between adjacent nodes through convolution operations, capture the local changes in pollutant concentrations, and aggregate the feature vectors of each node and its neighbors. After multi-layer feature aggregation, the overall diffusion trend of pollutants is extracted. The number of sites affects the ability of GCN to extract spatial features. Table 7 shows the performance of the GCN model under different numbers of sites.
[0139] Table 7. Quantitative results of the number of sites
[0140]
[0141] As can be seen from the table, the prediction performance of the GCN model improves significantly with the increase in the number of sites. Specifically, the RMSE, MAE, and SMAPE values gradually decrease, indicating that more sites provide richer spatial information, enabling the model to more accurately capture the complex relationships between sites and extract the spatial characteristics of pollutants. Therefore, GCN is particularly suitable for multi-site research environments.
[0142] This paper proposes a graph convolutional neural network composite model (SWT-GCN-LSTM) based on wavelet transform. The model consists of SWT, GCN, and LSTM. The proposed SWT-GCN-LSTM model has excellent performance. According to the experimental results, the following conclusions can be drawn:
[0143] (1) Using wavelet transform data time-frequency domain decomposition technology to decompose the divided data set in the time-frequency domain can effectively decompose the pollutant data at multiple scales, reduce the nonlinearity of the time series, and enhance the model's ability to extract correlations between pollutant data.
[0144] (2) The proposed SWT-GCN-LSTM model can effectively integrate the temporal and spatial information of pollutant propagation, and the prediction errors of PM2.5 at the Bazhong and Lingui stations are only 0.10 and 0.15 respectively. By comparison, the prediction performance is better than the commonly used prediction models such as Random Forest, SVR, RNN, GRU, and Transformer. In addition, the ablation experiment proves that each module of the proposed architecture is necessary.
[0145] (3) The improved self-attention network mechanism optimizes the processing capability of complex data by simultaneously extracting temporal and spatial weights, significantly improving the model’s ability to extract the spatiotemporal relationship of atmospheric data and enhancing its ability to capture global and local features.
[0146] The deep learning hybrid model proposed by the present invention for atmospheric prediction solves the entanglement problem of long-term data by separating signals of different frequencies, can effectively associate the temporal and spatial information of pollutants, and takes into account the transmission between multiple sites, thus improving the persuasiveness of the model. This method is suitable for urban atmospheric pollution prediction, helps to simulate and predict atmospheric environmental changes, and has reference significance for air pollution prevention and control and mining the laws of pollutant transmission.
[0147] The above description is a detailed description of the preferred feasible embodiments of the present invention, but the embodiments are not intended to limit the scope of the patent application of the present invention. All equivalent changes or modified changes completed under the technical spirit suggested by the present invention should fall within the patent scope covered by the present invention.
Claims
1. A method for enhancing the ability to capture the spatiotemporal characteristics of the atmospheric pollutant propagation process, characterized in that: The following steps are involved: S100, constructing an encoder based on the time-space attention mechanism, mapping the time features and the space features through the linear layer of the encoder, and obtaining the query matrix and key matrix of the spatial features and the query matrix and key matrix of the time features respectively; S200, multiplying the query matrix of spatial features and the transposed matrix of the key matrix to obtain a spatial correlation matrix, and multiplying the query matrix of temporal features and the transposed matrix of the key matrix to obtain a temporal correlation matrix; S300, respectively normalizing the obtained spatial correlation matrix and the temporal correlation matrix, and further adjusting the normalized spatial correlation matrix and the temporal correlation matrix using a Tanh activation function, so that the correlation weights can more accurately capture the key features and spatiotemporal relationships; S400, multiplying the adjusted spatial correlation matrix with the original data matrix to obtain a spatial feature representation matrix, and multiplying the adjusted temporal correlation matrix with the original data matrix to obtain a temporal feature representation matrix, so as to strengthen the influence of variables with high spatial and temporal correlation in the final feature representation; S500, obtain the spatial attention weight by calculating the spatial feature representation matrix, obtain the temporal attention weight by calculating the temporal feature representation matrix, and weight the obtained spatial attention weight and temporal attention weight to enhance the temporal and spatial features in the atmospheric data.
2. The method for enhancing the ability to capture the spatiotemporal characteristics of the atmospheric pollutant propagation process according to claim 1, characterized in that: In step S200, the query matrix and the transposed matrix of the key matrix are multiplied by the following formula: A=QK T Where Q is the query matrix, K is the key matrix, and A is the temporal correlation matrix or spatial correlation matrix obtained after multiplication.
3. The method for enhancing the ability to capture the spatiotemporal characteristics of the atmospheric pollutant propagation process according to claim 1, characterized in that: In step S300, the obtained time correlation matrix or spatial correlation matrix is normalized by the following formula: In the formula, S ij represents the elements of the original time correlation matrix or spatial correlation matrix, Represents the elements of the normalized temporal correlation matrix or spatial correlation matrix.
4. The method for enhancing the ability to capture the spatiotemporal characteristics of the atmospheric pollutant propagation process according to claim 3, characterized in that: In step S300, the normalized spatial correlation matrix and temporal correlation matrix are further adjusted by the following formula: Where α is an adjustable scaling factor used to control the sensitivity of the activation function; are the elements of the adjusted spatial correlation matrix and temporal correlation matrix.
5. The method for enhancing the ability to capture the spatiotemporal characteristics of the atmospheric pollutant propagation process according to claim 1, characterized in that: In step S400, the adjusted spatial correlation matrix or temporal correlation matrix is multiplied by the original data matrix using the following formula: H=S adj X S adj is the adjusted time correlation matrix or spatial correlation matrix, X is the original data matrix, and H is the adjusted spatial feature representation matrix or time feature representation matrix obtained by multiplication.
6. The method for enhancing the ability to capture the spatiotemporal characteristics of the atmospheric pollutant propagation process according to claim 1, characterized in that: In step S500, the spatial attention weight or the temporal attention weight α is calculated by the following formula: ij : a ij =softmax(A ij ) In the formula, A ij is the element of the temporal correlation matrix or the spatial correlation matrix, and softmax(.) is the exponential normalization function.
7. The method for enhancing the ability to capture the spatiotemporal characteristics of the atmospheric pollutant propagation process according to claim 5, characterized in that: In step S500, H′ t represents the temporal attention weight, represents the spatial attention weight, and the spatial attention weight and the temporal attention weight are weighted and summed according to the following formula: Where T is the number of time steps, and H′ is the comprehensive representation of the weights of spatiotemporal features after weighted summation.
Citation Information
Patent Citations
Mobile pollution source emission concentration prediction method based on space-time deep learning
CN109492830A
LSTM-based college entrance examination admission score prediction method
CN115392530A