A pollution source tracing method based on time series trend mining
By predicting and trend analysis of pollutant monitoring values in the next day, combining built-in and Pearson impact factors, we determine the traceability time points and factors of pollution incidents, and realize the early control of pollution incidents, and solve the existing environmental management model. Pollution incidents are difficult to detect and contain problems in a timely manner.
Patent Information
- Application Number
- CN202411586394.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-08
AI Technical Summary
The existing environmental management model is difficult to detect and curb pollution incidents in a timely manner, resulting in an increase in governance costs and a reduction in governance effectiveness.
The pollution traceability method based on time series trend mining is adopted. By predicting and trend analysis of pollutant monitoring values in the future day, we can find out the time points that may need to be traced, and use the built-in impact factor and Pearson impact factor weighted sum. Determine the factors that affect the emergence of pollutants and control them in advance.
The advance traceability and control of pollution incidents has been achieved, the cost of governance has been reduced, and the governance effect has been improved.
Smart Images

Figure CN119128730B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pollution monitoring, and in particular to a pollution source tracing method of influencing factors based on time series trend mining. Background Art
[0002] In the practice of environmental protection management, some areas that affect the environment are listed as high-risk or key areas of concern (such as factory areas, construction sites, etc.). Due to the lack of infrastructure construction and the fault in policy implementation, environmental monitoring and pollution control measures often lag behind the actual occurrence of pollution, which undoubtedly aggravates the degree of environmental pollution and poses a direct threat to public health and ecological balance. The traditional environmental management model often focuses on post-event processing, that is, after the pollution incident occurs, the root cause of the problem is found through investigation and review, and corresponding rectification measures are formulated. However, this lagging management method is obviously difficult to meet the urgent needs of modern environmental protection, because it cannot contain the pollution before it has a large-scale impact, resulting in increased governance costs and reduced governance effects.
[0003] For example: a dust pollution incident occurred at 11 o'clock in a certain area of a city on a certain day. Due to the time difference of system transmission, the relevant law enforcement department received the pollution incident at 12 o'clock and immediately or in the afternoon sent law enforcement personnel to verify it. After arriving at the scene, most of the pollution indicators had been naturally decomposed and the remaining small part did not constitute a pollution incident. However, due to the lagging control, it was impossible to trace the cause of the dust pollution at 11 o'clock. Summary of the invention
[0004] The purpose of the present invention is to provide a pollution source tracing method based on influencing factors of time series trend mining. By predicting and analyzing the trend of pollutant monitoring values in the next day, the time point when tracing may be needed is found. The weighted sum of built-in influencing factors and Pearson influencing factors can be used to obtain the influencing factors that affect the occurrence of the pollutant, so as to control the influencing factors in advance and achieve early control and governance.
[0005] To achieve the above objectives, this application proposes the following solutions:
[0006] On the one hand, the present invention provides a pollution source tracing method based on time series trend mining, which specifically includes the following steps:
[0007] S1. Call the trained pollutant prediction model to obtain the pollutant prediction value of the pollutant monitoring value within the next day, and use the recursive method to cyclically compare and convert the pollutant prediction value into a trend sequence;
[0008] S2. Determine whether the predicted value of the pollutant with an upward trend in the trend sequence is greater than the source tracing threshold. If so, determine the time point corresponding to the predicted value of the pollutant as the abnormal point monitoring time and enter the pollution source tracing;
[0009] S3. Obtaining a time point for waiting for source tracing, where the time point for waiting for source tracing is the abnormal point monitoring time minus the pollution conversion time;
[0010] S4. Pull the influencing factor data corresponding to the time point waiting for tracing, extract the influencing features from the influencing factor data and input them into the influencing factor model to obtain the built-in influencing factor;
[0011] S5. Call the Pearson impact factor, perform weighted summation on the built-in impact factor and the Pearson impact factor, and obtain the correlation between each influencing feature and the cause of the abnormal point.
[0012] In some specific embodiments, the method for obtaining a trained pollutant prediction model is:
[0013] S11. Obtain historical monitoring data of the monitoring site, perform feature analysis on the historical monitoring data, and obtain pollutant characteristics of the site;
[0014] S12, obtaining historical gridded meteorological data, aggregating historical one-hour gridded meteorological data of each grid, and obtaining meteorological characteristics;
[0015] S13. The pollutant characteristics of the site are combined with the meteorological characteristics to obtain a predicted monitoring value training data set, and 24 pollutant prediction models are established. Each pollutant prediction model corresponds to an hour of data prediction. The predicted monitoring value training data set is used to train the corresponding pollutant prediction models to obtain trained pollutant prediction models.
[0016] In some specific implementations, the specific process of feature analysis in step S11 is:
[0017] S111, converting the data type of the historical monitoring data of the monitoring site, and completing the historical monitoring data after the type conversion by linear interpolation to obtain the monitoring data to be analyzed;
[0018] S112. The monitoring data to be analyzed are analyzed according to time characteristics and data series characteristics, where time characteristics include year, month, week, day, hour, daytime and nighttime characteristics; data series characteristics include the historical 3-hour average value of pollutant monitoring values, and the average, maximum, minimum and median of pollutant monitoring values at all the same time points within a month.
[0019] In some specific embodiments, the pollutant prediction model adopts the LightGBM model, and the parameters of the LightGBM model are selected by selecting the optimal hyperparameters through a grid search parameter optimization algorithm.
[0020] In some specific implementations, the specific process of obtaining the trend sequence is:
[0021] Determine the trend between the two adjacent pollutant prediction values. If the previous pollutant prediction value is greater than the next pollutant prediction value, then determine that the previous pollutant prediction value is on a downward trend, and convert the previous pollutant prediction value into a downward label value corresponding to the downward trend.
[0022] If the previous pollutant prediction value is less than the next pollutant prediction value, it is determined that the previous pollutant prediction value is on an upward trend, and the previous pollutant prediction value is converted into an upward label value corresponding to the upward trend;
[0023] If the previous pollutant prediction value is equal to the next pollutant prediction value, the previous pollutant prediction value is judged to be in a stable trend, and the previous pollutant prediction value is converted into a stable label value corresponding to the stable trend.
[0024] In some specific implementations, the specific process of obtaining the impact factor model is:
[0025] S41, obtaining historical influencing factor data, the influencing factor data including: monitoring site data, meteorological data of the grid where the site is located, traffic data of the grid where the site is located, and pollution characteristic data of the grid where the site is located;
[0026] S42, performing type conversion on the historical influencing factor data, and then using the merge function to combine and splice the type-converted monitoring site data, meteorological data, traffic data, and pollution feature data in the same hour to obtain an influencing feature training set;
[0027] S43. Using pollutant monitoring values as labels and feature data training sets as feature vectors, a regression model is established and trained to obtain an influencing factor model.
[0028] In some specific implementations, the historical influencing factor data specifically includes:
[0029] The monitoring site data includes the longitude, latitude, historical pollutant monitoring values, and the time when the pollutant monitoring values were uploaded.
[0030] Meteorological data include historical rainfall, cloud cover, temperature, humidity, wind speed, wind direction, atmospheric pressure, and meteorological data upload time of the grid where the monitoring station is located;
[0031] Traffic data includes the volume of slag trucks, traffic volume, traffic congestion coefficient, and traffic data upload time of the grid where the monitoring station is located;
[0032] Pollution characteristic data include simulated pollution emission data of the grid where the monitoring station is located, grid NO X Emissions, grid-based enterprise outlet emissions, and grid-based total electricity.
[0033] In some specific implementations, the specific process of step S42 is:
[0034] The historical pollutant monitoring values, historical rainfall, cloud cover, temperature, humidity, wind speed, wind direction, atmospheric pressure, slag truck traffic, traffic flow, traffic congestion coefficient, grid NO X The emissions, gridded enterprise outlet emissions, and gridded electricity totals were converted into floating-point numbers, and the pollutant monitoring value upload time, meteorological data upload time, and traffic data upload time were converted into time types.
[0035] In some specific embodiments, the method for training the regression model is: using the machine learning XGBoost model to fit the pollutant monitoring values, selecting the optimal hyperparameters of the XGBoost model parameters through a grid search parameter optimization algorithm, and using the XGBoost model to fit the feature_importances_feature importance function to obtain a built-in influencing factor.
[0036] In some specific implementations, the specific process of obtaining the Pearson impact factor is:
[0037] The pandas scientific processing library in Python is used to structure the reading of historical influencing factor data, and the corr function is used to calculate the linear correlation coefficient to obtain the Pearson impact factor.
[0038] The concept of the present invention is:
[0039] Since the existing methods of controlling pollutants are all post-event control, there is often a lag in tracing the causes of pollutants, making it impossible to conduct advance control of possible pollution situations and trace the causes of pollutants in a timely manner.
[0040] This application uses historical data to train a pollutant prediction model for the next 24 hours. These 24 models are scheduled to run at 23:00 every day to predict the pollutant monitoring values for the next 24 hours, and obtain the pollutant prediction values at 24 time points in a day. By analyzing the pollutant prediction values, it is possible to find the time point when pollution may increase without abnormal increase. The time point of the abnormal point is used, combined with the pollution conversion time required for pollutants to be generated and converted (such as PM 2.5The time from generation to reaching the outlier value is generally 2 hours), and the time point when the pollutant was generated (that is, the time point when waiting for tracing the source) can be obtained. Obtain the data of the influencing factors that may produce pollutants corresponding to the time point, extract the features of these influencing factors and input them into the trained influencing factor model, calculate the built-in influencing factors, and then combine them with the global influencing factors (Pearson influencing factors) to obtain the degree of correlation between various influencing factors and the causes of the outliers. In this way, the influencing factors at that time point can be eliminated in advance (for example, if the emissions increase abnormally due to traffic congestion, the traffic in the area can be controlled in advance)
[0041] The present invention has the beneficial effects:
[0042] The pollutant prediction model updated on the previous day is used to predict pollutants in the coming day. Trend analysis is performed on the predicted pollutant values at all time points. Anomalies are found based on the judgment result of whether the predicted pollutant values with an upward trend are greater than the traceability threshold. Based on the anomaly points and pollution conversion time, the traceability time point of the pollutant is obtained. The data at the traceability time point is analyzed with built-in influencing factors and global impact analysis, and the influencing factors that affect the generation of pollutants can be obtained. Then, the influencing factors can be controlled in advance, thereby achieving effective governance of the causes of pollutant generation.
[0043] The Pearson impact factor and the built-in impact factor can use the weighted summation method to mix errors and offset each other. By combining linear correlation with nonlinear correlation, a more scientific impact factor coefficient can be obtained to determine the influencing factors that lead to the generation of pollutants, thereby achieving precise control. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A flow chart of a pollution source tracing method provided by an embodiment of the present invention;
[0045] Figure 2 A schematic diagram of a method for obtaining a trend sequence provided by an embodiment of the present invention;
[0046] Figure 3 A schematic diagram of data distribution before and after data quality control processing provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] 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, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present invention and its application or use. 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.
[0048] The relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
[0049] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0050] Additionally, descriptions of well-known structures, functions, and configurations may be omitted for clarity and conciseness.One of ordinary skill in the art will recognize that various changes and modifications may be made to the examples described herein without departing from the spirit and scope of the present disclosure.
[0051] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.
[0052] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0053] Example 1
[0054] like Figure 1 As shown, this embodiment provides a pollution source tracing method of influencing factors based on time series trend mining, which specifically includes the following steps:
[0055] S1. Call the trained pollutant prediction model to obtain the pollutant prediction value of the pollutant monitoring value within the next day, and use the recursive method to cyclically compare and convert the pollutant prediction value into a trend sequence;
[0056] like Figure 2 As shown, the method to obtain the trained pollutant prediction model is:
[0057] S11. Obtain historical monitoring data of the monitoring site, perform feature analysis on the historical monitoring data, and obtain pollutant characteristics of the site;
[0058] The specific process of feature analysis in step S11 is as follows:
[0059] S111, converting the data type of the historical monitoring data of the monitoring site, and completing the historical monitoring data after the type conversion by linear interpolation to obtain the monitoring data to be analyzed;
[0060] S112. The monitoring data to be analyzed are analyzed according to time characteristics and data series characteristics, where time characteristics include year, month, week, day, hour, daytime and nighttime characteristics; data series characteristics include the historical 3-hour average value of pollutant monitoring values, and the average, maximum, minimum and median of pollutant monitoring values at all the same time points within a month.
[0061] S12, obtaining historical gridded meteorological data, aggregating historical one-hour gridded meteorological data of each grid, and obtaining meteorological characteristics;
[0062] S13. Merge the pollutant characteristics of the site with the meteorological characteristics to obtain the predicted monitoring value training data set, establish 24 pollutant prediction models, each pollutant prediction model corresponds to one hour of data prediction, and use the predicted monitoring value training data set to train the corresponding pollutant prediction models to obtain trained pollutant prediction models. The pollutant prediction model uses the LightGBM model, and the parameters of the LightGBM model are selected by the grid search parameter optimization algorithm to select the optimal hyperparameters.
[0063] Specifically, the specific process of obtaining the trend sequence is:
[0064] Determine the trend between the two adjacent pollutant prediction values. If the previous pollutant prediction value is greater than the next pollutant prediction value, then determine that the previous pollutant prediction value is on a downward trend, and convert the previous pollutant prediction value into a downward label value corresponding to the downward trend.
[0065] If the previous pollutant prediction value is less than the next pollutant prediction value, it is determined that the previous pollutant prediction value is on an upward trend, and the previous pollutant prediction value is converted into an upward label value corresponding to the upward trend;
[0066] If the previous pollutant prediction value is equal to the next pollutant prediction value, the previous pollutant prediction value is judged to be in a stable trend, and the previous pollutant prediction value is converted into a stable label value corresponding to the stable trend.
[0067] S2. Determine whether the predicted value of the pollutant with an upward trend in the trend sequence is greater than the traceability threshold. If so, determine the time point corresponding to the predicted value of the pollutant as the abnormal point monitoring time and enter the pollution traceability; (tracing the time point when the pollutant was generated)
[0068] S3. Obtaining a time point for waiting for source tracing, where the time point for waiting for source tracing is the abnormal point monitoring time minus the pollution conversion time;
[0069] S4. Pull the influencing factor data corresponding to the time point waiting for tracing, extract the influencing features from the influencing factor data and input them into the influencing factor model to obtain the built-in influencing factor corresponding to each influencing feature;
[0070] The specific process of obtaining the impact factor model is as follows:
[0071] S41, obtaining historical influencing factor data, the influencing factor data including: monitoring site data, meteorological data of the grid where the site is located, traffic data of the grid where the site is located, and pollution characteristic data of the grid where the site is located;
[0072] Specifically, the monitoring site data includes the longitude, latitude, historical pollutant monitoring values, and the time when the pollutant monitoring values were uploaded at the monitoring site;
[0073] Meteorological data include historical rainfall, cloud cover, temperature, humidity, wind speed, wind direction, atmospheric pressure, and meteorological data upload time of the grid where the monitoring station is located;
[0074] Traffic data includes the volume of slag trucks, traffic volume, traffic congestion coefficient, and traffic data upload time of the grid where the monitoring station is located;
[0075] Pollution characteristic data include simulated pollution emission data of the grid where the monitoring station is located, grid NO X Emissions, grid-based enterprise outlet emissions, and grid-based total electricity.
[0076] S42, performing type conversion on the historical influencing factor data, and then using the merge function to combine and splice the type-converted monitoring site data, meteorological data, traffic data, and pollution feature data in the same hour to obtain an influencing feature training set;
[0077] The historical pollutant monitoring values, historical rainfall, cloud cover, temperature, humidity, wind speed, wind direction, atmospheric pressure, slag truck traffic, traffic flow, traffic congestion coefficient, grid NO X The emissions, gridded enterprise outlet emissions, and gridded electricity totals were converted into floating-point numbers, and the pollutant monitoring value upload time, meteorological data upload time, and traffic data upload time were converted into time types.
[0078] S43. Using pollutant monitoring values as labels and feature data training sets as feature vectors, a regression model is established and trained to obtain an influencing factor model.
[0079] The method for training the regression model is: using the machine learning XGBoost model to fit the pollutant monitoring values, selecting the optimal hyperparameters of the XGBoost model parameters through the grid search parameter optimization algorithm, and using the XGBoost model to fit the feature_importances_ feature importance function to obtain the built-in influencing factors.
[0080] S5. Call the Pearson impact factor, perform weighted summation on the built-in impact factor and the Pearson impact factor, and obtain the correlation between each influencing feature and the cause of the abnormal point.
[0081] The specific process of obtaining the Pearson impact factor is:
[0082] The pandas scientific processing library in Python is used to structure the reading of historical influencing factor data, and the corr function is used to calculate the linear correlation coefficient to obtain the Pearson impact factor corresponding to each influencing factor.
[0083] In order to better illustrate the above process, the PM monitored at a monitoring station is 2.5 For example, other sites and other pollutant indicators can be analyzed using the following methods:
[0084] 1. Time series trend analysis
[0085] 1.1. Data reading: Get the historical monitoring data of the monitoring station for the past two years, including longitude, latitude, PM 2.5 Monitoring value and monitoring value release time.
[0086] 1.2. Data type conversion: longitude, latitude, PM 2.5 The monitoring value is converted to a floating point type, and the monitoring value release time is converted to a time type.
[0087] 1.3. Data quality control: locate missing values "0 or NULL" and abnormal values "discrete points" in historical monitoring data. If the monitoring value at a certain moment is 3 times or more than the historical 24-hour average value at that moment, it is determined to be an abnormal value. And use linear interpolation to supplement. Figure 3 shown.
[0088] 1.4. Feature Engineering:
[0089] 1.4.1. Time characteristics: including year, month, week, day, hour, daytime or nighttime (for example, 8 am to 8 pm is defined as daytime and represented by 1, and the rest of the time is defined as nighttime and represented by 0), whether it is a holiday (for example, a statutory holiday is represented by 1, and a non-holiday is represented by 0).
[0090] 1.4.2. Sequence characteristics: including PM 2.5The historical 3-hour average value of monitoring values, PM 2.5 The monitoring value history includes the average, maximum, minimum and median of the pollutant monitoring values at all the same time points in a month (for example, calculating the data at 10 am every day in January).
[0091] 1.5. Meteorological data: Read grid meteorological data from the database, where the read fields include grid ID, latitude and longitude of the upper left point of the grid, latitude and longitude of the lower right point of the grid, temperature, humidity, air pressure, cloud cover, solar radiation, wind speed, wind direction, and meteorological diffusion conditions.
[0092] 1.6. Data type conversion: The latitude and longitude of the lower left point of the grid, the latitude and longitude of the upper right point of the grid, temperature, humidity, air pressure, cloud cover, solar radiation, wind speed, wind direction, and meteorological diffusion conditions are converted into floating point numbers.
[0093] 1.7. Grid matching: Use the lower left point and upper right point of the grid to match longitude and latitude. The specific matching method is as follows: the longitude of the site is greater than or equal to the longitude of the lower left point of the grid, the latitude of the site is greater than or equal to the latitude of the lower left point of the grid, the longitude of the site is less than or equal to the longitude of the upper right point of the grid, and the latitude of the site is less than or equal to the latitude of the upper right point of the grid.
[0094] 1.8. Merge features: Merge the historical 1-hour meteorological data of the monitoring station with the sequence features in step 1.4.2;
[0095] 1.9. Build model: Select machine learning LightGBM model for PM 2.5 The pollution monitoring value is simulated and predicted starting from 0 o'clock, and the prediction result at 0 o'clock can be obtained. In this embodiment, 24 PM 2.5 The prediction model is run regularly at 23:00 the previous night to get the PM for the next 24 hours. 2.5 Prediction results. With label PM 2.5 Monitoring values, characterized by year, month, week, day, hour, daytime or nighttime, whether it is a holiday, PM 2.5 Historical 3-hour average, PM 2.5 The average value, maximum value, minimum value, median value, temperature, humidity, air pressure, cloud cover, solar radiation, wind speed, wind direction, meteorological diffusion conditions and other characteristics of the hour in the history of the month. The LightGBM model parameter selection uses the grid search parameter optimization algorithm to select the optimal hyperparameters. This model is a commonly used prediction model and will not be described in detail in this application.
[0096] 2. Impact factor calculation
[0097] 2.1 Data acquisition:
[0098] 2.1.1. Monitoring site data: Obtain the monitoring data of the monitoring site for the past two years, including longitude, latitude, historical pollutant monitoring values, and the time when the pollutant monitoring values were uploaded;
[0099] 2.1.2 Meteorological data: Obtain the meteorological data of the grid where the monitoring station is located, including rainfall, cloud cover, temperature, humidity, wind speed, wind direction, atmospheric pressure, and meteorological data upload time.
[0100] 2.1.3. Traffic data: obtain the slag truck flow, traffic flow, traffic congestion coefficient, and traffic data upload time of the grid where the monitoring station is located.
[0101] 2.1.4 Pollution characteristic data: obtain the simulated pollution emission data of the grid where the station is located, grid NO X Emissions, gridded enterprise outlet emissions, gridded electricity totals, and pollutant characteristic data upload time.
[0102] Among them, meteorological data, traffic data and pollution characteristic data all have simulated forecast data for the next N hours (i.e., using 24 PM 2.5 Prediction model predicts PM 2.5 Corresponding to the prediction features of 24h).
[0103] 2.2. Type conversion: Convert the monitoring values in the monitoring site data into floating point numbers, and convert the monitoring value release time into time type. Convert the precipitation, cloud cover, temperature, humidity, wind speed, wind direction, and atmospheric pressure in the meteorological data into floating point numbers, and convert the meteorological data upload time into time type. Convert the slag truck flow, traffic flow, and traffic congestion coefficient in the traffic data into floating point numbers, and convert the traffic data upload time into time type. X Emissions, gridded enterprise outlet emissions, and gridded electricity totals are converted to floating point numbers, and pollutant characteristic data upload time is converted to time type.
[0104] 2.3. Feature splicing: Use the Python language Pandas scientific processing library to structure the data in 2.2 above, and use the merge function to combine and splice the site data, meteorological data, traffic data, and pollution feature data in the same hour.
[0105] 2.4. Training regression model: This step uses the machine learning XGBoost model to fit PM 2.5 The impact factor that appears, and finally the impact factor estimation model is obtained, labeled PM 2.5 Monitoring values, characterized by rainfall, cloud cover, temperature, humidity, wind speed, wind direction, atmospheric pressure, slag truck flow, traffic flow, traffic congestion coefficient, grid NO XEmissions, grid enterprise outlet emissions, grid electricity totals, etc. XGBoost model parameter selection uses a grid search parameter optimization algorithm to select the optimal hyperparameters, which will not be described in this article.
[0106] 2.5. Built-in impact factor: Use the feature_importances_ feature importance function in the XGBoost model fitting training to calculate the built-in impact factor, recorded as .
[0107] 2.6. Pearson Impact Factor: Use the pandas scientific processing library in Python to structure the data after type conversion in step 2.2, and use the corr function to calculate the linear correlation coefficient. Finally, the Pearson Impact Factor corresponding to each impact feature is obtained. The Pearson Impact Factor is considered a global factor in this paper because it is calculated based on the full amount of data and can better reflect the global linear correlation. It is recorded as .
[0108] 3. Pollution tracing
[0109] 3.1. Obtain PM in the time series trend analysis of step 1 2.5 Future 24H trend forecast results of monitoring values.
[0110] 3.2. Trend conversion: Use recursive method to perform cyclic comparison to determine the upward and downward trend of data. For example: obtain the latitude of data for the next 24 hours, and determine whether the previous pollutant prediction value A1 is greater than the next pollutant prediction value A2. If A1 is greater than A2, it means that A1 is on a downward trend, and the predicted value of the pollutant with a downward trend is assigned 0. Otherwise, it is on an upward trend, and the predicted value of the pollutant with an upward trend is assigned 2. If they are equal, it is a stable trend, and the predicted value of the pollutant with a stable upward trend is assigned 1. 37, 16, 10, 12], and the trend sequence is [0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 1, 0, 0,0, 1, 0, 0, 0, 2, 2, 37, 16, 10, 12], then the trend sequence is [0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 1, 0, 0,0, 1, 0, 0, 0, 2, 2, 37, 16, 10, 12], and the trend sequence is [0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 1, 0, 0,0, 1, 0, 0, 0, 2, 2, 37, 16, 10, 12], then the trend sequence is [0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 1, 0, 0,0, 1, 0, 0, 0, 2, 2, 2,2, 0, 2, 2, 0, 2, 0, 0, 1, 2, 2, 0, 2, 2, 0, 0, 0, 2], 0 represents a downward trend, 1 represents a stable trend, and 2 represents an upward trend.
[0111] 3.3. Abnormal point monitoring: Based on the results of trend conversion, the time point with an upward trend can be quickly located, and it can be determined whether the predicted value of the pollutant with an upward trend is greater than the tracing threshold. The tracing threshold set in this embodiment is a dynamic threshold. This dynamic threshold is the average value of the pollutant predicted value 3 hours before the time point with an upward trend (in this embodiment, a certain time point is in an upward trend, and its corresponding pollutant predicted value is 44, and its tracing threshold is (25+13.5+22) / 3=20.16). It is determined whether the predicted value of the pollutant with an upward trend 44 is greater than 2 times the tracing threshold (20.16). Obviously, the time point 44 is greater than the tracing threshold, then the time point is an abnormal rising point, and pollution tracing is required.
[0112] 3.4. Pollution source tracing: Define the pollution conversion time (i.e., the estimated time from the generation of pollutants to the time when they can be monitored) to trace the pollution source of the abnormal point. The pollution conversion time set in this embodiment is 2 hours. Get the monitoring time of the abnormal point, subtract the artificial pollution conversion threshold from the abnormal point monitoring time, and get the time point for waiting for source tracing, PM 2.5 Predicted value.
[0113] 3.5. Calculation of influencing factors: Based on the time of waiting for source tracing, obtain the influencing factor data corresponding to the time point of waiting for source tracing. The influencing factor data includes the meteorological data, traffic data, pollution characteristic data corresponding to the time point in step 2.1, and the PM data at the time point. 2.5 PM obtained by prediction model 2.5 Then call the impact factor model, bring the impact factor data into the impact factor model, calculate the built-in impact factor corresponding to each impact feature, and then obtain the Pearson impact factor corresponding to each impact feature. Finally, through weighted summation, get the number of PMs that caused PM in that hour. 2.5 The biggest influencing characteristic factors. The Pearson impact factor and the built-in impact factor can use the weighted summation method to mix errors and offset each other. The linear correlation and nonlinear correlation are combined to obtain a more scientific impact factor coefficient. The specific calculation formula is as follows:
[0114]
[0115] Represents a list of impact features, Represents the model's built-in impact factor coefficient, Represents the built-in impact factor weight of the model, which can be set to 0.7. represents the Pearson impact factor coefficient, Represents the Pearson impact factor weight, which can be set to 0.3. It can be seen that both the built-in impact factor and the global impact factor are a set, and there are as many impact factors as there are feature parameters. In layman's terms, there is one impact factor for each parameter.
[0116] 3.6. Convenient for ranking the influencing factors of the impact characteristics that lead to the generation of pollutants: Based on Sequence, first The sequence is normalized to a percentage system and then sorted in ascending order to find the top three influencing characteristic factors, which are used as important potential factors for anomaly monitoring.
[0117]
[0118] Represents the impact factor sequence after normalization to percentage. Represents the minimum value of the calculated sequence. Represents the maximum value of the calculated sequence.
[0119] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. According to the technical essence of the present invention, within the spirit and principles of the present invention, any simple modification, equivalent replacement and improvement made to the above embodiment still falls within the protection scope of the technical solution of the present invention.
Claims
1. A pollution source tracing method based on time series trend mining, characterized in that: The specific steps include: S1. Call the trained pollutant prediction model to obtain the pollutant prediction value of the pollutant monitoring value within the next day, and use the recursive method to cyclically compare and convert the pollutant prediction value into a trend sequence; The method to obtain the trained pollutant prediction model is: S11. Obtain historical monitoring data of the monitoring site, perform feature analysis on the historical monitoring data, and obtain pollutant characteristics of the site; S12, obtaining historical gridded meteorological data, aggregating historical one-hour gridded meteorological data of each grid, and obtaining meteorological characteristics; S13, combining the pollutant characteristics of the site with the meteorological characteristics to obtain a predicted monitoring value training data set, establishing 24 pollutant prediction models, each pollutant prediction model corresponding to an hour of data prediction, and using the predicted monitoring value training data set to train the corresponding pollutant prediction models respectively to obtain trained pollutant prediction models; The specific process of obtaining the trend sequence is: Determine the trend between the two adjacent pollutant prediction values. If the previous pollutant prediction value is greater than the next pollutant prediction value, then determine that the previous pollutant prediction value is on a downward trend, and convert the previous pollutant prediction value into a downward label value corresponding to the downward trend. If the previous pollutant prediction value is less than the next pollutant prediction value, it is determined that the previous pollutant prediction value is on an upward trend, and the previous pollutant prediction value is converted into an upward label value corresponding to the upward trend; If the previous pollutant prediction value is equal to the next pollutant prediction value, the previous pollutant prediction value is judged to be in a stable trend, and the previous pollutant prediction value is converted into a stable label value corresponding to the stable trend; S2. Determine whether the predicted value of the pollutant with an upward trend in the trend sequence is greater than the source tracing threshold. If so, determine the time point corresponding to the predicted value of the pollutant as the abnormal point monitoring time and enter the pollution source tracing; S3. Obtaining a time point for waiting for source tracing, where the time point for waiting for source tracing is the abnormal point monitoring time minus the pollution conversion time; S4. Pull the influencing factor data corresponding to the time point waiting for tracing, extract the influencing features from the influencing factor data and input them into the influencing factor model to obtain the built-in influencing factor; The specific process of obtaining the impact factor model is as follows: S41, obtaining historical influencing factor data, the influencing factor data including: monitoring site data, meteorological data of the grid where the site is located, traffic data of the grid where the site is located, and pollution characteristic data of the grid where the site is located; S42, performing type conversion on the historical influencing factor data, and then using the merge function to combine and splice the type-converted monitoring site data, meteorological data, traffic data, and pollution feature data in the same hour to obtain a feature data training set; S43, using pollutant monitoring values as labels and feature data training sets as feature vectors, establishing and training a regression model to obtain an influencing factor model; S5. Call the Pearson impact factor, perform weighted summation on the built-in impact factor and the Pearson impact factor, and obtain the correlation between each influencing feature and the cause of the abnormal point.
2. According to claim 1, a pollution source tracing method based on time series trend mining is characterized in that: The specific process of feature analysis in step S11 is as follows: S111, converting the data type of the historical monitoring data of the monitoring site, and completing the historical monitoring data after the type conversion by linear interpolation to obtain the monitoring data to be analyzed; S112. The monitoring data to be analyzed are analyzed according to time characteristics and data series characteristics, where time characteristics include year, month, week, day, hour, daytime and nighttime characteristics; data series characteristics include the historical 3-hour average value of pollutant monitoring values, and the average, maximum, minimum and median values of pollutant monitoring values at all the same time points within a month.
3. According to claim 1, a pollution source tracing method based on time series trend mining is characterized in that: The pollutant prediction model adopts the LightGBM model, and the parameters of the LightGBM model are selected through the grid search parameter optimization algorithm to select the optimal hyperparameters.
4. According to claim 1, a pollution source tracing method based on time series trend mining is characterized in that: The historical influencing factor data specifically include: The monitoring site data includes the longitude, latitude, historical pollutant monitoring values, and the time when the pollutant monitoring values were uploaded. Meteorological data include historical rainfall, cloud cover, temperature, humidity, wind speed, wind direction, atmospheric pressure, and meteorological data upload time of the grid where the monitoring station is located; Traffic data includes the volume of slag trucks, traffic volume, traffic congestion coefficient, and traffic data upload time of the grid where the monitoring station is located; Pollution characteristic data include simulated pollution emission data of the grid where the monitoring station is located, grid NO X Emissions, grid-based enterprise outlet emissions, and grid-based total electricity.
5. According to claim 4, a pollution source tracing method based on time series trend mining is characterized in that: The specific process of step S42 is: The historical pollutant monitoring values, historical rainfall, cloud cover, temperature, humidity, wind speed, wind direction, atmospheric pressure, slag truck traffic, traffic flow, traffic congestion coefficient, grid NO X The emissions, gridded enterprise outlet emissions, and gridded electricity totals were converted into floating-point numbers, and the pollutant monitoring value upload time, meteorological data upload time, and traffic data upload time were converted into time types.
6. The pollution source tracing method based on time series trend mining of influencing factors according to claim 1 is characterized in that: The method for training the regression model is: using the machine learning XGBoost model to fit the pollutant monitoring values, selecting the optimal hyperparameters of the XGBoost model parameters through the grid search parameter optimization algorithm, and using the XGBoost model to fit the feature_importances_ feature importance function to obtain the built-in influencing factors.
7. The pollution source tracing method based on time series trend mining of influencing factors according to claim 1 is characterized in that: The specific process of obtaining the Pearson impact factor is: The pandas scientific processing library in Python is used to structure the reading of historical influencing factor data, and the corr function is used to calculate the linear correlation coefficient to obtain the Pearson impact factor.
Citation Information
Patent Citations
Atmospheric pollutant traceability system based on big data
CN118643456A
Pollution source online monitoring method and system
CN118839175A