Air quality prediction method, system, equipment and computer program product

By constructing a dynamic adjacency matrix and using conditions to generate adversarial network models, the problem of insufficient accuracy of air quality prediction when the monitoring site is sparse or data is incomplete, and high-precision air quality prediction is achieved.

CN119577444AActive Publication Date: 2025-03-07NANJING YRD ECO DEV RI CO LTD

Patent Information

Application Number
CN202411634027.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-03-07
Estimated Expiration
2044-11-15

AI Technical Summary

Technical Problem

The existing air quality prediction technology has insufficient prediction accuracy when the monitoring stations are sparsely distributed or the data is incomplete, making it difficult to accurately reflect the changing trend of air quality.

Method used

By collecting historical data from multiple data sources, calculating the spatiotemporal correlation characteristics between sites, building a dynamic adjacency matrix, combining conditions to generate an adversarial network (cGAN) model to perform air quality prediction.

Benefits of technology

In the case of sparse monitoring sites or missing data, high-precision air quality prediction is achieved, which improves the accuracy and applicability of the prediction and avoids the problem of large prediction errors caused by insufficient data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577444A_ABST
    Figure CN119577444A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of air quality prediction, and discloses an air quality prediction method. The method comprises the steps of collecting historical data from a plurality of data sources, and performing normalization processing on different data sources; constructing a dynamic adjacency matrix based on the acquired space-time correlation characteristics; establishing a conditional generative adversarial network model, extracting spatial features through a conditional convolutional network module, and extracting a time dependency relationship through an attention time sequence coding module; and predicting the air quality of the unmonitored area. Compared with the prior art that data acquisition and prediction are carried out only depending on dense monitoring stations, and particularly under the condition that the monitoring stations are sparse, high-precision and comprehensive air quality prediction cannot be realized, the method for generating the adversarial network through the combination of the dynamic adjacency matrix and the condition has the advantages that the air quality prediction efficiency is improved; the air quality prediction in the sparse monitoring area is realized, so that the problem of relatively large prediction error caused by insufficient data is avoided, and the prediction accuracy and applicability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of air quality prediction, and in particular relates to an air quality prediction method, system, device and computer program product. Background Art

[0002] At present, the existing air quality prediction technology has insufficient prediction accuracy in areas with sparse monitoring data. For example, existing methods usually rely on dense monitoring sites and sufficient historical data to build prediction models. When the monitoring sites are sparsely distributed or the data is incomplete, the prediction effect is significantly reduced, and it is difficult to accurately reflect the changing trend of air quality. Existing technologies cannot fully meet the needs of high-precision air quality prediction in areas with imperfect monitoring networks or complex environments. Therefore, there is an urgent need for a method that can still achieve high-precision air quality prediction when the monitoring sites are sparse or the data is missing, so as to improve the applicability of the air quality monitoring system and the accuracy of the prediction. Summary of the invention

[0003] In view of the above-mentioned technical deficiencies, the purpose of the present invention is to propose an air quality prediction method, which aims to solve the technical problem that the prior art only relies on dense monitoring sites for data collection and prediction, especially under the condition of sparse monitoring sites, and cannot achieve high-precision and comprehensive air quality prediction.

[0004] In order to solve the above technical problems, the present invention adopts the following technical solution: The present invention provides an air quality prediction method.

[0005] The air quality prediction method comprises:

[0006] Step S10: collecting historical data from multiple data sources, including the air quality index A, temperature data T, and traffic flow TRA of the monitoring station, and using a normalization method to normalize the features of the multiple data sources to obtain the spatiotemporal correlation features X between the stations;

[0007] Step S20: Based on the spatiotemporal correlation feature X obtained in step S10, a dynamic adjacency matrix between monitoring sites is constructed, where the weight W of the dynamic adjacency matrix is t (i,j) is calculated by the following formula:

[0008]

[0009] Where i is the i-th site, j is the j-th site, and W t(i, j) is the dynamic weight between monitoring sites i and j at time t, δ is the distance decay factor, d(i, j) is the geographical distance between sites i and j, ρ is the similarity weight factor, X(i, t) is the spatiotemporal correlation feature of site i at time t, X(j, t) is the spatiotemporal correlation feature of site j at time t, ‖X(i, t)‖ and ‖X(j, t)‖ are the moduli of the spatiotemporal correlation features of sites i and j, respectively;

[0010] Step S30: Establish a conditional generative adversarial network cGAN model, wherein the generator used in the cGAN model includes a conditional convolutional network module and an attention time series encoding module. The conditional convolutional network module extracts spatial features by dynamically adjusting convolution kernel parameters according to different environmental conditions; the attention time series encoding module extracts long-term dependencies of time series through a multi-head attention method to capture the time trend of air quality changes;

[0011] Step S40: training the conditional generative adversarial network model in step S30, the input data is the dynamic adjacency matrix between sites obtained by processing the standard sample data from step S10 to step S20, the output data is the actual result of the standard sample air quality, the multi-layer loss function used in the training process includes contrast loss, mean square error loss and uncertainty loss, and the expression of the multi-layer loss function is:

[0012] L=λ1·L contrast +λ2·L mse +λ3·L uncertainty

[0013] Among them, L contrast is the contrast loss term, L mse is the mean square error loss, L uncertainty is the uncertainty loss term, λ1, λ2, λ3 are the weight coefficients of each loss term;

[0014] Step S50: Use the trained conditional generative adversarial network model to predict the air quality of the unmonitored area and output the prediction results, where the input data is the dynamic adjacency matrix between the sites in the area to be tested, and the prediction results include the air quality prediction report and the corresponding confidence interval calculation results.

[0015] Preferably, in step S10, the spatiotemporal correlation feature X between sites is obtained by processing using the formula:

[0016]

[0017] where X is the comprehensive spatiotemporal correlation feature of site i and site j at time t, α, β, and γ are weight coefficients, A(i, t) and A(j, t) are the air quality indexes of site i and site j at time t, respectively, ‖A(i, t)‖ and ‖A(j, t)‖ are the modulus lengths of the air quality indexes of site i and site j at time t, respectively; T(i, t) and T(j, t) are the temperature data of site i and site j at time t, respectively, ‖T(i, t)‖ and ‖T(j, t)‖ are the modulus lengths of the corresponding temperature data, respectively; TRA(i, t) and TRA(j, t) are the traffic flow data of site i and site j at time t, respectively, ‖TRA(i, t)‖ and ‖TRA(j, t)‖ are the modulus lengths of the corresponding traffic flow data, respectively.

[0018] Preferably, the comparison loss in step S40 is measured using cosine similarity.

[0019] Preferably, in step S50, the confidence interval is calculated as follows:

[0020]

[0021] in, is the air quality prediction value output by the model, z is the confidence interval coefficient, and σ is the standard deviation generated by the uncertainty estimation network.

[0022] Preferably, the standard deviation σ generated by the uncertainty estimation network is generated by a Bayesian neural network.

[0023] Preferably, the discriminator of the conditional generative adversarial network described in step S30 prevents overfitting by adding a regularization term.

[0024] Preferably, the default value of the confidence interval coefficient z in step S50 is 1.96, and can be set according to actual needs.

[0025] The present invention also provides an air quality prediction system comprising:

[0026] The data collection and feature calculation module is used to collect historical data from multiple data sources, including the air quality index A, temperature data T, and traffic flow TRA of the monitoring station, and use the normalization method to standardize the features of multiple data sources to obtain the spatiotemporal correlation feature X between the stations;

[0027] The dynamic adjacency matrix construction module is used to construct a dynamic adjacency matrix between monitoring sites based on the spatiotemporal correlation feature X obtained in step S10, where the weight W of the dynamic adjacency matrix is t (i,j) is calculated by the following formula:

[0028]

[0029] Where i is the i-th site, j is the j-th site, and W t (i, j) is the dynamic weight between monitoring sites i and j at time t, δ is the distance decay factor, d(i, j) is the geographical distance between sites i and j, ρ is the similarity weight factor, X(i, t) is the spatiotemporal correlation feature of site i at time t, X(j, t) is the spatiotemporal correlation feature of site j at time t, ‖X(i, t)‖ and ‖X(j, t)‖ are the moduli of the spatiotemporal correlation features of sites i and j, respectively;

[0030] The conditional generative adversarial network model building module is used to build a conditional generative adversarial network cGAN model. The generator used in the cGAN model includes a conditional convolutional network module and an attention time series encoding module. The conditional convolutional network module extracts spatial features by dynamically adjusting the convolution kernel parameters according to different environmental conditions; the attention time series encoding module extracts the long-term dependency of the time series through a multi-head attention method to capture the time trend of air quality changes;

[0031] The model training and loss optimization module is used to train the conditional generative adversarial network model in step S30. The input data is the dynamic adjacency matrix between sites obtained by processing the standard sample data from step S10 to step S20. The output data is the actual result of the standard sample air quality. The multi-layer loss function used in the training process includes contrast loss, mean square error loss and uncertainty loss. The expression of the multi-layer loss function is:

[0032] L=λ1·L contrast +λ2·L mse +λ3·L uncertainty

[0033] Among them, L contrast is the contrast loss term, L mse is the mean square error loss, L uncertainty is the uncertainty loss term, λ1, λ2, λ3 are the weight coefficients of each loss term;

[0034] The prediction and confidence interval calculation module is used to use the trained conditional generative adversarial network model to predict the air quality of unmonitored areas and output the prediction results. The input data is the dynamic adjacency matrix between the sites in the area to be tested. The prediction results include the air quality prediction report and the corresponding confidence interval calculation results.

[0035] The present invention also provides an air quality prediction device, comprising a memory, a processor, and an air quality prediction program stored in the memory and executable on the processor, wherein the air quality prediction program implements the air quality prediction method when executed by the processor.

[0036] The present invention also provides a computer program product, comprising an air quality prediction program, wherein the air quality prediction method is implemented when the air quality prediction program is executed by a processor.

[0037] The beneficial effect of the present invention is that compared with the prior art which only relies on dense monitoring sites for data collection and prediction, especially under the condition of sparse monitoring sites, and cannot achieve the technical problem of high-precision and comprehensive air quality prediction, the present application realizes air quality prediction in sparsely monitored areas through the method of combining a dynamic adjacency matrix with a conditional generative adversarial network, thereby avoiding the problem of large prediction errors caused by insufficient data and improving the accuracy and applicability of the prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative work.

[0039] Figure 1 FIG. 4 is a flow chart of a first embodiment of an air quality prediction method according to the present invention.

[0040] Figure 2 The present invention is a schematic diagram of an air quality prediction method. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] Embodiment 1: Figure 1 , which is a flow chart of the first embodiment of the air quality prediction method of the present invention, and provides the first embodiment of the air quality prediction method of the present invention.

[0043] In a first embodiment, the air quality prediction method includes:

[0044] Step S10: collecting historical data from multiple data sources, including the air quality index A, temperature data T, and traffic flow TRA of the monitoring station, using a normalization method to standardize the features of different data sources, and calculating the spatiotemporal correlation features X between the stations;

[0045] It should be noted that the air quality index, temperature data T and traffic flow TRA are important factors affecting air quality and can reflect the distribution and propagation trend of pollutants in the air. Therefore, extracting spatiotemporal features from these data sources can help improve the accuracy of the prediction model.

[0046] It is understandable that due to the differences in the numerical range and physical meaning of different data sources, before calculating the spatiotemporal correlation characteristics between sites, the characteristics of each data source need to be normalized to ensure the scale consistency of the characteristic data, so as to avoid a certain feature from having an undue impact on the overall prediction results.

[0047] It should be understood that the temporal and spatial correlation characteristics X between sites are calculated using the formula:

[0048]

[0049] Where X is the comprehensive spatiotemporal correlation characteristics of site i and site j at time t, α, β, and γ are weight coefficients, A(i, t) and A(j, t) are the air quality indexes of site i and site j at time t, respectively, ‖A(i, t)‖ and ‖A(j, t)‖ are the modulus lengths of the air quality indexes of site i and site j, respectively; T(i, t) and T(j, t) are the temperature data of site i and site j at time t, respectively, ‖T(i, t)‖ and ‖T(j, t)‖ are the modulus lengths of the corresponding temperature data, respectively; TRA(i, t) and TRA(j, t) are the traffic flow data of site i and site j at time t, respectively, ‖TRA(i, t)‖ and ‖TRA(j, t)‖ are the modulus lengths of the corresponding traffic flow data, respectively.

[0050] In this way, the spatiotemporal correlation feature X integrates the data of air quality, temperature, and traffic flow, helping the subsequent steps to construct a dynamic adjacency matrix for the input of the air quality prediction model.

[0051] Step S20: Based on the spatiotemporal correlation feature X calculated in step S10, a dynamic adjacency matrix between monitoring sites is constructed, where the weight W of the dynamic adjacency matrix is t (i,j) is calculated by the following formula:

[0052]

[0053] Where i is the i-th site, j is the j-th site, and W t(i, j) is the dynamic weight between monitoring sites i and j at time t, δ is the distance decay factor, d(i, j) is the geographical distance between sites i and j, ρ is the similarity weight factor, X(i, t) is the spatiotemporal correlation feature of site i at time t, X(j, t) is the spatiotemporal correlation feature of site j at time t, ‖X(i, t)‖ and ‖X(j, t)‖ are the moduli of the spatiotemporal correlation features of sites i and j, respectively;

[0054] It should be noted that the weight W of the dynamic adjacency matrix t (i, j) is used to represent the spatiotemporal correlation between sites i and j at a specific time t. By introducing the distance decay factor δ and the similarity weight factor ρ, the influence of spatial distance and feature similarity can be comprehensively considered, thereby accurately reflecting the actual correlation between monitoring sites.

[0055] It should be understood that the role of the distance attenuation factor δ is to reduce the impact of sites with a long spatial distance on the weights, so that when calculating the weights, the contribution of sites with a long distance is smaller, which is more in line with the actual situation of spatial association.

[0056] Step S30: Establish a conditional generative adversarial network cGAN model, wherein the generator includes a conditional convolutional network module and an attention time series encoding module. The conditional convolutional network module extracts spatial features according to different environmental conditions by dynamically adjusting convolution kernel parameters; the attention time series encoding module extracts long-term dependencies of time series through a multi-head attention mechanism to capture the time trend of air quality changes;

[0057] It should be noted that the conditional generative adversarial network (cGAN) model is a network structure that generates prediction results based on conditional inputs (such as meteorological data, air quality index, etc.). The generator and the discriminator are optimized through mutual competition to improve the authenticity of the generated data. The generator generates data that conforms to the trend of real air quality changes, and the discriminator distinguishes between the generated data and the real data.

[0058] It is understandable that the role of the conditional convolutional network module is to extract spatial features between monitoring sites to help the model accurately predict air quality in space. This module dynamically adjusts the convolution kernel parameters to enable the model to adapt to different environmental conditions, thereby more accurately extracting features related to air quality.

[0059] It should be understood that the attention time series encoding module extracts long-term dependencies in the time series through a multi-head attention mechanism, which helps the model capture the trend of air quality changes over time. This mechanism can identify important temporal patterns in longer time series, thereby improving the accuracy and timeliness of the model in predicting air quality changes.

[0060] Step S40: training the conditional generative adversarial network model in step S30, the input data is the dynamic adjacency matrix between sites obtained by processing the standard sample from step S10 to step S20, and the output data is the air quality prediction result of the standard sample, wherein the multi-layer loss function includes contrast loss, mean square error loss and uncertainty loss, and the total expression of the loss function is:

[0061] L=λ1·L contrast +λ2·L mse +λ3·L uncertainty

[0062] Among them, L contrast is the contrast loss term, L mse is the mean square error loss, L uncertainty is the uncertainty loss term, λ1, λ2, λ3 are the weight coefficients of each loss term;

[0063] It should be noted that the role of the contrast loss term is to increase the distinction between generated data and real data so that the generator gradually generates predicted data that is more in line with actual air quality changes. This loss term helps the model learn the distribution of real data; the mean square error loss is a regression loss function that measures the numerical deviation between generated data and real data. By minimizing this loss term, the prediction error of the model can be effectively reduced, thereby improving the accuracy of the generated data; the role of the uncertainty loss is to introduce an additional constraint in the model optimization process so that the model can reasonably handle uncertain prediction results. This loss term helps the model handle data noise or anomalies more robustly by penalizing data points with high uncertainty during training, thereby improving the stability of the prediction results.

[0064] Step S50: Use the trained conditional generative adversarial network model to predict the air quality of the unmonitored area, where the input data is the dynamic adjacency matrix between the stations in the area to be tested, and calculate the confidence interval of the prediction result by the following formula:

[0065]

[0066] in, is the air quality prediction value output by the model, z is the confidence interval coefficient, and σ is the standard deviation generated by the uncertainty estimation network.

[0067] It should be noted that the calculation of the confidence interval is intended to provide a measure of the credibility of the model's prediction results. By introducing the standard deviation and confidence interval coefficient, a range can be set for the predicted value to reflect the uncertainty of the model's prediction, especially when the data is sparse or the environment is complex.

[0068] It is understood that the value of the confidence interval coefficient z depends on the required confidence level. Usually at a 95% confidence level, the z value is 1.96, which means that the probability that the predicted result falls within this interval is 95%. The selection of an appropriate confidence level can be adjusted according to the actual application requirements.

[0069] It should be understood that the standard deviation is part of the uncertainty estimate, which is used to measure the prediction error of the model under given conditions. The larger the standard deviation, the lower the confidence of the model in the prediction, and the wider the confidence interval; the smaller the standard deviation, the more reliable the prediction of the model, and the narrower the confidence interval. Therefore, the width of the confidence interval can effectively reflect the reliability of the prediction results.

[0070] In addition, an air quality prediction system provided by the present invention adopts an air quality prediction method in the above embodiment to solve a technical problem of air quality prediction. Compared with the prior art, the beneficial effects of an air quality prediction system provided by the present invention are the same as the beneficial effects of an air quality prediction method provided by the above embodiment, and other technical features in the air quality prediction system are the same as the features disclosed in the above embodiment method, which will not be described in detail here.

[0071] The present invention provides an air quality prediction device, please refer to Figure 2, an air quality prediction device includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute an air quality prediction method in the above-mentioned embodiment 1. An air quality prediction device in the embodiment of the present invention may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. An air quality prediction device is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention. An air quality prediction device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM) 1004. In RAM1004, various programs and data required for the operation of an air quality prediction device are also stored. Processing device 1001, ROM1002 and RAM1004 are connected to each other via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to I / O interface 1006: input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication device 1009. Communication device 1009 can allow an air quality prediction device to communicate wirelessly or wired with other devices to exchange data. Although an air quality prediction device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.

[0072] The present invention also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the steps of the air quality prediction method described above are implemented. The computer program product provided by the present invention can solve a technical problem of air quality prediction. Compared with the prior art, the beneficial effects of the computer program product provided by the present invention are the same as the beneficial effects of the air quality prediction method provided by the above embodiment, and will not be described in detail here.

[0073] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present invention are executed.

[0074] It should be understood that the various parts disclosed in the present invention can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0075] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. An air quality prediction method, characterized in that: The air quality prediction method comprises: Step S10: collecting historical data from multiple data sources, including the air quality index A, temperature data T, and traffic flow TRA of the monitoring station, and using a normalization method to normalize the features of the multiple data sources to obtain the spatiotemporal correlation features X between the stations; Step S20: Based on the spatiotemporal correlation feature X obtained in step S10, a dynamic adjacency matrix between monitoring sites is constructed, where the weight W of the dynamic adjacency matrix is t (i,j) is calculated by the following formula: Where i is the i-th site, j is the j-th site, and W t (i, j) is the dynamic weight between monitoring sites i and j at time t, δ is the distance decay factor, d(i, j) is the geographical distance between sites i and j, ρ is the similarity weight factor, X(i, t) is the spatiotemporal correlation feature of site i at time t, X(j, t) is the spatiotemporal correlation feature of site j at time t, ‖X(i, t)‖ and ‖X(j, t)‖ are the moduli of the spatiotemporal correlation features of sites i and j, respectively; Step S30: Establish a conditional generative adversarial network cGAN model, wherein the generator used in the cGAN model includes a conditional convolutional network module and an attention time series encoding module. The conditional convolutional network module extracts spatial features by dynamically adjusting convolution kernel parameters according to different environmental conditions; the attention time series encoding module extracts the dependency of the time series through a multi-head attention method to capture the time trend of air quality changes; Step S40: training the conditional generative adversarial network model in step S30, the input data is the dynamic adjacency matrix between sites obtained by processing the standard sample data from step S10 to step S20, the output data is the actual result of the standard sample air quality, the multi-layer loss function used in the training process includes contrast loss, mean square error loss and uncertainty loss, and the expression of the multi-layer loss function is: L=λ1·L contrast +λ2·L mse +λ3·L uncertainty Among them, L contrast is the contrast loss term, L mse is the mean square error loss, L uncertainty is the uncertainty loss term, λ1, λ2, λ3 are the weight coefficients of each loss term; Step S50: Use the trained conditional generative adversarial network model to predict the air quality of the unmonitored area and output the prediction results, where the input data is the dynamic adjacency matrix between the sites in the area to be tested, and the prediction results include the air quality prediction report and the corresponding confidence interval calculation results.

2. An air quality prediction method as claimed in claim 1, characterized in that: In step S10, the temporal and spatial correlation characteristics X between the sites are obtained by processing using the formula: where X is the comprehensive spatiotemporal correlation feature of site i and site j at time t, α, β, and γ are weight coefficients, A(i, t) and A(j, t) are the air quality indexes of site i and site j at time t, respectively, ‖A(i, t)‖ and ‖A(j, t)‖ are the modulus lengths of the air quality indexes of site i and site j at time t, respectively; T(i, t) and T(j, t) are the temperature data of site i and site j at time t, respectively, ‖T(i, t)‖ and ‖T(j, t)‖ are the modulus lengths of the corresponding temperature data, respectively; TRA(i, t) and TRA(j, t) are the traffic flow data of site i and site j at time t, respectively, ‖TRA(i, t)‖ and ‖TRA(j, t)‖ are the modulus lengths of the corresponding traffic flow data, respectively.

3. An air quality prediction method as claimed in claim 1, characterized in that: In step S40, the comparison loss is measured using cosine similarity.

4. The air quality prediction method according to claim 1, characterized in that: In step S50, the confidence interval is calculated as follows: in, is the air quality prediction value output by the model, z is the confidence interval coefficient, and σ is the standard deviation generated by the uncertainty estimation network.

5. An air quality prediction method as claimed in claim 4, characterized in that: The standard deviation σ generated by the uncertainty estimation network is generated by a Bayesian neural network.

6. The air quality prediction method according to claim 1, characterized in that: The discriminator of the conditional generative adversarial network described in step S30 prevents overfitting by adding a regularization term.

7. An air quality prediction method according to claim 1, characterized in that: The default value of the confidence interval coefficient z in step S50 is 1.96, and can be set according to actual needs.

8. An air quality prediction system, characterized in that: The air quality prediction system comprises: The data collection and feature calculation module is used to collect historical data from multiple data sources, including the air quality index A, temperature data T, and traffic flow TRA of the monitoring station, and use the normalization method to standardize the features of multiple data sources to obtain the spatiotemporal correlation feature X between the stations; The dynamic adjacency matrix construction module is used to construct a dynamic adjacency matrix between monitoring sites based on the spatiotemporal correlation feature X obtained in step S10, where the weight W of the dynamic adjacency matrix is t (i,j) is calculated by the following formula: Where i is the i-th site, j is the j-th site, and W t (i, j) is the dynamic weight between monitoring sites i and j at time t, δ is the distance decay factor, d(i, j) is the geographical distance between sites i and j, ρ is the similarity weight factor, X(i, t) is the spatiotemporal correlation feature of site i at time t, X(j, t) is the spatiotemporal correlation feature of site j at time t, ‖X(i, t)‖ and ‖X(j, t)‖ are the moduli of the spatiotemporal correlation features of sites i and j, respectively; The conditional generative adversarial network model building module is used to build a conditional generative adversarial network cGAN model. The generator used in the cGAN model includes a conditional convolutional network module and an attention time series encoding module. The conditional convolutional network module extracts spatial features by dynamically adjusting the convolution kernel parameters according to different environmental conditions; the attention time series encoding module extracts the long-term dependency of the time series through a multi-head attention method to capture the time trend of air quality changes; The model training and loss optimization module is used to train the conditional generative adversarial network model in step S30. The input data is the dynamic adjacency matrix between sites obtained by processing the standard sample data from step S10 to step S20. The output data is the actual result of the standard sample air quality. The multi-layer loss function used in the training process includes contrast loss, mean square error loss and uncertainty loss. The expression of the multi-layer loss function is: L=λ1·L contrast +λ2·L mse +λ3·L uncertainty Among them, L contrast is the contrast loss term, L mse is the mean square error loss, L uncertainty is the uncertainty loss term, λ1, λ2, λ3 are the weight coefficients of each loss term; The prediction and confidence interval calculation module is used to use the trained conditional generative adversarial network model to predict the air quality of unmonitored areas and output the prediction results. The input data is the dynamic adjacency matrix between the sites in the area to be tested. The prediction results include the air quality prediction report and the corresponding confidence interval calculation results.

9. An air quality prediction device, characterized in that: The air quality prediction device comprises: A memory, a processor, and an air quality prediction program stored in the memory and executable on the processor, wherein the air quality prediction program, when executed by the processor, implements the air quality prediction method described in any one of claims 1 to 7.

10. A computer program product, characterized in that The computer program product includes an air quality prediction program, and when the air quality prediction program is executed by a processor, it implements the air quality prediction method described in any one of Claims 1 to 7.

Citation Information

Patent Citations

  • Air quality prediction method based on traffic jam index and multi-source data fusion

    CN117494034A

  • Air quality prediction method

    CN118072873A

  • Air quality prediction method based on deep spatiotemporal similarity

    WO2022217839A1

Cited By

  • Universe pollutant diffusion field simulation method and system based on sparse data

    CN119920369A

  • Air quality prediction method and program product

    CN121434673A