Methods and apparatus for analyzing the formation mechanism of air pollutants

By preprocessing historical data of air pollutants and performing meteorological normalization, combined with the XGBoost model and SHAP analysis, the problems of the difficulty in accurately depicting the distribution pattern of air pollutant concentrations and the inability of the model to be interpreted in existing technologies have been solved, enabling in-depth research into the formation mechanism of air pollutants and precise prevention and control.

CN120708767BActive Publication Date: 2026-06-30HANGZHOU INTERNATIONAL INNOVATION INSTITUTE OF BEIHANG UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU INTERNATIONAL INNOVATION INSTITUTE OF BEIHANG UNIVERSITY
Filing Date
2025-08-26
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing technologies are insufficient to accurately depict the distribution patterns of atmospheric pollutant concentrations, and conventional machine learning models, due to their "black box" nature, cannot clearly demonstrate the actual effects of each compound on the formation of atmospheric pollutants, and the influence of meteorological factors is not fully considered.

Method used

By collecting historical data on various air pollutants in the target area, performing preprocessing and meteorological normalization operations, training the XGBoost prediction model, and conducting SHAP interpretability analysis, the contribution of each chemical substance or meteorological factor to air pollution is quantified.

Benefits of technology

It has enabled accurate prediction of changes in atmospheric pollutant concentrations and in-depth analysis of the underlying chemical principles, providing a solid theoretical basis and scientific guidance for the precise prevention and control of air pollution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120708767B_ABST
    Figure CN120708767B_ABST
Patent Text Reader

Abstract

This application relates to the field of atmospheric pollutant analysis technology, and particularly to a method and apparatus for analyzing the formation mechanism of atmospheric pollutants. The method includes: collecting historical data of multiple atmospheric pollutants in a target area and preprocessing them to obtain standard historical data of atmospheric pollutants corresponding to each historical pollutant; performing meteorological normalization on the standard historical data of atmospheric pollutants to generate corresponding normalized historical meteorological data to train a pre-constructed XGBoost prediction model; and performing SHAP interpretability analysis on the trained XGBoost prediction model during the online analysis phase to obtain the atmospheric pollution contribution of each chemical substance in the target area. This solves the problems of existing technologies' inability to accurately characterize the distribution patterns of atmospheric pollutant concentrations, and the inability of conventional machine learning models to clearly demonstrate the actual effect of each compound on the formation of atmospheric pollutants due to their "black box" nature.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of atmospheric pollutant analysis technology, and in particular to a method and apparatus for analyzing the formation mechanism of atmospheric pollutants. Background Technology

[0002] Currently, accurately analyzing the multiphase formation mechanisms of air pollutants, especially clarifying the contribution spectrum and reaction pathways of key precursors, is of great scientific value for formulating differentiated emission reduction strategies and achieving precision pollution control. However, most existing technologies are used for air pollutant concentrations, but due to their "black box" nature, they cannot clearly demonstrate the actual effect of each compound on the formation of air pollutants. For example, existing technologies can be improved by providing a system that includes a data acquisition module, a preprocessing module, an LSTM (Long Short-Term Memory)-RNN (Recurrent Neural Network) model training module, and a prediction output module. This system collects long-term series pollutant concentration data of a target city, performs normalization and missing value imputation, and then inputs the data into a neural network with 5 hidden layers of LSTM for training, ultimately outputting the predicted pollutant concentration results. This method utilizes the gating mechanism of LSTM to capture temporal features and achieves data modeling through weight matrices and activation functions.

[0003] However, existing technologies still have the following drawbacks:

[0004] 1. The "black box" characteristic of conventional machine learning models:

[0005] LSTM-RNN models, as a type of deep learning model, are generally considered "black box" models. While existing LSTM-RNN models demonstrate high accuracy in predicting air pollutant concentrations, they struggle to intuitively explain the internal decision-making processes and causal relationships between various factors. Understanding the physical mechanisms and scientific principles behind the predictions is crucial for researchers and practitioners in environmental science. However, this "black box" nature makes it difficult to derive a deep understanding and explanation of pollutant concentration changes from the model, limiting its application value in scientific research and policy making.

[0006] 2. The impact of meteorological factors was not fully considered:

[0007] Existing technologies rely solely on preprocessing and modeling the air pollutant concentration data itself, without effectively integrating and normalizing meteorological data with pollutant concentration data, thus failing to fully utilize meteorological information to improve forecasting performance.

[0008] In summary, existing technologies are insufficient to accurately depict the distribution patterns of atmospheric pollutant concentrations, and conventional machine learning models, due to their "black box" nature, cannot clearly demonstrate the actual effects of each compound on the formation of atmospheric pollutants, which urgently needs to be addressed. Summary of the Invention

[0009] This application provides a method and apparatus for analyzing the formation mechanism of air pollutants, in order to solve the problems that existing technologies are unable to accurately characterize the distribution pattern of air pollutant concentrations, and that conventional machine learning models cannot clearly demonstrate the actual effect of each compound on the formation of air pollutants due to their "black box" characteristics.

[0010] The first aspect of this application provides a method for analyzing the formation mechanism of air pollutants, applied in the offline training phase, comprising the following steps: collecting historical data of multiple air pollutants in a target area, and preprocessing the historical data of multiple air pollutants to obtain standard historical data of air pollutants corresponding to the historical data of each air pollutant; performing meteorological normalization on the standard historical data of air pollutants to generate corresponding normalized historical meteorological data; training a pre-constructed XGBoost prediction model using the normalized historical meteorological data, and performing SHAP interpretability analysis on the trained XGBoost prediction model in the online analysis phase to obtain the air pollution contribution of each chemical substance in the target area.

[0011] Optionally, in one embodiment of this application, the step of collecting historical data of multiple air pollutants in the target area and preprocessing the historical data of multiple air pollutants to obtain standard historical data of air pollutants corresponding to each historical data of air pollutants includes: performing data cleaning operations on the historical data of multiple air pollutants to obtain corresponding cleaned data, wherein the historical data of multiple air pollutants includes multiple chemical substances and multiple meteorological conditions; detecting whether there is missing data in the cleaned data, and if the missing data exists in the cleaned data, filling in the missing data to generate the corresponding standard historical data of air pollutants.

[0012] Optionally, in one embodiment of this application, the step of performing meteorological normalization on the historical data of standard air pollutants to generate corresponding normalized historical meteorological data includes: randomly sampling the historical data of standard air pollutants through multiple preset sliding windows to obtain meteorological sampling data corresponding to each sliding window; calculating the mean and standard deviation of the meteorological sampling data; and adjusting the concentration data of standard air pollutants in the historical data of standard air pollutants according to the mean and the standard deviation to generate the normalized historical meteorological data.

[0013] Optionally, in one embodiment of this application, training the pre-constructed XGBoost prediction model using the normalized historical meteorological data includes: using the atmospheric pollutant concentration data in the normalized historical meteorological data as labels to construct a corresponding training dataset; and inputting the training dataset into the XGBoost prediction model to train the XGBoost prediction model.

[0014] A second aspect of this application provides a method for analyzing the formation mechanism of air pollutants, applied in the online detection stage, comprising the following steps: collecting current air pollutant data of the target area and performing meteorological normalization processing on the current air pollutant data to obtain corresponding meteorological normalized data; inputting the meteorological normalized data into a pre-trained XGBoost prediction model and performing SHAP interpretability analysis on the XGBoost prediction model to obtain the SHAP value corresponding to each chemical substance or each meteorological factor in the current air pollutant data; and quantifying the air pollution contribution of each chemical substance or each meteorological factor to the generation of air pollutants based on the SHAP value.

[0015] A third aspect of this application provides an air pollutant formation mechanism analysis device, applied in an offline training phase, comprising: a first acquisition module for acquiring historical data of multiple air pollutants in a target area and preprocessing the historical data of multiple air pollutants to obtain standard air pollutant historical data corresponding to each historical data of air pollutants; a meteorological normalization module for performing meteorological normalization on the standard air pollutant historical data to generate corresponding normalized historical meteorological data; and a training module for training a pre-constructed XGBoost prediction model using the normalized historical meteorological data, and performing SHAP interpretability analysis on the trained XGBoost prediction model in an online analysis phase to obtain the air pollution contribution of each chemical substance in the target area.

[0016] Optionally, in one embodiment of this application, the first acquisition module includes: a data cleaning unit, used to perform data cleaning operations on the historical data of the multiple air pollutants to obtain corresponding cleaned data, wherein the historical data of the multiple air pollutants includes multiple chemical substances and multiple meteorological conditions; and a detection unit, used to detect whether there is missing data in the cleaned data, and, if there is missing data in the cleaned data, to fill in the missing data to generate corresponding standard historical data of air pollutants.

[0017] Optionally, in one embodiment of this application, the meteorological normalization module includes: a sampling unit, used to randomly sample the historical data of standard air pollutants through multiple preset sliding windows to obtain meteorological sampling data corresponding to each sliding window; and an adjustment unit, used to calculate the mean and standard deviation corresponding to the meteorological sampling data, and adjust the concentration data of standard air pollutants in the historical data of standard air pollutants according to the mean and the standard deviation to generate the normalized historical meteorological data.

[0018] Optionally, in one embodiment of this application, the training module includes: a construction unit, used to construct a corresponding training dataset by using the atmospheric pollutant concentration data in the normalized historical meteorological data as labels; and an input unit, used to input the training dataset into the XGBoost prediction model to train the XGBoost prediction model.

[0019] A fourth aspect of this application provides an air pollutant formation mechanism analysis device, applied in an online analysis phase, comprising: a second acquisition module, used to acquire current air pollutant data of the target area and perform meteorological normalization processing on the current air pollutant data to obtain corresponding meteorological normalized data; an analysis module, used to input the meteorological normalized data into a pre-trained XGBoost prediction model and perform SHAP interpretability analysis on the XGBoost prediction model to obtain the SHAP value corresponding to each chemical substance or each meteorological factor in the current air pollutant data; and a quantification module, used to quantify the air pollution contribution of each chemical substance or each meteorological factor to the generation of air pollutants based on the SHAP value.

[0020] A fifth aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the atmospheric pollutant formation mechanism analysis method as described in the above embodiments.

[0021] A sixth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for analyzing the formation mechanism of atmospheric pollutants.

[0022] A seventh aspect of this application provides a computer program product, including a computer program that is executed to implement the above-described method for analyzing the formation mechanism of atmospheric pollutants.

[0023] Therefore, the embodiments of this application have the following beneficial effects:

[0024] The embodiments of this application can collect historical data of multiple air pollutants in a target area and preprocess the historical data of multiple air pollutants to obtain standard historical data of air pollutants corresponding to each historical data of air pollutants. Meteorological normalization is performed on the standard historical data of air pollutants to generate corresponding normalized historical meteorological data. A pre-constructed XGBoost prediction model is trained using the normalized historical meteorological data. During the online analysis phase, SHAP (SHapley Additive exPlanations) interpretability analysis is performed on the trained XGBoost (eXtreme Gradient Boosting) prediction model to obtain the air pollution contribution of each chemical substance in the target area. This application, by using historical air pollutant concentration and related influencing factor data, employs the extreme gradient boosting algorithm, integrates weather data normalization processing procedures and SHAP parsing technology, to deeply explore the intrinsic mechanism of air pollutant formation. This allows researchers not only to accurately predict the changing trends of air pollutant concentrations but also to deeply analyze the underlying chemical principles, providing a solid theoretical basis and scientific guidance for the precise prevention and control of air pollution. This solves the problems that existing technologies cannot accurately depict the distribution patterns of atmospheric pollutant concentrations, and that conventional machine learning models, due to their "black box" nature, cannot clearly demonstrate the actual effects of each compound on the formation of atmospheric pollutants.

[0025] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0026] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0027] Figure 1 This is a flowchart illustrating an atmospheric pollutant formation mechanism analysis method applied during the offline training phase, according to an embodiment of this application.

[0028] Figure 2 A meteorological normalization comparison diagram is provided for one embodiment of this application;

[0029] Figure 3 This is a flowchart illustrating an atmospheric pollutant formation mechanism analysis method applied in the online analysis stage, according to an embodiment of this application.

[0030] Figure 4 This is a schematic diagram illustrating the execution logic of an atmospheric pollutant formation mechanism analysis method according to an embodiment of this application;

[0031] Figure 5This is an example diagram of an atmospheric pollutant formation mechanism analysis device applied in the offline training phase according to an embodiment of this application;

[0032] Figure 6 This is an example diagram of an atmospheric pollutant formation mechanism analysis device applied in the online analysis stage according to an embodiment of this application;

[0033] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0034] Among them, 10-atmospheric pollutant formation mechanism analysis device applied to the offline training stage, 20-atmospheric pollutant formation mechanism analysis device applied to the online analysis stage; 101-first acquisition module, 102-meteorological normalization module, 103-training module; 201-second acquisition module, 202-analysis module, 203-quantization module; 701-memory, 702-processor, 703-communication interface. Detailed Implementation

[0035] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0036] The following describes a method and apparatus for analyzing the formation mechanism of air pollutants according to embodiments of this application, with reference to the accompanying drawings. Addressing the problems mentioned in the background section, this application provides a method for analyzing the formation mechanism of air pollutants. In this method, historical data of multiple air pollutants in a target area are collected and preprocessed to obtain standard historical data for each air pollutant. Meteorological normalization is performed on the standard historical data to generate corresponding normalized historical meteorological data. A pre-constructed XGBoost prediction model is trained using the normalized historical meteorological data. During the online analysis phase, SHAP interpretability analysis is performed on the trained XGBoost prediction model to obtain the air pollution contribution of each chemical substance in the target area. This application, based on historical air pollutant concentration and related influencing factor data, employs an extreme gradient boosting algorithm, integrates weather data normalization processing procedures and SHAP parsing technology, to deeply explore the intrinsic mechanism of air pollutant formation. This allows researchers to not only accurately predict the changing trends of air pollutant concentrations but also deeply analyze the underlying chemical principles, providing a solid theoretical basis and scientific guidance for the precise prevention and control of air pollution. This solves the problems that existing technologies cannot accurately depict the distribution patterns of atmospheric pollutant concentrations, and that conventional machine learning models, due to their "black box" nature, cannot clearly demonstrate the actual effects of each compound on the formation of atmospheric pollutants.

[0037] Specifically, Figure 1 This is a flowchart illustrating an analysis method for the formation mechanism of atmospheric pollutants applied during the offline training phase, as provided in an embodiment of this application.

[0038] like Figure 1 As shown, the analytical method for the formation mechanism of air pollutants includes the following steps:

[0039] In step S101, historical data of various air pollutants in the target area are collected, and the historical data of various air pollutants are preprocessed to obtain the standard historical data of air pollutants corresponding to the historical data of each air pollutant.

[0040] The embodiments of this application firstly collect historical data of various air pollutants and preprocess them to obtain corresponding standard historical data of air pollutants, thereby improving the quality and reliability of the corresponding data.

[0041] Optionally, in one embodiment of this application, historical data of multiple air pollutants in the target area are collected, and the historical data of multiple air pollutants are preprocessed to obtain standard historical data of air pollutants corresponding to each historical data of air pollutants. This includes: performing data cleaning operations on the historical data of multiple air pollutants to obtain corresponding cleaned data, wherein the historical data of multiple air pollutants includes multiple chemical substances and multiple meteorological conditions; detecting whether there is missing data in the cleaned data, and filling in the missing data if there is missing data in the cleaned data to generate the corresponding standard historical data of air pollutants.

[0042] It should be noted that before conducting atmospheric pollutant concentration analysis, the embodiments of this application first need to systematically collect various relevant data, including pollutant concentrations (i.e., historical data of various atmospheric pollutants), which cover a variety of potential influencing factors, such as meteorological conditions.

[0043] Secondly, embodiments of this application can perform a series of preprocessing steps on the collected data. The preprocessing work mainly includes data cleaning to remove or correct erroneous or inconsistent data records; handling missing values, which may employ mean imputation, interpolation, or other statistical methods to estimate missing data points; and outlier handling, which identifies and processes data points that are far from the normal range to prevent them from adversely affecting the analysis results.

[0044] Therefore, through the above-described meticulous preprocessing operations, the embodiments of this application ensure the accuracy and completeness of the dataset used for model training and analysis, laying a solid foundation for a deeper understanding of the generation mechanism of air pollutants.

[0045] In step S102, meteorological normalization is performed on the historical data of standard air pollutants to generate corresponding normalized historical meteorological data.

[0046] Furthermore, embodiments of this application may employ a 14-day sliding window random sampling method to perform meteorological normalization on historical data of standard air pollutants, thereby fully capturing the variation characteristics of air pollutant concentrations over a longer time scale, while avoiding deviations caused by seasonal or periodic factors.

[0047] Therefore, by employing a meteorological normalization method, this application provides a new perspective and powerful tool for the accurate measurement of atmospheric pollutant concentrations and in-depth research on their formation mechanisms.

[0048] Optionally, in one embodiment of this application, meteorological normalization is performed on historical standard air pollutant data to generate corresponding normalized historical meteorological data. This includes: randomly sampling the historical standard air pollutant data through multiple preset sliding windows to obtain meteorological sampling data corresponding to each sliding window; calculating the mean and standard deviation of the meteorological sampling data; and adjusting the concentration data of the standard air pollutants in the historical standard air pollutant data according to the mean and standard deviation to generate normalized historical meteorological data.

[0049] In actual implementation, the meteorological normalization operation in this application embodiment involves fine processing of the collected data such as atmospheric pollutant concentrations (i.e., historical data of various atmospheric pollutants) to eliminate the potential influence of non-pollutant factors, such as meteorological conditions like temperature, humidity, and wind speed, on the observed pollutant concentration values.

[0050] As one possible approach, the normalization process in this application typically involves randomly sampling meteorological data over a 14-day sliding window and adjusting pollutant concentration values ​​accordingly to reflect true levels under standard meteorological conditions, such as... Figure 2 As shown.

[0051] Therefore, by applying meteorological normalization technology, the embodiments of this application adjust the data to a common meteorological baseline state, which helps to ensure the consistency and comparability of the analysis results.

[0052] In step S103, a pre-built XGBoost prediction model is trained using normalized historical meteorological data. In the online analysis phase, the trained XGBoost prediction model is subjected to SHAP interpretability analysis to obtain the atmospheric pollution contribution of each chemical substance in the target area.

[0053] Those skilled in the art should understand that in the field of atmospheric pollutant concentration research, the interference of meteorological factors has always been a key challenge affecting data accuracy and mechanism analysis. This application's embodiments, by proposing a meteorological normalization technique and utilizing the powerful capabilities of machine learning, fundamentally eliminate the interference of meteorological factors on atmospheric pollutant concentrations.

[0054] Specifically, this application employs a composite method combining 14-day sliding window random sampling, thousand-times repeated dataset construction, and XGBoost prediction mean, which is applied for the first time to the processing of air pollutant concentration data. Specifically, the 14-day sliding window random sampling effectively captures the dynamic changes in air pollutant concentrations over a longer timescale, while avoiding biases caused by seasonal or periodic factors. The thousand-times repeated dataset construction further enhances the stability and reliability of the data, reducing the impact of random errors. Finally, this application utilizes the XGBoost model to predict the constructed dataset and takes its mean as the final result. This process not only improves the accuracy of the prediction but also greatly ensures the reliability of the prediction results.

[0055] Optionally, in one embodiment of this application, training a pre-built XGBoost prediction model using normalized historical meteorological data includes: using atmospheric pollutant concentration data in the normalized historical meteorological data as labels to construct a corresponding training dataset; and inputting the training dataset into the XGBoost prediction model to train the XGBoost prediction model.

[0056] It should be noted that the embodiments of this application can utilize meteorologically normalized data (i.e., normalized historical meteorological data) to construct an XGBoost-based prediction model (i.e., an XGBoost prediction model). In the XGBoost prediction model, the XGBoost algorithm can be used to train a model capable of accurately predicting changes in atmospheric pollutant concentrations. In the embodiments of this application, meteorologically normalized data can be input into the XGBoost prediction model, and the algorithm can learn the complex relationship between various meteorological factors and pollutant concentrations, and thereby predict the possible changes in pollutant concentrations under different meteorological conditions.

[0057] Therefore, the embodiments of this application utilize normalized historical meteorological data to train the XGBoost prediction model, thereby not only improving the accuracy of predictions but also enhancing the model's ability to generalize to new data, making it a powerful tool for environmental monitoring and pollution control strategy formulation.

[0058] In summary, this application embodiment utilizes meteorological normalization methods and leverages the powerful capabilities of machine learning to integrate three strategies: "14-day sliding window random sampling," "thousand-times repeated dataset construction," and "XGBoost predicted mean." Specifically, this application embodiment first employs 14-day sliding window random sampling to fully capture the changing characteristics of atmospheric pollutant concentrations over a longer timescale, while avoiding biases caused by seasonal or periodic factors. Second, this application embodiment can repeatedly construct the dataset thousands of times, thereby greatly enriching the diversity of the data, effectively reducing errors caused by randomness, and ensuring the stability and reliability of the dataset. Finally, this application embodiment can use the XGBoost model to predict the constructed dataset and take its mean as the final result. As an advanced machine learning algorithm, XGBoost possesses excellent predictive capabilities and anti-overfitting characteristics, enabling it to accurately extract key information from massive amounts of data. Through this combined strategy, the embodiments of this application have successfully eliminated the interference of meteorological factors on the concentration of air pollutants, making the air pollutant concentration data more accurately reflect its inherent chemical formation mechanism. This provides a solid and reliable data foundation for subsequent in-depth research on the formation, transformation and transport processes of air pollutants, and powerfully promotes the progress of atmospheric environmental science research.

[0059] The atmospheric pollutant formation mechanism analysis method proposed in this application, applied to the offline training phase, involves collecting historical data of multiple atmospheric pollutants in the target area and preprocessing this data to obtain standard historical data for each pollutant. Meteorological normalization is then performed on the standard historical data to generate corresponding normalized historical meteorological data. A pre-constructed XGBoost prediction model is trained using this normalized historical meteorological data. During the online analysis phase, the trained XGBoost prediction model undergoes SHAP interpretability analysis to obtain the atmospheric pollution contribution of each chemical substance within the target area. This application, based on historical atmospheric pollutant concentration and related influencing factor data, employs an extreme gradient boosting algorithm, integrates weather data normalization processing procedures, and SHAP parsing technology to deeply explore the intrinsic mechanisms of atmospheric pollutant formation.

[0060] Figure 3 This is a flowchart illustrating an analytical method for analyzing the formation mechanism of atmospheric pollutants in the online analysis phase, as provided in an embodiment of this application.

[0061] like Figure 3 As shown, the analytical method for the formation mechanism of air pollutants includes the following steps:

[0062] In step S301, current air pollutant data for the target area is collected, and meteorological normalization processing is performed on the current air pollutant data to obtain the corresponding meteorological normalized data.

[0063] In step S302, the meteorological normalized data is input into the pre-trained XGBoost prediction model, and the SHAP interpretability analysis is performed on the XGBoost prediction model to obtain the SHAP value corresponding to each chemical substance or each meteorological factor in the current air pollutant data.

[0064] In step S303, the contribution of each chemical substance or meteorological factor to the generation of air pollutants is quantified based on the SHAP value.

[0065] In practical implementation, embodiments of this application can perform SHAP interpretability analysis on the trained XGBoost prediction model. Specifically, in embodiments of this application, SHAP can quantify the role of features such as different chemical substances or meteorological factors in model prediction by calculating the contribution of each feature to the model output and applying Shapley value theory from game theory to the machine learning model. This method can reveal the specific impact of each feature on the prediction results, helping to understand how the model makes decisions based on input data, and enhancing the transparency and credibility of the model.

[0066] Therefore, through SHAP analysis, the embodiments of this application can identify which characteristics are key factors affecting the prediction of air pollutant concentrations, thereby providing a more accurate and reliable basis for environmental science and policy making.

[0067] Subsequently, embodiments of this application employ SHAP value analysis to precisely quantify the specific contribution of each chemical substance to the formation process of air pollutants. In its implementation, SHAP value analysis provides a transparent way to understand the model's internal decision-making logic by calculating the marginal contribution of each feature to the model's output prediction. This helps identify which chemical substances are key pollution sources, thereby guiding us to more effectively formulate targeted pollution control strategies, optimize environmental management measures, and provide a scientific basis for reducing air pollution.

[0068] Therefore, the embodiments of this application quantify the contribution of chemical substances to the generation of air pollutants by using SHAP values, thereby enabling a more accurate understanding of the relationship between chemical substances and air pollution, and allowing for more informed decisions in the fields of environmental protection and public health.

[0069] Understandably, in the field of research on the formation mechanisms of air pollutants, traditional machine learning models are often regarded as "black boxes" due to a lack of interpretability. This makes it difficult for researchers to understand the complex decision-making logic within the model and the causal relationships between various factors, thus limiting the depth and breadth of in-depth understanding of the air pollutant formation process. This application's embodiments, by deeply integrating an optimized XGBoost model with SHAP analysis technology, not only significantly improve the accuracy of the model's prediction of air pollutant concentrations but also endow the model with strong interpretability. The XGBoost model, with its advanced regularized objective function and second-order Taylor expansion optimization strategy, can efficiently process massive amounts of complex data and uncover deep-seated patterns hidden behind the data. SHAP analysis, based on Shapley values ​​in game theory, can quantify the specific contribution of each feature to the model's prediction results, clearly revealing the role mechanism of each chemical factor in the formation of air pollutants and the interactions between them. Therefore, this application's embodiments, by coupling XGBoost model optimization and SHAP interpretability analysis, enable researchers to accurately predict the changing trends of air pollutant concentrations, providing a solid theoretical basis and scientific guidance for the precise prevention and control of air pollution.

[0070] The execution logic of the atmospheric pollutant formation mechanism analysis method of this application will be explained below with reference to the accompanying drawings.

[0071] Figure 4 This is a schematic diagram illustrating the execution logic of the atmospheric pollutant formation mechanism analysis method of this application. Figure 4 As shown, the execution process of the atmospheric pollutant formation mechanism analysis method of this application is as follows:

[0072] S401: Collect air pollutant data and perform data preprocessing on the air pollutant data;

[0073] S402: Perform meteorological normalization on the preprocessed atmospheric pollutant data to obtain normalized data;

[0074] S403: Building and training an XGBoost prediction model using normalized data;

[0075] S404: Perform SHAP interpretability analysis on the trained XGBoost prediction model and obtain the corresponding SHAP value;

[0076] S405: Quantify the contribution of chemical substances to the formation of air pollutants using SHAP values.

[0077] The atmospheric pollutant formation mechanism analysis method proposed in this application, applied to the online analysis stage, involves collecting current atmospheric pollutant data for the target area and performing meteorological normalization on the data to obtain corresponding meteorological normalized data. This meteorological normalized data is then input into a pre-trained XGBoost prediction model, and SHAP interpretability analysis is performed on the XGBoost model to obtain the SHAP value corresponding to each chemical substance or meteorological factor in the current atmospheric pollutant data. Based on the SHAP value, the atmospheric pollution contribution of each chemical substance or meteorological factor in generating atmospheric pollutants is quantified. This application, by using historical atmospheric pollutant concentration and related influencing factor data, employs an extreme gradient boosting algorithm, integrates weather data normalization processing procedures and SHAP parsing technology, to deeply explore the intrinsic mechanism of atmospheric pollutant formation. This allows researchers not only to accurately predict the changing trends of atmospheric pollutant concentrations but also to deeply analyze the underlying chemical principles, providing a solid theoretical basis and scientific guidance for the precise prevention and control of air pollution.

[0078] Secondly, the atmospheric pollutant formation mechanism analysis apparatus proposed according to the embodiments of this application is described with reference to the accompanying drawings.

[0079] Figure 5 This is a block diagram of an atmospheric pollutant formation mechanism analysis device applied to the offline training phase according to an embodiment of this application.

[0080] like Figure 5 As shown, the atmospheric pollutant formation mechanism analysis device 10 applied to the offline training phase includes: a first acquisition module 101, a meteorological normalization module 102, and a training module 103.

[0081] The first acquisition module 101 is used to acquire historical data of multiple air pollutants in the target area and preprocess the historical data of multiple air pollutants to obtain the standard historical data of air pollutants corresponding to the historical data of each air pollutant.

[0082] The meteorological normalization module 102 is used to perform meteorological normalization operations on standard air pollutant historical data to generate corresponding normalized historical meteorological data.

[0083] Training module 103 is used to train a pre-built XGBoost prediction model using normalized historical meteorological data, so as to perform SHAP interpretability analysis on the trained XGBoost prediction model during the online analysis phase to obtain the atmospheric pollution contribution of each chemical substance in the target area.

[0084] Optionally, in one embodiment of this application, the first acquisition module 101 includes a data cleaning unit and a detection unit.

[0085] The data cleaning unit is used to perform data cleaning operations on historical data of various air pollutants to obtain corresponding cleaned data. The historical data of various air pollutants includes various chemical substances and various meteorological conditions.

[0086] The detection unit is used to detect whether there is missing data in the cleaning data, and if there is missing data, it fills in the missing data to generate corresponding standard historical data of air pollutants.

[0087] Optionally, in one embodiment of this application, the meteorological normalization module 102 includes a sampling unit and an adjustment unit.

[0088] The sampling unit is used to randomly sample historical data of standard air pollutants through multiple preset sliding windows to obtain meteorological sampling data corresponding to each sliding window.

[0089] The adjustment unit is used to calculate the mean and standard deviation of the meteorological sampling data, and adjust the standard air pollutant concentration data in the historical standard air pollutant data according to the mean and standard deviation to generate normalized historical meteorological data.

[0090] Optionally, in one embodiment of this application, the training module 103 includes a construction unit and an input unit.

[0091] The construction unit is used to construct the corresponding training dataset by using the atmospheric pollutant concentration data in the normalized historical meteorological data as labels.

[0092] The input unit is used to input the training dataset into the XGBoost prediction model to train the XGBoost prediction model.

[0093] It should be noted that the foregoing explanation of the embodiment of the atmospheric pollutant formation mechanism analysis method applied to the offline training stage also applies to the atmospheric pollutant formation mechanism analysis device of the embodiment applied to the offline training stage, and will not be repeated here.

[0094] The atmospheric pollutant formation mechanism analysis device proposed in this application for offline training includes a first acquisition module 101, used to acquire historical data of multiple atmospheric pollutants in a target area and preprocess the historical data of multiple atmospheric pollutants to obtain standard atmospheric pollutant historical data corresponding to each historical data of atmospheric pollutants; a meteorological normalization module 102, used to perform meteorological normalization operation on the standard atmospheric pollutant historical data to generate corresponding normalized historical meteorological data; and a training module 103, used to train a pre-constructed XGBoost prediction model through normalized historical meteorological data, so as to perform SHAP interpretability analysis operation on the trained XGBoost prediction model in the online analysis stage to obtain the atmospheric pollution contribution of each chemical substance in the target area. This application, based on historical atmospheric pollutant concentration and related influencing factor data, employs an extreme gradient boosting algorithm, integrates weather data normalization processing procedures and SHAP parsing technology, to deeply explore the intrinsic mechanism of atmospheric pollutant formation. This enables researchers not only to accurately predict the changing trends of atmospheric pollutant concentrations but also to deeply analyze the underlying chemical principles, providing a solid theoretical basis and scientific guidance for the precise prevention and control of air pollution.

[0095] Figure 6 This is a block diagram of an atmospheric pollutant formation mechanism analysis device applied to the online analysis stage according to an embodiment of this application.

[0096] like Figure 6 As shown, the atmospheric pollutant formation mechanism analysis device 20 applied in the online analysis stage includes: a second acquisition module 201, an analysis module 202, and a quantification module 203.

[0097] The second acquisition module 201 is used to acquire current air pollutant data in the target area and perform meteorological normalization processing on the current air pollutant data to obtain corresponding meteorological normalized data.

[0098] Analysis module 202 is used to input meteorological normalized data into a pre-trained XGBoost prediction model and perform SHAP interpretability analysis on the XGBoost prediction model to obtain the SHAP value corresponding to each chemical substance or each meteorological factor in the current air pollutant data.

[0099] Quantization module 203 is used to quantify the contribution of each chemical substance or meteorological factor to atmospheric pollution based on SHAP values.

[0100] It should be noted that the foregoing explanation of the embodiment of the method for analyzing the formation mechanism of air pollutants in the online analysis stage also applies to the air pollutant formation mechanism analysis device of this embodiment of the online analysis stage, and will not be repeated here.

[0101] The atmospheric pollutant formation mechanism analysis device proposed in this application, applied to the online analysis stage, includes a second acquisition module 201 for acquiring current atmospheric pollutant data of the target area and performing meteorological normalization processing on the current atmospheric pollutant data to obtain corresponding meteorological normalized data; an analysis module 202 for inputting the meteorological normalized data into a pre-trained XGBoost prediction model and performing SHAP interpretability analysis on the XGBoost prediction model to obtain the SHAP value corresponding to each chemical substance or meteorological factor in the current atmospheric pollutant data; and a quantification module 203 for quantifying the atmospheric pollution contribution of each chemical substance or meteorological factor to the generation of atmospheric pollutants based on the SHAP value. This application, by using historical atmospheric pollutant concentration and related influencing factor data, employs an extreme gradient boosting algorithm, integrates weather data normalization processing procedures and SHAP parsing technology, to deeply explore the intrinsic mechanism of atmospheric pollutant formation. This enables researchers not only to accurately predict the changing trends of atmospheric pollutant concentrations but also to deeply analyze the underlying chemical principles, providing a solid theoretical basis and scientific guidance for the precise prevention and control of atmospheric pollution.

[0102] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:

[0103] The memory 701, the processor 702, and the computer program stored on the memory 701 and executable on the processor 702.

[0104] When the processor 702 executes the program, it implements the atmospheric pollutant formation mechanism analysis method provided in the above embodiments.

[0105] Furthermore, electronic devices also include:

[0106] Communication interface 703 is used for communication between memory 701 and processor 702.

[0107] The memory 701 is used to store computer programs that can run on the processor 702.

[0108] The memory 701 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0109] If the memory 701, processor 702, and communication interface 703 are implemented independently, then the communication interface 703, memory 701, and processor 702 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0110] Optionally, in a specific implementation, if the memory 701, processor 702, and communication interface 703 are integrated on a single chip, then the memory 701, processor 702, and communication interface 703 can communicate with each other through an internal interface.

[0111] The processor 702 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0112] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described method for analyzing the formation mechanism of atmospheric pollutants.

[0113] This application also provides a computer program product, including a computer program, which, when executed, is used to implement the above-described method for analyzing the formation mechanism of atmospheric pollutants.

[0114] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0115] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0116] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0117] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0118] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0119] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0120] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0121] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. A method for analyzing the formation mechanism of air pollutants, applied in the offline training phase, characterized in that, Includes the following steps: Historical data of multiple air pollutants in the target area are collected, and the historical data of multiple air pollutants are preprocessed to obtain the standard historical data of air pollutants corresponding to the historical data of each air pollutant. Meteorological normalization is performed on the historical data of the standard air pollutants to generate corresponding normalized historical meteorological data; The pre-constructed XGBoost prediction model is trained using the normalized historical meteorological data. During the online analysis phase, the trained XGBoost prediction model is subjected to SHAP interpretability analysis to obtain the atmospheric pollution contribution of each chemical substance in the target area. The process of collecting historical data on multiple air pollutants in the target area and preprocessing the historical data on multiple air pollutants to obtain standard historical data on air pollutants corresponding to each historical data on air pollutants includes: performing data cleaning operations on the historical data on multiple air pollutants to obtain corresponding cleaned data, wherein the historical data on multiple air pollutants includes multiple chemical substances and multiple meteorological conditions; The system detects whether there is missing data in the cleaning data, and if there is missing data, it fills in the missing data to generate corresponding standard historical data of air pollutants. The step of performing meteorological normalization on the historical data of the standard air pollutants to generate corresponding normalized historical meteorological data includes: The historical data of the standard air pollutants are randomly sampled through multiple preset sliding windows to obtain meteorological sampling data corresponding to each sliding window. A 14-day sliding window is used for random sampling. Calculate the mean and standard deviation of the meteorological sampling data, and adjust the standard air pollutant concentration data in the historical standard air pollutant data according to the mean and standard deviation to generate the normalized historical meteorological data; The XGBoost prediction model, trained using the normalized historical meteorological data, includes: Using the atmospheric pollutant concentration data in the normalized historical meteorological data as labels, a corresponding training dataset is constructed. The training dataset is input into the XGBoost prediction model to train the XGBoost prediction model; An atmospheric pollutant formation mechanism analysis method used in the offline training phase is applied to the online analysis phase, wherein the method includes the following steps: Collect current air pollutant data for the target area and perform meteorological normalization processing on the current air pollutant data to obtain corresponding meteorological normalized data; The meteorological normalized data is input into a pre-trained XGBoost prediction model, and SHAP interpretability analysis is performed on the XGBoost prediction model to obtain the SHAP value corresponding to each chemical substance or each meteorological factor in the current air pollutant data. Based on the SHAP value, the contribution of each chemical substance or meteorological factor to the generation of air pollutants is quantified.

2. An analytical device for analyzing the formation mechanism of atmospheric pollutants, used in the offline training phase, characterized in that, include: The first acquisition module is used to acquire historical data of multiple air pollutants in the target area and preprocess the historical data of multiple air pollutants to obtain the standard historical data of air pollutants corresponding to the historical data of each air pollutant. The meteorological normalization module is used to perform meteorological normalization operations on the historical data of the standard air pollutants to generate corresponding normalized historical meteorological data. The training module is used to train a pre-built XGBoost prediction model using the normalized historical meteorological data, and to perform SHAP interpretability analysis on the trained XGBoost prediction model during the online analysis phase to obtain the atmospheric pollution contribution of each chemical substance in the target area. The first acquisition module includes: a data cleaning unit, used to perform data cleaning operations on the historical data of the multiple air pollutants to obtain corresponding cleaned data, wherein the historical data of the multiple air pollutants includes multiple chemical substances and multiple meteorological conditions; and a detection unit, used to detect whether there is missing data in the cleaned data, and if there is missing data in the cleaned data, to fill in the missing data to generate corresponding standard historical data of air pollutants. The meteorological normalization module includes: a sampling unit, used to randomly sample the historical data of standard air pollutants through multiple preset sliding windows to obtain meteorological sampling data corresponding to each sliding window; and an adjustment unit, used to calculate the mean and standard deviation of the meteorological sampling data, and adjust the concentration data of standard air pollutants in the historical data of standard air pollutants according to the mean and the standard deviation to generate the normalized historical meteorological data. The training module includes: a construction unit, used to construct a corresponding training dataset by using the atmospheric pollutant concentration data in the normalized historical meteorological data as labels; and an input unit, used to input the training dataset into the XGBoost prediction model to train the XGBoost prediction model. An atmospheric pollutant formation mechanism analysis device used in the offline training phase is applied to the online analysis phase, including: a second acquisition module, used to acquire current atmospheric pollutant data of the target area, and to perform meteorological normalization processing on the current atmospheric pollutant data to obtain corresponding meteorological normalized data; The analysis module is used to input the meteorological normalized data into the pre-trained XGBoost prediction model and perform SHAP interpretability analysis on the XGBoost prediction model to obtain the SHAP value corresponding to each chemical substance or each meteorological factor in the current air pollutant data. A quantification module is used to quantify the atmospheric pollution contribution of each chemical substance or each meteorological factor to the generation of atmospheric pollutants based on the SHAP value.

3. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, the processor executing the program to implement the atmospheric pollutant formation mechanism analysis method as described in claim 1.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the atmospheric pollutant formation mechanism analysis method as described in claim 1.

5. A computer program product, comprising a computer program, characterized in that, The computer program is executed to implement the atmospheric pollutant formation mechanism analysis method as described in claim 1.