Long-term spatiotemporal prediction method of PM2.5 pollution concentration based on coupling of deep learning model and empirical mode decomposition
By combining deep learning models and empirical modal decomposition algorithms, the GAT-EGRU algorithm is constructed, which solves the problems of low spatial and spatial prediction accuracy and high algorithm complexity of PM2.5, and achieves efficient and accurate PM2.5 prediction.
Patent Information
- Application Number
- CN202210322031.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2042-03-30
AI Technical Summary
The prior art has problems such as low accuracy, high algorithm complexity, high computing resource consumption and inability to effectively capture spatial and temporal features in PM2.5 long-term spatial prediction.
The GAT-EGRU algorithm based on the coupling of deep learning model and empirical modal decomposition is adopted to extract the spatial information of PM2.5 by constructing the graph data structure and using the GAT module, and time information is extracted in combination with the empirical modal decomposition algorithm, and aggregating it through the GRU module, and finally output the prediction results through the full connection layer.
It realizes a relatively accurate PM2.5 long-time spatial prediction, reduces the complexity of the algorithm and computing resource consumption, and can effectively capture spatial and temporal characteristics, and is suitable for long-term predictions such as 24 hours and 48 hours.
Smart Images

Figure CN114970946B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of atmospheric pollutant prediction, and in particular to a method for long-term spatiotemporal prediction of PM2.5 pollution concentration based on the coupling of a deep learning model and empirical mode decomposition. The model name is GAT-EGRU. Background Art
[0002] With the rapid economic development and the continuous progress of industrialization, air pollution has become an important issue affecting daily life and economic development. Among various air pollutants, PM2.5 has been the most harmful to the human body in recent years. Compared with coarser atmospheric particulate matter, PM2.5 has a small particle size, a large area, strong activity, and is easily accompanied by toxic and harmful substances (such as heavy metals, microorganisms, etc.). It also has a long residence time in the atmosphere and a long transportation distance, so it has a greater impact on human health and the quality of the atmospheric environment. How to accurately predict the concentration of PM2.5 at a future time is of great significance for controlling heavy pollution weather, government decision-making and planning, and preventing respiratory and psychological diseases.
[0003] In recent years, scholars have conducted extensive research on how to accurately predict PM2.5 concentrations in the future. The existing prediction methods mainly include methods based on numerical simulation, methods based on econometrics, and methods based on machine learning. Numerical simulation models are highly dependent on data resources (such as real-time meteorological data and continuously updated emission inventories), have long calculation time delays, and are difficult to capture nonlinear relationships between variables, so their accuracy is low. The econometric method finds the linear relationship between PM2.5 and other pollutants and weather variables, and makes predictions based on this relationship. This method requires artificial selection of variables, and the research considers fewer influencing factors, making it difficult to capture the nonlinear relationship between variables and PM2.5. The prediction results are time-sensitive and can only be predicted in the short term.
[0004] Machine learning-based methods are mainly divided into traditional shallow models and deep learning models. Compared with traditional machine learning methods, deep learning methods can not only model more variables, but also capture both long-term and short-term features in historical data. Commonly used deep learning methods, such as traditional recurrent neural networks (RNNs), have the problem of losing temporal information in the long-term prediction of PM2.5, while convolutional neural networks (CNNs) often lose spatial information when applied to PM2.5 prediction, all of which lead to low accuracy in the long-term prediction of PM2.5. How to use models and methods to mine the spatiotemporal characteristics of PM2.5 and various variables and make long-step predictions is an urgent problem to be solved in this field.
[0005] Related academic literature 1 (Zhang L, Liu P, Zhao L, et al. Air quality predictions with a semi-supervised bidirectional LSTM neural network [J]. Atmospheric Pollution Research, 2021, 12 (1): 328-339. DOI: 10.1016 / j.apr.2020.09.003) This study combines empirical mode decomposition (EMD) and bidirectional long short-term memory (Bi-LSTM) neural network to propose a semi-supervised model for predicting PM2.5 concentration. This study uses empirical mode decomposition as an unsupervised feature learning method to decompose the data and extract frequency and amplitude features. This method improves the short-term trend prediction of PM2.5 concentration. However, this method only relies on the time series of PM2.5, ignoring the transmission and diffusion of PM2.5 in space. The spatial correlation of PM2.5 cannot be obtained at the data level. Therefore, when making long-term predictions of PM2.5, its prediction error will increase significantly.
[0006] Academic Literature 2 (Wang S, Li Y, Zhang J, et al. Pm2.5-gnn: A domain knowledge enhanced graph neural network for pm2.5 forecasting [C] / / Proceedings of the 28th International Conference on Advances in Geographic Information Systems. 2020: 163-166. DOI: 10.1145 / 3397536.3422208) This study combines PM2.5 concentration data with weather variable data by constructing a graph data structure, and incorporates the domain knowledge of PM2.5, reflecting the diffusion and transmission of PM2.5 in space, enabling it to capture the long-term dependencies in PM2.5 forecasting. However, when constructing the graph data structure, it fails to reflect the association between city nodes, and does not process the time series data of PM2.5. Its prediction is only more accurate when the amount of data is large, and its prediction accuracy is low when the amount of data is too small.
[0007] Academic Literature 3 (Liu Jinpei, Chen Lijuan, Wang Piao, Chen Huayou. Research on Multi-factor Combination Prediction of PM2.5 Triangular Fuzzy Sequence Based on MEMD and Spatial Hierarchical Clustering [J / OL]. Control and Decision: 1-9 [2022-02-17]. DOI: 10.13195 / j.kzyjc.2021.1163) This study proposes a multi-factor combination prediction model for PM2.5 triangular fuzzy sequence based on multivariate empirical mode decomposition and spatial hierarchical clustering. The Pierman correlation coefficient is used to analyze the correlation between PM2.5 and local pollutant concentrations and meteorological elements, and local influencing factors are selected; secondly, the correlation between PM2.5 and spatial pollutant concentrations is calculated, and based on this, the K-means spatial clustering of neighboring cities is used to obtain core-influenced, general-influenced and remote-influenced urban agglomerations, and the comprehensive index of different pollutants in each urban agglomeration is calculated, that is, the spatial influencing factor; then, the triangular fuzzy sequence of PM2.5 and influencing factors is simultaneously decomposed using MEMD, and high-frequency, low-frequency and trend sequences are reconstructed. Finally, BP, LSTM, and LSSVR are used to predict the subsequences with multiple inputs and single outputs, and the calculation results are finally integrated. The limitations of this study are mainly that it requires high requirements for atmospheric pollution data, and the calculation is performed through a combined prediction model, which has a high algorithm complexity and low calculation efficiency.
[0008] The related existing patent 1 (CN202011041190.3 A high-precision spatiotemporal prediction method for PM2.5 based on deep learning (under review-substantive examination)) discloses a method for spatiotemporal prediction of PM2.5 concentration based on deep learning. This method can not only improve the accuracy of long-term spatiotemporal prediction, but also can be used to predict PM2.5 concentrations at future moments in a large continuous spatial range to meet the needs of practical applications. It includes the steps of 1) selecting multi-source data affecting PM2.5 for preprocessing and influencing factor analysis, wherein the multi-source data includes PM2.5 data from ground monitoring sites, meteorological data, spatially related data, and physical characteristic data; step 2) performing spatiotemporal matching on the multi-source data; step 3) clustering the multi-source data based on spatiotemporal correlation and finding a suitable time lag value; step 4) using a recursive LSTM model to train the PM2.5 of each clustered site and evaluate the accuracy of this prediction method; step 5) making a fine PM2.5 spatiotemporal distribution map of the forecast results.
[0009] Existing patent 2 (CN202110598978.2 A PM2.5 prediction method and storage medium based on graph self-supervised learning (under review-substantive examination)) involves a PM2.5 prediction method and storage medium based on graph self-supervised learning, which establishes a prediction model by using the powerful learning ability of graph neural networks for non-Euclidean data. In the present invention, the PM2.5 prediction method includes: step 1) inputting historical environmental spatiotemporal data of multiple sites in the region to construct a graph; step 2) constructing a PM2.5 prediction model; step 3) inputting spatiotemporal graph sequence data to train the prediction model constructed in step 2; step 4) calculating the accuracy of the model prediction. If the accuracy exceeds the preset threshold, execute step 5, otherwise, return to step 3; step 5) inputting the data of multiple sites in the region into the trained prediction model to obtain the predicted PM2.5 concentration values of multiple sites in the region.
[0010] Existing patent 3 (CN201911359480.X A method for predicting urban PM2.5 concentration by integrating EMD and LSTM (under review-substantive examination)) relates to an air quality concentration prediction method, and in particular, to a deep learning urban PM2.5 concentration prediction method integrating EMD and LSTM. It includes the following steps: 1) obtaining hourly time series data and cleaning the obtained data; 2) using empirical mode decomposition EMD to stabilize the PM2.5 concentration data to obtain multiple components; 3) determining the sliding time window T, performing data sequence segment segmentation processing on each component, and normalizing the unified dimension to obtain multiple data sets; 4) dividing the data set into a training set and a test set, constructing LSTM network models for training respectively, using the trained model to predict each component, and denormalizing it to obtain the final urban PM2.5 concentration prediction result; 5) on this basis, constructing a long short-term memory neural network LSTM model and training it; 6) using the trained model to predict, and denormalizing it to obtain the final urban PM2.5 concentration prediction result.
[0011] The above three patents basically focus on using deep learning technology to select relevant variables to predict PM2.5 concentration. However, the relevant patents have the following problems: Patent 1 selects too many variables, which easily leads to high algorithm complexity and insufficient model practicality; Patent 2 adopts GCN, which is a calculation method for the entire graph. One calculation requires updating the node features of the entire graph, which is not suitable for complex and changeable PM2.5 prediction; Patent 3 only considers the PM2.5 time series and does not utilize the spatial information that causes PM2.5 pollution. The prediction accuracy is limited when facing long-step spatiotemporal predictions.
[0012] A scientific and reasonable PM2.5 long-term spatial and temporal series prediction method is the premise for ensuring the joint prevention and control policy of air pollution. The existing technology has the following problems:
[0013] 1. The use of the method is limited. Existing research is mostly aimed at short-term prediction, which cannot meet the requirements in practical application;
[0014] 2. Poor practicality, requiring massive amounts of air pollution data and geographic data, numerical simulation models require a large number of parameters, model construction is complex, and requires too many computing resources;
[0015] 3. Most of the existing deep learning methods only target PM2.5 sequences, or have high complexity when extracting spatially relevant information on PM2.5 pollution, and are not accurate enough for long-term spatiotemporal predictions. Summary of the invention
[0016] In view of the defects of the prior art, the purpose of the present invention is to provide a method for long-term spatiotemporal prediction of PM2.5 concentration based on the GAT-EMD-GRU deep learning algorithm, to provide a new idea for solving the problem of PM2.5 concentration prediction, to combine the empirical mode decomposition algorithm in the field of signal decomposition with the deep learning algorithm, and to improve the accuracy of long-term spatiotemporal prediction of PM2.5.
[0017] In order to achieve the above object, the technical solution of the present invention is as follows:
[0018] A method for long-term spatiotemporal prediction of PM2.5 pollution concentration based on deep learning model coupled with empirical mode decomposition, the steps are as follows:
[0019] Step 000, collect PM2.5 pollution data and related meteorological variable data, perform data cleaning, and conduct correlation analysis;
[0020] Step 010, constructing a graph data structure through the collected data and inputting it into the GAT module of the model to obtain the spatial information of PM2.5 pollution;
[0021] Step 020, according to the empirical mode decomposition algorithm, the PM2.5 pollution sequence is decomposed into a number of low-frequency sub-pollution sequences and residuals, and the sub-sequences and residuals are spliced to obtain the time information of PM2.5 pollution;
[0022] In step 030, a gated recurrent unit is selected as the basic unit, the spatiotemporal feature information obtained in the above two steps is aggregated and input into the GRU for calculation, and finally output through the fully connected layer to obtain the prediction result.
[0023] Preferably, the method further comprises the following steps:
[0024] Step 001, performing correlation analysis through the Pearson correlation coefficient to determine the correlation between the selected meteorological variables and PM2.5 pollution.
[0025] Preferably, step 010 also includes the following steps:
[0026] Step 011, construct a graph data structure based on the selected variables and association rules.
[0027] Step 012, input the graph data structure into GAT, and obtain the spatial information of PM2.5 pollution based on the attention mechanism of GAT;
[0028] Step 013, in order to make the prediction results more stable and accurate, a multi-head attention mechanism is adopted to perform parallel operations on K independent attention mechanisms, and the results are spliced to obtain the final spatial feature output results.
[0029] Preferably, step 020 specifically includes the following steps:
[0030] Step 021, obtaining all the maximum and minimum values of the signal sequence by using the Find Peaks algorithm;
[0031] Step 022, obtaining two smooth peak / trough fitting curves, namely the upper envelope and the lower envelope of the signal, through the maximum and minimum value groups of the signal sequence by using the cubic spline interpolation method;
[0032] Step 023, averaging the two extreme value curves to obtain an average envelope;
[0033] Step 024, according to the IMF function definition, after obtaining the first IMF, the original signal is subtracted from IMF1 to obtain a new original signal, and then the above screening analysis is performed to obtain IMF2, and so on to complete the empirical mode decomposition.
[0034] Step 025, concatenate the obtained IMF subsequences and residuals of city node i at time t to obtain the EMD matrix of city node i at time t
[0035] Preferably, step 030 specifically includes the following steps:
[0036] Step 031, aggregate the spatiotemporal feature information obtained in the above two steps and input it into the GRU for calculation.
[0037] Step 032: Pass the output of GRU to the fully connected layer to obtain the prediction result.
[0038] Compared with the prior art solutions, the present invention has the following beneficial effects:
[0039] 1. This method does not require other complex variables and can achieve more accurate prediction results using only PM2.5 pollution data and meteorological variable data.
[0040] 2. No need to use simulation and numerical simulation software to build complex models, and no need for a lot of computing resources.
[0041] 3. For long-term predictions, such as 24 hours and 48 hours, the present invention is still more effective than other methods.
[0042] 4. It integrates meteorological and geographical knowledge, and has a certain degree of explainability compared with other deep learning methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a flow chart of a method for long-term spatiotemporal prediction of PM2.5 pollution concentration based on coupling of deep learning model and empirical mode decomposition of the present invention;
[0044] Figure 2 It is the Pearson correlation coefficient graph between PM2.5 and weather variables, and the p-value is less than 0.05;
[0045] Figure 3 This is the decomposition result graph of the EMD algorithm;
[0046] Figure 4 This is a comparison chart of the predicted value and the true value of the GAT-EGRU model on the test set (the node is Dalian, the prediction time is 24h, and the value is normalized);
[0047] Figure 5 The following are the model performance and comparison charts: (a) is the MSE indicator result; (b) is the MAE indicator result. DETAILED DESCRIPTION
[0048] 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, other embodiments obtained by ordinary technicians in this field without creative work are all within the scope of protection of the present invention.
[0049] A method for long-term spatiotemporal prediction of PM2.5 pollution concentration based on deep learning model coupled with empirical mode decomposition includes the following steps:
[0050] Step 1: Collect PM2.5 pollution data and related meteorological variable data, clean the data and perform correlation analysis;
[0051] The correlation analysis was performed through the Pearson correlation coefficient to determine the correlation between the selected relevant meteorological variable data and the PM2.5 pollution data. The Pearson correlation coefficient formula is as follows:
[0052]
[0053] This is the overall correlation coefficient, where X and Y refer to two random variables, PM2.5 and a single related meteorological variable; the single related meteorological variable data and PM2.5 pollution data are the overall samples, cov(X,Y) refers to the covariance of PM2.5 data and single meteorological variable data, σ refers to the standard deviation of the sample data, E[] refers to the expectation of the random variable, and μ refers to the mean of the sample data; for the sample data, that is, PM2.5 data and single meteorological variable data, the formulas of cov(X,Y) and σ are:
[0054] cov(X,Y)=E[XY]-E[X]E[Y]
[0055]
[0056] Substituting this into ρ X,Y In the formula, the Pearson correlation coefficient r of the sample is obtained:
[0057]
[0058] Among them, X i , Y i Refers to the samples in random variables X, Y, refers to a single piece of PM2.5 pollution data and a single piece of meteorological variable data, It refers to the overall mean of PM2.5 pollution data and individual meteorological variable data, and n is the number of data;
[0059] Step 2: Build a graph data structure through the relevant meteorological variable data cleaned in step 1, and build the GAT module of the GAT-EGRU model based on the attention mechanism and the graph data structure, input the PM2.5 pollution data and relevant meteorological variable data to obtain new spatial feature information;
[0060] Step 2.1: Based on the relevant meteorological variable data and association rules selected in step 1, a graph data structure is constructed. The association rules are as follows:
[0061] A ij =H(d θ -d ij )·H(m θ -m ij )
[0062] Among them, d ij =||ρ i -ρ j ||,
[0063]
[0064] Among them, A ijIndicates whether there is a correlation: a value of 0 indicates no correlation, and a value of 1 indicates a correlation. i Represents the position of city node i in the graph data structure, d ij Represents the distance between two nodes; m ij represents the altitude of the mountain range between city node i and city node j. ij In the formula, h(·) is the height function, λ is the proportion parameter, sup{} means to find the upper bound; ‖·‖ is the L2 norm of the vector, H(·) is the step function, and H(x) = 1 if and only if x>0; d θ 、m θ are the thresholds for distance and altitude;
[0065] Step 2.2, based on the GAT attention mechanism and the graph data structure of step 2.1, construct the GAT module of the model. Specifically, the formula for constructing GAT is as follows:
[0066]
[0067]
[0068] Where, a: R p′ ×R p′ →R is the self-attention mechanism, W∈R p×p′ is the weight matrix, M is the set of neighbor nodes of node i, is the spatial feature matrix of node i, e ij Indicates the importance of node j to node i; in order to make e ij To facilitate comparison between different nodes, all attention coefficients of j are normalized using the Softmax function to obtain α ij , where softmax(·) refers to the Softmax function;
[0069] In the experiment, the attention mechanism a is a single-layer feedforward neural network consisting of a weight vector Parameterized and LeakyReLU nonlinear function is applied; after full expansion, the coefficient α calculated by the attention mechanism ij It is expressed as:
[0070]
[0071] in,· T represents transposition, || represents concatenation operation;
[0072] Finally, the attention coefficient α of node i and its neighbor node j is ij As well as the weight matrix W, the original space feature matrix Multiply them together to get a new node matrix that incorporates neighbor node information
[0073]
[0074] Among them, ω is a nonlinear operation;
[0075] Step 2.3: To make the prediction results more stable and accurate, a multi-head attention mechanism is used to perform parallel operations on the K independent attention mechanisms in step 2.2, and the results are concatenated to obtain the final spatial feature output result:
[0076]
[0077] in, represents the result of normalizing the attention coefficient of the kth attention mechanism, then the final output feature matrix is There are Kp′ features. So far, the GAT module of the GAT-GRU model has been constructed.
[0078] Step 3: According to the empirical mode decomposition algorithm, the PM2.5 pollution data is serialized to obtain a PM2.5 pollution data sequence, that is, a numerical sequence of PM2.5 changing over time, which is decomposed into several low-frequency sub-pollution sequences and residuals, and the sub-pollution sequences and residuals are spliced to obtain the time information of PM2.5 pollution;
[0079] Step 3.1, obtain the signal sequence, i.e., all the maximum and minimum values of the PM2.5 pollution sequence, through the Find Peaks algorithm;
[0080] Step 3.2, the signal sequence is subjected to cubic spline interpolation to obtain two smooth peak / trough fitting curves, namely, the upper envelope and the lower envelope of the signal;
[0081] Step 3.3, averaging the two extreme value curves to obtain the average envelope;
[0082] Step 3.4, according to the definition of IMF function, after obtaining the first IMF, subtract IMF1 from the original signal to obtain the new original signal, which is the intermediate signal. Then, through the above screening analysis, IMF2 is obtained, and so on, to complete the empirical mode decomposition. The calculation formula is as follows:
[0083]
[0084] Among them, s represents the number of IMF functions after decomposition, x i (t) is the PM2.5 pollution sequence, u i (t) is the decomposed subsequence, r n (t) is the residual that cannot be decomposed at the end;
[0085] The two conditions for determining whether the intermediate signal obtained in step 3.4 satisfies the IMF specifically refer to: (1) in the entire data segment, the number of extreme points and the number of zero-crossing points must be equal or differ by no more than one; (2) at any time, the average value of the upper envelope formed by the local maximum points and the lower envelope formed by the local minimum points is zero, that is, the upper and lower envelopes are locally symmetric with respect to the time axis;
[0086] Step 3.5: concatenate the IMF subsequences and residuals of city node i at time t to obtain the EMD matrix of city node i at time t.
[0087]
[0088] Step 4: Select the gated recurrent unit as the basic unit to construct the GRU module of the GAT-EGRU model, aggregate the spatiotemporal feature information obtained in the previous two steps, input it into the GRU for calculation, and finally output it through the fully connected layer to obtain the prediction result;
[0089] Step 4.1, first, select the gated recurrent unit as the basic unit to construct the GRU. Specifically, the specific formula of GRU is as follows:
[0090]
[0091]
[0092]
[0093]
[0094]
[0095] in They are the outputs of the GAT module and the EMD module respectively. represents the information after the aggregation of the two, W z , W r , W are weight matrices that can be learned during the training process. For input, is the space-time information of the previous moment, To update the gate, To reset the gate, Represents the spatiotemporal information at the current time. By updating the gate, the required spatiotemporal information is retained, the unnecessary ones are discarded, and the final spatiotemporal information is obtained. So far, the GRU module of the GAT-EGRU model has been successfully constructed;
[0096] Step 4.2: Pass the output of GRU to the fully connected layer to get the prediction result. The formula of the fully connected layer is as follows:
[0097]
[0098] Here, Ω represents the fully connected layer.
[0099] like Figure 1-Figure 5 The present invention proposes a method for long-term spatiotemporal prediction of PM2.5 pollution concentration based on the coupling of deep learning model and empirical mode decomposition, which specifically includes the following steps:
[0100] The first step is to collect PM2.5 pollution data and meteorological variable data to build a large pollution prediction data set. 184 cities with severe pollution in the Yangtze River Delta and Beijing-Tianjin-Hebei region were selected, and the time span was selected from 2015 to 2018, with data recorded every 3 hours. Among them, PM2.5 data were obtained from national control stations, while meteorological data were from the European Center for Weather Forecasting (ECMWF) climate reanalysis data ERA5 large data set, which was inverted through satellite data and corrected by multi-source data reanalysis. The selected meteorological variable data are shown in Table 1.
[0101] Table 1 shows the meteorological variables selected by the invention;
[0102]
[0103]
[0104] Next, a correlation analysis was performed using the Pearson correlation coefficient to determine the correlation between the selected meteorological variables and PM2.5 pollution.
[0105] The Pearson correlation coefficient calculation formula is as follows:
[0106] The Pearson correlation coefficient between two variables is defined as the quotient of the covariance and the standard deviation between the two variables:
[0107]
[0108] The above formula defines the overall correlation coefficient, which is usually represented by the Greek lowercase letter ρ. By estimating the covariance and standard deviation of the sample, we can get the Pearson correlation coefficient, which is usually represented by the English lowercase letter r:
[0109]
[0110] In the second step, based on the obtained pollution prediction data set, the pollution association rules are determined, the graph data structure is constructed, and the GAT module of the model is passed to learn the influence of nearby associated nodes on each node. Based on the pollution prediction data set and the association rules, the graph data structure is obtained. The PM2.5 pollution values and weather variables of the above cities are used as node attributes of the graph structure data. The edges in the graph structure data are determined according to formula (3).
[0111] A ij =H(d θ -d ij )·H(m θ -m ij ), where d ij =||ρ i -ρ j ||,
[0112] in
[0113] where ρ i represents the location (latitude and longitude) of node i, s ij represents the distance between two nodes, H(·) is a step function, and H(x) = 1 if and only if x>0. θ , m θ are the distance and height thresholds, which are 300km and 1200m respectively.
[0114] With the above constraints, PM2.5 can be transported and diffused only when the distance between two city nodes is less than 300km and the mountain range between them is less than 1200m.
[0115] Afterwards, the current feature representation of the node at time t is and the last PM 2.5 The predicted values of the concentration are spliced to obtain the node representation The node represents The graph data structure is input into the graph attention network GAT. The attention coefficient of the surrounding nodes of each city node and the spatial feature information after integrating the surrounding related node information are obtained. Specifically, the formula of the GAT module is expressed as follows:
[0116]
[0117]
[0118]
[0119]
[0120] Where, a: R p′ ×Rp′ →R is the self-attention mechanism, Q∈R p×p′ is the weight matrix, M is the set of neighbor nodes of node i, T represents transposition, and || represents concatenation operation.
[0121] In order to make the prediction results more accurate and stable, a multi-head attention mechanism is used to perform parallel operations on K independent attention mechanisms, and then the results are spliced to obtain the final spatial feature output result:
[0122]
[0123] in, represents the result of normalizing the attention coefficient of the kth attention mechanism, then the final output feature matrix P′ t There are Kp′ features.
[0124] The third step is to decompose the PM2.5 pollution sequence into several low-frequency sub-pollution sequences according to the empirical mode decomposition algorithm. The process of the empirical mode decomposition algorithm is as follows:
[0125] 1. Find the extreme points and obtain all the maximum and minimum values of the signal sequence through the Find Peaks algorithm;
[0126] 2. Fitting envelope curve: Through the maximum and minimum value groups of the signal sequence, two smooth peak / trough fitting curves are obtained by cubic spline interpolation, namely the upper envelope and lower envelope of the signal;
[0127] 3. Mean envelope The mean envelope is obtained by averaging the two extreme value curves;
[0128] 4. Intermediate signal The original signal minus the mean envelope to obtain the intermediate signal;
[0129] 5. Determine the intrinsic mode function (IMF) IMF needs to meet two conditions:
[0130] 1) In the entire data segment, the number of extreme points and the number of zero-crossing points must be equal or differ by no more than one.
[0131] 2) At any time, the average value of the upper envelope formed by the local maximum point and the lower envelope formed by the local minimum point is zero, that is, the upper and lower envelopes are locally symmetrical with respect to the time axis.
[0132] After obtaining the first IMF using the above method, subtract IMF1 from the original signal as the new original signal, and then use the above screening analysis to obtain IMF2, and so on to complete the empirical mode decomposition. The decomposition formula is as follows:
[0133]
[0134] Then use formula (10) for aggregation to get the EMD matrix
[0135]
[0136] In the fourth step, since the gated recurrent unit (GRU) can solve the long-term dependency problem and the gradient vanishing problem in the RNN network, the present invention selects the gated recurrent unit as the basic unit, aggregates the spatiotemporal feature information obtained in the above two steps, and inputs it into the GRU for calculation, and finally outputs it through the fully connected layer to obtain the prediction result. The GRU formula is as follows:
[0137]
[0138]
[0139]
[0140]
[0141]
[0142] Where W z , W r , W are weight matrices that can be learned during the training process. For input, To update the gate, To reset the gate, Represents the spatiotemporal information at the current time. By updating the gate, the required spatiotemporal information is retained, the unnecessary ones are discarded, and the final spatiotemporal information is obtained.
[0143] Finally, through the fully connected layer, we get the final predicted value:
[0144]
[0145] Where Ω represents the fully connected layer.
[0146] The present invention is compared with the existing prediction model method through experiments and proves its feasibility.
[0147] The beneficial effects of the present invention are:
[0148] 1. This method does not require other complex variables and can achieve more accurate prediction results using only PM2.5 pollution data and meteorological variable data.
[0149] 2. No need to use simulation and numerical simulation software to build complex models, and no need for a lot of computing resources.
[0150] 3. For long-term predictions, such as 24 hours and 48 hours, the present invention is still more effective than other methods.
[0151] 4. It integrates meteorological and geographical knowledge, and has a certain degree of explainability compared with other deep learning methods.
[0152] With the above-mentioned ideal embodiments of the present invention as inspiration, through the above-mentioned description, those skilled in the art can make various changes and modifications without departing from the technical concept of the present invention. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A method for long-term spatiotemporal prediction of PM2.5 pollution concentration based on deep learning model coupled with empirical mode decomposition, characterized in that: The following steps are involved: Step 1: Collect PM2.5 pollution data and related meteorological variable data, clean the data and perform correlation analysis; The correlation analysis was performed through the Pearson correlation coefficient to determine the correlation between the selected relevant meteorological variable data and the PM2.5 pollution data. The Pearson correlation coefficient formula is as follows: This is the overall correlation coefficient, where X and Y refer to two random variables, PM2.5 and a single related meteorological variable; the single related meteorological variable data and PM2.5 pollution data are the overall samples, cov(X, Y) refers to the covariance of PM2.5 data and single meteorological variable data, σ refers to the standard deviation of sample data, E[] refers to the expectation of the random variable, and μ refers to the mean of the sample data; for the sample data, i.e. PM2.5 data and single meteorological variable data, the formulas of cov(X, Y) and σ are: cov(X,Y)=E[XY]-E[X]E[Y] Substituting this into ρ X,Y In the formula, the Pearson correlation coefficient r of the sample is obtained: Among them, X i , Y i Refers to the samples in random variables X and Y, refers to a single piece of PM2.5 pollution data and a single piece of meteorological variable data, It refers to the overall mean of PM2.5 pollution data and individual meteorological variable data, and n is the number of data; Step 2: Build a graph data structure through the relevant meteorological variable data cleaned in step 1, and build the GAT module of the GAT-EGRU model based on the attention mechanism and the graph data structure, input the PM2.5 pollution data and relevant meteorological variable data to obtain new spatial feature information; Step 2.1: Based on the relevant meteorological variable data and association rules selected in step 1, a graph data structure is constructed. The association rules are as follows: A ij =H(d θ -d ij )·H(m θ -m ij ) among them,d ij =||ρ i -r j ||, Among them, A ij Indicates whether there is a correlation: a value of 0 indicates no correlation, and a value of 1 indicates a correlation. i Represents the position of city node i in the graph data structure, d ij Represents the distance between two nodes; m ij represents the altitude of the mountain range between city node i and city node j. ij In the formula, h(·) is the height function, λ is the proportion parameter, sup{} means to find the upper bound; ||·|| is the L2 norm of the vector, H(·) is the step function, and H(x) = 1 if and only if x>0; d θ 、m θ are the thresholds for distance and altitude; Step 2.2, based on the GAT attention mechanism and the graph data structure of step 2.1, construct the GAT module of the model. Specifically, the formula for constructing GAT is as follows: Where, a: R p′ ×R p′ →R is the self-attention mechanism, W∈R p×p′ is the weight matrix, M is the set of neighbor nodes of node i, is the spatial feature matrix of node i, e ij Indicates the importance of node j to node i; in order to make e ij To facilitate comparison between different nodes, all attention coefficients of j are normalized using the Softmax function to obtain α ij , where softmax(·) refers to the Softmax function; In the experiment, the attention mechanism a is a single-layer feedforward neural network consisting of a weight vector Parameterized and LeakyReLU nonlinear function is applied; after full expansion, the coefficient α calculated by the attention mechanism ij It is expressed as: Among them, ·T represents transposition, || represents concatenation operation; Finally, the attention coefficient α of node i and its neighbor node j is ij As well as the weight matrix W, the original space feature matrix Multiply them together to get a new node matrix that incorporates neighbor node information Among them, σ is a nonlinear operation; Step 2.3: To make the prediction results more stable and accurate, a multi-head attention mechanism is used to perform parallel operations on the K independent attention mechanisms in step 2.2, and the results are concatenated to obtain the final spatial feature output result: in, represents the result of normalizing the attention coefficient of the kth attention mechanism, then the final output feature matrix is There are Kp′ features. So far, the GAT module of the GAT-GRU model has been constructed. Step 3: According to the empirical mode decomposition algorithm, the PM2.5 pollution data is serialized to obtain a PM2.5 pollution data sequence, that is, a numerical sequence of PM2.5 changing over time, which is decomposed into several low-frequency sub-pollution sequences and residuals, and the sub-pollution sequences and residuals are spliced to obtain the time information of PM2.5 pollution; Step 3.1, obtain the signal sequence, i.e., all the maximum and minimum values of the PM2.5 pollution sequence, through the Find Peaks algorithm; Step 3.2, the signal sequence is subjected to cubic spline interpolation to obtain two smooth peak / trough fitting curves, namely, the upper envelope and the lower envelope of the signal; Step 3.3, averaging the two extreme value curves to obtain the average envelope; Step 3.4, according to the definition of IMF function, after obtaining the first IMF, subtract IMF1 from the original signal to obtain the new original signal, which is the intermediate signal. Then, through the above screening analysis, IMF2 is obtained, and so on, to complete the empirical mode decomposition. The calculation formula is as follows: Among them, s represents the number of IMF functions after decomposition, x i (t) is the PM2.5 pollution sequence, u i (t) is the decomposed subsequence, r n (t) is the residual that cannot be decomposed at the end; The two conditions for determining whether the intermediate signal obtained in step 3.4 satisfies the IMF specifically refer to: (1) in the entire data segment, the number of extreme points and the number of zero-crossing points must be equal or differ by no more than one; (2) at any time, the average value of the upper envelope formed by the local maximum points and the lower envelope formed by the local minimum points is zero, that is, the upper and lower envelopes are locally symmetric with respect to the time axis; Step 3.5: concatenate the IMF subsequences and residuals of city node i at time t to obtain the EMD matrix of city node i at time t. Step 4: Select the gated recurrent unit as the basic unit to construct the GRU module of the GAT-EGRU model, aggregate the spatiotemporal feature information obtained in the previous two steps, input it into the GRU for calculation, and finally output it through the fully connected layer to obtain the prediction result; Step 4.1, first, select the gated recurrent unit as the basic unit to construct the GRU. Specifically, the specific formula of GRU is as follows: in They are the outputs of the GAT module and the EMD module respectively. represents the information after the aggregation of the two, W z , W r , W are weight matrices that can be learned during the training process. For input, is the space-time information of the previous moment, To update the gate, To reset the gate, Represents the spatiotemporal information at the current time. By updating the gate, the required spatiotemporal information is retained, the unnecessary ones are discarded, and the final spatiotemporal information is obtained. So far, the GRU module of the GAT-EGRU model has been successfully constructed; Step 4.2: Pass the output of GRU to the fully connected layer to get the prediction result. The formula of the fully connected layer is as follows: Here, Ω represents the fully connected layer.
Citation Information
Patent Citations
EMD and LSTM fused urban PM2.5 concentration prediction method
CN111144286A
PM2.5 high-precision space-time prediction method based on deep learning
CN112183625A
PM2.5 prediction method based on graph self-supervised learning and storage medium
CN113408191A
Water environment pollution video understanding method and system fusing spatio-temporal characteristic attention
CN114067238A
Node excitation driving function measures for cerebral cortex network analysis of electroencephalograms
US9107595B1