Air quality prediction optimization method and system based on deep learning
By constructing a spatiotemporal graph structure and multi-level feature aggregation, and combining automatic differentiation technology to verify the consistency between the predicted concentration field and the physical laws of pollutant transport and diffusion, the problem of causal confusion in existing methods under changing meteorological conditions is solved, and efficient air quality prediction under complex meteorological conditions is achieved.
Patent Information
- Application Number
- CN202511636227.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-02-13
AI Technical Summary
Existing dynamic graph neural networks neglect the physical laws governing the transport and diffusion of atmospheric pollutants when meteorological conditions change drastically, leading to causal confusion in prediction results when weather systems change abruptly. Existing methods exhibit systematic biases in prediction results under complex meteorological conditions.
A spatiotemporal graph structure is constructed, and the spatial correlation strength between nodes is dynamically calculated based on real-time wind direction and speed data to generate a dynamic adjacency matrix. The consistency between the predicted concentration field and the physical laws of pollutant transport and diffusion is verified through multi-level spatial feature aggregation and automatic differentiation techniques. A composite optimization objective is constructed for iterative optimization to ensure that the prediction results conform to physical laws.
Ensuring that the prediction results conform to the basic physical laws of pollutant transport and diffusion under any meteorological conditions avoids causal confusion, improves the physical rationality and reliability of the prediction results, and enhances the model's generalization ability and stability under complex meteorological conditions.
Smart Images

Figure CN121524920A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of environmental monitoring, in particular to an air quality prediction optimization method and system based on deep learning. BACKGROUND
[0002] In recent years, air quality prediction methods based on deep learning have gradually replaced traditional numerical models and statistical methods and become a research hotspot in the field of environmental monitoring. In particular, the introduction of graph neural network technology makes it possible to model the complex spatial correlation between monitoring stations. Existing technologies achieve short-term prediction of pollutant concentration by constructing static or simple dynamic graph structures and combining recurrent neural networks and other time series processing methods. However, these methods mostly rely on data-driven black-box learning and ignore the inherent physical laws in the process of atmospheric pollutant transport and diffusion, resulting in systematic bias in the prediction results under complex weather conditions.
[0003] The existing technology has the following disadvantages: Existing dynamic graph neural networks have the following problems: when the weather condition changes suddenly (such as from calm weather to strong wind weather), the model will immediately increase the connection weight of the downwind station and predict the concentration to rise, but in the actual physical process, the strong wind will first dilute the local pollutants, and only when there is a persistent pollution source upwind and after a certain time lag, the concentration of the downwind station will rise. This neglect of the time constant in the physical mechanism makes the existing method produce prediction results that are contrary to the true law when the weather system changes suddenly. SUMMARY
[0004] The purpose of the present application is to provide an air quality prediction optimization method and system based on deep learning to solve the problems in the background.
[0005] The purpose of the present application can be achieved by the following technical solutions: The air quality prediction optimization method based on deep learning comprises the following steps: S1: Constructing a spatio-temporal graph structure with air quality monitoring stations distributed in geographical space as nodes, assigning node features to each node, dynamically calculating the spatial correlation strength between nodes based on real-time wind direction and wind speed data between stations, and generating a dynamic adjacency matrix; S2: Multi-level spatial feature aggregation based on the dynamic adjacency matrix and node features to obtain spatial dependent feature representation of each node; S3: Calculate the predicted concentration field based on the spatial dependence characteristics, and use automatic differentiation technology to verify the consistency between the predicted concentration field and the physical laws of pollutant transport and diffusion, and obtain the physical consistency residual. S4: Construct a composite optimization objective based on the physical consistency residual, and obtain the parameter configuration that satisfies the physical law constraints through iterative optimization; S5: The optimized parameter configuration is used to process real-time monitoring data and output air quality prediction results that conform to physical laws.
[0006] As a further aspect of the present invention: the construction of a spatiotemporal graph structure using geographically distributed air quality monitoring stations as nodes, and the assignment of node characteristics to each node, specifically includes: Acquire time-series data of pollutant concentrations and meteorological parameters for each air quality monitoring station within a preset time window; Standardize the time series data of pollutant concentrations and meteorological parameters to eliminate the influence of different units on feature extraction. The standardized time-series data is fused with the geographic coordinates of each site to generate node features for each node. A spatiotemporal graph structure is constructed based on node features, where the initial connection relationship between nodes is determined by the spherical distance between stations. An initial connection is established when the spherical distance is less than a preset threshold.
[0007] As a further aspect of the present invention: the generation of the dynamic adjacency matrix specifically includes: Obtain the wind direction and wind speed data of each station at the current moment, and convert them into a wind field vector representation; The azimuth angle is calculated based on the relative positional relationship between the stations, and the angle between the wind direction and the line connecting the stations is calculated in combination with the wind field vector. Based on the included angle and wind speed, the weight of the direct impact of the wind field on pollutant transport is calculated. The calculation directly affects the weights and the spherical distance between stations, and finally generates a dynamic adjacency matrix.
[0008] As a further aspect of the present invention: the multi-level spatial feature aggregation based on the dynamic adjacency matrix and node features to obtain the spatial dependency feature representation of each node specifically includes: Based on the spatial association strength recorded in the dynamic adjacency matrix and combined with the similarity between node features, the feature propagation weight between each node and its neighboring nodes is calculated. Based on the feature propagation weights, the features of each node are combined with the features of its direct neighbor nodes in the first-level weighted combination to form preliminary spatial augmentation features; Based on the initial spatial augmentation features, the features of each node are combined with the features of its second-order neighbor nodes in a second-level weighted combination to extract dependency features over a larger spatial range. The features obtained through two-level spatial aggregation are weighted and fused with the original node features to finally generate a spatially dependent feature representation.
[0009] As a further aspect of the present invention: the specific process for obtaining the physical consistency residual is as follows: Based on spatially dependent feature representation, the predicted concentration field for a specified future time period is obtained through feature mapping; Automatic differentiation techniques are used to calculate and predict the gradient distribution of the concentration field in the spatial dimension, thereby obtaining the spatial variation characteristics of the concentration field. Based on the current wind field data and spatial variation characteristics, calculate the relative contributions of the pollutant advection transport and diffusion terms; The predicted rate of change of the concentration field over time is compared with the weighted sum of the advection transport and diffusion terms, and the degree of difference is output as the physical consistency residual.
[0010] As a further aspect of the present invention: the step of using automatic differentiation technology to calculate and predict the gradient distribution of the concentration field in the spatial dimension to obtain the spatial variation characteristics of the concentration field specifically includes: Based on the spatial distribution of the predicted concentration field, a two-dimensional spatial difference scheme containing east-west and north-south directions is constructed. Using automatic differentiation techniques, based on the spatial difference scheme, the first-order partial derivatives of the predicted concentration field in the east-west and north-south directions are calculated to form the concentration gradient field. Based on the concentration gradient field, the second partial derivatives of the predicted concentration field in the east-west direction and the second derivatives in the north-south direction are further calculated to obtain the curvature distribution characteristics of the concentration field. By combining the concentration gradient field with the curvature distribution characteristics of the concentration field, a complete spatial variation feature characterizing the spatial transport and diffusion of pollutants is constructed.
[0011] As a further aspect of the present invention: the calculation of the relative contributions of the pollutant advection transport and diffusion terms based on current wind field data and spatial variation characteristics specifically includes: The current wind field data is decomposed into east-west wind speed components and north-south wind speed components. The first advection component is calculated based on the product of the east-west component of the concentration gradient field and the east-west wind speed component, and the second advection component is calculated based on the product of the north-south component of the concentration gradient field and the north-south wind speed component. The pollutant diffusion term is obtained by multiplying the curvature distribution characteristics of the concentration field with the preset turbulent diffusion coefficient. The vector sum of the first and second advection components is taken as the total advection transport term, and it is normalized with the pollutant diffusion term to obtain the relative contribution of the pollutant advection transport term and the diffusion term.
[0012] As a further aspect of the present invention: the construction of a composite optimization objective based on physical consistency residuals, and the obtaining of parameter configurations that satisfy physical law constraints through iterative optimization, specifically includes: Based on the difference between the predicted concentration field and the actual observed concentration field, a data fitting difference metric is determined. The data fitting difference measure and the physical consistency residual are weighted and summed according to a preset ratio to construct a composite optimization objective; An alternating optimization strategy is adopted, first fixing the spatial feature aggregation parameters and optimizing the physical constraint parameters, then fixing the physical constraint parameters and optimizing the spatial feature aggregation parameters. The optimization step size is dynamically adjusted according to the changing trend of the composite optimization objective. When the change of the objective function in multiple consecutive iterations is less than the preset threshold, it is determined that the parameter configuration satisfies the constraints of physical laws.
[0013] As a further aspect of the present invention: the application of optimized parameter configuration to process real-time monitoring data and output air quality prediction results that conform to physical laws specifically includes: Acquire real-time pollutant concentration data and meteorological element data to construct a dynamic graph structure for the current moment; Based on the optimized parameter configuration, multi-level spatial feature aggregation is performed on the dynamic graph structure to obtain a real-time spatial dependency feature representation. The predicted concentration fields for multiple future time periods are calculated based on real-time spatial dependence features, and the consistency of the prediction results for each time period is verified by physical laws. By combining the predicted concentration field, which has been verified to be consistent with physical laws, with a geographic information system, a spatially continuous air quality distribution map is generated.
[0014] A deep learning-based air quality prediction and optimization system includes: The dynamic graph structure construction module is used to construct a spatiotemporal graph structure with geographically distributed air quality monitoring stations as nodes, assign node characteristics to each node, dynamically calculate the spatial correlation strength between nodes based on real-time wind direction and speed data between stations, and generate a dynamic adjacency matrix. The spatial feature aggregation module performs multi-level spatial feature aggregation based on the dynamic adjacency matrix and node features to obtain the spatial dependency feature representation of each node; The physical law constraint module calculates the predicted concentration field based on the spatial dependence characteristics, and uses automatic differentiation technology to verify the consistency between the predicted concentration field and the physical laws of pollutant transport and diffusion, and obtains the physical consistency residual. The parameter optimization module constructs a composite optimization objective based on the physical consistency residual, and obtains the parameter configuration that satisfies the constraints of physical laws through iterative optimization. The prediction output module applies optimized parameter configurations to process real-time monitoring data and outputs air quality prediction results that conform to physical laws.
[0015] The beneficial effects of this invention are: (1) By introducing physical consistency residual constraints, the prediction results are ensured to conform to the basic physical laws of pollutant transmission and diffusion under any meteorological conditions. In particular, during the transition from calm and stable weather to strong winds, the problem of causal confusion is effectively avoided, and the physical rationality and reliability of the prediction results are improved.
[0016] (2) By adopting a multi-level spatial feature aggregation and alternating optimization strategy, the model can adaptively learn pollution transmission patterns at different spatial scales. At the same time, the optimization process balances data-driven learning and physical law constraints, thereby enhancing the model's generalization ability and stability under complex meteorological conditions. Attached Figure Description
[0017] The invention will now be further described with reference to the accompanying drawings.
[0018] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a flowchart of the system of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Please see Figure 1 As shown, this invention is a deep learning-based air quality prediction and optimization method, comprising the following steps: S1: Using geographically distributed air quality monitoring stations as nodes, construct a spatiotemporal graph structure, assign node characteristics to each node, dynamically calculate the spatial correlation strength between nodes based on real-time wind direction and speed data between stations, and generate a dynamic adjacency matrix. S2: Based on the dynamic adjacency matrix and node features, multi-level spatial feature aggregation is performed to obtain the spatial dependency feature representation of each node; S3: Calculate the predicted concentration field based on the spatial dependence characteristics, and use automatic differentiation technology to verify the consistency between the predicted concentration field and the physical laws of pollutant transport and diffusion, and obtain the physical consistency residual. S4: Construct a composite optimization objective based on the physical consistency residual, and obtain the parameter configuration that satisfies the physical law constraints through iterative optimization; S5: The optimized parameter configuration is used to process real-time monitoring data and output air quality prediction results that conform to physical laws.
[0021] In S1, a spatiotemporal graph structure is constructed using geographically distributed air quality monitoring stations as nodes. Each node is assigned node characteristics, and the spatial correlation strength between nodes is dynamically calculated based on real-time wind direction and speed data between stations, generating a dynamic adjacency matrix. Specifically, this includes: The process of constructing the spatiotemporal map structure includes four steps: data acquisition, data preprocessing, feature fusion, and initial map establishment. First, time-series data of pollutant concentrations and meteorological parameters from each air quality monitoring station within a preset time window are acquired. Pollutant concentration data includes monitored values for PM2.5, PM10, sulfur dioxide, nitrogen dioxide, ozone, and carbon monoxide; meteorological parameter data includes monitored values for temperature, humidity, air pressure, wind speed, and wind direction. The time window length is set to 24 hours, and data is collected hourly.
[0022] The acquired time-series data of pollutant concentrations and meteorological parameters were standardized to eliminate the influence of different units on feature extraction. The Z-score standardization method was used to process the data for each feature dimension separately. The specific calculation process was as follows: first, the mean and standard deviation of the data for each feature dimension were calculated; then, the mean was subtracted from each data value, and the result was divided by the standard deviation to obtain the standardized data.
[0023] The standardized time-series data is fused with the geographic coordinates of each station to generate node features for each node. The geographic coordinates include the longitude and latitude of the station, represented in decimal degrees. The feature fusion process concatenates the standardized 24-hour time-series data with the geographic coordinates into a single feature vector, where the time-series data is arranged chronologically and the geographic coordinates are placed at the end of the feature vector.
[0024] A spatiotemporal graph structure is constructed based on node features, where the initial connections between nodes are determined by the spherical distance between stations. The spherical distance is calculated using the latitude and longitude coordinates of two points. The specific calculation process is as follows: first, latitude and longitude are converted to radians; then, the semi-versus values of the latitude and longitude differences between the two points are calculated; finally, the spherical distance is obtained using inverse trigonometric functions. When the spherical distance is less than a preset threshold of 50 kilometers, an initial connection is established between the corresponding nodes.
[0025] The process of generating a dynamic adjacency matrix includes four steps: wind field data processing, spatial relationship calculation, weight determination, and matrix construction. First, the wind direction and speed data for each station at the current moment are acquired and converted into a wind field vector representation. Wind direction data is converted to an angle value with true north as 0 degrees, and wind speed data is converted to meters per second. The wind field vector representation is a two-dimensional planar vector, where the eastward component is the sine of wind speed multiplied by the wind direction angle, and the northward component is the cosine of wind speed multiplied by the wind direction angle.
[0026] The azimuth angle is calculated based on the relative positions of the stations, and the angle between the wind direction and the line connecting the stations is calculated using the wind field vector. The azimuth angle is obtained by the difference in latitude and longitude between the two points, representing the direction from the source station to the target station. The angle is calculated using the vector angle formula: first, the dot product of the wind field vector and the direction vector of the line connecting the stations is calculated; then, it is divided by the product of the magnitudes of the two vectors; finally, the angle value is obtained using the inverse cosine function.
[0027] Based on the included angle and wind speed, the direct impact weight of the wind field on pollutant transport is calculated. When the included angle is less than 90 degrees, it indicates that the target site is located downwind of the source site, and the weight is the wind speed multiplied by the square of the cosine of the included angle. When the included angle is greater than or equal to 90 degrees, it indicates that the target site is located upwind or crosswind of the source site, and the weight is the wind speed multiplied by 1 / 4 of the sine of the included angle.
[0028] The adjacency matrix is generated by coupling the weights directly affecting the spherical distance between stations. The coupling calculation uses an exponential decay function, specifically multiplying the weights by a negative exponential function with the distance as the exponent and the natural constant as the base. When the spherical distance between two stations exceeds 100 kilometers, the value at the corresponding position in the adjacency matrix is set to 0. The dimension of the adjacency matrix equals the number of stations, and each element represents the dynamic association strength between the corresponding pair of stations.
[0029] In S2, multi-level spatial feature aggregation is performed based on the dynamic adjacency matrix and node features to obtain the spatial dependency feature representation of each node, specifically including: The spatial dependency feature extraction process includes four steps: weight calculation, primary aggregation, secondary aggregation, and feature fusion. First, based on the spatial association strength recorded in the dynamic adjacency matrix and combined with the similarity between node features, the feature propagation weights between each node and its neighboring nodes are calculated. The spatial association strength is directly taken from the value at the corresponding position in the dynamic adjacency matrix. Node feature similarity is obtained by calculating the cosine of the angle between the feature vectors of two nodes. Specifically, the dot product of the two feature vectors is calculated, then the magnitudes of the two vectors are calculated separately, and finally the dot product is divided by the product of the two magnitudes. The final value of the feature propagation weights is the product of the spatial association strength and the feature similarity, and is normalized so that the sum of the weights of all outgoing edges of each node is 1.
[0030] Based on the feature propagation weights, the features of each node are weighted and combined with the features of its direct neighbors in a first-level process. For each node, all its direct neighbors are traversed, and the feature vector of each neighbor is multiplied by its corresponding feature propagation weight. Then, all weighted feature vectors are summed to obtain the primary aggregated feature of the node. The primary aggregated feature is then concatenated with the node's original features to form a preliminary spatial enhancement feature with increased dimensionality. This step enables each node to obtain pollution distribution information from its directly adjacent regions.
[0031] Building upon the initial spatial augmentation features, a second-level weighted combination is performed on the features of each node and its second-order neighbors. Second-order neighbors are nodes reachable through two direct edges. For each node, all its second-order neighbors and their connecting paths are first identified, and the composite weight of each path is calculated as the product of the feature propagation weights of the two directly connected edges. Then, the weights of all paths leading to the same second-order neighbor are summed to obtain the total propagation weight of that second-order neighbor. Finally, the second-level spatial augmentation features are generated using the same operation as the first-level weighted combination. This step can capture contamination transmission patterns over a larger spatial range.
[0032] The features obtained through two-level spatial aggregation are weighted and fused with the original node features. First, the dimensions of the primary and secondary aggregated features are compressed using a fully connected layer to reduce the feature dimensions to the same level as the original node features. Then, the three types of features are weighted and summed according to a preset weight ratio, with the original node features having a weight of 0.3, the primary aggregated features having a weight of 0.4, and the secondary aggregated features having a weight of 0.3. Finally, the weighted feature vector is standardized to maintain a magnitude of 1, generating the final spatial dependency feature representation. This multi-level fusion method preserves the inherent characteristics of the nodes while incorporating dependencies at different spatial scales.
[0033] In S3, the predicted concentration field is calculated based on spatial dependence characteristics, and the consistency between the predicted concentration field and the physical laws of pollutant transport and diffusion is verified using automatic differentiation techniques to obtain the physical consistency residuals, specifically including: The process of calculating the predicted concentration field based on spatially dependent feature representation is implemented through feature mapping. The spatially dependent feature representation is taken as input and nonlinearly transformed through two fully connected layers. The first layer reduces the feature dimension to 64 dimensions and uses a modified linear activation function. The second layer outputs the predicted concentration values for the next 6 hours. The predicted concentration field maintains the spatial distribution structure corresponding to the monitoring stations. The output for each station includes predicted concentration values for four pollutants: PM2.5, PM10, nitrogen dioxide, and ozone. The prediction time resolution is 1 hour.
[0034] When calculating the spatial gradient distribution of the predicted concentration field using automatic differentiation, a two-dimensional spatial difference scheme incorporating east-west and north-south directions is first established. In the east-west direction, the central difference method is used to calculate the concentration change rate between each station and its east-west adjacent stations. The selection of adjacent stations is based on spatial location, with distance differences within a 10-kilometer range. The same difference method is used in the north-south direction to calculate the concentration change rate between each station and its north-south adjacent stations. Using automatic differentiation, the first-order partial derivatives of the predicted concentration field in both the east-west and north-south directions are calculated based on this difference scheme, forming the concentration gradient field.
[0035] Based on the obtained concentration gradient field, the second spatial derivative of the predicted concentration field is further calculated. For each station, the central difference method is applied again based on its first derivative results to calculate the second derivative in the east-west direction and the second derivative in the north-south direction. The second derivative in the east-west direction is calculated by the difference between the first derivative in the east-west direction at that station, and the second derivative in the north-south direction is calculated by the difference between the first derivative in the north-south direction at that station. The second derivative results characterize the curvature distribution of the concentration field and reflect the spatial variation trend of pollutant concentration.
[0036] By combining the concentration gradient field with the curvature distribution characteristics of the concentration field, a complete spatial variation feature representation is constructed. The combination method employs feature splicing, and the spatial variation features of each station include four dimensions: the first derivative in the east-west direction, the first derivative in the north-south direction, the second derivative in the east-west direction, and the second derivative in the north-south direction. This feature combination can comprehensively characterize the transport direction, transport intensity, and diffusion pattern of pollutants in space.
[0037] When calculating the advection transport term of pollutants, the current wind field data is first decomposed into east-west wind speed components and north-south wind speed components. The east-west wind speed component is obtained by multiplying the wind speed value by the sine of the wind direction angle, and the north-south wind speed component is obtained by multiplying the wind speed value by the cosine of the wind direction angle. The first advection component is calculated based on the product of the east-west component of the concentration gradient field and the east-west wind speed component, and the second advection component is calculated based on the product of the north-south component of the concentration gradient field and the north-south wind speed component. The vector sum of the two advection components constitutes the total advection transport term.
[0038] The calculation of the pollutant diffusion term is based on the curvature distribution characteristics of the concentration field and the turbulent diffusion coefficient. The turbulent diffusion coefficient is determined according to atmospheric stability conditions: 5 m² / s² under stable stratification, 50 m² / s² under neutral stratification, and 200 m² / s² under unstable stratification. The specific calculation process for the diffusion term is as follows: add the second derivative in the east-west direction and the second derivative in the north-south direction, and then multiply by the corresponding turbulent diffusion coefficient.
[0039] After obtaining the advection transport and diffusion terms, the relative contributions are normalized. First, the absolute values of the advection transport and diffusion terms are calculated, and then the two absolute values are added together to obtain the total contribution. The relative contribution of the advection transport term is the absolute value of the advection transport term divided by the total contribution, and the relative contribution of the diffusion term is the absolute value of the diffusion term divided by the total contribution. The numerical range of the relative contribution is between 0 and 1, and the sum of the two equals 1.
[0040] Finally, the physical consistency residual is calculated by comparing the time rate of change of the predicted concentration field with the weighted sum of the advection transport and diffusion terms. The time rate of change is obtained by dividing the difference between the current concentration and the predicted concentration at the next time step by the time step. The weighted sum is calculated as: advection transport term multiplied by its relative contribution plus diffusion term multiplied by its relative contribution. The physical consistency residual is the absolute difference between the time rate of change and the weighted sum, reflecting the degree of consistency between the prediction results and physical laws.
[0041] In S4, a composite optimization objective is constructed based on the physical consistency residuals. Iterative optimization yields parameter configurations that satisfy physical constraints, specifically including: The calculation of the data fit difference metric is based on the difference between the predicted concentration field and the actual observed concentration field. For each monitoring station and each prediction period, the absolute difference between the predicted concentration value and the actual observed concentration value is calculated. The average of the absolute differences for all stations and all prediction periods is taken to obtain the mean absolute error, which serves as the main indicator of the data fit difference metric. Simultaneously, the correlation coefficient between the predicted and observed values is calculated, converted to a value between 0 and 1, and weighted together with the mean absolute error to obtain a comprehensive data fit difference metric.
[0042] The composite optimization objective is constructed using a weighted summation. The weight coefficient for the data fit discrepancy metric is set to 0.7, and the weight coefficient for the physical consistency residual is set to 0.3. Before the weighted summation, the data fit discrepancy metric is normalized to a value between 0 and 1. The physical consistency residual is also normalized in the same way. The specific value of the composite optimization objective is 0.7 multiplied by the normalized data fit discrepancy metric plus 0.3 multiplied by the normalized physical consistency residual. This weighting ratio remains fixed during training.
[0043] The alternating optimization strategy is implemented in two phases. The first phase fixes the parameters related to spatial feature aggregation, including feature propagation weight calculation parameters and multi-level feature aggregation parameters, and specifically optimizes the parameters related to physical constraints, including advection transport term calculation parameters and diffusion term calculation parameters. The second phase fixes the physical constraint parameters and specifically optimizes the spatial feature aggregation parameters. Each phase has 100 iterations, and the stochastic gradient descent algorithm is used for parameter updates, with an initial learning rate of 0.01.
[0044] The dynamic adjustment of the optimization step size is based on the changing trend of the composite optimization objective. At the beginning of each optimization phase, the initial step size is set to 0.01. After every 10 iterations, the average decrease in the composite optimization objective over the most recent 10 iterations is calculated. If the average decrease is greater than the average decrease in the previous 10 iterations, the step size is increased by 10%. If the average decrease is less than the previous cycle, the step size is decreased by 20%. The adjustment range of the step size is limited to between 0.001 and 0.1.
[0045] The termination condition of the optimization process is based on the change in the composite optimization objective. The value of the composite optimization objective is recorded for each iteration cycle, and the change in the objective function is calculated for five consecutive iteration cycles. When the change in the objective function for five consecutive iteration cycles is less than 0.001, the optimization process is considered to have reached convergence, and the current parameter configuration is the optimal parameter configuration that satisfies the physical constraints. If convergence is not reached after 500 iteration cycles, the parameter configuration with the smallest historical composite optimization objective value is selected as the final result.
[0046] In S5, optimized parameter configurations are applied to process real-time monitoring data, outputting air quality prediction results that conform to physical laws, specifically including: The processing of real-time monitoring data includes the following steps: Pollutant concentration data and meteorological element data for the most recent hour are acquired from each monitoring station. Pollutant concentration data includes monitored values for PM2.5, PM10, nitrogen dioxide, and ozone. Meteorological element data includes monitored values for wind speed, wind direction, temperature, humidity, and air pressure. Quality control and outlier removal are performed on the acquired monitoring data. The 3σ criterion is used to identify outliers; that is, when the difference between a monitored value and its adjacent time period values exceeds three times the standard deviation, the data is marked as an outlier and imputed using linear interpolation.
[0047] The construction process of the dynamic graph structure is as follows: Quality-controlled monitoring data is used as node features, including the 1-hour average concentration of each pollutant and the 1-hour average value of meteorological elements. The spatial correlation strength between nodes is calculated based on real-time wind direction and speed data. Specifically, the calculation process involves: first, determining the azimuth angle based on the relative positions of the stations; then, calculating the angle between the wind direction and the line connecting the stations; and finally, calculating the spatial correlation strength based on the angle and wind speed. The dynamic adjacency matrix is generated using an exponential decay function, coupling the spatial correlation strength with the distance between stations in the calculation.
[0048] The specific steps of multi-level spatial feature aggregation are as follows: Using optimized parameter configuration, the first-level feature aggregation is performed, handling feature propagation between directly adjacent sites. The feature propagation weights are determined jointly based on the spatial association strength and node feature similarity in the dynamic adjacency matrix. Then, the second-level feature aggregation is performed, extending to second-order adjacent sites, and feature information over a larger spatial range is obtained through composite weight calculation. Finally, the two-level aggregation results are weighted and fused with the original node features in a ratio of 0.3:0.4:0.3 to generate a real-time spatially dependent feature representation.
[0049] The generation process of the predicted concentration field includes: based on real-time spatially dependent feature representation, predictions are made for three time periods: 1 hour, 2 hours, and 3 hours. The prediction for each time period is achieved through an independent feature mapping process, specifically including two fully connected layers. The first layer uses 64 neurons and the ReLU activation function, and the second layer outputs the predicted concentration values of four pollutants. The numerical range of the predicted results is constrained to between 0 and 500 micrograms per cubic meter using the Sigmoid function to ensure that the predicted values are within a reasonable range.
[0050] The specific implementation process for verifying the consistency of physical laws is as follows: For the concentration field of each prediction period, calculate its spatial gradient distribution and curvature characteristics; calculate the advection transport and diffusion terms based on the current wind field data; compare the time change rate of the predicted concentration field with the weighted sum of the advection and diffusion processes to obtain the physical consistency residual. When the physical consistency residual exceeds 0.1, the prediction results for that period are corrected by adjusting the predicted values towards the average value of historical observations for the same period.
[0051] The generation of the final prediction results includes the following steps: converting the validated predicted concentration field into specific concentration values, performing spatial interpolation using a geographic information system, and generating a 500-meter resolution continuous spatial distribution map. Based on the predicted concentration values, the air quality index is calculated, and according to the grading standards of the "Technical Regulations for Ambient Air Quality Index," air quality level forecasts for each time period within the next 3 hours are output. The final results are output in numerical and visualization form, including predicted concentrations of each pollutant and the air quality index forecast.
[0052] Please see Figure 2 As shown, the deep learning-based air quality prediction and optimization system includes: The dynamic graph structure construction module is used to construct a spatiotemporal graph structure with geographically distributed air quality monitoring stations as nodes, assign node characteristics to each node, dynamically calculate the spatial correlation strength between nodes based on real-time wind direction and speed data between stations, and generate a dynamic adjacency matrix. The spatial feature aggregation module performs multi-level spatial feature aggregation based on the dynamic adjacency matrix and node features to obtain the spatial dependency feature representation of each node; The physical law constraint module calculates the predicted concentration field based on the spatial dependence characteristics, and uses automatic differentiation technology to verify the consistency between the predicted concentration field and the physical laws of pollutant transport and diffusion, and obtains the physical consistency residual. The parameter optimization module constructs a composite optimization objective based on the physical consistency residual, and obtains the parameter configuration that satisfies the constraints of physical laws through iterative optimization. The prediction output module applies optimized parameter configurations to process real-time monitoring data and outputs air quality prediction results that conform to physical laws.
[0053] The working principle of this invention is as follows: A spatiotemporal map structure is constructed using air quality monitoring stations as nodes. Node features are formed by fusing pollutant concentrations, meteorological elements, and geographic coordinates. A dynamic adjacency matrix is generated by dynamically calculating the spatial correlation strength between stations based on real-time wind direction and speed data. A multi-level spatial feature aggregation method is employed, sequentially performing feature propagation and weighted fusion of directly adjacent stations and second-order adjacent stations to obtain feature representations characterizing complex spatial dependencies. After obtaining the predicted concentration field using feature mapping, the spatial gradient and curvature characteristics of the concentration field are calculated using automatic differentiation technology. The relative contribution of advection transport and diffusion processes is analyzed in conjunction with wind field data, thereby verifying the consistency between the prediction results and physical laws and obtaining physical consistency residuals. A composite optimization objective is constructed based on data fitting differences and physical consistency residuals, and parameter configuration is dynamically adjusted using an alternating optimization strategy. Finally, the optimized parameters are applied to process real-time monitoring data, outputting air quality prediction results that conform to physical laws and have spatial continuity.
[0054] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. A deep learning-based air quality prediction and optimization method, characterized in that, Includes the following steps: S1: Using geographically distributed air quality monitoring stations as nodes, construct a spatiotemporal graph structure, assign node characteristics to each node, dynamically calculate the spatial correlation strength between nodes based on real-time wind direction and speed data between stations, and generate a dynamic adjacency matrix. S2: Based on the dynamic adjacency matrix and node features, multi-level spatial feature aggregation is performed to obtain the spatial dependency feature representation of each node; S3: Calculate the predicted concentration field based on the spatial dependence characteristics, and use automatic differentiation technology to verify the consistency between the predicted concentration field and the physical laws of pollutant transport and diffusion, and obtain the physical consistency residual. S4: Construct a composite optimization objective based on the physical consistency residual, and obtain the parameter configuration that satisfies the physical law constraints through iterative optimization; S5: The optimized parameter configuration is used to process real-time monitoring data and output air quality prediction results that conform to physical laws.
2. The air quality prediction and optimization method based on deep learning according to claim 1, characterized in that, The method uses geographically distributed air quality monitoring stations as nodes to construct a spatiotemporal graph structure, assigning node characteristics to each node, specifically including: Acquire time-series data of pollutant concentrations and meteorological parameters for each air quality monitoring station within a preset time window; Standardize the time series data of pollutant concentrations and meteorological parameters to eliminate the influence of different units on feature extraction. The standardized time-series data is fused with the geographic coordinates of each site to generate node features for each node. A spatiotemporal graph structure is constructed based on node features, where the initial connection relationship between nodes is determined by the spherical distance between stations. An initial connection is established when the spherical distance is less than a preset threshold.
3. The air quality prediction and optimization method based on deep learning according to claim 1, characterized in that, The generation of the dynamic adjacency matrix specifically includes: Obtain the wind direction and wind speed data of each station at the current moment, and convert them into a wind field vector representation; The azimuth angle is calculated based on the relative positional relationship between the stations, and the angle between the wind direction and the line connecting the stations is calculated in combination with the wind field vector. Based on the included angle and wind speed, the weight of the direct impact of the wind field on pollutant transport is calculated. The calculation directly affects the weights and the spherical distance between stations, and finally generates a dynamic adjacency matrix.
4. The air quality prediction and optimization method based on deep learning according to claim 1, characterized in that, The process of multi-level spatial feature aggregation based on dynamic adjacency matrices and node features to obtain spatial dependency feature representations for each node specifically includes: Based on the spatial association strength recorded in the dynamic adjacency matrix and combined with the similarity between node features, the feature propagation weight between each node and its neighboring nodes is calculated. Based on the feature propagation weights, the features of each node are combined with the features of its direct neighbor nodes in the first-level weighted combination to form preliminary spatial augmentation features; Based on the initial spatial augmentation features, the features of each node are combined with the features of its second-order neighbor nodes in a second-level weighted combination to extract dependency features over a larger spatial range. The features obtained through two-level spatial aggregation are weighted and fused with the original node features to finally generate a spatially dependent feature representation.
5. The air quality prediction and optimization method based on deep learning according to claim 1, characterized in that, The specific process for obtaining the physically consistent residual is as follows: Based on spatially dependent feature representation, the predicted concentration field for a specified future time period is obtained through feature mapping; Automatic differentiation techniques are used to calculate and predict the gradient distribution of the concentration field in the spatial dimension, thereby obtaining the spatial variation characteristics of the concentration field. Based on the current wind field data and spatial variation characteristics, calculate the relative contributions of the pollutant advection transport and diffusion terms; The predicted rate of change of the concentration field over time is compared with the weighted sum of the advection transport and diffusion terms, and the degree of difference is output as the physical consistency residual.
6. The air quality prediction and optimization method based on deep learning according to claim 5, characterized in that, The method of using automatic differentiation to calculate and predict the gradient distribution of the concentration field in the spatial dimension, and obtaining the spatial variation characteristics of the concentration field, specifically includes: Based on the spatial distribution of the predicted concentration field, a two-dimensional spatial difference scheme containing east-west and north-south directions is constructed. Using automatic differentiation techniques, based on the spatial difference scheme, the first-order partial derivatives of the predicted concentration field in the east-west and north-south directions are calculated to form the concentration gradient field. Based on the concentration gradient field, the second partial derivatives of the predicted concentration field in the east-west direction and the second derivatives in the north-south direction are further calculated to obtain the curvature distribution characteristics of the concentration field. By combining the concentration gradient field with the curvature distribution characteristics of the concentration field, a complete spatial variation feature characterizing the spatial transport and diffusion of pollutants is constructed.
7. The air quality prediction and optimization method based on deep learning according to claim 5, characterized in that, The calculation of the relative contributions of pollutant advection transport and diffusion terms based on current wind field data and spatial variation characteristics specifically includes: The current wind field data is decomposed into east-west wind speed components and north-south wind speed components. The first advection component is calculated based on the product of the east-west component of the concentration gradient field and the east-west wind speed component, and the second advection component is calculated based on the product of the north-south component of the concentration gradient field and the north-south wind speed component. The pollutant diffusion term is obtained by multiplying the curvature distribution characteristics of the concentration field with the preset turbulent diffusion coefficient. The vector sum of the first and second advection components is taken as the total advection transport term, and it is normalized with the pollutant diffusion term to obtain the relative contribution of the pollutant advection transport term and the diffusion term.
8. The air quality prediction and optimization method based on deep learning according to claim 1, characterized in that, The method of constructing a composite optimization objective based on physical consistency residuals and obtaining parameter configurations that satisfy physical constraints through iterative optimization specifically includes: Based on the difference between the predicted concentration field and the actual observed concentration field, a data fitting difference metric is determined. The data fitting difference measure and the physical consistency residual are weighted and summed according to a preset ratio to construct a composite optimization objective; An alternating optimization strategy is adopted, first fixing the spatial feature aggregation parameters and optimizing the physical constraint parameters, then fixing the physical constraint parameters and optimizing the spatial feature aggregation parameters. The optimization step size is dynamically adjusted according to the changing trend of the composite optimization objective. When the change of the objective function in multiple consecutive iterations is less than the preset threshold, it is determined that the parameter configuration satisfies the constraints of physical laws.
9. The air quality prediction and optimization method based on deep learning according to claim 1, characterized in that, The optimized parameter configuration of the application processes real-time monitoring data and outputs air quality prediction results that conform to physical laws, specifically including: Acquire real-time pollutant concentration data and meteorological element data to construct a dynamic graph structure for the current moment; Based on the optimized parameter configuration, multi-level spatial feature aggregation is performed on the dynamic graph structure to obtain a real-time spatial dependency feature representation. The predicted concentration fields for multiple future time periods are calculated based on real-time spatial dependence features, and the consistency of the prediction results for each time period is verified by physical laws. By combining the predicted concentration field, which has been verified to be consistent with physical laws, with a geographic information system, a spatially continuous air quality distribution map is generated.
10. A deep learning-based air quality prediction and optimization system, characterized in that... The method for executing the deep learning-based air quality prediction optimization method according to any one of claims 1-9 includes: The dynamic graph structure construction module is used to construct a spatiotemporal graph structure with geographically distributed air quality monitoring stations as nodes, assign node characteristics to each node, dynamically calculate the spatial correlation strength between nodes based on real-time wind direction and speed data between stations, and generate a dynamic adjacency matrix. The spatial feature aggregation module performs multi-level spatial feature aggregation based on the dynamic adjacency matrix and node features to obtain the spatial dependency feature representation of each node; The physical law constraint module calculates the predicted concentration field based on the spatial dependence characteristics, and uses automatic differentiation technology to verify the consistency between the predicted concentration field and the physical laws of pollutant transport and diffusion, and obtains the physical consistency residual. The parameter optimization module constructs a composite optimization objective based on the physical consistency residual, and obtains the parameter configuration that satisfies the constraints of physical laws through iterative optimization. The prediction output module applies optimized parameter configurations to process real-time monitoring data and outputs air quality prediction results that conform to physical laws.
Citation Information
Cited By
An air pollution prediction method fusing meteorological driving mechanism constraints
CN122262579A