MPC-lstm air quality prediction method combined with adaptive weight

By combining the MPC-LSTM air quality prediction method with adaptive weights, and utilizing a multi-scale parallel convolutional fusion network and an LSTM network, the problems of gradient vanishing and long training time in existing models are solved, thereby improving the accuracy of air quality prediction.

CN116108993BActive Publication Date: 2026-04-17CENTRAL SOUTH UNIVERSITY OF FORESTRY AND TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CENTRAL SOUTH UNIVERSITY OF FORESTRY AND TECHNOLOGY
Filing Date
2023-02-14
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing air quality prediction models suffer from vanishing and exploding gradients. LSTM network models are complex and have long training times, resulting in poor air quality prediction accuracy.

Method used

The MPC-LSTM air quality prediction method with adaptive weights extracts local features of air quality data through a multi-scale parallel convolutional fusion network, uses an LSTM network for learning and prediction, and introduces an attention mechanism to enhance the expression of key historical moment information, thus constructing an optimal air quality prediction model.

Benefits of technology

The accuracy of air quality prediction has been improved by combining a multi-scale parallel convolutional fusion network and an adaptive weight module, which enables further mining of the potential feature relationships in the data, thereby enhancing the model's feature extraction capability and prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116108993B_ABST
    Figure CN116108993B_ABST
Patent Text Reader

Abstract

The application provides an MPC-LSTM air quality prediction method combined with adaptive weights, comprising the following steps: constructing a data set of air quality samples and preprocessing the data set; constructing an MPC-LSTM air quality prediction model; training the MPC-LSTM air quality prediction model based on the preprocessed data set; and obtaining predicted air quality data based on the trained MPC-LSTM air quality prediction model. The application combines a multi-scale parallel convolution fusion network, a long short-term memory neural network and an attention mechanism, realizes further mining of potential feature relationships of data, selects optimal weights, constructs an optimal air quality prediction model, and thus improves air quality prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of air quality prediction technology, and particularly relates to the MPC-LSTM air quality prediction method incorporating adaptive weights. Background Technology

[0002] In the problem of air quality forecasting, due to the diverse and multi-scale characteristics of air quality data and the long observation period of air quality data, long-term forecasting needs to take trend information into account.

[0003] Currently, most scholars use a single prediction model in air quality prediction applications. However, single prediction models often have their own shortcomings. For example, existing RNN network models suffer from gradient vanishing and gradient exploding problems, while LSTM networks suffer from model complexity and long training time. Therefore, it is urgent to study and improve the air quality prediction accuracy based on a single method. A new combined network model prediction method is proposed. Summary of the Invention

[0004] To address the aforementioned technical challenges, this invention proposes an MPC-LSTM air quality prediction method incorporating adaptive weights. This method combines a multi-scale parallel convolutional fusion network, a long short-term memory neural network, and an attention mechanism. Addressing the limitation of LSTM networks in extracting features from discontinuous data, it utilizes a multi-scale parallel convolutional fusion network to extract local features from air quality data. These extracted local features are then input into the LSTM network in a time-series format, enabling further mining of latent feature relationships within the data. Finally, an attention mechanism is introduced, employing temporal attention to assign time attention weights, thereby enhancing the representation of key historical moment information. This yields weighted comprehensive temporal information, strengthening the model's ability to extract key temporal information and perform learning and prediction.

[0005] This invention provides an MPC-LSTM air quality prediction method incorporating adaptive weights, including:

[0006] Construct a dataset of air quality samples and preprocess the dataset;

[0007] Construct an MPC-LSTM air quality prediction model;

[0008] The MPC-LSTM air quality prediction model is trained based on the preprocessed dataset.

[0009] Air quality is predicted based on the trained MPC-LSTM air quality prediction model.

[0010] Optionally, preprocessing the dataset includes:

[0011] Perform abnormal data processing on the dataset;

[0012] The dataset after processing the abnormal data is normalized;

[0013] The normalized dataset is then reconstructed.

[0014] Optionally, the abnormal data processing includes: filling in missing data in the dataset and removing abnormal and duplicate data.

[0015] Optionally, the normalization is:

[0016]

[0017]

[0018] in, To correspond to the normalized meteorological characteristics, and These represent the maximum and minimum values ​​of the meteorological characteristics, y. nor The data is the normalized air quality index, where y is the original air quality index. max and y min These are the maximum and minimum values ​​of the air quality index, respectively.

[0019] Optionally, training the MPC-LSTM air quality prediction model includes:

[0020] The dataset is divided into a training set and a test set;

[0021] The training set is input into the MPC-LSTM air quality prediction model to train the prediction model. After each training session, the prediction model is used to predict the test set. The backpropagation algorithm is used to train the prediction model.

[0022] With the goal of minimizing the loss function, the Adam optimizer is used to optimize the coefficients of each layer in the MPC-LSTM air quality prediction model.

[0023] Optionally, the optimization of the coefficients for each layer in the MPC-LSTM air quality prediction model can be performed as follows:

[0024]

[0025]

[0026] Where N is the number of training samples, and n is the multi-step prediction step size. and y t+λLet L be the predicted air quality index value and the corresponding actual value of the i-th sample at step λ, respectively, at time t. Let L be the single-step loss function, J be the multi-step loss function, and M be a parameter that minimizes the loss function.

[0027] Optionally, the MPC-LSTM air quality prediction model includes: a multi-scale parallel convolutional fusion module, an LSTM network module, and an adaptive weight module;

[0028] The multi-scale parallel convolutional fusion module extracts the temporal features of air quality data, and inputs the temporal features into the LSTM network module in time series format. The LSTM network module learns and predicts based on the temporal features, and uses the adaptive weight module to output the optimal weights of the MPC-LSTM air quality prediction model through deep learning.

[0029] Optionally, the multi-scale parallel convolutional fusion module includes: two one-dimensional convolutional layers and a parallel convolutional layer, wherein the convolutional kernels of the parallel convolutional layer have different sizes;

[0030] After the input data undergoes preliminary feature extraction through the parallel convolutional layer, the ResNet skip connection design is used to fuse and compress the preliminary feature information with the information from the parallel convolutional layer using the first one-dimensional convolutional layer, adaptively extracting feature information, and then passing the output feature information to the second one-dimensional convolutional network layer.

[0031] Optionally, the adaptive weight module includes: a Dense layer and a multiply layer;

[0032] The adaptive weighting module assigns a weight matrix to the initial output of the MPC-LSTM air quality prediction model through the Dense layer, obtains the output after adaptive weighting, and then uses the multiply layer to linearly multiply the initial output and the output after adaptive weighting to obtain the final air quality prediction value.

[0033] Optionally, the air quality data in the dataset includes: AQI index, concentrations of CO, NO2, O3, PM10, PM2.5, and SO2; wherein, the AQI index is a predictor variable.

[0034] Compared with the prior art, the present invention has the following advantages and technical effects:

[0035] This invention proposes an MPC-LSTM air quality prediction method incorporating adaptive weights. Addressing the weakness of other combined models in feature extraction, it constructs an MPC-LSTM air quality prediction model comprising three parts: a multi-scale parallel convolutional fusion network, a long short-term memory neural network, and an attention mechanism. The multi-scale parallel convolutional fusion network extracts temporal features, and the extracted local feature data is then input into the LSTM network in time-series format, enabling further mining of latent feature relationships within the data. Furthermore, the adaptive weight module, through deep learning, assigns weights to the output of the MPC-LSTM module, selecting the optimal weights to construct the optimal air quality prediction model, thereby improving the accuracy of air quality prediction. Attached Figure Description

[0036] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0037] Figure 1 This is a schematic diagram illustrating the prediction performance of the CNN model in an embodiment of the present invention;

[0038] Figure 2 This is a schematic diagram illustrating the prediction performance of the LSTM model in an embodiment of the present invention.

[0039] Figure 3 This is a schematic diagram illustrating the prediction performance of the RNN model in an embodiment of the present invention;

[0040] Figure 4 This is a schematic diagram illustrating the prediction performance of the CNN-LSTM model in an embodiment of the present invention.

[0041] Figure 5 This is a schematic diagram illustrating the prediction performance of the MPC-LSTM model in an embodiment of the present invention.

[0042] Figure 6 This is a schematic diagram illustrating the prediction performance of the CNN-LSTM-Attention model in an embodiment of the present invention.

[0043] Figure 7 This is a schematic diagram illustrating the prediction performance of the MPC-LSTM-Attention model in an embodiment of the present invention.

[0044] Figure 8 This is a schematic diagram of the MPC-LSTM model structure with adaptive weights according to an embodiment of the present invention;

[0045] Figure 9 This is a schematic diagram illustrating the principle of the Multi-Scale Parallel Convolution Fusion (MPC) network according to an embodiment of the present invention.

[0046] Figure 10 This is a schematic diagram of the adaptive weight module in an embodiment of the present invention. Detailed Implementation

[0047] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0048] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0049] This invention proposes an MPC-LSTM air quality prediction method incorporating adaptive weights, including:

[0050] Construct a dataset of air quality samples and preprocess the dataset;

[0051] Construct an MPC-LSTM air quality prediction model;

[0052] The MPC-LSTM air quality prediction model was trained based on the preprocessed dataset.

[0053] Based on the trained MPC-LSTM air quality prediction model, predicted air quality data is obtained.

[0054] Further preprocessing of the dataset includes:

[0055] Perform anomalous data processing on the dataset;

[0056] Normalize the dataset after processing the abnormal data;

[0057] Reconstruct the data from the normalized dataset.

[0058] Furthermore, outlier processing includes: filling in missing data in the dataset and removing outlier and duplicate data; where missing data is filled in by the average of the previous and next data.

[0059] Furthermore, training the MPC-LSTM air quality prediction model includes:

[0060] The dataset is divided into a training set and a test set;

[0061] The training set is input into the MPC-LSTM air quality prediction model to train the prediction model. After each training session, the prediction model is used to predict the test set. The backpropagation algorithm is used to train the prediction model.

[0062] With the goal of minimizing the loss function, the Adam optimizer is used to optimize the coefficients of each layer in the MPC-LSTM air quality prediction model.

[0063] Furthermore, the MPC-LSTM air quality prediction model includes: a multi-scale parallel convolutional fusion module, an LSTM network module, and an adaptive weight module;

[0064] The time-series features of air quality data are extracted by a multi-scale parallel convolutional fusion module. These time-series features are then input into an LSTM network module in time series format. The LSTM network module learns and predicts based on these time-series features and uses an adaptive weight module to output the optimal weights of the MPC-LSTM air quality prediction model through deep learning.

[0065] Furthermore, the multi-scale parallel convolution fusion module includes: two one-dimensional convolutional layers and a parallel convolutional layer, wherein the kernel size of the parallel convolutional layer is different;

[0066] After the input data undergoes preliminary feature extraction through the parallel convolutional layer, the ResNet skip connection design is used to fuse and compress the preliminary feature information with the information from the parallel convolutional layer using the first one-dimensional convolutional layer, adaptively extracting feature information, and then passing the output feature information to the second one-dimensional convolutional layer.

[0067] Furthermore, the adaptive weight module includes: a Dense layer and a multiply layer;

[0068] The adaptive weighting module assigns a weight matrix to the initial output of the MPC-LSTM air quality prediction model through the Dense layer, obtains the output after adaptive weighting, and then uses the multiply layer to linearly multiply the initial output and the output after adaptive weighting to obtain the final air quality prediction value.

[0069] Furthermore, the air quality data in the dataset includes: AQI index, concentrations of CO, NO2, O3, PM10, PM2.5, and SO2; among which, AQI is a predictor variable.

[0070] Example

[0071] like Figure 8As shown, this embodiment provides an MPC-LSTM air quality prediction method incorporating adaptive weights. This model consists of three parts: a multi-scale parallel convolutional fusion network (MPC), a long short-term memory neural network (LSTM), and an attention mechanism. Addressing the weakness of other combined models in feature extraction, this model proposes using a multi-scale parallel convolutional fusion network (MPC) to extract temporal features. The extracted local feature data is then input into the LSTM network in time-series format. This design further mines the latent feature relationships within the data. Furthermore, the adaptive weight module, through deep learning, assigns weights to the output of the MPC-LSTM module, selecting the optimal weights to construct the optimal air quality prediction model, thereby improving the accuracy of air quality prediction.

[0072] Air quality prediction methods are mainly divided into three parts: the first part is the initial data processing part, the second part is the air quality data training and prediction part, and the third part is the air quality prediction assessment part.

[0073] The sample data used in this embodiment comes from the historical air quality data of Changsha City released by the National Urban Air Quality Real-time Release Platform of the China National Environmental Monitoring Centre. The selected sample data consists of air pollutant data collected hourly by the Changsha Tianxin District Environmental Protection Bureau from January 1, 2020 to December 31, 2021, totaling 17,447 sets of data. Table 1 shows five air quality data samples from this dataset. This paper divides the samples into training and prediction samples, i.e., the first 80% are test samples and the last 20% are prediction samples. The hourly AQI index, CO, NO2, O3, PM10, PM2.5, and SO2 concentrations are selected as input variables, and AQI is used as the prediction variable.

[0074] Table 1

[0075]

[0076] The initial data processing module consists of three steps, the first being abnormal data processing. After obtaining initial air quality data from the monitoring locations, missing data is filled in, and abnormal and duplicate data are removed. Because data anomalies and missing data can occur during monitoring and storage, these anomalies can affect the model's prediction accuracy; therefore, data cleaning is necessary. Data cleaning primarily removes abnormal data from the original data, including duplicate, missing, and abnormal data. For duplicate air quality data, the first monitoring data is retained, and remaining duplicate data is deleted. Missing data is filled in by the average of the preceding and following data, calculated using the following formula:

[0077]

[0078] In the formula: x i This is the data that needs to be filled, x i-1 This is the data from the previous hour that needs to be filled, x i+1 This is the data for the next hour that needs to be filled.

[0079] Outlier data refers to data that is too large or too small, and it is replaced by the average of the data from the previous hour and the data from the next hour.

[0080] For example, in the data set in Table 2 below, there is a problem that three sets of data are missing for AQI, PM2.5 and SO2.

[0081] Table 2

[0082]

[0083] The missing data was filled in using the algorithm described above, and the filled data is shown in Table 3 below.

[0084] Table 3

[0085]

[0086] The second step is data normalization, mapping all data to the range of 0-1. The dataset is divided into a training set (the first 80% of the data) and a test set (the remaining 20% ​​of the data). An algorithm is used to normalize the data, and the prediction results are denormalized after the prediction is completed. Because different meteorological features have different dimensions, to prevent these different dimensions from affecting model learning and to improve the model's training speed and convergence, the feature data needs to be linearly normalized, i.e.:

[0087]

[0088]

[0089] In the formula: To correspond to the normalized meteorological characteristics, These represent the maximum and minimum values ​​of the meteorological characteristic, respectively. nor y represents the normalized Air Quality Index (AQI); y represents the raw Air Quality Index; y max and y min These are the maximum and minimum values ​​of the air quality index, respectively.

[0090] Considering the physical meaning of the air quality index, the forecast results need to be inversely normalized after the forecast is completed, that is:

[0091]

[0092] In the formula: This is a dimensionless air quality index sequence after inverse normalization.

[0093] The third step is input data reconstruction. The training and test sets are each represented by a sliding window of corresponding width, and the original data is reconstructed in batches. n-1 ,x n ], x n The reconstructed matrix is ​​defined by the dimension of the input data, which is (samples, timesteps, feature). Here, samples represents the number of samples input to the model in each training cycle, timesteps represents the time step, and feature represents the dimension of the feature. The experimental dataset contains seven meteorological features: AQI, CO, NO2, O3, PM10, PM2.5, and SO2. Therefore, the feature dimension is set to 7. After multiple tests, for the data in this embodiment, setting the timesteps to 12 and the samples to 120 yields good experimental data. Therefore, the dimension of the data in this embodiment is set to (120, 12, 7), and the corresponding output sequence is y = [y1, y2…y]. n-1 ,y n ], where y is the output matrix sequence, and the output sequence has the same dimension as the input data.

[0094] After completing the above preprocessing of air quality data, we input the training set data into the prediction model for training. We train the prediction model using the training set and predict the test set data after each training iteration, employing the backpropagation algorithm to train the prediction model. This aims to achieve the training objective of minimizing the loss function. The Adam optimizer is then used to iteratively update the coefficients of each layer in the model, resulting in the final MPC-LSTM combined air quality prediction model with adaptive weights. The model coefficient optimization algorithm is shown in the following equation:

[0095]

[0096]

[0097] In the formula: N is the number of training samples; y represents the predicted air quality index at time t for the λth step. t+λ is the corresponding actual value of the air quality index; n is the multi-step prediction step size; and y t+λLet be the predicted air quality index value of the i-th sample at step λ and the corresponding actual value, respectively, output by the model at time t. Equation (1) is the single-step loss function, and Equation (2) is the multi-step loss function, defined as the sum of the loss functions of each step, where M is a parameter that minimizes the loss function.

[0098] After training the air quality prediction model, the air quality prediction phase begins. The air quality data from the test set is input into the trained MPC-LSTM combined air quality prediction model with adaptive weights. The model then predicts air quality data with an equal amount of data as the test set, performs inverse normalization on the predicted data, and finally evaluates the prediction performance.

[0099] To evaluate the predictive performance of the prediction model, this embodiment uses mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R²). 2 Four indicators are used to evaluate the model's predictive performance. The formulas are as follows.

[0100]

[0101]

[0102]

[0103] In the formula: y i and f i Let be the actual value and the predicted value, respectively, and N be the size of the entire test set. They reflect the deviation between the predicted and actual values. The larger their values, the greater the error in the prediction.

[0104]

[0105] In the formula: Indicates the predicted value. For the average value, y i This is the true value. R 2 The value reflects the accuracy of the model, ranging from 0 to 1, where 1 indicates a perfect match.

[0106] Finally, the predictive accuracy of the prediction model is evaluated by calculating the values ​​of the evaluation indicators.

[0107] The following is a model introduction of the MPC-LSTM combined air quality prediction model with adaptive weights:

[0108] The MPC-LSTM combined air quality prediction model with adaptive weights consists of three modules: a multi-scale parallel convolution fusion network (MPC), an LSTM network module, and an adaptive weights module.

[0109] Multi-Scale Parallel Convolution Fusion (MPF) is the first module of the prediction model, such as... Figure 9 As shown, parallel convolutional structures can extract latent temporal features at different time scales at the same level, improving the model's accuracy in extracting data features at different time scales. Then, information from different scales is fused and passed to the next layer, which can flexibly balance computational load and model capability while improving accuracy.

[0110] The multi-scale parallel convolutional fusion network consists of two one-dimensional convolutional layers and three parallel convolutional layers. The kernel sizes of the three parallel convolutional operations are 1×1, 2×2, and 3×3, respectively. In this embodiment, after the input data undergoes preliminary feature extraction through the three parallel convolutional layers, the skip connection design of ResNet is used. The first one-dimensional convolutional layer, i.e., a 3×3 convolution, fuses and compresses the preliminary feature information with the information from the three parallel convolutional layers. The network adaptively extracts useful feature information from these layers and then passes the output feature information to the second one-dimensional convolutional layer, which has a 3×3 kernel.

[0111] The LSTM network is the second module. The inclusion of cellular memory units in the LSTM network gives it excellent memory capabilities, making it widely used in time series prediction. This network is placed below the MPC network. To address the limitation of the LSTM network in uncovering potential relationships between discontinuous data, an MPC local feature extraction module is added before the LSTM network. The MPC network extracts local features from the data, while the LSTM network extracts temporal features, and then the system is trained for prediction.

[0112] The adaptive weighting module is the last module of this prediction model, such as... Figure 10 As shown, considering all meteorological factors affecting air quality, meteorological characteristics of AQI, CO, NO2, O3, PM10, PM2.5, and SO2 are selected as inputs for the combined prediction model. Let be the meteorological characteristics corresponding to time t, where The values ​​represent the AQI index, CO concentration, NO2 concentration, SO2 concentration, PM2.5 concentration, PM10 concentration, and O3 concentration at time t, respectively. The output of the MPC-LSTM module represents the initial output of the MPC-LSTM air quality prediction model, where i represents the batch number to be predicted. The output dimension of the MPC-LSTM module is 16. The adaptive weighting module first assigns weight matrices α to the outputs of the MPC-LSTM module through a Dense layer, resulting in... That is, the output after adaptive weight processing, and then passed through a multiply layer. and Linear multiplication yields air quality predictions with dimension 16. The specific formula is as follows:

[0113]

[0114]

[0115] α, as a parameter of the combined prediction model, yields its optimal value during the learning and training of the combined model. Its optimization formula is:

[0116]

[0117] In the formula: y loss This represents the prediction error value of the combined prediction model; The predicted value at time t; y t Let be the true value at time t.

[0118] To further improve the accuracy of air quality prediction and address the problem that single models often fail to achieve optimal prediction results, the effectiveness of the proposed combined prediction model is demonstrated. This model will be compared and analyzed with CNN, RNN, LSTM, BiLSTM, CNN-LSTM, CNN-BiLSTM, BiLSTM-Attention, and CNN-BiLSTM using the same training and test sets under the same operating environment. To avoid the randomness of a single experiment and ensure the reliability of the experimental results, 10 experiments were conducted on the test set under the same conditions. The results are shown in Table 4.

[0119] Table 4

[0120]

[0121]

[0122] As shown in Table 4, the proposed combined model exhibits the best performance, while the CNN neural network performs the worst. Compared to single prediction models such as CNN, LSTM, and RNN, the proposed combined prediction model reduces RMSE by 42.66%, 12.48%, and 21.25%, respectively; MAE by 45.72%, 16.38%, and 25.58%, respectively; and MAPE by 41.60%, 12.07%, and 31.30%, respectively. The coefficient of determination R0 is also significantly lower. 2 These improvements were 6.84%, 1.60%, and 4.40%, respectively. Compared to the CNN-LSTM and CNN-LSTM-Attention combined prediction models, RMSE decreased by 3.63% and 1.71%, respectively; MAE decreased by 5.13% and 2.01%, respectively; MAPE decreased by 8.31% and 2.72%, respectively; and the coefficient of determination R0 was [missing data]. 2 The accuracy improved from 0.9705 and 0.9714 to 0.9726, respectively. An attention mechanism was introduced into the MPC-LSTM model, which improved its prediction accuracy. MAE decreased by 0.221, RMSE decreased by 0.239, MAPE decreased by 0.627, and R... 2 Increasing the specific values ​​of each performance index of the model by 0.0021 can only be used to prove that the proposed model is better than the comparison model under the same conditions, and cannot be used to prove that the specific values ​​of each performance index can also reach this value in the prediction of air volume in other data. Figures 1-7 The prediction results are CNN model prediction results, LSTM model prediction results, RNN model prediction results, CNN-LSTM model prediction results, MPC-LSTM model prediction results, CNN-LSTM-Attention model prediction results, and MPC-LSTM-Attention model prediction results, respectively.

[0123] Take the last 100 sets of predicted data to observe the comparison between the predicted values ​​and the actual values, and display the effects of the above test models one by one to observe the prediction accuracy.

[0124] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An MPC-LSTM air quality prediction method incorporating adaptive weights, characterized in that, include: Construct a dataset of air quality samples and preprocess the dataset; Construct an MPC-LSTM air quality prediction model; The MPC-LSTM air quality prediction model is trained based on the preprocessed dataset. The MPC-LSTM air quality prediction model includes: a multi-scale parallel convolutional fusion module, an LSTM network module, and an adaptive weight module; The multi-scale parallel convolutional fusion module extracts the temporal features of air quality data, and inputs the temporal features into the LSTM network module in time series format. The LSTM network module learns and predicts based on the temporal features, and uses the adaptive weight module to output the optimal weights of the MPC-LSTM air quality prediction model through deep learning. Air quality is predicted based on the trained MPC-LSTM air quality prediction model.

2. The MPC-LSTM air quality prediction method with adaptive weights according to claim 1, characterized in that, Preprocessing the dataset includes: Perform abnormal data processing on the dataset; The dataset after processing the abnormal data is normalized; The normalized dataset is then reconstructed.

3. The MPC-LSTM air quality prediction method with adaptive weights according to claim 2, characterized in that, The abnormal data processing includes: filling in missing data in the dataset and removing abnormal and duplicate data.

4. The MPC-LSTM air quality prediction method with adaptive weights according to claim 2, characterized in that, The normalization is: in, To correspond to the normalized meteorological characteristics, These represent the maximum and minimum values ​​of the meteorological characteristics, respectively. This is the data after normalizing the air quality index. This is the original air quality index. and These are the maximum and minimum values ​​of the air quality index, respectively.

5. The MPC-LSTM air quality prediction method with adaptive weights according to claim 1, characterized in that, Training the MPC-LSTM air quality prediction model includes: The dataset is divided into a training set and a test set; The training set is input into the MPC-LSTM air quality prediction model to train the prediction model. After each training session, the prediction model is used to predict the test set. The backpropagation algorithm is used to train the prediction model. With the goal of minimizing the loss function, the Adam optimizer is used to optimize the coefficients of each layer in the MPC-LSTM air quality prediction model.

6. The MPC-LSTM air quality prediction method with adaptive weights according to claim 5, characterized in that, The optimization method for the coefficients of each layer in the MPC-LSTM air quality prediction model is as follows: in, The number of training samples, For multi-step prediction step size, and The models are respectively The output of the first time The first sample Step-by-step air quality index forecast and corresponding actual value, For single-step loss function, For multi-step loss functions, A parameter that minimizes the loss function.

7. The MPC-LSTM air quality prediction method with adaptive weights according to claim 1, characterized in that, The multi-scale parallel convolutional fusion module includes: two one-dimensional convolutional layers and a parallel convolutional layer, wherein the kernel size of the parallel convolutional layer is different; After the input data undergoes preliminary feature extraction through the parallel convolutional layer, the ResNet skip connection design is used to fuse and compress the preliminary feature information with the information from the parallel convolutional layer using the first one-dimensional convolutional layer, adaptively extracting feature information, and then passing the output feature information to the second one-dimensional convolutional layer.

8. The MPC-LSTM air quality prediction method with adaptive weights according to claim 1, characterized in that, The adaptive weight module includes: a Dense layer and a multiply layer; The adaptive weighting module assigns a weight matrix to the initial output of the MPC-LSTM air quality prediction model through the Dense layer, obtains the output after adaptive weighting, and then uses the multiply layer to linearly multiply the initial output and the output after adaptive weighting to obtain the final air quality prediction value.

9. The MPC-LSTM air quality prediction method with adaptive weights according to claim 1, characterized in that, The air quality data in the dataset includes: AQI index, concentrations of CO, NO2, O3, PM10, PM2.5, and SO2; among which, the AQI index is a predictor variable.

Citation Information

Patent Citations

  • Material removal state prediction method based on multi-scale attention mechanism

    CN114897045A

  • Solar radiation prediction method and system based on double-branch feature extraction

    CN115099461A