NOx gas data analysis method and system
By cleaning, local feature analysis and low-dimensional spatial conversion of NOx gas data, combined with clustering and regression analysis, the problem of insufficient data accuracy in the existing technology is solved, more accurate emission source classification and trend prediction are achieved, and more scientific environmental monitoring and control strategies are supported.
Patent Information
- Application Number
- CN202411604753.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-28
AI Technical Summary
The prior art lacks effective data preprocessing and local feature analysis when processing large-scale gas data, resulting in insufficient accuracy of analysis results, affecting the accuracy of environmental monitoring and industrial emission control.
A NOx gas data analysis method is proposed, including data cleaning, local neighborhood calculation, low-dimensional spatial transformation, clustering analysis and regression analysis, through these steps, we can identify emission sources, analyze emission patterns and predict emission trends.
By finely processing NOx gas data, the data processing quality and applicability of analysis results are improved, the accuracy of emission source classification and the ability to predict emission trends are improved, and more scientific air quality control strategies are supported.
Smart Images

Figure CN119538077A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gas data analysis, and in particular to a NOx gas data analysis method and system. Background Art
[0002] The field of gas data analysis technology covers the science of detecting, measuring, and analyzing gas components using a variety of methods and tools. This field includes gas acquisition technology, data acquisition systems, and analysis algorithms to extract valuable information from complex gas samples. This technology is widely used in environmental monitoring, industrial process control, emission control, and meteorology. Especially in the field of environmental protection and climate change research, gas data analysis is essential for understanding and controlling atmospheric pollutants. Through this technology, scientists and engineers can assess air quality, optimize industrial production processes, and evaluate and implement environmental policies.
[0003] Among them, NOx gas data analysis methods refer to detection, quantification and data processing technologies specifically for nitrogen oxide (NOx) gases. NOx is a common air pollutant that mainly comes from automobile exhaust and industrial emissions, and has potential negative effects on human health and the environment. The purpose of NOx gas data analysis methods is to help monitor and control its levels in the environment by collecting and analyzing NOx concentration and distribution data. These data analysis results are of great use in developing more effective air quality management strategies, improving public health and complying with environmental protection regulations.
[0004] When processing large-scale gas data, existing technologies often lack effective data preprocessing and local feature analysis, resulting in insufficient accuracy of analysis results. In environmental monitoring and industrial emission control, this deficiency may lead to misjudgment of pollution events, which in turn affects the accuracy of policy formulation and implementation. For example, inaccurate emission source classification and emission trend prediction may lead to failure to monitor specific pollution sources, affecting the implementation of environmental protection measures. In addition, the lack of real-time data processing capabilities of existing technologies limits their application in emergency environmental events, highlighting their limitations in rapid response and real-time monitoring. Summary of the invention
[0005] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a NOx gas data analysis method and system.
[0006] In order to achieve the above object, the present invention adopts the following technical solution: a NOx gas data analysis method, comprising the following steps:
[0007] S1: Collect NOx emission data in time series, remove incomplete or outlier points in the data set, classify data using timestamps and values, define filtering conditions, select emission data exceeding the target threshold, and obtain an emission data list;
[0008] S2: Based on the emission data list, perform local neighborhood calculation of data points, construct linear relationships between adjacent data points, maintain the continuity of local features of the data, convert the data into a low-dimensional space, and establish a low-dimensional emission map;
[0009] S3: using the low-dimensional emission map, calculating the distance between data points, performing clustering of the data points based on the distance metric, classifying the emission sources according to the spatial location according to the clustering results, analyzing each clustering result, identifying the corresponding emission mode or source, and obtaining the emission source classification;
[0010] S4: Analyze multiple categories in the emission source classification, perform regression analysis on the time series data of multiple categories, calculate the trend line and change rate of emission intensity, monitor the time change of emission sources, and obtain emission trend results.
[0011] The emission data list includes the time point of exceeding the standard, the value size, and the screening threshold; the low-dimensional emission map includes data dimension simplification, adjacent relationship expression, and spatial mapping diagram; the emission source classification specifically refers to the spatial position, emission mode, and emission source coding; the emission trend results specifically refer to trend lines and change rates.
[0012] As a further solution of the present invention, the steps of obtaining the emission data list are specifically as follows:
[0013] S111: Collecting raw data of NOx emissions from monitoring sites, each data point including a timestamp and a NOx concentration value, obtaining complete data points with time tags through database query, and generating raw data records;
[0014] S112: Clean the raw data records, remove any data points with missing timestamps or concentration values, and filter out obviously abnormal data points, including negative concentration values or abnormally high concentration values, using the formula:
[0015]
[0016] Calculate the deviation and generate the cleaned data record;
[0017] Among them, x irepresents the NOx concentration of a single data point, which is used to calculate the NOx emission value of each monitoring point. μ represents the average NOx concentration of the data set, which is used as a comparison benchmark to measure the degree of deviation of each data point from the overall average level. σ represents the standard deviation, which is a statistical parameter that measures the dispersion of the concentration values of the data set and is used to normalize the deviation. n represents the total number of data points, which is used to determine the number of data points in the summing and averaging operations.
[0018] S113: classifying the cleaned data records into time series, grouping the data into daily and monthly data series according to the timestamp, setting a screening standard for each time period, selecting data points whose concentration exceeds the average value of the time period by 10% as high emission points, and generating time series classification records;
[0019] S114: Filter the emission data exceeding the target threshold from the time series classification records, compile the data points into a table, and obtain an emission data list.
[0020] As a further solution of the present invention, the step of obtaining the linear relationship between adjacent data points is specifically:
[0021] S211: selecting data points from the emission data list, defining a local neighborhood of each data point including data points with similar timestamps and concentration values, ensuring that the neighborhood set of each data point is sufficient for comparison, and generating a local neighborhood data set;
[0022] S212: Calculate the time difference and concentration difference for each data point pair of the local neighborhood data set, and apply the linear relationship formula:
[0023] R ij =a·(t j -t i )+b|log|c j -c i |
[0024] Quantify the linear relationship between adjacent data points and obtain the linear relationship parameters of the data point pairs;
[0025] Among them, R ij represents the strength of the linear relationship between data points i and j, t j ,t i Represent the timestamps of data points i and j, respectively, c j 、c i Represent the concentration values of data points i and j respectively, a is the influence weight of adjusting the time difference, and b is the influence weight of adjusting the concentration difference;
[0026] S213: Summarize the linear relationship parameters of all the data point pairs, analyze and integrate the linear relationships in all data sets, ensure the complete capture of local features of the data, and generate linear relationships between adjacent data points.
[0027] As a further solution of the present invention, the steps of obtaining the low-dimensional emission map are specifically as follows:
[0028] S221: Based on the linear relationship between the adjacent data points, extract key features and perform principal component analysis, perform dimensionality reduction processing on the data, select the number of principal components that retain key information, and generate a feature set after dimensionality reduction;
[0029] S222: Based on the feature set after dimensionality reduction, perform cluster analysis, select a matching clustering algorithm, cluster the distribution features of the data points in the low-dimensional space, classify the data points with the same features, and obtain a clustering result;
[0030] S223: According to the clustering results, multiple groups of data points are mapped to a low-dimensional space, and differentiated cluster groups are represented by colors and marks to generate a low-dimensional emission map.
[0031] As a further solution of the present invention, the step of obtaining the emission source classification is specifically:
[0032] S311: Using the low-dimensional emission map, calculate the distance between each data point on the map using the Euclidean distance formula:
[0033]
[0034] Ensure that the spatial distance between each data point can be quantified and a distance matrix can be generated;
[0035] Among them, d ij represents the Euclidean distance between the i-th data point and the j-th data point, x ik represents the coordinates of the i-th data point in the k-th dimension, x jk represents the coordinate of the jth data point in the kth dimension, and n represents the total number of dimensions of the data points;
[0036] S312: performing clustering of data points according to the distance matrix, applying a k-means clustering algorithm to group the data points based on a distance metric, wherein each group represents an emission source category, ensuring that the intra-class distance is minimized and the inter-class distance is maximized, and generating cluster labels;
[0037] S313: Analyze the cluster labels, analyze each cluster, identify the emission pattern or source of each category, including industrial emissions and traffic emissions, integrate the information, and generate an emission source classification.
[0038] As a further solution of the present invention, the steps for obtaining the emission trend results are specifically as follows:
[0039] S411: Analyze multiple categories in the emission source classification, organize the time series data of each category, perform data extraction of time and emission intensity, perform format conversion, call the linear regression model, and generate a regression analysis data set;
[0040] S412: Perform linear regression analysis on the regression analysis data set to calculate the trend line of emission intensity using the formula:
[0041]
[0042] The variation of emission intensity over time and external factors was evaluated by fitting a linear model to obtain trend line parameters;
[0043] Among them, Y represents emission intensity, X represents time, Z represents external factors, and β 0 represents the intercept, β 1 , β 2 represents the weight of the corresponding variable, ∈ represents the error term, and γ represents the external adjustment coefficient;
[0044] S413: Calculate the rate of change of emission intensity based on the trend line parameters, monitor the time change of each emission source by evaluating the slope of the trend line, integrate the time series data of multiple types of emission intensities, and generate emission trend results.
[0045] A NOx gas data analysis system, the NOx gas data analysis system is used to perform the above-mentioned NOx gas data analysis method, the system comprising:
[0046] The data screening module uses the completeness and outlier discrimination conditions based on the NOx emission data in the time series, checks and removes missing data points or extreme value parameters one by one, calls the timestamp and numerical index of the data, sorts the time period data continuously, classifies them by numerical range, identifies emission data that exceeds the target threshold from multiple types of data, and generates a target emission list;
[0047] The local feature generation module allocates associated feature values of multiple adjacent data points based on the target emission inventory, generates linear associations in sequence according to the relative positions and corresponding values of the multiple data points, performs local continuity measurement on multiple feature parameters in sequence, converts them into low-dimensional features through the ratio of positions and values, and generates low-dimensional emission features;
[0048] The spatial mapping module extracts and compares the relative distances of data points based on the low-dimensional emission features, determines the proximity distances between multiple points according to the spatial position sequence, constructs a global position table according to the proximity feature data of all points, screens the neighboring points by position coordinates, and generates proximity distance data;
[0049] The cluster classification module classifies by distance based on the neighboring distance data, selects the spatial location distribution of multiple adjacent data points, compares and verifies the independent categories of the spatial locations through distance values, extracts and determines the emission characteristics represented by the categories, determines the type of emission source according to the set of points in the same category, and generates the emission source classification results;
[0050] Based on the emission source classification results, the trend analysis module imports the time series data of multiple emission sources in the classification in turn, compares the numerical change sequences in multiple time periods, forms a trend curve by fitting the emission intensity of multiple categories point by point, calculates the change rate of emission intensity according to the slope of the curve, and generates emission trend characteristics.
[0051] Compared with the prior art, the advantages and positive effects of the present invention are:
[0052] In the present invention, the processing quality of the data and the applicability of the analysis results are improved by finely processing the NOx gas data from screening to analysis. The outliers are removed and the over-threshold data are screened to make the data set more accurate and easy to analyze. The local characteristics of the data are maintained and the clarity of the linear relationship between the data is improved by using local neighborhood calculation and low-dimensional space conversion. The emission sources are effectively classified by clustering and the specific emission patterns are identified. Through regression analysis, the emission trend is accurately predicted, which provides a scientific basis for formulating air quality control strategies and improves the efficiency and accuracy of environmental monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a schematic diagram of the workflow of the present invention;
[0054] Figure 2 A flow chart of the steps for obtaining the emission data inventory of the present invention;
[0055] Figure 3 A flow chart of the steps for obtaining the linear relationship between adjacent data points of the present invention;
[0056] Figure 4 A flow chart of the steps for obtaining a low-dimensional emission map of the present invention;
[0057] Figure 5 A flow chart of the steps for obtaining the emission source classification of the present invention;
[0058] Figure 6 This is a flow chart of the steps for obtaining emission trend results of the present invention. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0060] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.
[0061] Embodiment 1
[0062] See also Figure 1 The present invention provides a technical solution: a NOx gas data analysis method, comprising the following steps:
[0063] S1: Collect NOx emission data in time series, remove incomplete or outlier points in the data set, classify data using timestamps and values, define filtering conditions, select emission data exceeding the target threshold, and obtain an emission data list;
[0064] S2: Based on the emission data inventory, perform local neighborhood calculations on data points, build linear relationships between adjacent data points, maintain the continuity of local features of the data, transform the data into a low-dimensional space, and establish a low-dimensional emission map;
[0065] S3: Use the low-dimensional emission map to calculate the distance between data points, perform clustering of data points based on the distance metric, classify emission sources according to spatial location based on the clustering results, analyze each clustering result, identify the corresponding emission pattern or source, and obtain the emission source classification;
[0066] S4: Analyze multiple categories in the emission source classification, perform regression analysis on multi-category time series data, calculate the trend line and change rate of emission intensity, monitor the time changes of emission sources, and obtain emission trend results.
[0067] The emission data list includes the time point of exceeding the standard, the value size, and the screening threshold. The low-dimensional emission map includes data dimension simplification, adjacent relationship expression, and spatial mapping diagram. The emission source classification specifically refers to the spatial location, emission mode, and emission source coding. The emission trend results are specifically trend lines and change rates.
[0068] See also Figure 2 , the specific steps for obtaining the emission data inventory are:
[0069] S111: Collecting raw data of NOx emissions from monitoring sites, each data point including a timestamp and a NOx concentration value, obtaining complete data points with time tags through database query, and generating raw data records;
[0070] The original data of NOx emissions are collected from the monitoring sites and obtained through database query to ensure that each data point includes a timestamp and NOx concentration value. This process is implemented by writing SQL query statements, which screen the integrity of timestamps and concentration values and only select data points that include both types of information. The data is initially screened through the functions of the database management system to exclude any records that include empty fields. This operation ensures the integrity and availability of the data. The generated original data records include time tags. Each data point has been initially verified to ensure the quality of the data and the accuracy of subsequent processing.
[0071] S112: Perform data cleaning on the original data records, remove any data points with missing timestamps or concentration values, and filter out obviously abnormal data points, including negative concentration values or abnormally high values, using the formula:
[0072]
[0073] Calculate the deviation and generate the cleaned data record;
[0074] Among them, x i represents the NOx concentration of a single data point, which is used to calculate the NOx emission value of each monitoring point. μ represents the average NOx concentration of the data set, which is used as a comparison benchmark to measure the degree of deviation of each data point from the overall average level. σ represents the standard deviation, which is a statistical parameter that measures the dispersion of the concentration values of the data set and is used to normalize the deviation. n represents the total number of data points, which is used to determine the number of data points in the summing and averaging operations.
[0075] formula:
[0076]
[0077] The benefit of the formula is that by introducing the standard deviation σ, the sensitivity to the degree of deviation of the data points is enhanced, making the data cleaning process more targeted in identifying and eliminating statistical outliers.
[0078] Detailed explanation of the formula and the process of formula calculation and derivation:
[0079] There are five data points with NOx concentrations of 30, 45, 60, 90, and 120 ppm, respectively. The average value μ is 69 ppm, and the standard deviation σ is 33 ppm.
[0080] Substitute the formula to calculate as follows:
[0081] 1.|30-69| / 33=1.18
[0082] 2.|45-69| / 33=0.73
[0083] 3.|60-69| / 33=0.27
[0084] 4.|90-69| / 33=0.64
[0085] 5.|120-69| / 33=1.55
[0086] 6. Add these results to get 4.37, and divide by the total number of data points, 5, to get P = 0.874.
[0087] The results show that the average deviation of each data point is 0.874 standard deviations. This result reveals the general degree of deviation in the data set and is used to filter data within the standard deviation, thereby improving the quality of the data set and the accuracy of subsequent analysis.
[0088] S113: classify the cleaned data records into time series, group the data into daily and monthly data series according to the timestamp, set a screening standard for each time period, select data points whose concentration exceeds the average value of the time period by 10% as high emission points, and generate time series classification records;
[0089] The process of classifying the cleaned data records into time series and grouping the data into daily and monthly data series according to the timestamp involves time data processing. First, the system needs to extract the date and month information based on the timestamp attribute of the data point. This is achieved through the date and time functions in the programming language, including Python's datetime module. Then, the grouping function is used to classify the data of the same date or month together, and the screening criteria are defined for the data in each time period. This standard setting is based on the previous data analysis results, involving the average value determined by statistical calculations, including using Python's pandas library to calculate the average value and set the threshold, and screening data points that are 10% higher than the average value. This process requires not only data processing skills, but also statistical analysis capabilities to ensure the rationality of data classification and threshold setting, so that the processed data can effectively assist in environmental quality assessment.
[0090] S114: Filter emission data exceeding the target threshold from the time series classification records, compile the data points into a table, and obtain an emission data list.
[0091] The process of screening emission data that exceeds the target threshold from the time series classification records involves iterative analysis and screening of the classified data, using the set environmental standard threshold, such as a threshold set at 110% of the average value. This requires iterative checks on each classified data group to determine whether the data points therein exceed this threshold. This judgment process can be achieved by writing conditional query statements or using the filtering function of data processing software. Once a data point meets the over-threshold condition, it is recorded and organized into a table. Such a table lists all emission events that exceed the standard, providing data support for environmental monitoring and management, and ensuring that environmental regulatory authorities can carry out targeted emission control.
[0092] See also Figure 3 , the specific steps for obtaining the linear relationship between adjacent data points are:
[0093] S211: Select data points from the emission data inventory, define the local neighborhood of each data point to include data points with similar timestamps and concentration values, ensure that the neighborhood set of each data point is sufficient for comparison, and generate a local neighborhood data set;
[0094] Data points are selected from the emission data inventory. The selection of data points is based on the integrity and representativeness of the data, with emphasis on data points with similar timestamps and concentration values to ensure the comparability and reliability of the data. The selected data points will be used to define the local neighborhood of each point. This step is the basis for constructing a neighborhood data set. In this way, it is ensured that the data points in the local neighborhood have sufficient fit, thereby providing input data for subsequent linear relationship analysis.
[0095] S212: Calculate the time difference and concentration difference for each data point pair in the local neighborhood data set, and apply the linear relationship formula:
[0096] R ij =a·(t j -t i )+b·log|c j -c i |
[0097] Quantify the linear relationship between adjacent data points and obtain the linear relationship parameters of the data point pairs;
[0098] Among them, R ij represents the strength of the linear relationship between data points i and j, t j ,t i Represent the timestamps of data points i and j, respectively, c j 、c i Represent the concentration values of data points i and j respectively, a is the influence weight of adjusting the time difference, and b is the influence weight of adjusting the concentration difference;
[0099] formula:
[0100] R ij =a·(t j -t i )+b·log|c j -c i |
[0101] The benefit of the formula is that by combining the logarithmic processing of time difference and concentration difference, the impact of extreme values can be mitigated, while the linear combination form retains the impact weights of time and concentration, which is particularly critical when processing environmental data, because environmental data often exhibit nonlinear characteristics due to their natural fluctuations.
[0102] Detailed explanation of the formula and the process of formula calculation and derivation:
[0103] Suppose there are two data points, t i =1,t j =3, c i =100, c j =300, parameters a = 0.5, b = 0.3, calculate R ij as follows:
[0104] R ij =0.5·(3-1)·+0.3·log|300-100|
[0105] =0.5·2+0.3·log|200|
[0106] =1+0.3·2.301
[0107] =1+0.6903
[0108] =1.6903
[0109] The results show that the linear relationship between data points i and j can be quantified by the formula as 1.6903, which reflects the comprehensive difference in time and concentration between the two data points. For the step results, it means that the degree of linear dependence between the data points can be estimated based on the time and concentration differences between the data points.
[0110] S213: Summarize the linear relationship parameters of all data point pairs, analyze and integrate the linear relationships in all data sets, ensure the complete capture of local features of the data, and generate linear relationships between adjacent data points.
[0111] By summarizing the linear relationship parameters of all pairs of data points and analyzing the linear relationship in the entire data set, this process is not only a mathematical calculation, but also an analysis of data characteristics. By integrating the linear relationship parameters of each pair of data points, a global linear relationship graph can be constructed. This graph can intuitively show the dependency and change trend between data points. For the field of environmental monitoring and data analysis, this method provides an effective means to determine the mutual influence between data points.
[0112] See also Figure 4 , the steps to obtain the low-dimensional emission map are as follows:
[0113] S221: based on the linear relationship between adjacent data points, extract key features and perform principal component analysis, perform dimensionality reduction processing on the data, select the number of principal components that retain key information, and generate a feature set after dimensionality reduction;
[0114] The key features are extracted from the linear relationship between adjacent data points for principal component analysis. The process of selecting the number of principal components involves batch statistical analysis and matrix operations. First, the colinearity between multiple features is identified by calculating the covariance matrix of the data set. The eigenvalue and eigenvector analysis of the covariance matrix assist in determining the dimension of dimensionality reduction. Several principal components with larger eigenvalues are selected to retain the most original data variation information. Then, the current feature space is constructed based on the principal components. These steps together ensure that the key information of the data is retained, while removing redundancy and noise, generating a feature set after dimensionality reduction, and providing input data for the next step of clustering analysis.
[0115] S222: Based on the feature set after dimensionality reduction, perform cluster analysis, select a matching clustering algorithm, cluster the distribution features of the data points in the low-dimensional space, classify the data points with the same features, and obtain a clustering result;
[0116] Based on the feature set after dimensionality reduction, cluster analysis is performed and a matching clustering algorithm is selected. By grouping the data points, the distribution information of the data points is first extracted from the feature set. The initial cluster center is determined using the K-means clustering algorithm, and the distance from each data point to the cluster center is calculated. The data points are assigned to the nearest cluster according to the distance. This process is repeated until the clustering results are stable, that is, multiple data points no longer change, and multiple groups of clustering results are output.
[0117] S223: Based on the clustering results, multiple groups of data points are mapped to a low-dimensional space, and differentiated cluster groups are represented by colors and marks to generate a low-dimensional emission map.
[0118] According to the clustering results, multiple groups of data points are mapped to a low-dimensional emission map, the coordinates of the center point of each group of data are extracted, and the coordinates are used to generate corresponding marks on the map. Differentiated colors are used to distinguish multiple clustering groups, and the clustering marks are associated with the original data points to form an overall map effect. The low-dimensional emission map is output to ensure that it reflects the distribution and classification of the data.
[0119] See also Figure 5 , the specific steps for obtaining emission source classification are:
[0120] S311: Using the low-dimensional emission map, calculate the distance between each data point on the map using the Euclidean distance formula:
[0121]
[0122] Ensure that the spatial distance between each data point can be quantified and a distance matrix can be generated;
[0123] Among them, d ij represents the Euclidean distance between the i-th data point and the j-th data point, x ik represents the coordinates of the i-th data point in the k-th dimension, x jk represents the coordinate of the jth data point in the kth dimension, and n represents the total number of dimensions of the data points;
[0124] formula:
[0125]
[0126] The benefit of the formula is that by quantifying the spatial distance between data points, the relative positional relationship between multiple emission sources can be mathematically characterized, providing basic data for subsequent cluster analysis.
[0127] Detailed explanation of the formula and the process of formula calculation and derivation:
[0128] Suppose there are two data points A and B, whose coordinates in the low-dimensional space are x A =(1,2) and x B =4,6). According to the formula, the distance between two points is calculated as follows:
[0129]
[0130] The results show that the distance between point A and point B in the low-dimensional space is 5 units. This numerical result is used in cluster analysis to determine whether two points belong to the same category, thereby classifying the emission sources.
[0131] S312: performing clustering of data points according to the distance matrix, applying the k-means clustering algorithm to group the data points based on the distance metric, each group represents an emission source category, ensuring that the intra-class distance is minimized and the inter-class distance is maximized, and generating cluster labels;
[0132] The clustering analysis process based on the distance matrix first needs to set the parameters of the clustering algorithm, including the k value in the k-means algorithm. This value is determined based on the nature and distribution of the data and prior knowledge. The clustering algorithm iteratively processes the data, and each iteration adjusts the position of the cluster center to reduce the distance from each point to its cluster center until the minimum error is reached or the preset number of iterations is reached. Each iteration calculates the current cluster center and reallocates data points to the nearest cluster center. This process is repeated until the cluster center no longer changes or other stopping conditions are triggered. The generated cluster labels provide the basis for subsequent analysis.
[0133] S313: Analyze cluster labels, analyze each cluster, identify the emission pattern or source of each category, including industrial emissions and transportation emissions, integrate information, and generate emission source classification.
[0134] After completing the cluster analysis, the emission sources are classified by spatial location based on the clustering results. This classification is based on the geographical location and corresponding emission characteristics of each cluster, including industrial areas, residential areas or main traffic arteries. Cluster labels help determine which data points belong to the same emission source. The analysis of each cluster includes calculating the statistical characteristics of all data points in the cluster, including average emissions, emission concentration fluctuations, and reference to wind direction and surrounding terrain. The analysis results are the key basis for identifying and classifying emission sources, and provide scientific support for the formulation of corresponding environmental protection measures.
[0135] See also Figure 6 , the specific steps for obtaining emission trend results are:
[0136] S411: Analyze multiple categories in the emission source classification, organize the time series data of each category, perform data extraction of time and emission intensity, perform format conversion, call the linear regression model, and generate a regression analysis data set;
[0137] To extract data from multiple categories in the emission source classification, it is first necessary to establish the scope and objectives of data collection. According to the type of emission source, including industrial sources and transportation sources, the corresponding time series data, including emission intensity and associated time tags, are retrieved from the environmental monitoring database. The data extraction depends on the structured information stored in the database, and SQL queries or API calls are required to obtain the data. In addition, attention should be paid to the integrity and accuracy of the data during the data extraction process to ensure the effectiveness of subsequent analysis. The extracted data is then preprocessed, including removing missing values, processing outliers, and standardizing the data format to facilitate regression analysis.
[0138] S412: Perform linear regression analysis on the regression analysis data set and calculate the trend line of emission intensity using the formula:
[0139]
[0140] The variation of emission intensity over time and external factors was evaluated by fitting a linear model to obtain trend line parameters;
[0141] Among them, Y represents emission intensity, X represents time, Z represents external factors, and β 0 represents the intercept, β 1 , β 2 represents the weight of the corresponding variable, ∈ represents the error term, and γ represents the external adjustment coefficient;
[0142] formula:
[0143]
[0144] The benefits of the formula are:
[0145] By introducing time X, external factors Z and error adjustment terms This formula can more accurately predict and analyze the changes in emission intensity over time and the impact of external factors, thereby improving the accuracy and practicality of model predictions.
[0146] Detailed explanation of the formula and the process of formula calculation and derivation:
[0147] Set up emission data from three different months, the time X is 1, 2, 3, the emission intensity Y is 20, 40, 65, and the external factor Z, such as temperature, is 30, 25, 20. Set β 0 =5,β 1 =15,β 2 =-0.5, γ = 0.1, error ∈ is set to a random value of 5, and the calculation process is:
[0148] 1. For X = 1, Z = 30, calculate
[0149] 2. For X = 2, Z = 25, calculate
[0150] 3. For X=3, Z=20, calculate
[0151] The results show that through calculation, the emission intensity under differentiated time and differentiated external conditions can be predicted. The calculation results help to analyze how the emission intensity changes with time and external conditions, thereby providing data support for emission management.
[0152] S413: Calculate the rate of change of emission intensity based on trend line parameters, monitor the temporal changes of each emission source by evaluating the slope of the trend line, integrate time series data of multiple types of emission intensities, and generate emission trend results.
[0153] After completing the linear regression analysis, the calculated trend line parameters and change rates need to be used to monitor and evaluate the temporal changes in emission sources. The process includes comparing the trend line slope with the preset environmental standards to determine whether there is an upward or downward trend in emission intensity. This analysis needs to be combined with actual environmental policies and emission limits. The data is visualized through Matplotlib to make the emission trend more intuitive and provide data support for policymakers and environmental scientists. The generated emission trend results can determine which emission sources need to take control measures to achieve environmental protection goals.
[0154] A NOx gas data analysis system, the NOx gas data analysis system is used to perform the above-mentioned NOx gas data analysis method, the system comprises:
[0155] The data screening module uses the completeness and outlier discrimination conditions based on the NOx emission data in the time series, checks and removes missing data points or extreme value parameters one by one, calls the timestamp and numerical index of the data, sorts the time period data continuously, classifies them by numerical range, identifies emission data that exceeds the target threshold from multiple types of data, and generates a target emission list;
[0156] The local feature generation module allocates the associated feature values of multiple adjacent data points based on the target emission inventory, generates linear associations in sequence according to the relative positions and corresponding values of multiple data points, performs local continuity measurement on multiple feature parameters in sequence, converts them into low-dimensional features through the ratio of positions and values, and generates low-dimensional emission features;
[0157] The spatial mapping module extracts and compares the relative distances of data points based on low-dimensional emission features, determines the proximity distances between multiple points according to the spatial position sequence, builds a global position table according to the proximity feature data of all points, filters neighboring points by position coordinates, and generates proximity distance data;
[0158] The clustering classification module is based on the proximity distance data, classifies by distance, selects the spatial location distribution of multiple adjacent data points, compares and verifies the independent categories of the spatial location through the distance value, extracts and determines the emission characteristics represented by the category, determines the type of emission source based on the set of points in the same category, and generates the emission source classification result;
[0159] Based on the emission source classification results, the trend analysis module imports the time series data of multiple emission sources in the classification in turn, compares the numerical change sequences in multiple time periods, forms a trend curve by fitting the emission intensity of multiple categories point by point, calculates the change rate of emission intensity according to the slope of the curve, and generates emission trend characteristics.
[0160] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.
Claims
1. A NOx gas data analysis method, characterized in that: The following steps are involved: Collect NOx emission data in time series, remove incomplete or outlier points in the data set, classify data using timestamps and values, define filtering conditions, select emission data that exceeds the target threshold, and obtain an emission data list; Based on the emission data list, perform local neighborhood calculations of data points, construct linear relationships between adjacent data points, maintain the continuity of local features of the data, transform the data into a low-dimensional space, and establish a low-dimensional emission map; Using the low-dimensional emission map, calculating the distance between data points, performing clustering of the data points based on the distance metric, classifying the emission sources according to the spatial location according to the clustering results, analyzing each clustering result, identifying the corresponding emission mode or source, and obtaining the emission source classification; Analyze multiple categories in the emission source classification, perform regression analysis on the time series data of multiple categories, calculate the trend line and change rate of emission intensity, monitor the time change of emission sources, and obtain emission trend results.
2. The NOx gas data analysis method according to claim 1, characterized in that: The emission data list includes the time point of exceeding the standard, the value size, and the screening threshold; the low-dimensional emission map includes data dimension simplification, adjacent relationship expression, and spatial mapping diagram; the emission source classification specifically refers to the spatial position, emission mode, and emission source coding; the emission trend results specifically refer to trend lines and change rates.
3. The NOx gas data analysis method according to claim 2, characterized in that: The steps for obtaining the emission data inventory are specifically as follows: Collect the raw data of NOx emissions from the monitoring site. Each data point includes a timestamp and NOx concentration value. Obtain the complete data point with time tag through database query to generate the raw data record. The raw data records are cleaned to remove any data points with missing timestamps or concentration values, and to filter out obviously abnormal data points, including negative concentration values or abnormally high concentration values, using the formula: Calculate the deviation and generate the cleaned data record; Among them, x i represents the NOx concentration of a single data point, which is used to calculate the NOx emission value of each monitoring point. μ represents the average NOx concentration of the data set, which is used as a comparison benchmark to measure the degree of deviation of each data point from the overall average level. σ represents the standard deviation, which is a statistical parameter that measures the dispersion of the concentration values of the data set and is used to normalize the deviation. n represents the total number of data points, which is used to determine the number of data points in the summing and averaging operations. Classify the cleaned data records into time series, group the data into daily and monthly data series according to the timestamp, set screening criteria for each time period, select data points whose concentration exceeds the time period average by 10% as high emission points, and generate time series classification records; The emission data exceeding the target threshold are screened from the time series classification records, and the data points are compiled into a table to obtain an emission data list.
4. The NOx gas data analysis method according to claim 3, characterized in that: The steps for obtaining the linear relationship between adjacent data points are specifically as follows: Select data points from the emission data list, define a local neighborhood of each data point including data points with similar timestamps and concentration values, ensure that the neighborhood set of each data point is sufficient for comparison, and generate a local neighborhood data set; For each data point pair of the local neighborhood data set, the time difference and concentration difference are calculated, and the linear relationship formula is applied: R ij =a·(t j -t i )+b·log|c j -c i | Quantify the linear relationship between adjacent data points and obtain the linear relationship parameters of the data point pairs; Among them, R ij represents the strength of the linear relationship between data points i and j, t j ,t i Represent the timestamps of data points i and j, respectively, c j 、c i Represent the concentration values of data points i and j respectively, a is the influence weight of adjusting the time difference, and b is the influence weight of adjusting the concentration difference; The linear relationship parameters of all the data point pairs are summarized, the linear relationships in all data sets are analyzed and integrated, the local features of the data are fully captured, and the linear relationships between adjacent data points are generated.
5. The NOx gas data analysis method according to claim 4, characterized in that: The steps for obtaining the low-dimensional emission map are specifically as follows: Based on the linear relationship between the adjacent data points, key features are extracted and principal component analysis is performed to reduce the dimension of the data, the number of principal components that retain key information is selected, and a feature set after dimensionality reduction is generated; Based on the feature set after dimensionality reduction, cluster analysis is performed, a matching clustering algorithm is selected, distribution features of data points in the low-dimensional space are clustered, data points with similar features are classified, and clustering results are obtained; According to the clustering results, multiple groups of data points are mapped to a low-dimensional space, and differentiated cluster groups are represented by colors and marks to generate a low-dimensional emission map.
6. The NOx gas data analysis method according to claim 5, characterized in that: The steps for obtaining the emission source classification are specifically as follows: Using the low-dimensional emission map, the distance between each data point on the map is calculated using the Euclidean distance formula: Ensure that the spatial distance between each data point can be quantified and a distance matrix can be generated; Among them, d ij represents the Euclidean distance between the i-th data point and the j-th data point, x ik represents the coordinates of the i-th data point in the k-th dimension, x jk represents the coordinate of the jth data point in the kth dimension, and n represents the total number of dimensions of the data points; Perform clustering of the data points according to the distance matrix, apply a k-means clustering algorithm to group the data points based on the distance metric, each group represents an emission source category, ensure that the intra-class distance is minimized and the inter-class distance is maximized, and generate cluster labels; The cluster labels are analyzed, each cluster is analyzed, the emission pattern or source of each category is identified, including industrial emissions and transportation emissions, the information is integrated, and an emission source classification is generated.
7. The NOx gas data analysis method according to claim 6, characterized in that: The steps for obtaining the emission trend results are specifically as follows: Analyze multiple categories in the emission source classification, organize the time series data of each category, perform data extraction of time and emission intensity, perform format conversion, call the linear regression model, and generate a regression analysis data set; A linear regression analysis is performed on the regression analysis data set to calculate the trend line of emission intensity using the formula: The variation of emission intensity over time and external factors was evaluated by fitting a linear model to obtain trend line parameters; Among them, Y represents emission intensity, X represents time, Z represents external factors, β0 represents the intercept, β1 and β2 represent the weights of the corresponding variables, ∈ represents the error term, and γ represents the external adjustment coefficient; According to the trend line parameters, the rate of change of emission intensity is calculated, the temporal change of each emission source is monitored by evaluating the slope of the trend line, and the time series data of multiple types of emission intensity are integrated to generate emission trend results.
8. A NOx gas data analysis system, characterized in that: According to any one of claims 1 to 7, the NOx gas data analysis method comprises: The data screening module uses the completeness and outlier discrimination conditions based on the NOx emission data in the time series, checks and removes missing data points or extreme value parameters one by one, calls the timestamp and numerical index of the data, sorts the time period data continuously, classifies them by numerical range, identifies emission data that exceeds the target threshold from multiple types of data, and generates a target emission list; The local feature generation module allocates associated feature values of multiple adjacent data points based on the target emission inventory, generates linear associations in sequence according to the relative positions and corresponding values of the multiple data points, performs local continuity measurement on multiple feature parameters in sequence, converts them into low-dimensional features through the ratio of positions and values, and generates low-dimensional emission features; The spatial mapping module extracts and compares the relative distances of data points based on the low-dimensional emission features, determines the proximity distances between multiple points according to the spatial position sequence, constructs a global position table according to the proximity feature data of all points, screens the neighboring points by position coordinates, and generates proximity distance data; The cluster classification module classifies by distance based on the neighboring distance data, selects the spatial location distribution of multiple adjacent data points, compares and verifies the independent categories of the spatial locations through distance values, extracts and determines the emission characteristics represented by the categories, determines the type of emission source according to the set of points in the same category, and generates the emission source classification results; Based on the emission source classification results, the trend analysis module imports the time series data of multiple emission sources in the classification in turn, compares the numerical change sequences in multiple time periods, forms a trend curve by fitting the emission intensity of multiple categories point by point, calculates the change rate of emission intensity according to the slope of the curve, and generates emission trend characteristics.