PM2.5 and ozone concentration prediction method and device and storage medium
By constructing a correlation matrix and a multi-site adjacency matrix, and combining the PM2.5 and ozone concentration prediction model with temporal and spatial characteristics, the problem of low prediction accuracy in existing technologies is solved, and a more accurate prediction of air pollutant concentrations is achieved.
Patent Information
- Application Number
- CN202510691452.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-09-16
AI Technical Summary
Existing PM2.5 and ozone concentration prediction models have the problem of low prediction accuracy, especially data-driven machine learning models that are difficult to meet real-time prediction needs.
By obtaining monitoring data from multiple PM2.5 and ozone monitoring sites and performing data preprocessing, a correlation matrix and a multi-site adjacency matrix are constructed. By combining temporal and spatial features, an improved PM2.5 and ozone concentration prediction model is used for prediction. The model includes a time embedding module, a spatial embedding module, a feature extraction module, and a feature fusion module.
The accuracy of PM2.5 and ozone concentration prediction results has been improved, with regional representativeness, taking into account temporal changes and spatial propagation, thus enhancing the accuracy of the prediction.
Smart Images

Figure CN120654873A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of particulate matter concentration prediction, and in particular to a PM2.5 and ozone concentration prediction method, device and storage medium. Background Art
[0002] PM2.5 and ozone are two major atmospheric pollutants that have a significant impact on air quality and human health. PM2.5 refers to particles in ambient air with an aerodynamic equivalent diameter of 2.5 microns or less, also known as fine particulate matter. These particles can remain suspended in the air for extended periods. Excessive PM2.5 concentrations can lead to decreased air quality, reduced visibility, and the formation of smog. Furthermore, due to their small size, PM2.5 particles can penetrate deep into the human respiratory system and even enter the bloodstream, causing respiratory and cardiovascular diseases, posing a serious threat to human health. Ozone, an allotrope of oxygen, is a molecule composed of three oxygen atoms. It irritates the human respiratory tract, inhibits plant photosynthesis, and contributes to the formation of secondary particulate matter (such as nitrates), exacerbating PM2.5 pollution. Therefore, accurate predictions of PM2.5 and ozone concentration distributions are necessary to inform air quality management and pollution prevention and control.
[0003] Currently, PM2.5 and ozone concentration prediction models are primarily divided into two categories: numerical models based on physicochemical mechanisms and data-driven machine learning models. Numerical models based on physicochemical mechanisms, such as WRF-Chem (Weather Research and Forecasting model coupled with Chemistry) and CMAQ (Community Multiscale Air Quality Model), simulate atmospheric physicochemical processes to predict PM2.5 and ozone concentrations, effectively reflecting the generation and transport mechanisms of pollutants. However, these numerical models are computationally complex and rely heavily on the accuracy of input data (such as emission inventories and meteorological data), making them difficult to meet the demands of real-time prediction. In contrast, data-driven machine learning models, such as neural networks, support vector machines, and random forests, offer greater flexibility and computational efficiency by mining patterns in historical data for prediction. However, current PM2.5 and ozone concentration prediction schemes based on data-driven machine learning models suffer from low prediction accuracy.
[0004] Based on this, how to improve the accuracy of PM2.5 and ozone concentration prediction results has become a technical problem that needs to be solved urgently. Summary of the Invention
[0005] In view of this, in order to solve the above technical problems, the present invention provides a PM2.5 and ozone concentration prediction method, device and storage medium.
[0006] The present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a method for predicting PM2.5 and ozone concentrations, comprising:
[0008] Obtaining first monitoring data collected by a first PM2.5 and ozone monitoring station within a preset historical time period;
[0009] Obtaining second monitoring data collected by multiple second PM2.5 and ozone monitoring stations within the preset historical time period;
[0010] performing data preprocessing on the first monitoring data and the second monitoring data to obtain preprocessed monitoring data;
[0011] For each target indicator, using the preprocessed monitoring data, calculate the Pearson correlation coefficient of each two PM2.5 and ozone monitoring stations with respect to the target indicator, and construct a correlation matrix using all the Pearson correlation coefficients; the target indicator is an overlap index between the first monitoring data and the second monitoring data;
[0012] constructing a multi-site adjacency matrix based on the preprocessed monitoring data;
[0013] The preprocessed monitoring data, the correlation matrix and the multi-site adjacency matrix are input into a preset PM2.5 and ozone concentration prediction model to obtain PM2.5 and ozone concentration prediction results output by the PM2.5 and ozone concentration prediction model; wherein the PM2.5 and ozone concentration prediction model uses the preprocessed monitoring data and the correlation matrix to extract time features, extracts spatial features based on the preprocessed monitoring data and the multi-site adjacency matrix, and predicts the PM2.5 and ozone concentration prediction results based on the time features and the spatial features.
[0014] Optionally, the PM2.5 and ozone concentration prediction model includes: a time embedding module, a space embedding module, a time feature extraction module, a space feature extraction module, a feature fusion module and a fully connected layer;
[0015] The time embedding module specifically adopts GRU, which is used to splice the pre-processed monitoring data and the correlation matrix to obtain first input data, and send the first input data to the time feature extraction module;
[0016] The spatial embedding module specifically adopts CNN, which is used to splice the pre-processed monitoring data and the multi-site adjacency matrix to obtain second input data, and send the second input data to the spatial feature extraction module;
[0017] The temporal feature extraction module specifically adopts BiGRU, which is used to extract temporal features from the first input data and send them to the feature fusion module;
[0018] The spatial feature extraction module specifically adopts an improved ResNet, which is used to extract spatial features from the second input data and send them to the feature fusion module;
[0019] The feature fusion module includes a first feature fusion submodule and a second feature fusion submodule. The first feature fusion submodule is used to use a dynamic weighted fusion method to perform a preliminary fusion of the temporal features and the spatial features to obtain a preliminary fusion feature, and send it to the second feature fusion submodule. The second feature fusion submodule is used to use a multi-head attention mechanism to further fuse the preliminary fusion feature to obtain a multi-dimensional feature representation, and send the multi-dimensional feature representation to the fully connected layer.
[0020] The fully connected layer is used to generate the PM2.5 and ozone concentration prediction results based on the multidimensional feature representation and output them.
[0021] Optionally, the improved ResNet includes multiple residual blocks;
[0022] The residual block includes two convolutional layers and a shortcut connection;
[0023] A spatial attention mechanism is introduced into the convolutional layer to enhance the ability to capture the spatial distribution characteristics of PM2.5 and ozone concentrations;
[0024] The shortcut connection is used for gradient propagation and fusion of spatial features.
[0025] Optionally, the first monitoring data includes concentration data of six standard air pollutants, meteorological data, and concentration data of multiple chemical components; the Pearson correlation coefficient between each of the multiple chemical components and PM2.5 concentration is greater than a preset coefficient threshold;
[0026] The second monitoring data includes concentration data of six standard air pollutants and meteorological data.
[0027] Optionally, the preset coefficient threshold is equal to 0.6;
[0028] The multiple chemical components include OC and EC.
[0029] Optionally, constructing a multi-site adjacency matrix based on the preprocessed monitoring data specifically includes:
[0030] Based on the geographic location data of each PM2.5 and ozone monitoring station, a geographic distance adjacency matrix was constructed;
[0031] Based on the normalized meteorological data, the meteorological condition adjacency matrix is constructed;
[0032] Based on the normalized concentration data of six standard air pollutants and meteorological data, a historical concentration correlation adjacency matrix was constructed;
[0033] Based on the external pollution source data, an external pollution source isolation matrix is constructed;
[0034] The geographical distance adjacency matrix, the meteorological condition adjacency matrix, the historical concentration correlation adjacency matrix and the external pollution source isolation matrix are integrated to obtain the multi-site adjacency matrix.
[0035] Optionally, fusing the geographic distance adjacency matrix, the meteorological condition adjacency matrix, the historical concentration correlation adjacency matrix, and the external pollution source isolation matrix to obtain the multi-site adjacency matrix specifically includes:
[0036] The multi-site adjacency matrix is obtained by adopting an element-by-element product fusion method and a dual-path compensation mechanism to fuse the geographic distance adjacency matrix, the meteorological condition adjacency matrix, the historical concentration correlation adjacency matrix and the external pollution source isolation matrix.
[0037] Optionally, performing data preprocessing on the first monitoring data and the second monitoring data specifically includes:
[0038] Identifying outliers in the first monitoring data and the second monitoring data using an isolation forest algorithm;
[0039] The outliers are defined as missing values, and the missing values are filled using a multiple imputation algorithm;
[0040] The first monitoring data and the second monitoring data after filling in the missing values are subjected to data normalization processing, including performing data normalization processing on each indicator and timestamp.
[0041] In a second aspect, the present invention further provides a PM2.5 and ozone concentration prediction device, which is applied to the PM2.5 and ozone concentration prediction method described above, and the PM2.5 and ozone concentration prediction device comprises:
[0042] A first acquisition module is used to obtain first monitoring data collected by a first PM2.5 and ozone monitoring station within a preset historical time period;
[0043] A second acquisition module is used to obtain second monitoring data collected by multiple second PM2.5 and ozone monitoring stations within the preset historical time period;
[0044] a preprocessing module, configured to perform data preprocessing on the first monitoring data and the second monitoring data to obtain preprocessed monitoring data;
[0045] A first construction module is configured to calculate, for each target indicator, the Pearson correlation coefficient between each pair of PM2.5 and ozone monitoring stations with respect to the target indicator using the preprocessed monitoring data, and construct a correlation matrix using all the Pearson correlation coefficients; the target indicator being an overlap index between the first monitoring data and the second monitoring data;
[0046] A second construction module is used to construct a multi-site adjacency matrix based on the preprocessed monitoring data;
[0047] A prediction module is used to input the preprocessed monitoring data, the correlation matrix and the multi-site adjacency matrix into a preset PM2.5 and ozone concentration prediction model to obtain PM2.5 and ozone concentration prediction results output by the PM2.5 and ozone concentration prediction model; wherein the PM2.5 and ozone concentration prediction model uses the preprocessed monitoring data and the correlation matrix to extract time features, extracts spatial features based on the preprocessed monitoring data and the multi-site adjacency matrix, and predicts the PM2.5 and ozone concentration prediction results based on the time features and the spatial features.
[0048] In a third aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements the various steps in the PM2.5 and ozone concentration prediction method as described above.
[0049] The present invention adopts the above technical solution, a PM2.5 and ozone concentration prediction method, comprising: obtaining first monitoring data collected by a first PM2.5 and ozone monitoring station within a preset historical time period; obtaining second monitoring data collected by multiple second PM2.5 and ozone monitoring stations within a preset historical time period; performing data preprocessing on the first monitoring data and the second monitoring data to obtain preprocessed monitoring data; for each target indicator, using the preprocessed monitoring data, calculating the Pearson correlation coefficient of each two PM2.5 and ozone monitoring stations with respect to the target indicator, and using all Pearson correlation coefficients to construct a correlation matrix; the target indicator is The method includes: determining an overlap index between the first monitoring data and the second monitoring data; constructing a multi-site adjacency matrix based on the preprocessed monitoring data; inputting the preprocessed monitoring data, the correlation matrix, and the multi-site adjacency matrix into a preset PM2.5 and ozone concentration prediction model to obtain PM2.5 and ozone concentration prediction results output by the PM2.5 and ozone concentration prediction model; wherein the PM2.5 and ozone concentration prediction model extracts temporal features using the preprocessed monitoring data and the correlation matrix, extracts spatial features based on the preprocessed monitoring data and the multi-site adjacency matrix, and predicts PM2.5 and ozone concentration prediction results based on the temporal and spatial features. The PM2.5 and ozone concentration prediction results include the PM2.5 concentration and ozone concentration in the prediction area within a preset future time period.
[0050] Based on this, by using the monitoring data of multiple PM2.5 and ozone monitoring stations for prediction, the prediction data of the present invention has regional representativeness, thereby improving the accuracy of the PM2.5 and ozone concentration prediction results; and, in the prediction process, the time characteristics and spatial characteristics are extracted respectively, so that the present application takes into account the impact of time changes on PM2.5 and ozone concentrations, as well as the propagation and dispersion of PM2.5 and ozone in space, further improving the accuracy of the PM2.5 and ozone concentration prediction results; and, constructing a correlation matrix that can quantify the similarity between station monitoring data, using the correlation matrix to enhance the extraction of time features, and constructing a multi-site adjacency matrix, using the multi-site adjacency matrix to enhance the extraction of spatial features, which further improves the accuracy of the PM2.5 and ozone concentration prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0052] Figure 15 and ozone concentration prediction method according to an embodiment of the present invention;
[0053] Figure 2 Schematic diagram of a PM2.5 and ozone concentration prediction model provided by an embodiment of the present invention;
[0054] Figure 3 Schematic diagram of a residual block design provided by an embodiment of the present invention;
[0055] Figure 4 This is the overall result of an improved ResNet module provided by an embodiment of the present invention;
[0056] Figure 5 Schematic diagram of the neural network architecture of the first feature fusion submodule provided in an embodiment of the present invention;
[0057] Figure 6 Schematic diagram of the working principle of the multi-head attention mechanism provided by an embodiment of the present invention;
[0058] Figure 7 It is a structural schematic diagram of a PM2.5 and ozone concentration prediction device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] To make the objectives, technical solutions, and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other implementations obtained by those of ordinary skill in the art without inventive effort are within the scope of protection of the present invention.
[0060] Figure 1 FIG. 1 is a flow chart of a PM2.5 and ozone concentration prediction method provided by an embodiment of the present invention. Figure 1 As shown, this process includes:
[0061] Step 101: Obtain first monitoring data collected by a first PM2.5 and ozone monitoring station within a preset historical time period.
[0062] Specifically, the first monitoring data may include concentration data of six standard air pollutants, including PM2.5, PM10, NO2, SO2, O3 (ozone), and CO, meteorological data, and concentration data of multiple chemical components. The six standard air pollutants include PM2.5, PM10, NO2, SO2, O3 (ozone), and CO, and the meteorological data includes relative humidity, wind speed, and temperature.
[0063] And, the Pearson correlation coefficient between each chemical component in the plurality of chemical components and PM2.5 concentration is greater than a preset coefficient threshold. In a specific example, the preset coefficient threshold may be equal to 0.6. In this case, the plurality of chemical components include OC and EC.
[0064] The present invention enriches the prediction data by additionally using multiple chemical components whose Pearson correlation coefficients with PM2.5 concentration are all greater than a preset coefficient threshold, thereby further improving the accuracy of the prediction results.
[0065] Step 102: Obtain second monitoring data collected by multiple second PM2.5 and ozone monitoring stations within a preset historical time period.
[0066] Specifically, the second monitoring data includes concentration data for six standard air pollutants and meteorological data. In other words, the difference between the second PM2.5 and ozone monitoring station and the first PM2.5 and ozone monitoring station is that the first PM2.5 and ozone monitoring station also collects concentration data for multiple chemical components.
[0067] Also, the number of the first PM2.5 and ozone monitoring station is one, and the number of the second PM2.5 and ozone monitoring stations is multiple.
[0068] In addition, the data collection frequency of the first monitoring data and the second monitoring data may be once every hour, and the preset historical time period may be nearly one year or nearly one month, etc.
[0069] Step 103: performing data preprocessing on the first monitoring data and the second monitoring data to obtain preprocessed monitoring data.
[0070] In the embodiment of the present invention, data preprocessing is performed on the first monitoring data and the second monitoring data, which may specifically include:
[0071] (1) Using the IF (Isolation Forest) algorithm to identify outliers in the first monitoring data and the second monitoring data.
[0072] Specifically, the isolation forest algorithm does not require pre-labeled training samples, so that the present application can simplify the training process of the PM2.5 and ozone concentration prediction model. In addition, the isolation forest algorithm is robust to high-dimensional data, so that the present invention is also robust to high-dimensional data.
[0073] (2) Outliers are defined as missing values, and the missing values are filled using a multiple imputation algorithm.
[0074] Specifically, after outliers are identified using the Isolation Forest algorithm, they are marked as missing values. The missing values are then filled using the Multiple Imputation (MI) algorithm. The MI algorithm generates multiple, reasonable imputation datasets to reflect the uncertainty of missing values, thereby improving the accuracy and reliability of the estimate.
[0075] (3) Performing data normalization on the first monitoring data and the second monitoring data after filling in the missing values, including performing data normalization on each indicator and timestamp.
[0076] Specifically, for each indicator in the concentration data of six standard air pollutants, meteorological data, and concentration data of multiple chemical components, the following normalization formula is used for normalization:
[0077]
[0078] Among them, Y is the normalized value; X i is the i-th value of the X index in the original data (i.e., the first monitoring data obtained in step 101 and the second monitoring data obtained in step 102), where the X index is PM2.5, PM10, NO2, SO2, O3, CO, relative humidity, wind speed, temperature, Either OC or EC; min(x) is the minimum value of the X index in the original data; max(x) is the maximum value of the X index in the original data.
[0079] Furthermore, the present invention can use the Informer (Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting) model to normalize timestamps. Specifically, target time features are extracted from the original timestamp. The target time features may include year, month, day, hour, minute, and second. Then, the extracted target time features are converted into numerical form, and the numerical target time features are normalized and scaled to a fixed range, for example, [0, 1], so as to be consistent with other input features of the model.
[0080] It should be noted that the first monitoring data and the second monitoring data may include a timestamp, and the timestamp is composed of each data collection time in a preset historical time period.
[0081] Step 104: For each target indicator, use the preprocessed monitoring data to calculate the Pearson correlation coefficient of each two PM2.5 and ozone monitoring stations with respect to the target indicator, and use all Pearson correlation coefficients to construct a correlation matrix; the target indicator is the overlap index between the first monitoring data and the second monitoring data.
[0082] Specifically, when the first monitoring data includes concentration data of six standard air pollutants, meteorological data and concentration data of multiple chemical components, and the second monitoring data includes concentration data of six standard air pollutants and meteorological data, the target indicators include PM2.5, PM10, NO2, SO2, O3, CO, relative humidity, wind speed and temperature.
[0083] The Pearson correlation coefficient is a statistical measure used to quantify the strength and direction of the linear correlation between two random variables. Due to differences in the location, meteorological conditions, pollutant emission levels, and diffusion conditions of different PM2.5 and ozone monitoring sites, the degree of correlation between monitoring data from different sites can also vary. By analyzing the Pearson correlation coefficient between monitoring data from each site, the degree of similarity between the monitoring data from each site can be quantified. If the Pearson correlation coefficient for a target indicator between two PM2.5 and ozone monitoring sites is close to 1, it indicates that the target indicator has a strong positive correlation between the two PM2.5 and ozone monitoring sites. If the Pearson correlation coefficient for a target indicator between two PM2.5 and ozone monitoring sites is close to 0, it indicates that the target indicator has no significant correlation between the two PM2.5 and ozone monitoring sites. If the Pearson correlation coefficient for a target indicator between two PM2.5 and ozone monitoring sites is close to -1, it indicates that the target indicator has a strong negative correlation between the two PM2.5 and ozone monitoring sites.
[0084] The calculation formula of Pearson's correlation coefficient r is as follows:
[0085]
[0086] Among them, r (I,J) is the Pearson correlation coefficient between the PM2.5 and ozone monitoring station I and the PM2.5 and ozone monitoring station J regarding the current target indicators; n 采 The number of collections of the current target indicator; I i is the i-th value of the current target indicator for the i-th PM2.5 and ozone monitoring station; 均 is the average value of the current target index for PM2.5 and ozone monitoring station I; i is the i-th value of the current target indicator for the J-th PM2.5 and ozone monitoring station; 均is the average value of the current target indicators for PM2.5 and ozone monitoring station J.
[0087] Step 105: Construct a multi-site adjacency matrix based on the preprocessed monitoring data.
[0088] In an embodiment of the present invention, a multi-site adjacency matrix is constructed based on the pre-processed monitoring data, which may specifically include:
[0089] (1) Based on the geographic location data of each PM2.5 and ozone monitoring station, a geographic distance adjacency matrix is constructed.
[0090] Specifically, the closer the distance between sites, the stronger the mutual influence between them. In order to reduce the interference of noise on the prediction results, a distance threshold A should be set. ij , in order to screen the sites. When the distance between sites exceeds this threshold, set the attenuation factor α and then calculate it, that is:
[0091]
[0092] Among them, A dist (I, J) is the distance weight between the I-th PM2.5 and ozone monitoring station and the J-th PM2.5 and ozone monitoring station, that is, the geographic distance adjacency matrix; d IJ is the geographical distance between the Ith PM2.5 and ozone monitoring station and the Jth PM2.5 and ozone monitoring station; σ is the bandwidth parameter that controls the attenuation rate; σ 2 local is the variance of the local distance, which is used to adjust the local sensitivity of the distance weight; σ 2 region is the variance of the regional distance, which is used to adjust the regional sensitivity of the distance weight. And the distance threshold A IJ It can be equal to the average distance between all PM2.5 and ozone monitoring stations. The value of α can be 0.5.
[0093] It should be noted that the distance between the second PM2.5 and ozone monitoring station and the first PM2.5 and ozone monitoring station is less than or equal to the distance threshold A. ij When the distance between the two sites is the local distance, on the contrary, the distance between the second PM2.5 and ozone monitoring site and the first PM2.5 and ozone monitoring site is greater than the distance threshold A ij When , the distance between the two sites is the regional distance.
[0094] and, d IJSpecifically, the Euclidean distance between the 1st PM2.5 and ozone monitoring station and the Jth PM2.5 and ozone monitoring station is calculated based on the longitude, latitude and altitude of the two stations using the Euclidean calculation formula. The specific calculation formula is as follows:
[0095]
[0096] Among them, I 经 is the longitude of the first PM2.5 and ozone monitoring station, J 经 is the longitude of the Jth PM2.5 and ozone monitoring station, I 纬 is the latitude of the first PM2.5 and ozone monitoring station, J 纬 is the latitude of the Jth PM2.5 and ozone monitoring station, I 高 is the height of the first PM2.5 and ozone monitoring station, J 高 is the height of the Jth PM2.5 and ozone monitoring station.
[0097] (2) Based on the normalized meteorological data, a meteorological condition adjacency matrix is constructed.
[0098] Specifically, relative humidity and temperature can be judged based on the correlation coefficients of different sites. The correlation between relative humidity and temperature is mainly related to the environment of the monitoring point. For wind direction and wind speed, the driving effect of wind direction and wind speed on pollutant transmission should be captured. The specific calculation formula is as follows:
[0099]
[0100] Among them, A wind (I, J) is the wind influence at the I-th PM2.5 and ozone monitoring station and the J-th PM2.5 and ozone monitoring station, that is, the meteorological condition adjacency matrix; the I-th PM2.5 and ozone monitoring station is the target monitoring station, and the J-th PM2.5 and ozone monitoring station is the other monitoring station except the target station, among which the target monitoring station is the monitoring station closest to the prediction area; θ IJ is the wind direction angle from the Ith PM2.5 and ozone monitoring station to the Jth PM2.5 and ozone monitoring station. This angle is used to calculate the directionality of the wind direction between the two monitoring stations; ωI J is the wind direction component of the wind speed from the Ith PM2.5 and ozone monitoring station to the Jth PM2.5 and ozone monitoring station, reflecting the magnitude of the wind speed in a specific direction; max(ω) ... J The maximum value in is used to convert ωI J Perform normalization processing.
[0101] The significance of formula (5) is that cos(θIJ ) is used to consider the directionality of the wind direction between the first PM2.5 and ozone monitoring station and the Jth PM2.5 and ozone monitoring station; It is used to express the intensity and to obtain the comparability of wind speed between different monitoring stations by normalizing the wind speed components.
[0102] (3) Based on the normalized concentration data of six standard air pollutants and meteorological data, a historical concentration correlation adjacency matrix was constructed.
[0103] Specifically, the historical concentration correlation adjacency matrix can directly reflect the correlation between PM2.5 and ozone concentrations at different monitoring sites. It can be calculated using the following formula:
[0104]
[0105] Among them, A corr (I, J) is the correlation coefficient between the I-th PM2.5 and ozone monitoring station and the J-th PM2.5 and ozone monitoring station, that is, the historical concentration correlation adjacency matrix; is the variable N I With variable N J The covariance between is the variable N I The standard deviation of is the variable N J The standard deviation of N I is the concentration value of PM2.5 or ozone collected by the first PM2.5 and ozone monitoring station at a certain time, N J is the concentration value of the same indicator collected at the J-th PM2.5 and ozone monitoring station at the same time. It should be noted that the present invention constructs a historical concentration correlation adjacency matrix for both PM2.5 and ozone indicators.
[0106] (4) Based on the external pollution source data, construct an external pollution source isolation matrix.
[0107] Specifically, by constructing a dynamically adjustable adjacency matrix, we quantify the degree of interference of external pollution sources on the correlation of monitoring sites, and actively suppress the impact of non-local pollution transmission during the spatial feature fusion stage. The calculation formula is as follows:
[0108]
[0109] Among them, φ(I,J 污 ) is the first PM2.5 and ozone monitoring station and pollution source J 污 the degree of interference between For the first PM2.5 and ozone monitoring station to the pollution source J 污The angle between the line connecting the two and the real-time wind direction; is the wind speed from the PM2.5 and ozone monitoring station I to the pollution source J 污 The component in the direction of , in m / s; σ θ v is the angle sensitivity parameter, which controls the sensitivity of the angle to the attenuation factor. The smaller the value, the more significant the effect of angle change on attenuation. avg is the average wind speed in the target historical time period; k is the attenuation coefficient, which is less than 1; For the first PM2.5 and ozone monitoring station and pollution source J 污 The Euclidean distance between thr It is the preset external pollution distance threshold.
[0110]
[0111] Among them, ρ(J 污 ) is the pollution source J 污 External pollution intensity value; N external (J 污 ) is the pollution source J 污 The number of pollution events that lead to the target area can be counted by HYSPLIT (Hybrid Single-Particle Lagrangian Integrated Trajectory Model); N total (J 污 ) is the pollution source J 污 The number of occurrences; d source (J 污 ) is the pollution source J 污 The distance to the nearest monitoring station; R is the pollution source J 污 The maximum impact radius is , and the contribution of pollution beyond the range can be ignored.
[0112] Combining formulas (7) and (8), we get:
[0113]
[0114] Among them, A epim (I,J 污 ) is the first PM2.5 and ozone monitoring station and pollution source J 污 The external pollution source isolation matrix elements between, that is, the external pollution source isolation matrix, is used to quantify the interference degree of external pollution sources on the monitoring station; sigmoid(ρ(J 污 )) is the sigmoid function applied to ρ(J 污 ), converting the external pollution source intensity value into a value between 0 and 1; CI is the target pollutant concentration value of the first PM2.5 and ozone monitoring station; For pollution source J 污 Target pollutant concentration value; σ c is the standard deviation of target pollutant concentrations across all PM2.5 and ozone monitoring stations and pollution sources; Used to calculate concentration gradient correction terms.
[0115] It should be noted that the target pollutant is any one of the six standard air pollutants (PM2.5, PM10, NO2, SO2, O3 and CO). The present invention constructs an external pollution source isolation matrix A for each of the six standard air pollutants. epim (I,J 污 ).
[0116] From formula (9), we can see that the external pollution source isolation matrix includes source isolation term, direction correction term and concentration gradient correction term. 污 ) is the source isolation term, φ(I,J 污 ) is the direction correction term. is the concentration gradient correction term.
[0117] (5) The geographical distance adjacency matrix, meteorological condition adjacency matrix, historical concentration correlation adjacency matrix and external pollution source isolation matrix are integrated to obtain the multi-site adjacency matrix.
[0118] Specifically, the geographic distance adjacency matrix, meteorological condition adjacency matrix, historical concentration correlation adjacency matrix, and external pollution source isolation matrix are all sub-adjacency matrices of size E*E, where E is the number of PM2.5 and ozone monitoring stations.
[0119] The present invention can specifically adopt a linear weighted fusion method or an element-by-element product fusion method to fuse the geographic distance adjacency matrix, the meteorological condition adjacency matrix, the historical concentration correlation adjacency matrix and the external pollution source isolation matrix.
[0120] Preferably, the present invention adopts an element-by-element product fusion method to fuse the geographic distance adjacency matrix, the meteorological condition adjacency matrix, the historical concentration correlation adjacency matrix, and the external pollution source isolation matrix. The element-by-element product fusion method emphasizes the synergistic effect of multiple factors, which is conducive to improving the accuracy of the fusion results. In addition, the present invention also adopts a dual-path compensation mechanism to enable the model to fully learn the spatial dependency between sites, fully extract spatial features, and improve the final prediction accuracy. The calculation formula used in this process is as follows:
[0121] A total (I,J,t)=τ·[α(t)A dist (I,J)·A wind(I,J)·A corr (I,J)]+(1-τ)·A epim (I,J 污 )......(10)
[0122] Among them, A total (I,J,t) is the PM2.5 and ozone monitoring station I and pollution source J 污 The total weight or influence factor at time t, that is, the multi-site adjacency matrix; τ is the weight factor, which is used to balance the combination of two different influences; α(t) is the time-related adjustment factor, which is used to adjust the contribution of time to the influence factor. The weights of different adjacency matrices are dynamically adjusted according to the changes in time, so that the model can better adapt to the impact of time changes.
[0123] The multi-site adjacency matrix can help the model capture the complex dependencies between sites, thereby improving prediction accuracy. The multi-site adjacency matrix can quantify the spatial relationships between sites, such as distance and direction, thereby reflecting the spatial propagation characteristics of PM2.5 and ozone concentrations.
[0124] It should be noted that when constructing a multi-site adjacency matrix, in addition to the monitoring data collected by the monitoring sites, other data that need to be used can be collected in real time, or pre-stored relevant data can be obtained.
[0125] Step 106: Input the preprocessed monitoring data, correlation matrix and multi-site adjacency matrix into the preset PM2.5 and ozone concentration prediction model to obtain the PM2.5 and ozone concentration prediction results output by the PM2.5 and ozone concentration prediction model; wherein, the PM2.5 and ozone concentration prediction model uses the preprocessed monitoring data and correlation matrix to extract time features, extracts spatial features based on the preprocessed monitoring data and the multi-site adjacency matrix, and predicts the PM2.5 and ozone concentration prediction results based on the time features and spatial features.
[0126] Figure 2 This is a schematic diagram of a PM2.5 and ozone concentration prediction model provided by an embodiment of the present invention. Figure 2 ,This PM2.5 and ozone concentration prediction model includes: time embedding module, spatial embedding module, ,time feature extraction module, spatial feature extraction module, feature fusion module and ,fully connected layer.
[0127] 1. Time Embedding Module
[0128] The time embedding module specifically adopts GRU (Gated Recurrent Unit) to concatenate the pre-processed monitoring data and the correlation matrix to obtain first input data, and sends the first input data to the time feature extraction module.
[0129] 2. Spatial Embedding Module
[0130] The spatial embedding module specifically adopts CNN (Convolutional Neural Network) to splice the pre-processed monitoring data and the multi-site adjacency matrix to obtain the second input data, and sends the second input data to the spatial feature extraction module.
[0131] 3. Temporal feature extraction module
[0132] The time feature extraction module specifically adopts BiGRU (Bidrectional Gated Recurrent Unit) to extract time features from the first input data and send them to the feature fusion module.
[0133] Based on the traditional GRU, BiGRU improves the ability to capture contextual information through a bidirectional structure, enabling it to simultaneously utilize the historical and future information of the sequence. The improved formula is as follows:
[0134] (1) Forward GRU
[0135]
[0136] (2) Backward GRU
[0137]
[0138] Among them, * is the convolution operation; W z 、W r 、W h are the weight matrices of the update gate, reset gate, and candidate state respectively; Z t The output of the update gate determines how the current information is combined with the historical information; r t To reset the output of the gate, determine how much historical information to retain; h′ t is the candidate hidden state, indicating the latest state at the current moment; is the positive hidden state at the current moment; is the hidden state vector at the previous moment; x t is the input data at the current moment; b z is the bias term of the update gate; b r is the bias term of the reset gate; tanh() is the activation function; r t is the output of the reset gate; b his the bias term of the candidate hidden state. ⊙ is the principal element multiplication operation, which is used to multiply the corresponding elements of two vectors or matrices of the same dimension to obtain a new vector or matrix of the same dimension. The backward and forward symbols have the same meaning, but the symbols have changed. Those skilled in the art can easily determine the meaning of each symbol in Formulas (15) to (18) based on the meaning of each symbol in Formulas (11) to (14), and will not be repeated here.
[0139] (3) Bidirectional output splicing
[0140]
[0141] The output of the final time step t is the concatenation of the previous and next hidden states.
[0142] The correlation matrix between different sites is used as a static feature and spliced with the temporal feature extracted by BiGRU, and the spliced features are input into the feature fusion module.
[0143] BiGRU can learn sequence features from both forward and backward directions, capture the bidirectional dependencies of sequence data, and thus improve the ability to understand sequence data and the modeling effect. This module inherits the GRU unit gating mechanism, which can better capture the long-term dependencies in sequence data and avoid the problem of gradient disappearance or explosion. In terms of parameters, the same parameters are used to process forward and backward sequence data at the same time, reducing the number of model parameters, reducing the risk of overfitting, and improving the efficiency of training and inference.
[0144] 4. Spatial feature extraction module
[0145] The spatial feature extraction module specifically adopts an improved Residual Neural Network (Residual Neural Network) to extract spatial features from the second input data and send them to the feature fusion module.
[0146] Specifically, the improved ResNet includes multiple residual blocks. Figure 3 This is a schematic diagram of a residual block design provided by an embodiment of the present invention. Figure 3 As shown in the figure, a residual block consists of two convolutional layers (weight layers) and a shortcut connection. The activation function is a function that implements nonlinearity between the input and output of a neuron. The shortcut connection solves the problem of vanishing gradients and extracts multi-scale spatial features. The improved ResNet outputs a deep feature map by stacking multiple residual blocks. t-i is the input data of the current time step or sequence position, which is the input of the residual block; H(X t-i) is the residual function, which is the sum of the outputs of the two convolutional layers and contains the feature information of the input data after two convolutions; t-i is the output of the residual block, which is the result of processing by two convolutional layers and short-circuit connection addition, and contains the spatial feature information of the input data and the original input information.
[0147] Compared to traditional ResNet, the improved ResNet of this invention introduces a spatial attention mechanism in the convolutional layer to enhance the ability to capture the spatial distribution characteristics of PM2.5 and ozone concentrations. In addition, shortcut connections are used not only for gradient propagation but also for the fusion of multi-scale spatial features.
[0148] Figure 4 This is the overall result of an improved ResNet module provided by an embodiment of the present invention. Figure 4 As shown in Figure 2, this result includes the stacking and feature fusion of multiple residual blocks. Direct mapping means passing input data directly to the output without passing through intermediate convolutional layers or other transformations. This design aims to address the vanishing and exploding gradient problems in deep networks. 7*7conv c64s2p1 represents a convolutional layer with a 7*7 convolution kernel, 64 output channels, a stride of 2, and a padding of 1. The same applies to other convolutional layers.
[0149] In the convolutional layer operation, the multi-site adjacency matrix is used as an additional channel to help the model capture the spatial dependencies between monitoring sites. Finally, the multi-site adjacency matrix is used to perform a weighted summation of the features between monitoring sites to reflect the spatial dependencies between monitoring sites. The formula is as follows:
[0150]
[0151] Among them, T I空 To improve the spatial features of the I-th PM2.5 and ozone monitoring station output by ResNet; N is the number of PM2.5 and ozone monitoring stations; W IJ is the weight of the multi-site adjacency matrix between the I-th PM2.5 and ozone monitoring site and the J-th PM2.5 and ozone monitoring site; F i常 The data for the Ith PM2.5 and ozone monitoring station in the preprocessed monitoring data.
[0152] By using the multi-site adjacency matrix as an additional input to ResNet, not only can spatial structure information be effectively introduced and feature representation be optimized, thereby enhancing the ability to extract spatial features, but the model can also adapt to complex spatial structures, reduce overfitting, and thus improve the generalization ability of the model.
[0153] The overall working principle and process of improving ResNet are as follows:
[0154] (1) Receive the second input data sent by the spatial embedding module. The shape of the second input data is [B, C+1, H, W]. The shape of the processed monitoring data (concentration data of six standard air pollutants, meteorological data, and concentration data of multiple chemical components) is [B, C, H, W], and the shape of the multi-site adjacency matrix is [B, 1, H, W]. This is specifically obtained by quantifying the correlation between each site.
[0155] Among them, B represents the batch size, that is, the number of samples processed at a time; C represents the number of original channels; C+1 represents the number of channels, that is, C original channels plus 1 additional channel; H represents the height of the feature map (pixels / grid rows); W represents the width of the feature map (pixels / grid columns).
[0156] (2) Feature extraction by residual blocks. Specifically, features are gradually extracted through multiple residual blocks. Each residual block contains a convolutional layer and a spatial attention mechanism to enhance attention to important spatial locations. The input data shape of the first convolution layer is [B, C+1, H, W]. A convolution layer with a convolution kernel of Y×Y is used to further extract deep spatial features and output data with a shape of [B, C', H, W]. The input of the spatial attention mechanism is the output of the first convolution layer. The attention weight of each spatial position is calculated through the spatial attention module, the features are weighted, the features of important spatial positions are enhanced, and the output shape is [B, C', H, W]. The second convolution layer is the output of the spatial attention mechanism. A convolution layer with a convolution kernel size of Y×Y is also used to further extract deep spatial features and output data with a shape of [B, C', H, W]. The input of the shortcut connection is the concatenated input data with a shape of [B, C+1, H, W]. A 1×1 convolution is used to adjust the input data channel from C+1 to C' so that it can be element-wise added to the output of the second convolution layer. The output shape is [B, C', H, W].
[0157] Where C' represents the number of output channels.
[0158] (3) Feature fusion. Specifically, the features extracted from different residual blocks are fused to form the final spatial feature representation. The input of this step is the output of the second convolution layer and the output of the shortcut connection, both of which have the shape of [B, C', H, W]. The two features are added element by element to form the final feature representation, which has the shape of [B, C', H, W].
[0159] (4) Output the extracted spatial features for subsequent spatiotemporal feature fusion and prediction.
[0160] 5. Feature fusion module
[0161] The feature fusion module includes a first feature fusion submodule and a second feature fusion submodule.
[0162] 5.1. The first feature fusion submodule (preliminary feature fusion)
[0163] Dynamic weighted fusion achieves flexible fusion by adaptively learning the weights of two input features (temporal and spatial features): first, each input is averaged along the sequence dimension and compressed into a global feature, which is then mapped into a scalar weight through a fully connected layer and then normalized by Softmax to obtain a dynamic weight with a sum of 1; finally, the weight is expanded to the original input dimension through dimensional broadcasting, and a weighted sum is performed, so that the fusion result can not only retain the original feature details, but also dynamically adjust the importance of each modality according to the input content. Figure 5 : is a schematic diagram of the neural network architecture of the first feature fusion submodule provided in an embodiment of the present invention. Figure 5 As shown in the figure, from top to bottom they are: input layer, feature extraction layer, fully connected layer, feature fusion and classification layer, and final fusion layer (Fusion).
[0164] Among them, in the input layer, X temporal represents time series data; X spatial Represents spatial data.
[0165] In the feature extraction layer, F(·) is the feature extraction function, which can extract temporal features and spatial features respectively to obtain high-order abstract features.
[0166] FCLayer (Full Connected Layer) is used to perform further linear transformation and nonlinear activation on the extracted features to extract more abstract and discriminative features.
[0167] In the feature fusion and classification layer, the Cat function is used to concatenate the features output by the two fully connected layers, and then classify them using the Softmax function. The Softmax function maps the concatenated features to a probability distribution for multi-classification tasks. Represents the weights of the two modalities obtained by the Softmax function. These two weights reflect the importance of each modality in the final fusion; and Both represent weighting the original data according to the weights, emphasizing the more important modalities in the final fusion.
[0168] In the final fusion layer (Fusion), the weighted original data are fused to obtain the final fusion result.
[0169] 5.2. Second feature fusion submodule (further feature fusion)
[0170] A multi-head attention mechanism is adopted, and the preliminary fusion features output by the first feature fusion submodule are used as input. By parallel processing and integrating the results of multiple attention heads, the diversity of data from different angles is captured to form a multi-dimensional feature representation, which is then sent to the fully connected layer.
[0171] Specifically, the multi-head attention mechanism reduces the dimensionality of the input sequence and generates Q (Query), K (Key), and V (Value) through linear mapping. Q represents the current spatiotemporal feature of interest; K, as a feature index, stores spatiotemporal state, such as the concentration data of six standard air pollutants at each monitoring station over the past 24 hours, meteorological data, and correlation coefficients between monitoring stations; and V represents the actual feature content. Multi-head parallel processing not only greatly improves computational efficiency but also reduces dependence on sequence length. It focuses on information in different subspaces, fuses multiple features, and integrates them through a fully connected layer. Figure 6 This is a schematic diagram of the working principle of the multi-head attention mechanism provided by an embodiment of the present invention. Figure 2 and Figure 6 , the workflow of the multi-head attention mechanism is as follows:
[0172] (1) For the input sequence x1, x2, x3, ...x n Downsampling, we get vectors α1, α2, α3, ...α n , each vector is respectively associated with the weight matrix W Q 、W K and W V Multiply to generate the query vector q i , key vector k j Sum value vector v j .
[0173] (2) For each attention head, the query vector q is calculated by scaling the dot product attention i and key vector k j The dot product of i,j , and normalize the attention integral through the softmax layer to obtain the weight vector β i,j , the specific formula is as follows:
[0174] α i,j =q i ·k j ......(20)
[0175] β i,j =Softmax(α i,j )......(twenty one)
[0176] (3) The weight vector β i,j With the value vector v j Multiply and sum to get the output b of each attention head i , the specific formula is as follows:
[0177]
[0178] (3) Concatenate the outputs of multiple attention heads and generate the final multi-dimensional feature representation MultiHead(Q, K, V) through linear transformation W0:
[0179] MultiHead(Q,K,V)=Concat(head1,head2,…,head h )·W0...... (twenty three)
[0181] In the present invention, the number of attention heads is 12, that is, h=12.
[0182] The multi-head attention mechanism extracts information from different subspaces by running multiple attention mechanisms in parallel, further enhancing the expressive power of the model. The specific formula is as follows:
[0183]
[0184] Among them, Attention(Q,K,V) represents the function of the attention mechanism, which receives Q, K and V as input and outputs a weighted value; d k Represents the dimension of the key, that is, the number of elements in each vector in the key matrix K.
[0185] 6. Fully connected layer
[0186] The fully connected layer is used to generate PM2.5 and ozone concentration prediction results based on multidimensional feature representation and output them.
[0187] Specifically, the algorithm connects multiple fully connected layers through an attention mechanism, with activation functions applied after each layer. Dropout, a common regularization technique in deep learning used to reduce overfitting in neural networks, is also incorporated. The resulting output is a PM2.5 and ozone concentration forecast, which includes PM2.5 and ozone concentration values for a preset time period in the future.
[0188] In summary, the present invention makes predictions by using the monitoring data of multiple PM2.5 and ozone monitoring sites, so that the prediction data of the present invention has regional representativeness, thereby being able to improve the accuracy of PM2.5 and ozone concentration prediction results; and, in the prediction process, respectively extracting time characteristics and spatial characteristics, so that the present application takes into account the impact of time changes on PM2.5 and ozone concentrations, and the propagation and dispersion of PM2.5 and ozone in space, further improving the accuracy of PM2.5 and ozone concentration prediction results; and, constructing a correlation matrix that can quantify the similarity between site monitoring data, using the correlation matrix to enhance the extraction of time characteristics, and, constructing a multi-site adjacency matrix, using the multi-site adjacency matrix to enhance the extraction of spatial characteristics, which further improves the accuracy of PM2.5 and ozone concentration prediction results. Ultimately, deep fusion of spatiotemporal features, component features and multi-scale data is achieved, and the powerful ability of artificial intelligence in data processing and analysis is fully utilized, thereby achieving high-precision prediction of PM2.5 and ozone concentrations at different scales. This predictive capability will provide a scientific and reliable decision-making basis for air pollution control, and help build a more accurate and efficient pollution prevention and control system.
[0189] In addition, the PM2.5 and ozone concentration prediction model of the present invention integrates the advantages of ResNet, BiGRU and multi-head attention mechanism, performs temporal embedding in the GRU layer, performs spatial embedding in the CNN layer, and then feeds the embedded data to BiGRU and ResNet for analysis and processing, extracts spatiotemporal features from the data, and fuses them in the feature extraction module, so that the present invention can effectively make up for the limitations of traditional model feature extraction and fusion capabilities. And, because the PM2.5 and ozone concentration prediction model of the present invention integrates ResNet, BiGRU and multi-head attention mechanism, therefore, the PM2.5 and ozone concentration prediction model of the present invention is another name called RBG-Attention (Residual BiGRU Attention, residual connection bidirectional gated recurrent unit attention model).
[0190] The RBG-Attention model (i.e., PM2.5 and ozone concentration prediction model) designed in this paper was written and implemented using Python (version 3.8) and Pytorch (version 12.1) frameworks and trained on a GeForce RTX4090 server. An initial learning rate of 0.001 was set; the Adam (Adaptive Moment Estimation) optimizer and the mean squared error (MSE) were used as the loss function. The dataset was divided into training, validation, and test sets (with ratios of 70%, 15%, and 15%). After each epoch (training round), the model was tested on the validation set. If the validation loss decreased, the retained parameters were updated. Training ended when the stopping condition (in this paper, the validation loss did not decrease for 15 consecutive epochs) was met. To prevent overfitting, the dropout method and early stopping mechanism were used. Furthermore, Bayesian optimization was used to optimize hyperparameters, using multiple hyperparameter combinations as independent variables and the mean squared error (MSE) as the objective function to improve the model's final prediction accuracy.
[0191] In addition, the present invention can use RMSE (Root Mean Square Error), MAE (Mean Absolute Error), MAPE (Mean Absolute Percentage Error) and determination coefficient R 2 Evaluate the prediction performance of the model. The corresponding formula is as follows:
[0192]
[0193] Where m is the size of the data set (number of samples); y i is the i-th observation value (PM2.5 or ozone concentration), is the i-th predicted value (PM2.5 or ozone concentration), is the average value of the observed values, where the observed values are the true values.
[0194] It should be noted that those skilled in the art can easily understand the specific training process of the PM2.5 and ozone concentration prediction model of the present invention based on the above content, so it will not be repeated here.
[0195] Based on a general inventive concept, the present invention also provides a PM2.5 and ozone concentration prediction device. Figure 7 This is a schematic diagram of the structure of a PM2.5 and ozone concentration prediction device provided by an embodiment of the present invention. Figure 7 As shown, the device includes:
[0196] A first acquisition module 71 is configured to acquire first monitoring data collected by a first PM2.5 and ozone monitoring station within a preset historical time period;
[0197] A second acquisition module 72 is configured to acquire second monitoring data collected by multiple second PM2.5 and ozone monitoring stations within the preset historical time period;
[0198] A preprocessing module 73 is configured to perform data preprocessing on the first monitoring data and the second monitoring data to obtain preprocessed monitoring data;
[0199] A first construction module 74 is configured to calculate, for each target indicator, the Pearson correlation coefficient between each pair of PM2.5 and ozone monitoring stations with respect to the target indicator using the preprocessed monitoring data, and construct a correlation matrix using all the Pearson correlation coefficients; the target indicator being an overlap index between the first monitoring data and the second monitoring data;
[0200] A second construction module 75 is configured to construct a multi-site adjacency matrix based on the pre-processed monitoring data;
[0201] The prediction module 76 is used to input the preprocessed monitoring data, the correlation matrix and the multi-site adjacency matrix into a preset PM2.5 and ozone concentration prediction model to obtain the PM2.5 and ozone concentration prediction results output by the PM2.5 and ozone concentration prediction model; wherein the PM2.5 and ozone concentration prediction model uses the preprocessed monitoring data and the correlation matrix to extract time features, extracts spatial features based on the preprocessed monitoring data and the multi-site adjacency matrix, and predicts the PM2.5 and ozone concentration prediction results based on the time features and the spatial features.
[0202] Optionally, the PM2.5 and ozone concentration prediction model includes: a time embedding module, a space embedding module, a time feature extraction module, a space feature extraction module, a feature fusion module and a fully connected layer.
[0203] The time embedding module specifically adopts GRU to splice the preprocessed monitoring data and the correlation matrix to obtain first input data, and sends the first input data to the time feature extraction module.
[0204] The spatial embedding module specifically adopts CNN to splice the preprocessed monitoring data and the multi-site adjacency matrix to obtain second input data, and sends the second input data to the spatial feature extraction module.
[0205] The time feature extraction module specifically adopts BiGRU, which is used to extract time features from the first input data and send them to the feature fusion module.
[0206] The spatial feature extraction module specifically adopts an improved ResNet to extract spatial features from the second input data and send them to the feature fusion module.
[0207] The feature fusion module includes a first feature fusion submodule and a second feature fusion submodule. The first feature fusion submodule is used to use a dynamic weighted fusion method to preliminarily fuse the temporal features and the spatial features to obtain preliminary fusion features, and send them to the second feature fusion submodule. The second feature fusion submodule is used to use a multi-head attention mechanism to further fuse the preliminary fusion features to obtain a multi-dimensional feature representation, and send the multi-dimensional feature representation to the fully connected layer.
[0208] The fully connected layer is used to generate the PM2.5 and ozone concentration prediction results based on the multidimensional feature representation and output them.
[0209] Optionally, the improved ResNet includes multiple residual blocks.
[0210] The residual block consists of two convolutional layers and a shortcut connection.
[0211] A spatial attention mechanism is introduced into the convolutional layer to enhance the ability to capture the spatial distribution characteristics of PM2.5 and ozone concentrations.
[0212] The shortcut connection is used for gradient propagation and fusion of spatial features.
[0213] Optionally, the first monitoring data includes concentration data of six standard air pollutants, meteorological data and concentration data of multiple chemical components; the Pearson correlation coefficient between each of the multiple chemical components and the PM2.5 concentration is greater than a preset coefficient threshold.
[0214] The second monitoring data includes concentration data of six standard air pollutants and meteorological data.
[0215] Optionally, the preset coefficient threshold is equal to 0.6.
[0216] The multiple chemical components include OC and EC.
[0217] Optionally, the second building block 75 specifically includes:
[0218] The first construction unit is used to construct a geographic distance adjacency matrix based on the geographic location data of each PM2.5 and ozone monitoring station.
[0219] The second construction unit is used to construct a meteorological condition adjacency matrix based on the normalized meteorological data.
[0220] The third construction unit is used to construct a historical concentration correlation adjacency matrix based on the normalized concentration data of six standard air pollutants and meteorological data.
[0221] The fourth construction unit is used to construct an external pollution source isolation matrix based on the external pollution source data.
[0222] A fusion unit is used to fuse the geographic distance adjacency matrix, the meteorological condition adjacency matrix, the historical concentration correlation adjacency matrix and the external pollution source isolation matrix to obtain the multi-site adjacency matrix.
[0223] Optional, fusion unit, specifically used for:
[0224] The multi-site adjacency matrix is obtained by adopting an element-by-element product fusion method and a dual-path compensation mechanism to fuse the geographic distance adjacency matrix, the meteorological condition adjacency matrix, the historical concentration correlation adjacency matrix and the external pollution source isolation matrix.
[0225] Optionally, the pre-processing module 73 is specifically configured to:
[0226] (1) Using the isolation forest algorithm to identify outliers in the first monitoring data and the second monitoring data.
[0227] (2) The outliers are defined as missing values, and the missing values are filled using a multiple interpolation algorithm.
[0228] (3) performing data normalization processing on the first monitoring data and the second monitoring data after filling in the missing values, including performing data normalization processing on each indicator and time stamp.
[0229] Based on a general inventive concept, the present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the various steps in the PM2.5 and ozone concentration prediction method described above are implemented.
[0230] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0231] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" is at least two.
[0232] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.
[0233] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one or a combination of the following technologies known in the art can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0234] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.
[0235] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing module, or each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.
[0236] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0237] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0238] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A method for predicting PM2.5 and ozone concentrations, characterized in that: include: Obtaining first monitoring data collected by a first PM2.5 and ozone monitoring station within a preset historical time period; Obtaining second monitoring data collected by multiple second PM2.5 and ozone monitoring stations within the preset historical time period; performing data preprocessing on the first monitoring data and the second monitoring data to obtain preprocessed monitoring data; For each target indicator, using the preprocessed monitoring data, calculate the Pearson correlation coefficient of each two PM2.5 and ozone monitoring stations with respect to the target indicator, and construct a correlation matrix using all the Pearson correlation coefficients; the target indicator is an overlap index between the first monitoring data and the second monitoring data; constructing a multi-site adjacency matrix based on the preprocessed monitoring data; The preprocessed monitoring data, the correlation matrix and the multi-site adjacency matrix are input into a preset PM2.5 and ozone concentration prediction model to obtain PM2.5 and ozone concentration prediction results output by the PM2.5 and ozone concentration prediction model; wherein the PM2.5 and ozone concentration prediction model uses the preprocessed monitoring data and the correlation matrix to extract time features, extracts spatial features based on the preprocessed monitoring data and the multi-site adjacency matrix, and predicts the PM2.5 and ozone concentration prediction results based on the time features and the spatial features.
2. The PM2.5 and ozone concentration prediction method according to claim 1, characterized in that: The PM2.5 and ozone concentration prediction model includes: a time embedding module, a space embedding module, a time feature extraction module, a space feature extraction module, a feature fusion module and a fully connected layer; The time embedding module specifically adopts GRU, which is used to splice the pre-processed monitoring data and the correlation matrix to obtain first input data, and send the first input data to the time feature extraction module; The spatial embedding module specifically adopts CNN, which is used to splice the pre-processed monitoring data and the multi-site adjacency matrix to obtain second input data, and send the second input data to the spatial feature extraction module; The temporal feature extraction module specifically adopts BiGRU, which is used to extract temporal features from the first input data and send them to the feature fusion module; The spatial feature extraction module specifically adopts an improved ResNet, which is used to extract spatial features from the second input data and send them to the feature fusion module; The feature fusion module includes a first feature fusion submodule and a second feature fusion submodule. The first feature fusion submodule is used to use a dynamic weighted fusion method to perform a preliminary fusion of the temporal features and the spatial features to obtain a preliminary fusion feature, and send it to the second feature fusion submodule. The second feature fusion submodule is used to use a multi-head attention mechanism to further fuse the preliminary fusion feature to obtain a multi-dimensional feature representation, and send the multi-dimensional feature representation to the fully connected layer. The fully connected layer is used to generate the PM2.5 and ozone concentration prediction results based on the multidimensional feature representation and output them.
3. The PM2.5 and ozone concentration prediction method according to claim 2, characterized in that: The improved ResNet includes multiple residual blocks; The residual block includes two convolutional layers and a shortcut connection; A spatial attention mechanism is introduced into the convolutional layer to enhance the ability to capture the spatial distribution characteristics of PM2.5 and ozone concentrations; The shortcut connection is used for gradient propagation and fusion of spatial features.
4. The PM2.5 and ozone concentration prediction method according to claim 1, characterized in that: The first monitoring data includes concentration data of six standard air pollutants, meteorological data, and concentration data of multiple chemical components; the Pearson correlation coefficient between each of the multiple chemical components and PM2.5 concentration is greater than a preset coefficient threshold; The second monitoring data includes concentration data of six standard air pollutants and meteorological data.
5. The PM2.5 and ozone concentration prediction method according to claim 4, characterized in that: The preset coefficient threshold is equal to 0.6; The multiple chemical components include OC and EC.
6. The PM2.5 and ozone concentration prediction method according to claim 4, characterized in that: Based on the pre-processed monitoring data, a multi-site adjacency matrix is constructed, specifically including: Based on the geographic location data of each PM2.5 and ozone monitoring station, a geographic distance adjacency matrix was constructed; Based on the normalized meteorological data, the meteorological condition adjacency matrix is constructed; Based on the normalized concentration data of six standard air pollutants and meteorological data, a historical concentration correlation adjacency matrix was constructed; Based on the external pollution source data, an external pollution source isolation matrix is constructed; The geographical distance adjacency matrix, the meteorological condition adjacency matrix, the historical concentration correlation adjacency matrix and the external pollution source isolation matrix are integrated to obtain the multi-site adjacency matrix.
7. The PM2.5 and ozone concentration prediction method according to claim 6, characterized in that: The multi-site adjacency matrix is obtained by fusing the geographic distance adjacency matrix, the meteorological condition adjacency matrix, the historical concentration correlation adjacency matrix, and the external pollution source isolation matrix, specifically including: The multi-site adjacency matrix is obtained by adopting an element-by-element product fusion method and a dual-path compensation mechanism to fuse the geographic distance adjacency matrix, the meteorological condition adjacency matrix, the historical concentration correlation adjacency matrix and the external pollution source isolation matrix.
8. The PM2.5 and ozone concentration prediction method according to claim 1, characterized in that: Performing data preprocessing on the first monitoring data and the second monitoring data specifically includes: Identifying outliers in the first monitoring data and the second monitoring data using an isolation forest algorithm; The outliers are defined as missing values, and the missing values are filled using a multiple imputation algorithm; The first monitoring data and the second monitoring data after filling in the missing values are subjected to data normalization processing, including performing data normalization processing on each indicator and timestamp.
9. A PM2.5 and ozone concentration prediction device, characterized in that: Applied to the PM2.5 and ozone concentration prediction method according to any one of claims 1 to 8, the PM2.5 and ozone concentration prediction device comprises: A first acquisition module is used to obtain first monitoring data collected by a first PM2.5 and ozone monitoring station within a preset historical time period; A second acquisition module is used to obtain second monitoring data collected by multiple second PM2.5 and ozone monitoring stations within the preset historical time period; a preprocessing module, configured to perform data preprocessing on the first monitoring data and the second monitoring data to obtain preprocessed monitoring data; A first construction module is configured to calculate, for each target indicator, the Pearson correlation coefficient between each pair of PM2.5 and ozone monitoring stations with respect to the target indicator using the preprocessed monitoring data, and construct a correlation matrix using all the Pearson correlation coefficients; the target indicator being an overlap index between the first monitoring data and the second monitoring data; A second construction module is used to construct a multi-site adjacency matrix based on the preprocessed monitoring data; A prediction module is used to input the preprocessed monitoring data, the correlation matrix and the multi-site adjacency matrix into a preset PM2.5 and ozone concentration prediction model to obtain PM2.5 and ozone concentration prediction results output by the PM2.5 and ozone concentration prediction model; wherein the PM2.5 and ozone concentration prediction model uses the preprocessed monitoring data and the correlation matrix to extract time features, extracts spatial features based on the preprocessed monitoring data and the multi-site adjacency matrix, and predicts the PM2.5 and ozone concentration prediction results based on the time features and the spatial features.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the PM2.5 and ozone concentration prediction method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Air quality prediction method and system
CN116611561A
Air quality prediction method for mining space-time attention mechanism based on multiple relations
CN119204352A
Traffic prediction method based on multi-scale space-time attention mechanism
CN119516785A
Ozone concentration prediction method and device based on space-time diagram convolutional network model, equipment and medium
CN119578648A