Electronic nose gas classification method based on contour local constraint dictionary pair learning

By adopting a method based on contour local constraint dictionary pair learning in electronic nasal gas classification, the problem of block diagonal structure weakening the sample feature connection is solved, and the model's expression ability and the accuracy of gas classification are improved.

CN120217077APending Publication Date: 2025-06-27SOUTHWEST UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510245721.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the prior art, the block diagonal structure divides the matrix into independent blocks, weakening the connection between the characteristics of sample in different categories, resulting in the model's poor performance in capturing sample feature information, and limiting the model's representation ability.

Method used

Using a method based on contour local constraint dictionary pair learning, the corresponding relationship between the contour matrix and dictionary atoms is constructed, the local contour constraint terms are established, the connection between the sample features of different categories is improved, and the expression ability of the model is improved.

Benefits of technology

By improving the connection between sample features, the model can better capture data structures and feature relationships, improving the accuracy of gas classification and model performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120217077A_ABST
    Figure CN120217077A_ABST
Patent Text Reader

Abstract

An electronic nose gas classification method based on contour local constraint dictionary pair learning is characterized by comprising the steps of 1, constructing a dictionary pair learning model DPL-LCP based on contour local constraint terms; 2, acquiring gas sample data of C types, and training the DPL-LCP to obtain a comprehensive dictionary matrix D, an analysis dictionary matrix P and a sparse coding matrix A of each gas type; 3, obtaining a reconstruction matrix of each gas category according to D and P of each gas category, and then integrating the reconstruction matrixes of all gas categories into an electronic nose system; 4, the electronic nose system collects to-be-classified gas data y, y is reconstructed through the reconstruction matrixes of the C gas categories, the residual value of y before and after reconstruction is calculated, and then the gas category corresponding to the minimum residual value is output. The method has the advantages that the problem of weakening of the relation between different types of sample features of the block diagonal structure is solved, and the ability of the model to capture the data structure and the feature relation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gas recognition, and particularly to an electronic nose gas classification method based on contour local constrained dictionary pair learning. Background Art

[0002] With the continuous development of sensor technology and pattern recognition algorithms, a new type of bionic olfactory system, the electronic nose (E-nose), which consists of a chemical sensor array with wide selectivity and a suitable pattern recognition method, has been widely used in recent years in fields such as air quality, medical diagnosis, industrial waste gas, and food.

[0003] The dictionary learning (DL) model belongs to the category of machine learning technologies. It is based on sparse representation and has achieved important research results in recent years in signal processing, image processing, etc. In the process of solving the dictionary learning problem, our goal is to discover a dictionary in which each sample in the dataset can be connected as a sparse linear combination of its constituent basis vectors.

[0004] Most dictionary pair learning models adopt a block diagonal structure representation method, which improves the recognition ability of the dictionary matrix analysis and the coding coefficient matrix, thereby obtaining better coding coefficients and a comprehensive dictionary matrix. As a simplified method of matrix operation, the block diagonal structure can improve the calculation efficiency in some cases, but its limitations cannot be ignored.

[0005] Disadvantages of the prior art: The block diagonal structure divides the matrix into independent blocks, weakening the connection between the features of different category samples, which may lead to poor performance of the model in capturing sample feature information, thus limiting the representation ability of the model. Summary of the Invention

[0006] An electronic nose gas classification method based on contour local constrained dictionary pair learning provided by the present invention can improve the problem of weakened connection between the features of different category samples of the block diagonal structure, and further improve the ability of the model to capture the data structure and feature relationship.

[0007] To achieve the above object, the key of an electronic nose gas classification method based on contour local constrained dictionary pair learning provided by the present invention is to include the following steps:

[0008] Step 1: Construct a dictionary pair learning model DPL-LCP based on a contour local constraint term;

[0009] Step 2: Obtain gas sample data of C categories and train the dictionary pair learning model DPL-LCP respectively to obtain a comprehensive dictionary matrix D, an analysis dictionary matrix P, and a sparse coding matrix A for each gas category;

[0010] Step 3: According to the comprehensive dictionary matrix D and the analysis dictionary matrix P of each gas category, obtain the reconstruction matrix of each gas category, and then integrate the reconstruction matrices of all gas categories into the electronic nose system;

[0011] Step 4: The electronic nose system collects the gas data y to be classified, and uses the reconstruction matrices of C gas categories to reconstruct the gas data y to be classified respectively, and calculates the residual value of the gas data y to be classified before and after reconstruction. Then, the gas category corresponding to the minimum residual value is used as the gas classification result for output.

[0012] Through the above design, by means of the correspondence between the profile vector and the dictionary atom, the profile local constraint term is established using the profile vector and the dictionary atom. The profile matrix is the transpose of the encoding coefficient matrix. The local constraint term constructed in this way can not only improve the problem of weakening the connection between the sample features of different categories with a block diagonal structure, but also because if the autocorrelation between the profile vectors is very high, it can be explained to a certain extent that the autocorrelation between the corresponding dictionary atoms will also be relatively high. Therefore, this algorithm can reduce the autocorrelation between the dictionary atoms, thereby improving the performance of the model.

[0013] Preferably: In the step 1, the specific steps of constructing the dictionary pair learning model DPL-LCP based on the profile local constraint term are as follows:

[0014] Step A1: Initialize the comprehensive dictionary matrix D using the dictionary learning algorithm KSVD for sparse representation, use the dictionary atoms to perform sparse representation on the gas sample X, and use the analysis dictionary matrix P to analyze and obtain the sparse coding matrix A, expressed as A = PX, so as to obtain the basic model of the dictionary pair learning model;

[0015] When the traditional dictionary learning method performs sparse representation on the sample X using the dictionary atoms, it often imposes a regularization constraint on the coding matrix A. In the present invention, an additional analysis dictionary matrix P is introduced in the dictionary pair learning method to analyze and obtain the coding matrix A, ensuring a more comprehensive representation of the sample X.

[0016] Step A2: Transpose the sparse coding matrix A to obtain the profile matrix Q, use the profile vector to represent the gas sample X, and according to the one-to-one correspondence between the dictionary atom and the profile vector, combine the graph theory, and use the profile vector to construct the weight matrix M;

[0017] There is a one-to-one correspondence between the dictionary atom and the profile vector. In order to improve the discriminant performance of the coding coefficient, the profile local constraint term is constructed. The profile matrix, as the transpose matrix of the sparse coding matrix, can well reflect the structural information of the sparse coding.

[0018] The use of the profile vectors takes into account the contributions of the corresponding dictionary atoms in the linear representation of all samples, making full use of the characteristics of data in different categories, thus overcoming the problem of weakened connections between the characteristics of samples in different categories in the block diagonal structure. By calculating the similarity between the profile vectors, the model can well capture the sample feature information and better understand and represent the overall structure of the data.

[0019] Step A3: Measure the similarity between the profile vectors through the dictionary atoms and construct a profile local constraint term;

[0020] When two dictionary atoms belong to the same category, their corresponding profile vectors have a high similarity. Therefore, the dictionary atoms can be used to measure the similarity between the profile vectors. The profile vectors can reflect the autocorrelation between the dictionary atoms, so this algorithm can reduce the autocorrelation between the dictionary atoms, thereby improving the performance of the model.

[0021] Step A4: By imposing an L 2,p norm constraint on the analysis dictionary matrix P, a row-sparse analysis dictionary matrix is obtained;

[0022] The redundancy that may exist in the original data will have an adverse effect on classification. In the present invention, by using an L 2,p norm constraint on the analysis dictionary matrix P, P will be made row-sparse; that is, some rows of P will become 0. In this case, the features corresponding to these rows are not used for learning sparse coding. By this method, more discriminative features are used to obtain sparse coding, which helps the model to more accurately select important features when facing complex data and feature relationships. In addition, the interference of noise and irrelevant information can be effectively suppressed.

[0023] Step A5: Integrate the basic model, the profile local constraint term, and the row-sparse analysis dictionary matrix to obtain a dictionary pair learning model DPL-LCP based on the profile local constraint term.

[0024] Preferably: In the said step A1, the expression of the basic model is:

[0025]

[0026] where λ represents a penalty function, Ψ(D, P, A, X) is a loss function, D and P form a dictionary pair; D is a comprehensive dictionary matrix, P is an analysis dictionary matrix, p is an atom of the analysis dictionary; X is a gas sample, x is a single sample; F represents a substitute for the norm size;

[0027] The sparse representation of the gas sample X using the dictionary atoms has the expression:

[0028] X = DA (2)

[0029] Among them, is a sparse coding matrix, and formula (2) is transformed into formula (3):

[0030]

[0031] Preferably: in the step A2, the expression of the contour matrix Q is:

[0032]

[0033] where q i is a contour vector, the superscript "T" represents matrix transpose; formula (3) is transformed into matrix form:

[0034]

[0035] The expression of the weight matrix M is:

[0036]

[0037] where i, j ∈ [1, n], exp represents the natural exponential function, KNN(q i ) represents the k-nearest neighbor of the contour vector q i , and δ represents a parameter.

[0038] Preferably: in the step A3, the expression of the contour local constraint term is:

[0039]

[0040] where L represents the Laplacian matrix, L = T - M; T represents a diagonal matrix, T = diag(t1,..., t n ), Tr() represents the trace of the matrix, which is the sum of the diagonal elements of the matrix.

[0041] Preferably: in the step A4, the row-sparse analysis dictionary matrix is:

[0042]

[0043] Preferably: in the step A5, by combining formulas (1), (7), and (8), the expression of the dictionary pair learning model DPL-LCP based on the contour local constraint term is obtained as:

[0044]

[0045] Among them, α, ρ, and ω are penalty parameters; c represents the c-th gas category, c ∈ [1, C]; in formula (9), the first term is the dictionary reconstruction error term, the second term is the sparse coding error term, the third term obtains the row-sparse analysis dictionary matrix; the fourth term is the contour local constraint term, which improves the discriminability of the coding coefficients. It ensures that the dictionary atoms do not become too large, preventing numerical instability during training, and also helps to enhance the robustness and generalization ability of the dictionary.

[0046] Preferably: in the step 2, the alternating constraint method is adopted to determine the three variables of the comprehensive dictionary matrix D, the analysis dictionary matrix P, and the sparse coding matrix A. The specific process is as follows:

[0047] (1) Fix D and P, and update A:

[0048] When solving the sparse coding matrix A, assuming that D and P are constants, the objective function is:

[0049]

[0050] Make Get the closed-form solution:

[0051] A = (D T D + αI) -1 (D T X + αPX) (11)

[0052] Among them, I represents the identity matrix;

[0053] (2) Fix D and A, and update P:

[0054] When solving the analysis dictionary matrix P, assuming that D and A are constants, the objective function is:

[0055]

[0056] Let p = 1, and get:

[0057] ||P|| 2,1 = Tr(P T ΛP) (13)

[0058] Among them, Λ is defined as:

[0059]

[0060] Make Get the closed-form solution:

[0061] P = αAX T (αXX T + ρΛ T ) -1(15)

[0062] (3) Fix P and A, and update D:

[0063] Update the comprehensive dictionary matrix D using the ADMM algorithm. First, introduce an auxiliary variable S:

[0064]

[0065] Update D and S in each iteration:

[0066]

[0067] where Y is the Lagrange multiplier; μ is the penalty parameter, μ < 0; and t represents the t-th iteration.

[0068] Since three variables D, P, and A need to be solved and these three variables are interdependent, the alternating constraint method is used to solve this problem.

[0069] As a preference: In the step 3, the expression of the reconstruction matrix is:

[0070]

[0071] As a preference: In the step 4, use the reconstruction matrix to reconstruct the gas data y to be classified, and the expression is:

[0072]

[0073] Calculate the residual value of the gas data y to be classified before and after reconstruction, and the expression is:

[0074]

[0075] where Label(y) represents the residual value of the gas data y to be classified before and after reconstruction.

[0076] Reconstruct a single test data using the reconstruction matrix of each class, calculate the residual of the single test data before and after reconstruction, and determine the class of the test data by comparing the residuals of different classes. The test sample belongs to the class with the smallest reconstruction error.

[0077] Advantages of the present invention:

[0078] 1. Different from general local constraint terms, the present invention uses a contour matrix to construct a Laplacian graph to describe the structural information of coding coefficients, and then uses dictionary atoms to weigh the similarity between contours to construct a contour local constraint term to improve the coding efficiency. In addition, the recognition ability of coding coefficients helps the model to better capture the sample feature information in the data, improving the expression ability and recognition performance of the model.

[0079] 2. Since there is a one-to-one correspondence between dictionary atoms and contour vectors, when two dictionary atoms belong to the same class, their corresponding contour vectors have high similarity. Therefore, dictionary atoms can be used to measure the similarity between contour vectors. Conversely, contour vectors can also reflect the autocorrelation between dictionary atoms. Therefore, this algorithm can reduce the autocorrelation between dictionary atoms, thereby improving the performance of the model.

[0080] 3. Using the 2,p L-norm has the advantage of row sparsity. Using the 2,p L-norm as a regularization mechanism for analyzing the dictionary matrix improves the sparsity of features and enhances the flexibility and robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] Figure 1 is a schematic flowchart of the present invention;

[0082] Figure 2 is a diagram showing the influence of the number of dictionary atoms on the model of each method in the embodiment;

[0083] Figure 3 is a diagram showing the influence of the number of training samples on the model of each method in the embodiment;

[0084] Figure 4 is a diagram comparing the performance of the models of each method in the early experiments of the embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0085] The present invention will be further described in detail below with reference to the drawings and specific examples. The following embodiments or drawings are used to illustrate the present invention, but not to limit the scope of the present invention.

[0086] As Figure 1 shown: An electronic nose gas classification method based on contour local constraint dictionary pair learning includes the following steps:

[0087] Step 1: Construct a dictionary pair learning model DPL-LCP based on a contour local constraint term;

[0088] Step 2: Obtain gas sample data of C categories and train the dictionary pair learning model DPL-LCP respectively to obtain a comprehensive dictionary matrix D, an analysis dictionary matrix P, and a sparse coding matrix A for each gas category;

[0089] Step 3: According to the comprehensive dictionary matrix D and the analysis dictionary matrix P of each gas category, obtain a reconstruction matrix for each gas category, and then integrate the reconstruction matrices of all gas categories into the electronic nose system;

[0090] Step 4: The electronic nose system collects the gas data y to be classified, and uses the reconstruction matrices of C gas categories to reconstruct the gas data y to be classified respectively, calculates the residual values of the gas data y to be classified before and after reconstruction, and then outputs the gas category corresponding to the minimum residual value as the gas classification result.

[0091] In the step 1, the specific steps for constructing the dictionary pair learning model DPL-LCP based on the contour local constraint term are as follows:

[0092] Step A1: Initialize the comprehensive dictionary matrix D using the dictionary learning algorithm KSVD for sparse representation, sparsely represent the gas samples X using the dictionary atoms, and use the analysis dictionary matrix P to analyze and obtain the sparse coding matrix A, expressed as A = PX, so as to obtain the basic model of the dictionary pair learning model;

[0093] Step A2: Transpose the sparse coding matrix A to obtain the contour matrix Q, represent the gas samples X using the contour vectors, and construct the weight matrix M using the contour vectors in combination with the graph theory according to the one-to-one correspondence between the dictionary atoms and the contour vectors;

[0094] Step A3: Measure the similarity between the contour vectors through the dictionary atoms and construct the contour local constraint term;

[0095] Step A4: By imposing an L 2,p norm constraint on the analysis dictionary matrix P, obtain the row-sparse analysis dictionary matrix;

[0096] Step A5: Combine the basic model, the contour local constraint term and the row-sparse analysis dictionary matrix to obtain the dictionary pair learning model DPL-LCP based on the contour local constraint term.

[0097] In the step A1, the expression of the basic model is:

[0098]

[0099] where λ represents the penalty function, ψ(D, P, A, X) is the loss function, and D and P form a dictionary pair; D is the comprehensive dictionary matrix, d is the dictionary atom; P is the analysis dictionary matrix, X is the gas sample, F represents the symbol for the norm size;

[0100] The sparse representation of the gas sample X using the dictionary atoms is expressed as:

[0101] X = DA (2)

[0102] where, is a sparse coding matrix that transforms formula (2) into formula (3):

[0103]

[0104] In the step A2, the expression of the contour matrix Q is:

[0105]

[0106] where q i is the contour vector, the superscript "T" represents matrix transpose; transform formula (3) into matrix form:

[0107]

[0108] The expression of the weight matrix M is:

[0109]

[0110] where i, j ∈ [1, n], exp represents the natural exponential function, KNN(q i ) represents the k-nearest neighbors of the contour vector q i , and δ represents a parameter.

[0111] In the step A3, the expression of the contour local constraint term is:

[0112]

[0113] where L represents the Laplacian matrix, L = T - M; T represents the diagonal matrix, T = diag(t1,..., t n ), Tr() represents the trace of the matrix, which is the sum of the diagonal elements of the matrix.

[0114] In the step A4, the row-sparse analysis dictionary matrix is:

[0115]

[0116] In the step A5, combining formulas (1), (7), and (8), the expression of the dictionary pair learning model DPL-LCP based on the contour local constraint term is:

[0117]

[0118] where α, ρ, ω are penalty parameters; c represents the c-th gas category, c ∈ [1, C]; in formula (9), the first term is the dictionary reconstruction error term, the second term is the sparse coding error term, the third term obtains the row-sparse analysis dictionary matrix, and the fourth term is the contour local constraint term.

[0119] In the said step 2, the alternating constraint method is adopted to determine three variables: the comprehensive dictionary matrix D, the analysis dictionary matrix P, and the sparse coding matrix A. The specific process is as follows:

[0120] (1) Fix D and P, and update A:

[0121] When solving the sparse coding matrix A, assuming that D and P are constants, the objective function is:

[0122]

[0123] Make Get the closed-form solution:

[0124] A = (D T D + αI) -1 (D T X + αPX) (11)

[0125] where I represents the identity matrix;

[0126] (2) Fix D and A, and update P:

[0127] When solving the analysis dictionary matrix P, assuming that D and A are constants, the objective function is:

[0128]

[0129] Let p = 1, and get:

[0130] ||P|| 2,1 = Tr(P T ΛP) (13)

[0131] where Λ is defined as:

[0132]

[0133] Make Get the closed-form solution:

[0134] P = αAX T (αXX T + ρΛ T ) -1 (15)

[0135] (3) Fix P and A, and update D:

[0136] Use the ADMM algorithm to update the comprehensive dictionary matrix D. First, introduce an auxiliary variable S:

[0137]

[0138] Update D and S in each iteration:

[0139]

[0140] where Y is the Lagrange multiplier; μ is the penalty parameter, μ < 0; t represents the t-th iteration.

[0141] In step 3, the expression of the reconstruction matrix is:

[0142]

[0143] In step 4, use the reconstruction matrix to reconstruct the gas data y to be classified, and the expression is:

[0144]

[0145] Calculate the residual value of the gas data y to be classified before and after reconstruction, and the expression is:

[0146]

[0147] where Label(y) represents the residual value of the gas data y to be classified before and after reconstruction.

[0148] To verify the effectiveness of the present invention in different parameters, this embodiment verifies the proposed method on the pepper dataset, and compares it with methods such as the relaxed label consistency dictionary pair learning SLC-DPL, the mapping discriminant dictionary learning algorithm MDDL, the label consistent k-means singular value decomposition LC-KSVD, the projection dictionary pair learning DPL, the dictionary learning DL, the analytical discriminant dictionary learning ADDL, the incoherent dictionary pair learning InDPL, the scalable local constraint projection dictionary learning LC-PDL, and the self-expressive latent dictionary pair learning SLatDPL.

[0149] 1. Pepper gas dataset

[0150] This embodiment conducts a flavor detection experiment on 13 kinds of peppers. This experiment is completed in the intelligent sensory laboratory of the Pepper Research Institute of Guizhou Academy of Agricultural Sciences. The experimental instrument used is the commercial electronic nose PEN3 produced by a German airline. In this experiment, the odor data of 13 kinds of peppers are collected, as shown in Table 1 in detail:

[0151] Table 1

[0152]

[0153] 2. Results of the pepper gas dataset

[0154] Conduct a parameter sensitivity analysis on the experiment: the number of dictionary atoms, the sample dimension. The influence of the number of dictionary atoms is asFigure 2 as shown

[0155] The influence results of the sample dimension are shown in Table 2 as follows:

[0156] Table 2

[0157]

[0158]

[0159] Then, small-sample analysis and early experiment analysis are carried out on the method. The small-sample analysis is as Figure 3 shown

[0160] The early experiment analysis is shown in Table 3, Figure 4 as follows:

[0161] Table 3

[0162]

[0163] In summary, the method proposed by the present invention has better model performance compared with other comparative methods and can complete the classification tasks of various gases more accurately.

[0164] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. An electronic nose gas classification method based on contour local constraint dictionary learning, characterized in that: The following steps are involved: Step 1: Construct a dictionary pair learning model DPL-LCP based on contour local constraints; Step 2: Obtain gas sample data of C categories and train the dictionary pair learning model DPL-LCP respectively to obtain a comprehensive dictionary matrix D, an analysis dictionary matrix P and a sparse coding matrix A for each gas category; Step 3: According to the comprehensive dictionary matrix D and the analysis dictionary matrix P of each gas category, the reconstruction matrix of each gas category is obtained, and then the reconstruction matrices of all gas categories are integrated into the electronic nose system; Step 4: The electronic nose system collects the gas data y to be classified, and uses the reconstruction matrix of C gas categories to reconstruct the gas data y to be classified, and calculates the residual value of the gas data y to be classified before and after reconstruction, and then outputs the gas category corresponding to the minimum residual value as the gas classification result.

2. The electronic nose gas classification method based on contour local constraint dictionary learning according to claim 1 is characterized by: In step 1, the specific steps of constructing the dictionary pair learning model DPL-LCP based on the contour local constraint item are as follows: Step A1: Initialize the comprehensive dictionary matrix D using the dictionary learning algorithm KSVD for sparse representation, use the dictionary atoms to sparsely represent the gas sample X, and use the analysis dictionary matrix P to analyze and obtain the sparse coding matrix A, expressed as A=PX, and then obtain the basic model of the dictionary pair learning model; Step A2: Perform matrix transposition on the sparse coding matrix A to obtain the profile matrix Q, use the profile vector to represent the gas sample X, and use the profile vector to construct the weight matrix M based on the one-to-one correspondence between the dictionary atoms and the profile vectors in conjunction with graph theory; Step A3: measure the similarity between contour vectors through dictionary atoms and construct contour local constraint items; Step A4: By applying L to the analysis dictionary matrix P 2,p Norm constraint, get the row sparse analysis dictionary matrix; Step A5: The basic model, the contour local constraint item and the row sparse analysis dictionary matrix are integrated to obtain a dictionary pair learning model DPL-LCP based on the contour local constraint item.

3. The electronic nose gas classification method based on contour local constraint dictionary learning according to claim 2 is characterized by: In step A1, the basic model expression is: Where λ represents the penalty function, Ψ(D,P,A,X) is the loss function, D and P form a dictionary pair; D is the comprehensive dictionary matrix, D=[d1,d2,...,d n ], d is the dictionary atom; P is the analysis dictionary matrix, P = [p1, p2, ..., p n ] T , X is the gas sample, X=[x1,x2,...,x N ], F is a synonym for the size of the norm; The gas sample X is sparsely represented using dictionary atoms, and the expression is: X=DA(2) in, is a sparse coding matrix, which transforms formula (2) into formula (3):

4. The electronic nose gas classification method based on contour local constraint dictionary learning according to claim 3 is characterized by: In step A2, the expression of the profile matrix Q is: Among them, q i is the contour vector, The superscript "T" indicates matrix transpose; convert formula (3) into matrix form: The weight matrix M is expressed as: Among them, i, j∈[1, n], exp represents the natural exponential function, KNN(q i ) represents the contour vector q i The k nearest neighbors of , δ represents the parameter.

5. The electronic nose gas classification method based on contour local constraint dictionary learning according to claim 4 is characterized in that: In step A3, the expression of the local constraint term of the contour is: Where L represents the graph Laplacian matrix, L = TM; T represents the diagonal matrix, T = diag(t1,...,t n ), Tr() stands for the trace of a matrix, which is the sum of the diagonal elements of the matrix.

6. The electronic nose gas classification method based on contour local constraint dictionary learning according to claim 5 is characterized in that: In step A4, the row sparse analysis dictionary matrix is:

7. The electronic nose gas classification method based on contour local constraint dictionary learning according to claim 6 is characterized by: In step A5, by combining formulas (1), (7) and (8), the expression of the dictionary pair learning model DPL-LCP based on the contour local constraint term is obtained as follows: Among them, α, ρ, ω are penalty parameters; c represents the c-th gas category, c∈[1,C]; in formula (9), the first term is the dictionary reconstruction error term, the second term is the sparse coding error term, the third term is the row sparse analysis dictionary matrix, and the fourth term is the contour local constraint term.

8. The electronic nose gas classification method based on contour local constraint dictionary learning according to claim 1 is characterized by: In step 2, the alternating constraint method is used to determine the three variables of the comprehensive dictionary matrix D, the analysis dictionary matrix P and the sparse coding matrix A. The specific process is as follows: (1) Fix D and P and update A: When solving the sparse coding matrix A, it is assumed that D and P are constants, so the objective function is: Make Get the closed form solution: A=(D T D+αI) -1 (D T X+αPX)(11) Where I represents the identity matrix; (2) Fix D and A and update P: When solving the analytical dictionary matrix P, assuming that D and A are constants, the objective function is: Let p = 1, we get: ||P|| 2,1 =Tr(P T ΛP)(13) where Λ is defined as: make Get the closed form solution: P=αAX T (aXX T +rL T ) -1 (15) (3) Fix P and A, and update D: The ADMM algorithm is used to update the comprehensive dictionary matrix D. First, an auxiliary variable S is introduced: Update D and S in each iteration: Where Y is the Lagrange multiplier; μ is the penalty parameter, μ<0; t represents the tth iteration.

9. The electronic nose gas classification method based on contour local constraint dictionary learning according to claim 1 is characterized by: In step 3, the expression of the reconstruction matrix is:

10. The electronic nose gas classification method based on contour local constraint dictionary learning according to claim 1 is characterized by: In step 4, the gas data y to be classified is reconstructed using the reconstruction matrix, and the expression is: Calculate the residual value of the gas data y to be classified before and after reconstruction. The expression is: Among them, Label(y) represents the residual value of the gas data y to be classified before and after reconstruction.