A gas identification method based on open circular feature coding
By constructing an open circular feature encoding method and using only positive samples for training, the problem of high misjudgment rate of the electronic nose system when identifying unknown gases is solved, and the recognition accuracy and robustness are improved.
Patent Information
- Application Number
- CN202411678318.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-11-22
AI Technical Summary
Existing electronic nose systems have difficulty in accurately identifying single-class gases when identifying unknown gases, especially when positive samples are limited and negative samples are difficult to obtain. In particular, the recognition error rate is high in open and unbalanced data sets.
A gas identification method based on open circular feature coding is adopted. By constructing a circular feature set and coding method, the sensor serial numbers are arranged in sequence and encoded into feature codes. Only positive samples are used for training to achieve single-class classification.
The recognition accuracy and robustness of the electronic nose system in actual scenarios are improved, the recognition misjudgment rate is reduced, and effective recognition of positive samples is achieved.
Smart Images

Figure CN119622460B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of gas / odor recognition, and in particular to the technical field of odor information identification based on an electronic nose. Background Art
[0002] Gases and odors exist in all aspects of daily life and production. The rapid detection and accurate identification of target gases in various scenarios has become an urgent need for social development. It is of great significance for formulating relevant technical standards, improving relevant policies and regulations, and maintaining national security and social stability.
[0003] Common gas detection and analysis methods include chromatography, spectroscopy, gas chromatography-mass spectrometry, and visual array methods. Chromatography is a commonly used separation and analysis method, offering advantages such as high separation efficiency, high detection sensitivity, and standardized operation. However, these chemical or physical analysis methods require high-end instruments such as chromatographs and mass spectrometers, which not only results in high detection costs but also makes real-time on-site detection difficult.
[0004] The electronic nose is a rapidly developing odor fingerprinting technology inspired by the biological olfactory system. It offers advantages such as speed, portability, and intelligence, and can be used to detect and identify mixed or single gases. The electronic nose utilizes a sensor array to interact with the gas, generating a multi-channel response signal and analyzing and identifying the gas sample through pattern recognition. While the electronic nose cannot detect the specific components of the sample being tested, it can provide a comprehensive evaluation based on the overall response information, similar to human sensory analysis capabilities.
[0005] In terms of gas recognition based on electronic noses, since the actual gases to be identified often have no prior training information, that is, the data set is an open set, and there is often an imbalance problem in the training and testing samples. For example, for the identification of genuine and fake liquor, the genuine liquor (positive class) samples are very limited, while the fake liquor (negative class) cases are infinite and uncertain. At this time, the training of the electronic nose cannot be simply regarded as the common positive and negative classification problem, but should be regarded as a single-class classification problem. This situation requires the recognition algorithm to only train positive samples, and negative samples are not involved in the training.
[0006] To address these issues, the present invention proposes a discriminative algorithm based on circular feature coding. This method sorts and encodes the response signal features of gas sensors, not only deeply exploring the differences between individual sensor responses but also enriching the number of valid codes for positive samples and their categories. Compared with traditional single-class classification methods such as single-class support vector machines and isolation forests, this algorithm significantly improves recognition accuracy and exhibits greater robustness and versatility. Summary of the Invention
[0007] The purpose of this invention is to develop a single-class classification algorithm for gas identification by constructing a circular feature encoding method. This algorithm is trained using only positive samples to reduce its false positive rate in open and unbalanced gas sample datasets, thereby improving the accuracy and rapid recognition capabilities of electronic nose systems in such practical test scenarios. The technical solution is as follows:
[0008] A gas identification method based on open circular feature coding comprises the following steps:
[0009] (6) Feature extraction of the response signal of the gas sensor array: using the gas sensor array to detect the gas to be tested, obtaining the response signal, and performing feature extraction on the response signal;
[0010] (7) Based on the construction of open circular feature coding, the gas sensors are arranged in sequence according to the serial number and connected head to tail to form a circle. The extracted response signal characteristic values of each gas sensor to the measured gas are used as basic features, and the basic features of all other sensors form the first layer of the circular feature set; by subtracting the response signal characteristic value of the n+1th gas sensor from the response signal characteristic value of the nth gas sensor, N difference features are generated, that is, the features of the second layer of the circular feature set, where the last feature in the second layer is obtained by subtracting the response signal characteristic value of the Nth gas sensor in the first layer from the response signal characteristic value of the first gas sensor, and so on, to obtain the features of other layers, which together constitute the circular feature set, where n = 1, 2, ..., N-1, and N is the number of gas sensors used.
[0011] (8) Perform circular feature encoding on the circular feature set. The features corresponding to different gas sensors in the same layer of the circular feature set are sorted in ascending order to explore the differences between gas sensors. The obtained sensor sequence code is called feature encoding. The sample code can be obtained by integrating all feature codes of a sample. On this basis, the category code can be obtained.
[0012] (9) Obtain the commonality code of positive samples;
[0013] (10) Single-class recognition is achieved by comparing the code of the sample to be tested with the common code of the positive class samples obtained a priori.
[0014] The gas identification method according to claim 1 is characterized in that, in step (1), each sensor response signal is divided into m segments, and the median mean of each segment is taken as the feature of the response signal.
[0015] Furthermore, the method for obtaining the common coding of the positive samples in step (4) is: integrating the coding data of the positive samples into the feature coding data of the constructed circular feature set, retaining the consistent coding, and setting the inconsistent coding to 0, thereby obtaining the common coding of the positive samples.
[0016] Furthermore, a method for achieving single-class identification is to select a category code that is most similar to the code of the sample to be tested, and use this category as the predicted category of the test sample.
[0017] Furthermore, for single-class classification, the test sample encoding is compared with the positive class encoding. If the two are consistent, the test sample is considered to belong to the positive class, otherwise it belongs to the negative class.
[0018] Currently, for the identification of two types of gases, the electronic nose system must use positive samples (normal data) and negative samples (abnormal data) for training. However, in gas identification in real scenarios, positive sample data is relatively easy to obtain, while negative samples are often difficult to fully obtain and label. To address the problem of not being able to obtain rich negative samples to train the electronic nose, the present invention proposes a new single-class classification approach, namely the circular feature encoding method, which only uses positive samples for training, while negative samples are not involved in training, and is expected to achieve gas identification in real scenarios. The main advantages and features of the present invention are reflected in the following aspects:
[0019] (1) A circular feature coding method is proposed for electronic nose signal recognition, which expresses the gas signal samples collected by the electronic nose in a coded form, thereby realizing accurate recognition of the target gas information.
[0020] (2) Based on the extraction of basic voltage features, the circular feature encoding method creatively constructs an open circular feature set, which can not only deeply mine effective voltage and other features, but also continuously enrich the encoding of samples and categories.
[0021] (3) The circular feature encoding method is a hardware-based model-free single-class classification method. Compared with traditional pattern recognition methods (such as machine learning and deep learning methods), the proposed method has no parameter training process and is therefore a model-free recognition method. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 Open circular coding method framework diagram
[0023] Figure 2 Schematic diagram of circular feature set encoding based on subtraction operation
[0024] Figure 3 This is a schematic diagram of open multi-circle coding (a circular feature set constructed using the four mathematical operations of addition, subtraction, multiplication and division as examples)
[0025] Figure 4 Comparison diagram of test sample encoding and positive class encoding DETAILED DESCRIPTION
[0026] The present invention will be described below with reference to the accompanying drawings and embodiments.
[0027] The present invention adopts a circular feature encoding method ( Figure 1 ), by training and testing the electronic nose, the target gas can be identified. This method is mainly divided into four steps: feature extraction of the sensor response voltage, construction of an open circular feature set, circular encoding of the feature set, and comparative identification using the encoding. The details are as follows:
[0028] (1) Signal feature extraction
[0029] In the electronic nose's chamber, the gas under test reacts with the metal oxide gas sensor array, generating a response voltage signal. Each sensor response signal is evenly divided into m segments (e.g., m = 20), and the median mean of each segment is taken as the voltage feature. This operation removes glitches in the sampled signal and enables feature extraction. Next, the following circular feature encoding method is used for odor type identification.
[0030] (2) Construction of circular feature set
[0031] Step 1: Sensor response voltage feature extraction
[0032] The sensor response voltage characteristics can be extracted through the steps in (1) above. Here, the characteristic voltage collected by the nth sensor is recorded as
[0033] Step 2: Open Circular Feature Set Construction
[0034] Assuming that the number of sensors used in the electronic nose is N and the number of layers of the open circular feature set is L, based on Constructing circular feature set: Subtract the voltage feature values of adjacent odor sensors to obtain the corresponding feature value of the next circular layer. For example, the expression is:
[0035]
[0036] By analogy, the circular feature set of any layer can be derived. Based on the construction process of the circular feature above, the calculation formula of each feature is also given here, and the derivation process is as follows. For example, their expressions can be calculated according to formula (2):
[0037]
[0038] The coefficients of each column on the right side of the equal sign in formula (2) are marked as C0, C1, ..., C i ,. Then, we can get C i The expression is:
[0039]
[0040] Where l represents the lth layer of the open circular feature set.
[0041] Finally, we calculate the value of each feature as:
[0042]
[0043] where r is determined by formula (5).
[0044]
[0045] Among them, "mod" is the remainder operation.
[0046] (3) Circular feature set encoding ( Figure 2 )
[0047] Encode the circular feature set: record the N sensors as 1-N according to their labels, and arrange the N voltage feature values corresponding to the N sensors in each layer in ascending order. The corresponding sensor labels are used as part of the open circular feature encoding. The feature encoding of all circular feature sets in the gas forms a combined encoding sequence with a size of 20×L×N; the encoding of the positive category is generated by merging the consistent encoding and inconsistent encoding of all training samples, where the inconsistent encoding is marked as 0. One meaning of "open" in this method is that the theoretical circular feature set (i.e., the number of circular layers) can be set to infinite according to actual needs; the second meaning is that the circular feature set can be constructed through different mathematical operations ( Figure 3 ), the theoretical type of circular feature set is infinite.
[0048] (4) Classification using circular coding ( Figure 4 )
[0049] For each test sample, the circular encodings of the test sample and the positive class are obtained by repeating the previous steps. When circular encoding is used for odor identification, the circular encoding of the test sample is compared with the encoding of the positive class according to the following steps (standards): the non-zero encoding of the positive class is compared with the encoding of the corresponding position of each test sample. For each test sample, if the compared encoding is exactly the same as the encoding of the positive class, it is predicted to be a positive sample; otherwise, it is a negative sample. In other words, if the compared encodings of the test sample and the positive class are consistent, the test sample is determined to be a positive sample; otherwise, it is a negative sample.
[0050] The circular feature coding method for gas identification proposed in the present invention has the following advantages:
[0051] S1. The gas signal samples and their categories collected by the electronic nose are expressed in numerical coding form, which realizes the effective compression of the signal sample data and is conducive to the real-time storage and call of the data.
[0052] S2. Creatively construct an open circular feature set, which contains an infinite number of circular feature set layers in theory, and can be used to continuously enrich the effective encoding information of samples and categories, thereby helping to improve the recognition performance of the algorithm.
[0053] S3. Different open-ended circular feature sets can be constructed based on different mathematical operations. This means that the types of circular feature sets are theoretically infinite, which is the second meaning of open-endedness. Similarly, constructing circular feature sets based on multiple mathematical operations helps continuously enrich the effective encoding information of samples and categories, thereby improving recognition performance.
[0054] S4. The circular feature encoding method is a hardware-based model-free single-class classification method. Unlike the model-based method that learns model parameters from training samples, the proposed method is easy to implement because no model parameter training is required in this method.
[0055] Those skilled in the art will appreciate that the specific structures and processes described in the above detailed embodiments are merely illustrative and non-limiting. Furthermore, those skilled in the art may combine the various technical features described above in various possible ways to create new technical solutions or make other modifications, all of which fall within the scope of the present invention.
Claims
1. A gas identification method based on open circular feature coding, comprising the following steps: (1) Feature extraction of the response signal of the gas sensor array: using the gas sensor array to detect the gas to be tested, obtaining the response signal, and performing feature extraction on the response signal; (2) Based on the construction of open circular feature coding, the gas sensors are arranged in sequence according to the serial number and connected head to tail to form a circle. The extracted response signal characteristic values of each gas sensor to the measured gas are used as basic features, and the basic features of all other sensors form the first layer of the circular feature set; by subtracting the response signal characteristic value of the n+1th gas sensor from the response signal characteristic value of the nth gas sensor, N difference features are generated, that is, the features of the second layer of the circular feature set, where the last feature in the second layer is obtained by subtracting the response signal characteristic value of the Nth gas sensor in the first layer from the response signal characteristic value of the first gas sensor, and so on, to obtain the features of other layers, which together constitute the circular feature set, where, n=1,2,…,N-1, N is the number of gas sensors used; (3) Perform circular feature encoding on the circular feature set. The features corresponding to different gas sensors in the same layer of the circular feature set are sorted in ascending order to explore the differences between gas sensors. The obtained sensor sequence code is called feature encoding. The sample code can be obtained by integrating all feature codes of a sample, and the category code is obtained on this basis. (4) Obtain the commonality code of positive samples; (5) Single-class recognition is achieved by comparing the code of the sample to be tested with the common code of the positive class samples obtained a priori.
2. The gas identification method according to claim 1, characterized in that: In step (1), each sensor response signal is divided into m segments, and the median mean of each segment is taken as the feature of the response signal.
3. The gas identification method according to claim 1, characterized in that: The method for obtaining the common coding of the positive samples in step (4) is as follows: integrating the coding data of the positive samples with the feature coding data of the constructed circular feature set, retaining the consistent coding, setting the inconsistent coding to 0, and then obtaining the common coding of the positive samples.
4. The gas identification method according to claim 1, characterized in that: The method to achieve single-class recognition is to select the category code that is most similar to the code of the sample to be tested, and use this category as the predicted category of the test sample.
5. The gas identification method according to claim 1, characterized in that: For single-class classification, the test sample encoding is compared with the positive class encoding. If the two are consistent, the test sample is considered to belong to the positive class, otherwise it belongs to the negative class.
Citation Information
Patent Citations
Underground personnel identification positioning and communication system based on special structure miner lamp
CN110661775A
Method, system for odor visual expression based on electronic nose technology, and storage medium
US20230162002A1