Rapid gas detection method, system and equipment for electronic nose and storage medium

By segmenting and embedding gas sensor signals into sequences, and combining this with a hybrid expert network for global feature extraction and semantic mapping, the problem of lacking independent semantic and temporal information in electronic nose systems is solved, achieving high-precision and rapid gas detection.

CN122084837APending Publication Date: 2026-05-26BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING UNIV OF POSTS & TELECOMM
Filing Date
2026-03-15
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing electronic nose systems' fast gas detection algorithms lack independent semantics and miss a lot of temporal information, resulting in poor performance.

Method used

By segmenting the gas sensor signals into sequences, extracting temporal features, and embedding them into a latent space, a hybrid expert network is used for global pattern feature extraction and pooling fusion, which are then mapped to the semantic space for gas classification and concentration estimation.

Benefits of technology

It improves the accuracy and speed of gas detection, enables high-precision and rapid gas classification and concentration estimation, reduces signal redundancy and noise, and prevents overfitting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122084837A_ABST
    Figure CN122084837A_ABST
Patent Text Reader

Abstract

The invention provides a rapid gas detection method, system and equipment for an electronic nose and a storage medium, and the method comprises the following steps: carrying out sequence segmentation on an input gas sensor signal, and extracting a time sequence feature; the time sequence features are embedded into the potential space, embedded information is obtained, and the embedded information carries the local time sequence features of the gas sensor signals; carrying out global mode feature extraction and pooling fusion on the embedded information, and integrating global features of the gas sensor signals to obtain gas signal characterization; the gas signal characterization is mapped to a semantic space, a gas classification is identified, and a corresponding gas concentration is determined. Embedded information rich in gas semantic information is obtained through sequence segmentation, signal redundancy and noise can be reduced, and overfitting is prevented. Therefore, the method can realize high-precision rapid gas classification and concentration estimation in the gas detection process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of gas detection technology, and in particular to a method, system, device and storage medium for rapid gas detection for electronic noses. Background Technology

[0002] Electronic nose systems are widely used in gas detection, particularly in food, medical, and metallurgical industries. A typical electronic nose system consists of a gas sensor array and a pattern recognition algorithm. When the sensor array is exposed to a target gas, its conductivity signal changes, recording information such as gas composition and concentration, thus enabling gas detection. The pattern recognition algorithm processes this conductivity signal to analyze the composition or concentration of the target gas. Deep learning algorithms built upon the gas sensor array perform pattern recognition. Common pattern recognition algorithms can be categorized into single-task learning algorithms and multi-task learning algorithms. Single-task learning algorithms can only perform one task—gas classification or gas concentration estimation—while multi-task learning algorithms can integrate both gas composition identification and concentration estimation. For high-real-time scenarios, models need rapid gas analysis capabilities; therefore, developing multi-task learning algorithms with rapid gas detection capabilities has become a hot research topic in the industry.

[0003] Current fast gas detection algorithms are often developed based on traditional machine learning models, such as KNN (K-Nearest Neighbors) and SVM (Support Vector Machines), as well as classic deep learning models, such as CNN (Convolutional Neural Network) and LSTM (Long Short-Term Memory).

[0004] Clearly, while traditional machine learning models are simple in structure, their performance is poor. Classic deep learning models offer improved performance compared to traditional machine learning models, but they suffer from the inherent drawback of vanishing gradients in time series modeling. Attention-based algorithms inherently possess excellent time series modeling capabilities, while self-attention-based algorithms are insensitive to temporal order. Furthermore, the lack of independent semantics in sensor signals and the resulting omission of significant temporal information when using positional encoding further contribute to their poor performance.

[0005] The above methods suffer from the problem that the existing fast gas detection algorithms of electronic nose systems lack independent semantics and omit a large amount of temporal information.

[0006] The aforementioned deficiencies are those that those skilled in the art would like to overcome. Summary of the Invention

[0007] (a) Technical problems to be solved To address the aforementioned problems in the prior art, this disclosure provides a method, system, device, and storage medium for rapid gas detection in electronic noses, resolving the issue of insufficient independent semantics and omission of significant temporal information in existing rapid gas detection algorithms.

[0008] (II) Technical Solution To achieve the above objectives, the main technical solutions adopted in this disclosure include: In a first aspect, this disclosure provides a rapid gas detection method for an electronic nose, comprising: The input gas sensor signal is segmented into sequences, and its temporal features are extracted. Temporal features are embedded into a latent space to obtain embedded information, wherein the embedded information carries local temporal features of the gas sensor signal; The embedded information is subjected to global pattern feature extraction and pooling fusion to integrate the global features of the gas sensor signal and obtain the gas signal characterization. By mapping gas signal representations to a semantic space, gas classification can be identified, and the corresponding gas concentration can be determined.

[0009] In one exemplary embodiment of this disclosure, the step of segmenting the input gas sensor signal and extracting time-series features includes: Using a sliding window and a preset interval, the input gas sensor signal is divided into multiple overlapping local sub-segment sequences, wherein the gas sensor signal is a multivariable time series, and the local sub-segment sequences contain gas semantic information; Temporal modeling is performed on local sub-segment sequences to extract temporal features for each local sub-segment sequence.

[0010] In one exemplary embodiment of this disclosure, the step of embedding temporal features into a latent space to obtain embedding information includes: Temporal features are mapped to the latent space through a shared semantic embedding matrix to obtain a latent representation; Positional encoding is added to the latent representations to preserve the temporal information between latent representations, resulting in embedding information, which includes local temporal features and temporal information between latent representations.

[0011] In one exemplary embodiment of this disclosure, the step of performing global pattern feature extraction and pooling fusion on the embedded information to integrate the global features of the gas sensor signal and obtain a gas signal characterization includes: The embedded information is subjected to global pattern feature extraction and pooling fusion by a traditional encoder and a hybrid expert encoder to obtain global features of the integrated gas sensor signal. The global features are used to obtain a gas signal characterization through the transpose and inverse embedding of the matrix; The hybrid expert encoder is used to adaptively assign expert subnetworks to different gas samples to perform targeted feature extraction on the gas samples.

[0012] In one exemplary embodiment of this disclosure, the hybrid expert encoder includes multiple expert networks and a gating network. The expert networks contain multiple expert models that identify different gas categories and are used to provide corresponding concentration estimates for different gases. The gating network is used to score each expert and activate the expert with the highest score. Based on the hidden vectors, the gating network scores each expert and activates the top k experts to obtain the network for inference, where k is a positive integer greater than or equal to 1; The k activated expert networks perform calculations on the gas sample, and the corresponding activation scores are used as the output of the expert networks and weighted. The activated expert samples are calculated, and the expert scores are used to weight the expert output.

[0013] In one exemplary embodiment of this disclosure, the step of mapping gas signal representations to a semantic space, identifying gas categories, and determining corresponding gas concentrations includes: Map gas signal representations to a shared semantic space; In the semantic space, the gas signal representation is transformed into a probability vector and normalized concentration for gas classification, thereby determining the gas classification result and the corresponding gas concentration.

[0014] In one exemplary embodiment of this disclosure, mapping the gas signal representation to a semantic space includes: Gas signal features are mapped to a semantic space as a multidimensional input vector for self-attention computation to obtain an attention sequence, where the gas components defined in the semantic space are centered. The process of transforming gas signal representations into probability vectors and normalized concentrations for gas classification in semantic space, and determining the gas classification results and corresponding gas concentrations, includes: The gas components are in-embedded into a classification weight matrix by using an embedding matrix; The probability vector is obtained by calculating the probability of each gas category in the attention sequence based on the classification weight matrix. By using an expert network as a gating system, the gas concentration is predicted, and a predicted concentration value is obtained. The predicted concentration values ​​are normalized to obtain the normalized concentration. The normalized concentration is multiplied element by element by the probability of gas classification, and the concentrations of non-existent components are filtered out to obtain the gas classification results and the corresponding gas concentrations.

[0015] Secondly, this disclosure also provides a rapid gas detection system for an electronic nose, comprising: The signal extraction module is used to segment the input gas sensor signal into sequences and extract its temporal features; A temporal embedding module is used to embed temporal features into a latent space to obtain embedding information, wherein the embedding information carries local temporal features of the gas sensor signal; The feature extraction module is used to perform global pattern feature extraction and pooling fusion on the embedded information, integrate the global features of the gas sensor signal, and obtain the gas signal characterization. The gas detection module is used to map gas signal representations to a shared semantic space, identify gas categories, and determine the corresponding gas concentrations.

[0016] Thirdly, this disclosure also provides an electronic device, characterized in that it includes: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors perform the methods described above.

[0017] Fourthly, this disclosure also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the methods described above.

[0018] (III) Beneficial Effects The beneficial effects of this disclosure are that it provides a method, system, device, and storage medium for rapid gas detection in electronic noses. On the one hand, by preserving the temporal features of the signal through sequence segmentation and embedding them into a latent space, embedded information rich in gas semantic information is obtained, which can reduce signal redundancy and noise and prevent overfitting. On the other hand, mapping the gas signal representation to the semantic space can better preserve the working mechanism of the classifier, and by using a hybrid expert network for gas classification and identification, gas concentration can be estimated, effectively improving the accuracy of concentration estimation. Therefore, this method can achieve high-precision rapid gas classification and concentration estimation during gas detection. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating the steps of a rapid gas detection method for an electronic nose provided in one embodiment of the present disclosure; Figure 2This is a schematic diagram of an algorithm model for rapid gas detection in one embodiment of the present disclosure; Figure 3 This is a schematic diagram of the standard architecture of a conventional encoder (i.e., a Transformer encoder) in one embodiment of this disclosure; Figure 4 This is a schematic diagram illustrating the computational principle of the multi-head attention mechanism in one embodiment of this disclosure; Figure 5 This is a schematic diagram illustrating the computational principle of a feedforward network in one embodiment of this disclosure; Figure 6 This is a schematic diagram of the architecture of a hybrid expert network in one embodiment of this disclosure; Figure 7 This is a schematic diagram of the composition of a rapid gas detection system for an electronic nose provided in another embodiment of this disclosure; Figure 8 This is a schematic diagram of the internal structure of a computer system for an electronic device, provided in yet another embodiment of the present disclosure. Detailed Implementation

[0020] To better explain and facilitate understanding of this disclosure, the following detailed description of the disclosure is provided in conjunction with the accompanying drawings and specific embodiments.

[0021] All technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein in the specification of this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0022] In the relevant embodiments of this disclosure, the self-attention mechanism-based algorithm is insensitive to temporal arrangement, and since the sensor signals themselves lack independent semantics, using positional encoding will also miss a large amount of temporal information. However, the evolution of the initial signal of the sensor's response to gas changes often directly encodes the identification information of the gas type and gas concentration. The loss of this information (i.e., temporal information) after algorithm processing will impair the model's ability to quickly identify gases.

[0023] To address the aforementioned problems, embodiments of this disclosure provide a method, system, device, and storage medium for rapid gas detection in an electronic nose. By improving the gas recognition algorithm, high-precision gas composition classification and concentration estimation can be achieved based on an initial signal within 5 seconds of the response.

[0024] Figure 1 This is a flowchart illustrating the steps of a rapid gas detection method for an electronic nose provided in one embodiment of this disclosure, as follows: Figure 1As shown, the rapid gas detection method for electronic noses includes the following steps: Step S110: Perform sequence segmentation on the input gas sensor signal and extract time-series features.

[0025] Step S120: Embed the temporal features into the latent space to obtain embedded information, wherein the embedded information carries the local temporal features of the gas sensor signal.

[0026] Step S130: Perform global pattern feature extraction and pooling fusion on the embedded information to integrate the global features of the gas sensor signal and obtain the gas signal characterization.

[0027] Step S140: Map the gas signal representation to the semantic space, identify the gas classification, and determine the corresponding gas concentration.

[0028] Figure 2 This is a schematic diagram of an algorithm model for rapid gas detection in one embodiment of this disclosure, as shown below. Figure 2 As shown, it mainly consists of an embedding layer 210, a multi-task shared weight layer 220, and an output header 230.

[0029] First, the role of the embedding layer is to project the original gas sensor signal into the latent space of the model, which is achieved using the Patch technique. The Patch layer and the shared embedding matrix together constitute the embedding layer of the model.

[0030] Traditional linear embedding layers are applied to each individual signal point. However, gas sensor time-series signal points lack independent gas meaning; meaningful information is mainly stored in the temporal features of the signal. If the temporal input is ignored, the latent space learned by the linear projection layer lacks practical meaning. In this embodiment, to preserve the local temporal sequence of the gas sensor signal, the Patch layer in the embedding layer first divides the input signal (S) into several overlapping subsequences (P), then extracts the temporal features of each subsequence, and embeds them into the latent space using a linear Wemb layer (corresponding to h in the figure). (0) Compared to simple linear projection, the embedding layer using the Patch technique can not only learn more semantically rich representations of gas, but also reduce signal redundancy and noise, and prevent overfitting.

[0031] Secondly, the multi-task shared weight layer includes an encoding layer, a pooling layer, and a shared embedding matrix. The role of the encoding layer is to synthesize the local features of the signal, extract representations with global patterns, and use them as the common input to the output heads of gas classification and concentration estimation.

[0032] Specifically, in this embodiment, the coding layer includes two levels of coding, namely, embedding information h carrying local temporal sequence.0 After feature extraction and pooling fusion operations by traditional Transformer encoders (such as Vanilla Encoder) and hybrid expert encoders (such as MoE Encoder, Mixture of Experts encoder), the h value integrates global features. (3) The final gas signal representation z is obtained by inverse embedding the transpose of the shared embedding matrix @Wemb(Shared). The hybrid expert encoder in the coding layer adaptively assigns expert networks to different samples, enabling targeted feature extraction and improving the model's generalization ability to complex gas samples.

[0033] Finally, a multi-task learning (MTL) output head is designed to detect gas composition and corresponding concentration, transforming the relevant gas signal representation into classification probabilities and normalized concentration outputs. In this embodiment, the gas to be detected is a mixture of methane, carbon monoxide (CO), and ethylene. The gas signal representation z of the CO signal sample... CO After being input to the output head, the output may yield a probability vector of {methane: 0.01, CO: 0.99, ethylene: 0.00} (with a 99% probability of CO being present) and a normalized concentration vector output of {0.00, 1.00, 0.00}. To obtain the actual concentration, simply multiply by the sensor's maximum concentration estimation upper limit. Unlike traditional architectures that share underlying parameters (i.e., the input to the output head always has the same weights), the method in this embodiment adaptively drives the gating network of the hybrid expert encoder to selectively share neurons based on the distribution characteristics of the input. Simultaneously, to maximize model interpretability and utilization of the representation space, the weights of the dot matrix classifier are designed within the representation space, i.e., the cluster center. Since the cluster center is in the same space as the signal representation, the classifier's operating mechanism can be well preserved. The concentration estimation output head of this model is also composed of a hybrid expert network; the core improvement lies in the fact that the gating input to the output head is the classifier's probability rather than sample features. This modification allows for component-aware concentration estimation by driving experts through gas composition. Expert networks provide specialized concentration estimation schemes for different gases, which can effectively improve the accuracy of the estimation.

[0034] based on Figure 2 The following describes the specific steps of a rapid gas detection method for an electronic nose, with reference to specific embodiments.

[0035] In step S110, the input gas sensor signal is sequence segmented and time-series features are extracted.

[0036] In one exemplary embodiment of this disclosure, the step of segmenting the input gas sensor signal and extracting time-series features includes: Using a sliding window and a preset interval, the input gas sensor signal is divided into multiple overlapping local sub-segment sequences, wherein the gas sensor signal is a multivariable time series, and the local sub-segment sequences contain gas semantic information; Temporal modeling is performed on local sub-segment sequences to extract temporal features for each local sub-segment sequence.

[0037] In step S120, the temporal features are embedded into the latent space to obtain embedded information, wherein the embedded information carries local temporal features of the gas sensor signal.

[0038] In one exemplary embodiment of this disclosure, the step of embedding temporal features into a latent space to obtain embedding information includes: Temporal features are mapped to the latent space through a shared semantic embedding matrix to obtain a latent representation; Positional encoding is added to the latent representations to preserve the temporal information between latent representations, resulting in embedding information, which includes local temporal features and temporal information between latent representations.

[0039] Specifically, refer to Figure 2 The first part (i.e., the embedding layer 210). First, an arbitrary sensor response signal (i.e., the gas sensor signal) S∈ is input into the Patch layer. R N*C S is a multivariate time series with length N and number of channels C. First, using a length of... p The sliding window, s The intervals divide the signal S into M patches, forming a local segment sequence {P1, P2, ..., P...}. M}, P i ∈ R N*C Each patch is a local sub-segment of the signal.

[0040] Next, in order to perform temporal modeling of local sub-segments, a convolutional neural network is applied to extract P. i Local features are used to obtain C-dimensional tokens {p1, p2, ..., p M},p i = P i T W+ b , where W∈ R p b∈ R C , where p represents the weights and biases of the convolution kernel, respectively. iIt is a local sub-segment P i It is a representation, and therefore has richer semantics than a single sequence element.

[0041] Then, the C-dimensional tokens are embedded through an embedding matrix. Mapping to d model The semantic space of dimension, that is, the latent representation {h1} is obtained. (0) h2 (0) ,…, h M (0)}, .

[0042] (Formula 1) Because MHA (multi-head attention) has permutation invariance, in order to preserve h i (0) The timing information between them, and to keep it as simple as possible, is encoded with sinusoidal position codes: (Formula 2) Specifically, the position encoding expression is as follows: (Formula 3) (Formula 4) Where d = 0, 1, ..., d model / 2,d model / 2 represents the dimension, and i represents the position.

[0043] In step S130, the embedded information is subjected to global pattern feature extraction and pooling fusion to integrate the global features of the gas sensor signal and obtain the gas signal characterization.

[0044] In one exemplary embodiment of this disclosure, the step of performing global pattern feature extraction and pooling fusion on the embedded information to integrate the global features of the gas sensor signal and obtain a gas signal characterization includes: The embedded information is subjected to global pattern feature extraction and pooling fusion by a traditional encoder and a hybrid expert encoder to obtain global features of the integrated gas sensor signal. The global features are used to obtain a gas signal characterization through the transpose and inverse embedding of the matrix; The hybrid expert encoder is used to adaptively assign expert subnetworks to different gas samples to perform targeted feature extraction on the gas samples.

[0045] In one exemplary embodiment of this disclosure, the hybrid expert encoder includes multiple expert networks and a gating network. The expert networks contain multiple expert models that identify different gas categories and are used to provide corresponding concentration estimates for different gases. The gating network is used to score each expert and activate the expert with the highest score. Based on the hidden vectors, the gating network scores each expert and activates the top k experts to obtain the network for inference, where k is a positive integer greater than or equal to 1; The k activated expert networks perform calculations on the gas sample, and the corresponding activation scores are used as the output of the expert networks and weighted. The activated expert samples are calculated, and the expert scores are used to weight the expert output.

[0046] Specifically, refer to Figure 2 The second part (i.e., the multi-task shared weight layer 220) involves the main processing of the encoding layer, which is implemented through an encoder. In this embodiment, it is necessary to utilize traditional encoders, hybrid expert encoders, normalized pooling, and other operations.

[0047] Figure 3 This is a schematic diagram of the standard architecture of a conventional encoder (i.e., a Transformer encoder) in one embodiment of this disclosure. The hybrid expert encoder (i.e., a MoE encoder) uses the same encoder architecture as the conventional encoder. Figure 3 The diagram illustrates the computational process of the encoding layer in a traditional encoder. The latent space refers to the mapping of high-dimensional data to a low-dimensional representation space via a neural network. The latent space is constructed using a multi-head attention (MHA) mechanism, layer normalization, and a feed-forward network (FFN) connected by residuals. Here, norm represents LayerNorm, and attn represents the latent space. (i) Attention score after normalization of the representation layer: (Formula 5) (Formula 6) Figure 4 This is a schematic diagram illustrating the computational principle of the multi-head attention mechanism in one embodiment of this disclosure, as shown below. Figure 4 As shown in (a), for a D-dimensional input vector h i ∈H, the self-attention mechanism first linearly maps it to d model The query is given by a dimension and a set of key-value pairs. After calculating attention scores for the query and key, the values ​​are weighted to obtain the output.

[0048] (Formula 7) (Formula 8) Compared to using a single self-attention function for Q, K, and V, the multi-head attention mechanism uses h different learnable linear projection heads to map Q, K, and V into a d-dimensional subspace, and computes the self-attention output in each subspace, thereby learning different representations for different time series.

[0049] Finally, the attention from each head is combined and output through splicing and projection. The principle is as follows: (Formula 9) (Formula 10) in, After the linear layer By fusing the outputs of all heads, the corresponding attention sequence can be obtained. It should be noted that, as Figure 4 As shown in (b), MoE-MHA appends a token named [CLS] to the end of the hidden variables of the sequence. After computation by MHA, [CLS] collects all the information of the sequence and drives the MoE-FFN gated network. It is designed to ensure that the representation of the same sequence passes through the same gate, reducing the amount of computation while avoiding the destruction of the representation information.

[0050] Figure 5 This is a schematic diagram illustrating the computational principle of a feedforward network in one embodiment of this disclosure. Vanilla-FFN is a simple two-layer MLP (Multilayer Perceptron) network. MoE-FFN serves as a shared layer for all output heads, and depending on the sharing method, it includes three hybrid expert network design schemes: Switch-MoE, Hard-MoE, and Multi-gate MoE.

[0051] Figure 5 Taking a Chinese example containing two expert networks, one of which is based on the sharing of underlying parameters (such as...) Figure 5 (a) The FFN network structure is the same as Vanilla-FFN, with the classifier and concentration estimator sharing all FFN neurons. However, the hybrid expert network of MoE-FFN does not share all neurons; instead, it adaptively allocates them based on the signal features collected by [CLS]. Among them, Switch-MoE (such as...) Figure 5 (b)) and Hard-MoE (e.g.) Figure 5 (c) Both belong to single-gated hybrid expert networks, but the output of the former's gated network is a continuous score, while the output of the latter's gated network is discrete, i.e., the score is 1 or 0. Multi-gated MoEs (such as...) Figure 5 (d) then a separate gating network was designed for each task.

[0052] Figure 6 This is a schematic diagram of the architecture of a hybrid expert network in one embodiment of this disclosure, as shown below. Figure 6 As shown, taking two expert networks as an example, a classic hybrid expert network generally consists of j expert sub-networks and a gating network. Given the input hidden vector... The gating network first scores each expert and activates the top k experts (Top-k) with the highest scores for inference. After the activated experts compute the samples, their outputs are weighted using their corresponding scores, as shown in the general expression below: (Formula 11) in For the j-th expert network, For gating network The activation score is 0 for experts who are not activated.

[0053] Gated networks typically consist of linear layers connected to a softmax layer. Assuming a Top-1 sparse routing approach is used, only the expert with the highest score is activated. The gating score is then calculated as follows: This is the score calculated by the gating network for all experts: (Formula 12) (Formula 13) Classic expert networks consist of independent MLPs. Take the classic two-layer MLP as an example: (Formula 14) in This represents the GeLU activation function. , , ,in For the bias of the MLP layer, and The parameter weights of the MLP layer, To expand the scale.

[0054] In step S140, the gas signal representation is mapped to the semantic space, the gas classification is identified, and the corresponding gas concentration is determined.

[0055] In one exemplary embodiment of this disclosure, the step of mapping gas signal representations to a semantic space, identifying gas categories, and determining corresponding gas concentrations includes: Map gas signal representations to a shared semantic space; In the semantic space, the gas signal representation is transformed into a probability vector and normalized concentration for gas classification, thereby determining the gas classification result and the corresponding gas concentration.

[0056] In one exemplary embodiment of this disclosure, mapping the gas signal representation to a semantic space includes: Gas signal features are mapped to a semantic space as a multidimensional input vector for self-attention computation to obtain an attention sequence, where the gas components defined in the semantic space are centered. The process of transforming gas signal representations into probability vectors and normalized concentrations for gas classification in semantic space, and determining the gas classification results and corresponding gas concentrations, includes: The gas components are in-embedded into a classification weight matrix by using an embedding matrix; The probability vector is obtained by calculating the probability of each gas category in the attention sequence based on the classification weight matrix. By using an expert network as a gating system, the gas concentration is predicted, and a predicted concentration value is obtained. The predicted concentration values ​​are normalized to obtain the normalized concentration. The normalized concentration is multiplied element by element by the probability of gas classification, and the concentrations of non-existent components are filtered out to obtain the gas classification results and the corresponding gas concentrations.

[0057] Specifically, refer to Figure 2 The third part (i.e., output head 230). The Multitasking Output Header (MTL head) is set... Let c be the center of the gas components defined in the semantic space, where c represents the number of gas component types. For representational dimensions. Through a shared embedding matrix. , These clusters are inversely embedded into a classification weight matrix. Thus, component discrimination can be achieved in a shared semantic space: (Formula 15) Where z is the sample representation extracted by the traditional encoder, prob= p 1 , p 2 ,…, p c This represents the probability of each component's presence. Finally, the probabilities are binarized according to a threshold (e.g., setting the threshold to 0.5) to obtain the multi-label prediction results for gas types: (Formula 16) Unlike MoE-FFN, which uses sample representations as gating inputs, MoE-head is designed with the gas classification result (prob) controlling expert routing (as a gating mechanism for the expert network) to achieve concentration estimation of gas components. The calculation process is as follows: (Formula 17) The obtained concentration prediction values ​​(logits) are normalized by sigmoid and then multiplied element-wise with the category prediction results to filter out the concentration output of non-existent components. (Formula 18) in, This represents the Hadamard element-wise product operation, where species={s1,s2,…,s…} c The results are derived from the above classification.

[0058] Based on the algorithm model and implementation steps provided in this disclosure, the traditional linear embedding layer is replaced by Patch technology in the embedding layer. Based on the special characteristics of gas sensor signals, a variety of hybrid expert networks are designed, and a shared semantic space architecture is designed.

[0059] In summary, the method provided in this disclosure, on the one hand, preserves the temporal features of the signal through sequence segmentation and embeds them into the latent space to obtain embedded information rich in gas semantic information, which can reduce signal redundancy and noise and prevent overfitting. On the other hand, mapping the gas signal representation to the semantic space can better preserve the working mechanism of the classifier, and use a hybrid expert network for gas classification and identification, thereby predicting gas concentration and effectively improving the accuracy of concentration estimation. Therefore, this method can achieve high-precision and rapid gas classification and concentration estimation in the gas detection process.

[0060] Figure 7 This is a schematic diagram illustrating the composition of a rapid gas detection system for an electronic nose according to another embodiment of this disclosure, as shown below. Figure 7 As shown, the system includes a signal extraction module 710, a temporal embedding module 720, a feature extraction module 730, and a gas detection module 740. The signal extraction module 710 performs sequence segmentation on the input gas sensor signal and extracts temporal features. The temporal embedding module 720 embeds the temporal features into a latent space to obtain embedded information, which carries local temporal features of the gas sensor signal. The feature extraction module 730 performs global pattern feature extraction and pooling fusion on the embedded information, integrating the global features of the gas sensor signal to obtain a gas signal representation. The gas detection module 740 maps the gas signal representation to a shared semantic space, identifies gas categories, and determines the corresponding gas concentration.

[0061] The following is for reference. Figure 8 It shows a schematic diagram of the structure of a computer system 400 suitable for implementing electronic devices according to embodiments of the present application. Figure 8 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0062] like Figure 8 As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 402 or programs loaded from storage section 407 into random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of the system 400. The CPU 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0063] The following components are connected to I / O interface 405: an input section 406 including a keyboard, mouse, etc.; an output section 407 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, modem, etc. The communication section 409 performs communication processing via a network such as the Internet. Drive 410 is also connected to I / O interface 405 as needed. Removable media 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 410 as needed so that computer programs read from them can be installed into storage section 408 as needed.

[0064] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by central processing unit (CPU) 401, it performs the functions defined above in the system of this application.

[0065] It should be noted that the storage medium shown in this application can be a computer-readable signal medium, a computer-readable medium, or any combination thereof. A computer-readable medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than a computer-readable medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0066] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0067] The units described in the embodiments of this application can be implemented in software or hardware. The described units can also be located in a processor, and the names of these units do not necessarily limit the unit itself.

[0068] On the other hand, this disclosure also provides a storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to include the following method steps: The input gas sensor signal is segmented into sequences, and its temporal features are extracted. Temporal features are embedded into a latent space to obtain embedded information, wherein the embedded information carries local temporal features of the gas sensor signal; The embedded information is subjected to global pattern feature extraction and pooling fusion to integrate the global features of the gas sensor signal and obtain the gas signal characterization. By mapping gas signal representations to a semantic space, gas classification can be identified, and the corresponding gas concentration can be determined.

[0069] It should be understood that the above description of specific embodiments of this disclosure is only for illustrating the technical approach and features of this disclosure, and is intended to enable those skilled in the art to understand the content of this disclosure and implement it accordingly. However, this disclosure is not limited to the specific embodiments described above. All changes or modifications made within the scope of the claims of this disclosure should be covered by the protection scope of this disclosure.

Claims

1. A rapid gas detection method for an electronic nose, characterized in that, include: The input gas sensor signal is segmented into sequences, and its temporal features are extracted. Temporal features are embedded into a latent space to obtain embedded information, wherein the embedded information carries local temporal features of the gas sensor signal; The embedded information is subjected to global pattern feature extraction and pooling fusion to integrate the global features of the gas sensor signal and obtain the gas signal characterization. By mapping gas signal representations to a semantic space, gas classification can be identified, and the corresponding gas concentration can be determined.

2. The rapid gas detection method for an electronic nose as described in claim 1, characterized in that, The process of segmenting the input gas sensor signal and extracting its temporal features includes: Using a sliding window and a preset interval, the input gas sensor signal is divided into multiple overlapping local sub-segment sequences, wherein the gas sensor signal is a multivariable time series, and the local sub-segment sequences contain gas semantic information; Temporal modeling is performed on local sub-segment sequences to extract temporal features for each local sub-segment sequence.

3. The rapid gas detection method for an electronic nose as described in claim 1, characterized in that, The process of embedding temporal features into a latent space to obtain embedded information includes: Temporal features are mapped to the latent space through a shared semantic embedding matrix to obtain a latent representation; Positional encoding is added to the latent representations to preserve the temporal information between latent representations, resulting in embedding information, which includes local temporal features and temporal information between latent representations.

4. The rapid gas detection method for an electronic nose as described in claim 1, characterized in that, The step of performing global pattern feature extraction and pooling fusion on the embedded information to integrate the global features of the gas sensor signal and obtain a gas signal characterization includes: The embedded information is subjected to global pattern feature extraction and pooling fusion by a traditional encoder and a hybrid expert encoder to obtain global features of the integrated gas sensor signal. The global features are used to obtain a gas signal characterization through the transpose and inverse embedding of the matrix; The hybrid expert encoder is used to adaptively assign expert subnetworks to different gas samples to perform targeted feature extraction on the gas samples.

5. The rapid gas detection method for an electronic nose as described in claim 4, characterized in that, The hybrid expert encoder includes multiple expert networks and a gating network. The expert networks contain multiple expert models that identify different gas categories and are used to provide corresponding concentration estimates for different gases. The gating network is used to score each expert and activate the expert with the highest score. Based on the hidden vectors, the gating network scores each expert and activates the top k experts to obtain the network for inference, where k is a positive integer greater than or equal to 1; The k activated expert networks perform calculations on the gas sample, and the corresponding activation scores are used as the output of the expert networks and weighted. The activated expert samples are calculated, and the expert scores are used to weight the expert output.

6. The rapid gas detection method for an electronic nose as described in claim 1, characterized in that, The process of mapping gas signal representations to a semantic space, identifying gas categories, and determining corresponding gas concentrations includes: Map gas signal representations to a shared semantic space; In the semantic space, the gas signal representation is transformed into a probability vector and normalized concentration for gas classification, thereby determining the gas classification result and the corresponding gas concentration.

7. The rapid gas detection method for an electronic nose as described in claim 6, characterized in that, The process of mapping gas signal representations to a semantic space includes: Gas signal features are mapped to a semantic space as a multidimensional input vector for self-attention computation to obtain an attention sequence, where the gas components defined in the semantic space are centered. The process of transforming gas signal representations into probability vectors and normalized concentrations for gas classification in semantic space, and determining the gas classification results and corresponding gas concentrations, includes: The gas components are in-embedded into a classification weight matrix by using an embedding matrix; The probability vector is obtained by calculating the probability of each gas category in the attention sequence based on the classification weight matrix. By using an expert network as a gating system, the gas concentration is predicted, and a predicted concentration value is obtained. The predicted concentration values ​​are normalized to obtain the normalized concentration. The normalized concentration is multiplied element by element by the probability of gas classification, and the concentrations of non-existent components are filtered out to obtain the gas classification results and the corresponding gas concentrations.

8. A rapid gas detection system for an electronic nose, characterized in that, include: satellite The signal extraction module is used to segment the input gas sensor signal into sequences and extract its temporal features; A temporal embedding module is used to embed temporal features into a latent space to obtain embedding information, wherein the embedding information carries local temporal features of the gas sensor signal; The feature extraction module is used to perform global pattern feature extraction and pooling fusion on the embedded information, integrate the global features of the gas sensor signal, and obtain the gas signal characterization. The gas detection module is used to map gas signal representations to a shared semantic space, identify gas categories, and determine the corresponding gas concentrations.

9. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.

10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.