An electronic nose system and odor detection method for identifying odors in confined spaces
Through the TrellisNet model and the electronic nose system of the self-attention mechanism, the complexity and response speed of odor detection in confined spaces are solved, and fast and accurate odor recognition and evaluation are achieved, which is suitable for special environments such as ships.
Patent Information
- Application Number
- CN202410716453.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2044-06-04
AI Technical Summary
The existing confined space odor detection technology has the problems of difficulty in diffusion of odor aggregation, low detection threshold, complex odor composition, slow system response and poor portability, and is difficult to widely use in special environments such as ships.
The electronic nose system using the TrellisNet model combined with the self-attention mechanism is used to collect data through the TGS gas-sensitive sensor, perform normalization processing and time series analysis, and extract features using recursive convolutional layers to build dependencies between sensors to achieve fast and accurate odor recognition and evaluation.
It realizes efficient and accurate odor recognition and evaluation, fast in-situ online analysis, fast response speed, lightweight and good portability of the system, and is suitable for confined spaces such as ships, submarines, and space stations.
Smart Images

Figure CN118641699B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of environmental monitoring and control, and in particular to an electronic nose system and an odor detection method for identifying odors in a confined space. Background Art
[0002] Air pollution and odors generated by confined spaces often cannot dissipate naturally, leading to poor working conditions. These include oil releases from power machinery systems, toxic chemicals slowly released from equipment paints and coatings, irritating volatile gases such as aliphatic hydrocarbons from cooking waste, and human body odor and its metabolic products. These odors not only pose a potential toxic hazard but also severely impact the subjective experience of workers in production and daily life. Long-term work can affect their concentration and even reduce their basic functional abilities, information analysis, and strategic decision-making capabilities.
[0003] Existing technologies for odor detection in enclosed ship cabin environments have the following problems:
[0004] 1. Odor accumulation and difficulty in diffusion: Confined environments, such as ship cabins, have poor air flow, causing odors to accumulate and become difficult to diffuse naturally. This leads to abnormally high odor concentrations in localized areas, affecting the living and working environment of crew members and posing a potential health risk.
[0005] 2. Low detection threshold: In confined spaces, even very low concentrations of odor can cause discomfort or health issues due to continued exposure. Therefore, odor detection systems must have a low detection threshold to capture these low-concentration odors. This requires extremely sensitive detection technology to accurately identify and quantify odor components at extremely low concentrations.
[0006] 3. Complex Odor Composition: Odors in ship cabins often originate from a variety of sources, including grease from mechanical equipment, human metabolic products, kitchen cooking odors, and chemical cleaning agents. The odor components of these sources are complex and varied, making it difficult for single or traditional gas detection technologies to cover all possible compounds, thus posing a challenge to comprehensive odor detection and classification.
[0007] 4. System Response and Portability Issues: Existing electronic nose systems often experience delays in detecting and identifying odors, especially in environments where air quality issues need to be diagnosed and addressed quickly. In emergency situations, such as chemical leaks or fires, this lack of response speed can result in delays in taking effective action, increasing risk. Most electronic nose systems were originally designed for laboratory use, which means they are often bulky and difficult to move.
[0008] 5. Algorithm and Deployment Issues: Existing odor recognition and evaluation model algorithms often have large parameters and long training cycles, making them difficult to directly burn into or deploy in electronic nose devices. The lack of lightweight and efficient algorithms makes these systems difficult to widely use in specialized environments such as ships, which typically require extremely high device performance and response speed. Summary of the Invention
[0009] The purpose of the present invention is to provide an electronic nose system and odor detection method for identifying odors in confined spaces. The advantages of the system are: efficient and accurate odor identification and evaluation, rapid in-situ online analysis, fast response speed, good portability, simple operation and low maintenance cost. It is widely applicable to the identification and management of odorous gases in ships, submarines, space stations, indoor buildings, underground civil air defense projects and other closed environments.
[0010] The above technical objectives of the present invention are achieved through the following technical solutions: A method for detecting odors in a confined space, comprising the following steps:
[0011] Step 1: Odor data collection and preprocessing: odor data is collected through a TGS gas sensor, and the odor data includes aromatic hydrocarbon gas data, aliphatic hydrocarbon gas data, and irritating odor gas data; the odor data is normalized to obtain time series data;
[0012] Step 2: Extract odor data features and input the model. Use the TrellisNet model to process the time series data. The time series data is the time-varying data of the odor data in step 1. The horizontal axis of the established coordinate system is time and the vertical axis is concentration value. The recursive convolution layer is used to extract the time-dependent features.
[0013] Step 3: Global dependency modeling: Introducing the self-attention mechanism to construct the dependency between the odor data collected by the sensors, revealing the influence path and importance between sensors, and understanding the reaction process of the overall chemical environment.
[0014] The present invention is further configured such that step one specifically includes the following steps:
[0015] Step S11: Collect odor gas data: Use the TGS gas sensor to react chemical substances with different odor gases in the air to obtain data on the reaction intensity of the odor gas chemical substances over time;
[0016] Step S12: Normalize the collected data: normalize the odor data to the range of [0, 1], calculate the normalization parameters, calculate the maximum value (max) and minimum value (min) of the odor data collected by each TGS gas sensor, and use the calculated normalization parameters to perform linear transformation on the odor data of each TGS gas sensor and map it to the target range [0, 1]. For each sensor data X i , and normalize using the following formula:
[0017]
[0018] Among them, x i,normalized is the normalized data of sensor i, min i and max i are the minimum and maximum values of sensor i, respectively;
[0019] Step S13: Create a time series sample: the length is T, and the shape of the original data is (N, D). The shape of the created time series sample is (N, T, D).
[0020]
[0021] Among them, X n,t is the input sequence of the nth sample at time t, x n,t is the data of the nth sample at time t.
[0022] The present invention is further configured such that step 2 specifically includes the following steps:
[0023] Step S21: Time-dependent feature extraction: The time-dependent features of each sensor data are extracted using the recursive convolutional layer of TrellisNet;
[0024] S211: Initialize the weight parameters of the recursive convolution layer. Suppose the input feature dimension is D, the convolution kernel size is K, the hidden layer dimension is H, and the weight parameter of the convolution layer is W. conv , the bias parameter is b conv ;
[0025]
[0026] S212: Apply convolution operation in recursive convolution layer: Let the input of the current layer be The output is The time step is t;
[0027]
[0028] Among them, * represents the convolution operation, and ReLU is the activation function;
[0029] S22: The output of the recursive convolutional layer Passed to the next layer as input;
[0030] S23: Constructing a TrellisNet model structure: The TrellisNet model structure is a stack of multiple recursive convolutional layers with residual connections, normalization, and output layers;
[0031] S24: Local features of the sequence, capturing the response pattern in a short period of time through convolution operations,
[0032]
[0033] The present invention is further configured such that S23 specifically includes the following steps:
[0034] S231: Multi-layer recursive convolution stack: For the lth convolution layer, let the input be (X (l) , the output is Y (l) ;
[0035] Y (l) =ReLU(X (l) *W conv +b conv)
[0036] S232: Add residual connection: Let the input of the lth layer be X (l) , the output is Y (l) ;
[0037] Z (l) =X (l) +Y (l)
[0038] S233: normalize the layer output;
[0039] N (l) =LayerNorm(Z (l) )
[0040] S234: Output layer, which passes the output of the last recursive convolutional layer to the fully connected layer for classification;
[0041] O=Softmax(W out N (L) )+b out )
[0042] Where: W out and b out are the weights and bias parameters of the fully connected layer, and L is the total number of recursive convolutional layers.
[0043] The present invention is further configured such that step three specifically includes the following steps:
[0044] S31: Calculate query, key and value:
[0045] Q=XW Q ,K=XW K ,V=XW V
[0046] Where: Q is the query matrix (shape is (N, T, d k ))), K is the key matrix (shape is (N, T, d k )), v is a value matrix (shape (N, T, d v ), W Q , W K , W V is the linear transformation weight;
[0047] S32: Calculate attention score:
[0048]
[0049] Among them, A is the attention score matrix;
[0050] S33: Calculate attention weight:
[0051] S=Softmax(A)
[0052] S34: Calculate attention output:
[0053] O=SV
[0054] S35: Multi-head attention: The multi-head attention mechanism enhances the learning ability of the model by combining multiple attention heads. Each head independently calculates an attention matrix. Finally, the outputs of all heads are concatenated and linearly transformed to the target dimension.
[0055] O=Concat(O1,O2,...,O h )W O
[0056] Among them O i is the output of the i-th head, h is the number of heads, W O is the linear transformation weight.
[0057] An electronic nose system for identifying odors in confined spaces, comprising the following units:
[0058] Odor data collection unit: The odor data collection unit is used to capture and collect odor gas data in a confined space in real time;
[0059] Odor data processing and analysis unit: The odor monitoring host computer unit is used to receive the analysis results of the odor data processing and analysis unit;
[0060] Odor monitoring host computer unit: The odor monitoring host computer unit is used to receive the analysis results of the odor data processing and analysis unit.
[0061] The present invention is further configured as follows: the odor data acquisition unit includes a gas sensor array, a heating module, an analog-to-digital converter and an STM32 controller module, the gas sensor array is used for odor data acquisition, the gas sensor array is connected to the ADC interface of the STM32 controller module through a signal conditioning circuit and an analog-to-digital converter, the heating module is used to provide a constant or adjustable temperature environment for the TGS gas sensor that needs to work under heating conditions, the analog-to-digital converter is used to convert the analog signals collected by the gas sensor array into digital signals, the STM32 controller module is used to command and coordinate the work of the data acquisition unit, the STM32 controller module is electrically connected to the heating module through a heating circuit, and the STM32 controller module sends data to a Linux operating system module through a serial port protocol.
[0062] The present invention is further configured as follows: the odor data processing and analysis unit includes a MiscroSD storage module and a Linux operating system module, the MiscroSD storage module is used to store the original data collected from the odor data acquisition unit, the Linux operating system module is used to provide data processing and analysis, the MiscroSD storage module is connected to the STM32 control module via an SPI interface to store real-time data of the TGS gas sensor, and the MiscroSD storage module is connected to the Linux operating system module via an SPI interface.
[0063] The present invention is further configured as follows: the odor monitoring host computer unit includes an HC-06 Bluetooth communication module, a PC terminal and a display screen module; the HC-06 Bluetooth communication module is used for the odor monitoring host computer unit to communicate with the PC terminal, a smart phone or a tablet computer; the PC terminal is used for the management and interaction of the odor monitoring host computer unit; and the display screen module is used for real-time display of the odor monitoring host computer unit.
[0064] The present invention is further configured as follows: the PC end includes a data monitoring module, an alarm notification module, a data visualization, a reporting module, a data management module, a system configuration module and a user interaction module; the data monitoring module displays the odor gas concentration in the confined space in real time; the alarm notification module provides a threshold setting function for the odor gas concentration and air quality; the data visualization and reporting module displays the data analysis results in the form of intuitive charts and reports; the data management module provides retrieval, query and screening functions for historical data; and the user interaction module supports simultaneous online operation of multiple users.
[0065] In summary;
[0066] 1. Efficient and accurate odor identification and assessment: This invention uses the TrellisAttNet model to achieve rapid identification and classification of complex odorous gases through feature extraction, recursive convolution and self-attention mechanism, greatly improving the accuracy and efficiency of detection.
[0067] 2. Rapid in-situ online analysis: The system's highly sensitive gas sensor array and rapid data processing capabilities enable it to monitor and analyze air quality within confined spaces in real time, providing immediate odor detection and alarm notifications to ensure timely response measures.
[0068] 3. Fast response speed: Compared with traditional detection methods, the electronic nose system of the present invention has a faster response speed and can quickly identify odors and issue an alarm in emergency situations (such as chemical leaks or fires), effectively reducing risks.
[0069] 4. Good portability: The system is lightweight, highly integrated, easy to carry and deploy, and suitable for a variety of confined space environments, including ships, submarines, space stations, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 This embodiment is used to reflect the flowchart of the TrellisAttNet model;
[0071] Figure 2 is a system block diagram of this embodiment;
[0072] Figure 3 This embodiment is used to reflect the Linux operating system architecture diagram. DETAILED DESCRIPTION
[0073] The present invention will be further described in detail below with reference to the accompanying drawings.
[0074] Example 1: A method for detecting odor in a confined space, comprising the following steps:
[0075] Step 1: Odor data collection and preprocessing: odor data is collected through a TGS gas sensor, and the odor data includes aromatic hydrocarbon gas data, aliphatic hydrocarbon gas data, and irritating odor gas data; the odor data is normalized to obtain time series data;
[0076] Step S11: Collect odor gas data: Use the TGS gas sensor to react chemical substances with different odor gases in the air to obtain data on the reaction intensity of the odor gas chemical substances over time;
[0077] Step S12: Normalize the collected data: normalize the odor data to the range of [0, 1], calculate the normalization parameters, calculate the maximum value (max) and minimum value (min) of the odor data collected by each TGS gas sensor, and use the calculated normalization parameters to perform linear transformation on the odor data of each TGS gas sensor and map it to the target range [0, 1]. For each sensor data X i , and normalize using the following formula:
[0078]
[0079] Among them, x i,normalized is the normalized data of sensor i, min i and max i are the minimum and maximum values of sensor i, respectively;
[0080] Step S13: Create a time series sample: the length is T, and the shape of the original data is (N, D). The shape of the created time series sample is (N, T, D).
[0081]
[0082] Among them, X n,t is the input sequence of the nth sample at time t, x n,t is the data of the nth sample at time t.
[0083] Step 2: Extract odor data features and input the model. Use the TrellisNet model to process the time series data. The time series data is the time-varying data of the odor data in step 1. The horizontal axis of the established coordinate system is time and the vertical axis is concentration value. The recursive convolution layer is used to extract the time-dependent features.
[0084] Step S21: Time-dependent feature extraction: The time-dependent features of each sensor data are extracted using the recursive convolutional layer of TrellisNet;
[0085] S211: Initialize the weight parameters of the recursive convolution layer. Suppose the input feature dimension is D, the convolution kernel size is K, the hidden layer dimension is H, and the weight parameter of the convolution layer is W. conv , the bias parameter is b conv ;
[0086]
[0087] S212: Apply convolution operation in recursive convolution layer: Let the input of the current layer be The output is The time step is t;
[0088]
[0089] Among them, * represents the convolution operation, and ReLU is the activation function;
[0090] S22: The output of the recursive convolutional layer Passed to the next layer as input;
[0091] S23: Constructing a TrellisNet model structure: The TrellisNet model structure is a stack of multiple recursive convolutional layers with residual connections, normalization, and output layers;
[0092] S231: Multi-layer recursive convolution stack: For the lth convolution layer, let the input be (X (l) , the output is Y (l) ;
[0093] Y (l) =ReLU(X (l) *W conv +b conv )
[0094] S232: Add residual connection: Let the input of the lth layer be X (l) , the output is Y (l) ;
[0095] Z (l) =X (l) +Y (l)
[0096] S233: normalize the layer output;
[0097] N (l) =LayerNorm(Z (l) )
[0098] S234: Output layer, which passes the output of the last recursive convolutional layer to the fully connected layer for classification;
[0099] O=Softmax(W out N (L) +b out )
[0100] Where: W out and b out are the weights and bias parameters of the fully connected layer, and L is the total number of recursive convolutional layers;
[0101] S24: Local features of the sequence, capturing the response pattern in a short period of time through convolution operations,
[0102]
[0103] Step 3: Global dependency modeling: Introducing a self-attention mechanism to construct dependencies between odor data collected by sensors, revealing the impact paths and importance between sensors, and understanding the reaction process of the overall chemical environment;
[0104] The specific steps of global dependency modeling include the following:
[0105] S31: Calculate query, key and value:
[0106] Q=XW Q ,K=XW K ,V=XW V
[0107] Where: Q is the query matrix (shape is (N, T, d k ))), K is the key matrix (shape is (N, T, d k )), V is the value matrix (shape (N, T, d v )), W Q ,W K ,W V is the linear transformation weight;
[0108] S32: Calculate attention score:
[0109]
[0110] Among them, A is the attention score matrix;
[0111] S33: Calculate attention weight:
[0112] S=Softmax(A)
[0113] S34: Calculate attention output:
[0114] O=SV
[0115] S35: Multi-head attention: The multi-head attention mechanism enhances the learning ability of the model by combining multiple attention heads. Each head independently calculates an attention matrix. Finally, the outputs of all heads are concatenated and linearly transformed to the target dimension.
[0116] O=Concat(O1,O2,...,O h )W O
[0117] Among them O i is the output of the i-th head, h is the number of heads, W O is the linear transformation weight.
[0118] The following describes the contents involved in the above embodiments in conjunction with the accompanying drawings.
[0119] like Figure 1 As shown in the figure: The electronic nose method for identifying odors in confined spaces provided in this embodiment first uses a TGS gas sensor to collect odor data and normalizes the collected data: normalizes the odor data to the range of [0,1], creates time series samples, ensures that the data is ready for model input, uses the TrellisNet model to extract time-dependent features, passes the output of the recursive convolution layer to the next layer as input, constructs the TrellisNet model structure, including residual connections, normalization and output layers, uses convolution operations to capture local features of the sequence, uses the self-attention mechanism to analyze the relationship between sensors, calculates queries, keys and values, and attention scores, applies the softmax function to calculate attention weights, and uses a multi-head attention mechanism to enhance the learning ability of the model.
[0120] This method uses the TrellisNet model to process time series data to capture the time-dependent characteristics of sensor data. It can well adapt to the sequential nature of odor data, thereby improving the model's odor detection effect. The self-attention mechanism is introduced to analyze the global dependency between sensors, which can better utilize the correlation information between sensors, thereby improving the model's understanding and analysis capabilities of odor data.
[0121] Example 2: An electronic nose system for identifying odors in a confined space, comprising the following units:
[0122] Odor data collection unit: The odor data collection unit is used to capture and collect odor gas data in a confined space in real time;
[0123] Odor data processing and analysis unit: The odor monitoring host computer unit is used to receive the analysis results of the odor data processing and analysis unit;
[0124] Odor monitoring host computer unit: The odor monitoring host computer unit is used to receive the analysis results of the odor data processing and analysis unit.
[0125] In which, the odor data acquisition unit includes a gas sensor array, a heating module, an analog-to-digital converter and an STM32 controller module. The gas sensor array is used for odor data acquisition. The gas sensor array is connected to the ADC interface of the STM32 controller module through a signal conditioning circuit and an analog-to-digital converter. The heating module is used to provide a constant or adjustable temperature environment for the TGS gas sensor that needs to work under heating conditions. The analog-to-digital converter is used to convert the analog signal collected by the gas sensor array into a digital signal. The STM32 controller module is used to command and coordinate the work of the data acquisition unit. The STM32 controller module is electrically connected to the heating module through a heating circuit. The STM32 controller module sends data to the Linux operating system module through a serial port protocol.
[0126] Furthermore, the odor data processing and analysis unit includes a MiscroSD storage module and a Linux operating system module, the MiscroSD storage module is used to store the raw data collected from the odor data acquisition unit, and the Linux operating system module is used to provide data processing and analysis. The MiscroSD storage module is connected to the STM32 control module via an SPI interface to store real-time data of the TGS gas sensor, and the MiscroSD storage module is connected to the Linux operating system module via an SPI interface.
[0127] Furthermore, the PC terminal includes a data monitoring module, an alarm notification module, a data visualization, a reporting module, a data management module, a system configuration module and a user interaction module. The data monitoring module displays the odor gas concentration in the confined space in real time. The alarm notification module provides a threshold setting function for the odor gas concentration and air quality. The data visualization and reporting module displays the data analysis results in the form of intuitive charts and reports. The data management module provides retrieval, query and screening functions for historical data. The user interaction module supports simultaneous online operations of multiple users.
[0128] The following describes the contents involved in the above embodiments in conjunction with the accompanying drawings.
[0129] like Figure 2As shown, it provides on-site monitoring and visualization interface, including real-time data display, alarm information display, and operation interface. The real-time data displays the odor gas concentration, air quality index and temperature and humidity information of the confined space in real time. According to the sensor data, it dynamically displays the concentration charts and historical trend charts of various gases. The alarm information shows that when the gas concentration or air quality exceeds the standard, the display screen scrolls the alarm information in real time, prompting the current polluted gas type and concentration level. It supports multi-level alarm information display, accompanied by sound and light alarm prompts. The operation interface supports a simple touch operation interface, and historical data, alarm records and other information can be directly viewed through the display screen. It provides a system setting and parameter configuration interface, which can set system operating parameters and calibrate sensors;
[0130] The gas sensor array is used for odor data collection, including TGS gas sensors for collecting AQI air quality, aromatic hydrocarbons, aliphatic hydrocarbons, and irritating odor gas data. Specifically, the TGS2600, TGS2602, TGS2603, TGS2610, and TGS2620 gas sensors are used. If the target detection gas is present in the air, the higher the concentration of the gas, the higher the conductivity of the sensor. The change in conductivity can be converted into a signal output corresponding to the gas concentration and input into the ADC interface of the STM32 controller module through the signal conditioning circuit and analog-to-digital converter to realize odor concentration detection;
[0131] The following are additional explanations for the sensors mentioned above: TGS2600: It has high sensitivity to pollutants in the air (such as carbon monoxide and methane) and is suitable for air quality detection. TGS2602: It is sensitive to odorous gases such as aromatic hydrocarbons and sulfides, and is suitable for detecting fragrance and harmful gases. TGS2603: It is sensitive to aliphatic hydrocarbon gases and is suitable for detecting odors caused by food spoilage or evaporation of oils. TGS2610 and TGS2620: They have good responses to alkanes and other volatile organic compounds (VOCs) and are suitable for detecting a variety of organic gases;
[0132] Because the TGS sensor has long-term stability and can maintain stable performance under various environmental conditions, it can meet the requirements of odor detection in confined spaces, where the sensor needs to maintain consistent detection performance under different temperature and humidity conditions.
[0133] The STM32 controller module directs and coordinates the data acquisition unit's operations, receiving real-time data from the TGS gas sensor via the ADC interface, controlling the heating module's operating status via the heating circuit, sending data to the Linux operating system module via the serial port protocol for further processing, storing the received real-time data from the TGS gas sensor in the MiscroSD storage module via the SPI protocol, and communicating with the HC-06 Bluetooth module via the serial port protocol for wireless transmission. The STM32F302RBT6 chip is based on the high-performance ARM Cortex-M4 32-bit RISC core, with an FPU operating frequency of up to 72MHz. It also embeds a floating-point unit (FPU), a memory protection unit (MPU), and an embedded trace macro (ETM). It also integrates two fast 12-bit 5Msps ADC interfaces.
[0134] The MiscroSD storage module is used to store the raw data collected from the odor data acquisition unit, including but not limited to the response values, timestamps, and sensor status information of various gas sensors. Specifically, a MiscroSD card is used to store the real-time data of the TGS gas sensor through the SPI protocol;
[0135] The Linux operating system module is used to provide data processing and analysis, including driver support for the gas sensor array of hardware devices, enabling data collection and hardware interaction. By integrating a communication protocol stack, the Linux operating system module supports network communication between the odor monitoring system and other devices or systems, ensuring remote transmission and real-time access to data. It has data processing and analysis functions, including data preprocessing, compression, encryption and decryption, and real-time analysis, ensuring that the system can process odor data efficiently and accurately, and providing support for system monitoring and management, including performance monitoring, error handling, and resource management.
[0136] The odor monitoring host computer unit includes: HC-06 Bluetooth communication module, PC terminal, and display module. The HC-06 Bluetooth communication module includes wireless communication, device pairing mechanism, low power consumption, high compatibility and data security transmission guarantee. It is used for the odor monitoring host computer unit to communicate with the PC terminal, smart phone or tablet computer, and supports remote data transmission and access, as well as real-time data monitoring, historical data access, and system configuration and update.
[0137] The management and interaction of the odor monitoring host computer unit includes data monitoring module, alarm notification module, data visualization and reporting module, data management module, system configuration module, and user interaction module;
[0138] The above-mentioned data monitoring module displays the odor gas concentration, air quality index (AQI), temperature and humidity and other environmental data in the confined space in real time, supports historical trend charts and real-time change charts of gas concentration, and intuitively displays the concentrations of different gas pollutants in grades (such as red, yellow and green indicators) according to national or international air quality standards.
[0139] The alarm notification module supports multi-level threshold settings for odorous gas concentration and air quality. When the concentration of one or more odorous gases exceeds the set threshold or the air quality index falls below the set standard, the system issues an audible and visual alarm. Alarm notifications can be sent via email or text message, ensuring a rapid response. An alarm history query function displays detailed information on all historical alarms.
[0140] The data visualization and reporting module displays data analysis results in intuitive charts and reports. Data can be exported in CSV, Excel, or PDF formats for further statistics and analysis. Regular air quality reports are automatically generated, covering real-time and historical odor gas concentrations, air quality index, and alarm history information.
[0141] The data management module provides retrieval, query and filtering functions for historical data. It can query relevant data according to time period, gas type and other conditions, support data backup and restore operations, ensure data integrity and security, and provide a role-based permission management mechanism to control access rights.
[0142] The system configuration module provides configuration and management of system parameters, including communication parameters, sensor calibration parameters, and model algorithm selection. It supports online updates of the odor recognition model algorithm, facilitating continuous optimization and improvement of the system. It also provides a gas sensor calibration function, allowing users to calibrate the sensor themselves.
[0143] The user interaction module supports simultaneous online operation by multiple users, and can perform system operations according to their own permissions. It provides a friendly user interface to quickly understand the system status and operate the functions of each module, and has built-in help documents and operation guides.
[0144] like Figure 3 As shown, it consists of a terminal layer, an edge layer, a platform layer, and an application layer to provide comprehensive confined space odor identification and management functions; it includes a TGS gas sensor array for detecting various odorous gases in confined spaces, including VOCs, sulfides, and ammonia. The collected gas data is sent to the edge layer through an edge gateway; it includes an edge gateway, which includes scheduling management, data analysis, edge applications, device access and protocol adaptation, data collection, data routing, Docker containers, and resource modules including computing, networking, storage, and operating systems;
[0145] It includes scheduling management, data analysis, edge applications, device access and protocol adaptation, data collection, data routing, and Docker containers. Scheduling management is used to coordinate system resources and optimize task execution. Data analysis is used to perform preliminary processing and analysis on collected gas data. Edge applications are used to run specific local applications on the edge side to improve system response speed. Device access and protocol adaptation are used to achieve interconnection with various sensor devices and support protocol conversion for heterogeneous devices. Data collection is used to collect and organize data transmitted by sensors. Data routing is used to correctly route data to subsequent processing modules or platform layers. Docker containers are used to deploy odor detection methods based on the TrellisAttNet model, run containerized applications and services, and ensure system flexibility and scalability.
[0146] The resource module includes computing, networking, storage, and operating systems. Computing is used to provide local computing capabilities for edge computing resources. Networking is used by edge gateways to ensure stable network connections. Storage is used to temporarily store analysis results and sensor data. The operating system provides underlying operating system support for the Linux operating system module.
[0147] The platform layer is used for more advanced data processing, analysis, storage, and decision support, including a remote monitoring platform and an analysis platform. The remote monitoring platform is a remote monitoring platform for monitoring air quality and odor status in confined spaces. The analysis platform uses advanced data analysis models and algorithms to deeply analyze sensor data, identify odor types and concentrations, and provide intelligent air quality management and decision support.
[0148] The application layer transforms the data and functions provided by the platform layer into practical applications and value, including leak prevention and control, health management, emergency response, and safety assurance. Leak prevention and control is applied to pools within special confined spaces, ensuring that hazardous gas leaks are promptly monitored and controlled. Health management analyzes air quality data to provide health management and recommendations for crew members. Emergency response provides emergency alerts and response plans when hazardous gases or odors exceeding standards are detected. Safety assurance ensures that cabin air quality meets safety standards, providing environmental protection.
[0149] This specific embodiment is merely an explanation of the present invention and is not intended to limit the present invention. After reading this specification, those skilled in the art may make non-creative modifications to this embodiment as needed. However, as long as such modifications are within the scope of the claims of the present invention, they are protected by patent law.
Claims
1. A method for detecting odor in a confined space, characterized in that: The steps include: Step 1: Odor data collection and preprocessing: odor data is collected through a TGS gas sensor, and the odor data includes aromatic hydrocarbon gas data, aliphatic hydrocarbon gas data, and irritating odor gas data; the odor data is normalized to obtain time series data; Step 2: Extract odor data features and input the model. Use the TrellisNet model to process the time series data. The time series data is the time-varying data of the odor data in step 1. The horizontal axis of the established coordinate system is time and the vertical axis is concentration value. The recursive convolution layer is used to extract the time-dependent features. Step 3: Global dependency modeling: Introducing a self-attention mechanism to construct dependencies between odor data collected by sensors, revealing the impact paths and importance between sensors, and understanding the reaction process of the overall chemical environment; Step 1 specifically includes the following steps: Step S11: Collect odor gas data: Use the TGS gas sensor to react chemical substances with different odor gases in the air to obtain data on the reaction intensity of the odor gas chemical substances over time; Step S12: Normalize the collected data: normalize the odor data to the range of [0, 1], calculate the normalization parameters, calculate the maximum value (max) and minimum value (min) of the odor data collected by each TGS gas sensor, and use the calculated normalization parameters to perform linear transformation on the odor data of each TGS gas sensor and map it to the target range [0, 1]. For each sensor data X i , and normalize using the following formula: Among them, x i,normalized is the normalized data of sensor i, min i and max i are the minimum and maximum values of sensor i, respectively; Step S13: Create a time series sample: the length is T, the original data shape is (N, D), and the shape of the created time series sample is (N, T, D); Among them, X n,t is the input sequence of the nth sample at time t; Step 2 specifically includes the following steps: Step S21: Time-dependent feature extraction: The time-dependent features of each sensor data are extracted using the recursive convolutional layer of TrellisNet; S211: Initialize the weight parameters of the recursive convolution layer. Suppose the input feature dimension is D, the convolution kernel size is K, the hidden layer dimension is H, and the weight parameter of the convolution layer is W. conv , the bias parameter is b conv ; S212: Apply convolution operation in recursive convolution layer: Let the input of the current layer be The output is The time step is t; Among them, * represents the convolution operation, and ReLU is the activation function; S22: The output of the recursive convolutional layer Passed to the next layer as input; S23: Constructing a TrellisNet model structure: The TrellisNet model structure is a stack of multiple recursive convolutional layers with residual connections, normalization, and output layers; S24: Local features of the sequence, capturing the response pattern in a short period of time through convolution operations, S23 specifically includes the following steps: S231: Multi-layer recursive convolution stack: For the lth convolution layer, let the input be (X (l) , the output is Y (l) ; Y (l) =ReLU(X (l) *W conv +b conv ) S232: Add residual connection: Let the input of the lth layer be X (l) , the output is Y (l) ; Z (l) =X (l) +Y (l) S233: normalize the layer output; N (l) =LayerNorm(Z (l) ) S234: Output layer, which passes the output of the last recursive convolutional layer to the fully connected layer for classification; O=Softmax(W out N (K) +b out ) Where: W out and b out are the weights and bias parameters of the fully connected layer, and L is the total number of recursive convolutional layers; Step 3 specifically includes the following steps: S31: Calculate query, key and value: Q=XW Q ,K=XW K ,V=XW V Where: Q is the query matrix (shape is (N, T, d k )), K is the key matrix (shape (N, T, d k )), V is the value matrix (shape (N, T, d v )), W Q ,W K ,W V is the linear transformation weight; S32: Calculate attention score: Among them, A is the attention score matrix; S33: Calculate attention weight: S=Softmax(A) S34: Calculate attention output: O=SV S35: Multi-head attention: The multi-head attention mechanism enhances the learning ability of the model by combining multiple attention heads. Each head independently calculates an attention matrix. Finally, the outputs of all heads are concatenated and linearly transformed to the target dimension. O=Concat(O1,O2,...,O h )W O Among them O i is the output of the i-th head, h is the number of heads, W O is the linear transformation weight.
Citation Information
Patent Citations
Health state correlation model construction method and system based on human body smell signal
CN114067190A
Carbon monoxide concentration prediction system based on improved grid network
CN117723712A