Air quality prediction method based on signal decomposition

Through improved stationary wavelet transformation and multi-layer neural network structure, the problem that air quality prediction methods in the prior art are difficult to capture complex data characteristics and utilize multivariate correlations, and high-precision and stable air quality prediction are achieved.

CN119090058APending Publication Date: 2024-12-06ANHUI NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411101064.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Existing air quality prediction methods are difficult to effectively capture high-frequency and low-frequency characteristics in complex and non-stationary air quality data, and the single-task model cannot fully utilize the correlation between multiple AQI variables, resulting in insufficient prediction accuracy and stability.

Method used

The improved stationary wavelet transform (SWT) is used to decompose air quality data into six sub-signals, and feature extraction and prediction are performed through convolutional neural network (CNN) and bidirectional nested long and short-term memory network (BiNLSTM), combined with residual network optimization Predict the results, implement multi-task learning to predict multiple AQI variables simultaneously.

Benefits of technology

Improve the accuracy and robustness of air quality prediction, better capture important features in the data, enhance the understanding and prediction ability of multivariable relationships, and the output prediction results are better than traditional methods in multiple evaluation indicators. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090058A_ABST
    Figure CN119090058A_ABST
Patent Text Reader

Abstract

The invention discloses an air quality prediction method based on signal decomposition. The method comprises the following steps: S1, acquiring historical air quality data and meteorological data of a city to be predicted; s2, performing zero mean normalization processing on the data obtained in the step S1; s3, analyzing the data by adopting improved stationary wavelet transform (SWT), and decomposing the normalized data into six sub-signals; s4, respectively inputting the sub-signals obtained by decomposition into different CNNs (convolutional neural networks) for feature extraction; s5, inputting the features extracted in the step S4 into a bidirectional nested long-short term memory network BiNLSTM, and capturing a long-term dependency relationship and a complex mode in a time sequence; and S6, inputting the features processed in the step S5 into a residual network, processing each sub-signal feature through the residual network, and outputting a prediction result. According to the scheme, the accuracy and robustness of air quality prediction are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of machine learning and neural network prediction, and in particular to an air quality prediction method based on signal decomposition. Background Art

[0002] Air quality forecasting plays a vital role in urban environmental management and public health protection. With the continuous acceleration of urbanization, air pollution problems have become more serious, causing significant impacts on human health and the ecological environment. Accurate air quality forecasting can not only help government departments take measures in advance to reduce emissions from pollution sources, but also provide health protection advice to the public, thereby reducing the negative impact of air pollution on people's quality of life.

[0003] The Air Quality Index (AQI) is one of the main indicators for assessing air quality, including fine particulate matter (PM 2.5 ), inhalable particulate matter (PM 10 ), sulfur dioxide (SO 2 ), nitrogen dioxide (NO 2 ), carbon monoxide (CO) and ozone (O 3) six main pollution components. However, due to the influence of internal factors such as industrial production, energy extraction, and transportation, the changes in AQI show irregularities, which increases the difficulty of prediction. In the field of AQI prediction, traditional methods such as regression analysis, support vector machine (SVM), and random forest (RF) have been widely used. Although these methods perform well when processing linear data and simple relationships, their prediction accuracy is often low when faced with complex nonlinear and non-stationary air pollution data. In order to improve the prediction performance, researchers have proposed a variety of deep learning models, such as recurrent neural networks (RNN) and long short-term memory networks (LSTM). RNN is one of the earliest neural networks used to process time series data, and its hidden layer is used to store historical information to perform prediction tasks. However, RNN has shortcomings in memorizing long-term historical data. LSTM, as an improved form of RNN, enhances the network's ability to capture long-term dependencies by introducing memory cells, thereby performing better in memorizing information and predicting capabilities. Although these models show potential in capturing complex patterns in time series data, their performance is still limited by the nonlinear and non-stationary characteristics of the data when directly applied to unprocessed air quality data. In order to improve the prediction performance, researchers have introduced data decomposition techniques, such as empirical mode decomposition (EMD), wavelet transform (WT) and variational mode decomposition (VMD), to decompose complex raw data into multiple sub-signals that are easier to process. These techniques have improved the prediction performance of the model to a certain extent, but each has its limitations. EMD decomposition is suitable for data with good periodicity and stability, but performs poorly when processing unstable and irregular data. WT decomposition uses local wavelets to decompose data, which can better capture local characteristics and fluctuations, but the stable wavelet basis functions and decomposition layers of traditional wavelet transforms limit its flexibility. VMD decomposition decomposes data through a variational model and has good adaptability, but its computational complexity is high. Air quality data usually consists of multiple related variables, such as PM 2.5 、PM 10 、SO 2 、NO 2 , CO and O 3 There are complex interactions between these variables. Traditional single-task deep learning models are difficult to fully utilize the correlation between these variables and may not be able to fully capture the multi-scale features in the data, affecting the accuracy and stability of the prediction.

[0004] In the current air quality prediction technology, although a variety of methods have been proposed and applied to actual environmental monitoring, there are still some significant defects and shortcomings:

[0005] 1. Many existing methods fail to fully consider the complexity and non-stationarity of air quality data when processing air quality data. For example, traditional time series analysis methods (such as ARIMA) and some machine learning methods (such as SVR) are difficult to obtain high-precision prediction results when faced with air quality data with violent fluctuations and irregular changes. This is because these methods cannot effectively capture the high-frequency and low-frequency features in the data, resulting in large errors in the prediction results.

[0006] 2. Traditional machine learning and deep learning methods have limitations in feature extraction. For example, although a single LSTM network can capture long-term dependencies in time series, its feature extraction capabilities are still insufficient when faced with multivariate and complex time series data. In addition, many methods fail to fully utilize the time-frequency characteristics of the data, resulting in poor performance of the model in capturing useful features in the data.

[0007] 3. Most existing methods model and predict each air quality indicator (such as PM2.5, PM10, etc.) separately, failing to fully utilize the correlation and mutual information between different indicators. This single-task prediction framework is difficult to effectively integrate and optimize the prediction results of multiple AQI variables, resulting in limited overall prediction performance.

[0008] 4. Existing technologies mostly use simple mean filling or interpolation methods in data preprocessing, which fail to fully utilize the multi-scale characteristics and local features of the data. For example, although empirical mode decomposition (EMD) and variational mode decomposition (VMD) can decompose the original data to a certain extent, they do not work well when faced with unstable and irregular air quality data, resulting in poor model prediction performance. Summary of the invention

[0009] The purpose of the present invention is to overcome the deficiencies of the prior art and provide an air quality prediction method based on signal decomposition to achieve high-precision prediction of air quality.

[0010] In order to achieve the above object, the technical solution adopted by the present invention is: an air quality prediction method based on signal decomposition, comprising:

[0011] S1. Obtain historical air quality data and meteorological data of the city to be predicted;

[0012] S2, performing zero-mean normalization processing on the data obtained in step S1;

[0013] S3, using improved stationary wavelet transform SWT to analyze the data and decompose the normalized data into six sub-signals;

[0014] S4, inputting the decomposed sub-signals into different convolutional neural networks (CNN) for feature extraction;

[0015] S5, input the features extracted in step S4 into the bidirectional nested long short-term memory network BiNLSTM to capture long-term dependencies and complex patterns in the time series;

[0016] S6. Input the features processed in step S5 into the residual network, process the features of each sub-signal through the residual network and output the prediction results.

[0017] The convolutional neural network CNN, bidirectional nested long short-term memory network BiNLSTM, and residual network in steps S4-S6 are trained, verified, and tested using pre-built data sets; the building of the data set includes:

[0018] Step 1: Obtain the original air quality data and meteorological data of the city to be predicted, and fill in the missing values ​​of the data;

[0019] Step 2, performing zero-mean normalization processing on the data obtained in step 1 so that the data are within the same dimensional range;

[0020] Step 3: Apply improved stationary wavelet transform (SWT) to the data in step 2 and decompose the high-frequency information, decompose the normalized data into six sub-signals to obtain a data set, and divide the data set into a training set, a validation set, and a test set.

[0021] The data is normalized to zero mean by subtracting the mean and dividing by the standard deviation. The processing formula is:

[0022]

[0023] Among them, X represents the original data, μ represents the mean of the data, σ represents the standard deviation of the data, and X norm Represents the data after normalization.

[0024] The improved stationary wavelet transform (SWT) is used to analyze the data, and the normalized data is decomposed into six sub-signals, including: first, the original signal x[n] is decomposed at the first level, and convolution is performed using a low-pass filter and a high-pass filter to obtain the first-level approximate coefficient A 1 [n] and detail factor D 1 [n];

[0025]

[0026]

[0027] When performing the second-level classification, not only the approximate coefficient A of the first level 1 [n] decomposition, and at the same time the detail coefficient D 1 [n] is decomposed to obtain the approximate coefficient A2 [n], A 3 [n] and detail factor D 2 [n], D 3 [n]:

[0028]

[0029]

[0030]

[0031]

[0032] When performing the third level classification, the A obtained by the second level decomposition is used. 2 [n], D 2 [n] Continue to decompose to get A 4 [n], D 4 [n], A 5 [n], D 5 [n]:

[0033]

[0034]

[0035]

[0036]

[0037] After the improved three-level wavelet transform, six sub-signals are obtained: A 3 [n], D 3 [n], A 4 [n], D 4 [n], A 5 [n], D 5 [n].

[0038] In step S4, the different decomposed sub-signals are respectively input into different one-dimensional convolutional neural networks 1D-CNN for feature extraction, where the number of variable parameters in the historical air quality data and meteorological data is m, and the established convolutional neural network has a total of 6m parallel network channels; the one-dimensional convolution layer slides on the input signal through the convolution kernel (filter) to extract local features.

[0039] The method also includes inputting the features extracted from the convolutional neural network (CNN) into a bidirectional nested long short-term memory network BiNLSTM to capture long-term dependencies and complex patterns in the time series, and the training sequence of each BiNLSTM model consists of a forward NLSTM and a backward NLSTM, so that the forward and backward features of the current time point can be obtained.

[0040] The method also includes further inputting the features processed by the convolutional neural network CNN and the bidirectional nested long short-term memory network BiNLSTM into the residual network, the outputs of all variables in the convolutional neural network CNN are combined together after the BiNLSTM network layer, and are respectively input into multiple different residual networks, each residual network is responsible for outputting a final air quality prediction result, and each final air quality prediction result corresponds to an air pollutant content prediction result.

[0041] After each sub-signal is output by the BiNLSTM network layer, it is converted into a one-dimensional vector and finally the features of all variables are combined to form a comprehensive feature vector. The output of each different BiNLSTM network layer is H i , where n is the number of sub-signals, and the comprehensive feature vector after combining all variables is expressed as:

[0042] H combined =Concat(H 1 ,H 2 ,...,H n )

[0043] Comprehensive feature vector H combined As the input of the residual network; after the input layer, multiple residual blocks are stacked together to form a deep residual network; each residual block is optimized through residual connections, so that the network can better learn complex feature relationships; each residual connection layer contains multiple fully connected layers and jump connections; the calculation formula for each residual unit is:

[0044] y=σ(Wx+b)+x

[0045] Where W and b are the weight matrix and bias vector respectively, σ is the activation function, x is the input feature vector, and y is the output of the residual unit; after being processed by six residual networks, the final prediction results of the six AQI components are output.

[0046] When training convolutional neural networks, bidirectional nested long short-term memory networks, and residual networks through training sets, set evaluation parameters to evaluate the training results and prediction performance. The set parameters include mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE), and determination coefficient (R). 2, the evaluation parameters are calculated as follows:

[0047]

[0048]

[0049]

[0050]

[0051] Among them, y is the true value, is the predicted value, is the average of the true values.

[0052] The advantages of the present invention are: by combining the improved wavelet transform (SWT) with the convolutional neural network (CNN) and the bidirectional nested long short-term memory network (BiNLSTM), the accuracy and robustness of air quality prediction are effectively improved. In addition, this solution also has the following advantages:

[0053] 1. Through the improved wavelet transform (SWT), the original air quality data is decomposed into six stable sub-signals. This method can not only effectively separate high-frequency and low-frequency information, but also further process high-frequency information, so that the prediction model can more accurately capture the important features in the data. Compared with traditional data decomposition methods, SWT shows higher stability and adaptability when processing unstable and complex time series data.

[0054] 2. The present invention combines a one-dimensional convolutional neural network and a bidirectional nested long short-term memory network (BiNLSTM), making full use of the advantages of the two networks to efficiently extract local features in time series data, while BiNLSTM performs well in capturing long-term and short-term dependencies. This multi-layer neural network structure enables the model to make more accurate predictions when processing complex time series data, improving the overall performance of the model.

[0055] 3. After the BiNLSTM output, the feature vectors of each sub-signal are combined and optimized through the residual network. The residual network can effectively alleviate the gradient vanishing problem of the model through the residual connection layer and the fully connected layer, and improve the prediction accuracy and robustness of the model. The final output prediction results are better than other comparison methods in multiple evaluation indicators.

[0056] 4. The present invention adopts a multi-task learning architecture, which allows multiple air quality index (AQI) variables to be processed in parallel. By considering the historical information of multiple variables at the same time, the model can better understand and predict the relationship between each variable, thereby improving the overall prediction performance. This architecture performs well when processing multivariate time series data, fully demonstrating its potential for application in air quality prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The following is a brief description of the contents expressed in the drawings of the present specification and the marks in the drawings:

[0058] Figure 1 It is a schematic diagram of the prediction method of the present invention;

[0059] Figure 2 This is a schematic diagram of the internal structure of NLSTM of the present invention;

[0060] Figure 3 Schematic diagram of the BiNLSTM network structure of the present invention. DETAILED DESCRIPTION

[0061] The specific implementation of the present invention will be further explained in detail below by describing the optimal embodiment with reference to the accompanying drawings.

[0062] This embodiment provides an air quality prediction model based on signal decomposition and a prediction method thereof. The process of the prediction method is as follows: Figure 1 As shown, the prediction method relies on the stationary wavelet transform decomposition of the original signal and the use of the constructed network model for prediction. When predicting the control quality, the constructed prediction network model is trained in advance with historical data, and the network model that meets the training requirements is used for prediction.

[0063] The data input during training, testing and prediction of the network model of the present application are historical air quality components (specifically including PM2.5, PM10, SO2, NO2, CO and O3) and five meteorological data (specifically including temperature, air pressure, dew point temperature, rainfall and wind speed); the input variable data is preprocessed and sent to the constructed network model. The preprocessing includes normalization processing and stationary wavelet transform analysis processing. During the early training and later application for prediction, the data obtained by the stationary wavelet transform can be sent to the constructed network model, and the network model outputs the corresponding prediction result data, and the prediction result data is each air quality component in the future time. The constructed network model includes a convolutional neural network layer, a bidirectional nested long short-term memory network layer, a concat layer, and a residual network layer; the convolutional neural network layer includes multiple one-dimensional convolutional neural network units. Since there are six air quality parameters and five meteorological parameters, there are a total of 11 variables, and each variable is analyzed by wavelet transform to obtain six sub-signals, so the convolutional neural network layer has a total of 66 one-dimensional convolutional neural network units for feature extraction; the bidirectional nested long short-term memory network layer includes 66 BiNLSTM units, each BiNLSTM unit is connected to a one-dimensional convolutional neural network unit for processing its output; the outputs of all BiNLSTM units are fused and combined through the concat layer and sent to six different residual networks respectively. Each residual network is responsible for outputting a final air quality prediction result to ensure the simultaneous prediction of six pollutants. When predicting air quality in actual applications, the corresponding prediction results can be obtained by preprocessing the data according to the preprocessing method and sending it to the constructed network model. When used to predict air quality and use historical data for training, the preprocessing of the original data is the same, the preprocessing method is the same, and the data is sent to the network model after preprocessing.

[0064] like Figure 1-3 As shown, the present invention proposes an air quality prediction method based on signal decomposition, combining a multi-task multi-output network model of a convolutional neural network (CNN) and a bidirectional nested long short-term memory network (BiNLSTM) to improve prediction accuracy and robustness. The method preprocesses the raw data through an improved stationary wavelet transform (SWT), and combines a convolutional neural network (CNN) and a bidirectional nested long short-term memory network (BiNLSTM) for feature extraction and prediction. The specific steps are as follows:

[0065] Step 1: Obtain the original Beijing air quality data and meteorological data, and fill in the missing values ​​for subsequent analysis and modeling.

[0066] Step 2: Perform zero-mean normalization on the data obtained in step 1 to keep the data within the same dimensional range for easy subsequent processing and model training. This step not only eliminates the impact of different dimensions and ranges by subtracting the mean and dividing by the standard deviation, but also improves the comparability and stability of the data, laying a good foundation for subsequent processing.

[0067] Step 3: Apply improved stationary wavelet transform (SWT) to the data in step 2 and further decompose the high-frequency information to obtain a more stable signal. Decompose the normalized data into six sub-signals and divide the data set into training set, validation set and test set for learning and training the constructed network model. After the training is completed, when it is actually used for prediction, it is only necessary to obtain six sub-signals through improved stationary wavelet transform analysis to send the data into the constructed network model, and the model outputs the prediction results. If it is not in application, it belongs to model training, then the data needs to be divided into training set, validation set and test set.

[0068] Step 4: Input the decomposed sub-signals into different convolutional neural networks (CNNs) for feature extraction. CNN has significant advantages in time series applications. First, the local perception and feature extraction capabilities of CNN enable it to capture local patterns in time series data. Second, weight sharing and parameter efficiency significantly reduce the number of model parameters and improve the training efficiency of the model. Third, translation invariance and multi-scale feature extraction capabilities make CNN robust to translation or scaling changes in time series data.

[0069] Step 5: Input the extracted features into a bidirectional nested long short-term memory network (BiNLSTM) to capture long-term dependencies and complex patterns in time series. BiNLSTM can process information in two directions, taking into account both past and future information, improving the understanding and prediction capabilities of time series data.

[0070] Step 6: Optimize and integrate the prediction results of each sub-signal through the residual network. The residual network contains multiple residual connection layers and fully connected layers, which can effectively alleviate the gradient vanishing problem of the model and improve the accuracy and robustness of the prediction. Finally, the comprehensive prediction results are output.

[0071] In the prediction application stage, the prediction result can be obtained by reaching step 6, and the prediction is completed; however, in the training step, since the model needs to meet certain error requirements, there will be step 7:

[0072] Step 7: The prediction results are denormalized to restore them to the amplitude range of the original data. Then, the prediction results are evaluated based on the size of the error and the effectiveness of the fit to check the prediction performance of the model.

[0073] The following is a further explanation of steps 1-7:

[0074] The raw data in step 1 come from 12 observation stations around Beijing from 2013 to 2017, which can be obtained from the University of California, Irvine (UCI) machine learning repository. The raw sensor data are collected at hourly time steps, covering 1461 days and a total of 35064 samples. The hourly recorded data set contains multiple variables, eleven of which are used in this study, including six main air quality components (PM2.5, PM10, SO2, NO2, CO and O3) and five meteorological data (temperature, air pressure, dew point temperature, rainfall and wind speed). For outlier processing, for missing values ​​at the beginning or end of the data set, the nearest neighbor interpolation method is used, that is, the missing value is filled with the nearest valid value. For missing intermediate data, the mean interpolation method is used, that is, the average of the two known values ​​before and after is used to fill it. The air quality data and meteorological data of Beijing obtained through this step will be a complete, continuous and as accurate as possible data set.

[0075] Step 2 is to perform zero mean normalization on the data obtained after step 1. The purpose is to make the data of different variables within the same dimensional range, which is convenient for subsequent processing and model training. The data of each variable is normalized to zero mean. This step is achieved by subtracting the mean and dividing by the standard deviation. The specific formula is as follows:

[0076]

[0077] Among them, X represents the original data, μ represents the mean of the data, σ represents the standard deviation of the data, and X norm Represents the data after standardization. This preprocessing not only eliminates the influence of different dimensions and ranges, but also improves the comparability and stability of the data, laying a good foundation for subsequent processing.

[0078] Step 3 continues to perform three-level stationary wavelet transform decomposition on the data obtained in step 2. Stationary wavelet transform (SWT) is a wavelet transform method that does not perform downsampling. It decomposes the signal by filtering and convolving the signal multiple times without losing any information. First, the first-level decomposition is to convolve the original signal array x[n] using a low-pass filter and a high-pass filter to obtain the first-level approximate coefficient A 1 [n] and detail factor D 1 [n]The specific decomposition formula is as follows:

[0079]

[0080]

[0081] Where h[k] is a low-pass filter used to extract the low-frequency components of the signal (approximate coefficients), k is the index of the filter coefficient, indicating the position of the filter coefficient, usually starting from 0, and the maximum value depends on the length of the filter. g[k] is a high-pass filter used to extract the high-frequency components of the signal (detail coefficients). x[nk] represents the value at a specific moment. If the signal length is not enough to cover all the coefficients of the filter (for example, x[-1]), a zero-filling boundary processing method is used. Next is the second-level decomposition, using the approximate coefficients A of the first level 1 [n] is used as input and convolved again using low-pass and high-pass filters to obtain the approximate coefficient A of the second stage 2 [n] and detail factor D 2 [n], the formula is as follows:

[0082]

[0083]

[0084] Finally, the third level decomposition is to decompose the approximate coefficient A obtained by the second level decomposition. 2 [n] is used as input and convolved again using low-pass and high-pass filters to obtain the approximate coefficient A of the second stage 3 [n] and detail factor D 3 [n], the formula is as follows:

[0085]

[0086]

[0087] Therefore, after the traditional three-level decomposition, four sub-signals A can be obtained: 3 [n], D 3 [n], D 2 [n], D 1[n] Traditional wavelet transform (SWT) usually only further decomposes the approximate coefficients, because this method is mainly used to filter out noise, making low-frequency signals more stable and easier to identify. However, in practical applications, especially when it comes to deep learning-driven time series prediction, the high-frequency components are more volatile and contain important information. Ignoring these components may lead to a decline in prediction performance. Therefore, a more comprehensive decomposition method can help better capture and utilize all important features in the data, thereby improving the prediction ability of the model. The present invention adopts an improved wavelet transform method, which not only decomposes the low-frequency components, but also processes the high-frequency components, so that the high-frequency fluctuation information can be better extracted and utilized. Through this comprehensive decomposition process, information of different frequencies is extracted and analyzed separately, so that the deep learning model can better understand the complex fluctuation characteristics of the data during the training process, thereby improving the accuracy and stability of the prediction. The core of this method lies in the emphasis on and effective processing of high-frequency components. By enhancing the model's ability to capture high-frequency information, time series prediction can be more comprehensive and accurate. This not only improves the learning efficiency of the model, but also greatly improves the final prediction performance.

[0088] Specifically, the first level decomposition is to convolve the original signal x[n] using a low-pass filter and a high-pass filter to obtain the first-level approximate coefficient A 1 [n] and detail factor D 1 [n].

[0089]

[0090]

[0091] When performing the second-level classification, not only the approximate coefficient A of the first level 1 [n] decomposition, and at the same time the detail coefficient D 1 [n] is decomposed to obtain the approximate coefficient A 2 [n], A 3 [n] and detail factor D 2 [n], D 3 [n].

[0092]

[0093]

[0094]

[0095]

[0096] When performing the third level classification, the A obtained by the second level decomposition is used. 2 [n], D2 [n] Continue to decompose to get A 4 [n], D 4 [n], A 5 [n], D 5 [n]

[0097]

[0098]

[0099]

[0100]

[0101] After the improved three-level wavelet transform, 6 sub-signals A are obtained. 3 [n], D 3 [n], A 4 [n], D 4 [n], A 5 [n], D 5 [n].

[0102] Step 4: In this step, the six sub-signals obtained after the improved stationary wavelet transform (SWT) are divided into a training set, a test set, and a validation set. Next, the different sub-signals are respectively input into different one-dimensional convolutional neural networks (1D-CNN) for feature extraction. Since the input variables of the present invention include 6 main air quality components (PM2.5, PM10, SO2, NO2, CO and O3) and 5 meteorological data (temperature, air pressure, dew point temperature, rainfall and wind speed), a total of 11 variables, 66 variables can be obtained after three-level wavelet transform, so 66 parallel network channels need to be established. The one-dimensional convolution layer slides on the input signal through the convolution kernel (filter) to extract local features. The size and number of the convolution kernel determine the dimension of the output feature map of the convolution layer.

[0103]

[0104] Where x is the input signal, w is the convolution kernel, y is the output feature map, y(t) represents the output signal or convolution result at time t, K is the size of the convolution kernel, k is the index of the convolution kernel w, w(k) is the value of the convolution kernel w at k, and x(tk) is the value of the input signal x at tk. The result of the convolution operation is passed through a nonlinear activation function (such as ReLU) to increase the nonlinear representation ability of the model. Where a(t) is the output result of the activation function at time t, and max represents the maximum value function.

[0105] a(t)=ReLU(y(t)))=max(0,y(t))

[0106] The pooling layer downsamples the output of the convolutional layer to reduce the size of the feature map, reduce computational complexity, and enhance the translation invariance of the model.

[0107] p(t)=max{a(t), a(t+1),..., a(t+M-1)}

[0108] Among them, M is the size of the pooling window, and the output of the pooling layer is finally flattened into a one-dimensional vector, and p(t) is the pooling result at time t. Through multiple layers of convolution and pooling operations, each sub-signal will be converted into a high-dimensional feature vector, which contains the local temporal characteristics of the sub-signal.

[0109] Step 5 In this step, the features extracted from the convolutional neural network (CNN) are input into the bidirectional nested long short-term memory network (BiNLSTM) to capture long-term dependencies and complex patterns in the time series. The following is a detailed description of this step: The bidirectional long short-term memory network (BiNLSTM) is an extension of the traditional long short-term memory network (LSTM), which can process information in two directions, considering both past information and future information. This can improve the understanding and prediction of time series data. The LSTM network can effectively capture and maintain long-term dependencies in time series through its special gating mechanism.

[0110] A common LSTM memory unit structure is as follows:

[0111] i t =σ i (xtW xi +h t-1 W hi +b i )

[0112] f t =σ f (x t W xf +h t-1 W hf +b f )

[0113] c t =f t ⊙c t-1 +i t ⊙σ c (x t W xc +n t-1 W hc +b c )

[0114] o t=σ o (t t W xo +h t-1 W ho +b o )

[0115] h t =o t ⊙σ h (c t )

[0116] NLSTM embeds one LSTM memory cell into another LSTM memory cell, such as Figure 2 As shown, its external input function and hidden function are updated as follows:

[0117]

[0118]

[0119] In a normal LSTM cell, the memory cell state c_t is updated as follows:

[0120]

[0121] In the NLSTM cell, this process is replaced by an internal LSTM cell, where and As inputs to short-term and long-term memory respectively. The structure of the internal LSTM unit is as follows:

[0122]

[0123]

[0124]

[0125]

[0126]

[0127] Therefore, the external storage unit state c t The update method becomes:

[0128]

[0129] Figure 3The internal unit structure of BiNLSTM is shown. As can be seen from the figure, the training sequence of each BiNLSTM model consists of a forward NLSTM and a backward NLSTM, so that the forward and backward features of the current time point can be obtained. Compared with NLSTM, each neural unit of BiNLSTM has stronger processing power and can better capture long-term historical data information.

[0130] Step 6: In this step, the features processed by the convolutional neural network (CNN) and the bidirectional nested long short-term memory network (BiNLSTM) will be further input into the residual network. The residual network (ResNet) optimizes and integrates the prediction results of each sub-signal through multiple residual connection layers and fully connected layers to improve the accuracy and robustness of the prediction. The following is a detailed description of this step:

[0131] In this step, the features processed by the convolutional neural network (CNN) and the bidirectional nested long short-term memory network (BiNLSTM) will be further input into the residual network. Specifically, the outputs of all variables will be combined after the BiNLSTM layer and input into six different residual networks respectively. Each residual network is responsible for outputting a final air quality prediction result to ensure the simultaneous prediction of six pollutants. After each sub-signal is output by the BiNLSTM layer, it is converted into a one-dimensional vector and finally the features of all variables are combined to form a comprehensive feature vector. The output of each different BiNLSTM layer is H i , where n is the number of sub-signals, and the comprehensive feature vector after combining all variables is expressed as:

[0132] H combined =Concat(H 1 ,H 2 ,..,H n )

[0133] Next, the comprehensive feature vector H combined As the input of the residual network. After the input layer, multiple residual blocks are stacked together to form a deep residual network. Each residual block is optimized through residual connections, allowing the network to better learn complex feature relationships. Each residual connection layer contains multiple fully connected layers (Dense layers) and skip connections (SkipConnection).

[0134] The calculation formula for each residual unit is:

[0135] y=σ(Wx+b)+x

[0136] Where W and b are the weight matrix and bias vector respectively, σ is the activation function, x is the input feature vector, and y is the output of the residual unit. After being processed by six residual networks, the final prediction results of the six AQI components are output. That is, the six air quality components AQI (i.e. the predicted PM2.5, PM10, SO2, NO2, CO and O3 values) are output respectively.

[0137] Step 7 is only used during training, and is mainly used to evaluate the performance of the trained network model. After the performance meets the requirements, it will be applied to actual predictions. In the actual prediction process, there is no need to evaluate step 7. Step 7 is after completing step 6 to process the combined feature vector through the residual network and generate the final prediction result. We need to perform inverse normalization to restore the result to the amplitude range of the original data. Evaluating the predictive performance of the model is an important step to verify the effectiveness of the model. We use several common evaluation indicators to measure the predictive performance of the model, including mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE) and coefficient of determination (R 2 ). The calculation formula for each evaluation indicator is as follows:

[0138]

[0139]

[0140]

[0141]

[0142] Among them, y is the true value, is the predicted value, is the average of the true values. The evaluation indicators include MAE, RMSE and MAPE, which evaluate the prediction performance by calculating the error level. Among these indicators, MAE (mean absolute error): calculates the average of the absolute errors between the actual value and the predicted value, reflecting the average deviation of the prediction results. RMSE (root mean square error): measures the deviation between the actual value and the predicted value, but is more sensitive to outliers because the error is squared and then averaged. MAPE (mean absolute percentage error): uses a proportional method to measure the relative level of absolute error, indicating the percentage of the predicted error to the actual value. In addition, we also use R 2 (coefficient of determination) to evaluate the model’s fit. 2 The closer the value of is to 1, the better the fit between the predicted value and the actual value. Therefore, the lower the values ​​of MAE, RMSE and MAPE, the smaller the prediction error of the model and the more accurate the prediction; 2The higher the value, the better the model fit. After training, the mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE) and coefficient of determination (R 2 ) etc. were used to evaluate the performance of the prediction network model constructed in the present application. Through experiments, it was found that the prediction results using the network model of the present application were highly accurate.

[0143] The present invention proposes an air quality prediction method based on signal decomposition, which effectively improves the accuracy and robustness of air quality prediction by combining the improved wavelet transform (SWT) with the convolutional neural network (CNN) and the bidirectional nested long short-term memory network (BiNLSTM). Accurate air quality prediction can not only provide timely environmental information to the government and support environmental management decisions, but is also crucial to protecting human health. The high-precision prediction model of the present invention can provide reliable data support for relevant departments and help to formulate more scientific and effective environmental management policies. In summary, the present invention effectively improves the accuracy and robustness of air quality prediction through innovative data decomposition methods and multi-layer neural network structures. Its efficient data processing capabilities, multi-task learning architecture and optimized residual network give it significant advantages in the field of air quality prediction. Future research can further optimize the model structure, expand its scope of application, and provide solutions for a wider range of time series prediction problems. The technical advantages of this solution include:

[0144] 1) Use the improved stationary wavelet transform (SWT) to decompose the air quality data and decompose the original data into multiple sub-signals. In this way, the high-frequency and low-frequency features in the data can be better captured and the prediction performance of the model can be improved.

[0145] 2) Each sub-signal obtained by decomposition is input into an independent one-dimensional convolutional neural network (CNN) for feature extraction. The local perception and feature extraction capabilities of CNN enable it to effectively capture local patterns in time series data and improve the accuracy of feature extraction.

[0146] 3) Input the features extracted by CNN into a bidirectional nested long short-term memory network (BiNLSTM) to capture long-term dependencies and complex patterns in time series. BiNLSTM can process information in two directions, improving the understanding and prediction capabilities of time series data.

[0147] 4) After combining the features of all sub-signals, they are input into six different residual networks, which output the final prediction results respectively. The residual network can effectively alleviate the gradient vanishing problem of the model and optimize the accuracy and robustness of the prediction results.

[0148] 5) Under the multi-task learning framework, multiple air quality indicators are predicted simultaneously, making full use of the correlation and mutual information between the indicators to improve the overall prediction performance.

[0149] 6) The model prediction results are inverse normalized to restore them to the amplitude range of the original data, and the prediction results are evaluated through indicators such as mean square error (MSE), mean absolute error (MAE), and root mean square error (RMSE).

[0150] Obviously, the specific implementation of the present invention is not limited to the above-mentioned methods. As long as various non-substantial improvements are made using the method concept and technical solution of the present invention, they are all within the protection scope of the present invention.

Claims

1. An air quality prediction method based on signal decomposition, characterized in that: include S1. Obtain historical air quality data and meteorological data of the city to be predicted; S2, performing zero-mean normalization processing on the data obtained in step S1; S3, using improved stationary wavelet transform SWT to analyze the data and decompose the normalized data into six sub-signals; S4, inputting the decomposed sub-signals into different convolutional neural networks (CNN) for feature extraction; S5, input the features extracted in step S4 into the bidirectional nested long short-term memory network BiNLSTM to capture long-term dependencies and complex patterns in the time series; S6. Input the features processed in step S5 into the residual network, process the features of each sub-signal through the residual network and output the prediction results.

2. The air quality prediction method based on signal decomposition as claimed in claim 1, characterized in that: The convolutional neural network CNN, the bidirectional nested long short-term memory network BiNLSTM, and the residual network in steps S4-S6 are all trained, verified, and tested using pre-built data sets; The construction of the dataset includes: Step 1: Obtain the original air quality data and meteorological data of the city to be predicted, and fill in the missing values ​​of the data; Step 2, performing zero-mean normalization processing on the data obtained in step 1 so that the data are within the same dimensional range; Step 3: Apply improved stationary wavelet transform (SWT) to the data in step 2 and decompose the high-frequency information, decompose the normalized data into six sub-signals to obtain a data set, and divide the data set into a training set, a validation set, and a test set.

3. A method for predicting air quality based on signal decomposition as claimed in claim 1 or 2, characterized in that: The data is normalized to zero mean by subtracting the mean and dividing by the standard deviation. The processing formula is: Among them, X represents the original data, μ represents the mean of the data, σ represents the standard deviation of the data, and X norm Represents the data after normalization.

4. The air quality prediction method based on signal decomposition according to claim 1 or 2, characterized in that: The improved stationary wavelet transform SWT is used to analyze the data, and the normalized data is decomposed into six sub-signals, including: firstly, the original signal x[n] is decomposed at the first level, and convolution is performed using a low-pass filter and a high-pass filter to obtain the first-level approximate coefficient A1[n] and detail coefficient D1[n]; When performing the second level classification, not only the first level approximation coefficient A1[n] is decomposed, but also the detail coefficient D1[n] is decomposed to obtain the approximation coefficients A2[n], A3[n] and detail coefficients D2[n], D3[n]: When performing the third level classification, A2[n] and D2[n] obtained from the second level decomposition are further decomposed to obtain A4[n], D4[n], A5[n], and D5[n]: After the improved three-level wavelet transform, six sub-signals are obtained, namely A3[n], D3[n], A4[n], D4[n], A5[n], and D5[n].

5. The air quality prediction method based on signal decomposition according to claim 1 or 2, characterized in that: In step S4, the different decomposed sub-signals are respectively input into different one-dimensional convolutional neural networks 1D-CNN for feature extraction, where the number of variable parameters in the historical air quality data and meteorological data is m, and the established convolutional neural network has a total of 6m parallel network channels; the one-dimensional convolution layer slides on the input signal through the convolution kernel (filter) to extract local features.

6. The air quality prediction method based on signal decomposition according to claim 1 or 2, characterized in that: The method also includes inputting the features extracted from the convolutional neural network (CNN) into a bidirectional nested long short-term memory network BiNLSTM to capture long-term dependencies and complex patterns in the time series, and the training sequence of each BiNLSTM model consists of a forward NLSTM and a backward NLSTM, so that the forward and backward features of the current time point can be obtained.

7. The air quality prediction method based on signal decomposition according to claim 1 or 2, characterized in that: The method also includes further inputting the features processed by the convolutional neural network CNN and the bidirectional nested long short-term memory network BiNLSTM into the residual network, the outputs of all variables in the convolutional neural network CNN are combined together after the BiNLSTM network layer, and are respectively input into multiple different residual networks, each residual network is responsible for outputting a final air quality prediction result, and each final air quality prediction result corresponds to an air pollutant content prediction result.

8. The air quality prediction method based on signal decomposition as claimed in claim 7, characterized in that: After each sub-signal is output by the BiNLSTM network layer, it is converted into a one-dimensional vector and finally the features of all variables are combined to form a comprehensive feature vector. The output of each different BiNLSTM network layer is H i , where n is the number of sub-signals, and the comprehensive feature vector after combining all variables is expressed as: H combined =Concat(H1,H2,...,H n ) Comprehensive feature vector H combined As the input of the residual network; after the input layer, multiple residual blocks are stacked together to form a deep residual network; each residual block is optimized through residual connections, so that the network can better learn complex feature relationships; each residual connection layer contains multiple fully connected layers and jump connections; the calculation formula for each residual unit is: y=σ(Wx+b)+x Where W and b are the weight matrix and bias vector respectively, σ is the activation function, x is the input feature vector, and y is the output of the residual unit; after being processed by six residual networks, the final prediction results of the six AQI components are output.

9. The air quality prediction method based on signal decomposition according to claim 1 or 2, characterized in that: When training the convolutional neural network, bidirectional nested long short-term memory network, and residual network through the training set, set the evaluation parameters to evaluate the training results and prediction performance. The set parameters include mean absolute error MAE, root mean square error RMSE, mean absolute percentage error MAPE, and determination coefficient R2. The evaluation parameters are calculated as follows: Among them, y is the true value, is the predicted value, is the average of the true values.