A neural network-based urban air quality prediction method
The characteristics of air quality and meteorological data are extracted through neural network models, combined with long-term and short-term memory networks and forgetting layers, the shortcomings of air quality prediction and emission reduction analysis in the existing technology are solved, and accurate prediction of air quality concentration in the future and the formulation of emission reduction plans are achieved.
Patent Information
- Application Number
- CN202111474677.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-06
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2041-12-06
AI Technical Summary
There is a lack of models in the prior art that can quickly predict future daily air quality concentrations based on historical pollutant concentrations and analyze atmospheric pollutant emission reduction.
Using a neural network-based method, historical meteorological and air quality data characteristics are extracted through two-dimensional convolution units, combined with long and short-term memory networks and forgetting layers, an air quality grid neural network is established, and emission reduction plans are calculated in reverse to meet the annual goals.
Accurate prediction of future air quality concentration and formulation of emission reduction plans have been achieved, the generalization and applicability of the model have been improved, and the pollutant concentration has been ensured in line with the annual goals.
Smart Images

Figure CN116205317B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ambient air, and particularly to a method for predicting urban air quality based on a neural network. Background Art
[0002] With the development of industrial technologies, factories and civil facilities emit a large amount of pollutants into the air, leading to air pollution and an increase in the number of haze days. In the prior art, analysis is usually carried out based on existing data, and the emissions of pollutant concentrations are improved according to the analysis results.
[0003] However, there is no model in the prior art that can quickly predict the daily air quality concentration in the future based on historical pollutant concentrations and give an analysis of the corresponding reduction amount of atmospheric pollutants. Therefore, how to provide a quantitative analysis method for environmental air quality concentration and improvement work that can be based on an atmospheric pollution source emission inventory, meteorological data, and air quality monitoring data, and use air quality simulation and an air quality prediction neural network to predict the daily air quality concentration in the future and analyze the emission reduction workload has become an urgent problem to be solved. Summary of the Invention
[0004] The present invention provides a method for predicting urban air quality based on a neural network, aiming to solve the problem that there is no model in the prior art that can quickly predict the daily air quality concentration in the future based on historical pollutant concentrations and give an analysis of the corresponding reduction amount of atmospheric pollutants.
[0005] To achieve the above object, the technical solution of the present invention provides a method for predicting urban air quality based on a neural network, including: using a three-layer two-dimensional convolutional unit to extract features from the processed historical meteorological data and air quality simulation data in the past five years, obtaining the feature historical meteorological data and the feature simulation data and inputting them into a long short-term memory network. The long short-term memory network calculates the errors between the feature historical meteorological data, the predicted meteorological data, and the monitoring data, and repeatedly iterates to correct the errors to obtain a suitable prediction model. When the neural network model is trained, the input data refers to the air quality simulation data and the historical meteorological data.
[0006] Input the annual target conditions into the air quality grid neural network. If the output result of the air quality grid neural network meets the annual target conditions, the process ends; otherwise, use the qualified indicators corresponding to the unqualified pollutants in the output result as input conditions, so that the air quality grid neural network obtains an emission reduction plan through reverse calculation.
[0007] As a preference of the above technical solution, preferably, the air quality data in the past five years includes PM 2.5 、PM 10 、SO2、NO x, hourly values of O3, CO, wind speed, air pressure, air temperature, relative humidity, and mixing layer height.
[0008] As a preference of the above technical solution, preferably, after filling the missing values in the air quality data with the mean value, perform zero-one mean normalization processing, and add a convolutional layer with a size of 3x3, a stride of 1, and a padding of 1 before inputting the processed data into the long short-term memory network.
[0009] As a preference of the above technical solution, preferably, the long short-term memory network outputs qualified air quality prediction values after the respective affine transformations of the forget gate and the input gate, including:
[0010] The long short-term memory network outputs the hidden state data result after the respective affine transformations of the forget gate and the input gate:
[0011] Affine transformation of the forget gate: f t = σ(x t W x (f) + h t-1 W h (f) + b (f) );
[0012] Affine transformation of the input gate: i t = σ(x t W x (i) + h t-1 W h (i) + b (i) );
[0013] Hidden state data: h t = o t x tanh(c t );
[0014] The input of the next layer of the long short-term memory network is iterated with the hidden state data result output by the previous layer to output the qualified air quality prediction value.
[0015] As a preference of the above technical solution, preferably, affine transformation of the output gate: o t = σ(x t W x (o) + h t-1 W h (o) + b (o) ); Affine transformation of the memory cell: c t = f t x c t-1 + g t x it ;
[0016] Among them, the affine transformations of the forget gate, the input gate, and the output gate are all between 0 and 1.
[0017] As a preference of the above technical solution, preferably, the input weight of the output gate at this time, the input weight of the output gate at the previous moment, the input weight of the input gate at this time, and the input weight of the input gate at this time are continuously iteratively updated along with the backpropagation of the long short-term memory network.
[0018] As a preference of the above technical solution, preferably, the affine of the updated memory cell is: g t =tanh(x t W x (g) +h t-1 W h (g) +b (g) ),
[0019] Among them, the input of the new memory cell includes the hidden state data at the previous moment and the feature extraction data at this moment. This feature extraction data includes the predicted data and the monitoring data output by the long short-term memory network unit at the previous moment. Among them, the monitoring data includes meteorological data.
[0020] As a preference of the above technical solution, preferably, there are two layers of the long short-term memory network, and a Dropout forgetting layer is provided between the two layers of the long short-term memory network for vertically ignoring some feature data at the same moment.
[0021] As a preference of the above technical solution, preferably, otherwise, the assessment indicators of the pollutants that do not meet the annual target conditions are used as input conditions, so that the air quality grid neural network obtains an emission reduction plan through reverse calculation, including: each pollutant in the target includes PM 2.5 , PM 10 , SO2, NO x , O3, and the hourly values of CO; the numerical values of each pollutant in the annual target are input into the air quality grid neural network to obtain the indicators of each pollutant that should be output in the target year; when at least one pollutant indicator among the indicators of each pollutant that should be output in the target year is unqualified, obtain the qualified indicator data corresponding to the unqualified pollutant indicator; use this qualified indicator data as the input condition of the air quality grid neural network, so that the air quality grid neural network obtains an emission reduction plan through reverse calculation.
[0022] The technical solution of the present invention provides an analysis method for improving the ambient air quality concentration. After filling the historical meteorological data and air quality simulation data in the past 5 years using a two-dimensional convolutional unit, feature extraction is performed to obtain feature historical meteorological data and feature simulation data. The feature historical meteorological data and feature simulation data are input into a long short-term memory network, and the long short-term memory network outputs an iterative result after the respective affine transformations of the forgetting gate and the input gate. The iterative result is input into an air quality grid neural network, and the concentration values of various pollutants and the air quality index for each day in the next year are output. The annual target conditions are input into the air quality grid neural network. If the output result of the air quality grid neural network meets the annual target conditions, the process ends; otherwise, the assessment indicators of the pollutants that do not meet the annual target conditions are used as input conditions, so that the air quality grid neural network obtains an emission reduction plan through reverse calculation.
[0023] The advantages of the present invention are as follows: A neural network model capable of fusing air quality simulation results and air quality monitoring data is established, and the established neural network model is used to correct the air quality model simulation results, thereby predicting the daily air quality concentration and emission reduction workload in the future, so that the pollution reduction work can have a target-attainable plan. By adopting the method of stacking two layers of long short-term memory networks, it is possible to learn more complex data patterns and improve the accuracy of the model. Adding a forgetting layer (Dropout layer) in the long short-term memory network makes the model not easily overfit, overcomes the defect of missing urban air quality data, avoids the model from accurately predicting only the trained data, improves the generalization of the model, increases the universality of the input data samples, and can predict more accurate results. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0025] Figure 1 It is a flowchart of a method for predicting urban air quality based on a neural network provided by an embodiment of the present invention.
[0026] Figure 2 It is a schematic structural diagram of the long short-term memory network used in the present invention.
[0027] Figure 3 It is a schematic structural diagram of a memory unit in the long short-term memory network used in the present invention.
[0028] Figure 4Schematic diagram of the neural network structure in the urban air quality prediction method based on neural network provided by the present invention.
[0029] Figure 5 Schematic diagram of the air quality grid neural network architecture used in the present invention. Specific embodiments
[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0031] The current air pollutant concentration is affected by the air pollutant concentration in the previous time period. Therefore, there are the initial values of the pollutant concentration and the initial pollutant source emissions at the end of this year. Also, because there are certain conversion relationships among pollutants such as PM 2.5 and PM 10 , SO2, NOx, O3, and CO, in other words, the concentration of common pollutants and the pollutant source emission situation at the current moment will definitely affect the concentration of other pollutants at the next moment. The present invention uses the hourly concentration average of various pollutants, the pollutant source (PM 2.5 , PM 10 , SO2, NO x , CO, NH3, VOCs) emissions, and meteorological data in the past 5 years as the input layer, and uses the hourly concentration average of various pollutants in the next 1 year as the output layer. The air quality prediction neural network is trained using the air quality data and meteorological monitoring data of national control stations to obtain the air quality prediction values of national control stations.
[0032] Air quality prediction neural network architecture:
[0033] CONV2D_BLOCK -> LSTM -> Dropout -> LSTM -> Dropout -> FC.
[0034] It includes a feature extraction and prediction module. The feature extraction module is composed of 3 layers of two-dimensional convolutional units CONV2D_BLOCK combined together to extract more robust features from the initial features and input them into the prediction module. The prediction module includes a combined architecture of long short-term memory networks (LSTM), a forgetting layer (Dropout), and fully connected layers (FC). OnlyFigure 3 h in t As the input vector of the FC network.
[0035] Now, the technical solution of the present invention will be described in detail. Specifically, the establishment of the network model involved in the present invention will be described. As Figure 1 shown, it includes:
[0036] Step 101: Input the air quality data in the past 5 years into a 3-layer 2D convolutional unit.
[0037] Specifically, the air quality prediction neural network includes a 3-layer 2D convolutional unit CONV2D_BLOCK neural network. This two-dimensional convolutional neural unit fills the air quality simulation data and historical meteorological data in the past 5 years and then extracts features to obtain feature simulation data and feature historical meteorological data.
[0038] The input of the air quality prediction neural network uses the air quality data in the past 5 years (5 * 365 * 24 = 43800h), including PM 2.5 , PM 10 , SO2, NO x , O3, the hourly values of CO, and meteorological data, where the meteorological data includes the hourly values of wind speed, air pressure, temperature, relative humidity, and mixing layer height.
[0039] Step 102: Fill the missing values with the mean value and then perform mean normalization.
[0040] Specifically, the mean normalization is specifically performed by zero-one mean normalization, a’ = (a – a0) / s, where x is the original data, a0 is the average value of the original data, and s is the standard deviation of the original data.
[0041] Step 103: Initialize the parameters of the long short-term memory network.
[0042] When the data passes through the network layer, in order to make the information in the network flow better, the variances of the input and output need to be the same, and the flow directions include forward propagation and backward propagation. Therefore, Xavier initialization is used.
[0043] Step 104: Input the feature historical meteorological data and feature simulation data into the long short-term memory network.
[0044] The feature simulation data and feature historical meteorological data after being processed in step 102 are two groups of data, 43800x6 and 43800x4. Before inputting these two groups of data into the first memory unit of the two-layer long short-term memory network (LSTM), three convolutional layers with a size of 3x3, a stride of 1, and a padding of 1 are added, and the size of the data remains unchanged after padding. In this step, adding convolutional layers is to extract more complex and abstract information from the data, so as to obtain more useful information. Further, when iterating in the first memory unit, the predicted data is the variance that is not zero.
[0045] The feature historical meteorological data and feature simulation data corresponding to the feature type are input into different input units (X t-1 , X, X t+1 ) in the long short-term memory network.
[0046] In step 105, the forget gate and the input gate output the hidden state data result through affine transformation.
[0047] Specifically, after the affine transformation of the forget gate and the input gate in the long short-term memory network, the hidden state data result h t output at the LSTM layer at time t is obtained:
[0048] Affine transformation of the forget gate: f t = σ(x t W x (f) + h t-1 W h (f) + b (f) );
[0049] Affine transformation of the input gate: i t = σ(x t W x (i) + h t-1 W h (i) + b (i) );
[0050] Affine transformation of the output gate: o t = σ(x t W x (o) + h t-1 W h (o) + b (o) );
[0051] Affine transformation of the memory unit: c t = f t x c t-1 + g t x i t ;
[0052] Thus, the hidden state data: h t = o t *tanh(c t );
[0053] t represents the t-th moment. Therefore, t-1 is the previous hour, and t+1 is the next hour. h t represents the hidden state output by the LSTM layer at the t-th moment, which records past information. The characteristic of LSTM lies in using the hidden state of the previous moment to inherit past information.
[0054] Step 106: Combine the current hidden state data result with the affine transformation of the input gate at the next moment for calculation, and output the affine transformation of the output gate at the next moment.
[0055] Thus, a new memory cell: g t = tanh(x t W x (g) + h t-1 W h (g) + b (g) ), and the current new memory cell enters the iterative process of the next moment. W x (g) represents the weight in calculating the new memory cell g t时, for the input x t . Similarly, W h (g) represents the weight of the state h t-1 at the previous moment t-1.
[0056] In Steps 105 and 106:
[0057] For two adjacent cells in the same layer of LSTM: o t is the output gate, which is used to adjust the importance of the hidden state at the next moment t+1. Here, σ() represents the sigmoid function. The input x t has the input weight W x (o) for the current input, and the hidden state data h t-1 at the previous moment has the hidden state output weight W h (o) . The sum of the matrix product of W x (o) , the matrix product of W h (o) , and the bias b (o) is passed to the sigmoid function, and the result is the output o of the output gate. Finally, this o and tanh(c tThe product of the corresponding elements of ) is used as the hidden state data h at time t t Output
[0058] f is the forget gate, and the input is x t There is an input weight W x (f) , and the hidden state data h of the previous moment t-1 There is a hidden state weight W h (f) . Pass the matrix product of W x (f) , the matrix product of W h (f) , and the bias b (f) The calculation result after adding the three is passed to the sigmoid function to obtain the output f of the output gate
[0059] The new memory cell g t Adds new information to the memory cell of the previous moment. By adding the new information g at this moment t to c of the previous moment t-1 above to form a new memory cell
[0060] i is the input gate, and the value of the input gate is between 0 and 1. When the value of each element of the new information g exceeds this range, the new information g to be added is discarded
[0061] Forget gate input weight W x (f) , hidden state weight W h (f) , input gate current input weight W x (o) , hidden state output weight W h (o) Will be automatically updated each time during backpropagation after initialization. When comparing the result calculated using the aforementioned formula with the actual value, backpropagate the error and recalculate the output. Here, the error is calculated using the mean squared error squareerror, and using the chain rule, calculate backward to update the values of each weight
[0062] The iteration result is: the average hourly concentration of each pollutant PM 2.5 , PM 10 , SO2, NO x , O3, CO for the next 1 year
[0063] Furthermore, the transfer between the two layers of LSTM in this application is described as follows
[0064] Such as Figure 4As shown, after a memory unit of an LSTM passes through a vertical dropout layer, the horizontal input data of the corresponding memory unit of the next-layer LSTM is still the predicted data at adjacent times, and the vertical input data of this memory unit is partial feature data (equivalent to x t ) after selectively deleting some neurons (feature data), making the model less likely to overfit and more generalizable to predict more accurate results. The horizontal iteration between the same LSTM layers is normal to maintain the continuity of the data. Further, due to geographical location and local conditions, the obtained historical meteorological data and the monitored values of historical monitoring stations are inevitably missing. Even after filling processing, these filled data are still not real values. Appropriately hiding some nodes can make the model more accurate, and at the same time, the model can be continuously iterated through the forgetting layer (dropout) to correct the model.
[0065] Further, there is a fully connected layer after the long short-term memory network. The predicted result at time t is obtained through mapping, and then the error calculation is performed with the monitored value of the monitoring station. If the error from the true value exceeds the threshold, the wrong predicted value is iterated backward, thereby correcting the model so that the predicted value is close to the true value.
[0066] Step 107: Input the calculation result into the fully connected layer and perform mean square error calculation.
[0067] Step 108: Input the calculation result into the air quality grid neural network to obtain the predicted result of the air quality for the next year.
[0068] Up to step 108, the neural network model provided by the present invention is established. When making predictions, the predicted air quality simulation data and predicted weather data for the next 1 year are used as inputs and put into the model, and the weight parameters have been determined, so the calculation result is the daily concentration data of various pollutants for the next 1 year.
[0069] The air quality grid neural network consists of a ResNet network. Using the geographical location of the national control stations, a map is created as the input of the ResNet and "mapped" into an air quality map covering the entire regional grid. This network is trained using the real-time monitored data of pollutants at the national control points and the air quality simulation data. Specifically, the air quality simulation data here is divided by grid, and the real-time monitored data is based on the actual geographical location of the stations. The "mapping" to be established requires the above two types of data.
[0070] Step 109: Determine whether the predicted result meets the annual target conditions. If so, end; otherwise, execute step 110.
[0071] Among them, the prediction results are the daily air quality for the next year, obtaining the concentration values of 6 pollutants and the air quality index for each day. According to the annual air quality targets: 1. The number of days with good air quality reaches x%, b. The indicators of 6 pollutants are [y0, y1, …, y5], c. The number of days with heavy pollution is z days, etc. As the input annual target conditions, after calculation, it is found that each pollutant meets the annual target conditions and no adjustment is required.
[0072] Step 110: Use the assessment indicators of pollutants that do not meet the annual target conditions as input conditions, so that the air quality grid neural network obtains an emission reduction plan through reverse calculation.
[0073] Specifically, only use the qualified values of unqualified indicators as input and then perform reverse calculation.
[0074] Among them, the total amount of emissions reduction required is obtained through reverse calculation, and then averaged to each quarter / month / day, and finally the desired emission reduction plan is obtained.
[0075] Now, the technical solution of the present invention will be further described in combination with specific usage scenarios:
[0076] Obtain the pollution source emission inventory: The historical atmospheric pollution source emission inventory and the change amount of the future atmospheric pollution source emission inventory that match the air quality, including emissions of PM 2.5 、PM 10 、SO2、NO x 、O3、CO、NH3、VOCs, etc.
[0077] Obtain meteorological conditions: The historical meteorological field, the predicted meteorological field for the next year, and the accurate predicted meteorological field for the next 7 days. The meteorological field includes the wind field, temperature field, humidity field, mixing layer height, and solar radiation field, etc.
[0078] Obtain air quality monitoring data: Historical air quality monitoring data (PM 2.5 、PM 10 、SO2、NO x 、O3、CO).
[0079] Air quality simulation data: Use the air quality model to simulate the concentration of each pollutant.
[0080] Construct an air quality prediction neural network in the manner of steps 101 - 104.
[0081] Based on the atmospheric pollution source emission inventory and the historical meteorological field, simulate the ambient air quality through the air quality model. Taking the ambient air quality monitoring data as the benchmark, calibrate the simulation results of the air quality model through the air quality prediction neural network, and establish the correlation between the simulation results and the monitoring data. At the same time, establish a historical database based on historical meteorology, emission inventory, and ambient air quality.
[0082] According to the annual air pollution source emission inventory and the emission reduction work plan for the next year, use the air quality model to simulate and predict the daily ambient air quality for the next year (Steps 105, 106, 107, 108), and conduct predictions through the air quality prediction neural network, analyze whether the air quality meets the requirements of the urban air quality improvement target. If it cannot be met and the urban air quality improvement work needs to be adjusted, then execute Step 110, and adjust the urban air quality emission reduction work according to the results of each grid data output by the air quality grid neural network.
[0083] The present invention analyzes the cumulative impact of the daily air quality concentrations that have occurred within a year on the urban air quality improvement target, combines the adjacent predicted and forecast meteorological fields, the future predicted and forecast meteorological fields, the pollution source emission contributions, and the emission reduction work, uses the air quality prediction neural network to predict the future air quality concentrations, and corrects the prediction results through the air quality prediction neural network, and determines whether it meets the requirements of the urban air quality improvement target. If it cannot be met, use the assessment indicators of the pollutants that do not meet the annual target conditions as the input conditions, so that the air quality grid neural network obtains the emission reduction plan through reverse calculation and adjusts the arrangement of the urban air quality improvement work.
[0084] The embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting urban air quality based on a neural network, characterized in that The method includes: The air quality grid neural network consists of a ResNet network. Using the geographical locations of national control stations, a map is created as the input of the ResNet and mapped into an air quality map covering the entire regional grid. This network is trained using the real-time monitoring data of pollutants at national control points and air quality simulation data. Specifically, the air quality simulation data required for the established mapping is divided by grid, and the real-time monitoring data is based on the actual geographical locations of the stations; The two-dimensional convolutional unit fills the historical meteorological data and air quality simulation data in the past 5 years and then extracts features to obtain feature historical meteorological data and feature simulation data; Input the historical meteorological data with features and the simulated data with features into a long short-term memory network, and the long short-term memory network outputs a calculation result after the affine transformation of each of the forget gate and the input gate; the long short-term memory network has two layers, and there is a forgetting layer between the two layers of the long short-term memory network. The forgetting layer is used to longitudinally ignore some of the feature data of the previous layer of the long short-term memory network at the same moment, and the data after forgetting is used as the input of the next layer of the long short-term memory network to obtain the calculation result. Specifically, the input of the next layer of the long short-term memory network is iterated in combination with the result of the current hidden state data to output a qualified air quality prediction value, including; among them, the data after forgetting is used as the longitudinal input data of the next layer of the long short-term memory network. Specifically, after the memory unit of the first layer of LSTM passes through the longitudinal dropout layer, the lateral input data of the corresponding memory unit of the next layer of LSTM is still the predicted data at adjacent times, and the longitudinal input data of this memory unit is partial feature data x after selectively deleting some feature data t The lateral iteration between the same LSTM layers is normal to maintain the continuity of the data; The calculation results are input into the air quality grid neural network, and the concentration values of various pollutants and the air quality index for each day in the next year are output; Input the annual target conditions into the air quality grid neural network. If the output result of the air quality grid neural network meets the annual target conditions, the process ends. Otherwise, use the assessment indicators of the pollutants that do not meet the annual target conditions as the input conditions, so that the air quality grid neural network obtains the total amount of emissions reduction through reverse calculation, and thus obtains an emission reduction plan. Each pollutant in the target includes PM 2.5 and PM 10 , SO2, NO x , the hourly values of O3 and CO; the numerical values of each pollutant in the annual target are input into the air quality grid neural network to obtain the indicators of each pollutant that should be output in the target year; when at least one of the pollutant indicators that should be output in the target year is unqualified, obtain the qualified indicator data corresponding to the unqualified pollutant indicator; use the qualified indicator data as the input conditions of the air quality grid neural network, so that the air quality grid neural network obtains an emission reduction plan through reverse calculation.
2. The method according to claim 1, wherein The long short-term memory network outputs calculation results through the affine transformations of the forget gate and the input gate respectively, including: The hidden state data result h output by the first-layer LSTM at time t t : Affine transformation of the forget gate: f t = σ(x t W x (f) + h t-1 W h (f) + b (f) ); Affine transformation of the input gate: i t = σ(x t W x (i) + h t-1 W h (i) + b (i) ); Affine transformation of the output gate: o t = σ(x t W x (o) + h t-1 W h (o) + b (o) ); Affine transformation c of the memory cell t = f t * c t-1 + g t * i t ; Hidden state data: h t = o t *tanh(c t ); t represents the t-th moment, t - 1 is the previous hour, and t + 1 is the next hour; h t represents the hidden state output by the LSTM layer at the t-th moment, including past information; Combining the current hidden state data result with the affine transformation of the input gate at the next moment for calculation, and outputting the affine transformation of the output gate at the next moment, so as to obtain a new memory unit: The affine transformation of the updated and iterated memory unit is: g t =tanh(x t W x (g) +h t-1 W h (g) +b (g) ), where W x (g) represents the weight of the input x t when calculating the new memory unit g t . Similarly, W h (g) represents the weight of the state h t-1 at the previous time step t - 1; For two adjacent units in the same layer of LSTM: o t is the output gate, which is used to adjust the importance of the hidden state at the next moment t+1. Here, σ() represents the sigmoid function; the input x t has an input gate with the current input weight W x (o) , and the hidden state data h at the previous moment t-1 has a hidden state output weight W h (o) . Pass the sum of the matrix product of W x (o) , the matrix product of W h (o) , and the bias b (o) to the sigmoid function. The result is the output o of the output gate. Finally, take the product of this o and the corresponding elements of tanh(c t ) as the hidden state data h at time t t Output; f is the forget gate, with input x t has input weight W x (f) , and the hidden state data h from the previous moment t-1 has hidden state weight W h (f) ; Pass the sum of the matrix products of W x (f) , W h (f) and the bias b (f) to the sigmoid function, thereby obtaining the output f of the output gate; New memory cell g t adds new information to the memory cell at the previous moment by adding the new information g at this moment t to c at the previous moment t-1 to form a new memory cell; wherein the input of the new memory cell includes the hidden state data at the previous moment and the feature extraction data at this moment, and the feature extraction data includes the predicted data and the monitoring data output by the long short-term memory network unit at the previous moment, and the monitoring data includes meteorological data; i is the input gate, and the value of the input gate is between 0 and 1. When the value of each element of the new information g exceeds this range, the new information g to be added is discarded; Forgotten gate input weight W x (f) , hidden state weight W h (f) , input gate current input weight W x (o) , hidden state output weight W h (o) After initialization, it will be automatically updated each time during backpropagation. When the result calculated using the aforementioned formula is compared with the actual value, the error is backpropagated to recalculate the output. Further, the input weight of the current input of the output gate, the input weight of the previous moment of the output gate, the input weight of the current input of the input gate, and the input weight of the current input of the input gate are continuously iteratively updated along with the backpropagation of the long short-term memory network; wherein the affine transformation of the forgotten gate, the input gate, and the output gate are all between 0 and 1.
3. The method according to claim 1, characterized in that The air quality data within the past 5 years includes hourly values of PM 2.5 , PM 10 , SO2, NO x , O3, CO, wind speed, air pressure, air temperature, relative humidity, and hourly values of the mixing layer height.
4. The method according to claim 3, characterized in that, After filling the missing values in the air quality data with the mean value, zero-one mean normalization is performed. Before the processed data is input into the long short-term memory network, a convolutional layer with a size of 3x3, a stride of 1, and a padding amplitude of 1 is added.
Citation Information
Patent Citations
CNN and LSTM fused neural network-based air PM2.5 concentration prediction method
CN108009674A