A PM2.5 concentration prediction method based on attention mechanism LSTM network

By using an attention-based LSTM network, combined with PM2.5, other pollutants, and meteorological factor data, multi-scale features are extracted and long sequence inputs are processed, solving the problem of insufficient feature capture in existing PM2.5 concentration prediction and achieving higher accuracy prediction results.

CN115330082BActive Publication Date: 2025-12-02CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211114196.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-14
Publication Date
2025-12-02
Estimated Expiration
2042-09-14

AI Technical Summary

Technical Problem

Existing PM2.5 concentration prediction methods are unable to effectively capture short-term and long-term change characteristics, and the interaction and dependency relationships of different time series information in multivariate prediction are not well modeled, resulting in low prediction accuracy.

Method used

An attention-based LSTM network is used, combined with PM2.5, other pollutant concentrations and meteorological factor data, to extract multi-scale features through two-dimensional convolution and stacked residual networks, and the LSTM network is used to process long sequence inputs and fuse feature map information for prediction.

Benefits of technology

It improves the accuracy of PM2.5 concentration prediction and the model's learning ability, enhances its adaptability to nonlinear time series changes, and improves the accuracy of prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115330082B_ABST
    Figure CN115330082B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of air pollutant prediction, specifically relating to a PM2.5 concentration prediction method based on an attention mechanism-based LSTM network. The method includes: constructing a PM2.5 concentration prediction model with PM2.5 as the target pollutant; training the PM2.5 concentration prediction model using PM2.5 concentration data from environmental monitoring, other pollutant concentration data, and meteorological factor data; acquiring PM2.5 concentration data for a first time period and other pollutant data and meteorological factor data for a second time period, and using the trained PM2.5 concentration prediction model to predict the PM2.5 concentration for the second time period. The prediction results of this invention are highly accurate and practical.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of air pollutant prediction, specifically relating to a PM2.5 concentration prediction method based on an attention mechanism-based LSTM network. Background Technology

[0002] With the development of human technology and the improvement of living standards, more and more human activities have not only placed a huge burden on natural environmental protection, but also seriously affected human living environments. Oil extraction, thermal power generation, metallurgical engineering, chemical gas emissions, and heating processes generate large amounts of fine particulate matter. These particles, with an equivalent diameter of less than or equal to 2.5 micrometers in aerodynamics, are known as PM2.5. 2.5 Despite PM 2.5 Although PM2.5 constitutes a small percentage of the overall atmosphere, its ability to be easily inhaled and cause harm to human health makes it a significant component of the atmosphere. 2.5 It has become an important indicator for monitoring environmental pollution. Regarding PM2.5... 2.5 Concentration forecasting, when effectively combined with concentration monitoring, can provide more effective early warnings of future concentration trends and offer guidance for the management of pollutants and exhaust emissions. This is of great significance for early warning and control plans for urban air quality.

[0003] Existing PM 2.5 Time series prediction methods are mainly divided into statistical methods, traditional machine learning methods, and deep learning methods. Classical statistical methods are mostly applicable to linearly changing time series, but real-world time series data are influenced by complex factors and often exhibit significant non-linear trends. Traditional machine learning is limited by expert knowledge and feature engineering, lacking flexibility and versatility in complex scenarios. Deep learning, as an end-to-end solution, can effectively extract high-dimensional features using carefully designed network structures for downstream tasks. Classical prediction methods and machine learning methods are the most widely used methods due to their strong interpretability and solid theoretical foundation. With the popularization of artificial intelligence technology, more and more deep learning methods have been proven effective. By abstracting the human attention mechanism, attention mechanisms for time series can effectively capture important time step features; therefore, models integrating attention mechanisms and LSTM networks have been proposed for PM (predictive programming). 2.5 Prediction field.

[0004] Currently, most PM 2.5Concentration prediction methods fail to capture short-term and long-term variation characteristics effectively. Different time windows contain not only periodic information but also the temporal effects of local abrupt changes. Considering only one time window's variation pattern reduces prediction accuracy. While attention-based prediction models can handle variable-length time series problems relatively effectively, they are still limited by excessive hyperparameters, slow training speed, and poor performance on small datasets. Furthermore, due to the complexity of external influencing factors, an increasing number of PM... 2.5 Concentration prediction is no longer limited to univariate analysis but has been transformed into a multivariate prediction problem. Therefore, effectively modeling the interactions and interdependencies between different time series data is of great significance for improving prediction accuracy. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention proposes a PM2.5 concentration prediction method based on an attention-based LSTM network. The method includes: constructing a PM2.5 concentration prediction model with PM2.5 as the target pollutant; training the PM2.5 concentration prediction model using PM2.5 concentration data from environmental monitoring, other pollutant concentration data, and meteorological factor data; acquiring PM2.5 concentration data for a first time period and other pollutant concentration data and meteorological factor data for a second time period, and using the trained PM2.5 concentration prediction model to predict the PM2.5 concentration for the second time period; wherein, the other pollutant concentration data includes PM2.5 concentration data for a second time period. 10 Hourly concentration data for CO, NO2, O3, and SO2;

[0006] The process of training a PM2.5 concentration prediction model includes:

[0007] S1: Perform data preprocessing on PM2.5 concentration data, other pollutant concentration data, and meteorological factor data from environmental monitoring; construct a multivariate time series based on the preprocessed data;

[0008] S2: Two-dimensional convolution is used to extract features from multivariate time series at different scales to obtain feature maps at different scales;

[0009] S3: Compress and nonlinearly transform the feature maps at different scales respectively, and input the processed feature maps into a stacked residual network with attention mechanism for processing to obtain output features; fuse all output features to obtain a fused feature map;

[0010] S4: Input the fused feature map into the LSTM network for processing to obtain the PM2.5 concentration prediction results.

[0011] Preferably, the meteorological factor data includes hourly data on temperature, humidity, wind speed, wind direction, and precipitation.

[0012] Preferably, the process of using two-dimensional convolution to extract features of multivariate time series at different scales includes: performing convolution operations on multivariate time series using two-dimensional convolution with different kernels to obtain time feature representations of different time series; and processing the time feature representations of different time series using activation functions and max pooling layers to obtain feature maps of different scales.

[0013] Preferably, the stacked residual network with attention mechanism is composed of multiple basic network units stacked together. Each basic network unit consists of an attention module and a unit residual network connected together. The unit residual network includes batch normalization, one-dimensional convolution and ReLU activation function.

[0014] Preferably, the processing of feature maps by a stacked residual network with an attention mechanism includes:

[0015] The feature maps are input into the global average pooling layer and the global max pooling layer respectively for compression processing to obtain average pooling features and max pooling features;

[0016] The average pooling features and max pooling features are input into the multilayer shared perceptron to obtain two branch channel attention feature maps; the multilayer shared perceptron consists of a fully connected layer connected to an activation function and then two fully connected layers connected in series;

[0017] The attention feature maps of the two branch channels are added together and then processed using the sigmoid function to obtain the attention feature map.

[0018] Map all attention feature maps back to the original feature maps to obtain convolutional feature maps with weighted feature mapping;

[0019] Stacked residual networks process the convolutional feature maps after feature weighting to obtain output features.

[0020] Furthermore, the formulas for compressing the feature map using global average pooling and global max pooling are as follows:

[0021]

[0022]

[0023] Where a represents the average pooling feature, b represents the max pooling feature, and u c (i,j) represents the data unit (i,j) in the convolutional feature map, W represents the width of the convolutional feature map, and H represents the height of the convolutional feature map.

[0024] Furthermore, the formula for obtaining the attention feature map is:

[0025] t=σ(W3δ(W1W2a)+W3δ(W1W2b))

[0026] Where t represents the attention feature map, σ represents the sigmoid function, δ represents the ReLU activation function, a represents the extracted average pooling feature, b represents the extracted max pooling feature, W1 represents the dimensionality reduction matrix, W2 represents the dimensionality increase matrix, and W3 represents the linear mapping matrix.

[0027] Furthermore, the formula for mapping the attention feature map to the original feature map is:

[0028]

[0029] in, F represents the convolutional feature map after feature weighting mapping. scale () represents the convolution mapping operation, t c u represents the weight scalar of each convolutional feature channel. c This represents the convolutional feature map.

[0030] The beneficial effects of this invention are as follows:

[0031] (1) This invention is based on multiple convolutional neural network branches as feature extractors. Different convolutional filter sizes and sliding strides can sense changes at different time scales, extract implicit features, and improve the model’s ability to learn change patterns of nonlinear time series. In addition, multiple convolutional branches can also effectively enhance features.

[0032] (2) This invention adds a stacked residual attention network after each convolutional branch to model the interdependence of the convolutional feature map channels of different branches and adaptively weights the channels that have an improvement effect on the prediction target; in addition, since the residual network can be stacked in multiple layers, it can effectively represent high-dimensional feature vectors.

[0033] (3) This invention combines convolutional neural networks and LSTM networks, affecting PM 2.5 The factors influencing concentration changes are complex. Multivariate time series consisting of PM2.5, other gaseous pollutants, and meteorological factors can learn the correlation between covariates and the prediction target through convolution operations. LSTM networks can handle long sequence inputs and use the feature matrix of the input to learn time series relationships, making the model more accurate and thus improving the accuracy of prediction results.

[0034] (4) This invention connects the nonlinear transformation convolution block and the attention module through feature fusion. Feature fusion can mix feature map information at different scales. Stacked nonlinear residual connections enhance the weight of feature channels that can improve the model's predictive ability while improving the utilization rate of shallow features. Attached Figure Description

[0035] Figure 1 This is a flowchart of the PM2.5 concentration prediction method based on the attention mechanism LSTM network in this invention.

[0036] Figure 2 This is a schematic diagram of the PM2.5 concentration prediction model structure based on the attention mechanism LSTM network in this invention.

[0037] Figure 3 This is a schematic diagram of the stacked residual network structure in this invention;

[0038] Figure 4 This is a schematic diagram of the attention module structure in this invention. Detailed Implementation

[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0040] This invention proposes a PM2.5 concentration prediction method based on an attention mechanism LSTM network. The method includes the following steps: constructing a PM2.5 concentration prediction model with PM2.5 as the target pollutant; and training the PM2.5 concentration prediction model using PM2.5 concentration data from environmental monitoring, concentration data of other pollutants, and meteorological factor data.

[0041] To obtain hourly PM2.5 concentration data from environmental monitoring, it is necessary to simultaneously collect concentration data for other pollutants, including PM2.5, as other gaseous pollutants can also affect PM2.5 concentration changes. 10 Hourly concentration data for CO, NO2, O3, and SO2 were collected; meanwhile, PM2.5 concentration is also affected by meteorological factors, so meteorological factor data were also acquired; the meteorological factor data included hourly data for temperature, humidity, wind speed, wind direction, and precipitation.

[0042] Acquire PM2.5 concentration data for the first time period, as well as other pollutant concentration data and meteorological factor data for the second time period. Use a trained PM2.5 concentration prediction model to predict the PM2.5 concentration for the second time period; for example... Figure 1 , Figure 2 As shown, the process of training a PM2.5 concentration prediction model includes the following:

[0043] S1: Perform data preprocessing on PM2.5 concentration data, other pollutant concentration data, and meteorological factor data from environmental monitoring; construct a multivariate time series based on the preprocessed data.

[0044] Data is prone to missing values ​​due to reasons such as equipment failure, manual data adjustment, and data loss during transmission. In order to ensure that the model can better learn and capture time patterns in the time series, the data needs to be preprocessed. This invention fills in the missing values ​​of the data. According to the complexity of the time series changes, this invention selects two different missing value filling methods: (1) if the missing value sequence changes relatively smoothly, the linear filling method is selected; (2) if the missing value sequence changes drastically and there are many outliers, the mode of the sequence is used to fill the missing values.

[0045] To reduce the impact of outlier data values ​​on the model and improve its learning ability, this invention employs a normalization method, namely the min-max normalization method, to process the data. Min-max normalization is a method for standardizing discrete values, which maps the linear transformation of the original data to the range [0,1]. The input features are standardized using the min-max normalization method to avoid the influence caused by inconsistent dimensions.

[0046] By concatenating the feature columns of the preprocessed data, a multivariate time series is obtained.

[0047] S2: Two-dimensional convolution is used to extract features from multivariate time series at different scales to obtain feature maps at different scales.

[0048] The model contains multiple convolutional branches with varying kernel sizes. Two-dimensional convolutions with different kernel sizes are used to perform convolution operations on multivariate time series, yielding temporal feature representations for different time series. Specifically, different kernel sizes are used to perform convolution operations on inputs of shape N. t ×N f Perform a convolution operation on the matrix, where N t N represents the size of the input time step. f N represents the size of the input feature dimension. In this invention, N t The possible values ​​for N are (3, 7, 12, 24). f The size of the input feature dimension is flexibly determined based on the number of columns in the dataset or the number of features in the feature set. When the convolutional branch uses size N... t With a ×1 convolution kernel and a stride of (1,1), since the kernel length equals the input time step, it's equivalent to performing a one-dimensional convolution along the feature dimension, yielding a global temporal feature representation for each air pollutant time series. When the convolution branch uses a kernel of size ×1... When the convolution kernel is set to stride (n,1), since the length of the convolution kernel is smaller than the input time step, it is equivalent to extracting local time change information for each univariate time series, thus obtaining the local time feature representation of each air pollutant time series.

[0049] Activation functions and max-pooling layers are used to process the temporal feature representations of different time series to obtain feature maps of different scales. Specifically, the RrLu activation function is used to activate the temporal feature representations of different time series. Finally, to ensure that the output shape of multiple convolutional branches is consistent, max-pooling layers are used to compress the feature information, so that the final output of multiple convolutional processing branches is N. c ×N f N c This represents the number of convolutional filters. Global convolution focuses on long-term temporal dependencies, while local convolution focuses on local temporal change patterns. By utilizing multiple convolutional kernels with different kernels, feature representations of multivariate time series at different scales can be extracted, effectively perceiving the temporal change effects at different time steps.

[0050] S3: Compress and nonlinearly transform the feature maps at different scales respectively, and input the processed feature maps into a stacked residual network with attention mechanism for processing to obtain output features; fuse all output features to obtain a fused feature map.

[0051] Stacked residual networks with attention mechanisms are composed of multiple basic network units stacked together. Each basic network unit consists of an attention module and a unit residual network connected together. The unit residual network includes batch normalization, one-dimensional convolution, and ReLU activation function.

[0052] The feature maps at different scales are compressed and nonlinearly transformed to obtain the processed feature maps. Specifically, the compression operation uses two-dimensional convolution to compress the information in the original feature map. At the same time, in order to enhance the model's representation ability and generalization, the nonlinear activation function ReLU is used to perform a nonlinear transformation on the compressed feature map.

[0053] Using stacked nonlinear modules can extract higher-dimensional implicit features, such as... Figure 3As shown, for each unit residual network, Gaussian noise is first added to the feature map channels obtained from the 2D convolutional network to avoid overfitting and enhance robustness. Since the data distribution of each layer may change during network training after input layer normalization, Gaussian noise is added before batch normalization to avoid covariate shift. Then, a combination of 1D convolution and ReLU activation functions is used to non-linearly transform the data, better fitting the non-linear time series. The stacked residual network processes the convolutional feature map obtained from the attention module after feature weighting and mapping to obtain the output features. Specifically, for each basic unit of the stacked residual network, the attention module weights the input matrix of the basic unit and performs a mapping operation using matrix multiplication, then concatenates it horizontally with the output of the non-linear module to obtain the input of the next basic unit. Through feature extraction and concatenation of multiple basic units, the final output features are obtained. Stacking multiple layers of basic modules based on the above components improves extraction capabilities.

[0054] The attention module is embedded into a stacked residual network via residual connections, and adaptively weights different convolutional feature map channels by leveraging the gradient update feature of backpropagation in neural networks. The processing includes:

[0055] like Figure 4 As shown, the attention module uses a squeeze-and-excitation network structure, which completes the attention mechanism for the channels of the convolutional feature map through three steps: compression, excitation, and feature recalibration.

[0056] Compression: Two different channel compression operations were used. Inputs of shape T×F were fed into a global average pooling layer and a global max pooling layer for compression, yielding average pooling features and max pooling features (both outputs of shape T×1), where T is the time step of the input data and F is the number of feature columns in the input data. The global average pooling layer compressed each channel into a descriptor representing the average pooling feature of that channel, and the global max pooling layer obtained the max pooling feature of each channel. PM 2.5

[0057] Due to the complexity of its causes and the multitude of inducing factors, its changes exhibit irregularity. Different application scenarios, and even the same background with different natural conditions, will produce different sequence curves. When extracting time-series features, it is necessary to pay attention to local abrupt changes in the time series caused by various sudden factors. This invention modifies the original feature extraction method that only uses max pooling features to extract features simultaneously using both max pooling and average pooling features. For curves with gentle changes, average pooling can well describe the average change, but when there are obvious local abrupt changes in the curve, using average pooling alone will cause errors. Using max pooling features simultaneously with average pooling can effectively extract features with drastic local changes, while reducing the error caused by outliers or abnormal values ​​to the overall predictive performance of the model. The calculation formula is:

[0058]

[0059]

[0060] Where a represents the average pooling feature, b represents the max pooling feature, and u c (i,j) represents the data unit (i,j) in the convolutional feature map, W represents the width of the convolutional feature map, and H represents the height of the convolutional feature map.

[0061] Incentives: Average pooling features and max pooling features are input into a multilayer shared perceptron to obtain two branch channel attention feature maps. The multilayer shared perceptron consists of a fully connected layer connected to an activation function and then two fully connected layers connected in series. The first connected fully connected layer restores the activated input to the original number of channels, and the second connected fully connected layer performs a linear transformation to enhance the representation capability.

[0062] The average pooling and max pooling features are input into a multilayer shared perceptron for nonlinear transformation, outputting two branch channel attention feature maps. The two branch channel attention feature maps are then summed, and the sigmoid function is used to limit the numerical range to [0,1], ensuring that multiple useful feature map channels are noticed. The calculation formula is as follows:

[0063] t = F ex (a,b,W)=σ(g(a,b,W))=σ(W3δ(W1W2a)+W3δ(W1W2b))

[0064] Where t represents the attention feature map, σ represents the sigmoid function, δ represents the ReLU activation function, a represents the extracted average pooling feature, b represents the extracted max pooling feature, W1 represents a dimensionality reduction matrix, W2 represents an dimensionality increase matrix, W3 represents a linear mapping matrix, and F... ex() represents the process of compressing channels and mapping them back to the original convolution, W represents the weight matrix, and g() represents the process of learning the channel correlation under two different compression methods.

[0065] Feature relabeling: Mapping all attention feature maps back to the original feature maps yields a weighted convolutional feature map, achieving adaptive attention based on channel importance. The formula is:

[0066]

[0067] in, F represents the convolutional feature map after feature weighting mapping. scale () represents the convolution mapping operation, t c u represents the weight scalar of each convolutional feature channel. c This represents the convolutional feature map.

[0068] The outputs of each stacked residual network branch with attention mechanism, i.e., the output features, are horizontally concatenated to obtain a fused feature map.

[0069] The residual connection of this invention links the attention module and the convolution module. Unlike the classic residual connection approach of directly and non-linearly superimposing the input and output of the upper-layer network, it directly concatenates the two, similar to a dense connection network. This improves the utilization of shallow features while ensuring that information increases with the depth of the network. The stacked feature learning network blocks can obtain feature maps representing deeper layers from the multi-scale convolutional inputs of the upstream layers and effectively establish the dependencies between feature map channels, paying attention to channels that are effective for prediction results, thus enhancing the accuracy of PM2.5 prediction.

[0070] S4: Input the fused feature map into the LSTM network for processing to obtain the PM2.5 concentration prediction results.

[0071] LSTM (Long Short-Term Memory) is a storage unit for long short-term memory and a variant of recurrent neural networks. Compared to basic RNNs, it can handle certain short-term dependencies. However, when the input time series is too long, it becomes difficult for later time series to backpropagate to earlier sequences, and gradients are dominated by shallower layers, making it difficult to learn long-term dependencies. Furthermore, excessively deep networks can lead to gradient explosion. To address these issues, LSTM introduces input gates, forget gates, and output gates to maintain cell states. LSTM cells are connected through the information from the input and forget gates, allowing LSTM to remember cell states from several time steps for a long period. The formula for LSTM is as follows:

[0072] f t =σ(W f ·[h t-1 xt ]+b f )

[0073] i t =σ(W i ·[h t-1 x t ]+b i )

[0074] o t =σ(W o ·[h t-1 x t ]+b o )

[0075]

[0076]

[0077] H t =o t *tanh(C t )

[0078] Among them, f t i t ,o t These are the gating signals for the forget gate, input gate, and output gate, respectively. The forget gate controls the impact of the length of historical data on the cell state, determining which information from the previous time step is forgotten from the cell state. The input gate controls the visible length of historical data, determining the information retained in the cell state. The output gate controls the amount of information output. 'c' represents the cell state. x represents the current input cell state. t For cell input, h t For the cell output, W and b represent the weights and offsets of each gate in the algorithm, respectively. Specifically: W f h represents the weight in the forget gate. t-1 x is the output of the previous gate structure. t For the input at time t, b f For the bias in the forget gate; W i The weights in the input gate, b i For the bias in the input gate; W o The weights in the output gate, b o It is the bias in the output gate. It is the cell unit state update value, W c b is the weight in the cellular unit network. c It is the bias in the cellular unit network, c t-1 It represents the cell state at the previous time step (t-1).

[0079] The input time step of the LSTM needs to include one or more periods. If the period is not obvious, the input time window needs to be lengthened. Finally, the time-dependent features output by the LSTM are used as the output.

[0080] The flow of the fused feature map in the LSTM network is as follows: It receives the feature matrix (fused feature map) obtained from the upper-layer feature extraction network, inputs it into a recurrent neural network composed of LSTM cells, and the input gates in the LSTM cells control the visible length of historical data. The decision gate and forget gate determine which data to retain or forget during gradient descent, modeling and fitting the input sequence to the labels. Finally, the output gates obtain the hidden layer state and input it into the next LSTM cell. Data flows with the sequentially connected LSTM cells, ultimately yielding the LSTM output value.

[0081] To accelerate the gradient descent process for finding the optimal solution, a min-max normalization method is used on the input of the neural network. Therefore, to obtain the prediction results in actual dimensions, the output of the LSTM network is denormalized, mapping the predicted output data with values ​​in the range (0,1) back to the true values, and outputting the PM for the next time step. 2.5 The hourly concentration prediction results are obtained; after training, the trained PM2.5 concentration prediction model is obtained.

[0082] PM2.5 concentration data for the first time period and other pollutant concentration data and meteorological factor data for the second time period were obtained. A trained PM2.5 concentration prediction model was used to predict the PM2.5 concentration for the second time period. PM2.5 concentration data was then used to predict the PM2.5 concentration for the second time period. 2.5 The forecast results can more effectively provide early warnings about future concentration trends, offer guidance on the management of pollutants and exhaust emissions, and enable timely early warnings and control of urban air quality.

[0083] Evaluation of this invention: The training dataset is fed into the prediction model to calculate PM. 2.5 The data is used to predict values, where the training dataset consists of air pollutant concentrations and meteorological factors for a certain region. The dataset is divided into training, validation, and test sets in a ratio of 0.6, 0.2, and 0.2. The training set data is then input into the trained model to obtain the final PM2.5 values. 2.5 Prediction results.

[0084] To evaluate the prediction results of the models, three common regression metrics—MAE, CORR, and RMSE—were used to assess the performance of each model on the dataset. MAE and RMSE are the mean absolute error and root mean square error, respectively, used to measure the error between the true and predicted values. CORR is the correlation coefficient, used to describe the degree of correlation between two sequences. Smaller MAE and RMSE, and larger CORR, indicate more accurate predictions. Table 1 shows the experimental results of each model. GRU is a neural network model using gated recurrent units for time series modeling and prediction; TCN is a neural network model for time series prediction that integrates dilated causal convolutions and residual connections; AC-LSTM is an LSTM neural network model based on a time-step attention mechanism; and CA-LSTM is the LSTM neural network model based on a channel attention mechanism as described in this invention.

[0085] Table 1 Comparison of experimental results between the present invention and the comparative model

[0086]

[0087] As shown in Table 1, the present invention exhibits the lowest MAE and RMSE error evaluation indices and the highest CORR correlation coefficient across time steps 3 to 12. Specifically, in predictions at time step 3, the MAE index is improved by an average of 5.5%, 3.60%, and 8.8% compared to the GRU model, TCN model, and AC-LSTM model, respectively; the RMSE index is improved by 6.01%, 3.10%, and 8.60%, respectively; and the CORR coefficient is improved by 5.5%, 2.90%, and 6.90%, respectively. In predictions at time steps 6-12, the accuracy improvement is maintained at approximately 2%-3%. Experimental data demonstrate the effectiveness of the proposed LSTM neural network model based on the channel attention mechanism.

[0088] The above-described embodiments further illustrate the purpose, technical solution, and advantages of the present invention. It should be understood that the above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made to the present invention within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A PM2.5 concentration prediction method based on an attention-based LSTM network, characterized in that, include: A PM2.5 concentration prediction model was constructed with PM2.5 as the target pollutant. The model was trained using PM2.5 concentration data from environmental monitoring, other pollutant concentration data, and meteorological factor data. PM2.5 concentration data for the first time period and other pollutant concentration data and meteorological factor data for the second time period were obtained. The trained PM2.5 concentration prediction model was then used to predict the PM2.5 concentration for the second time period. The other pollutant concentration data included PM2.5 concentration data... 10 Hourly concentration data for CO, NO2, O3, and SO2; The process of training a PM2.5 concentration prediction model includes: S1: Perform data preprocessing on PM2.5 concentration data, other pollutant concentration data, and meteorological factor data from environmental monitoring; construct a multivariate time series based on the preprocessed data; S2: Two-dimensional convolution is used to extract features from multivariate time series at different scales to obtain feature maps at different scales; S3: Feature maps at different scales are compressed and nonlinearly transformed, and the processed feature maps are then input into a stacked residual network with an attention mechanism for further processing to obtain output features. All output features are then fused to obtain a fused feature map. The stacked residual network with an attention mechanism consists of multiple stacked basic network units. Each basic network unit is composed of an attention module and a unit residual network. The unit residual network includes batch normalization, one-dimensional convolution, and the ReLU activation function. The processing of the feature maps by the stacked residual network with an attention mechanism includes: The feature maps are input into the global average pooling layer and the global max pooling layer for compression processing to obtain average pooling features and max pooling features; The average pooling features and max pooling features are input into the multilayer shared perceptron to obtain two branch channel attention feature maps; the multilayer shared perceptron consists of a fully connected layer connected to an activation function and then two fully connected layers connected in series; The attention feature maps of the two branch channels are added together and then processed using the sigmoid function to obtain the attention feature map. Map all attention feature maps back to the original feature maps to obtain the convolutional feature maps after feature weighting mapping; Stacked residual networks process the convolutional feature maps after feature weighting to obtain output features; S4: Input the fused feature map into the LSTM network for processing to obtain the PM2.5 concentration prediction results.

2. The PM2.5 concentration prediction method based on an attention mechanism LSTM network according to claim 1, characterized in that, Meteorological data includes hourly data for temperature, humidity, wind speed, wind direction, and precipitation.

3. The PM2.5 concentration prediction method based on an attention mechanism LSTM network according to claim 1, characterized in that, The process of extracting features from multivariate time series at different scales using two-dimensional convolution includes: performing convolution operations on multivariate time series using two-dimensional convolution with different kernels to obtain temporal feature representations of different time series; and processing the temporal feature representations of different time series using activation functions and max pooling layers to obtain feature maps at different scales.

4. The PM2.5 concentration prediction method based on an attention mechanism LSTM network according to claim 1, characterized in that, The formulas for compressing feature maps using global average pooling and global max pooling are as follows: Where a represents the average pooling feature, b represents the max pooling feature, and u c (i,j) represents the data unit (i,j) in the convolutional feature map, W represents the width of the convolutional feature map, and H represents the height of the convolutional feature map.

5. The PM2.5 concentration prediction method based on an attention mechanism LSTM network according to claim 1, characterized in that, The formula for obtaining the attention feature map is: t=σ(W3δ(W1W2a)+W3δ(W1W2b)) Where t represents the attention feature map, σ represents the sigmoid function, δ represents the ReLU activation function, a represents the extracted average pooling feature, b represents the extracted max pooling feature, W1 represents the dimensionality reduction matrix, W2 represents the dimensionality increase matrix, and W3 represents the linear mapping matrix.

6. The PM2.5 concentration prediction method based on an attention mechanism LSTM network according to claim 1, characterized in that, The formula for mapping the attention feature map to the original feature map is: in, F represents the convolutional feature map after feature weighting mapping. scale () represents the convolution mapping operation, t c u represents the weight scalar of the convolutional feature channels. c This represents the convolutional feature map.