An air quality detection method based on multi-sensor monitoring

By combining the space-time fusion model of convolutional neural network and long and short-term memory network in an intelligent sensor network, processing and fusing air quality data, the problem of data noise and multi-sensor fusion is solved, efficient air quality monitoring is achieved, and the system is improved accuracy and reliability.

CN118861957BActive Publication Date: 2024-11-22SICHUAN HUAXIN ZHICHUANG TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411345766.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2024-11-22
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

The existing air quality monitoring system based on intelligent sensing networks has problems such as insufficient data noise processing, difficulty in fusion of multi-sensor data and low data processing efficiency, especially when processing real-time and unstructured data.

Method used

The space-time fusion model combined with convolutional neural network and long-term memory network is used to calculate the correlation coefficient and mutual information of cross-modal signals through data formatting, standardization and noise filtering, identify and suppress noise, and perform real-time data verification. and outlier recognition, using machine learning algorithms to generate comprehensive air quality index, and real-time data transmission through LoRaWAN.

Benefits of technology

Effectively reduce data noise and deviation, improve the accuracy of monitoring results and the reliability of the system, and can efficiently process large-scale real-time data flows, including unstructured and semi-structured data, improving the practical value of the air quality monitoring system and Social benefits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118861957B_ABST
    Figure CN118861957B_ABST
Patent Text Reader

Abstract

The present invention discloses an air quality detection method based on multi-sensor monitoring, which relates to the field of environmental monitoring technology, including: collecting environmental raw data in real time at a preset frequency based on gas sensors, particulate matter sensors and temperature and humidity sensors distributed in a network; formatting, standardizing and noise filtering the collected environmental raw data; and pushing the air quality index to the public in real time through the LCD display screen of the monitoring center, mobile applications and the Web interface of the online platform. The present invention improves the accuracy and reliability of air quality detection through multi-sensor monitoring and advanced data processing technology, solves the problems of insufficient data noise processing, difficulty in multi-sensor data fusion and low data processing efficiency, realizes real-time and efficient monitoring of environmental air quality, and presents the monitoring results in an intuitive form.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of environmental monitoring, and in particular to an air quality detection method based on multi-sensor monitoring. Background Art

[0002] With the acceleration of industrialization and the rapid development of urbanization, the problem of air pollution is becoming increasingly serious. Air quality monitoring has become an important issue in the field of environmental protection and public health. Traditional air quality monitoring relies on fixed-site air quality monitoring stations. Although these stations are equipped with high-precision analytical instruments and can accurately measure specific pollutants, they have disadvantages such as limited monitoring range, high cost, and slow data update, which makes it difficult to meet the needs of modern urban refined management and real-time early warning. In recent years, with the rapid development of Internet of Things technology, big data technology, and artificial intelligence technology, intelligent sensor networks have begun to be widely used in the field of environmental monitoring. This monitoring system based on distributed sensor networks has the characteristics of wide coverage, low cost, and fast data update. It can realize continuous monitoring and dynamic evaluation of environmental quality. In the intelligent sensor network, miniaturized and low-power monitoring devices such as gas sensors, particulate matter sensors, and temperature and humidity sensors are deployed in the target area, and the collected data are transmitted to the central processing system through wireless communication technology (such as LoRaWAN). These systems can not only collect a large amount of environmental data in real time, but also use advanced data analysis technology (such as machine learning algorithms) to process and interpret these data, thereby providing accurate and timely air quality information for environmental managers and the public.

[0003] Although air quality monitoring systems based on intelligent sensor networks have made significant progress, there are still some challenges and limitations. First, due to the physical characteristics of sensor equipment and the influence of the environment in which they are located, the collected data may contain noise and deviation, which will directly affect the accuracy and reliability of the monitoring system. Second, the fusion and processing of multi-sensor data is a complex task, especially when faced with different types of sensor data. How to effectively clean, format and standardize data, and how to reasonably utilize the synergy between different sensors are all urgent problems to be solved. In addition, traditional data processing methods are often difficult to cope with the processing needs of large amounts of real-time data streams, especially when processing unstructured or semi-structured data, which requires more efficient data processing and analysis technologies. Summary of the invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides an air quality detection method based on multi-sensor monitoring to solve the problems of insufficient data noise processing, difficulty in multi-sensor data fusion and low data processing efficiency.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In the first aspect, an embodiment of the present invention provides an air quality detection method based on multi-sensor monitoring, which includes: based on gas sensors, particulate matter sensors and temperature and humidity sensors distributed in the network, real-time collection of environmental raw data at a preset frequency; data formatting, standardization and noise filtering of the collected environmental raw data; combining a convolutional neural network with a long short-term memory network to construct a spatiotemporal fusion model, calculating the correlation coefficient and mutual information of cross-modal signals, identifying and suppressing noise in data from different sensors; through collaborative work and data sharing between sensors, real-time data verification and outlier identification are performed, and data is automatically adjusted; the data after noise identification and collaborative work processing is integrated, and patterns and trends in the data are identified using machine learning algorithms to generate a comprehensive air quality index; the air quality index is pushed to the public in real time through the LCD display screen of the monitoring center, mobile applications and the web interface of the online platform.

[0008] As a preferred solution of the air quality detection method based on multi-sensor monitoring of the present invention, the gas sensors, particulate matter sensors and temperature and humidity sensors distributed in the network refer to:

[0009] Detect the presence and concentration of sulfur dioxide, carbon monoxide, nitrogen oxides, ozone, ammonia and volatile organic compound gases in the environment through gas sensors;

[0010] Monitor PM2.5 and PM10 suspended particles in the air through particle sensors;

[0011] The temperature and humidity of the environment are measured by a temperature and humidity sensor composed of a temperature sensitive element and a humidity sensitive element.

[0012] As a preferred solution of the air quality detection method based on multi-sensor monitoring of the present invention, wherein: the real-time collection of environmental raw data at a preset frequency comprises the following specific steps:

[0013] Deploy sensor nodes in the target area and set identifiers on each sensor node;

[0014] Select LoRaWAN as the wireless communication protocol, configure Class A devices for each sensor node, and set the data upload interval;

[0015] Data collection is performed through the data collection formula, the expression is:

[0016] ;

[0017] Among them, Ci (t) is the calibrated concentration or reading of sensor i at time t, S i (t) is the raw reading of sensor i at time t, f i is the correction factor of sensor i, i is the index variable of the sensor;

[0018] The collected data is sent to the gateway via the LoRaWAN protocol.

[0019] As a preferred solution of the air quality detection method based on multi-sensor monitoring of the present invention, the data formatting, standardization and noise filtering of the collected environmental raw data are specifically performed as follows:

[0020] Align the timestamps of sensor data with Coordinated Universal Time and convert them into JSON format;

[0021] The sensor readings converted to JSON format are converted to a uniform unit, and the minimum and maximum normalization method is used to scale the data to the [0,1] interval. The expression is:

[0022] ;

[0023] Where X is the original data point, X min and X max are the minimum and maximum values ​​respectively;

[0024] Use sliding average filtering to process data, and select data points based on data fluctuations and sampling rate adjustments;

[0025] Based on the data processed by the sliding average filter, the interquartile range IQR is used to identify and exclude outliers. The expression is:

[0026] ;

[0027] ;

[0028] Among them, Q1 and Q3 are the first and third quartiles respectively.

[0029] As a preferred solution of the air quality detection method based on multi-sensor monitoring described in the present invention, the convolutional neural network is combined with the long short-term memory network to construct a spatiotemporal fusion model, and the specific steps are as follows:

[0030] The spatial relationship between sensors is simulated through a two-dimensional convolution layer, and the convolution kernel is defined to extract the spatial correlation. The expression is:

[0031] ;

[0032] Among them, FCNN represents the extraction result of the convolution kernel on the spatial features, w ij is the weight matrix of the convolution kernel, 𝑋 𝑖𝑗 represents the sensor data of the i-th row and j-th column, b is the bias term, and f is the ReLU activation function;

[0033] Introduce the convolution function G CNN , the convolution kernel spatial feature extraction capability is further enhanced, and the expression is:

[0034] ;

[0035] Among them, α and β are learnable parameters, μ(F CNN ) and σ(F CNN ) is obtained by an additional convolutional layer F CNN The calculated mean and standard deviation are represents the exponential function;

[0036] By using G CNN The output of is used as an additional input of the long short-term memory network LSTM, and a gating mechanism is used to control the inflow of information. The expression is:

[0037] ;

[0038] Among them, H LSTM (t) is the LSTM output at the last time point t, X t is the sensor data at time point 𝑡, h t−1 and c t−1 are the hidden state and cell state at the previous time point t;

[0039] After integrating spatial and temporal features, a fully connected layer is used to generate the final prediction and map the information output by the long short-term memory network LSTM to the predicted target variable. Above, the expression is:

[0040] ;

[0041] Among them, W out and b out are the weights and biases of the fully connected layer;

[0042] Finally, the mean square error loss function L is defined to evaluate the performance of the spatiotemporal fusion model, and the iterative optimization expression is:

[0043] ;

[0044] Among them, y i is the true value, is the predicted value, and N is the number of samples.

[0045] As a preferred solution of the air quality detection method based on multi-sensor monitoring of the present invention, wherein: the correlation coefficient and mutual information of the cross-modal signals are calculated to identify and suppress the noise in the data of different sensors, and the specific steps are as follows:

[0046] After using CNN to extract spatial features and LSTM to capture time series features based on the spatiotemporal fusion model;

[0047] Calculate the correlation coefficient r between the CNN and LSTM output features to quantify the strength of the linear relationship. The expression is:

[0048] ;

[0049] Among them, x i and i Represent the elements in the CNN and LSTM output feature vectors respectively, and Represent the average value of the vector, n is the length of the vector;

[0050] Calculate the mutual information value between CNN and LSTM output features , the expression for nonlinear relationship capture is:

[0051] ;

[0052] Among them, p(x,y) is the joint probability distribution, p(x) and p(y) are marginal probability distributions;

[0053] Set the correlation coefficient threshold θ r , if the correlation coefficient is lower than the threshold θ r , it indicates that the correlation between features is weak and there is noise;

[0054] Set the mutual information threshold θ I , if the mutual information value Below the threshold value θ I , it indicates that there is noise between features;

[0055] For the identified noise features, principal component analysis is used to reduce the dimension of the features and then input them into the spatiotemporal fusion model for retraining.

[0056] As a preferred solution of the air quality detection method based on multi-sensor monitoring described in the present invention, wherein: through the collaborative work and data sharing between sensors, real-time data verification and abnormal value identification are performed, and data is automatically adjusted. The specific steps are:

[0057] Check the consistency of formula V ck, the data verification expression for the data of different sensors at the same time point is:

[0058] ;

[0059] Among them, U j´ is the data of the j´th sensor, j´ is the index variable of the sensor data, is the average value of all sensor data, M is the total number of sensors;

[0060] Based on the standardized residual of sensor data, the information filtering function H is used fr , define the outlier identification index Z ay The expression is:

[0061] ;

[0062] ;

[0063] ;

[0064] Where v is the mean value of all sensor data, ω is the standard deviation of all sensor data, z is the standardized residual, dt is the differential of the integral variable t, e is a natural constant, and U j´ is the data of the j´th sensor;

[0065] Combined with constant identification indicators and data consistency check index V ck , construct the automatic data adjustment expression R adj for:

[0066] ;

[0067] Among them, γ is the adjustment coefficient of the control outlier identification index, and δ is the adjustment coefficient of the control consistency check index.

[0068] As a preferred solution of the air quality detection method based on multi-sensor monitoring of the present invention, the data after noise identification and collaborative work processing are fused, and the patterns and trends in the data are identified by machine learning algorithms to generate a comprehensive air quality index. The specific steps are as follows:

[0069] The weighted average method is used to fuse the multimodal sensor data after preprocessing and noise reduction to generate a comprehensive data set expression:

[0070] ;

[0071] ;

[0072] Among them, Df is the fused dataset, D i is the data of the i-th sensor, w i is the weight of the i-th sensor, Q is the number of sensors, r i is the correlation coefficient of the i-th sensor;

[0073] Extract statistical data characteristics of average concentration, standard deviation, maximum value, minimum value, and seasonal and periodic time series characteristics from the comprehensive data set;

[0074] Use recursive feature elimination to select important features;

[0075] The selected features are input into the gradient boosting decision tree model for training, and the expression of the comprehensive air quality index is generated as follows:

[0076] ;

[0077] Where y is the comprehensive air quality index, n is the total number of selected features, is the error term, is the gradient boosting decision tree model, The feature vector representing the nth input data;

[0078] The mean square error loss function L is used to measure the difference between the predicted value and the true value;

[0079] Tune the hyperparameters of the gradient boosted decision tree model through grid search;

[0080] Using the trained gradient boosting decision tree model, the air quality index of the new sensor dataset is The prediction expression is:

[0081] .

[0082] The beneficial effects of the present invention are as follows: the present invention effectively reduces data noise and deviation and improves the accuracy of monitoring results by optimizing the quality control mechanism of sensor data; at the same time, an advanced data fusion algorithm is used to realize the effective integration and analysis of different types of sensor data, thereby enhancing the reliability and adaptability of the system; in addition, with the help of high-performance computing technology and machine learning models, the present invention can efficiently process large-scale real-time data streams, including unstructured and semi-structured data types; finally, by designing a user-friendly visual interface, the monitoring results can be clearly and intuitively displayed, which is convenient for the public to understand and apply, thereby improving the practical value and social benefits of the air quality monitoring system as a whole. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0084] Figure 1 This is a flow chart of the air quality detection method based on multi-sensor monitoring in Example 1. DETAILED DESCRIPTION

[0085] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0086] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0087] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0088] Example 1, reference Figure 1 , which is the first embodiment of the present invention, provides an air quality detection method based on multi-sensor monitoring, comprising the following steps:

[0089] S1. Based on the gas sensors, particulate matter sensors and temperature and humidity sensors distributed in the network, the environmental raw data is collected in real time at a preset frequency.

[0090] Furthermore, gas sensors can be used to detect sulfur dioxide (SO2), carbon monoxide (CO), and nitrogen oxides (NO x ), the presence and concentration of ozone (O3), ammonia (NH3), and volatile organic compounds (VOCs) gases;

[0091] Monitor suspended particles in the air such as PM2.5 (particles with a diameter of 2.5 microns or less) and PM10 (particles with a diameter of 10 microns or less) through particle sensors;

[0092] The temperature and humidity of the environment are measured by a temperature and humidity sensor composed of a temperature sensitive element and a humidity sensitive element;

[0093] Furthermore, sensor nodes are deployed in the target area and identifiers are set on each sensor node to facilitate data management and tracking;

[0094] Select LoRaWAN as the wireless communication protocol, configure Class A devices for each sensor node, and set the data upload interval, such as uploading data once every minute, depending on application requirements and network capacity;

[0095] Preferably, "LoRaWAN" is selected as the wireless communication protocol because LoRaWAN has the characteristics of long distance and low power consumption, and is suitable for application scenarios with wide area coverage and a large number of sensor nodes.

[0096] Preferably, "Class A devices" are the most common device type in LoRaWAN, providing the lowest latency and longest battery life.

[0097] Data collection is performed through the data collection formula, the expression is:

[0098] ;

[0099] Among them, C i (t) is the calibrated concentration or reading of sensor i at time t, S i (t) is the raw reading of sensor i at time t, f i is the correction factor for sensor i, which is used to convert the raw reading into the actual concentration or value, where i is the index variable of the sensor;

[0100] The collected data is sent to the gateway via the LoRaWAN protocol. The gateway is responsible for collecting data from each sensor node and forwarding it to the central server for further processing.

[0101] It should be noted that the LoRaWAN protocol is a wireless communication protocol designed for low-power wide area networks (LPWANs). It allows devices in remote sensor networks to communicate over long distances with low power consumption, thereby realizing large-scale Internet of Things (IoT) applications. The LoRaWAN protocol uses LoRa modulation technology to transmit small data packets over long distances. It is particularly suitable for sensor nodes that need to run for a long time and are not easy to replace batteries, such as gas sensors, particulate matter sensors, and temperature and humidity sensors distributed in a wide area. Through the LoRaWAN protocol, these sensors can collect environmental raw data in real time at a preset frequency, and effectively transmit it to the gateway, and then forward it to the central server for processing and analysis.

[0102] It should also be noted that the method of collecting environmental raw data in real time at a preset frequency based on gas sensors, particulate matter sensors and temperature and humidity sensors distributed in the network can achieve comprehensive monitoring and evaluation of environmental quality. This method can not only provide accurate and timely environmental data, but also ensure the continuity and reliability of the data, thereby helping to quickly respond to environmental changes, warn of pollution incidents and take effective measures to improve air quality. It is of great significance to environmental protection, public health and urban planning.

[0103] S2. Format, standardize and filter the collected raw environmental data.

[0104] Furthermore, the timestamps of sensor data are aligned with Coordinated Universal Time (UTC) and converted into JSON format for easy storage and transmission;

[0105] It should be noted that UTC (Coordinated Universal Time) is an international standard time measurement system. It is the time standard currently used worldwide. The UTC time standard is based on the precise measurement of atomic clocks. It is closely related to the Greenwich Mean Time (GMT) of the earth's rotation period, but not exactly the same.

[0106] Preferably, ensure that all sensor data timestamps are aligned to UTC (Coordinated Universal Time) so that the data can be accurately compared in subsequent processing.

[0107] After converting to JSON format, the sensor readings are converted to a uniform unit (for example, temperature is converted from Celsius to Kelvin), and the minimum and maximum normalization method is used to scale the data to the [0,1] interval for further analysis. The expression is:

[0108] ;

[0109] Where X is the original data point, X min and X max are the minimum and maximum values ​​respectively;

[0110] Preferably, the use of the "min-max normalization method" has several beneficial effects compared to traditional data preprocessing methods. This method can ensure that all features are in the same numerical range, which is very important for many machine learning algorithms because it can help avoid certain features from having too much impact on the model due to their large numerical range. In addition, by scaling the data to the [0,1] interval, the min-max normalization method can also improve the convergence speed of the algorithm and reduce training time. This method is simple and intuitive, easy to understand and implement, and is particularly effective when processing linear models. It is very useful for algorithms that are sensitive to the scale of the input data.

[0111] Use sliding average filtering to process data, and select data points based on data fluctuations and sampling rate adjustments;

[0112] Based on the data processed by the sliding average filter, the interquartile range IQR is used to identify and exclude outliers. The expression is:

[0113] ;

[0114] ;

[0115] Among them, Q1 and Q3 are the first and third quartiles respectively.

[0116] It should be noted that the use of the interquartile range (IQR) to identify and exclude outliers is an effective method because it can determine the boundaries of outliers based on the actual distribution of the data, rather than simply relying on a fixed threshold. This method calculates the distance (IQR) between the first quartile (Q1) and the third quartile (Q3), and then defines outliers as data points that fall outside the range of Q1-1.5×IQR and Q3+1.5×IQR. This approach is particularly suitable for non-normally distributed data because it is not affected by extreme values ​​and can more robustly identify observations that deviate significantly from the normal range, thereby helping to improve the accuracy and reliability of data analysis.

[0117] It should also be noted that data formatting, standardization and noise filtering of the collected environmental raw data are very important preprocessing steps, which help to ensure the accuracy and effectiveness of subsequent data analysis. First, data formatting ensures that all data have a unified structure for easy management and processing; standardization makes the data from different sensors in the same dimension and magnitude, thereby avoiding analysis errors caused by unit or magnitude differences. In addition, noise filtering can effectively reduce the impact of abnormal data caused by equipment failure, signal interference or environmental factors, and improve the quality and reliability of the data. These preprocessing steps work together to provide a solid foundation for subsequent data fusion, analysis and decision-making.

[0118] S3. Combine convolutional neural networks with long short-term memory networks to build a spatiotemporal fusion model, calculate the correlation coefficients and mutual information of cross-modal signals, and identify and suppress noise in different sensor data.

[0119] It should be noted that the spatial relationship between sensors is simulated through a two-dimensional convolution layer, and the convolution kernel (the size of the convolution kernel is k×k, the step size is s, and the padding is p) is defined to extract the spatial correlation, and the expression is:

[0120] ;

[0121] Among them, F CNN represents the extraction result of the convolution kernel on the spatial features, w ij is the weight matrix of the convolution kernel, 𝑋 𝑖𝑗 represents the sensor data of the i-th row and j-th column, b is the bias term, and f is the ReLU activation function;

[0122] Introduce the convolution function G CNN , the convolution kernel spatial feature extraction capability is further enhanced, and the expression is:

[0123] ;

[0124] Among them, α and β are learnable parameters, μ(F CNN ) and σ(F CNN ) is obtained by an additional convolutional layer F CNN The calculated mean and standard deviation are represents the exponential function;

[0125] Preferably, CNN is used to extract spatial features of sensor data, which captures local spatial patterns through convolution kernels (filters), which can be the correlations between different sensors.

[0126] Preferably, by introducing the convolution function G CNN It can dynamically adjust its shape based on the input, and these statistics can be calculated through additional convolutional layers, or predicted by a global pooling layer followed by a fully connected layer.

[0127] It should be noted that α and β are learnable parameters, which means that they are part of the model and will be updated through the back-propagation algorithm during the training process to minimize the loss function; in other words, the values ​​of these parameters are not fixed, but are gradually adjusted during the training process to optimize the model performance.

[0128] By using G CNN The output of is used as an additional input of the long short-term memory network LSTM, and a gating mechanism is used to control the inflow of information. The expression is:

[0129] ;

[0130] Among them, H LSTM (t) is the LSTM output at the last time point t, X t is the sensor data at time point 𝑡, h t−1 and c t−1 are the hidden state and cell state at the previous time point t;

[0131] After integrating spatial and temporal features, a fully connected layer is used to generate the final prediction and map the information output by the long short-term memory network LSTM to the predicted target variable. Above, the expression is:

[0132] ;

[0133] Among them, W out and b out are the weights and biases of the fully connected layer;

[0134] Preferably, the specific formula of the long short-term memory network LSTM, including the input gate, forget gate, output gate, etc., is as follows:

[0135] ;

[0136] ;

[0137] ;

[0138] ;

[0139] ;

[0140] ;

[0141] Among them, i t 、f t and t Represent the activation values ​​of the input gate, forget gate and output gate respectively, is the candidate cell state, c t is the new cell state, h t is the new hidden state; σ is the sigmoid function, ⊙ represents element-wise multiplication;

[0142] It should also be noted that the fully connected layer may contain an activation function, such as Sigmoid or Tanh, for the final prediction;

[0143] Finally, the loss function L is defined to evaluate the performance of the spatiotemporal fusion model, and the iterative optimization expression is:

[0144] ;

[0145] Among them, y i is the true value, is the predicted value, and N is the number of samples.

[0146] It should be noted that the “space-time fusion model” specifically includes the following parts: Feature extraction: using CNN to extract the spatial features of the input data; Complex convolution function: using a learnable parameterized Gaussian function G CNN To enhance the ability of feature extraction; time series modeling: use LSTM to capture the temporal dependency of data, and the input of LSTM also includes the spatial features extracted by CNN; output prediction: use the fully connected layer to generate the final prediction result. Finally, the performance of the model needs to be evaluated. Usually, the data on the test set is used for evaluation. If the model performs poorly, it may be necessary to go back to the previous steps for adjustments, such as changing the model architecture, adding more data, adjusting hyperparameters, etc., to improve the performance of the model.

[0147] It should also be noted that in order to minimize the loss function L, the back propagation algorithm and gradient descent method can be used to update the parameters of the network, such as using the Adam optimizer, and the learning rate decay strategy may be applied to accelerate convergence;

[0148] Preferably, a convolutional neural network (CNN) is combined with a long short-term memory network (LSTM) to construct a spatiotemporal fusion model, which can effectively capture the spatial and temporal dependencies in the data. CNN is good at processing spatial structural information and can extract local features and patterns in sensor data, while LSTM is good at processing sequence data and can remember long-term dependencies and manage information flows at different time points. This combination not only enhances the model's ability to understand complex dynamic systems, but also improves prediction accuracy and stability. Especially when dealing with tasks with significant spatial distribution and temporal variation characteristics, the model can better simulate and predict the behavior of the system, providing strong technical support for fields such as environmental monitoring, intelligent transportation systems, and health monitoring.

[0149] Furthermore, after CNN extracts spatial features and LSTM captures time series features based on the spatiotemporal fusion model;

[0150] Calculate the correlation coefficient r between the CNN and LSTM output features to quantify the strength of the linear relationship. The expression is:

[0151] ;

[0152] Among them, x i andi Represent the elements in the CNN and LSTM output feature vectors respectively, and Represent the average value of the vector, n is the length of the vector;

[0153] Calculate the mutual information value between CNN and LSTM output features , the expression for nonlinear relationship capture is:

[0154] ;

[0155] Among them, p(x,y) is the joint probability distribution, p(x) and p(y) are marginal probability distributions;

[0156] Set the correlation coefficient threshold θ r , if the correlation coefficient is lower than the threshold θ r , it indicates that the correlation between features is weak and there is noise;

[0157] It should be noted that, in general, the value of θr may be set to a small positive value close to 0, such as 0.1 or 0.2, depending on the specific application scenario and the strength of the correlation between the features that are expected to be retained.

[0158] Set the mutual information threshold θ I , if the mutual information value Below the threshold value θ I , it indicates that there is noise between features;

[0159] It should be noted that θ I The value of can be set according to the actual application scenario and the dependency strength between the features that are expected to be retained.

[0160] Preferably, the correlation coefficient and mutual information are both statistics used to measure the strength of the relationship between features.

[0161] For the identified noise features, principal component analysis is used to reduce the dimension of the features and then input them into the spatiotemporal fusion model for retraining.

[0162] S4. Through the collaboration and data sharing between sensors, real-time data verification and outlier identification are performed, and data is automatically adjusted.

[0163] Furthermore, by checking the consistency of formula V ck , the data verification expression for the data of different sensors at the same time point is:

[0164] ;

[0165] Among them, U j´ is the data of the j´th sensor, j´ is the index variable of the sensor data, is the average value of all sensor data, M is the total number of sensors;

[0166] Preferably, the consistency check formula V ck The mean of the absolute deviation between each sensor data and the average of all sensor data is calculated to measure the consistency of the data; if V ck If the value is smaller, it indicates that the data of all sensors are consistent; otherwise, the data of some sensors may be inconsistent with the data of other sensors.

[0167] Based on the standardized residual of sensor data, the information filtering function H is used fr , used to measure the abnormality of the standardized residual and define the outlier identification index Z ay The expression is:

[0168] ;

[0169] ;

[0170] ;

[0171] Where v is the mean value of all sensor data, ω is the standard deviation of all sensor data, z is the standardized residual, dt is the differential of the integral variable t, e is a natural constant, and U j´ is the data of the j´th sensor;

[0172] Preferably, the cumulative distribution function of the standard normal distribution is used as the information filtering function H fr , which means that larger standardized residuals z are given greater weights and are thus identified as outliers.

[0173] Furthermore, combined with the constant identification indicator and data consistency check index V ck , construct the automatic data adjustment expression R adj for:

[0174] ;

[0175] Among them, γ is the adjustment coefficient of the control outlier identification index, and δ is the adjustment coefficient of the control consistency check index.

[0176] It should be noted that the adjustment coefficients γ and δ need to be determined according to actual conditions. They can be pre-set fixed values ​​or dynamically adjusted values, depending on the design requirements of the system.

[0177] It should also be noted that by working together and sharing data among sensors, real-time data verification and outlier identification, and automatically adjusting data, the accuracy and reliability of the environmental monitoring system can be significantly improved. Specifically, the consistency check formula V ck To measure the data consistency of different sensors at the same time point, calculate the mean of the absolute deviation between each sensor data and the average value of all sensor data. If V ck If it is small, it means that the data of all sensors are relatively consistent; otherwise, the data of some sensors may be inconsistent with the data of other sensors. In addition, the cumulative distribution function H based on the standardized residual of the sensor data and the standard normal distribution is fr To define the outlier identification indicator , can effectively identify outliers. Larger standardized residuals z will be given greater weights, making them easier to identify as outliers. Combined with the consistency check indicator V ck and outlier identification indicators , construct the automatic data adjustment expression R adj , the coefficients γ and δ can be adjusted according to actual conditions to achieve accurate adjustment of the data. These beneficial effects not only improve the quality of monitoring data, but also enhance the robustness and accuracy of the system, which is of great significance for environmental monitoring and data analysis.

[0178] S5. Fusion the data after noise identification and collaborative processing, use machine learning algorithms to identify patterns and trends in the data, and generate a comprehensive air quality index.

[0179] Furthermore, the weighted average method is used to fuse the preprocessed and denoised multimodal sensor data to generate a comprehensive data set expression:

[0180] ;

[0181] ;

[0182] Among them, D f is the fused dataset, D i is the data of the ith sensor, w i is the weight of the i-th sensor, Q is the number of sensors, r i is the correlation coefficient (or reliability coefficient) of the i-th sensor;

[0183] Extract statistical data characteristics of average concentration, standard deviation, maximum value, minimum value, and seasonal and periodic time series characteristics from the comprehensive data set;

[0184] Use recursive feature elimination to select important features;

[0185] Preferably, Recursive Feature Elimination (RFE) is a feature selection method that determines the best feature subset by recursively removing the least important features. The basic idea of ​​RFE is to start with all features, train a model (such as a decision tree or a support vector machine), and then remove the least important features based on the importance scores of each feature in the model (such as the feature importance in the decision tree or the coefficient size in the support vector machine). This process is repeated until the predetermined number of features is reached or the stopping condition is met.

[0186] It should be noted that the advantage of the RFE method over other feature selection methods (such as filtering-based methods or wrapper methods) is that it takes into account the interactions between features and can directly evaluate the importance of features during model training. This method is particularly suitable for nonlinear models because it can capture the complex interactions between features. In addition, RFE provides an intuitive way to evaluate which features contribute most to model predictions, which is very useful for explaining the model and improving the interpretability of the model.

[0187] Furthermore, the selected features are input into the gradient boosting decision tree model for training, and the expression of the comprehensive air quality index is generated as follows:

[0188] ;

[0189] Where y is the comprehensive air quality index, n is the total number of selected features, is the error term, is the gradient boosting decision tree model, The feature vector representing the nth input data;

[0190] The mean square error loss function L is used to measure the difference between the predicted value and the true value, which is used to evaluate the performance of the model under different hyperparameter combinations;

[0191] Tune the hyperparameters of the gradient boosted decision tree model through grid search;

[0192] Using the trained gradient boosting decision tree model, the air quality index of the new sensor dataset is The prediction expression is:

[0193] .

[0194] It should be noted that by fusing the multimodal sensor data after noise identification and collaborative processing, we can obtain a more accurate and reliable data set. The weighted average method is used for data fusion, that is, by calculating the correlation coefficient (or reliability coefficient) of each sensor data to determine its weight, it can ensure that the contribution of each sensor is proportional to its actual reliability, thereby improving the quality of the final fused data. This fusion method helps to reduce the impact of outliers and can better reflect the real environmental status. Next, key statistical features (such as average concentration, standard deviation, maximum and minimum values) and time series features (such as seasonal and cyclical changes) are extracted from the fused data set. These features can provide comprehensive information about air quality and are crucial for subsequent analysis. Through recursive feature elimination (RFE ) method to select the most important features, which can further optimize the performance of the model. The RFE method can recursively remove the least important features until the optimal feature subset is reached. Compared with other feature selection methods, RFE not only considers the interaction between features, but also can directly evaluate the importance of features during model training, which helps to improve the interpretability and prediction accuracy of the model, especially when facing nonlinear problems; the selected features are input into the gradient boosting decision tree (GBDT) model for training to generate a comprehensive air quality index, and the mean square error (MSE) is used as the loss function to evaluate the difference between the model prediction value and the true value, and then the model's hyperparameters are adjusted to optimize the performance. In this way, we can build an accurate, stable and highly interpretable model for predicting the air quality index (AQI).

[0195] S6. The air quality index will be pushed to the public in real time through the LCD display screen of the monitoring center, mobile applications and the web interface of the online platform.

[0196] Furthermore, LCD screens have been installed in public places such as parks, schools, shopping malls and transportation hubs. These screens update the AQI value in real time and indicate the air quality level through color coding, such as green for good, yellow for moderate and red for unhealthy, ensuring that people can quickly understand the local air quality conditions no matter where they are;

[0197] Developed a mobile app that allows users to view real-time AQI data for their area or areas of interest at any time through their smartphones. The app not only displays data intuitively in the form of charts and color coding, but also provides personalized functions such as setting reminders (notifying users when AQI reaches a certain threshold), viewing historical data, and predicting future trends, which greatly facilitates users' daily use;

[0198] The monitoring center has also established a web interface for the online platform for users to query real-time AQI data through computers or other devices. This user-friendly and easy-to-use interface includes a map view. Users only need to click on the location on the map to obtain the AQI of that location. In addition to providing real-time data, the website also allows users to query historical data, analyze trends, and even integrate AQI data into third-party applications and services through API interfaces;

[0199] It should be noted that in order to ensure the accuracy and real-time nature of the information, the monitoring center has adopted a data synchronization mechanism to ensure that the data from all push channels remain consistent. At the same time, a feedback mechanism has been established to encourage users to report errors or make suggestions for improvement, so as to continuously optimize service quality. Through these channels, the public can easily obtain the latest air quality conditions, which helps them make health-related decisions, such as whether to go out, wear masks, and reduce outdoor activities. This is of great significance to raising public health awareness and promoting environmental protection actions.

[0200] In summary, the present invention collects environmental data in real time through a distributed network of gas, particulate matter and temperature and humidity sensors, and combines the LoRaWAN wireless communication protocol to efficiently transmit data, thereby ensuring the real-time and integrity of the monitoring data. In the data preprocessing stage, by formatting, standardizing and noise filtering the data, a solid foundation is laid for subsequent in-depth analysis. The construction of the spatiotemporal fusion model significantly improves the prediction accuracy and stability of the monitoring system. In addition, by calculating the correlation coefficient and mutual information, the noise in the sensor data is identified and suppressed, further enhancing the robustness of the system. The collaborative work and data sharing mechanism between sensors ensure the consistency and accuracy of the monitoring data. Finally, through data fusion and machine learning algorithms, a comprehensive air quality index (AQI) is generated and pushed to the public in real time through multiple channels, which improves the public's awareness of air quality conditions and helps individuals and communities take appropriate preventive measures.

[0201] Example 2, referring to Table 1, is the second example of the present invention. To further verify the technical solution of the present invention, experimental simulation data of an air quality detection method based on multi-sensor monitoring is provided.

[0202] A monitoring network consisting of multiple sensors is deployed in a typical area of ​​the city, including gas sensors, particulate matter sensors, and temperature and humidity sensors. These sensors are installed at different heights and locations to comprehensively collect air quality data in the area. The sensors used include but are not limited to sulfur dioxide (SO2), carbon monoxide (CO), nitrogen oxides (NO x), ozone (O3), ammonia (NH3), volatile organic compounds (VOCs), and particulate matter sensors for measuring PM2.5 and PM10, as well as sensors for measuring temperature and humidity;

[0203] First, the deployment and data collection of the sensor network are carried out according to the following steps: deploy sensor nodes in the target area and assign a unique identifier to each sensor node. Select LoRaWAN as the wireless communication protocol and configure each sensor node as a Class A device. Set the data upload interval to once every 5 minutes and use the data collection formula C. i (t) = S i (t)⋅f i To collect data, where f i It is the correction factor of sensor i, which is obtained through calibration, and the collected data is sent to the gateway through the LoRaWAN protocol.

[0204] Secondly, the collected environmental raw data are formatted, standardized and noise filtered: the timestamp of the sensor data is aligned with the coordinated universal time (UTC) and converted into JSON format. The sensor readings converted into JSON format are converted into a unified unit, and the minimum and maximum normalization method is used to scale the data to the [0,1] interval. The data is processed using a sliding average filter, and the window size is adjusted according to the data fluctuations and sampling rate. Based on the data processed by the sliding average filter, the interquartile range (IQR) is applied to identify and exclude outliers.

[0205] Next, a spatiotemporal fusion model is constructed: a two-dimensional convolutional layer is used to simulate the spatial relationship between sensors, and convolution kernels are used to extract spatial correlations. GCNN is introduced to enhance the spatial feature extraction capability of the convolution kernels. The output of GCNN is used as an additional input to the long short-term memory network (LSTM), and a gating mechanism is used to control the inflow of information. After integrating the spatial and temporal features, a fully connected layer is used to generate the final prediction.

[0206] Furthermore, the correlation coefficient and mutual information of cross-modal signals are calculated to identify and suppress noise in different sensor data: the correlation coefficient r between the output features of CNN and LSTM is calculated, and the strength of linear relationship is quantified; the mutual information value I (X; Y) between the output features of CNN and LSTM is calculated, and nonlinear relationship is captured. For the identified noise features, principal component analysis (PCA) is used to reduce the dimension of the features and input them into the spatiotemporal fusion model for retraining; through the collaboration and data sharing between sensors, real-time data verification and outlier identification are carried out, and data is automatically adjusted: through the consistency check formula V ckData verification is performed on the data of different sensors at the same time point. Based on the standardized residual of the sensor data, the information filtering function H is used fr Define the outlier identification indicator Z ay , combined with the constant identification index Z ay and data consistency check index V ck , construct the automatic data adjustment expression R adj .

[0207] Finally, the data after noise identification and collaborative work processing are fused, and machine learning algorithms are used to identify patterns and trends in the data to generate a comprehensive air quality index: the weighted average method is used to fuse the multimodal sensor data after preprocessing and denoising to generate a comprehensive data set, statistical data features and time series features are extracted from the comprehensive data set, and the recursive feature elimination method is used to select important features. The selected features are input into the gradient boosting decision tree model for training to generate a comprehensive air quality index (AQI), and the hyperparameters of the gradient boosting decision tree model are tuned through grid search.

[0208] The details are shown in Table 1 below:

[0209] Table 1 Experimental record table

[0210]

[0211] According to the above experimental data, it can be observed that the method of the present invention has significant advantages over traditional methods in processing air quality data. From the data of experiments A, B and C, it can be seen that the method of the present invention can not only more accurately capture the concentration changes of various pollutants, but also effectively reduce the interference caused by sensor noise, thereby making the comprehensive air quality index (AQI) more reliable.

[0212] The following is an evaluation of the advantages and effects of the method of the present invention in air quality monitoring: PM2.5 concentration: In the experimental group, the PM2.5 concentration ranged from 20 to 30 μg / m³, while the PM2.5 concentration in the control group was 35 μg / m³, which shows that the method of the present invention is more effective in removing noise and outliers, making the data more accurate; SO2 concentration: The SO2 concentration range of the experimental group was 4 to 6 ppb, while that of the control group was 8 ppb, which means that the method of the present invention can more accurately reflect the actual SO2 concentration level and avoid the problem of falsely high concentration caused by noise; NO x Concentration: NO in the experimental group x The concentration range was 18-25 ppb, while the control group was 30 ppb, which also showed the effectiveness of the method of the present invention in reducing noise and ensuring that NO xAuthenticity and accuracy of concentration data; Temperature and humidity: In terms of temperature and humidity, the data of the experimental group did not change much, showing the good performance of the method of the present invention in data calibration and outlier identification, ensuring the stability of temperature and humidity data; Comprehensive AQI: The AQI range of the experimental group was 45-55, while the AQI of the control group was 65. The lower AQI indicated that the air quality of the experimental group was better, which reflects the advantage of the method of the present invention in comprehensively processing data of multiple pollutants and can more accurately evaluate the actual air quality conditions.

[0213] In summary, the data processed by the method of the present invention not only reduces the impact of noise, but also improves the accuracy of the data. Therefore, the present invention has obvious innovation and practicality in the field of air quality monitoring, and can more effectively provide the public with accurate air quality information.

[0214] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. An air quality detection method based on multi-sensor monitoring, characterized in that: include, Based on the gas sensors, particulate matter sensors and temperature and humidity sensors distributed in the network, the raw environmental data is collected in real time at a preset frequency; Perform data formatting, standardization and noise filtering on the collected raw environmental data; Combine convolutional neural networks with long short-term memory networks to build a spatiotemporal fusion model, calculate the correlation coefficient and mutual information of cross-modal signals, and identify and suppress noise in different sensor data; Through the collaboration and data sharing between sensors, real-time data verification and outlier identification are performed to automatically adjust data; The data after noise identification and collaborative work processing are integrated, and machine learning algorithms are used to identify patterns and trends in the data to generate a comprehensive air quality index; Push notifications of air quality index to the public in real time through LCD screens at monitoring centers, mobile applications, and web interfaces of online platforms; The convolutional neural network is combined with the long short-term memory network to construct a spatiotemporal fusion model. The specific steps are as follows: The spatial relationship between sensors is simulated through a two-dimensional convolution layer, and the convolution kernel is defined to extract the spatial correlation. The expression is: ; Among them, F CNN represents the extraction result of the convolution kernel on the spatial features, w ij is the weight matrix of the convolution kernel, 𝑋 𝑖𝑗 represents the sensor data of the i-th row and j-th column, b is the bias term, and f is the ReLU activation function; Introduce the convolution function G CNN , the convolution kernel spatial feature extraction capability is further enhanced, and the expression is: ; Among them, α and β are learnable parameters, μ(F CNN ) and σ(F CNN ) is obtained by an additional convolutional layer F CNN The calculated mean and standard deviation are represents the exponential function; By using G CNN The output of is used as an additional input of the long short-term memory network LSTM, and a gating mechanism is used to control the inflow of information. The expression is: ; Among them, H LSTM (t) is the LSTM output at the last time point t, X t is the sensor data at time point 𝑡, h t−1 and c t−1 are the hidden state and cell state at the previous time point t; After integrating spatial and temporal features, a fully connected layer is used to generate the final prediction and map the information output by the long short-term memory network LSTM to the predicted target variable. Above, the expression is: ; Among them, W out and b out are the weights and biases of the fully connected layer; Finally, the mean square error loss function L is defined to evaluate the performance of the spatiotemporal fusion model, and the iterative optimization expression is: ; Among them, y i is the true value, is the predicted value, N is the number of samples; The specific steps of calculating the correlation coefficient and mutual information of cross-modal signals and identifying and suppressing noise in different sensor data are as follows: After CNN extracts spatial features and LSTM captures time series features based on the spatiotemporal fusion model; Calculate the correlation coefficient r between the CNN and LSTM output features to quantify the strength of the linear relationship. The expression is: ; Among them, x i and i Represent the elements in the CNN and LSTM output feature vectors respectively, and Represent the average value of the vector, n is the length of the vector; Calculate the mutual information value between CNN and LSTM output features , the expression for nonlinear relationship capture is: ; Among them, p(x,y) is the joint probability distribution, p(x) and p(y) are marginal probability distributions; Set the correlation coefficient threshold θ r , if the correlation coefficient is lower than the threshold θ r , it indicates that the correlation between features is weak and there is noise; Set the mutual information threshold θ I , if the mutual information value Below the threshold value θ I , it indicates that there is noise between the features; For the identified noise features, principal component analysis is used to reduce the dimension of the features and then input them into the spatiotemporal fusion model for retraining; The specific steps of performing real-time data verification and outlier identification and automatically adjusting data through collaborative work and data sharing among sensors are as follows: Check the consistency of the formula V ck , the data verification expression for the data of different sensors at the same time point is: ; Among them, U j´ is the data of the j´th sensor, j´ is the index variable of the sensor data, is the average value of all sensor data, M is the total number of sensors; Based on the standardized residual of sensor data, the information filtering function H is used fr , define the outlier identification index Z ay The expression is: ; ; ; Where v is the mean value of all sensor data, ω is the standard deviation of all sensor data, z is the standardized residual, dt is the differential of the integral variable t, e is a natural constant, and U j´ is the data of the j´th sensor; Combined with constant identification indicators and data consistency check indicators , construct the automatic data adjustment expression R adj for: ; Among them, γ is the adjustment coefficient of the control outlier identification index, and δ is the adjustment coefficient of the control consistency check index; The data after noise identification and collaborative processing are integrated, and machine learning algorithms are used to identify patterns and trends in the data to generate a comprehensive air quality index. The specific steps are as follows: The weighted average method is used to fuse the multimodal sensor data after preprocessing and noise reduction to generate a comprehensive data set expression: ; ; Among them, D f is the fused dataset, D i is the data of the ith sensor, w i is the weight of the i-th sensor, Q is the number of sensors, r i is the correlation coefficient of the i-th sensor; Extract statistical data characteristics of average concentration, standard deviation, maximum value, minimum value, and seasonal and periodic time series characteristics from the comprehensive data set; Use recursive feature elimination to select important features; The selected features are input into the gradient boosting decision tree model for training, and the expression of the comprehensive air quality index is generated as follows: ; Where y is the comprehensive air quality index, n is the total number of selected features, ϵ is the error term, is the gradient boosting decision tree model, The feature vector representing the nth input data; The mean square error loss function L is used to measure the difference between the predicted value and the true value; Tune the hyperparameters of the gradient boosted decision tree model through grid search; Using the trained gradient boosting decision tree model, the air quality index of the new sensor dataset is The prediction expression is: .

2. The air quality detection method based on multi-sensor monitoring as claimed in claim 1, characterized in that: The gas sensors, particulate matter sensors and temperature and humidity sensors distributed in the network refer to: Detect the presence and concentration of sulfur dioxide, carbon monoxide, nitrogen oxides, ozone, ammonia and volatile organic compound gases in the environment through gas sensors; Monitor the M in the air through the particle sensor 2.5 and PM 10 of suspended particles; The temperature and humidity of the environment are measured by a temperature and humidity sensor composed of a temperature sensitive element and a humidity sensitive element.

3. The air quality detection method based on multi-sensor monitoring as claimed in claim 2, characterized in that: The specific steps of collecting the raw environmental data in real time at a preset frequency are as follows: Deploy sensor nodes in the target area and set identifiers on each sensor node; Select LoRaWAN as the wireless communication protocol, configure Class A devices for each sensor node, and set the data upload interval; Data collection is performed through the data collection formula, the expression is: ; Among them, C i (t) is the calibrated concentration or reading of sensor i at time t, S i (t) is the raw reading of sensor i at time t, f i is the correction factor of sensor i, i is the index variable of the sensor; The collected data is sent to the gateway via the LoRaWAN protocol.

4. The air quality detection method based on multi-sensor monitoring as claimed in claim 3, characterized in that: The data collected is formatted, standardized and noise filtered, and the specific steps are as follows: Align the timestamps of sensor data with Coordinated Universal Time and convert them into JSON format; The sensor readings converted to JSON format are converted to a uniform unit, and the minimum and maximum normalization method is used to scale the data to the [0,1] interval. The expression is: ; Where X is the original data point, X min and X max are the minimum and maximum values ​​respectively; Use sliding average filtering to process data, and select data points based on data fluctuations and sampling rate adjustments; Based on the data processed by the sliding average filter, the interquartile range IQR is used to identify and exclude outliers. The expression is: ; ; Among them, Q1 and Q3 are the first and third quartiles respectively.

Citation Information

Patent Citations

  • CNN and LSTM fused neural network-based air PM2.5 concentration prediction method

    CN108009674A

  • Intelligent Internet of Things air quality monitoring system

    CN117953995A

  • Environmental data monitoring method for industrial production site

    CN118464114A

  • KR20240098686A