Electronic nose drift compensation method based on domain adaptive convolutional neural network

Through the multi-branch multi-classifier structure of TDACNN and the integrated method of MMD classifier, the dependence problem on target domain data in electronic nose drift compensation is solved, and the drift compensation of target domain data is realized, which improves the accuracy and practicality of electronic nose recognition .

CN113837085BActive Publication Date: 2024-12-17HAIKOU MINGZHI INVESTMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111120811.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-24
Publication Date
2024-12-17
Estimated Expiration
2041-09-24

AI Technical Summary

Technical Problem

The existing electronic nose drift compensation method requires target domain data, and there is no drift compensation method based on convolutional neural networks, which is insufficient in practicality.

Method used

A Target-domain-free Domain Adaptation Convolutional Neural Network (TDACNN) is designed, and a multi-branch multi-classifier structure and maximum mean difference (MMD) classifier integration method is adopted to achieve drift without target domain data by optimizing the loss function. compensate.

Benefits of technology

It realizes drift compensation at the decision-making level without the need for target domain data, simplifies data processing, makes up for the vacancy of convolutional neural networks in the field of electronic nose drift compensation, and outperforms traditional methods on multiple public data sets .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113837085B_ABST
    Figure CN113837085B_ABST
Patent Text Reader

Abstract

The present invention relates to an electronic nose drift compensation method based on a domain adaptive convolutional neural network, which is characterized by comprising obtaining source domain sample and target domain sample data, inputting k branches respectively according to sensor dimensions, connecting to four classifiers through four convolution blocks of three convolution paths, performing feature projection, and obtaining a final output based on a maximum mean difference (MMD). The present invention has the following beneficial effects: 1. It is more practical without the need to use target domain data for modeling; 2. Drift compensation is realized at the decision layer without the need for additional calculation; 3. The network structure is customizable and has strong flexibility; 4. A specially designed loss function is used to better train the network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of electronic nose signal processing technology, and specifically designs an electronic nose drift compensation method based on a domain adaptive convolutional neural network. Background Art

[0002] Electronic noses (also known as artificial olfactory systems) are widely used in many fields such as food safety, environmental quality monitoring, and biomedicine. However, due to problems with their manufacturing process and materials, sensors that are used for a long time will inevitably experience unpredictable and nonlinear drift. This requires the use of drift compensation algorithms to suppress the damage to recognition accuracy caused by drift.

[0003] There are two main types of methods for suppressing electronic nose drift: one is traditional methods, such as domain regularized component analysis, cross-domain discriminant subspace learning method, cross-domain extreme learning machine, etc. The other is deep learning-based methods, such as autoencoder, deep belief network, long short-term memory, etc.

[0004] Deficiencies of existing methods: Most existing modeling methods require the participation of target domain samples to learn the distribution of the target domain to achieve domain alignment. However, in actual engineering application scenarios, it is impossible to obtain a large amount of evenly distributed target domain data, which is not practical enough.

[0005] Moreover, there is no drift compensation method based on convolutional neural network in the existing electronic nose drift compensation methods. Summary of the invention

[0006] In order to solve the above technical problems, the present invention proposes an electronic nose drift compensation method based on a domain adaptive convolutional neural network: Target-domain-free Domain Adaptation Convolutional Neural Network (TDACNN, a domain adaptive convolutional neural network without a target domain), designs a multi-branch multi-classifier structure, and uses multiple classifiers at the same time, and adds a classifier integration method based on maximum mean discrepancy (MMD), so that the classifier can make full use of the features of different levels in the network, and adds an optimized loss function to assist training, so as to achieve drift compensation at the decision level without using target domain data for modeling, and make up for the vacancy of drift compensation methods based on convolutional neural networks in the field of electronic nose drift compensation. The technical solution of the present invention is as follows:

[0007] An electronic nose drift compensation method based on domain adaptive convolutional neural network:

[0008] First, after the K-way electronic nose sensor system detects the gas to be tested in the environment, the sensor system generates a current signal or a voltage signal, which is independently processed into a resistance response curve. Each signal sample is filtered and amplified by the signal conditioning circuit, and then converted by AD to generate a valid gas digital signal.

[0009] Secondly, step A1: the gas digital signal is sent to the processor, the processor extracts the characteristics of the response curve, and obtains the original data of the electronic nose. In the drift compensation problem of the electronic nose, the data collected before the sensor drifts belongs to the source domain, which is called the source domain sample; the data collected after the drift occurs belongs to the target domain, which is called the target domain sample.

[0010] Step A2: Batch normalization is performed on the source domain samples and the target domain sample data respectively;

[0011] Step A3: Divide the normalized data of the two groups of samples into k groups according to the sensor dimension, where k is the number of sensors;

[0012] Step A4: input k groups of data into k branches respectively, and perform convolution operation on the data through the convolution path of three convolutional blocks on each branch;

[0013] Step A5: Connect the outputs of the convolution blocks of the same level on all branches through width concatenation (WidthConcatenate);

[0014] First convolution path: all the outputs of Convolutional Block A are width-joined and connected to Classifier 1.

[0015] Second convolution path: The outputs of all convolutional blocks B are spliced ​​with their widths and connected to Classifier 2. The outputs of the convolutional blocks B are also connected to convolutional blocks D. The outputs of the convolutional blocks D are spliced ​​with their widths and connected to Classifier 3.

[0016] The third convolution path: the outputs of all convolutional blocks C are width-joined and connected to Classifier 4.

[0017] Step A6: All the classifiers reproject the convolved features respectively, and then output the results in the form of probability;

[0018] Step A7: The results of different classifiers are fused through a classifier integration method based on the maximum mean difference (MMD) to obtain the final output, that is, to make a judgment on the input gas sample and obtain the type of the gas.

[0019] The four classifiers have the same structure: they are composed of two 100-unit fully connected layers and an additive angle-spaced Softmax loss function with a dynamic parameter adjustment strategy. During the prediction process, the four classifiers may produce different results for the same gas input sample. In this case, it is necessary to evaluate the reliability of the different results to obtain the final output of the network.

[0020] In step A6:

[0021] Step B1: After receiving the width-concatenated features from the convolutional block, the classifier performs nonlinear projection through two fully connected layers (fc 100) with 100 units;

[0022] Step B2: The output feature matrix of the fully connected layer is passed into the additive angle interval Softmax loss function, the result is output in the form of probability, and the category with the highest probability is selected as the pseudo label. The pseudo label obtained by the nth classifier is

[0023] Step B3: The feature matrix output by the fully connected layer is used to calculate the maximum mean difference (MMD) between the current target domain sample and the source domain sample. To calculate the MMD between the source domain s and the target domain t, it is necessary to obtain all samples of all categories of gases in the source domain and the target domain respectively:

[0024]

[0025] in, and represents two batches of samples sampled from the source domain s and the target domain t respectively, represents the i-th sample in the source domain s, represents the jth sample in the target domain t, and M represents D s The number of samples in D t The number of samples in , φ(·) represents the kernel function of the reproducing kernel Hilbert space (RKHS). In the method proposed in this patent, a single target domain sample currently being tested is used to calculate the MMD between it and the source domain sample, thereby eliminating the need to obtain a large number of uniformly distributed target domain samples of all categories, thereby improving practicality. It is written as follows:

[0026]

[0027] in, represents the i-th sample in the source domain s, x t represents a single target domain sample currently being tested. Assume x t is identified as the cth type of gas by the nth classifier, then represents the sampling of the c-th class sample in the source domain s, M c express The number of samples in , fc n represents the hidden layer output of the nth classifier, φ(·) represents the kernel function of the reproducing kernel Hilbert space (RKHS), and H represents the reproducing kernel Hilbert space.

[0028] Step B4: This patent proposes a normalized sigmoid function (SS(x)) to map the maximum mean difference (MMD) obtained in step B3 to a distribution consistent with the output of the additive angle interval Softmax loss function obtained in step B2:

[0029]

[0030] Among them, x represents the function input, x *represents zero-mean normalized x, and e represents a natural constant. Using this function, MMD is mapped to the interval from 0 to 1, which is consistent with the output distribution of the additive angle interval Softmax loss function.

[0031] Step B5: The maximum mean difference (MMD) and the additive angle margin Softmax loss function output are fused through the weighted credibility score WCS (Weighted Credibility Score) to select the most credible result when the results of multiple classifiers are inconsistent. Let C be the pseudo-label domain predicted by the classifier, and define the weighted credibility score WCS of the sample with pseudo-label c (c∈C) c for:

[0032]

[0033] in, represents the pseudo label obtained by the nth classifier, represents the pseudo-label obtained by the additive angular margin Softmax loss function of the nth classifier The probability of represents the sampling of the c-th class sample in the source domain s, x t represents a single target domain sample currently being tested, w n represents the weight of the nth classifier in the score. For each label that appears in the result, the corresponding WCS is calculated respectively. All classifiers whose results are sample gas c are selected. The maximum mean difference and additive angle interval Softmax loss function output of each classifier are calculated respectively. Then the results are multiplied by the corresponding weight w. n And add them together to obtain the weighted credibility score WCSc of the pseudo label c as the sample gas c;

[0034] Step B6: Because a higher WCS means that the pseudo-tag has a higher credibility, after completing the WCS calculation of all pseudo-tags, the pseudo-tag with the highest WCS is selected as the final result of the algorithm, that is, the credibility of the probability value that the current detected gas is sample gas C. The greater the credibility, the more accurate the calculated probability value.

[0035] The processor outputs the gas classification result through the human-computer interaction mechanism.

[0036] Beneficial effect: The present invention designs an electronic nose drift compensation method based on a domain adaptive convolutional neural network, adopts a multi-branch multi-classifier structure, uses multiple classifiers at the same time, and adds a classifier integration method based on maximum mean discrepancy (MMD), so that the classifier can make full use of features of different levels in the network, and adds an optimized loss function to assist training, so as to achieve drift compensation at the decision-making level without using target domain data for modeling, which not only simplifies the data, but also makes up for the vacancy of the drift compensation method based on convolutional neural network in the field of electronic nose drift compensation.

[0037] It has achieved better results than traditional methods in multiple experimental settings of multiple public data sets, and does not require the use of target domain data for modeling, which has higher practical value than most traditional methods. The specific advantages are as follows: 1. It does not require the use of target domain data for modeling, which is more practical; 2. It achieves drift compensation at the decision layer without additional calculations; 3. The network structure is customizable and has strong flexibility; 4. The use of specially designed loss functions can better train the network. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 This is the TDACNN network structure diagram.

[0039] Figure 2 This is the TDACNN workflow diagram.

[0040] Figure 3 Graph for classifier ensemble. DETAILED DESCRIPTION

[0041] like Figure 2 As shown, an electronic nose drift compensation method based on a domain adaptive convolutional neural network includes:

[0042] Step A1: Obtain the original data of the electronic nose. In the drift compensation problem of the electronic nose, the data collected before the sensor drifts belongs to the source domain, which is called the source domain sample; the data collected after the drift occurs belongs to the target domain, which is called the target domain sample;

[0043] Step A2: Batch normalization is performed on the source domain samples and the target domain sample data respectively;

[0044] Step A3: Divide the normalized data of the two groups of samples into k groups according to the sensor dimension, where k is the number of sensors;

[0045] like Figure 1As shown, step A4: input k groups of data into k branches respectively, and perform convolution operation on the data through the convolution path of three convolutional blocks on each branch;

[0046] Step A5: Connect the outputs of the convolution blocks of the same level on all branches through width concatenation (WidthConcatenate);

[0047] First convolution path: all the outputs of Convolutional Block A are width-joined and connected to Classifier 1.

[0048] Second convolution path: The outputs of all convolutional blocks B are width-joined and connected to Classifier 2. The output of the convolutional block B is also connected to the convolutional block D. The output of the convolutional block D is connected to Classifier 3.

[0049] The third convolution path: the outputs of all convolutional blocks C are width-joined and connected to Classifier 4.

[0050] Step A6: All the classifiers reproject the convolved features respectively, and then output the results in the form of probability;

[0051] Step A7: The results of different classifiers are fused through a classifier integration method based on the maximum mean difference (MMD) to obtain the final output, that is, to make a judgment on the input gas sample and obtain the type of the gas.

[0052] The four classifiers have the same structure: they are composed of two 100-unit fully connected layers and an additive angle-spaced Softmax loss function with a dynamic parameter adjustment strategy connected in sequence.

[0053] like Figure 3 As shown, in step A6:

[0054] Step B1: Different classifiers receive features from different convolution blocks, i.e., classifier 1 receives the width-joined features from convolution block A, classifier 2 receives the width-joined features from convolution block B, classifier 3 receives the width-joined features from convolution block D, and classifier 4 receives the width-joined features from convolution block C, followed by nonlinear projection through two fully connected layers (fc 100) with 100 units.

[0055] Step B2: The output feature matrix of the fully connected layer is passed into the additive angle interval Softmax loss function, the result is output in the form of probability, and the category with the highest probability is selected as the pseudo label. The pseudo label obtained by the nth classifier is

[0056] Step B3: The feature matrix output by the fully connected layer is used to calculate the maximum mean difference (MMD) between the current target domain sample and the source domain sample. To calculate the MMD between the source domain s and the target domain t, it is necessary to obtain all samples of all categories of gases in the source domain and the target domain respectively:

[0057]

[0058] in, represents the i-th sample in the source domain s, x t represents a single target domain sample currently being tested. Assume x t is identified as the cth type of gas by the nth classifier, then represents the sampling of the c-th class sample in the source domain s, M c express The number of samples in , fc n represents the hidden layer output of the nth classifier, φ(·) represents the kernel function of the reproducing kernel Hilbert space (RKHS), and H represents the reproducing kernel Hilbert space;

[0059] Step B4: Map the maximum mean difference (MMD) obtained in step B3 to a distribution consistent with the output of the additive angular margin Softmax loss function obtained in step B2 through a normalized sigmoid function (SS(x)):

[0060]

[0061] Among them, x represents the function input, x * represents zero-mean normalized x, and e represents a natural constant. Using this function, MMD is mapped to the interval from 0 to 1, which is consistent with the output distribution of the additive angle interval Softmax loss function.

[0062] Step B5: The maximum mean difference (MMD) and the additive angle margin Softmax loss function output are fused through the weighted credibility score WCS (Weighted Credibility Score) to select the most credible result when the results of multiple classifiers are inconsistent. Let C be the pseudo-label domain predicted by the classifier, and define the weighted credibility score WCS of the sample with pseudo-label c (c∈C) c for:

[0063]

[0064] in, represents the pseudo label obtained by the nth classifier, represents the pseudo-label obtained by the additive angular margin Softmax loss function of the nth classifier The probability of represents the sampling of the c-th class sample in the source domain s, x t represents a single target domain sample currently being tested, w n represents the weight of the nth classifier in the score. For each label that appears in the result, the corresponding WCS is calculated respectively. All classifiers whose results are sample gas c are selected. The maximum mean difference and additive angle interval Softmax loss function output of each classifier are calculated respectively. Then the results are multiplied by the corresponding weight w. n And add them together to obtain the weighted credibility score WCSc of the pseudo label c as the sample gas c;

[0065] Step B6: Select the pseudo-label with the highest WCS as the final result of the algorithm, that is, the credibility of the probability value that the current detected gas is sample gas C. The greater the credibility, the more accurate the calculated probability value.

[0066] The present invention combines the additive angle interval Softmax loss function with a dynamic parameter adjustment strategy to optimize network training. By using the angle to directly optimize the angle by using the difference between the feature vector and the network weight to intuitively represent the geometric level, it is more direct than other methods and can achieve intra-class aggregation and inter-class separation of features. It is easy to program and has low complexity.

[0067] In step B5, the additive angle interval Softmax loss function with a dynamic parameter adjustment strategy includes the following adjustment steps:

[0068] Step C1: Normalize the feature vector xi and the network weight Wj, and use θ to represent the angle between the feature vector and the network weight:

[0069]

[0070] in, Represents the network weight W j Perform a transpose operation.

[0071] Step C2: Use m to represent the additive angle interval penalty. The additive angle interval Softmax loss function is written as follows:

[0072]

[0073] Where s represents the scaling amplitude of the normalized feature vector ||xi||, N represents the number of units of the additive angle interval Softmax loss function, C represents the number of types in the training sample, and c represents the gas type to which the current sample belongs.

[0074] Step C3: In order to avoid a large loss value that cannot be reduced at the end of training, the present invention adds a dynamic adjustment strategy for the parameter m. In step C3, the additive angle interval penalty m is used to represent the penalty imposed on the angle. A larger m means a larger loss value. The value of m is dynamically adjusted using the following formula:

[0075]

[0076] Among them, e refers to the current training round number, v represents the rate of change, and m0 represents the initial value of m. By making m gradually and automatically decrease as the training progresses, the network can use a smaller m at the end of the training, thereby achieving a smaller loss value and stronger robustness.

[0077] In step C3: based on the additive angle interval Softmax loss function with a dynamic parameter adjustment strategy, the training process of the neural network is as follows:

[0078] Step D1: Obtain labeled electronic nose dataset samples from the source domain;

[0079] Step D2: Establish the target-free domain adaptive convolutional neural network (TDACNN) described above;

[0080] Step D3: Establish the additive angle interval Softmax loss function with the parameter dynamic adjustment strategy described above, and determine the values ​​of m0 and v;

[0081] Step D4: Determine the termination training threshold and the iteration number threshold of the loss function;

[0082] Step D5: Obtain training samples from the shuffled electronic nose dataset from the source domain and input them into TDACNN. According to steps C1 to C3, the additive angle interval Softmax loss function with a dynamic parameter adjustment strategy is used on the four classifiers to calculate the loss value of each classifier. Then, the loss values ​​of the four classifiers are added together to obtain the total loss value. The loss value is used to train TDACNN to obtain the updated network weight value.

[0083] Step D6: Determine whether the total loss value is less than the training termination threshold, if yes, go to step D8, if not, go to step D7;

[0084] Step D7: Determine whether the number of iterations of network training is greater than the iteration number threshold, if yes, go to step D8, otherwise go to step D5;

[0085] Step D8: Save the current weight value as the final weight value.

[0086] This example selects two typical electronic nose drift data sets for verification. In order to simulate long-term drift and short-term drift respectively, two experimental settings are set:

[0087] 1) Batch 1 is the source domain, and batch k is the target domain (k = 2, 3, ..., 10);

[0088] 2) Use batch k-1 as the source domain and batch K as the target domain (K=2,3,…,10) in sequence.

[0089] 1. Dataset A

[0090] From the UC Irvine Machine Learning Repository, collected by Vergara, it contains data collected over three years, including 16 metal oxide electronic nose sensors, and a total of 6 gas samples, including different concentrations of ammonia, acetone, ethylene, acetaldehyde, ethanol and toluene. Each sensor has 8 feature dimensions, and each sample is 128 dimensions.

[0091] The data set is divided into 10 batches according to time:

[0092]

[0093]

[0094] 2. Dataset B

[0095] Collected by Tao Liu from Chongqing University, it contains data collected over four months, including 32 electronic nose sensors, and seven beverages selected as experimental samples, including beer, black tea, green tea, liquor, oolong tea, Pu'er tea and wine of different concentrations. The data set contains the original voltage response curve of the sensor within 180s, that is, the data dimension of each sample is 32×180.

[0096] The dataset is divided into 3 batches based on month:

[0097]

[0098] 3. Experimental results

[0099] Some typical algorithms were selected for comparison, and two experiments were conducted on dataset A and dataset B. The experimental results are shown below:

[0100]

[0101]

[0102] It can be seen that the target-free domain adaptive convolutional neural network (TDACNN) achieved the best recognition accuracy compared with other comparison methods under the two experimental settings of the two datasets, proving that it has good adaptability to different datasets and can achieve good results in scenarios with long-term drift or short-term drift. In addition, modeling does not require the use of target domain data, and its practicality is higher than that of the comparison methods.

Claims

1. A method for electronic nose drift compensation based on domain adaptive convolutional neural network, characterized in that: include: Step A1: Obtain the original data of the electronic nose. In the drift compensation problem of the electronic nose, the data collected before the sensor drifts belongs to the source domain, which is called the source domain sample; The data collected after the drift occurs belongs to the target domain and is called the target domain sample; Step A2: Batch normalization is performed on the source domain samples and the target domain sample data respectively; Step A3: Divide the normalized data of the two groups of samples into k groups according to the sensor dimension, where k is the number of sensors; Step A4: k groups of data are input into k branches respectively, and each branch includes three convolutional blocks (Convolutional Block) connected in sequence: convolutional block A, convolutional block B, and convolutional block C. The convolution path performs convolution operation on the data; Step A5: Connect the outputs of the convolution blocks of the same level on all branches through width concatenation: First convolution path: The outputs of all convolutional blocks A on each branch are width-joined and connected to Classifier 1. Second convolution path: The outputs of all convolutional blocks B on each branch are connected to Classifier 2 after width splicing, and the outputs of convolutional blocks B on each branch are connected to Convolutional Block D after width splicing. The output of Convolutional Block D is connected to Classifier 3. The third convolution path: the outputs of all convolutional blocks C on each branch are width-joined and connected to Classifier 4. Step A6: All the classifiers reproject the convolved features respectively, and then output the results in the form of probability; Step A7: The results of different classifiers are fused through a classifier integration method based on the maximum mean difference (MMD) to obtain the final output, that is, to make a judgment on the input gas sample and determine the type of the gas.

2. The electronic nose drift compensation method based on domain adaptive convolutional neural network according to claim 1 is characterized in that: The four classifiers have the same structure: they are composed of two fully connected layers with one hundred units and an additive angular interval Softmax loss function with a dynamic parameter adjustment strategy connected in sequence.

3. The electronic nose drift compensation method based on domain adaptive convolutional neural network according to claim 2 is characterized in that: In step A6: Step B1: After each classifier receives the width-concatenated features from the corresponding convolutional block, it performs nonlinear projection through two fully connected layers (fc 100) with 100 units; Step B2: The feature matrix output by the fully connected layer is passed into the additive angle interval Softmax loss function, the result is output in the form of probability, and the category with the highest probability is selected as the pseudo label. The pseudo label obtained by the nth classifier is Step B3: The feature matrix output by the fully connected layer is used to calculate the maximum mean difference (MMD) between the current target domain sample and the source domain sample. To calculate the MMD between the source domain s and the target domain t, it is necessary to obtain all samples of all categories of gases in the source domain and the target domain respectively: in, represents the i-th sample in the source domain s, x t represents a single target domain sample currently being tested, x t is identified as the cth type of gas by the nth classifier, then represents the sampling of the c-th class sample in the source domain s, M c express The number of samples in , fc n represents the hidden layer output of the nth classifier, φ(·) represents the kernel function of the reproducing kernel Hilbert space (RKHS), and H represents the reproducing kernel Hilbert space; Step B4: Map the maximum mean difference MMD obtained in step B3 to a distribution consistent with the output of the additive angle interval Softmax loss function obtained in step B2 through the normalized sigmoid function SS(x): Among them, x represents the function input, x * represents zero-mean normalized x, and e represents a natural constant; using this function, MMD is mapped to the interval from 0 to 1, which is consistent with the output distribution of the additive angle interval Softmax loss function; Step B5: The maximum mean difference MMD and the output of the additive angle interval Softmax loss function are fused through the weighted credibility score WCS (Weighted Credibility Score) to select the most credible result when the results of multiple classifiers are inconsistent. Let C be the pseudo-label domain predicted by the classifier, and define the weighted credibility score WCS of the sample with pseudo-label c, c∈C c for: in, represents the pseudo label obtained by the nth classifier, represents the pseudo-label obtained by the additive angle margin Softmax loss function of the nth classifier The probability of represents the sampling of the c-th class sample in the source domain s, x t represents a single target domain sample currently being tested, w n represents the weight of the nth classifier in the score. For each label that appears in the result, the corresponding WCS is calculated respectively. All classifiers whose results are sample gas c are selected. The maximum mean difference of each classifier and the additive angle interval Softmax loss function are fused and calculated respectively. Then the results are multiplied by the corresponding weight w. n And add them together to obtain the weighted credibility score WCSc of the pseudo label c as the sample gas c; Step B6: Select the pseudo-label with the highest WCS as the final result of the algorithm, that is, the credibility of the probability value that the current detected gas is sample gas C. The greater the credibility, the more accurate the calculated probability value.

4. The electronic nose drift compensation method based on domain adaptive convolutional neural network according to claim 3 is characterized in that: In the step B2, The additive angle interval Softmax loss function includes the following adjustment steps: Step C1: Transform the feature vector x i and network weight W j Normalized, use θ to represent the angle between the feature vector and the network weight: in, Represents the network weight W j Perform a transpose operation; Step C2: m is used to represent the additive angle interval penalty. The additive angle interval Softmax loss function is written as follows: Where s represents the normalized eigenvector ||x i || is the scaling amplitude, N is the number of units of the additive angle interval Softmax loss function, C is the number of types in the training sample, and c is the type of gas to which the current sample belongs; Step C3: Use the additive angle interval penalty m to represent the penalty imposed on the angle, and dynamically adjust the value of m using the following formula: Among them, e refers to the current training round number, v represents the rate of change, and m0 represents the initial value of m.

5. The electronic nose drift compensation method based on domain adaptive convolutional neural network according to claim 4 is characterized in that: It also includes: the training process of the neural network, as follows: Step D1: Obtain labeled electronic nose dataset samples from the source domain; Step D2: Establish a domain-adaptive convolutional neural network TDACNN without a target domain; Step D3: Establish an additive angle interval Softmax loss function with a dynamic parameter adjustment strategy and determine the values ​​of m0 and v; Step D4: Determine the termination training threshold and the iteration number threshold of the loss function; Step D5: Obtain training samples from the shuffled electronic nose dataset from the source domain and input them into TDACNN. According to steps C1 to C3, the additive angle interval Softmax loss function with a dynamic parameter adjustment strategy is used on the four classifiers to calculate the loss value of each classifier. Then, the loss values ​​of the four classifiers are added together to obtain the total loss value. The loss value is used to train TDACNN to obtain the updated network weight value. Step D6: Determine whether the total loss value is less than the training termination threshold, if yes, go to step D8, if not, go to step D7; Step D7: Determine whether the number of iterations of network training is greater than the iteration number threshold, if yes, go to step D8, otherwise go to step D5; Step D8: Save the current weight value as the final weight value.