Nitrogen oxide detection method and system based on artificial intelligence

By using an AI-based nitrogen oxide detection method, the problems of susceptibility to interference and poor accuracy of traditional detection methods have been solved. This method enables accurate prediction and dynamic monitoring of nitrogen oxide concentrations in complex environments, thereby improving the accuracy and reliability of detection.

CN120823913APending Publication Date: 2025-10-21LINQU SHANSHUI CEMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510962499.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-14
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

Traditional nitrogen oxide detection methods are susceptible to interference and have poor accuracy, making it difficult to achieve accurate prediction and dynamic monitoring in complex environments.

Method used

An artificial intelligence-based nitrogen oxide detection method is adopted. The collected data is cleaned, denoised, and normalized to extract key feature relationships between nitrogen oxide concentration and environmental factors. The concentration detection model is used to predict nitrogen oxide concentration, and the detection results are processed by a temperature-scaling confidence calibration algorithm.

Benefits of technology

It improves the accuracy and reliability of nitrogen oxide detection, has strong adaptability, and can achieve accurate prediction and dynamic monitoring in diverse environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120823913A_ABST
    Figure CN120823913A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of nitrogen oxide detection, and discloses a nitrogen oxide detection method and system based on artificial intelligence, and the method comprises the steps: collecting nitrogen oxide related data, environmental parameter data and interference gas concentration data in a to-be-detected environment, carrying out the cleaning, denoising and normalization processing of the collected data, and obtaining the preprocessed data; performing feature extraction on the preprocessed data, capturing key feature relationships between the nitrogen oxide concentration and other environmental factors and interference gas, and obtaining a target feature vector; inputting the extracted feature vector into a concentration detection model, predicting the concentration of the nitrogen oxide through the concentration detection model, and outputting a concentration detection result; the concentration detection result is processed through a confidence coefficient calibration algorithm based on temperature scaling, a final detection result is obtained, and the final detection result is visualized; according to the invention, the accuracy and reliability of nitrogen oxide detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of nitrogen oxide detection, and in particular to a nitrogen oxide detection method and system based on artificial intelligence. Background Art

[0002] Nitrogen oxides (NOx) are a significant component of atmospheric pollutants, and their emissions pose serious risks to the environment and human health, such as acid rain and photochemical smog. Accurate and real-time detection of NOx concentrations is crucial for environmental monitoring and industrial waste gas emission control. Currently, traditional NOx detection methods primarily include chemiluminescence and ultraviolet absorption. Chemiluminescence offers high accuracy, but the equipment is complex, maintenance costs are high, and the testing environment is demanding. While ultraviolet absorption is relatively simple to operate, it is susceptible to interference from other gases, resulting in poor accuracy and stability in test results. Furthermore, these traditional methods lack effective data analysis and processing capabilities when processing test data in complex environments, making it difficult to accurately predict and dynamically monitor NOx concentrations. Summary of the Invention

[0003] The purpose of the present invention is to solve the above problems and to design a nitrogen oxide detection method and system based on artificial intelligence.

[0004] A first aspect of the present invention provides a method for detecting nitrogen oxides based on artificial intelligence, the method comprising the following steps: Collect nitrogen oxide related data, environmental parameter data and interfering gas concentration data in the environment to be tested, clean, denoise and normalize the collected data to obtain pre-processed data; Perform feature extraction on the preprocessed data to capture the key characteristic relationships between nitrogen oxide concentration and other environmental factors and interfering gases, and obtain the target feature vector; The extracted feature vector is input into the concentration detection model, the concentration of nitrogen oxides is predicted by the concentration detection model, and the concentration detection result is output; The concentration detection results are processed by a confidence calibration algorithm based on temperature scaling to obtain the final detection results, and the final detection results are visualized.

[0005] Optionally, in a first implementation of the first aspect of the present invention, collecting nitrogen oxide-related data, environmental parameter data, and interfering gas concentration data in the environment to be detected, and cleaning, denoising, and normalizing the collected data to obtain preprocessed data includes: Collecting nitrogen oxide related data, environmental parameter data and interfering gas concentration data in the environment to be detected to obtain a data sequence to be processed; For each data sequence to be processed, the initial state vector, process noise covariance matrix and observation noise covariance matrix are set to initialize the state covariance matrix; Predict the state at the current moment based on the state estimate and state transfer matrix at the previous moment, and predict the state covariance matrix at the current moment based on the state covariance matrix, process noise covariance matrix and state transfer matrix at the previous moment; Get the actual measurement value of the sensor at the current moment, and calculate the Kalman gain based on the measurement matrix, the predicted state covariance matrix, and the observation noise covariance matrix; The state estimate at the current moment is updated using the Kalman gain, the measured value, and the predicted state. The state covariance matrix at the current moment is updated based on the Kalman gain and the predicted state covariance matrix to obtain the data after Kalman filtering and denoising. The data processed by Kalman filtering is cleaned, outliers are identified and eliminated, and the cleaned data is normalized using the minimum-maximum normalization method to obtain preprocessed data.

[0006] Optionally, in a second implementation of the first aspect of the present invention, the feature extraction of the preprocessed data to capture the key characteristic relationship between the nitrogen oxide concentration and other environmental factors and interfering gases to obtain the target feature vector includes: The preprocessed data is organized into a sequence form and used as the input vector for feature extraction using a multi-head self-attention mechanism; The multi-head attention output is compressed into a fixed-length feature vector through a global pooling operation, and the target feature vector is obtained after a nonlinear transformation.

[0007] Optionally, in a third implementation of the first aspect of the present invention, organizing the preprocessed data into a sequence form and using the multi-head self-attention mechanism as an input vector for feature extraction includes: Generate Query, Key, and Value vectors for each input vector, calculate the attention score matrix, scale the attention scores, apply the Softmax function to obtain the attention weight matrix, and then calculate the attention output; Divide the query, key, and value matrices into h heads respectively, perform scaled dot product attention calculation on each head independently, and obtain h output matrices. Concatenate the outputs of multiple heads and integrate them through linear transformation; The output of multi-head attention is obtained through residual connection and layer normalization.

[0008] Optionally, in a fourth implementation of the first aspect of the present invention, the extracted feature vector is input into a concentration detection model, the concentration of nitrogen oxides is predicted by the concentration detection model, and a concentration detection result is output, including: The extracted feature vector is input into the concentration detection model, and the feature representation that integrates the context information is obtained through the Transformer encoder; The feature representation that incorporates contextual information is connected to the input feature vector row residual and processed by layer normalization; After layer normalization, the network is fed into the feedforward neural network of the Transformer encoder for nonlinear transformation. After the network transformation is completed, residual connection and layer normalization are performed again to obtain the final output of the Transformer encoder. Use the global average pooling method to average the feature sequence output by the Transformer encoder in the time dimension and convert the sequence data into a vector of fixed length; The feature vector output by the Transformer encoder and the feature vector input are used as different feature inputs of the GBM network in the concentration detection model; By calculating the importance scores of the feature vector output by the Transformer encoder and the feature vector input, the two features are weighted and fused according to the score ratio to obtain the predicted fused feature vector; The feature vector output by the Transformer encoder is passed through the fully connected layer to obtain a preliminary concentration prediction result, and then the fused feature vector is input into the GBM network to obtain the prediction result of the GBM network; The prediction results of the Transformer encoder and the GBM network are weighted and summed to obtain the final nitrogen oxide concentration prediction value, and the concentration detection result is output.

[0009] Optionally, in a fifth implementation of the first aspect of the present invention, the process of constructing the GBM network includes: Determine the key parameters of the GBM network, where the key parameters include at least the number of base learners, the learning rate size, and the maximum depth of the tree; At each iteration, the negative gradient between the current GBM network and the true value is calculated first, and then a new regression tree is trained using the negative gradient to determine the leaf node areas of the tree; Calculate the optimal prediction value adjustment in each leaf node area, and superimpose the prediction results of the new tree on the GBM network according to the learning rate, continuously improve the prediction ability of the network, and repeat this process until the preset number of iterations is reached.

[0010] Optionally, in a sixth implementation of the first aspect of the present invention, the temperature-scaling-based confidence calibration algorithm processes the concentration detection result to obtain a final detection result, and visualizes the final detection result, including: Setting the initial value of the temperature parameter, and dividing a portion of the test data in the concentration test result as a calibration data set; For each prediction result in the calibration data set, convert it into the logarithmic probability form, scale the obtained logarithmic probability using the temperature parameter to obtain the scaled logarithmic probability, and convert the scaled logarithmic probability back to the probability form to obtain the calibrated predicted probability; Adjust the temperature parameter by gradient descent method, continuously calculate the gradient of negative log-likelihood loss function with respect to the temperature parameter, update the value of the temperature parameter in the opposite direction of the gradient, and minimize the negative log-likelihood loss function. After each update of the temperature parameter, recalculate the calibrated prediction probability until the negative log-likelihood loss function converges. The optimized temperature parameters are used to perform temperature scaling and probability calibration on all concentration detection results to obtain the final detection results.

[0011] A second aspect of the present invention provides a nitrogen oxide detection system based on artificial intelligence, the system comprising: The data processing module is used to collect nitrogen oxide related data, environmental parameter data and interfering gas concentration data in the environment to be detected, and clean, denoise and normalize the collected data to obtain pre-processed data; The feature extraction module is used to extract features from the preprocessed data, capture the key characteristic relationships between nitrogen oxide concentrations and other environmental factors and interfering gases, and obtain the target feature vector; A concentration detection module is used to input the extracted feature vector into a concentration detection model, predict the concentration of nitrogen oxides through the concentration detection model, and output the concentration detection result; The visualization module is used to process the concentration detection results based on the confidence calibration algorithm of temperature scaling to obtain the final detection results and visualize the final detection results.

[0012] The third aspect of the present invention provides an artificial intelligence-based nitrogen oxide detection device, which includes a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory to enable the artificial intelligence-based nitrogen oxide detection device to perform each step of the artificial intelligence-based nitrogen oxide detection method as described in any one of the above items.

[0013] A fourth aspect of the present invention provides a computer-readable storage medium having instructions stored thereon, which, when executed by a processor, implement the various steps of the artificial intelligence-based nitrogen oxide detection method as described in any of the above items.

[0014] In the technical solution provided by the present invention, nitrogen oxide-related data, environmental parameter data and interfering gas concentration data in the environment to be detected are collected, and the collected data are cleaned, denoised and normalized to obtain preprocessed data; feature extraction is performed on the preprocessed data to capture the key feature relationship between the nitrogen oxide concentration and other environmental factors and interfering gases to obtain a target feature vector; the extracted feature vector is input into a concentration detection model, the concentration of nitrogen oxides is predicted by the concentration detection model, and the concentration detection result is output; the concentration detection result is processed by a confidence calibration algorithm based on temperature scaling to obtain a final detection result, and the final detection result is visualized; the present invention collects multi-dimensional data and uses artificial intelligence algorithms to perform in-depth analysis and processing on the data, which can effectively overcome the problems of traditional detection methods being susceptible to interference and having poor accuracy, improve the accuracy and reliability of nitrogen oxide detection, have good adaptability and scalability, meet diverse nitrogen oxide detection needs, and provide more forward-looking decision support for environmental monitoring and industrial waste gas emission control. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Various other advantages and benefits will become apparent to those skilled in the art by reading the following detailed description of the preferred embodiment.The accompanying drawings are only for the purpose of illustrating the preferred embodiment and are not to be considered as limiting the present invention.

[0016] Figure 1 A flowchart of a nitrogen oxide detection method based on artificial intelligence provided by an embodiment of the present invention; Figure 2 A schematic diagram of the structure of a nitrogen oxide detection system based on artificial intelligence provided by an embodiment of the present invention; Figure 3 A schematic structural diagram of an artificial intelligence-based nitrogen oxide detection device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The terms "first," "second," "third," "fourth," and so forth (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar items and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that shown or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device that includes a series of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, product, or device.

[0018] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 The flowchart of the nitrogen oxide detection method based on artificial intelligence provided by an embodiment of the present invention specifically includes the following steps: Step 101: collecting nitrogen oxide related data, environmental parameter data, and interfering gas concentration data in the environment to be detected, and cleaning, denoising, and normalizing the collected data to obtain pre-processed data; In this embodiment, multiple sensors, including but not limited to electrochemical sensors and infrared sensors, are used to collect data related to nitrogen oxides in the environment to be tested. Data on environmental parameters such as ambient temperature, humidity, and air pressure, as well as concentrations of other interfering gases, are also collected. The collected data undergoes preprocessing, including data cleaning, denoising, and normalization, to remove abnormal data and noise and maintain a uniform format and range.

[0019] In this embodiment, nitrogen oxide related data, environmental parameter data and interfering gas concentration data in the environment to be detected are collected to obtain a data sequence to be processed; an initial state vector, a process noise covariance matrix and an observation noise covariance matrix are set for each data sequence to be processed, and the state covariance matrix is ​​initialized; the state at the current moment is predicted based on the state estimate and the state transfer matrix at the previous moment, and the state covariance matrix at the current moment is predicted based on the state covariance matrix, the process noise covariance matrix and the state transfer matrix at the previous moment; the actual measurement value of the sensor at the current moment is obtained, and the Kalman gain is calculated based on the measurement matrix, the predicted state covariance matrix and the observation noise covariance matrix; the state estimate at the current moment is updated using the Kalman gain, the measurement value and the predicted state, and the state covariance matrix at the current moment is updated based on the Kalman gain and the predicted state covariance matrix to obtain data denoised by Kalman filtering; the data processed by Kalman filtering are cleaned, outliers are identified and eliminated, and the cleaned data are normalized using the minimum-maximum normalization method to obtain preprocessed data.

[0020] Step 102: Perform feature extraction on the pre-processed data to capture the key characteristic relationship between the nitrogen oxide concentration and other environmental factors and interfering gases to obtain a target feature vector; In this embodiment, the preprocessed data is organized into a sequence form and used as an input vector for feature extraction using a multi-head self-attention mechanism; the multi-head attention output is compressed into a feature vector of fixed length through a global pooling operation, and the target feature vector is obtained after a nonlinear transformation.

[0021] In this embodiment, three vectors, Query, Key, and Value, are generated for each input vector, the attention score matrix is ​​calculated, the attention score is scaled, the Softmax function is applied to obtain the attention weight matrix, and then the attention output is calculated; the Query, Key, and Value matrices are divided into h heads respectively, and the scaled dot product attention calculation is performed independently on each head to obtain h output matrices. The multi-head outputs are spliced ​​and integrated through linear transformation; the output of the multi-head attention is obtained through residual connection and layer normalization.

[0022] In this embodiment, the preprocessed multidimensional time series data (nitrogen oxide concentration, temperature, humidity, air pressure, interfering gas concentration, etc.) is segmented into fixed time windows to ensure strict alignment of sensor data in the time dimension. For example, every 10 minutes is used as an analysis window, which contains the sample values ​​of all environmental parameters. Correlation calculation: The statistical correlation between nitrogen oxide concentration and each environmental factor is calculated to identify strongly correlated parameters (such as temperature and sulfur dioxide concentration) and weakly correlated parameters (such as air pressure). Hysteresis effect analysis: The lagged impact of environmental factor changes on nitrogen oxide concentration is analyzed. For example, temperature changes may not significantly affect NOx concentration until 30 minutes later. Nonlinear relationship mining: Nonlinear relationships between parameters are discovered through methods such as binning analysis or decision trees. For example, the change pattern of NOx concentration in high temperature and high humidity environments is different from that when a single factor changes. Sliding window statistics: Statistical features such as mean, standard deviation, maximum, minimum, median, skewness, and kurtosis are calculated for the data in each time window. Trend features: Trends between adjacent windows are calculated, such as difference, rate of change, acceleration, etc., to capture the dynamic characteristics of concentration changes. Periodic features: Through Fourier transform or wavelet transform, the periodic components of the data are extracted to identify implicit patterns such as diurnal and weekly variations. Parameter cross-features: Combined features of environmental parameters and nitrogen oxide concentration are constructed, such as temperature × humidity, NOx concentration / sulfur dioxide concentration, etc., to capture the synergistic effects between parameters. Time dimension combination: Combined parameter values ​​at the current moment and historical moments are used to construct time delay features, such as the combination of temperature at time t-1 and NOx concentration at time t. Variance analysis: Features with variance close to zero are eliminated, while features with sufficient variability are retained. Recursive feature elimination: Machine learning models are used to evaluate the importance of each feature and gradually eliminate unimportant features. Principal component analysis (PCA): High-dimensional features are projected into a low-dimensional space, retaining the most important variation components while reducing noise and redundant information. The extracted features are subjected to secondary normalization to ensure that all features have the same scale range to avoid the model being biased towards certain features due to dimensional differences. The filtered and processed features are arranged in a specific order to form a target feature vector of fixed dimension. This vector contains the key relationship features between nitrogen oxide concentration and environmental factors and can be directly input into subsequent prediction models.

[0023] Step 103: Input the extracted feature vector into a concentration detection model, predict the concentration of nitrogen oxides through the concentration detection model, and output the concentration detection result; In this embodiment, the extracted feature vector is input into the concentration detection model, and a feature representation that integrates the context information is obtained through the Transformer encoder; the feature representation that integrates the context information is residually connected to the input feature vector and normalized by layers; after the layer normalization process, the feedforward neural network is fed into the Transformer encoder for nonlinear transformation. After the network transformation is completed, the residual connection and layer normalization are performed again to obtain the final output of the Transformer encoder; the feature sequence output by the Transformer encoder is averaged in the time dimension using the global average pooling method, and the sequence data is converted into a vector of fixed length; Transformer encoder is used to calculate the average value of the feature sequence in the time dimension. The feature vector output by the Transformer encoder and the feature vector input by it are respectively used as different feature inputs of the GBM network in the concentration detection model; by calculating the importance scores of the feature vector output by the Transformer encoder and the feature vector input by it, the two features are weightedly fused according to the score ratio to obtain a predicted fused feature vector; the feature vector output by the Transformer encoder is passed through the fully connected layer to obtain a preliminary concentration prediction result, and then the fused feature vector is input into the GBM network to obtain the prediction result of the GBM network; the prediction results of the Transformer encoder and the GBM network are weightedly summed to obtain the final nitrogen oxide concentration prediction value, and the concentration detection result is output.

[0024] In this embodiment, the construction process of the GBM network includes: determining the key parameters of the GBM network, where the key parameters include at least the number of basic learners, the learning rate size, and the maximum depth of the tree; in each iteration, first calculating the negative gradient between the current GBM network and the true value, then using the negative gradient to train a new regression tree, and determining each leaf node area of ​​the tree; calculating the optimal prediction value adjustment amount in each leaf node area, and superimposing the prediction results of the new tree on the GBM network according to the learning rate, continuously improving the network's prediction ability, and repeating this process until a preset number of iterations is reached.

[0025] Step 104 : Process the concentration detection result using a temperature-scaling-based confidence calibration algorithm to obtain a final detection result, and visualize the final detection result.

[0026] In this embodiment, an initial value of the temperature parameter is set, and a portion of the data is divided from the detection data in the concentration detection result as a calibration data set; for each prediction result in the calibration data set, it is converted into a logarithmic probability form, the obtained logarithmic probability is scaled using the temperature parameter to obtain the scaled logarithmic probability, and the scaled logarithmic probability is converted back into a probability form to obtain a calibrated prediction probability; the temperature parameter is adjusted by the gradient descent method, and the gradient of the negative log-likelihood loss function with respect to the temperature parameter is continuously calculated, and the value of the temperature parameter is updated in the opposite direction of the gradient to minimize the negative log-likelihood loss function. After each update of the temperature parameter, the calibrated prediction probability is recalculated until the negative log-likelihood loss function converges; the optimized temperature parameter is used to perform temperature scaling and probability calibration on all concentration detection results to obtain the final detection result.

[0027] In this embodiment, a suitable loss function, such as negative log-likelihood loss (NLL), is selected to measure the difference between the calibrated predicted probability and the true label.

[0028] In this embodiment, if the test result is a continuous value of nitrogen oxide concentration (regression task), you can choose to use a line graph to show the trend of concentration change over time; choose to use a bar graph to compare the concentration values ​​at different test points; or use a scatter plot to show the relationship between concentration and other influencing factors (such as ambient temperature and humidity); if the test result is a probability distribution of concentrations in different intervals (classification task), you can use a pie chart to visually show the proportion of each concentration interval; use a stacked bar chart to compare the probability distribution differences of each concentration interval under different samples or different test times; for the selected chart type, accurately map the calibrated test result data to the coordinate axis or graphic element of the chart; for example, in a line chart, use time as the horizontal axis and the calibrated concentration value as the vertical axis; In the pie chart, the probability of each concentration range is used as the basis for the size of the sector area; use professional visualization tools (such as visualization libraries such as matplotlib and seaborn, or visualization software such as Tableau and PowerBI) to draw charts according to the set mapping relationship, and add clear titles, axis labels, legends, etc. to enhance the readability of the chart; if there is a confidence score in the concentration detection results, additional elements can be added to the visualization chart to display the confidence; for example, in a line chart, add error bars to each data point to represent the confidence interval; in a bar chart, use different color shades or textures to indicate the level of confidence; in a pie chart, add annotations to each sector area to indicate the confidence level of the corresponding concentration range prediction.

[0029] See also Figure 2 , a schematic structural diagram of a nitrogen oxide detection system based on artificial intelligence provided by an embodiment of the present invention, the system includes: The data processing module is used to collect nitrogen oxide related data, environmental parameter data and interfering gas concentration data in the environment to be detected, and clean, denoise and normalize the collected data to obtain pre-processed data; The feature extraction module is used to extract features from the preprocessed data, capture the key characteristic relationships between nitrogen oxide concentrations and other environmental factors and interfering gases, and obtain the target feature vector; A concentration detection module is used to input the extracted feature vector into a concentration detection model, predict the concentration of nitrogen oxides through the concentration detection model, and output the concentration detection result; The visualization module is used to process the concentration detection results based on the confidence calibration algorithm of temperature scaling to obtain the final detection results and visualize the final detection results.

[0030] In this example, an electrochemical sensor was used to collect nitrogen oxide concentration data. A temperature and humidity sensor was used to collect ambient temperature and humidity data. A barometric pressure sensor was used to collect barometric pressure data. Other gas sensors were used to collect concentration data for possible interfering gases (such as sulfur dioxide and carbon monoxide). The collected data was transmitted via a serial port to a data processing module for data cleaning, denoising, and normalization. The processed data was divided into training, validation, and test sets in a ratio of 7:1:2. A nitrogen oxide concentration prediction model was constructed and trained using the training set. During training, the model was trained with a learning rate of 0.001 and 100 iterations. During the training process, the validation set was used to evaluate the model every 5 iterations, and the model's hyperparameters were adjusted according to the evaluation results. After the training was completed, the model was evaluated using the test set, and the calculated model accuracy was 95% and the mean square error was 0.05. The model was deployed to on-site detection equipment to collect data from exhaust gas emission outlets in real time. The model can quickly and accurately output the predicted value of nitrogen oxide concentration and predict the concentration change trend within the next 1 hour. The error between the predicted result and the actual detection value is within an acceptable range, providing effective data support for industrial waste gas emission control. In this embodiment, a combination of infrared sensors and electrochemical sensors is used to collect nitrogen oxide data. At the same time, relevant data such as surrounding traffic flow and meteorological conditions are collected as auxiliary data. After preprocessing the data, the data set is divided according to the ratio of 6:2:2 to construct a nitrogen oxide concentration prediction model. The appropriate network structure and parameters are set according to the characteristics of the data. During the model training process, an adaptive learning rate optimization algorithm is used to improve training efficiency. After multiple training and optimization, the accuracy of the model obtained by using the test set evaluation was 93%, and the mean square error was 0.06. The optimized model was deployed to the air quality monitoring station, realizing real-time monitoring and dynamic prediction of nitrogen oxide concentrations in the urban environment, providing a strong technical guarantee for urban environmental air quality assessment and pollution prevention and control.

[0031] In this embodiment, taking wet fly ash as an example, 100 g of wet fly ash is sampled, dried under an infrared lamp for about 30 minutes, then taken out and cooled, and the remaining mass is weighed; the dried wet fly ash is ground in an electromagnetic mill for 10 minutes; the ground wet fly ash is placed in a ceramic plate; the ceramic plate containing the wet fly ash is placed in a nitrogen oxide detector for measurement, thereby obtaining the amount of nitrogen oxides generated by the wet fly ash at different temperatures; the nitrogen oxide detector is a key equipment for implementation; the nitrogen oxide detector is explained: the nitrogen oxide detector mainly consists of four parts, namely, a temperature control unit, a high-temperature furnace body, a gas delivery unit, and a gas composition detection unit; the internal temperature of the high-temperature furnace body can be adjusted by the control system, and can be continuously adjusted between 0-900°C as needed, It can also perform constant temperature control; the high-temperature furnace body is installed with a heating system, temperature sensor, exhaust hole, and breathing valve; the effective internal size of the high-temperature furnace body is 0.4m*0.4m*0.4m, and the internal temperature of the furnace body is transmitted to the control system in real time through the temperature sensor; the furnace body is installed with a breathing valve, which ensures that the atmospheric pressure inside the furnace body is consistent with that outside, and continuously provides the oxygen required for the combustion of organic nitrogen; the exhaust hole is connected to the gas delivery unit; the gas delivery unit is mainly composed of a φ1cm high-temperature resistant hose, a filter, a flow meter, and an exhaust pump; the filter filters the smoke in the gas, the flow meter measures the amount of smoke during the analysis process, and the exhaust pump draws the high-temperature furnace gas to the gas composition detection unit; the gas composition detection unit includes an oxygen sensor, a nitrogen oxide sensor, and a data recording module.

[0032] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention. Figure 3This is a schematic diagram of the structure of an artificial intelligence-based nitrogen oxide detection device provided in an embodiment of the present invention. This artificial intelligence-based nitrogen oxide detection device 600 may vary significantly depending on configuration or performance. It may include one or more processors (central processing units, CPUs) 610 (e.g., one or more processors), memory 620, and one or more storage media 630 (e.g., one or more mass storage devices) storing application programs 633 or data 632. The memory 620 and storage medium 630 may be either transient or persistent storage. The program stored in the storage medium 630 may include one or more modules (not shown), each of which may include a series of instructions for operating on the artificial intelligence-based nitrogen oxide detection device 600. Furthermore, the processor 610 may be configured to communicate with the storage medium 630, executing the series of instructions stored in the storage medium 630 on the artificial intelligence-based nitrogen oxide detection device 600 to implement the method provided in the above embodiment.

[0033] The AI-based nitrogen oxide detection device 600 may further include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input and output interfaces 660, and / or one or more operating devices 631, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be understood by those skilled in the art that Figure 3 The structure of the AI-based nitrogen oxide detection device shown does not constitute a limitation on the computer device provided by the present invention, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0034] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the various steps of the artificial intelligence-based nitrogen oxide detection method provided in the above embodiments.

[0035] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0036] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0037] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely preferred examples of the present invention and are not intended to limit the present invention. Various changes and improvements may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and improvements fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. A nitrogen oxide detection method based on artificial intelligence, characterized in that: The method comprises the following steps: Collect nitrogen oxide related data, environmental parameter data and interfering gas concentration data in the environment to be tested, clean, denoise and normalize the collected data to obtain pre-processed data; Perform feature extraction on the preprocessed data to capture the key characteristic relationships between nitrogen oxide concentration and other environmental factors and interfering gases, and obtain the target feature vector; The extracted feature vector is input into the concentration detection model, the concentration of nitrogen oxides is predicted by the concentration detection model, and the concentration detection result is output; The concentration detection results are processed by a confidence calibration algorithm based on temperature scaling to obtain the final detection results, and the final detection results are visualized.

2. The method for detecting nitrogen oxides based on artificial intelligence according to claim 1, wherein: The method includes collecting nitrogen oxide related data, environmental parameter data and interfering gas concentration data in the environment to be detected, cleaning, denoising and normalizing the collected data to obtain pre-processed data, including: Collecting nitrogen oxide related data, environmental parameter data and interfering gas concentration data in the environment to be detected to obtain a data sequence to be processed; For each data sequence to be processed, the initial state vector, process noise covariance matrix and observation noise covariance matrix are set to initialize the state covariance matrix; Predict the state at the current moment based on the state estimate and state transfer matrix at the previous moment, and predict the state covariance matrix at the current moment based on the state covariance matrix, process noise covariance matrix and state transfer matrix at the previous moment; Get the actual measurement value of the sensor at the current moment, and calculate the Kalman gain based on the measurement matrix, the predicted state covariance matrix, and the observation noise covariance matrix; The state estimate at the current moment is updated using the Kalman gain, the measured value, and the predicted state. The state covariance matrix at the current moment is updated based on the Kalman gain and the predicted state covariance matrix to obtain the data after Kalman filtering and denoising. The data processed by Kalman filtering is cleaned, outliers are identified and eliminated, and the cleaned data is normalized using the minimum-maximum normalization method to obtain preprocessed data.

3. The method for detecting nitrogen oxides based on artificial intelligence according to claim 1, wherein: The feature extraction of the pre-processed data is performed to capture the key characteristic relationship between the nitrogen oxide concentration and other environmental factors and interfering gases, and obtain the target feature vector, including: The preprocessed data is organized into a sequence form and used as the input vector for feature extraction using a multi-head self-attention mechanism; The multi-head attention output is compressed into a fixed-length feature vector through a global pooling operation, and the target feature vector is obtained after a nonlinear transformation.

4. The method for detecting nitrogen oxides based on artificial intelligence according to claim 3, wherein: The preprocessed data is organized into a sequence form and used as an input vector to extract features using a multi-head self-attention mechanism, including: Generate Query, Key, and Value vectors for each input vector, calculate the attention score matrix, scale the attention scores, apply the Softmax function to obtain the attention weight matrix, and then calculate the attention output; Divide the query, key, and value matrices into h heads respectively, perform scaled dot product attention calculation on each head independently, and obtain h output matrices. Concatenate the outputs of multiple heads and integrate them through linear transformation; The output of multi-head attention is obtained through residual connection and layer normalization.

5. The method for detecting nitrogen oxides based on artificial intelligence according to claim 1, wherein: The extracted feature vector is input into the concentration detection model, the concentration of nitrogen oxides is predicted by the concentration detection model, and the concentration detection result is output, including: The extracted feature vector is input into the concentration detection model, and the feature representation that integrates the context information is obtained through the Transformer encoder; The feature representation that incorporates contextual information is connected to the input feature vector row residual and processed by layer normalization; After layer normalization, the network is fed into the feedforward neural network of the Transformer encoder for nonlinear transformation. After the network transformation is completed, residual connection and layer normalization are performed again to obtain the final output of the Transformer encoder. Use the global average pooling method to average the feature sequence output by the Transformer encoder in the time dimension and convert the sequence data into a vector of fixed length; The feature vector output by the Transformer encoder and the feature vector input are used as different feature inputs of the GBM network in the concentration detection model; By calculating the importance scores of the feature vector output by the Transformer encoder and the feature vector input, the two features are weighted and fused according to the score ratio to obtain the predicted fused feature vector; The feature vector output by the Transformer encoder is passed through the fully connected layer to obtain a preliminary concentration prediction result, and then the fused feature vector is input into the GBM network to obtain the prediction result of the GBM network; The prediction results of the Transformer encoder and the GBM network are weighted and summed to obtain the final nitrogen oxide concentration prediction value, and the concentration detection result is output.

6. The method for detecting nitrogen oxides based on artificial intelligence according to claim 5, wherein: The construction process of the GBM network includes: Determine the key parameters of the GBM network, where the key parameters include at least the number of base learners, the learning rate size, and the maximum depth of the tree; At each iteration, the negative gradient between the current GBM network and the true value is calculated first, and then a new regression tree is trained using the negative gradient to determine the leaf node areas of the tree; Calculate the optimal prediction value adjustment in each leaf node area, and superimpose the prediction results of the new tree on the GBM network according to the learning rate, continuously improve the prediction ability of the network, and repeat this process until the preset number of iterations is reached.

7. The method for detecting nitrogen oxides based on artificial intelligence according to claim 1, wherein: The temperature-scaling-based confidence calibration algorithm processes the concentration detection results to obtain the final detection results, and visualizes the final detection results, including: Setting the initial value of the temperature parameter, and dividing a portion of the test data in the concentration test result as a calibration data set; For each prediction result in the calibration data set, convert it into the logarithmic probability form, scale the obtained logarithmic probability using the temperature parameter to obtain the scaled logarithmic probability, and convert the scaled logarithmic probability back to the probability form to obtain the calibrated predicted probability; Adjust the temperature parameter by gradient descent method, continuously calculate the gradient of negative log-likelihood loss function with respect to the temperature parameter, update the value of the temperature parameter in the opposite direction of the gradient, and minimize the negative log-likelihood loss function. After each update of the temperature parameter, recalculate the calibrated prediction probability until the negative log-likelihood loss function converges. The optimized temperature parameters are used to perform temperature scaling and probability calibration on all concentration detection results to obtain the final detection results.

8. A nitrogen oxide detection system based on artificial intelligence, characterized in that: The system includes: The data processing module is used to collect nitrogen oxide related data, environmental parameter data and interfering gas concentration data in the environment to be detected, and clean, denoise and normalize the collected data to obtain pre-processed data; The feature extraction module is used to extract features from the preprocessed data, capture the key characteristic relationships between nitrogen oxide concentrations and other environmental factors and interfering gases, and obtain the target feature vector; A concentration detection module is used to input the extracted feature vector into a concentration detection model, predict the concentration of nitrogen oxides through the concentration detection model, and output the concentration detection result; The visualization module is used to process the concentration detection results based on the confidence calibration algorithm of temperature scaling to obtain the final detection results and visualize the final detection results.

9. A nitrogen oxide detection device based on artificial intelligence, characterized in that: The artificial intelligence-based nitrogen oxide detection device includes a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the artificial intelligence-based nitrogen oxide detection device performs each step of the artificial intelligence-based nitrogen oxide detection method as described in any one of claims 1-7.

10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the various steps of the nitrogen oxide detection method based on artificial intelligence as described in any one of claims 1 to 7 are implemented.