PM10 concentration prediction method, system, device and storage medium
Through the Encoder-Decoder WaveNet network and feature attention mechanism, combined with Pearson correlation analysis, the problems of time dependence and the influence of other air pollutants in PM10 concentration prediction are solved, achieving higher accuracy and faster prediction effects.
Patent Information
- Application Number
- CN202211020007.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-24
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-08-24
AI Technical Summary
In the existing PM10 concentration prediction methods, time-dependent features are not extracted sufficiently, resulting in large errors in prediction accuracy, and the effects of other air pollutants are not effectively combined, affecting the prediction accuracy.
The Encoder-Decoder WaveNet network is used to extract time-dependent features. Combined with the feature attention mechanism, relevant data is selected through Pearson correlation analysis, and a weighted feature matrix is constructed and sent to the LSTM neural network for prediction.
It improves the accuracy and speed of PM10 concentration prediction, reduces the cumulative error in the training process, enhances the ability to extract air pollution characteristics, and improves the accuracy of prediction results.
Smart Images

Figure CN115238595B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of concentration prediction and relates to a PM10 concentration prediction method, system, device and storage medium. Background Art
[0002] With the development of modern industrial technology and the increase in pollution emissions, research on the prediction of air pollutant concentrations has become increasingly important. Establishing a good air pollution monitoring and control system and accurately predicting air pollutants are of great significance for improving air quality, controlling air pollution, and promoting the construction of ecological civilization.
[0003] In PM10 concentration prediction models, integrating time dependence with the influence of other features is a challenging task. Time dependence is the primary factor influencing PM10 concentration prediction and plays a decisive role. However, if a prediction model only considers the influence of time dependence, it ignores the complex causes of PM10, resulting in significant deviations in prediction accuracy. Considering too many influencing factors can lead to an excessive number of feature dimensions, increasing network training time and negatively impacting training. Furthermore, common time series prediction algorithms, such as LSTM, do not fully exploit time dependence during training. Therefore, PM10 concentrations from one day ago and one week ago should have different impacts on the current PM10 concentration. In summary, PM10 concentration prediction is not a simple linear prediction problem, but a complex nonlinear one.
[0004] After analyzing the current common PM10 concentration prediction methods, it is found that the current methods do not fully extract the time-dependent characteristics of PM10 concentration, which easily leads to a decrease in prediction accuracy when making long-term predictions; secondly, the concentration of air pollutants is an important influencing feature of PM10 concentration prediction. The current methods do not integrate the time-dependent characteristics of PM10 concentration with the impact of other air pollutants on PM10 concentration in the current area, which affects the prediction accuracy. Summary of the Invention
[0005] The purpose of the present invention is to solve the problem in the prior art that the time-dependent characteristics of PM10 concentration are not sufficiently extracted, resulting in errors in the PM10 concentration prediction accuracy, and to provide a PM10 concentration prediction method, system, device and storage medium.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] A PM10 concentration prediction method comprises the following steps:
[0008] S1: Clean the acquired historical air quality data, fill in the missing values in the data, and obtain the filled data;
[0009] S2: performing correlation analysis on the filled data, selecting data that is correlated with the PM10 concentration data, and obtaining correlation data;
[0010] S3: Divide the correlation data into data sets to obtain normalized data;
[0011] S4: Construct an Encoder-Decoder WaveNet network. Based on the Encoder-Decoder WaveNet network, extract the time-dependent features of the normalized data and construct the extracted time-dependent features into an input matrix.
[0012] S5: Based on the input matrix, a feature attention mechanism is introduced to obtain the weighted feature matrix of the input matrix through dynamic classification attention weights;
[0013] S6: Extracting the time series information and feature information from the weighted feature matrix to obtain the hidden layer state containing the time series information and feature information of each historical moment;
[0014] S7: Send the hidden layer state to the full connection layer to obtain the prediction result.
[0015] A further improvement of the present invention is:
[0016] In step S2, the filled data is subjected to Pearson correlation analysis, and the correlation is determined by the correlation coefficient r, which is calculated as follows:
[0017]
[0018] Where X and Y represent two continuous signals respectively.
[0019] The step S3 comprises the following steps:
[0020] Convert the obtained correlation data from the original interval to the interval range of [0,1]. The calculation method of the normalized data is:
[0021]
[0022] The step S4 comprises the following steps:
[0023] Let X=(x1,x2,…,x n ) is the input sequence of the time series. The input sequence X is encoded to obtain the intermediate vector C. The calculation method is:
[0024] C=w(x1,x2,…,xn ) (3)
[0025] Where: w(·) represents the nonlinear transformation function;
[0026] The input sequence X generates the feature target sequence Y=(y1,y2,…,y n );
[0027] The intermediate vector C is combined with the target sequence (y1, y2, ..., y t-1 ) to generate the target sequence y at time t t ,y t That is the extracted time dependency:
[0028] y t =g(y1,y2,…,y t-1 ,C) (4)
[0029] Where: g(·) represents the activation function.
[0030] The step S5 comprises the following steps:
[0031] The input matrix is sent to the feature attention layer. Let the single time step input matrix containing M features in time step t be Y = (y1, y2, ..., y m ), then the attention weight vector e at time step t is:
[0032] e=σ(W e X+b e ) (5)
[0033] Normalize the attention weight vector e to obtain the feature attention weight a=(a1, a2, ..., a m ), where a m Represents the attention weight value of the mth feature, and the normalized calculation method is:
[0034]
[0035] And the sum of the attention weights of all features is 1, that is:
[0036]
[0037] Compute the input matrix Y at time step t as a weight vector Y′:
[0038] Y′=α⊙y=[α1y1,α2y2,…,α M y M ] (8).
[0039] In step S6, the weighted feature matrix is fed into an LSTM neural network to extract the time series information and feature information from the weighted feature matrix.
[0040] When filling in the missing values of the air quality historical data in step S1, the unit is hour.
[0041] A PM10 concentration prediction system includes a data filling module, a correlation analysis module, a normalization processing module, a feature matrix extraction module, a hidden layer extraction module and a result prediction module;
[0042] The data filling module is used to clean the acquired historical air quality data and fill in the missing values in the data;
[0043] The correlation analysis module is used to perform correlation analysis on the filled data and select data that is correlated with the PM10 concentration data;
[0044] A normalization processing module is used to normalize the selected correlation data, divide the correlation data into data sets, and obtain normalized data;
[0045] The feature matrix extraction module is used to build the Encoder-Decoder WaveNet network, transmit the normalized data to the Encoder-Decoder WaveNet network, extract time-dependent features, and construct the extracted time-dependent features into an input matrix;
[0046] The feature matrix weighting module is used to introduce a feature attention mechanism based on the input matrix and obtain the weighted feature matrix of the input matrix through dynamic classification attention weights;
[0047] The hidden layer extraction module is used to extract the time series information and feature information from the weighted feature matrix to obtain the hidden layer state containing the time series information and feature information of each historical moment;
[0048] The result prediction module is used to send the hidden state to the full-link layer to obtain the prediction result.
[0049] A terminal device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods of the present invention when executing the computer program.
[0050] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of any method described in the present invention.
[0051] Compared with the prior art, the present invention has the following beneficial effects:
[0052] The present invention discloses a PM10 concentration prediction method. The present invention extracts correlation data of PM10 concentration for analysis, and simultaneously constructs an Encoder-Decoder WaveNet network. The time-dependent features are extracted through the Encoder-Decoder WaveNet network, and the cumulative error in the intermediate extraction process of the feature vector is reduced. The Encoder-Decoder WaveNet network can fully explore the influence of air pollutant concentration on PM10 concentration, and enhance the ability to extract air pollution features. The method disclosed by the present invention not only considers the time dependence but also analyzes the correlation data simultaneously, thereby improving the accuracy of the prediction result and ensuring the prediction effect.
[0053] Furthermore, the present invention normalizes the correlation data to avoid the existence of extremely large or extremely small samples in the data. By normalizing the data, the obtained values are compressed within a specific range to reduce the adverse effects in the data analysis and network training process, which helps to speed up the training process and improve the convergence speed of the network.
[0054] Furthermore, the present invention uses the Encoder-Decoder network framework to design the WaveNet network structure. The Encoder-Decoder network framework converts historical data into intermediate vectors, and further extracts time features, which can effectively solve the error problem generated by the traditional WaveNet network in calculation.
[0055] Furthermore, the present invention transmits the weighted matrix to the LSTM neural network for prediction, which can improve the accuracy of the result prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0057] Figure 1 This is the Encoder-Decoder WaveNet network structure of the present invention;
[0058] Figure 2 It is a characteristic attention structure diagram of the present invention;
[0059] Figure 3 This is the characteristic attention mechanism LSTM network structure of the present invention;
[0060] Figure 4 This is a structural diagram of the EDWaveNet-CALSTM PM10 concentration prediction model of the present invention;
[0061] Figure 5 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0062] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.
[0063] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.
[0064] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.
[0065] In the description of the embodiments of the present invention, it should be noted that if the terms "upper," "lower," "horizontal," "inner," etc. appear, the orientation or positional relationship indicated is based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the inventive product is typically placed when in use. These terms are merely for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or component referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limitations on the present invention. In addition, the terms "first," "second," etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0066] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0067] In the description of the embodiments of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "disposed," "installed," "connected," and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to internal connections between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0068] The present invention is described in further detail below with reference to the accompanying drawings:
[0069] See also Figure 1-5 The present invention discloses a PM10 concentration prediction method. By combining the time dependence of PM10 with the influence of other air pollutants, the PM10 concentration is predicted based on the EDWaveNet-CALSTM model. The EDWaveNet-CALSTM model is used to conduct air pollution prediction comparison experiments and ablation experiments in the Guanzhong region. The experimental results show that the EDWaveNet-CALSTM model has higher PM10 concentration prediction accuracy than other models. The method specifically includes the following steps:
[0070] Step 1: Clean the acquired air quality data and fill in missing values in hours.
[0071] The acquired air quality data a, b, c, d, e, and f are cleaned, and the missing values are filled in hourly units by taking the average value before and after.
[0072] Currently, the most common method for addressing missing values in various types of meteorological data is to use statistical methods to uniformly fill in missing values. These methods primarily include neighboring value filling, average value filling, and linear filling. Statistical observations of the dataset revealed that most missing data consisted of a single group with a time span of one hour; a small amount of missing data spanned between two and six hours; and only a few instances of missing data spanned more than one day due to missing monitoring data. Because the proportion of missing data is extremely small, and periodic analysis shows that air quality data in the Guanzhong region exhibits a certain degree of periodicity when measured on a daily basis, the missing value handling method employs the average of the preceding and following data. For most missing data, the average of the preceding and following three hours of normal data is used to fill in the missing values; for missing data spanning two to six hours, the average of the preceding and following six hours of normal data is used to fill in the missing values; and for the very few missing data spanning days, the average of the preceding and following three days of normal data for the same period is used to fill in the missing values.
[0073] Because data spans a long timeframe, and air quality monitoring equipment is sometimes affected by external factors when monitoring the concentration of pollutants like PM10, such as routine monitoring by staff or damage to the equipment, some data may be missing. Therefore, to obtain accurate prediction results, it is necessary to effectively fill in the missing data values.
[0074] Step 2: Perform Pearson correlation analysis on the filled data to select data that has a significant correlation with the PM10 concentration data.
[0075] Taking Xi'an as an example, a Pearson correlation analysis was conducted on the historical data of PM10 concentration in Xi'an and the historical data of PM2.5, SO2, NO2, O3 and CO concentrations in Xi'an, and the historical data of air pollutants that had a significant correlation with the PM10 concentration data were selected.
[0076] Among them, Xi'an's PM10 concentration historical data are significantly correlated with PM2.5, SO2, NO2, O3, and CO historical concentration data. Therefore, PM2.5, SO2, NO2, O3, and CO historical concentration data are used as input features of the PM10 concentration prediction model. The specific method is as follows:
[0077] Pearson correlation analysis is used to measure the correlation between two continuous signals X=(x1,x2,…,x n ) and Y=(y1,y2,…,y n ) change over time, where the magnitude of the correlation is determined by the correlation coefficient r, which is calculated as shown in Formula 1:
[0078]
[0079] Since the correlation between PM10 concentration historical data and PM2.5, SO2, NO2, O3 and CO historical concentration data is different, the influence of different air pollution factor concentration data on PM10 concentration prediction results is also different. The introduction of the feature attention mechanism is conducive to fully exploring the impact of each air pollution factor concentration data on the prediction results, dynamically assigning different attention weight coefficients to different air pollution factors, and improving the prediction performance of the model.
[0080] Step 3: Normalize the data selected in step 2 and divide the data set into two parts according to the ratio of 8:2.
[0081] The selected correlation data were processed using a normalization method and the data set was divided into two parts in a ratio of 8:2.
[0082] The present invention uses the maximum and minimum normalization method to convert the data from the original interval to the interval range of [0,1]. The calculation formula of the normalized data X' is as follows:
[0083]
[0084] In order to avoid the existence of extremely large or small samples in the data, the data is normalized and the obtained values are compressed within a specific range to reduce the adverse effects during data analysis and network training. Normalization plays a greater role in algorithms involving neural networks. Normalizing the attribute values in the training tuples helps to speed up the training process and improve the convergence speed of the network.
[0085] Step 4: Send the data obtained in step 3 to the Encoder-Decoder WaveNet network to extract time-dependent features. After extracting the time-dependent features, the input matrix X is constructed.
[0086] See also Figure 1 , construct the Encoder-Decoder WaveNet network, and send the normalized data to the Encoder-Decoder WaveNet network to extract time-dependent features. After extracting the time-dependent features, it is constructed as an input matrix. Let the constructed input matrix be X.
[0087] Let X=(x1,x2,x3…,x n ) is the input sequence of the time series, and the feature target sequence Y=(y1,y2,y3…,y n ) Among them, the encoder part first encodes the input sequence X to obtain the intermediate vector C. The specific transformation formula is shown in Formula 3:
[0088] C=w(x1,x2,…,x n ) (3)
[0089] Where: w(·) represents the nonlinear transformation function.
[0090] The decoder part combines the intermediate vector C generated by the encoder with the target sequence (y1, y2, y3…, y t-1 ) is calculated to generate the target sequence yt at time t, as shown in Formula 4:
[0091] y t =g(y1,y2,…,y t-1 ,C) (4)
[0092] Where: g(·) represents the activation function.
[0093] Therefore, considering the cumulative error problem of WaveNet in time series feature extraction, the Encoder-Decoder structure is used to design the WaveNet network structure, which can reduce the cumulative error problem of WaveNet in time series feature extraction, such as Figure 1 shown
[0094] Step 5: Send the input matrix Y to the feature attention layer and obtain the weighted feature matrix Y′ by dynamically allocating attention weights
[0095] In order to fully explore the impact of the concentration data of various air pollution factors on the prediction results, it is necessary to introduce a feature attention mechanism to dynamically assign different attention weight coefficients to different air pollution factors to improve the prediction performance of the model.
[0096] The input matrix Y is fed into the feature attention layer, where attention weights are dynamically assigned to obtain the weighted feature matrix Y. During the feature data input phase of the LSTM network, a feature attention mechanism is introduced to dynamically adjust the weight coefficients of different input features in the model to explore the correlation between different input features and the target feature. This feature attention mechanism also explores the impact of the concentrations of other air pollutants, such as PM2.5 and SO2, on PM10 concentration predictions, thereby improving the model's predictive performance.
[0097] Suppose that the single time step input feature vector Y=(y1,y2,…,y m ), then the calculation formula of the attention weight vector e at time step t is as follows:
[0098] e=σ(W e X+b e ) (5)
[0099] By normalizing the attention weight vector e, we can obtain the feature attention weight α = [α1, α2, …, αm, …, αM] at time step t, where αm represents the attention weight value of the mth feature. The normalization formula is as shown in Equation 6:
[0100]
[0101] And the sum of the attention weights of all features is 1, that is:
[0102]
[0103] To calculate the influence of attention weights, the feature vector Y at time step t is calculated as the weighted vector Y′:
[0104] Y′=α⊙y=[α1y1,α2y2,…,α M y M ] (8)
[0105] The structure of feature attention is as follows Figure 2 shown.
[0106] Step 6: The weighted feature matrix Y′ is sent to the LSTM neural network to extract the time series information and feature information, and obtain the hidden layer state h containing the time series information and feature information of each historical moment.
[0107] See also Figure 3 , the weighted feature matrix Y′ is sent to the LSTM neural network to extract the time series information and feature information, and the hidden layer state h containing the time series information and feature information of each historical moment is obtained.
[0108] First, the input data features are constructed into an input matrix. At time t, the feature vector data is weighted by the feature attention weights. This weighted data is fed into the basic unit of the LSTM and combined with the information memorized at time t-1 to ultimately generate the current prediction result. To fully explore the impact of other air pollution factors on PM10 prediction results, a feature attention mechanism is introduced into the LSTM network.
[0109] Step 7: Send the hidden layer state h obtained in step 6 to the fully connected layer to obtain the prediction result, and iterate to complete the model training.
[0110] The hidden time series information is extracted from the weighted feature vector, and finally the hidden layer state h containing the information of each historical moment is sent to the fully connected layer to obtain the prediction result, and the model training is completed iteratively.
[0111] The prediction method disclosed in this invention first considers that time dependence is the primary factor affecting PM10 concentration prediction performance. It uses WaveNet to extract temporal features. To address the cumulative error problem inherent in WaveNet predictions, a WaveNet network structure is designed using an encoder-decoder framework. The encoder uses a single-layer WaveNet network to convert preprocessed historical PM10 concentration data into an intermediate vector C. The decoder, also using a single-layer WaveNet network, combines the intermediate vector C with the current input data to extract temporal features. This effectively addresses the cumulative error problem inherent in traditional WaveNet calculations.
[0112] Secondly, we conducted a Pearson correlation analysis on the historical PM10 concentration data with the historical concentration data of other air pollutants, such as PM2.5 and SO2, to select influencing features that are closely related to PM10 concentration. Pearson correlation measures how two continuous signals change together over time.
[0113] Historical PM10 concentration data is combined with historical concentration data of other air pollutants closely related to PM10 concentration to form an input sequence. Temporal features are extracted using an Encoder-Decoder WaveNet to form the input data matrix Y. This input matrix Y is fed into the feature attention layer, where features are extracted by dynamically assigning attention weights to obtain a weighted vector Y′. Y′ is then fed into an LSTM to extract the hidden temporal information from the weighted feature vector. Finally, the hidden layer state h, containing information at each historical moment, is fed into the fully connected layer to output the prediction result.
[0114] Using correlation analysis and feature attention mechanisms, the attention weight coefficients of each input feature are dynamically calculated, fully exploring the influence of each input feature on the prediction results. Furthermore, the WaveNet network, designed using the Encoder-Decoder framework, addresses the cumulative error problem during WaveNet calculations and fully extracts the time-dependent characteristics of PM10 concentration.
[0115] See also Figure 4 , EDWaveNet-CALSTM model, output model evaluation indicators RMSE and MAE, and end the algorithm.
[0116] The EDWaveNet-CALSTM model was used to predict PM10 concentrations in Xi'an over 24, 48, and 168 hours. The model's prediction performance was analyzed by comparing it with other baseline models. The EDWaveNet-CALSTM model was then used to predict PM10 concentrations in other cities in the Guanzhong region to verify the stability of the model's predictions in this region. Finally, an ablation experiment was conducted on the EDWaveNet-CALSTM model to validate the effectiveness of the algorithm's improvements.
[0117] Taking Guanzhong region as an example, the present invention predicts PM10 concentration in the following way:
[0118] First, considering that time dependence is the primary factor affecting PM10 concentration prediction performance, WaveNet was used to extract temporal features. To address the cumulative error problem inherent in WaveNet predictions, a WaveNet network architecture was designed using an encoder-decoder framework. The encoder uses a single-layer WaveNet network to convert preprocessed historical PM10 concentration data into an intermediate vector C. The decoder, also using a single-layer WaveNet network, combines the intermediate vector C with the current input data to extract temporal features. This effectively addresses the cumulative error problem inherent in traditional WaveNet calculations.
[0119] The encoder part first encodes the input sequence X to obtain the intermediate vector C. The specific transformation formula is shown in Equation 9:
[0120] C=w(x1,x2,…,x n ) (3)
[0121] Where: w(·) represents the nonlinear transformation function.
[0122] The decoder combines the intermediate vector C generated by the encoder with the results {y1, y2, y3, …, yt-1} calculated at the previous time t-1 to generate the target sequence yt at time t, as shown in Equation 10:
[0123] y t =g(y1,y2,…,y t-1 ,C) (4)
[0124] Where: g(·) represents the activation function.
[0125] Secondly, we conducted a Pearson correlation analysis on the historical PM10 concentration data with the historical concentration data of other air pollutants, such as PM2.5 and SO2, to select influencing features that are closely related to PM10 concentration. Pearson correlation measures how two continuous signals change together over time.
[0126] Historical PM10 concentration data is combined with historical concentration data of other air pollutants closely related to PM10 concentration to form an input sequence. Temporal features are extracted using an Encoder-Decoder WaveNet to form the input data matrix Y. This input matrix Y is fed into the feature attention layer, where features are extracted by dynamically assigning attention weights to obtain a weighted vector Y′. Y′ is then fed into an LSTM to extract the hidden temporal information from the weighted feature vector. Finally, the hidden layer state h, containing information at each historical moment, is fed into the fully connected layer to output the prediction result.
[0127] Input: a-historical data of PM2.5 concentration in Guanzhong area, b-historical data of PM10 concentration in Guanzhong area, c-historical data of SO2 concentration in Guanzhong area, d-historical data of NO2 concentration in Guanzhong area, e-historical data of O3 concentration in Guanzhong area, d-historical data of CO concentration in Guanzhong area.
[0128] Output: Model evaluation indicators RMSE, MAE.
[0129] The key to predictive model interpretability lies in fully exploiting the dynamic time series characteristics of a single variable and the interactions between that variable and other variables. Traditional PM10 concentration prediction models either focus on exploiting the dynamic time series characteristics of a single PM10 concentration variable, ignoring interactions with other variables; or, while addressing these interactions, fail to fully integrate the time-dependent characteristics of PM10 concentration data. This invention combines this with concentration dependency, employing correlation analysis and a feature attention mechanism to dynamically calculate the attention weight coefficient for each input feature, fully exploring the impact of each input feature on the prediction results. Furthermore, the WaveNet network, designed using an Encoder-Decoder framework, addresses the cumulative error problem inherent in WaveNet computations and fully extracts the time-dependent characteristics of PM10 concentration. EDWaveNet is then combined with the LSTM feature attention mechanism to comprehensively consider the time dependency and the influence of other air pollutants during PM10 concentration prediction, achieving a certain degree of predictive model interpretability.
[0130] The EDWaveNet referred to in the embodiment of the present invention is the Encoder-Decoder WaveNet network.
[0131] The embodiment of the present invention discloses a PM10 concentration prediction system, comprising:
[0132] The data filling module is used to clean the acquired historical air quality data and fill in the missing values in the data;
[0133] The correlation analysis module is used to perform correlation analysis on the filled data and select data that is correlated with the PM10 concentration data;
[0134] A normalization processing module is used to normalize the selected correlation data, divide the correlation data into data sets, and obtain normalized data;
[0135] The feature matrix extraction module is used to build the Encoder-Decoder WaveNet network, transmit the normalized data to the Encoder-Decoder WaveNet network, extract time-dependent features, and construct the extracted time-dependent features into an input matrix;
[0136] The feature matrix weighting module is used to introduce a feature attention mechanism based on the input matrix and obtain the weighted feature matrix of the input matrix through dynamic classification attention weights;
[0137] The hidden layer extraction module is used to extract the time series information and feature information from the weighted feature matrix to obtain the hidden layer state containing the time series information and feature information of each historical moment;
[0138] The result prediction module is used to send the hidden state to the full-link layer to obtain the prediction result.
[0139] A schematic diagram of a terminal device provided in one embodiment of the present invention. The terminal device in this embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of each of the aforementioned method embodiments are implemented. Alternatively, when the processor executes the computer program, the functions of each module / unit in each of the aforementioned device embodiments are implemented.
[0140] The computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to accomplish the present invention.
[0141] The terminal device may be a computing device such as a desktop computer, a notebook computer, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0142] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0143] The memory may be used to store the computer programs and / or modules, and the processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory.
[0144] If the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0145] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A PM10 concentration prediction method, characterized in that: The following steps are involved: S1: Clean the acquired historical air quality data, fill in the missing values in the data, and obtain the filled data; S2: performing correlation analysis on the filled data, selecting data that is correlated with the PM10 concentration data, and obtaining correlation data; S3: Divide the correlation data into data sets to obtain normalized data; S4: Construct an Encoder-Decoder WaveNet network. Based on the Encoder-Decoder WaveNet network, extract the time-dependent features of the normalized data and construct the extracted time-dependent features into an input matrix. S5: Based on the input matrix, a feature attention mechanism is introduced to obtain the weighted feature matrix of the input matrix through dynamic classification attention weights; S6: Extracting the time series information and feature information from the weighted feature matrix to obtain the hidden layer state containing the time series information and feature information of each historical moment; S7: Send the hidden layer state to the full connection layer to obtain the prediction result; The S4 The following steps are involved: set up For the input sequence of the time series, The intermediate vector C is obtained by encoding, and the calculation method is: Where: w(·) represents the nonlinear transformation function; Input sequence Generate feature target sequences through the Encoder-Decoder network framework ; Combine the intermediate vector C with the input sequence The target sequence generated at the previous t-1 time Combine to generate the target sequence at time t , That is the extracted time dependency: Where: g(·) represents the activation function.
2. A PM10 concentration prediction method according to claim 1, characterized in that: In step S2, the filled data is subjected to Pearson correlation analysis, and the correlation is determined by the correlation coefficient r, which is calculated as follows: Where X and Y represent two continuous signals respectively.
3. A PM10 concentration prediction method according to claim 1, characterized in that: The step S3 comprises the following steps: Convert the obtained correlation data from the original interval to the interval range of [0,1]. The calculation method of the normalized data is:
4. A PM10 concentration prediction method according to claim 1, characterized in that: The step S5 comprises the following steps: The input matrix is sent to the feature attention layer. Suppose the single time step input matrix with M features in time step t is , then the attention weight vector e at time step t is: Normalize the attention weight vector e to obtain the feature attention weight at time step t ,in Represents the attention weight value of the mth feature, and the normalized calculation method is: And the sum of the attention weights of all features is 1, that is: The input matrix of time step t Calculated as a weighted vector 5. A PM10 concentration prediction method according to claim 1, characterized in that: In step S6, the weighted feature matrix is fed into an LSTM neural network to extract the time series information and feature information from the weighted feature matrix.
6. A PM10 concentration prediction method according to claim 1, characterized in that: When filling in the missing values of the air quality historical data in step S1, the unit is hour.
7. A PM10 concentration prediction system, characterized in that: It includes data filling module, correlation analysis module, normalization processing module, feature matrix extraction module, hidden layer extraction module and result prediction module; The data filling module is used to clean the acquired historical air quality data and fill in the missing values in the data; The correlation analysis module is used to perform correlation analysis on the filled data and select data that is correlated with the PM10 concentration data; A normalization processing module is used to normalize the selected correlation data, divide the correlation data into data sets, and obtain normalized data; The feature matrix extraction module is used to build the Encoder-Decoder WaveNet network, transmit the normalized data to the Encoder-Decoder WaveNet network, extract the time-dependent features, and construct the extracted time-dependent features into an input matrix. Specifically, the following steps are included: set up For the input sequence of the time series, The intermediate vector C is obtained by encoding, and the calculation method is: Where: w(·) represents the nonlinear transformation function; Input sequence Generate feature target sequences through the Encoder-Decoder network framework ; Combine the intermediate vector C with the input sequence The target sequence generated at the previous t-1 time Combine to generate the target sequence at time t , That is the extracted time dependency: Where: g(·) represents the activation function; The feature matrix weighting module is used to introduce a feature attention mechanism based on the input matrix and obtain the weighted feature matrix of the input matrix through dynamic classification attention weights; The hidden layer extraction module is used to extract the time series information and feature information from the weighted feature matrix to obtain the hidden layer state containing the time series information and feature information of each historical moment; The result prediction module is used to send the hidden state to the full-link layer to obtain the prediction result.
8. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Convolutional network traffic flow prediction method based on space-time attention mechanism
CN113450568A
PM2.5 concentration fine granularity prediction method based on ST-CCN-PM2.5
CN113962489A